dsh-agent-plugins-market 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -169
- package/README.zh.md +136 -170
- package/client/client.js +8202 -684
- package/client/client.js.map +1 -1
- package/lib/application/catalog.js +236 -47
- package/lib/application/details.js +19 -10
- package/lib/application/panel-resources.js +95 -0
- package/lib/application/project-agent-roles.js +39 -0
- package/lib/catalog/codex-mcp.js +114 -0
- package/lib/catalog/component-files.js +151 -0
- package/lib/catalog/manifests.js +105 -44
- package/lib/catalog/native-project.js +44 -23
- package/lib/catalog/paths.js +6 -6
- package/lib/catalog/project-config.js +96 -0
- package/lib/catalog/project-hooks.js +108 -0
- package/lib/catalog/scan-pipeline.js +6 -1
- package/lib/catalog/scan-resolvers.js +70 -26
- package/lib/catalog/source-catalog.js +16 -3
- package/lib/catalog/suite-components.js +125 -0
- package/lib/catalog/surfaces.js +60 -46
- package/lib/catalog/validate.js +16 -11
- package/lib/contracts/market.js +16 -1
- package/lib/index.js +187 -35
- package/lib/model/layouts.js +49 -0
- package/lib/routes.js +106 -6
- package/lib/runtime/agent-role-router.js +226 -0
- package/lib/runtime/commands-mounts.js +27 -67
- package/lib/runtime/feedback-tool.js +181 -0
- package/lib/runtime/hooks-mounts.js +66 -13
- package/lib/runtime/host-locale.js +23 -7
- package/lib/runtime/legacy-root-migration.js +12 -0
- package/lib/runtime/lsp-direct-config.js +6 -3
- package/lib/runtime/lsp-mounts.js +38 -24
- package/lib/runtime/lsp-server-state.js +19 -0
- package/lib/runtime/lsp-status.js +3 -2
- package/lib/runtime/mcp-backend.js +6 -2
- package/lib/runtime/mcp-client/config.js +6 -0
- package/lib/runtime/mcp-client/connection.js +8 -2
- package/lib/runtime/mcp-client/tools.js +6 -3
- package/lib/runtime/mcp-config.js +26 -13
- package/lib/runtime/mcp-direct-config.js +56 -0
- package/lib/runtime/mcp-mounts.js +25 -9
- package/lib/runtime/mcp-overrides.js +11 -5
- package/lib/runtime/mcp-status.js +10 -7
- package/lib/runtime/model-catalog.js +48 -0
- package/lib/runtime/project-runtime.js +136 -0
- package/lib/runtime/reconciler.js +38 -28
- package/lib/runtime/server-config.js +75 -0
- package/lib/runtime/skills-provider.js +31 -77
- package/lib/runtime/storage-migration.js +169 -0
- package/lib/runtime/subagent-catalog.js +129 -0
- package/lib/runtime/user-commands.js +86 -0
- package/lib/runtime/user-panels.js +176 -0
- package/lib/runtime/user-store.js +142 -0
- package/lib/types/application/catalog.d.ts +39 -9
- package/lib/types/application/panel-resources.d.ts +13 -0
- package/lib/types/application/project-agent-roles.d.ts +3 -0
- package/lib/types/application/queries.d.ts +17 -1
- package/lib/types/catalog/codex-mcp.d.ts +4 -0
- package/lib/types/catalog/component-files.d.ts +17 -0
- package/lib/types/catalog/manifests.d.ts +14 -9
- package/lib/types/catalog/native-project.d.ts +2 -5
- package/lib/types/catalog/paths.d.ts +4 -4
- package/lib/types/catalog/project-config.d.ts +6 -0
- package/lib/types/catalog/project-hooks.d.ts +10 -0
- package/lib/types/catalog/scan-pipeline.d.ts +2 -0
- package/lib/types/catalog/scan-resolvers.d.ts +4 -3
- package/lib/types/catalog/source-catalog.d.ts +1 -1
- package/lib/types/catalog/suite-components.d.ts +5 -0
- package/lib/types/catalog/surfaces.d.ts +2 -2
- package/lib/types/catalog/validate.d.ts +2 -0
- package/lib/types/contracts/market.d.ts +60 -0
- package/lib/types/contracts/mcp-status.d.ts +5 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/model/layouts.d.ts +102 -0
- package/lib/types/model/types.d.ts +51 -6
- package/lib/types/routes.d.ts +6 -1
- package/lib/types/runtime/agent-role-router.d.ts +95 -0
- package/lib/types/runtime/commands-mounts.d.ts +16 -7
- package/lib/types/runtime/feedback-tool.d.ts +49 -0
- package/lib/types/runtime/hooks-mounts.d.ts +4 -0
- package/lib/types/runtime/host-locale.d.ts +1 -1
- package/lib/types/runtime/legacy-root-migration.d.ts +2 -0
- package/lib/types/runtime/lsp-mounts.d.ts +4 -0
- package/lib/types/runtime/lsp-server-state.d.ts +3 -0
- package/lib/types/runtime/lsp-status.d.ts +1 -0
- package/lib/types/runtime/mcp-backend.d.ts +9 -1
- package/lib/types/runtime/mcp-client/config.d.ts +4 -3
- package/lib/types/runtime/mcp-client/tools.d.ts +3 -0
- package/lib/types/runtime/mcp-config.d.ts +11 -5
- package/lib/types/runtime/mcp-direct-config.d.ts +7 -0
- package/lib/types/runtime/mcp-mounts.d.ts +2 -1
- package/lib/types/runtime/mcp-overrides.d.ts +2 -0
- package/lib/types/runtime/mcp-status.d.ts +1 -1
- package/lib/types/runtime/model-catalog.d.ts +7 -0
- package/lib/types/runtime/project-runtime.d.ts +32 -0
- package/lib/types/runtime/reconciler.d.ts +2 -0
- package/lib/types/runtime/server-config.d.ts +10 -0
- package/lib/types/runtime/skills-provider.d.ts +1 -5
- package/lib/types/runtime/storage-migration.d.ts +15 -0
- package/lib/types/runtime/subagent-catalog.d.ts +52 -0
- package/lib/types/runtime/user-commands.d.ts +24 -0
- package/lib/types/runtime/user-panels.d.ts +91 -0
- package/lib/types/runtime/user-store.d.ts +51 -0
- package/package.json +10 -3
- package/schemas/README.md +69 -7
- package/schemas/agent-plugins/spec.md +48 -0
- package/schemas/claude-code/marketplace.schema.json +143 -0
- package/schemas/claude-code/plugin.schema.json +105 -0
- package/schemas/claude-code/spec.md +108 -0
- package/schemas/codex/marketplace.schema.json +78 -0
- package/schemas/codex/plugin.schema.json +77 -0
- package/schemas/codex/spec.md +91 -0
- package/schemas/cursor/marketplace.schema.json +82 -0
- package/schemas/cursor/plugin.schema.json +58 -0
- package/schemas/cursor/spec.md +92 -0
- package/schemas/github-copilot/marketplace.schema.json +107 -0
- package/schemas/github-copilot/plugin.schema.json +89 -0
- package/schemas/github-copilot/spec.md +105 -0
- package/schemas/kimi/marketplace.schema.json +38 -0
- package/schemas/kimi/plugin.schema.json +84 -0
- package/schemas/kimi/spec.md +94 -0
- package/schemas/qoder/marketplace.schema.json +115 -0
- package/schemas/qoder/plugin.schema.json +127 -0
- package/schemas/qoder/spec.md +111 -0
- package/schemas/skill-collection/spec.md +29 -0
- package/schemas/universal/marketplace.schema.json +98 -0
- package/schemas/universal/plugin.schema.json +49 -0
- package/schemas/universal/spec.md +53 -0
- package/schemas/zcode/marketplace.schema.json +161 -0
- package/schemas/zcode/plugin.schema.json +89 -0
- package/schemas/zcode/spec.md +102 -0
- package/lib/catalog/legacy-root-migration.js +0 -51
- package/lib/types/catalog/legacy-root-migration.d.ts +0 -14
package/client/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["searchableCache","searchableFor","h","css","useState","h","css","Modal","Button","Input","h","Modal","css","Button","h","css","css","h","Button","Tooltip","h","Component","h","useState","h","css","Button","useMemo","useState","useRef","h","Modal","css","Button","MarkdownText","h","css","Input","useState","useCallback","useMemo","h","css","Button","Toast","Modal","EMPTY_STATUS","useState","h","css","Button","formatObservedAt","Modal","useState","h","css","Button","Modal","primitives","useState","useCallback","h","css","h","css","createRoot","primitives","h"],"sources":["../src/contracts/market.ts","../src/client/api.ts","../src/client/locales.ts","../src/client/features/market/market-resource.ts","../src/client/features/market/market-view-model.ts","../src/client/market.module.css","../src/client/features/market/SourceTab.tsx","../src/client/features/market/SourceEditorModal.tsx","../src/client/features/market/InstallConfirmModal.tsx","../src/client/ui/ToggleSwitch.tsx","../src/client/features/market/SuiteCard.tsx","../src/client/ui/StatusIcon.tsx","../src/client/ErrorBoundary.tsx","../src/client/credentials.ts","../src/client/mcp-credential.module.css","../src/client/McpCredentialEditor.tsx","../src/client/features/suite-detail/suite-detail-resource.ts","../src/client/SuiteDetail.tsx","../src/client/SearchFilterToolbar.module.css","../src/client/SearchFilterToolbar.tsx","../src/client/MarketSection.tsx","../src/client/features/mcp-status/mcp-status-view-model.ts","../src/client/mcp-status.module.css","../src/client/McpStatusPanel.tsx","../src/client/LspStatusPanel.tsx","../src/client/McpPluginCard.tsx","../src/client/page-mode-selection.ts","../src/client/page-mode.tsx","../src/client/index.ts"],"sourcesContent":["/** Browser-safe market wire records and route constants shared by host and client. */\n\n/** Prefix for all Agent Plugins Market HTTP routes. */\nexport const MARKET_API_PREFIX = '/api/agent-plugins/' as const\n\n/** Fixed Agent Plugins Market HTTP routes. */\nexport const MARKET_ROUTES = {\n overview: `${MARKET_API_PREFIX}overview`,\n mcpStatus: `${MARKET_API_PREFIX}mcp-status`,\n lspStatus: `${MARKET_API_PREFIX}lsp-status`,\n lspServers: `${MARKET_API_PREFIX}lsp-servers`,\n progress: `${MARKET_API_PREFIX}progress`,\n config: `${MARKET_API_PREFIX}config`,\n suite: `${MARKET_API_PREFIX}suite`,\n skill: `${MARKET_API_PREFIX}skill`,\n addSource: `${MARKET_API_PREFIX}sources/add`,\n updateSource: `${MARKET_API_PREFIX}sources/update`,\n adoptSource: `${MARKET_API_PREFIX}sources/adopt`,\n removeSource: `${MARKET_API_PREFIX}sources/remove`,\n refreshSource: `${MARKET_API_PREFIX}sources/refresh`,\n install: `${MARKET_API_PREFIX}install`,\n uninstall: `${MARKET_API_PREFIX}uninstall`,\n setEnabled: `${MARKET_API_PREFIX}set-enabled`,\n setSurface: `${MARKET_API_PREFIX}set-surface`,\n mcpOverrides: `${MARKET_API_PREFIX}mcp-overrides`,\n setMcpOverride: `${MARKET_API_PREFIX}set-mcp-override`,\n mcpRetry: `${MARKET_API_PREFIX}mcp-retry`,\n mcpReauthorize: `${MARKET_API_PREFIX}mcp-reauthorize`,\n mcpBackend: `${MARKET_API_PREFIX}mcp-backend`,\n setMcpBackend: `${MARKET_API_PREFIX}set-mcp-backend`\n} as const\n\n/** The MCP mount backend state reported to the settings page. */\nexport interface McpBackendPayload {\n backend: 'builtin' | 'host'\n /** Whether the host `dsh-mcp-client` resolves from the plugin context. */\n hostClient: { available: boolean; version?: string }\n /** Download region: the persisted setting and its locale-resolved route. */\n downloadRegion: { setting: 'auto' | 'global' | 'china'; effective: 'global' | 'china' }\n}\n\n/** One unmanaged `.sources/` checkout the user can adopt as a source. */\nexport interface UnmanagedSource {\n id: string\n /** The checkout's `origin` remote URL; absent for non-git directories. */\n url?: string\n}\n\n/** A configured source row returned to the market client. */\nexport interface SourceOverview {\n id: string\n url: string\n branch?: string\n local?: boolean\n /** Acquisition kind (`git` / `local` / `archive`); `local` mirrors the legacy flag. */\n kind: string\n /** The checkout pre-existed (manually cloned or adopted); never deleted on removal. */\n adopted?: boolean\n cloned: boolean\n lockCommit?: string\n error?: string\n /** Scanner diagnostics for this source (dropped entries, fallbacks taken);\n * absent when the scan completed with no notes. */\n scanNotes?: string[]\n suiteIds: string[]\n}\n\n/** Counts of runtime surfaces displayed on a suite card. */\nexport interface SuiteSurfaceCounts {\n skills: number\n mcp: number\n hooks: number\n commands: number\n agents: number\n lsp: number\n}\n\n/** Effective per-surface enablement of an installed suite. */\nexport interface SuiteSurfaceToggles {\n skills: boolean\n mcp: boolean\n hooks: boolean\n commands: boolean\n agents: boolean\n lsp: boolean\n}\n\n/** One server's persisted MCP override (wire shape mirrors runtime types). */\nexport type McpServerOverrideWire = {\n enabled?: boolean\n url?: string\n headers?: Record<string, string>\n env?: Record<string, string>\n args?: string[]\n}\n\n/** Overrides for one suite keyed by mcp.json server key. */\nexport type McpSuiteOverridesWire = Record<string, McpServerOverrideWire>\n\n/** A normalized suite card returned by the overview route. */\nexport interface SuiteOverviewCard {\n sourceId: string\n suiteId: string\n name: string\n version?: string\n description?: string\n keywords: string[]\n surfaces: SuiteSurfaceCounts\n enabled: boolean\n installed: boolean\n /** Per-surface toggles; present on installed suites only. */\n surfaceToggles?: SuiteSurfaceToggles\n dimension: string\n layout: string\n remoteUrl?: string\n errors: string[]\n mcpErrors?: string[]\n}\n\n/** The market overview response. */\nexport interface OverviewPayload {\n sources: SourceOverview[]\n suites: SuiteOverviewCard[]\n totals: { all: number; installed: number; enabled: number }\n roots: { user: string; data: string }\n /** Unmanaged `.sources/` checkouts (manual clones) available for adoption. */\n unmanaged?: UnmanagedSource[]\n}\n\n/** Host-side progress of the source mutation currently in flight. */\nexport interface SourceProgress {\n active: boolean\n sourceId: string\n step: string\n}\n\n/** One skill's metadata inside a suite detail response. */\nexport interface SuiteSkillMeta {\n name: string\n description: string\n whenToUse?: string\n path: string\n}\n\n/** One command or agent preview in a suite detail response. */\nexport interface MarkdownPreview {\n name: string\n description?: string\n content: string\n}\n\n/** Claude Code command preview alias retained for feature-specific readability. */\nexport type CommandPreview = MarkdownPreview\n/** Claude Code agent preview alias retained for feature-specific readability. */\nexport type AgentPreview = MarkdownPreview\n\n/** One LSP definition preview in a suite detail response. */\nexport interface LspPreview {\n name: string\n content: string\n}\n\n/** One inline-declared LSP server in a suite detail response. */\nexport interface LspServerPreview {\n /** Server key from the declaring `lspServers` table. */\n key: string\n command: string\n args: string[]\n /** Lowercase leading-dot extension → LSP language id. */\n extensions: Record<string, string>\n env?: Record<string, string>\n}\n\n/** The suite's LSP surface: inline-declared servers plus directory definition files. */\nexport interface LspSurfaceDetail {\n servers: LspServerPreview[]\n raw: LspPreview[]\n}\n\n/** One flattened hook entry in a suite detail response. */\nexport interface HookPreview {\n event: string\n matcher?: string\n command: string\n}\n\n/** One validated MCP server detail in a suite detail response. */\nexport interface McpServerDetail {\n key: string\n type: string\n command?: string\n url?: string\n args?: string[]\n env?: Record<string, string>\n cwd?: string\n headers?: Record<string, string>\n /** External credential references used by env/header/argument placeholders. */\n credentialRefs: string[]\n}\n\n/** Full suite detail response served by the detail modal. */\nexport interface SuiteDetail {\n sourceId: string\n suiteId: string\n name: string\n version: string | null\n description: string | null\n author: string | null\n keywords: string[]\n layout: string\n dimension: string\n root: string\n remoteUrl: string | null\n installed: boolean\n enabled: boolean\n surfaceToggles: SuiteSurfaceToggles | null\n /** Persisted per-server MCP overrides (suite's mcp.json stays source-owned). */\n mcpOverrides?: McpSuiteOverridesWire\n skills: SuiteSkillMeta[]\n mcpServers: McpServerDetail[]\n hooks: { count: number; entries: HookPreview[] }\n commands: MarkdownPreview[]\n agents: MarkdownPreview[]\n lsp: LspSurfaceDetail\n errors: string[]\n mcpErrors: string[]\n}\n\n/** One skill's full file text served by the skill route. */\nexport interface SkillContent {\n name: string\n description: string\n content: string\n path: string\n}\n\n/** Build a suite-detail URL without duplicating route or query encoding logic. */\nexport function suiteRoute(sourceId: string, suiteId: string): string {\n return `${MARKET_ROUTES.suite}?sourceId=${encodeURIComponent(sourceId)}&suiteId=${encodeURIComponent(suiteId)}`\n}\n\n/** Build a skill-content URL without duplicating route or query encoding logic. */\nexport function skillRoute(sourceId: string, suiteId: string, skill: string): string {\n return `${MARKET_ROUTES.skill}?sourceId=${encodeURIComponent(sourceId)}&suiteId=${encodeURIComponent(suiteId)}&skill=${encodeURIComponent(skill)}`\n}\n","/** Typed fetch helpers over the host's `/api/agent-plugins/*` routes. */\nimport { MARKET_API_PREFIX, MARKET_ROUTES, skillRoute, suiteRoute } from '../contracts/market.js'\nimport type { OverviewPayload, SkillContent, SourceProgress, SuiteDetail, SuiteOverviewCard } from '../contracts/market.js'\nimport type { McpStatusPayload } from '../contracts/mcp-status.js'\nimport type { LspStatusPayload } from '../contracts/lsp-status.js'\nimport type { LspServerSpec } from '../model/types.js'\n\nexport type {\n AgentPreview,\n HookPreview,\n LspPreview,\n MarkdownPreview,\n McpServerDetail,\n OverviewPayload,\n SkillContent,\n SourceOverview,\n SourceProgress,\n SuiteDetail,\n SuiteOverviewCard,\n SuiteSkillMeta,\n SuiteSurfaceCounts\n} from '../contracts/market.js'\nexport type { McpStatusEntry, McpStatusPayload, McpStatusTool } from '../contracts/mcp-status.js'\nexport type { LspStatusEntry, LspStatusPayload, LspStatusState } from '../contracts/lsp-status.js'\nexport type { LspServerSpec } from '../model/types.js'\n\n/** Client-facing alias retained during migration from the original transport types. */\nexport type OverviewData = OverviewPayload\n/** Client-facing alias retained during migration from the original transport types. */\nexport type SuiteCardData = SuiteOverviewCard\n\nexport async function fetchOverview(): Promise<OverviewData> {\n const response = await fetch(MARKET_ROUTES.overview, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`overview failed: ${response.status}`)\n return response.json() as Promise<OverviewData>\n}\n\nexport async function fetchSourceProgress(): Promise<SourceProgress> {\n const response = await fetch(MARKET_ROUTES.progress, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`progress failed: ${response.status}`)\n return response.json() as Promise<SourceProgress>\n}\n\nexport async function fetchSuiteDetail(sourceId: string, suiteId: string): Promise<SuiteDetail> {\n const response = await fetch(suiteRoute(sourceId, suiteId), { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`suite detail failed: ${response.status}`)\n return response.json() as Promise<SuiteDetail>\n}\n\nexport async function fetchMcpStatus(): Promise<McpStatusPayload> {\n const response = await fetch(MARKET_ROUTES.mcpStatus, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`MCP status failed: ${response.status}`)\n return response.json() as Promise<McpStatusPayload>\n}\n\nexport async function fetchLspStatus(): Promise<LspStatusPayload> {\n const response = await fetch(MARKET_ROUTES.lspStatus, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`LSP status failed: ${response.status}`)\n return response.json() as Promise<LspStatusPayload>\n}\n\n/** The user's direct LSP server table (normalized specs). */\nexport async function fetchLspServers(): Promise<Record<string, LspServerSpec>> {\n const response = await fetch(MARKET_ROUTES.lspServers, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`LSP servers failed: ${response.status}`)\n const body = (await response.json()) as { lspServers?: Record<string, LspServerSpec> }\n return body.lspServers ?? {}\n}\n\n/** Validate and persist the user's direct LSP server table. */\nexport async function saveLspServers(lspServers: unknown): Promise<Record<string, LspServerSpec>> {\n const response = await fetch(MARKET_ROUTES.lspServers, {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ lspServers })\n })\n const body = (await response.json()) as { ok?: boolean; error?: string; lspServers?: Record<string, LspServerSpec> }\n if (!response.ok || body.ok === false) throw new Error(body.error ?? `LSP servers save failed: ${response.status}`)\n return body.lspServers ?? {}\n}\n\nexport async function fetchSkillContent(sourceId: string, suiteId: string, skill: string): Promise<SkillContent> {\n const response = await fetch(skillRoute(sourceId, suiteId, skill), { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`skill content failed: ${response.status}`)\n return response.json() as Promise<SkillContent>\n}\n\n/** Re-run the host MCP reconcile: retries failed mounts, clears residual tools. */\nexport async function retryMcpMounts(): Promise<void> {\n await postAction('mcp-retry', {})\n}\n\n/** Drop one server's OAuth grant so its next mount re-runs browser authorization. */\nexport async function reauthorizeMcpServer(serverName: string): Promise<void> {\n await postAction('mcp-reauthorize', { serverName })\n}\n\n/** The MCP backend card state: active client, host availability, download region. */\nexport interface McpBackendInfo {\n backend: 'builtin' | 'host'\n hostClient: { available: boolean; version?: string }\n downloadRegion: { setting: 'auto' | 'global' | 'china'; effective: 'global' | 'china' }\n}\n\nexport async function fetchMcpBackend(): Promise<McpBackendInfo> {\n const response = await fetch(MARKET_ROUTES.mcpBackend, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`mcp backend failed: ${response.status}`)\n return response.json() as Promise<McpBackendInfo>\n}\n\nexport async function postAction(path: string, body: Record<string, unknown>): Promise<Record<string, unknown>> {\n const response = await fetch(`${MARKET_API_PREFIX}${path}`, {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(body)\n })\n const payload = (await response.json()) as { ok: boolean; error?: string }\n if (!response.ok || payload.ok !== true) {\n throw new Error(payload.error ?? `request failed: ${response.status}`)\n }\n return payload\n}\n","/** zh/en dictionaries for the Agent Plugins Market section. */\n\nexport type Dictionary = Record<string, string>\n\n/** Chinese is the source-of-truth key set; English is checked against it below. */\nexport const zh = {\n nav: 'Agent Plugins 市场',\n subtitle: '发现与安装 Agent Plugins(agent-plugins.org 便携包)',\n searchPh: '搜索 Agent Plugins…',\n tabAll: '全部',\n tabInstalled: '已安装',\n tabUninstalled: '未安装',\n market: '仓库源',\n addSource: '添加源',\n sourceIdPh: '源 id(小写字母数字)',\n sourceUrlPh: 'git 仓库地址',\n sourceUrlLocalPh: '本地仓库路径(绝对路径或 ~/…)',\n sourceUrlArchivePh: '压缩包地址(.zip / .tar.gz)',\n sourceModeGit: '远程 git',\n sourceModeArchive: '压缩包',\n sourceModeLocal: '本地目录',\n branchPh: '分支(可选)',\n sourceLocal: '本地',\n sourceArchive: '压缩包',\n sourceAdopted: '已收编',\n sha256Ph: 'SHA-256(可选,64 位十六进制)',\n unmanagedTitle: '检测到未登记的本地仓库:',\n unmanagedAdopt: '收编为源(只登记,不克隆不删除)',\n unmanagedNoRemote: '非 git 目录:将以本地目录形式登记',\n editSource: '编辑当前源',\n editSourceTitle: '编辑仓库源',\n addSourceTitle: '新增仓库源',\n save: '保存',\n confirmDelete: '确认删除',\n refreshAll: '刷新全部',\n detailTitle: 'Agent Plugins 详情',\n overviewSection: '概览',\n skillsSection: '技能',\n mcpSection: 'MCP 服务',\n commandsSection: '命令',\n agentsSection: '子代理',\n hooksLabel: 'Hooks',\n sourceLabel: '来源',\n dimensionLabel: '维度',\n layoutLabel: '布局',\n statusLabel: '状态',\n authorLabel: '作者',\n keywordsLabel: '关键词',\n disabledLabel: '已停用',\n notInstalledLabel: '未安装',\n surfaceTogglesSection: '运行时注入开关',\n surfaceTogglesHint: '按能力面控制注入:关闭后立即卸载对应注入(技能 / MCP / Hooks / 命令 / 子代理 / LSP)',\n mcpOverrideEdit: '编辑覆盖',\n mcpOverrideSave: '保存覆盖',\n mcpOverrideReset: '重置为源配置',\n mcpOverrideEnabled: '挂载此服务',\n mcpOverrideUrlLabel: 'URL 覆盖',\n mcpOverrideHeadersLabel: 'Headers 覆盖(每行 KEY=VALUE)',\n mcpOverrideEnvLabel: 'Env 覆盖(每行 KEY=VALUE)',\n mcpOverrideArgsLabel: 'Args 覆盖(每行一个参数)',\n mcpOverrideKvHint: '值可写 ${ENV_NAME} 引用进程环境变量,密钥不必明文保存。',\n mcpOverriddenBadge: '已覆盖',\n mcpOverrideDisabledBadge: '已停用',\n noSkills: '(无技能)',\n noMcp: '(无 MCP 服务)',\n loading: '加载中…',\n lspSection: 'LSP 服务',\n editorHint: '仓库源提供 Agent Plugins。本地目录直接读取(实时反映工作树);git 源克隆到 ~/.dsh/agent-plugins/.sources/<id>。',\n idHint: '小写字母/数字/连字符,全局唯一',\n urlGitHint: 'git 仓库地址,例如 https://github.com/org/repo.git',\n urlArchiveHint: 'HTTPS 压缩包地址,例如 https://example.com/plugin.zip;下载后解压为源目录',\n urlLocalHint: '绝对路径或 ~/…,直接读取本地目录(不克隆、移除源时不会删除)',\n branchHint: '可选;不填则跟踪默认分支',\n sha256Hint: '可选;填写后校验下载内容的 SHA-256,不匹配即拒绝安装',\n idFixed: 'id 不可修改(源标识全局唯一)',\n progressStarting: '正在提交…',\n progressCloning: '正在克隆仓库(git clone),可能需要几十秒…',\n progressDownloading: '正在下载并解压压缩包,可能需要几十秒…',\n progressReading: '正在读取插件清单…',\n idAutoLabel: '源 ID(自动生成)',\n idAutoHint: '自动从插件清单名或仓库名解析,无需填写',\n detailHint: '点击技能或 MCP 服务行可展开查看详情',\n add: '添加',\n remove: '移除',\n refresh: '刷新',\n install: '安装',\n installing: '安装中…',\n installedBadge: '已安装',\n uninstall: '卸载',\n uninstallConfirmTitle: '卸载 Agent Plugins',\n uninstallConfirmDesc: '将从已安装列表移除该 Agent Plugins,其技能与 MCP 工具随即停止注入。仓库源克隆保留。',\n installConfirmTitle: '确认安装',\n installConfirmDesc: '安装后以下能力将注入当前会话。请确认来源可信,详情可查看插件卡片。',\n installConfirmAction: '确认安装',\n installConfirmNoSurfaces: '该套件未声明任何运行时能力。',\n installConfirmExecutable: '风险提示:安装后将启动该套件的 MCP 子进程并挂载 hooks(第三方代码)。请确认来源可信后再安装。',\n installConfirmSource: '来源',\n installConfirmLocalTree: '本地目录(工作树,未锁定提交)',\n removeSourceConfirmTitle: '移除仓库源「{sourceId}」',\n removeSourceConfirmDesc: '将删除该源的本地克隆与全部安装记录。',\n enable: '启用',\n disable: '禁用',\n cancel: '取消',\n confirm: '确认',\n empty: '没有匹配的 Agent Plugins',\n installedEmpty: '还没有安装 Agent Plugins',\n loadFail: 'Agent Plugins 目录加载失败,请稍后重试',\n actionFail: '操作失败',\n version: '版本',\n dimensionUser: '用户级',\n dimensionProject: '项目级',\n layoutV1: '便携 v1',\n layoutCC: 'Claude Code',\n layoutCodex: 'Codex',\n layoutSkills: '技能集合',\n layoutUniversal: '通用',\n layoutCursor: 'Cursor',\n layoutKimi: 'Kimi',\n layoutRemote: '远程引用',\n layoutProjectNative: '项目原生',\n remoteRef: '远程',\n surfaceSkills: '技能',\n surfaceMcp: 'MCP',\n surfaceHooks: 'Hooks',\n surfaceCommands: '命令',\n surfaceAgents: '子代理',\n surfaceLsp: 'LSP',\n sourceNotCloned: '未克隆',\n sourceCloned: '已克隆',\n errors: '校验问题',\n scanNotes: '扫描提示',\n sourceErrorSeparator: ';',\n viewMode: '视图模式',\n grid: '网格',\n list: '列表',\n openSettings: '在设置中打开',\n rootLabel: 'Agent Plugins 目录',\n dataLabel: 'Agent Plugins 数据目录',\n countAll: '共 {n} 个 Agent Plugins',\n countInstalled: '已装 {n}',\n countEnabled: '启用 {n}',\n mcpStatusNav: 'MCP 服务',\n lspStatusNav: 'LSP 服务',\n lspSearch: '搜索 LSP 服务',\n lspAllMounted: '全部已挂载',\n lspDirect: '直接安装',\n mcpStatusTitle: 'MCP 服务',\n mcpStatusSubtitle: '连接状态、来源和工具清单',\n mcpSearch: '搜索 MCP 名称、来源或地址…',\n mcpAll: '全部',\n mcpPlugin: 'Plugin',\n mcpDirect: '直接安装',\n mcpService: '服务',\n mcpSource: '来源',\n mcpTransport: '传输',\n mcpTools: '工具',\n mcpTool: '工具',\n mcpAllConnected: '全部已连接',\n mcpReasonLabel: '原因',\n mcpRetryNote: '已自动重试多次仍失败。点击「重试」立即重连,或在插件市场中检查该服务的配置。',\n mcpRetrying: '正在重连…',\n mcpRetrySuccess: '重连成功,服务已恢复',\n mcpRetryFailure: '重连失败,请检查原因说明',\n mcpReauthorize: '重新授权',\n mcpConnect: '连接',\n mcpReauthorizing: '等待浏览器授权…',\n marketCardDesc: 'Agent Plugins 市场套件的安装、启用与运行时行为配置。',\n mcpCardTitle: 'MCP 增强模式',\n mcpCardDescOn: '已开启:支持 OAuth 授权、SSE、授权保持等功能。',\n mcpCardDescOff: '已关闭:使用宿主 dsh-mcp-client。',\n mcpCardReadonly: '当前环境设置文档只读,无法切换。',\n mcpForeign: '已由其他客户端挂载',\n mcpForeignHint: '该服务器已通过其他途径(原生配置或另一插件)挂载了同名 MCP,市场已跳过以避免重复挂载。如需由市场接管,请先停用另一来源的该服务器;若确认是残留挂载,重启宿主即可清除。',\n regionLabel: '下载区域',\n regionHint: '中国大陆走镜像线路,仅影响下载线路。',\n regionGlobal: '全球',\n regionChina: '中国大陆',\n mcpBackendHostMissing: '宿主 dsh-mcp-client 在当前环境不可用,无法切换到兼容模式。',\n mcpReauthHint: '删除已保存的授权令牌并重新走浏览器授权——用于权限范围选少了的场景。点击后请在弹出的页面完成登录。',\n mcpConnectHint: '删除旧的授权记录并重新发起浏览器登录。点击后请在弹出的页面完成授权,服务会自动连接。',\n mcpReauthSuccess: '已清除旧授权,请在弹出的浏览器页面重新登录',\n mcpReauthFailure: '重新授权失败,请稍后重试',\n mcpZeroTools: '该服务已连接,但未声明任何工具。',\n mcpConnected: '已连接',\n mcpDegraded: '降级',\n mcpFailed: '失败',\n mcpNeedsCredentials: '需要凭据',\n mcpOrphaned: '插件已卸载,工具残留',\n mcpConfigureCredentials: '配置凭据',\n mcpViewDetails: '查看详情',\n mcpCredentialTitle: '凭据配置',\n mcpCredentialConfigured: '已配置',\n mcpCredentialMissing: '未配置',\n mcpCredentialReadOnly: '由启动环境提供(只读;修改后需重启 DSH)',\n mcpCredentialUnavailable: '当前 profile 未提供凭据服务,请在启动 DSH 前设置环境变量。',\n mcpCredentialPlaceholder: '输入凭据(不会回显)',\n mcpCredentialSave: '保存凭据',\n mcpCredentialUnset: '删除凭据',\n mcpDisabled: '未启用',\n mcpObservedEndpoint: '当前工具表观测',\n mcpServiceDetail: '服务详情',\n mcpConfig: '连接配置',\n mcpSelectHint: '选择一个 MCP 服务查看配置与工具',\n mcpEmpty: '没有匹配的 MCP 服务',\n mcpNoTools: '当前没有已注册工具',\n mcpDirectConfigUnavailable: '宿主未提供直接安装 MCP 的配置记录',\n mcpDirectBoundary: '直接安装 MCP 仅显示当前工具表中可观测的服务;宿主未提供配置与连接状态 API。',\n mcpBackToMarket: '返回市场',\n mcpRetry: '重试',\n mcpFilterAllHint: '全部:插件套件声明的 MCP 服务与宿主直接安装的 MCP',\n mcpFilterPluginHint: 'Plugin:来自插件市场套件的 mcp.json 声明',\n mcpFilterDirectHint: '直接安装:宿主工具表中观测到、非套件来源的 MCP',\n lspStatusTitle: 'LSP 服务',\n lspStatusSubtitle: '语言服务器声明与挂载状态',\n lspAll: '全部',\n lspMounted: '已挂载',\n lspStarting: '启动中…',\n lspBlocked: '被阻塞',\n lspFailed: '失败',\n lspDisabled: '未启用',\n lspHostMissingShort: '宿主缺失',\n lspConflict: '扩展冲突',\n lspHostMissing: '当前 DSH 运行时未携带 LSP 组件(@deepseek-ai/dsh-lsp、dsh-lsp-stdio、dsh-tool-lsp),声明不会被挂载;升级宿主并在 profile 中挂载这三层后重新启用套件即可。',\n lspEmpty: '没有已声明的 LSP 服务器',\n lspReasonLabel: '原因',\n lspFilterAllHint: '全部:套件声明与用户自配的全部语言服务器',\n lspFilterPluginHint: 'Plugin:来自插件市场套件的内联 lspServers 声明',\n lspFilterDirectHint: '直接安装:用户自行配置的语言服务器(本面板配置)',\n lspFilterBlockedHint: '被阻塞:缺宿主组件、挂载失败或扩展冲突,点击卡片查看原因',\n lspFilterDisabledHint: '未启用:套件的 LSP 能力面开关已关闭',\n lspPlugin: 'Plugin',\n lspConfigure: '配置 LSP',\n lspConfigureHint: '编辑用户自配的语言服务器表(Claude Code lspServers 格式),保存后自动挂载',\n lspSave: '保存',\n lspDetailSubtitle: '语言服务器详情',\n lspDetailCommand: '启动命令',\n lspDetailExtensions: '扩展映射',\n mdCodeCopy: '复制',\n mdCodeCopied: '已复制',\n mdFootnotes: '脚注',\n}\n\nexport type LocaleKey = keyof typeof zh\n\nexport const en: Record<LocaleKey, string> = {\n nav: 'Agent Plugins Market',\n subtitle: 'Discover and install Agent Plugins suites (agent-plugins.org portable packages)',\n searchPh: 'Search suites…',\n tabAll: 'All',\n tabInstalled: 'Installed',\n tabUninstalled: 'Uninstalled',\n market: 'Sources',\n addSource: 'Add source',\n sourceIdPh: 'source id (lowercase alnum)',\n sourceUrlPh: 'git repository URL',\n sourceUrlLocalPh: 'local repository path (absolute or ~/…)',\n sourceUrlArchivePh: 'archive URL (.zip / .tar.gz)',\n sourceModeGit: 'remote git',\n sourceModeArchive: 'archive',\n sourceModeLocal: 'local dir',\n branchPh: 'branch (optional)',\n sourceLocal: 'local',\n sourceArchive: 'archive',\n sourceAdopted: 'adopted',\n sha256Ph: 'SHA-256 (optional, 64 hex chars)',\n unmanagedTitle: 'Unregistered local checkouts found:',\n unmanagedAdopt: 'Adopt as a source (register only — no clone, no deletion)',\n unmanagedNoRemote: 'Not a git checkout: registered as a local directory source',\n editSource: 'Edit source',\n editSourceTitle: 'Edit source',\n addSourceTitle: 'Add source',\n save: 'Save',\n confirmDelete: 'Delete',\n refreshAll: 'Refresh all',\n detailTitle: 'Suite details',\n overviewSection: 'Overview',\n skillsSection: 'Skills',\n mcpSection: 'MCP servers',\n commandsSection: 'Commands',\n agentsSection: 'Subagents',\n hooksLabel: 'Hooks',\n sourceLabel: 'Source',\n dimensionLabel: 'Dimension',\n layoutLabel: 'Layout',\n statusLabel: 'Status',\n authorLabel: 'Author',\n keywordsLabel: 'Keywords',\n disabledLabel: 'disabled',\n notInstalledLabel: 'not installed',\n surfaceTogglesSection: 'Runtime injection toggles',\n surfaceTogglesHint: 'Control injection per surface: turning one off unmounts that surface immediately (skills / MCP / hooks / commands / subagents / LSP)',\n mcpOverrideEdit: 'Edit override',\n mcpOverrideSave: 'Save override',\n mcpOverrideReset: 'Reset to source config',\n mcpOverrideEnabled: 'Mount this server',\n mcpOverrideUrlLabel: 'URL override',\n mcpOverrideHeadersLabel: 'Headers override (one KEY=VALUE per line)',\n mcpOverrideEnvLabel: 'Env override (one KEY=VALUE per line)',\n mcpOverrideArgsLabel: 'Args override (one argument per line)',\n mcpOverrideKvHint: 'Values may reference process env vars as ${ENV_NAME} so secrets never persist here.',\n mcpOverriddenBadge: 'overridden',\n mcpOverrideDisabledBadge: 'disabled',\n noSkills: '(no skills)',\n noMcp: '(no MCP servers)',\n loading: 'Loading…',\n lspSection: 'LSP servers',\n editorHint: 'A source provides suites (Agent Plugins). Local directories are read in place (live working tree); git sources clone into ~/.dsh/agent-plugins/.sources/<id>.',\n idHint: 'lowercase letters / digits / hyphens, globally unique',\n urlGitHint: 'git repository URL, e.g. https://github.com/org/repo.git',\n urlArchiveHint: 'HTTPS archive URL, e.g. https://example.com/plugin.zip — downloaded and extracted as the source directory',\n urlLocalHint: 'absolute path or ~/…, read in place (never cloned, never deleted on removal)',\n branchHint: 'optional; defaults to the repository default branch',\n sha256Hint: 'optional; when set, the download SHA-256 is verified and mismatches reject the install',\n idFixed: 'id is fixed (the source identifier is globally unique)',\n progressStarting: 'Submitting…',\n progressCloning: 'Cloning the repository (git clone) — this can take tens of seconds…',\n progressDownloading: 'Downloading and extracting the archive — this can take tens of seconds…',\n progressReading: 'Reading plugin manifests…',\n idAutoLabel: 'Source ID (auto)',\n idAutoHint: 'Derived from the suite or repo name — no need to type it',\n detailHint: 'Click a skill or MCP server row to expand its details',\n add: 'Add',\n remove: 'Remove',\n refresh: 'Refresh',\n install: 'Install',\n installing: 'Installing…',\n installedBadge: 'Installed',\n uninstall: 'Uninstall',\n uninstallConfirmTitle: 'Uninstall suite',\n uninstallConfirmDesc: 'Removes the suite from the installed list; its skills and MCP tools stop injecting. The source clone stays.',\n installConfirmTitle: 'Confirm install',\n installConfirmDesc: 'After install, the surfaces below inject into your sessions. Confirm you trust the source; see the suite card for details.',\n installConfirmAction: 'Install',\n installConfirmNoSurfaces: 'This suite declares no runtime surfaces.',\n installConfirmExecutable: 'Risk notice: installing starts this suite\\'s MCP child processes and mounts hooks (third-party code). Install only if you trust the source.',\n installConfirmSource: 'Source',\n installConfirmLocalTree: 'Local directory (working tree, no locked commit)',\n removeSourceConfirmTitle: 'Remove source “{sourceId}”',\n removeSourceConfirmDesc: 'Deletes the local clone and all install records of this source.',\n enable: 'Enable',\n disable: 'Disable',\n cancel: 'Cancel',\n confirm: 'Confirm',\n empty: 'No matching suites',\n installedEmpty: 'No suites installed yet',\n loadFail: 'Failed to load the suite catalog, try again later',\n actionFail: 'Action failed',\n version: 'Version',\n dimensionUser: 'user',\n dimensionProject: 'project',\n layoutV1: 'portable v1',\n layoutCC: 'Claude Code',\n layoutCodex: 'Codex',\n layoutSkills: 'skill dir',\n layoutUniversal: 'universal',\n layoutCursor: 'Cursor',\n layoutKimi: 'Kimi',\n layoutRemote: 'remote reference',\n layoutProjectNative: 'project native',\n remoteRef: 'remote',\n surfaceSkills: 'skills',\n surfaceMcp: 'MCP',\n surfaceHooks: 'hooks',\n surfaceCommands: 'commands',\n surfaceAgents: 'subagents',\n surfaceLsp: 'LSP',\n sourceNotCloned: 'not cloned',\n sourceCloned: 'cloned',\n errors: 'validation issues',\n scanNotes: 'scan notes',\n sourceErrorSeparator: '; ',\n viewMode: 'View mode',\n grid: 'grid',\n list: 'list',\n openSettings: 'Open in settings',\n rootLabel: 'Suite root',\n dataLabel: 'Suite data root',\n countAll: '{n} suites',\n countInstalled: '{n} installed',\n countEnabled: '{n} enabled',\n mcpStatusNav: 'MCP services',\n lspStatusNav: 'LSP servers',\n lspSearch: 'Search LSP servers',\n lspAllMounted: 'All mounted',\n lspDirect: 'Direct',\n mcpStatusTitle: 'MCP services',\n mcpStatusSubtitle: 'Connection state, sources, and tools',\n mcpSearch: 'Search MCP names, sources, or endpoints…',\n mcpAll: 'All',\n mcpPlugin: 'Plugin',\n mcpDirect: 'Direct',\n mcpService: 'Service',\n mcpSource: 'Source',\n mcpTransport: 'Transport',\n mcpTools: 'tools',\n mcpTool: 'tool',\n mcpAllConnected: 'All connected',\n mcpReasonLabel: 'Reason',\n mcpRetryNote: 'Automatic retries were exhausted. Use Retry to reconnect now, or check the server configuration in the market.',\n mcpRetrying: 'Reconnecting…',\n mcpRetrySuccess: 'Reconnected — the service is live again',\n mcpRetryFailure: 'Reconnect failed — see the reason above',\n mcpReauthorize: 'Re-authorize',\n mcpConnect: 'Connect',\n mcpReauthorizing: 'Waiting for browser authorization…',\n marketCardDesc: 'Install, enable, and runtime settings for Agent Plugins Market suites.',\n mcpCardTitle: 'MCP enhancement',\n mcpCardDescOn: 'On: enables OAuth authorization, SSE, authorization hold, and more.',\n mcpCardDescOff: 'Off: uses the host dsh-mcp-client.',\n mcpCardReadonly: 'The settings document is read-only in this environment; the switch is unavailable.',\n mcpForeign: 'Mounted elsewhere',\n mcpForeignHint: 'This server is already mounted through another path (native config or another plugin); the market skipped it to avoid a duplicate. To let the market take over, disable the other source first. If it is a leftover mount, a Host restart clears it.',\n regionLabel: 'Download region',\n regionHint: 'China mainland routes through a mirror. Affects the download route only.',\n regionGlobal: 'Global',\n regionChina: 'China mainland',\n mcpBackendHostMissing: 'The host dsh-mcp-client is not available here; compat mode cannot be enabled.',\n mcpReauthHint: 'Drops the saved OAuth token and re-runs the browser authorization — for when you picked too narrow a scope. Finish the sign-in in the page that opens.',\n mcpConnectHint: 'Drops the stale grant and starts a fresh browser sign-in. Approve in the page that opens and the service connects automatically.',\n mcpReauthSuccess: 'Old grant dropped — finish the sign-in in the browser page that opened',\n mcpReauthFailure: 'Re-authorization failed — try again shortly',\n mcpZeroTools: 'Connected, but this service advertises no tools.',\n mcpConnected: 'connected',\n mcpDegraded: 'degraded',\n mcpFailed: 'failed',\n mcpNeedsCredentials: 'credentials required',\n mcpOrphaned: 'plugin removed; tools remain',\n mcpConfigureCredentials: 'Configure credentials',\n mcpViewDetails: 'View details',\n mcpCredentialTitle: 'Credential configuration',\n mcpCredentialConfigured: 'configured',\n mcpCredentialMissing: 'not configured',\n mcpCredentialReadOnly: 'provided by the launch environment (read-only; restart DSH after changes)',\n mcpCredentialUnavailable: 'This profile has no credentials service. Set the environment variable before launching DSH.',\n mcpCredentialPlaceholder: 'Enter credential (not echoed)',\n mcpCredentialSave: 'Save credential',\n mcpCredentialUnset: 'Remove credential',\n mcpDisabled: 'disabled',\n mcpObservedEndpoint: 'observed from tool registry',\n mcpServiceDetail: 'Service detail',\n mcpConfig: 'Connection config',\n mcpSelectHint: 'Select an MCP service to inspect config and tools',\n mcpEmpty: 'No matching MCP services',\n mcpNoTools: 'No registered tools',\n mcpDirectConfigUnavailable: 'The host does not expose direct-MCP configuration',\n mcpDirectBoundary: 'Direct MCP entries only show services observed in the current tool registry; the host exposes no config or connection-status API.',\n mcpBackToMarket: 'Back to market',\n mcpRetry: 'Retry',\n mcpFilterAllHint: 'All: MCP services declared by plugin suites plus host-installed MCP',\n mcpFilterPluginHint: 'Plugin: mcp.json declarations from market suites',\n mcpFilterDirectHint: 'Direct: MCP observed in the host tool registry outside any suite',\n lspStatusTitle: 'LSP servers',\n lspStatusSubtitle: 'Declared language servers and their mount state',\n lspAll: 'All',\n lspMounted: 'Mounted',\n lspStarting: 'Starting…',\n lspBlocked: 'Blocked',\n lspFailed: 'Failed',\n lspDisabled: 'Disabled',\n lspHostMissingShort: 'Host missing',\n lspConflict: 'Extension conflict',\n lspHostMissing: 'This DSH runtime does not carry the LSP packages (@deepseek-ai/dsh-lsp, dsh-lsp-stdio, dsh-tool-lsp), so declarations are not mounted; upgrade the host, mount the three layers in the profile, and re-enable the suite.',\n lspEmpty: 'No declared LSP servers',\n lspReasonLabel: 'Reason',\n lspFilterAllHint: 'All: suite-declared and user-configured language servers',\n lspFilterPluginHint: 'Plugin: inline lspServers declarations from market suites',\n lspFilterDirectHint: 'Direct: user-configured language servers (configured in this panel)',\n lspFilterBlockedHint: 'Blocked: missing host packages, failed mounts, or extension conflicts — open a card for the reason',\n lspFilterDisabledHint: 'Disabled: the suite LSP surface toggle is off',\n lspPlugin: 'Plugin',\n lspConfigure: 'Configure LSP',\n lspConfigureHint: 'Edit the user-configured language-server table (Claude Code lspServers format); servers mount automatically after save',\n lspSave: 'Save',\n lspDetailSubtitle: 'Language server detail',\n lspDetailCommand: 'Launch command',\n lspDetailExtensions: 'Extension map',\n mdCodeCopy: 'Copy',\n mdCodeCopied: 'Copied',\n mdFootnotes: 'Footnotes',\n}\n","/** Market overview cache, invalidation, and source-progress resource helpers. */\nimport { fetchOverview, fetchSourceProgress, type OverviewData, type SourceProgress } from '../../api.js'\n\n/** UI state emitted while a source mutation is in flight. */\nexport interface SourceProgressState {\n step: string | undefined\n error: string | undefined\n}\n\nconst EMPTY_OVERVIEW: OverviewData = { sources: [], suites: [], totals: { all: 0, installed: 0, enabled: 0 }, roots: { user: '', data: '' }, unmanaged: [] }\n\nlet cachedOverview: OverviewData | undefined\nlet inflightOverview: Promise<OverviewData> | undefined\n\n/** Load the last overview immediately and revalidate one shared request. */\nexport function loadOverview(): { initial: OverviewData; revalidating: boolean; promise: Promise<OverviewData> } {\n const initial = cachedOverview ?? EMPTY_OVERVIEW\n if (inflightOverview === undefined) {\n inflightOverview = fetchOverview()\n .then(data => {\n cachedOverview = data\n return data\n })\n .finally(() => {\n inflightOverview = undefined\n })\n }\n return { initial, revalidating: cachedOverview === undefined, promise: inflightOverview }\n}\n\n/** Invalidate the shared overview after a mutating action. */\nexport function invalidateOverview(): void {\n cachedOverview = undefined\n}\n\n/**\n * Poll source mutation progress until stopped. Poll failures remain silent\n * because the add-source request is authoritative for mutation success.\n */\nexport function startSourceProgressPolling(\n report: (state: SourceProgressState) => void,\n resolveStep: (step: SourceProgress['step']) => string = step => step\n): { stop: () => void } {\n let stopped = false\n let timer: ReturnType<typeof setTimeout> | undefined\n const tick = async (): Promise<void> => {\n if (stopped) return\n try {\n const progress = await fetchSourceProgress()\n if (!stopped && progress.active) report({ step: resolveStep(progress.step), error: undefined })\n } catch {\n // Transient poll failures are ignored; the add request reports real errors.\n }\n if (!stopped)\n timer = setTimeout(() => {\n void tick()\n }, 800)\n }\n timer = setTimeout(() => {\n void tick()\n }, 400)\n return {\n stop: () => {\n stopped = true\n if (timer !== undefined) clearTimeout(timer)\n }\n }\n}\n","/** Pure market filtering and count derivation. */\nimport type { OverviewData, SuiteCardData } from '../../api.js'\n\n/** Market status filter. */\nexport type MarketFilter = 'all' | 'installed' | 'uninstalled'\n/** Market source scope. */\nexport type MarketCategory = 'all' | string\n\n/** Derived market view data used by the screen and its toolbar. */\nexport interface MarketViewModel {\n scopeTotals: { all: number; installed: number; enabled: number }\n filtered: SuiteCardData[]\n}\n\ninterface SearchableSuite {\n suite: SuiteCardData\n haystack: string\n}\n\nconst searchableCache = new WeakMap<OverviewData, SearchableSuite[]>()\n\n/** Derive visible cards and scope counts in one pass over a normalized payload. */\nexport function deriveMarketViewModel(overview: OverviewData, search: string, filter: MarketFilter, category: MarketCategory): MarketViewModel {\n const searchable = searchableFor(overview)\n const needle = search.trim().toLowerCase()\n let all = 0\n let installed = 0\n let enabled = 0\n const visible: SuiteCardData[] = []\n\n for (const entry of searchable) {\n const suite = entry.suite\n if (category !== 'all' && suite.sourceId !== category) continue\n all++\n if (suite.installed) installed++\n if (suite.enabled) enabled++\n if (filter === 'installed' && !suite.installed) continue\n if (filter === 'uninstalled' && suite.installed) continue\n if (needle !== '' && !entry.haystack.includes(needle)) continue\n visible.push(suite)\n }\n\n return { scopeTotals: { all, installed, enabled }, filtered: visible }\n}\n\nfunction searchableFor(overview: OverviewData): SearchableSuite[] {\n const cached = searchableCache.get(overview)\n if (cached !== undefined) return cached\n const searchable = overview.suites.map(suite => ({\n suite,\n haystack: `${suite.name} ${suite.description ?? ''} ${suite.keywords.join(' ')}`.toLowerCase()\n }))\n searchableCache.set(overview, searchable)\n return searchable\n}\n","/**\n * Agent Plugins Market section styles. Colors ride the dsh --dsw-alias-* tokens with\n * light-mode fallbacks so the page follows the active theme; the section\n * lives inside the settings dialog, so it scrolls within the dialog and\n * never takes over the app frame.\n */\n\n.market {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 24px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n/* Page mode owns the outer padding; settings mode receives it from the host shell.\n Page mode is a fixed inset-0 shell, so it owns the height and its lists scroll\n inside it; settings mode lets the host `.options` container be the only scroller\n (nested scrollers double-scroll and can paint text outside card bounds). */\n.pageMode {\n height: 100%;\n min-height: 0;\n width: 100%;\n min-width: 0;\n}\n\n.marketControls {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-height: 0;\n}\n\n.mcpSurface {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.surfaceSwitch {\n flex: none;\n align-self: center;\n height: 26px;\n padding: 0 10px;\n border: 1px solid var(--dsw-alias-border-l2, #d4dce8);\n border-radius: 7px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: var(--dsw-alias-brand-primary, #4966f5);\n cursor: pointer;\n font-size: 11px;\n}\n\n.surfaceSwitch:hover {\n background: var(--dsw-alias-state-business-tertiary, rgb(228, 237, 253));\n}\n\n/* Legacy page-mode shell: scoped to the injected data attributes. */\n:global(html[data-dsh-agent-plugins-market-page]) :global([data-pane='conversation']),\n:global(html[data-dsh-agent-plugins-market-page]) :global([class*='centerCol']) {\n position: relative;\n}\n\n.pageView {\n position: absolute;\n inset: 0;\n display: none;\n z-index: 60;\n min-width: 0;\n min-height: 0;\n padding: 20px 24px;\n overflow: hidden;\n background: var(--dsw-alias-bg-base, #f7f8fa);\n}\n\n:global(html[data-dsh-agent-plugins-market-page]) .pageView {\n display: flex;\n}\n\n:global(html[data-dsh-agent-plugins-market-page]) :global([data-pane='conversation']) > :not([data-dsh-agent-plugins-market-page-view]),\n:global(html[data-dsh-agent-plugins-market-page]) :global([class*='centerCol']) > :not([data-dsh-agent-plugins-market-page-view]) {\n display: none !important;\n}\n\n.pageEntry {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 32px;\n padding: 6px 12px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1f2328);\n cursor: pointer;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n text-align: left;\n}\n\n.pageEntry:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n}\n\n.pageEntry:active {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, 0.1));\n}\n\n.pageEntry svg {\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary, #6b7280);\n}\n\n.pageEntry span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n:global([data-dsh-frame][data-sidebar-collapsed]) .pageEntry {\n justify-content: center;\n padding-inline: 0;\n}\n\n:global([data-dsh-frame][data-sidebar-collapsed]) .pageEntry span {\n display: none;\n}\n\n.pageEntry:focus-visible,\n.srcTabMain:focus-visible,\n.srcTabEdit:focus-visible,\n.srcTabDel:focus-visible,\n.seg:focus-visible,\n.segOn:focus-visible,\n.detailItemRow:focus-visible,\n.detailItemOpen:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 2px;\n}\n\n.header {\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.titleRow {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n}\n\n.sub {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n margin: 0;\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.spacer {\n flex: 1;\n}\n\n.searchGroup {\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.body {\n display: flex;\n gap: 20px;\n min-height: 0;\n flex: 1;\n align-items: flex-start;\n}\n\n/* --- source tabs (top, primary) -------------------------------------------------- */\n\n.sourceTabsRow {\n display: block;\n padding: 0;\n}\n\n.sourceTabsScroll {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));\n gap: 4px;\n}\n\n/* --- unmanaged checkout adoption row ---------------------------------------------- */\n\n.unmanagedRow {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n margin-top: 6px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #57606a);\n}\n\n.unmanagedLabel {\n flex-shrink: 0;\n}\n\n.unmanagedChip {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n height: 22px;\n padding: 0 4px 0 8px;\n border: 1px dashed var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 999px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n max-width: 220px;\n}\n\n.unmanagedChipName {\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.unmanagedAdopt {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n padding: 0 4px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.unmanagedAdopt:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n\n.srcTabEdit {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #9ca3af);\n padding: 2px 2px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.srcTabEdit:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.srcTabOn .srcTabEdit {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n.srcTabOn .srcTabEdit:hover {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n.srcTab,\n.srcTabOn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 24px;\n border: 1px solid var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 999px;\n overflow: hidden;\n background: var(--dsw-alias-bg-layer-1, #fff);\n}\n\n.srcTabMain {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-primary, #1f2328);\n padding: 2px 2px 2px 10px;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n flex: 1;\n}\n\n.srcTabMain:hover {\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n}\n\n.srcTabOn {\n background: var(--dsw-alias-brand-primary-new-colorprimary-new-color, #4176e6);\n border-color: var(--dsw-alias-brand-primary-new-colorprimary-new-color, #4176e6);\n}\n\n.srcTabOn .srcTabMain {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n font-weight: 600;\n}\n\n.srcTabDel {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #9ca3af);\n padding: 2px 8px 2px 2px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.srcTabDel:hover {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n}\n\n.srcTabOn .srcTabDel {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n.srcTabOn .srcTabDel:hover {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n/* --- card grid ----------------------------------------------------------------- */\n\n/* Lists scroll only in page mode (fixed shell); in settings mode the host\n `.options` container is the single scroller. */\n.grid {\n flex: 1;\n min-height: 0;\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n min-width: 0;\n align-content: start;\n}\n\n.pageMode .grid {\n overflow-y: auto;\n scrollbar-gutter: stable;\n padding-right: 4px;\n}\n\n.list {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n}\n\n.pageMode .list {\n overflow-y: auto;\n scrollbar-gutter: stable;\n padding-right: 4px;\n}\n\n.list .card {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 14px;\n}\n\n.list .cardTop {\n flex: 0 0 auto;\n}\n\n.list .cardDesc {\n flex: 1;\n min-width: 200px;\n min-height: 0;\n max-height: 18px;\n overflow: hidden;\n}\n\n.list .cardActions {\n flex: 0 0 auto;\n}\n\n.list .meta,\n.list .tagRow {\n flex-basis: 100%;\n}\n\n.empty {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n padding: 48px 0;\n text-align: center;\n font-size: 13px;\n grid-column: 1 / -1;\n}\n\n.card {\n background: var(--dsw-alias-bg-layer-1, #fff);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 12px;\n padding: 12px 14px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n cursor: pointer;\n transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;\n}\n\n.card:hover {\n border-color: var(--dsw-alias-border-l3, #d9dde3);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n box-shadow: 0 1px 4px rgba(16, 24, 40, 0.06);\n}\n\n/* Installed cards carry the MCP card's left accent so install state scans\n like connection state does on the MCP page: green = enabled, gray = off. */\n.cardOn {\n border-left: 3px solid var(--dsw-alias-state-success-primary, #16a34a);\n}\n\n.cardMuted {\n border-left: 3px solid var(--dsw-alias-label-tertiary, #98a2b3);\n}\n\n.cardTop {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cardTitle {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n}\n\n.cardName {\n font-size: 13px;\n font-weight: 600;\n line-height: 22px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.version {\n font-size: 12px;\n line-height: 20px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-variant-numeric: tabular-nums;\n flex-shrink: 0;\n}\n\n.cardActions {\n display: flex;\n align-items: center;\n gap: 4px;\n flex-shrink: 0;\n}\n\n/* Flat icon-only action (harness Button ghost geometry: transparent fill,\n interactive-bg hover). Rendered inline so no button-chrome box shows. */\n.iconBtn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: none;\n border-radius: 999px;\n background: none;\n cursor: pointer;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n transition: background 0.15s ease, color 0.15s ease;\n}\n\n.iconBtn svg {\n width: 15px;\n height: 15px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.8;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.iconBtn:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.iconBtn:active:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, 0.1));\n}\n\n.iconBtn:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 1px;\n}\n\n.iconBtn:disabled {\n cursor: default;\n opacity: 0.4;\n}\n\n/* Destructive action only announces itself on hover, like the platform. */\n.iconBtnDanger:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n color: var(--dsw-alias-state-error-primary, rgb(236, 19, 19));\n}\n\n.switchOn,\n.switchOff {\n position: relative;\n width: 38px;\n height: 22px;\n border: none;\n border-radius: 999px;\n cursor: pointer;\n padding: 0;\n flex-shrink: 0;\n transition: background-color 0.15s ease;\n}\n\n/* ON rides the primary button fill (brand → dark in the platform theme),\n the same track color every other plugin toggle and native control uses —\n not state-success green, which reads as off-convention beside them. */\n.switchOn {\n background: var(--dsw-alias-button-primary-fill, var(--dsw-alias-brand-primary, #4f6ef7));\n}\n\n.switchOff {\n background: var(--dsw-alias-label-dimmed, rgb(225, 229, 238));\n}\n\n.switchOn:disabled,\n.switchOff:disabled {\n opacity: 0.6;\n cursor: default;\n}\n\n.switchThumb {\n position: absolute;\n top: 3px;\n left: 3px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n transition: left 0.15s ease;\n pointer-events: none;\n}\n\n.switchOn .switchThumb {\n left: 19px;\n}\n\n.desc {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n /* Two-line cap without legacy -webkit-box clamping: the nested-scroll\n compositor can paint -webkit-box text outside its box, so bound the\n block height instead. */\n max-height: 36px;\n overflow: hidden;\n margin: 0;\n}\n\n.meta {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n\n/* Surface-count tags live on their own line below source · layout so the\n first meta row stays scannable. */\n.tagRow {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n\n.src {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #9ca3af);\n text-decoration: none;\n}\n\n.tag {\n border: 1px solid var(--dsw-alias-border-l3, #d9dde3);\n color: var(--dsw-alias-label-secondary, #6b7280);\n border-radius: 4px;\n flex-shrink: 0;\n padding: 1px 6px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.okState {\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-state-success-primary, #16a34a);\n white-space: nowrap;\n}\n\n.warnLine {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n font-weight: 600;\n font-size: 12px;\n line-height: 18px;\n margin: 0;\n cursor: help;\n}\n\n.modalFooter {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n width: 100%;\n}\n\n.modalFooterLeft {\n margin-right: auto;\n display: flex;\n gap: 8px;\n}\n\n/* --- source editor modal --------------------------------------------------------- */\n\n.editorDialog {\n width: min(500px, 92vw);\n}\n\n/* --- install confirmation modal --------------------------------------------------- */\n\n.installConfirmBody {\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-width: 0;\n}\n\n.installConfirmSuite {\n font-weight: 600;\n color: var(--dsw-alias-label-primary, #111827);\n}\n\n.installConfirmMeta {\n color: var(--dsw-alias-label-secondary, #4b5563);\n font-size: 12px;\n}\n\n.installConfirmCommit {\n color: var(--dsw-alias-label-secondary, #4b5563);\n font-size: 12px;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n\n.installConfirmTags {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.installConfirmWarn {\n color: var(--dsw-alias-state-warn-label, rgb(221, 134, 41));\n font-size: 12px;\n border: 1px solid var(--dsw-alias-state-warn-label, rgb(221, 134, 41));\n border-radius: 8px;\n padding: 8px 10px;\n}\n\n.editorForm {\n display: flex;\n flex-direction: column;\n gap: 14px;\n min-width: 0;\n}\n\n.modeRow {\n display: flex;\n gap: 6px;\n padding: 3px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-2, #f3f4f6);\n align-self: flex-start;\n}\n\n.seg,\n.segOn {\n border: none;\n background: none;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n padding: 5px 14px;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.segOn {\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n}\n\n.fieldGroup {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\n.fieldLabel {\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-label-secondary, #6b7280);\n}\n\n.fieldHint {\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n}\n\n.staticId {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 7px 10px;\n border: 1px dashed var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-2, #f3f4f6);\n}\n\n.staticIdValue {\n font-size: 13px;\n font-weight: 600;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n/* --- suite detail modal ---------------------------------------------------------- */\n\n.detailDialog {\n width: min(800px, 94vw);\n}\n\n.detailBody {\n display: flex;\n flex-direction: column;\n gap: 14px;\n max-height: 78vh;\n overflow-y: auto;\n}\n\n.detailSections {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.detailSection {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detailHead {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--dsw-alias-label-secondary, #6b7280);\n border-bottom: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n padding-bottom: 4px;\n}\n\n.detailGrid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n gap: 6px 14px;\n}\n\n.detailCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.detailKey {\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n}\n\n.detailValue {\n font-size: 13px;\n color: var(--dsw-alias-label-primary, #1f2328);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.detailDesc {\n margin: 4px 0 0;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n}\n\n.mono {\n font-family: ui-monospace, Menlo, Consolas, monospace;\n font-size: 12px;\n line-height: 18px;\n word-break: break-all;\n white-space: pre-wrap;\n margin: 0;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.detailItem {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 8px;\n overflow: hidden;\n}\n\n.detailItemRow,\n.detailItemOpen {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n border: none;\n background: none;\n font: inherit;\n text-align: left;\n padding: 7px 10px;\n cursor: pointer;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.detailItemRow:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n}\n\n.detailItemOpen {\n background: var(--dsw-alias-state-business-tertiary, rgb(228, 237, 253));\n}\n\n.detailItemName {\n font-size: 13px;\n font-weight: 600;\n flex-shrink: 0;\n}\n\n.detailItemDesc {\n flex: 1;\n min-width: 0;\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.detailChevron {\n flex-shrink: 0;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n}\n\n.skillContent {\n border-top: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n padding: 10px 12px;\n max-height: 320px;\n overflow-y: auto;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n/* --- add-source progress ------------------------------------------------------- */\n\n.progress,\n.progressError {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 20px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n background: var(--dsw-alias-bg-layer-2, rgba(127, 127, 127, 0.06));\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.progressError {\n border-color: var(--dsw-alias-state-error-primary, rgb(236, 19, 19));\n color: var(--dsw-alias-state-error-primary, rgb(236, 19, 19));\n}\n\n.progressSpin {\n flex-shrink: 0;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n border: 2px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-top-color: var(--dsw-alias-brand-primary, #4f6ef7);\n animation: dshApmSpin 0.8s linear infinite;\n}\n\n@keyframes dshApmSpin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.progressFail {\n font-size: 13px;\n flex-shrink: 0;\n}\n\n.progressText {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n@media (max-width: 720px) {\n .pageView {\n padding: 14px;\n }\n\n .titleRow {\n flex-wrap: wrap;\n }\n\n .title {\n flex: 1 0 auto;\n }\n\n .sub {\n flex: 1 0 100%;\n order: 3;\n white-space: normal;\n }\n\n .searchGroup {\n flex: 1 0 100%;\n order: 4;\n }\n\n .sourceTabsScroll {\n display: flex;\n overflow-x: auto;\n padding-bottom: 2px;\n scrollbar-width: thin;\n }\n\n .srcTab,\n .srcTabOn {\n width: auto;\n min-width: 128px;\n flex: 0 0 auto;\n }\n\n .grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .list .cardTop,\n .list .cardActions {\n max-width: 100%;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .progressSpin,\n .switchOn,\n .switchOff,\n .switchThumb {\n animation: none;\n transition: none;\n }\n}\n\n.surfaceToggles {\n display: flex;\n flex-wrap: wrap;\n gap: 4px 14px;\n align-items: center;\n}\n\n.surfaceToggle {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, rgb(97, 102, 107));\n cursor: pointer;\n user-select: none;\n}\n\n.surfaceToggle input[type='checkbox'] {\n accent-color: var(--dsw-alias-brand-primary-new-colorprimary-new-color, rgb(65, 118, 230));\n margin: 0;\n}\n\n.mcpOverrideForm {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0 0 10px;\n padding: 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n}\n\n.mcpCredentialForm {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0 0 10px;\n padding: 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n}\n\n.mcpCredentialRow {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\n.mcpCredentialControls {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mcpCredentialEditor {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mcpOverrideCheck {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n cursor: pointer;\n user-select: none;\n}\n\n.mcpOverrideInput {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n font-size: 12px;\n}\n\n.mcpOverrideArea {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n font-size: 12px;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n resize: vertical;\n}\n\n.mcpOverrideActions {\n display: flex;\n gap: 8px;\n}\n\n.backendBlock {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 14px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 10px;\n opacity: 1;\n}\n\n.backendBlock[data-busy='true'] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.backendRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.backendTitle {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n}\n\n.backendCurrent {\n margin: 0;\n font-size: 12px;\n font-weight: 500;\n}\n\n.backendHint {\n margin: 0;\n font-size: 11px;\n opacity: 0.7;\n}\n\n.backendVersion {\n margin: 0;\n font-size: 11px;\n opacity: 0.55;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n\n/* The 插件配置 card mirrors the host PluginCard chrome (border-l2 tokens,\n 14/16 header padding, disclosure body at 0 16px) so it sits visually\n identical beside the native cards. */\n\n.pluginCard {\n list-style: none;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 12px;\n background: var(--dsw-alias-bg-layer-3, #fff);\n transition: border-color 0.16s, background 0.16s;\n}\n\n.pluginCard:hover {\n border-color: var(--dsw-alias-label-dimmed, #c8ccd4);\n}\n\n.pluginCardOpen {\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border-color: var(--dsw-alias-label-dimmed, #c8ccd4);\n}\n\n.pluginCard[data-busy='true'] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.pluginCardHeader {\n width: 100%;\n appearance: none;\n border: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n}\n\n.pluginCardHeader:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: -2px;\n}\n\n.pluginCardBody {\n border-top: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n margin: 0 16px;\n padding: 4px 0 8px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.pluginCardRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n padding: 8px 0 4px;\n}\n\n.pluginCardText {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n flex: 1;\n}\n\n.pluginCardTitle {\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 15px;\n font-weight: 600;\n line-height: 1.4;\n}\n\n.pluginCardDesc {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 13px;\n line-height: 1.5;\n}\n\n.pluginCardRowLabel {\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n}\n\n/* The switch is the shared ui/ToggleSwitch component (the same one the\n suite cards use) — no parallel switch styles here. */\n\n.pluginCardError {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n font-size: 12px;\n line-height: 1.5;\n margin: 0;\n}\n\n.pluginChevron {\n flex: none;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n transition: transform 0.16s;\n display: inline-flex;\n}\n\n.pluginChevronOpen {\n transform: rotate(180deg);\n}\n\n/* Region segmented control, mirroring dshmarket's setSeg chrome. */\n.regionSeg {\n flex: none;\n display: inline-flex;\n gap: 2px;\n padding: 2px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 8px;\n}\n\n.regionSegBtn {\n appearance: none;\n border: none;\n background: none;\n font: inherit;\n color: var(--dsw-alias-label-secondary, #6b7280);\n cursor: pointer;\n border-radius: 6px;\n padding: 3px 10px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.regionSegOn {\n appearance: none;\n border: none;\n font: inherit;\n cursor: pointer;\n border-radius: 6px;\n padding: 3px 10px;\n font-size: 12px;\n line-height: 18px;\n background: var(--dsw-alias-bg-layer-2, #eef0f4);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n}\n\n.regionSegBtn:disabled,\n.regionSegOn:disabled {\n cursor: default;\n opacity: 0.5;\n}\n","/** A source tab with trailing edit and delete controls. */\nimport { createElement as h, type ReactNode } from 'react'\nimport type { Translate } from '../../index.js'\nimport css from '../../market.module.css'\n\nexport interface SourceTabProps {\n t: Translate\n active?: boolean\n label: string\n /** Hover hint for the tab (e.g. scan diagnostics); undefined hides it. */\n title?: string\n onSelect: () => void\n onDelete?: () => void\n onEdit?: () => void\n}\n\n/** A source chip with a trailing delete control (deletion confirms at the section level). */\nexport function SourceTab(props: SourceTabProps): ReactNode {\n const { t, active = false, label, title, onSelect, onDelete, onEdit } = props\n return h(\n 'div',\n { className: active ? css.srcTabOn : css.srcTab, title },\n h('button', { type: 'button', className: css.srcTabMain, onClick: onSelect }, label),\n onEdit === undefined\n ? null\n : h(\n 'button',\n {\n type: 'button',\n className: css.srcTabEdit,\n title: t('editSource'),\n onClick: (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n onEdit()\n }\n },\n '✎'\n ),\n onDelete === undefined\n ? null\n : h(\n 'button',\n {\n type: 'button',\n className: css.srcTabDel,\n title: t('remove'),\n onClick: (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n onDelete()\n }\n },\n '×'\n )\n )\n}\n","/** Source editor modal for adding or editing a catalog source. */\nimport { createElement as h, useState, type ReactNode } from 'react'\nimport { Button, Input, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SourceOverview } from '../../api.js'\nimport type { SourceProgressState } from './market-resource.js'\nimport type { Translate } from '../../index.js'\nimport css from '../../market.module.css'\n\nexport type EditorState = { mode: 'edit'; source: SourceOverview } | { mode: 'add' } | undefined\n\n/** Which acquisition path the editor configures. */\nexport type SourceEditorKind = 'git' | 'archive' | 'local'\n\nexport interface SourceEditorModalProps {\n t: Translate\n editor: Exclude<EditorState, undefined>\n busy: boolean\n progress: SourceProgressState\n onClose: () => void\n onSave: (input: { url: string; branch: string; kind: SourceEditorKind; sha256: string }) => Promise<boolean>\n onRemove: (id: string) => void\n}\n\nexport function SourceEditorModal(props: SourceEditorModalProps): ReactNode {\n const { t, editor } = props\n const [kind, setKind] = useState<SourceEditorKind>(editor.mode === 'edit' ? (editor.source.kind === 'archive' ? 'archive' : editor.source.local === true ? 'local' : 'git') : 'git')\n const [url, setUrl] = useState(editor.mode === 'edit' ? editor.source.url : '')\n const [branch, setBranch] = useState(editor.mode === 'edit' ? (editor.source.branch ?? '') : '')\n const [sha256, setSha256] = useState('')\n const id = editor.mode === 'edit' ? editor.source.id : ''\n const title = editor.mode === 'edit' ? t('editSourceTitle') : t('addSourceTitle')\n const urlPlaceholder = kind === 'local' ? t('sourceUrlLocalPh') : kind === 'archive' ? t('sourceUrlArchivePh') : t('sourceUrlPh')\n const urlHint = kind === 'local' ? t('urlLocalHint') : kind === 'archive' ? t('urlArchiveHint') : t('urlGitHint')\n const segment = (value: SourceEditorKind, label: string): ReactNode =>\n h(\n 'button',\n {\n type: 'button',\n className: kind === value ? css.segOn : css.seg,\n onClick: () => setKind(value)\n },\n label\n )\n return h(Modal, {\n open: true,\n onClose: props.onClose,\n title,\n description: t('editorHint'),\n closeLabel: t('cancel'),\n className: css.editorDialog,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h('div', { className: css.modalFooterLeft }, editor.mode === 'edit' ? h(Button, { variant: 'ghost', onClick: () => props.onRemove(id) }, `🗑 ${t('remove')}`) : null),\n h(Button, { variant: 'ghost', onClick: props.onClose }, t('cancel')),\n h(\n Button,\n {\n variant: 'primary',\n disabled: props.busy,\n onClick: () => {\n void props.onSave({ url: url.trim(), branch: branch.trim(), kind, sha256: sha256.trim() })\n }\n },\n t('save')\n )\n ),\n children: h(\n 'div',\n { className: css.editorForm },\n h(\n 'div',\n { className: css.modeRow },\n segment('git', t('sourceModeGit')),\n segment('archive', t('sourceModeArchive')),\n segment('local', t('sourceModeLocal'))\n ),\n editor.mode === 'edit'\n ? h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, t('sourceIdPh')),\n h('div', { className: css.staticId }, h('span', { className: css.staticIdValue }, id), h('span', { className: css.fieldHint }, t('idFixed')))\n )\n : null,\n h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, urlPlaceholder),\n h(Input, { placeholder: urlPlaceholder, value: url, onChange: event => setUrl((event.target as HTMLInputElement).value) }),\n h('span', { className: css.fieldHint }, urlHint)\n ),\n kind === 'git'\n ? h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, t('branchPh')),\n h(Input, { placeholder: t('branchPh'), value: branch, onChange: event => setBranch((event.target as HTMLInputElement).value) }),\n h('span', { className: css.fieldHint }, t('branchHint'))\n )\n : null,\n kind === 'archive'\n ? h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, t('sha256Ph')),\n h(Input, { placeholder: t('sha256Ph'), value: sha256, onChange: event => setSha256((event.target as HTMLInputElement).value) }),\n h('span', { className: css.fieldHint }, t('sha256Hint'))\n )\n : null,\n props.progress.error === undefined && props.progress.step === undefined\n ? null\n : h(\n 'div',\n {\n className: props.progress.error === undefined ? css.progress : css.progressError\n },\n props.progress.error === undefined ? h('span', { className: css.progressSpin }) : h('span', { className: css.progressFail }, '✕'),\n h('span', { className: css.progressText }, props.progress.error === undefined ? props.progress.step : `${t('actionFail')}: ${props.progress.error}`)\n )\n )\n })\n}\n","/** Pre-install confirmation modal: concise surface counts plus a risk notice. */\nimport { createElement as h, type ReactNode } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SuiteCardData } from '../../api.js'\nimport type { Translate } from '../../index.js'\nimport css from '../../market.module.css'\n\nexport interface InstallConfirmState {\n suite: SuiteCardData\n /** Locked source commit shown in the confirm dialog; undefined for local sources. */\n lockCommit?: string\n /** True when the source is a local working tree (no immutable commit). */\n localSource?: boolean\n}\n\nexport interface InstallConfirmModalProps {\n t: Translate\n state: InstallConfirmState\n busy: boolean\n onClose: () => void\n onConfirm: () => Promise<boolean>\n}\n\n/** Surface count tags shown on the card; keys mirror SuiteCard's tag list. */\nconst SURFACE_TAGS: Array<{ key: 'skills' | 'mcp' | 'hooks' | 'commands' | 'agents' | 'lsp'; labelKey: 'surfaceSkills' | 'surfaceMcp' | 'surfaceHooks' | 'surfaceCommands' | 'surfaceAgents' | 'surfaceLsp' }> = [\n { key: 'skills', labelKey: 'surfaceSkills' },\n { key: 'mcp', labelKey: 'surfaceMcp' },\n { key: 'hooks', labelKey: 'surfaceHooks' },\n { key: 'commands', labelKey: 'surfaceCommands' },\n { key: 'agents', labelKey: 'surfaceAgents' },\n { key: 'lsp', labelKey: 'surfaceLsp' }\n]\n\nexport function InstallConfirmModal(props: InstallConfirmModalProps): ReactNode {\n const { t, state, busy } = props\n const surfaces = state.suite.surfaces\n const tags = SURFACE_TAGS.filter(tag => surfaces[tag.key] > 0)\n const executable = surfaces.mcp > 0 || surfaces.hooks > 0\n\n return h(Modal, {\n open: true,\n onClose: props.onClose,\n title: t('installConfirmTitle'),\n description: t('installConfirmDesc'),\n closeLabel: t('cancel'),\n className: css.editorDialog,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h(Button, { variant: 'ghost', disabled: busy, onClick: props.onClose }, t('cancel')),\n h(\n Button,\n {\n variant: 'primary',\n disabled: busy,\n onClick: () => {\n void props.onConfirm()\n }\n },\n t('installConfirmAction')\n )\n ),\n children: h(\n 'div',\n { className: css.installConfirmBody },\n h('div', { className: css.installConfirmSuite }, `${state.suite.sourceId} / ${state.suite.name}`),\n state.suite.version === undefined ? null : h('div', { className: css.installConfirmMeta }, `${t('version')}: v${state.suite.version}`),\n state.lockCommit === undefined\n ? null\n : h('div', { className: css.installConfirmCommit }, `${t('installConfirmSource')}: ${state.lockCommit.slice(0, 12)}`),\n state.lockCommit === undefined && state.localSource === true\n ? h('div', { className: css.installConfirmCommit }, `${t('installConfirmSource')}: ${t('installConfirmLocalTree')}`)\n : null,\n tags.length === 0\n ? h('div', { className: css.installConfirmMeta }, t('installConfirmNoSurfaces'))\n : h(\n 'div',\n { className: css.installConfirmTags },\n tags.map(tag => h('span', { key: tag.key, className: css.tag }, `${t(tag.labelKey)} ${surfaces[tag.key]}`))\n ),\n executable ? h('div', { className: css.installConfirmWarn }, t('installConfirmExecutable')) : null\n )\n })\n}\n","/** Shared switch control (ON = primary button fill, like every host toggle). */\nimport { createElement as h, type ReactNode } from 'react'\nimport css from '../market.module.css'\n\nexport interface ToggleSwitchProps {\n on: boolean\n disabled?: boolean\n title?: string\n onChange: () => void\n}\n\n/** A green/gray switch control for suite enable state. */\nexport function ToggleSwitch(props: ToggleSwitchProps): ReactNode {\n return h(\n 'button',\n {\n type: 'button',\n role: 'switch',\n 'aria-checked': props.on,\n title: props.title,\n disabled: props.disabled,\n className: props.on ? css.switchOn : css.switchOff,\n onClick: (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n props.onChange()\n }\n },\n h('span', { className: css.switchThumb })\n )\n}\n","/** A suite card in the market grid/list. */\nimport { createElement as h, type ReactElement, type ReactNode } from 'react'\nimport { Button, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SuiteCardData } from '../../api.js'\nimport type { Translate } from '../../index.js'\nimport { ToggleSwitch } from '../../ui/ToggleSwitch.js'\nimport css from '../../market.module.css'\n\nexport interface SuiteCardProps {\n t: Translate\n suite: SuiteCardData\n busy: boolean\n onOpen: () => void\n onInstall: () => void\n onAddSource: () => void\n onToggle: () => void\n onRefresh: () => void\n onUninstall: () => void\n}\n\nexport function SuiteCard(props: SuiteCardProps): ReactNode {\n const { t, suite, busy } = props\n const tags: Array<[string, number]> = (\n [\n [t('surfaceSkills'), suite.surfaces.skills],\n [t('surfaceMcp'), suite.surfaces.mcp],\n [t('surfaceHooks'), suite.surfaces.hooks],\n [t('surfaceCommands'), suite.surfaces.commands],\n [t('surfaceAgents'), suite.surfaces.agents],\n [t('surfaceLsp'), suite.surfaces.lsp]\n ] as Array<[string, number]>\n ).filter(([, count]) => count > 0)\n const layoutLabel =\n suite.layout === 'agent-plugin-v1'\n ? t('layoutV1')\n : suite.layout === 'claude-code'\n ? t('layoutCC')\n : suite.layout === 'codex'\n ? t('layoutCodex')\n : suite.layout === 'universal'\n ? t('layoutUniversal')\n : suite.layout === 'cursor'\n ? t('layoutCursor')\n : suite.layout === 'kimi'\n ? t('layoutKimi')\n : suite.layout === 'remote'\n ? t('layoutRemote')\n : suite.layout === 'project-native'\n ? t('layoutProjectNative')\n : t('layoutSkills')\n const isRemote = suite.remoteUrl !== undefined\n const hasTagRow = tags.length > 0 || suite.errors.length > 0 || (suite.mcpErrors?.length ?? 0) > 0\n const stop = (callback: () => void) => (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n callback()\n }\n // Installed cards carry the MCP card's left accent: green = enabled, gray = disabled.\n const accent = suite.installed ? (suite.enabled ? css.cardOn : css.cardMuted) : undefined\n return h(\n 'article',\n { className: accent ? `${css.card} ${accent}` : css.card, onClick: props.onOpen },\n h(\n 'div',\n { className: css.cardTop },\n h(\n 'div',\n { className: css.cardTitle },\n h('span', { className: css.cardName }, suite.name),\n suite.version === undefined ? null : h('span', { className: css.version }, `v${suite.version}`)\n ),\n h(\n 'div',\n { className: css.cardActions },\n suite.installed\n ? [\n h(\n 'button',\n {\n key: 'refresh',\n type: 'button',\n className: css.iconBtn,\n title: t('refresh'),\n disabled: busy,\n onClick: stop(props.onRefresh)\n },\n h(\n 'svg',\n { viewBox: '0 0 24 24', 'aria-hidden': 'true' },\n h('path', { d: 'M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8' }),\n h('path', { d: 'M21 3v5h-5' })\n )\n ),\n h(\n 'button',\n {\n key: 'uninstall',\n type: 'button',\n className: `${css.iconBtn} ${css.iconBtnDanger}`,\n title: t('uninstall'),\n disabled: busy,\n onClick: stop(props.onUninstall)\n },\n h(\n 'svg',\n { viewBox: '0 0 24 24', 'aria-hidden': 'true' },\n h('path', { d: 'M3 6h18' }),\n h('path', { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6' }),\n h('path', { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2' })\n )\n ),\n // The enable switch reads last, at the card's trailing edge.\n h(ToggleSwitch, {\n key: 'toggle',\n on: suite.enabled,\n disabled: busy,\n title: suite.enabled ? t('disable') : t('enable'),\n onChange: props.onToggle\n })\n ]\n : isRemote\n ? h(\n Button,\n {\n variant: 'primary',\n size: 'sm',\n disabled: busy,\n title: suite.remoteUrl,\n onClick: stop(props.onAddSource)\n },\n t('addSource')\n )\n : h(\n Button,\n {\n variant: 'primary',\n size: 'sm',\n disabled: busy,\n onClick: stop(props.onInstall)\n },\n t('install')\n )\n )\n ),\n h('p', { className: css.desc }, suite.description ?? ''),\n h(\n 'div',\n { className: css.meta },\n h('span', { className: css.src }, `${suite.sourceId} · ${isRemote ? t('remoteRef') : suite.dimension === 'user' ? t('dimensionUser') : t('dimensionProject')}`),\n h('span', { className: css.tag }, layoutLabel)\n ),\n hasTagRow\n ? h(\n 'div',\n { className: css.tagRow },\n ...tags.map(([label, count]) => h('span', { key: label, className: css.tag }, `${label} ${count}`)),\n suite.errors.length === 0\n ? null\n : h(Tooltip, {\n label: suite.errors.slice(0, 8).join(t('sourceErrorSeparator')),\n children: h('span', { className: css.warnLine }, `⚠ ${t('errors')} ${suite.errors.length}`) as unknown as ReactElement\n }),\n (suite.mcpErrors?.length ?? 0) === 0\n ? null\n : h(Tooltip, {\n label: suite.mcpErrors!.slice(0, 8).join(t('sourceErrorSeparator')),\n children: h('span', { className: css.warnLine }, `⚠ ${t('mcpSection')} ${suite.mcpErrors!.length}`) as unknown as ReactElement\n })\n )\n : null\n )\n}\n","/** Shared status icon used by market and MCP status filter tabs. */\nimport { createElement as h, type ReactNode } from 'react'\n\nexport type StatusIconKind = 'all' | 'installed' | 'uninstalled'\n\nexport interface StatusIconProps {\n kind: StatusIconKind\n}\n\n/** An SVG status icon for the all/installed/uninstalled filter tabs. */\nexport function StatusIcon({ kind }: StatusIconProps): ReactNode {\n const common = { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n if (kind === 'installed') {\n return h('svg', common, h('circle', { cx: 8, cy: 8, r: 5.5 }), h('path', { d: 'm5.5 8 1.7 1.7 3.4-3.4' }))\n }\n if (kind === 'uninstalled') {\n return h('svg', common, h('path', { d: 'M8 2v8m-3-3 3 3 3-3M3 13h10' }))\n }\n return h('svg', common, h('path', { d: 'M2.5 5 8 2.5 13.5 5 8 7.5 2.5 5Zm0 3L8 10.5 13.5 8M2.5 11 8 13.5 13.5 11' }))\n}\n","/**\n * Error boundary for untrusted preview content.\n *\n * Skill/command/agent bodies and hook/LSP JSON are third-party content; a\n * renderer throw must degrade to a plain-text fallback instead of unmounting\n * the whole settings section (React has no built-in boundary).\n */\nimport { createElement as h, Component, type ReactNode } from 'react'\n\ninterface Props {\n children: ReactNode\n fallback?: (error: Error) => ReactNode\n}\n\ninterface State {\n error: Error | undefined\n}\n\nexport class ErrorBoundary extends Component<Props, State> {\n override state: State = { error: undefined }\n\n static getDerivedStateFromError(error: Error): State {\n return { error }\n }\n\n override componentDidCatch(error: Error, info: unknown): void {\n console.warn('[dsh-agent-plugins-market] preview render failed:', error, info)\n }\n\n override render(): ReactNode {\n if (this.state.error !== undefined) {\n return this.props.fallback === undefined\n ? h('pre', { className: 'dsh-agent-plugins-fallback' }, `预览渲染失败:${this.state.error.message}`)\n : this.props.fallback(this.state.error)\n }\n return this.props.children\n }\n}\n","/** Browser-safe structural subset of the Host credentials wire. */\n\nexport interface CredentialView {\n configured: boolean\n source?: string\n writable: boolean\n}\n\nexport interface CredentialApi {\n describe(payload: { refs: string[] }): Promise<unknown>\n set(payload: { ref: string; value: string }): Promise<unknown>\n unset(payload: { ref: string }): Promise<unknown>\n}\n\ninterface CredentialDescribeResponse {\n result?: {\n ok?: boolean\n value?: { credentials?: Record<string, CredentialView> }\n error?: { message?: string }\n }\n}\n\ninterface CredentialMutationResponse {\n result?: { ok?: boolean; error?: { message?: string } }\n}\n\n/** Read one value-free credential view; secret values never enter the browser state. */\nexport async function describeCredential(api: CredentialApi | undefined, ref: string): Promise<CredentialView | undefined> {\n if (api === undefined) return undefined\n const response = (await api.describe({ refs: [ref] })) as CredentialDescribeResponse\n if (response.result?.ok !== true) throw new Error(response.result?.error?.message ?? 'credential lookup failed')\n return response.result.value?.credentials?.[ref]\n}\n\nexport async function setCredential(api: CredentialApi, ref: string, value: string): Promise<void> {\n const response = (await api.set({ ref, value })) as CredentialMutationResponse\n if (response.result?.ok !== true) throw new Error(response.result?.error?.message ?? 'credential save failed')\n}\n\nexport async function unsetCredential(api: CredentialApi, ref: string): Promise<void> {\n const response = (await api.unset({ ref })) as CredentialMutationResponse\n if (response.result?.ok !== true) throw new Error(response.result?.error?.message ?? 'credential removal failed')\n}\n","/* Write-only MCP credential editor. Colors ride dsh --dsw-alias-* tokens. */\n\n.form {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px 14px;\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n}\n\n.head {\n margin: 0;\n color: var(--dsw-alias-label-secondary, #667085);\n font-size: 12px;\n font-weight: 600;\n}\n\n.error {\n padding: 8px 10px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n border-radius: 8px;\n overflow-wrap: anywhere;\n font-size: 12px;\n line-height: 18px;\n}\n\n.row {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 6px;\n padding-top: 8px;\n border-top: 1px solid var(--dsw-alias-border-l1, #eef1f5);\n}\n\n.ref {\n color: var(--dsw-alias-label-primary, #1f2328);\n font: 600 12px/18px ui-monospace, Menlo, Consolas, monospace;\n}\n\n.controls {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 8px;\n}\n\n.facts {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.factOk, .factMiss {\n padding: 1px 8px;\n border-radius: 999px;\n font-size: 11px;\n line-height: 17px;\n}\n\n.factOk {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237));\n}\n\n.factMiss {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n\n.note {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 11px;\n line-height: 17px;\n}\n\n.editor {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.input {\n width: 100%;\n box-sizing: border-box;\n padding: 7px 10px;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-bg-layer-1, #fff);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 8px;\n font-size: 12px;\n}\n\n.input:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 1px;\n}\n\n.actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n","/**\n * Write-only credential editor for MCP `${ENV_NAME}` references.\n *\n * Read facts (configured / source / writable) come from the value-free\n * credentials wire; a typed value crosses the wire exactly once, inside\n * `credentials.set`, and never re-enters component state. Read-only\n * launch-environment credentials render guidance instead of a form that could\n * only fake success.\n */\nimport { useEffect, useState, type ReactNode } from 'react'\nimport { createElement as h } from 'react'\nimport { Button } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { describeCredential, setCredential, unsetCredential, type CredentialApi, type CredentialView } from './credentials.js'\nimport type { Translate } from './index.js'\nimport css from './mcp-credential.module.css'\n\nexport function McpCredentialEditor(props: { t: Translate; api?: CredentialApi; refs: string[] }): ReactNode {\n const { t, api, refs } = props\n const [views, setViews] = useState<Record<string, CredentialView>>({})\n const [drafts, setDrafts] = useState<Record<string, string>>({})\n const [busy, setBusy] = useState<string | undefined>(undefined)\n const [error, setError] = useState<string | undefined>(undefined)\n const refKey = refs.join('|')\n\n useEffect(() => {\n let cancelled = false\n setViews({})\n setError(undefined)\n if (api === undefined || refs.length === 0) return () => {\n cancelled = true\n }\n void Promise.all(refs.map(async ref => [ref, await describeCredential(api, ref)] as const))\n .then(entries => {\n if (cancelled) return\n setViews(Object.fromEntries(entries.flatMap(([ref, view]) => (view === undefined ? [] : [[ref, view]]))))\n })\n .catch(reason => {\n if (!cancelled) setError(reason instanceof Error ? reason.message : String(reason))\n })\n return () => {\n cancelled = true\n }\n }, [api, refKey])\n\n if (refs.length === 0) return null\n const refresh = async (ref: string): Promise<void> => {\n if (api === undefined) return\n const view = await describeCredential(api, ref)\n if (view !== undefined) setViews(current => ({ ...current, [ref]: view }))\n }\n const save = async (ref: string): Promise<void> => {\n const value = drafts[ref]?.trim()\n if (api === undefined || value === undefined || value === '') return\n setBusy(ref)\n setError(undefined)\n try {\n await setCredential(api, ref, value)\n setDrafts(current => ({ ...current, [ref]: '' }))\n await refresh(ref)\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setBusy(undefined)\n }\n }\n const unset = async (ref: string): Promise<void> => {\n if (api === undefined) return\n setBusy(ref)\n setError(undefined)\n try {\n await unsetCredential(api, ref)\n await refresh(ref)\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setBusy(undefined)\n }\n }\n\n return h(\n 'section',\n { className: css.form },\n h('h4', { className: css.head }, t('mcpCredentialTitle')),\n error === undefined ? null : h('div', { className: css.error }, error),\n refs.map(ref => {\n const view = views[ref]\n const refBusy = busy === ref\n return h(\n 'div',\n { key: ref, className: css.row },\n h('code', { className: css.ref }, ref),\n view === undefined\n ? h('div', { className: css.note }, api === undefined ? t('mcpCredentialUnavailable') : t('loading'))\n : h(\n 'div',\n { className: css.controls },\n h(\n 'div',\n { className: css.facts },\n h('span', { className: view.configured ? css.factOk : css.factMiss }, view.configured ? t('mcpCredentialConfigured') : t('mcpCredentialMissing')),\n view.source === undefined ? null : h('span', { className: css.note }, view.source)\n ),\n view.writable\n ? h(\n 'div',\n { className: css.editor },\n h('input', {\n className: css.input,\n type: 'password',\n autoComplete: 'new-password',\n value: drafts[ref] ?? '',\n placeholder: t('mcpCredentialPlaceholder'),\n disabled: refBusy,\n onChange: event => setDrafts(current => ({ ...current, [ref]: (event.target as HTMLInputElement).value }))\n }),\n h(\n 'div',\n { className: css.actions },\n h(Button, { variant: 'primary', size: 'sm', disabled: refBusy || (drafts[ref]?.trim() ?? '') === '', onClick: () => void save(ref) }, t('mcpCredentialSave')),\n view.configured ? h(Button, { variant: 'ghost', size: 'sm', disabled: refBusy, onClick: () => void unset(ref) }, t('mcpCredentialUnset')) : null\n )\n )\n : h('div', { className: css.note }, t('mcpCredentialReadOnly'))\n )\n )\n })\n )\n}\n","/** Request-order guard for asynchronously loaded suite detail content. */\n\n/** A small monotonic guard that invalidates stale detail responses. */\nexport interface LatestRequestGuard {\n next(): number\n invalidate(): void\n isCurrent(requestId: number): boolean\n}\n\n/** Create a request guard for one detail modal instance. */\nexport function createLatestRequestGuard(): LatestRequestGuard {\n let revision = 0\n return {\n next: () => ++revision,\n invalidate: () => {\n revision++\n },\n isCurrent: requestId => requestId === revision\n }\n}\n","/**\n * Suite detail modal: click one suite card to browse its internals.\n *\n * Sections: manifest overview, the skill list (each skill expands to its\n * SKILL.md body through the safe MarkdownText renderer), the validated\n * mcp.json servers (each expands to its full config), command/subagent file\n * lists, hook/LSP counts, and validation diagnostics.\n */\nimport { createElement as h, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'\nimport { Button, Modal, MarkdownText, type MarkdownLabels } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { fetchSkillContent, fetchSuiteDetail, postAction, type McpServerDetail, type SuiteDetail } from './api.js'\nimport type { CredentialApi } from './credentials.js'\nimport { ErrorBoundary } from './ErrorBoundary.js'\nimport { McpCredentialEditor } from './McpCredentialEditor.js'\nimport type { Translate } from './index.js'\nimport { createLatestRequestGuard } from './features/suite-detail/suite-detail-resource.js'\nimport css from './market.module.css'\n\n/** Toggleable surface keys paired with their translation keys. */\nconst SURFACE_TOGGLE_ROWS = [\n ['skills', 'surfaceSkills'],\n ['mcp', 'surfaceMcp'],\n ['hooks', 'surfaceHooks'],\n ['commands', 'surfaceCommands'],\n ['agents', 'surfaceAgents'],\n ['lsp', 'surfaceLsp']\n] as const\n\nexport interface SuiteDetailModalProps {\n t: Translate\n credentials?: CredentialApi\n sourceId: string\n suiteId: string\n onClose: () => void\n}\n\nexport function SuiteDetailModal({ t, credentials, sourceId, suiteId, onClose }: SuiteDetailModalProps): ReactNode {\n // MarkdownText's chrome (code copy buttons, footnotes heading) is\n // Cordis-free and takes its copy through this labels object.\n const markdownLabels = useMemo<MarkdownLabels>(\n () => ({ code: { copyLabel: t('mdCodeCopy'), copiedLabel: t('mdCodeCopied') }, footnotes: t('mdFootnotes') }),\n [t]\n )\n const [detail, setDetail] = useState<SuiteDetail | undefined>(undefined)\n const [error, setError] = useState<string | undefined>(undefined)\n const [openSkill, setOpenSkill] = useState<string | undefined>(undefined)\n const [skillText, setSkillText] = useState<string | undefined>(undefined)\n const [skillLoading, setSkillLoading] = useState(false)\n const skillRequestGuard = useRef(createLatestRequestGuard())\n const [openMcp, setOpenMcp] = useState<string | undefined>(undefined)\n const [openPreview, setOpenPreview] = useState<string | undefined>(undefined)\n\n useEffect(() => {\n let cancelled = false\n skillRequestGuard.current.invalidate()\n setDetail(undefined)\n setError(undefined)\n setOpenSkill(undefined)\n setSkillText(undefined)\n fetchSuiteDetail(sourceId, suiteId)\n .then(value => {\n if (!cancelled) setDetail(value)\n })\n .catch(reason => {\n if (!cancelled) setError(reason instanceof Error ? reason.message : String(reason))\n })\n return () => {\n cancelled = true\n skillRequestGuard.current.invalidate()\n }\n }, [sourceId, suiteId])\n\n const toggleSkill = async (name: string): Promise<void> => {\n const requestId = skillRequestGuard.current.next()\n if (openSkill === name) {\n setOpenSkill(undefined)\n return\n }\n setOpenSkill(name)\n setSkillLoading(true)\n setSkillText(undefined)\n try {\n const content = await fetchSkillContent(sourceId, suiteId, name)\n if (skillRequestGuard.current.isCurrent(requestId)) setSkillText(content.content)\n } catch (reason) {\n if (skillRequestGuard.current.isCurrent(requestId)) setSkillText(`⚠ ${reason instanceof Error ? reason.message : String(reason)}`)\n } finally {\n if (skillRequestGuard.current.isCurrent(requestId)) setSkillLoading(false)\n }\n }\n\n const toggleMcp = (key: string): void => {\n setOpenMcp(openMcp === key ? undefined : key)\n }\n\n const [surfaceBusy, setSurfaceBusy] = useState(false)\n const toggleSurface = async (surface: string, enabled: boolean): Promise<void> => {\n setSurfaceBusy(true)\n try {\n await postAction('set-surface', { sourceId, suiteId, surface, enabled })\n const next = await fetchSuiteDetail(sourceId, suiteId)\n setDetail(next)\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setSurfaceBusy(false)\n }\n }\n\n /** Save or clear one server's MCP override, then refresh the detail. */\n const saveMcpOverride = async (serverKey: string, patch: Record<string, unknown> | null): Promise<void> => {\n setSurfaceBusy(true)\n try {\n await postAction('set-mcp-override', { sourceId, suiteId, serverKey, override: patch })\n const next = await fetchSuiteDetail(sourceId, suiteId)\n setDetail(next)\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setSurfaceBusy(false)\n }\n }\n\n const layoutLabel =\n detail === undefined\n ? ''\n : detail.layout === 'agent-plugin-v1'\n ? t('layoutV1')\n : detail.layout === 'claude-code'\n ? t('layoutCC')\n : detail.layout === 'codex'\n ? t('layoutCodex')\n : detail.layout === 'universal'\n ? t('layoutUniversal')\n : detail.layout === 'cursor'\n ? t('layoutCursor')\n : detail.layout === 'kimi'\n ? t('layoutKimi')\n : detail.layout === 'remote'\n ? t('layoutRemote')\n : detail.layout === 'project-native'\n ? t('layoutProjectNative')\n : t('layoutSkills')\n\n return h(Modal, {\n open: true,\n onClose,\n title: detail === undefined ? t('detailTitle') : `${detail.name}${detail.version === null ? '' : ` v${detail.version}`}`,\n description: detail === undefined ? undefined : t('detailHint'),\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h('div', { className: css.modalFooter }, h(Button, { variant: 'ghost', onClick: onClose }, t('cancel'))),\n children: h(ErrorBoundary, {\n fallback: boundaryError => h('div', { className: css.warnLine }, `${t('actionFail')}: ${boundaryError.message}`),\n children:\n error !== undefined\n ? h('div', { className: css.warnLine }, error)\n : detail === undefined\n ? h('div', { className: css.empty }, t('loading'))\n : h(\n 'div',\n { className: css.detailSections },\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, t('overviewSection')),\n h(\n 'div',\n { className: css.detailGrid },\n h('div', { className: css.detailCell }, h('span', { className: css.detailKey }, t('sourceLabel')), h('span', { className: css.detailValue }, detail.sourceId)),\n h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('dimensionLabel')),\n h('span', { className: css.detailValue }, detail.dimension === 'user' ? t('dimensionUser') : t('dimensionProject'))\n ),\n h('div', { className: css.detailCell }, h('span', { className: css.detailKey }, t('layoutLabel')), h('span', { className: css.detailValue }, layoutLabel)),\n h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('statusLabel')),\n h(\n 'span',\n { className: detail.enabled ? css.okState : css.detailValue },\n detail.installed ? (detail.enabled ? t('installedBadge') : t('disabledLabel')) : t('notInstalledLabel')\n )\n ),\n detail.author === null\n ? null\n : h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('authorLabel')),\n h('span', { className: css.detailValue }, detail.author)\n ),\n detail.keywords.length === 0\n ? null\n : h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('keywordsLabel')),\n h('span', { className: css.detailValue }, detail.keywords.join(', '))\n )\n ),\n detail.description === null ? null : h('p', { className: css.detailDesc }, detail.description),\n h('div', { className: css.detailCell }, h('span', { className: css.detailKey }, t('rootLabel')), h('span', { className: css.mono }, detail.root)),\n detail.installed === false || detail.surfaceToggles === null\n ? null\n : h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('surfaceTogglesSection')),\n h(\n 'div',\n { className: css.surfaceToggles, title: t('surfaceTogglesHint') },\n ...SURFACE_TOGGLE_ROWS.map(([key, labelKey]) =>\n h('label', { key, className: css.surfaceToggle }, h('input', {\n type: 'checkbox',\n checked: detail.surfaceToggles![key],\n disabled: surfaceBusy,\n onChange: event => {\n void toggleSurface(key, (event.target as HTMLInputElement).checked)\n }\n }), t(labelKey))\n )\n )\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('skillsSection')} (${detail.skills.length})`),\n detail.skills.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.skills.map(skill =>\n h(\n 'div',\n { key: skill.name, className: css.detailItem },\n h(\n 'button',\n {\n type: 'button',\n className: openSkill === skill.name ? css.detailItemOpen : css.detailItemRow,\n onClick: () => {\n void toggleSkill(skill.name)\n }\n },\n h('span', { className: css.detailItemName }, skill.name),\n h('span', { className: css.detailItemDesc }, skill.description),\n h('span', { className: css.detailChevron }, openSkill === skill.name ? '▾' : '▸')\n ),\n openSkill !== skill.name ? null : h('div', { className: css.skillContent }, skillLoading ? t('loading') : h(MarkdownText, { text: skillText ?? '', labels: markdownLabels }))\n )\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('mcpSection')} (${detail.mcpServers.length})`),\n detail.mcpErrors.length === 0\n ? null\n : h('div', { className: css.warnLine, style: { margin: '0 0 6px' } }, `⚠ ${detail.mcpErrors.join(t('sourceErrorSeparator'))}`),\n detail.mcpServers.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.mcpServers.map(server => {\n const override = detail.mcpOverrides?.[server.key]\n const overridden = override !== undefined && Object.keys(override).length > 0\n const disabled = override?.enabled === false\n return h(\n 'div',\n { key: server.key, className: css.detailItem },\n h(\n 'button',\n {\n type: 'button',\n className: openMcp === server.key ? css.detailItemOpen : css.detailItemRow,\n onClick: () => toggleMcp(server.key)\n },\n h('span', { className: css.detailItemName }, server.key),\n h(\n 'span',\n { className: css.detailItemDesc },\n `${mcpSummary(server)}${disabled ? ` · ${t('mcpOverrideDisabledBadge')}` : overridden ? ` · ${t('mcpOverriddenBadge')}` : ''}`\n ),\n h('span', { className: css.detailChevron }, openMcp === server.key ? '▾' : '▸')\n ),\n openMcp === server.key\n ? h(\n 'div',\n { className: css.skillContent },\n detail.installed && detail.surfaceToggles?.mcp !== false\n ? h(McpCredentialEditor, { t, api: credentials, refs: server.credentialRefs ?? [] })\n : null,\n detail.installed && detail.surfaceToggles?.mcp !== false\n ? h(McpOverrideEditor, {\n t,\n serverKey: server.key,\n transport: server.type,\n override: override ?? {},\n busy: surfaceBusy,\n onSave: patch => saveMcpOverride(server.key, patch),\n onReset: () => saveMcpOverride(server.key, null)\n })\n : null,\n h('pre', { className: css.mono }, JSON.stringify(server, null, 2))\n )\n : null\n )\n })\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('commandsSection')} (${detail.commands.length})`),\n detail.commands.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.commands.map(command =>\n h(PreviewRow, {\n key: `c:${command.name}`,\n t,\n name: `/${command.name}`,\n description: command.description,\n open: openPreview === `c:${command.name}`,\n onToggle: () => setOpenPreview(openPreview === `c:${command.name}` ? undefined : `c:${command.name}`),\n children: h(MarkdownText, { text: command.content, labels: markdownLabels })\n })\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('agentsSection')} (${detail.agents.length})`),\n detail.agents.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.agents.map(agent =>\n h(PreviewRow, {\n key: `a:${agent.name}`,\n t,\n name: agent.name,\n description: agent.description,\n open: openPreview === `a:${agent.name}`,\n onToggle: () => setOpenPreview(openPreview === `a:${agent.name}` ? undefined : `a:${agent.name}`),\n children: h(MarkdownText, { text: agent.content, labels: markdownLabels })\n })\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('hooksLabel')} (${detail.hooks.count})`),\n detail.hooks.count === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.hooks.entries.map((hook, index) =>\n h(PreviewRow, {\n key: `h:${index}`,\n t,\n name: hook.event,\n description: hook.command,\n open: openPreview === `h:${index}`,\n onToggle: () => setOpenPreview(openPreview === `h:${index}` ? undefined : `h:${index}`),\n children: h('pre', { className: css.mono }, JSON.stringify(hook, null, 2))\n })\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('lspSection')} (${detail.lsp.servers.length + detail.lsp.raw.length})`),\n detail.lsp.servers.length === 0 && detail.lsp.raw.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : [\n ...detail.lsp.servers.map(server =>\n h(PreviewRow, {\n key: `l:${server.key}`,\n t,\n name: server.key,\n description: lspSummary(server),\n open: openPreview === `l:${server.key}`,\n onToggle: () => setOpenPreview(openPreview === `l:${server.key}` ? undefined : `l:${server.key}`),\n children: h('pre', { className: css.mono }, JSON.stringify(server, null, 2))\n })\n ),\n ...detail.lsp.raw.map(entry =>\n h(PreviewRow, {\n key: `l:${entry.name}`,\n t,\n name: entry.name,\n open: openPreview === `l:${entry.name}`,\n onToggle: () => setOpenPreview(openPreview === `l:${entry.name}` ? undefined : `l:${entry.name}`),\n children: h('pre', { className: css.mono }, entry.content)\n })\n )\n ]\n ),\n detail.errors.length === 0\n ? null\n : h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('errors')} (${detail.errors.length})`),\n detail.errors.map((entry, index) => h('div', { key: index, className: css.warnLine }, entry))\n )\n )\n })\n })\n}\n\nfunction mcpSummary(server: McpServerDetail): string {\n if (server.type === 'stdio') return server.command ?? server.type\n return server.url ?? server.type\n}\n\n/** One-line summary of a declared LSP server: command plus mapped extension list. */\nfunction lspSummary(server: { command: string; extensions: Record<string, string> }): string {\n return [server.command, Object.keys(server.extensions).join(' ')].join(' · ')\n}\n\n/** Parse `KEY=VALUE` lines into a record; blank and comment lines are skipped. */\nfunction parseKvLines(text: string): Record<string, string> | undefined {\n const result: Record<string, string> = {}\n for (const line of text.split('\\n')) {\n const trimmed = line.trim()\n if (trimmed === '' || trimmed.startsWith('#')) continue\n const eq = trimmed.indexOf('=')\n if (eq <= 0) continue\n result[trimmed.slice(0, eq).trim()] = trimmed.slice(eq + 1).trim()\n }\n return Object.keys(result).length > 0 ? result : undefined\n}\n\n/** Format a record back into sorted `KEY=VALUE` lines without exposing literal secrets. */\nconst SENSITIVE_KEY = /(authorization|token|secret|password|credential|api[-_]?key)/i\n\nfunction formatKvLines(map: Record<string, string> | undefined): string {\n if (map === undefined) return ''\n return Object.keys(map)\n .filter(key => !SENSITIVE_KEY.test(key) || map[key]?.includes('${'))\n .sort()\n .map(key => `${key}=${map[key]}`)\n .join('\\n')\n}\n\ntype OverridePatch = Record<string, unknown>\n\n/**\n * Per-server MCP override editor: enable/disable plus connection-input\n * replacement (url/headers for http servers, args/env for stdio). The\n * suite's own mcp.json stays source-owned; everything here persists as a\n * user override layered on top at mount time.\n */\nfunction McpOverrideEditor(props: {\n t: Translate\n serverKey: string\n transport: string\n override: Record<string, unknown>\n busy: boolean\n onSave: (patch: OverridePatch) => Promise<void>\n onReset: () => Promise<void>\n}): ReactNode {\n const { t, transport, override, busy } = props\n const [draft, setDraft] = useState<OverridePatch>(override)\n const kvHint = t('mcpOverrideKvHint')\n const isHttp = transport !== 'stdio'\n /** Gather the draft fields into one sanitized override patch and save it. */\n const submit = (): void => {\n const patch: OverridePatch = {}\n patch['enabled'] = draft['enabled'] !== false\n if (isHttp && typeof draft['url'] === 'string' && draft['url'] !== '') patch['url'] = draft['url']\n const headerText = isHttp ? String(draft['__headers'] ?? '') : ''\n const headers = parseKvLines(headerText)\n if (headers !== undefined) patch['headers'] = headers\n const envText = !isHttp ? String(draft['__env'] ?? '') : ''\n const env = parseKvLines(envText)\n if (env !== undefined) patch['env'] = env\n const argsText = !isHttp ? String(draft['__args'] ?? '') : ''\n const args = argsText\n .split('\\n')\n .map(line => line.trim())\n .filter(line => line !== '')\n if (args.length > 0) patch['args'] = args\n void props.onSave(patch)\n }\n return h(\n 'div',\n { className: css.mcpOverrideForm },\n h(\n 'label',\n { className: css.mcpOverrideCheck },\n h('input', {\n type: 'checkbox',\n checked: draft['enabled'] !== false,\n disabled: busy,\n onChange: event => setDraft({ ...draft, enabled: (event.target as HTMLInputElement).checked })\n }),\n t('mcpOverrideEnabled')\n ),\n isHttp\n ? h('input', {\n className: css.mcpOverrideInput,\n value: typeof draft['url'] === 'string' ? draft['url'] : '',\n placeholder: t('mcpOverrideUrlLabel'),\n disabled: busy,\n onChange: event => setDraft({ ...draft, url: (event.target as HTMLInputElement).value })\n })\n : null,\n isHttp\n ? h('textarea', {\n className: css.mcpOverrideArea,\n rows: 3,\n placeholder: t('mcpOverrideHeadersLabel'),\n title: kvHint,\n value: typeof draft['__headers'] === 'string' ? draft['__headers'] : formatKvLines(override['headers'] as Record<string, string> | undefined),\n disabled: busy,\n onChange: (event: { target: EventTarget | null }) => setDraft({ ...draft, __headers: (event.target as HTMLTextAreaElement).value })\n })\n : null,\n !isHttp\n ? h('textarea', {\n className: css.mcpOverrideArea,\n rows: 3,\n placeholder: t('mcpOverrideEnvLabel'),\n title: kvHint,\n value: typeof draft['__env'] === 'string' ? draft['__env'] : formatKvLines(override['env'] as Record<string, string> | undefined),\n disabled: busy,\n onChange: (event: { target: EventTarget | null }) => setDraft({ ...draft, __env: (event.target as HTMLTextAreaElement).value })\n })\n : null,\n !isHttp\n ? h('textarea', {\n className: css.mcpOverrideArea,\n rows: 3,\n placeholder: t('mcpOverrideArgsLabel'),\n value: typeof draft['__args'] === 'string' ? draft['__args'] : Array.isArray(override['args']) ? (override['args'] as string[]).join('\\n') : '',\n disabled: busy,\n onChange: (event: { target: EventTarget | null }) => setDraft({ ...draft, __args: (event.target as HTMLTextAreaElement).value })\n })\n : null,\n h('div', { className: css.mcpOverrideActions },\n h(Button, { variant: 'primary', size: 'sm', disabled: busy, onClick: submit }, t('mcpOverrideSave')),\n h(Button, { variant: 'ghost', size: 'sm', disabled: busy, onClick: () => void props.onReset() }, t('mcpOverrideReset'))\n ),\n h('div', { className: css.detailItemDesc }, kvHint)\n )\n}\n\nfunction PreviewRow(props: { t: Translate; name: string; description?: string; open: boolean; onToggle: () => void; children: ReactNode }): ReactNode {\n const { name, description, open, onToggle, children } = props\n return h(\n 'div',\n { className: css.detailItem },\n h(\n 'button',\n {\n type: 'button',\n className: open ? css.detailItemOpen : css.detailItemRow,\n onClick: onToggle\n },\n h('span', { className: css.detailItemName }, name),\n description === undefined ? null : h('span', { className: css.detailItemDesc }, description),\n h('span', { className: css.detailChevron }, open ? '▾' : '▸')\n ),\n open ? h('div', { className: css.skillContent }, children) : null\n )\n}\n","/* Shared search + filter + view-switch row.\n *\n * Flexbox, not a fixed column grid: panels pass different filter counts\n * (MCP 3, LSP 4), and a hard-coded grid template overflowed on the fourth\n * filter, pushing the view switch onto its own row and forcing a horizontal\n * scrollbar. Here the search box flexes, filter buttons keep their natural\n * width, and the spacer pushes the view switch to the trailing edge. */\n.toolbar {\n display: flex;\n align-items: flex-end;\n gap: 6px;\n min-width: 0;\n}\n\n.filterGap,\n.viewGap {\n flex: 1 0 12px;\n min-width: 0;\n}\n\n.search {\n display: flex;\n flex: 1 1 240px;\n align-items: center;\n box-sizing: border-box;\n min-width: 0;\n height: 36px;\n}\n\n.search input {\n box-sizing: border-box;\n min-width: 0;\n width: 100%;\n height: 36px;\n min-height: 36px;\n max-height: 36px;\n padding-top: 0;\n padding-bottom: 0;\n font-size: 12px;\n line-height: 20px;\n}\n\n.filter,\n.filterOn {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 54px;\n height: 36px;\n padding: 7px 9px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n border: none;\n border-bottom: 2px solid transparent;\n background: none;\n cursor: pointer;\n font: inherit;\n font-size: 13px;\n white-space: nowrap;\n}\n\n.filterOn {\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n border-bottom-color: var(--dsw-alias-brand-primary, #4f6ef7);\n font-weight: 600;\n}\n\n.filter svg,\n.filterOn svg,\n.viewSwitch svg {\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.filterCount {\n font-variant-numeric: tabular-nums;\n}\n\n.viewSwitch {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 36px;\n color: var(--dsw-alias-label-tertiary, #9ca3af);\n border: none;\n border-bottom: 2px solid transparent;\n background: none;\n cursor: pointer;\n}\n\n.viewSwitch:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.viewSwitch:focus-visible,\n.filter:focus-visible,\n.filterOn:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 2px;\n}\n\n@media (max-width: 760px) {\n .toolbar {\n flex-wrap: wrap;\n justify-content: flex-end;\n }\n\n .search {\n flex-basis: 100%;\n }\n\n .filterGap {\n display: none;\n }\n}\n","/**\n * Shared search, filter, and view controls for catalog-style settings panels.\n */\nimport { createElement as h, type ReactNode } from 'react'\nimport { Input } from '@deepseek-ai/dsh-client-ui-primitives'\nimport css from './SearchFilterToolbar.module.css'\n\nexport type SearchFilterToolbarView = 'grid' | 'list'\n\nexport interface SearchFilterToolbarFilter {\n id: string\n label: string\n count: number\n icon: ReactNode\n active: boolean\n onSelect: () => void\n /** Extended hover/aria explanation; falls back to the label when absent. */\n hint?: string\n}\n\nexport interface SearchFilterToolbarProps {\n search: string\n searchLabel: string\n searchPlaceholder: string\n onSearchChange: (search: string) => void\n filters: readonly SearchFilterToolbarFilter[]\n view: SearchFilterToolbarView\n gridLabel: string\n listLabel: string\n onViewChange: (view: SearchFilterToolbarView) => void\n className?: string\n}\n\n/**\n * Render a consistent control row for searchable grid and list content.\n *\n * @param props - Search state, selectable filters, and view-mode state.\n * @returns Search input, filter tabs, and an accessible grid/list toggle.\n */\nexport function SearchFilterToolbar(props: SearchFilterToolbarProps): ReactNode {\n const nextView: SearchFilterToolbarView = props.view === 'grid' ? 'list' : 'grid'\n const nextViewLabel = nextView === 'grid' ? props.gridLabel : props.listLabel\n return h('div', { className: props.className === undefined ? css.toolbar : `${css.toolbar} ${props.className}` },\n h(Input, {\n className: css.search,\n value: props.search,\n placeholder: props.searchPlaceholder,\n 'aria-label': props.searchLabel,\n onChange: event => props.onSearchChange((event.target as HTMLInputElement).value),\n }),\n h('div', { className: css.filterGap }),\n ...props.filters.map(filter => h('button', {\n key: filter.id,\n type: 'button',\n className: filter.active ? css.filterOn : css.filter,\n title: filter.hint ?? `${filter.label} ${filter.count}`,\n 'aria-label': filter.hint ?? `${filter.label} ${filter.count}`,\n onClick: filter.onSelect,\n }, filter.icon, h('span', { className: css.filterCount }, filter.count))),\n h('div', { className: css.viewGap }),\n h('button', {\n type: 'button',\n className: css.viewSwitch,\n 'aria-label': nextViewLabel,\n title: nextViewLabel,\n onClick: () => props.onViewChange(nextView),\n }, h(ViewIcon, { mode: nextView })),\n )\n}\n\nfunction ViewIcon({ mode }: { mode: SearchFilterToolbarView }): ReactNode {\n const common = { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n return mode === 'list'\n ? h('svg', common, h('path', { d: 'M3 4h10M3 8h10M3 12h10' }))\n : h('svg', common, h('rect', { x: 2.5, y: 2.5, width: 4, height: 4, rx: .8 }), h('rect', { x: 9.5, y: 2.5, width: 4, height: 4, rx: .8 }), h('rect', { x: 2.5, y: 9.5, width: 4, height: 4, rx: .8 }), h('rect', { x: 9.5, y: 9.5, width: 4, height: 4, rx: .8 }))\n}\n","/**\n * The Agent Plugins Market settings section.\n *\n * Layout: repository sources run along the TOP as chips (全部 first), with\n * edit-current / add / refresh-all controls on the right; below sit search,\n * status tabs, and the card grid. Colors ride the dsh --dsw-alias-* tokens\n * with light-mode fallbacks so the page follows the active theme.\n */\nimport { createElement as h, useCallback, useEffect, useMemo, useState, type ReactNode } from 'react'\nimport { Button, Modal, Toast } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { postAction, type OverviewData, type SuiteCardData } from './api.js'\nimport { loadOverview, invalidateOverview, startSourceProgressPolling, type SourceProgressState } from './features/market/market-resource.js'\nimport { deriveMarketViewModel, type MarketCategory, type MarketFilter } from './features/market/market-view-model.js'\nimport { SourceTab } from './features/market/SourceTab.js'\nimport { SourceEditorModal, type EditorState } from './features/market/SourceEditorModal.js'\nimport { InstallConfirmModal, type InstallConfirmState } from './features/market/InstallConfirmModal.js'\nimport { SuiteCard } from './features/market/SuiteCard.js'\nimport { StatusIcon } from './ui/StatusIcon.js'\nimport type { Translate } from './index.js'\nimport type { CredentialApi } from './credentials.js'\nimport { ErrorBoundary } from './ErrorBoundary.js'\nimport { SuiteDetailModal } from './SuiteDetail.js'\nimport { SearchFilterToolbar } from './SearchFilterToolbar.js'\nimport css from './market.module.css'\n\n/** Host step keys -> translation keys, resolved against the active t(). */\nconst PROGRESS_STEP_LABELS: Record<string, string> = {\n cloning: 'progressCloning',\n downloading: 'progressDownloading',\n reading: 'progressReading'\n}\n\nexport interface MarketSectionProps {\n t: Translate\n /** Host credentials wire used for write-only MCP env configuration. */\n credentials?: CredentialApi\n /** The host surface controls only outer spacing; data and actions stay shared. */\n mode?: 'settings' | 'page'\n}\n\ntype Tab = MarketFilter\ntype Category = MarketCategory\ntype ViewMode = 'grid' | 'list'\n\ninterface ToastState {\n key: number\n message: string\n}\n\ninterface ConfirmState {\n kind: 'uninstall' | 'removeSource'\n sourceId: string\n suiteId?: string\n}\n\nfunction progressStepLabel(t: Translate, step: string): string {\n const key = PROGRESS_STEP_LABELS[step]\n return key === undefined ? step : t(key as Parameters<Translate>[0])\n}\n\n/** Keep parameterized copy compatible with hosts whose bound translator ignores params. */\nfunction interpolate(text: string, params: Record<string, unknown>): string {\n return text.replace(/\\{(\\w+)\\}/g, (match, key: string) => (key in params ? String(params[key]) : match))\n}\n\nexport function MarketSection({ t, credentials, mode = 'settings' }: MarketSectionProps): ReactNode {\n const [overview, setOverview] = useState<OverviewData>(() => loadOverview().initial)\n const [loading, setLoading] = useState(() => loadOverview().revalidating)\n const [search, setSearch] = useState('')\n const [tab, setTab] = useState<Tab>('all')\n const [category, setCategory] = useState<Category>('all')\n const [view, setView] = useState<ViewMode>('grid')\n const [busy, setBusy] = useState<string | undefined>(undefined)\n const [toast, setToast] = useState<ToastState | undefined>(undefined)\n const [confirm, setConfirm] = useState<ConfirmState | undefined>(undefined)\n const [installConfirm, setInstallConfirm] = useState<InstallConfirmState | undefined>(undefined)\n const [editor, setEditor] = useState<EditorState>(undefined)\n const [detail, setDetail] = useState<{ sourceId: string; suiteId: string } | undefined>(undefined)\n const [progress, setProgress] = useState<SourceProgressState>({ step: undefined, error: undefined })\n\n const refresh = useCallback(async () => {\n invalidateOverview()\n try {\n const data = await loadOverview().promise\n setOverview(data)\n } catch {\n setToast({ key: Date.now(), message: t('loadFail') })\n } finally {\n setLoading(false)\n }\n }, [t])\n\n useEffect(() => {\n void refresh()\n }, [refresh])\n\n const action = useCallback(\n async (key: string, path: string, body: Record<string, unknown>): Promise<boolean> => {\n setBusy(key)\n try {\n await postAction(path, body)\n invalidateOverview()\n await refresh()\n return true\n } catch (error) {\n setToast({ key: Date.now(), message: `${t('actionFail')}: ${error instanceof Error ? error.message : String(error)}` })\n return false\n } finally {\n setBusy(undefined)\n }\n },\n [refresh, t]\n )\n\n const viewModel = useMemo(() => deriveMarketViewModel(overview, search, tab, category), [overview, search, tab, category])\n const { scopeTotals, filtered } = viewModel\n\n const openUninstall = useCallback((suite: SuiteCardData) => {\n setConfirm({ kind: 'uninstall', sourceId: suite.sourceId, suiteId: suite.suiteId })\n }, [])\n\n const confirmAction = useCallback(async () => {\n if (confirm === undefined) return\n if (confirm.kind === 'uninstall' && confirm.suiteId !== undefined) {\n await action(`u:${confirm.suiteId}`, 'uninstall', { sourceId: confirm.sourceId, suiteId: confirm.suiteId })\n } else if (confirm.kind === 'removeSource') {\n await action(`s:${confirm.sourceId}`, 'sources/remove', { id: confirm.sourceId })\n if (category === confirm.sourceId) setCategory('all')\n }\n setConfirm(undefined)\n }, [confirm, action, category])\n\n const selectedSource = category === 'all' ? undefined : overview.sources.find(source => source.id === category)\n\n const adoptSource = useCallback(\n async (id: string) => {\n await action(`s:adopt:${id}`, 'sources/adopt', { id })\n },\n [action]\n )\n const unmanaged = overview.unmanaged ?? []\n\n return h(ErrorBoundary, {\n fallback: error => h('div', { className: css.empty }, `${t('actionFail')}: ${error.message}`),\n children: h(\n 'div',\n { className: mode === 'page' ? `${css.market} ${css.pageMode}` : css.market },\n h(\n 'header',\n { className: css.header },\n h(\n 'div',\n { className: css.titleRow },\n h('h2', { className: css.title }, t('nav')),\n h('div', { className: css.spacer }),\n h(\n 'div',\n { className: css.searchGroup },\n h(Button, { variant: 'ghost', size: 'sm', title: t('addSource'), onClick: () => setEditor({ mode: 'add' }) }, '+'),\n h(\n Button,\n {\n variant: 'ghost',\n size: 'sm',\n title: t('refreshAll'),\n onClick: () => {\n void action('s:refresh:all', 'sources/refresh', {})\n }\n },\n '↻'\n )\n )\n ),\n h(\n 'div',\n { className: css.marketControls },\n h(\n 'div',\n { className: css.sourceTabsRow },\n h(\n 'div',\n { className: css.sourceTabsScroll },\n h(SourceTab, {\n key: '__all__',\n t,\n active: category === 'all',\n label: `${t('tabAll')} ${overview.totals.all}`,\n onSelect: () => setCategory('all')\n }),\n ...[...overview.sources]\n .sort((a, b) => a.id.localeCompare(b.id))\n .map(source => {\n const notes = source.scanNotes ?? []\n const noteHint = notes.length === 0 ? undefined : `${t('scanNotes')}: ${notes.slice(0, 8).join(t('sourceErrorSeparator'))}`\n const kindBadge = source.local === true ? t('sourceLocal') : source.kind === 'archive' ? t('sourceArchive') : source.adopted === true ? t('sourceAdopted') : undefined\n return h(SourceTab, {\n key: source.id,\n t,\n active: category === source.id,\n label: `${source.id}${kindBadge === undefined ? '' : ` · ${kindBadge}`} ${source.suiteIds.length}${source.cloned === false || notes.length > 0 ? ' ⚠' : ''}`,\n title: noteHint,\n onSelect: () => setCategory(source.id),\n onDelete: () => setConfirm({ kind: 'removeSource', sourceId: source.id }),\n onEdit: selectedSource?.id === source.id ? () => setEditor({ mode: 'edit', source: source }) : undefined\n })\n })\n )\n ),\n unmanaged.length === 0\n ? null\n : h(\n 'div',\n { className: css.unmanagedRow },\n h('span', { className: css.unmanagedLabel }, t('unmanagedTitle')),\n ...unmanaged.map(entry =>\n h(\n 'span',\n { key: entry.id, className: css.unmanagedChip, title: entry.url ?? t('unmanagedNoRemote') },\n h('span', { className: css.unmanagedChipName }, entry.id),\n h(\n 'button',\n {\n type: 'button',\n className: css.unmanagedAdopt,\n disabled: busy !== undefined,\n title: t('unmanagedAdopt'),\n onClick: () => {\n void adoptSource(entry.id)\n }\n },\n '+'\n )\n )\n )\n ),\n h(SearchFilterToolbar, {\n search,\n searchLabel: t('searchPh'),\n searchPlaceholder: t('searchPh'),\n onSearchChange: setSearch,\n filters: [\n { id: 'all', label: t('tabAll'), count: scopeTotals.all, icon: h(StatusIcon, { kind: 'all' }), active: tab === 'all', onSelect: () => setTab('all') },\n {\n id: 'installed',\n label: t('tabInstalled'),\n count: scopeTotals.installed,\n icon: h(StatusIcon, { kind: 'installed' }),\n active: tab === 'installed',\n onSelect: () => setTab('installed')\n },\n {\n id: 'uninstalled',\n label: t('tabUninstalled'),\n count: scopeTotals.all - scopeTotals.installed,\n icon: h(StatusIcon, { kind: 'uninstalled' }),\n active: tab === 'uninstalled',\n onSelect: () => setTab('uninstalled')\n }\n ],\n view,\n gridLabel: t('grid'),\n listLabel: t('list'),\n onViewChange: nextView => setView(nextView)\n })\n )\n ),\n h(\n 'main',\n { className: view === 'grid' ? css.grid : css.list },\n loading\n ? h('div', { className: css.empty }, t('loading'))\n : filtered.length === 0\n ? h('div', { className: css.empty }, tab === 'installed' ? t('installedEmpty') : t('empty'))\n : filtered.map(suite =>\n h(SuiteCard, {\n key: `${suite.sourceId}/${suite.suiteId}`,\n t,\n suite,\n busy: busy !== undefined,\n onOpen: () => setDetail({ sourceId: suite.sourceId, suiteId: suite.suiteId }),\n onInstall: () => {\n const source = overview.sources.find(entry => entry.id === suite.sourceId)\n setInstallConfirm({\n suite,\n ...(source?.lockCommit === undefined ? {} : { lockCommit: source.lockCommit }),\n ...(source?.local === true ? { localSource: true } : {})\n })\n },\n onAddSource: () => {\n if (suite.remoteUrl !== undefined) void action(`a:${suite.suiteId}`, 'sources/add', { url: suite.remoteUrl })\n },\n onToggle: () => {\n void action(`e:${suite.suiteId}`, 'set-enabled', { sourceId: suite.sourceId, suiteId: suite.suiteId, enabled: !suite.enabled })\n },\n onRefresh: () => {\n void action(`r:${suite.suiteId}`, 'sources/refresh', { id: suite.sourceId })\n },\n onUninstall: () => openUninstall(suite)\n })\n )\n ),\n toast === undefined ? null : h(Toast, { key: toast.key, text: toast.message, onDone: () => setToast(undefined) }),\n installConfirm === undefined\n ? null\n : h(InstallConfirmModal, {\n t,\n state: installConfirm,\n busy: busy !== undefined,\n onClose: () => setInstallConfirm(undefined),\n onConfirm: async () => {\n const ok = await action(`i:${installConfirm.suite.suiteId}`, 'install', {\n sourceId: installConfirm.suite.sourceId,\n suiteId: installConfirm.suite.suiteId\n })\n if (ok) setInstallConfirm(undefined)\n return ok\n }\n }),\n confirm === undefined\n ? null\n : h(Modal, {\n open: true,\n onClose: () => setConfirm(undefined),\n title:\n confirm.kind === 'uninstall'\n ? t('uninstallConfirmTitle')\n : interpolate(t('removeSourceConfirmTitle', { sourceId: confirm.sourceId }), { sourceId: confirm.sourceId }),\n closeLabel: t('cancel'),\n description: confirm.kind === 'uninstall' ? t('uninstallConfirmDesc') : t('removeSourceConfirmDesc'),\n footer: h(\n 'div',\n { className: css.modalFooter },\n h(Button, { variant: 'ghost', onClick: () => setConfirm(undefined) }, t('cancel')),\n h(\n Button,\n {\n variant: 'primary',\n onClick: () => {\n void confirmAction()\n }\n },\n t('confirmDelete')\n )\n )\n }),\n detail === undefined\n ? null\n : h(SuiteDetailModal, {\n t,\n credentials,\n sourceId: detail.sourceId,\n suiteId: detail.suiteId,\n onClose: () => setDetail(undefined)\n }),\n editor === undefined\n ? null\n : h(SourceEditorModal, {\n t,\n editor,\n busy: busy !== undefined,\n progress,\n onClose: () => setEditor(undefined),\n onSave: async ({ url, branch, kind, sha256 }) => {\n const key = editor.mode === 'edit' ? `s:edit:${editor.source.id}` : `s:add:${url}`\n const body: Record<string, unknown> = { url, local: kind === 'local', kind }\n if (branch !== '' && kind === 'git') body['branch'] = branch\n if (sha256 !== '' && kind === 'archive') body['sha256'] = sha256\n if (editor.mode === 'add') {\n setBusy(key)\n setProgress({ step: t('progressStarting'), error: undefined })\n const poll = startSourceProgressPolling(setProgress, step => progressStepLabel(t, step))\n try {\n const payload = await postAction('sources/add', body)\n const derived = (payload['source'] as { id?: string } | undefined)?.id\n invalidateOverview()\n await refresh()\n setEditor(undefined)\n if (derived !== undefined) setCategory(derived)\n return true\n } catch (error) {\n setToast({ key: Date.now(), message: `${t('actionFail')}: ${error instanceof Error ? error.message : String(error)}` })\n setProgress({ step: undefined, error: error instanceof Error ? error.message : String(error) })\n return false\n } finally {\n poll.stop()\n setBusy(undefined)\n }\n }\n const ok = await action(key, 'sources/update', { id: editor.source.id, ...body })\n if (ok) setEditor(undefined)\n return ok\n },\n onRemove: async id => {\n setConfirm({ kind: 'removeSource', sourceId: id })\n setEditor(undefined)\n }\n })\n )\n })\n}\n","/** Pure MCP status filtering and count derivation. */\nimport type { McpStatusEntry, McpStatusPayload } from '../../api.js'\n\n/** MCP status list filter. */\nexport type McpStatusFilter = 'all' | 'plugin' | 'direct'\n\n/** Derived MCP list data used by the status screen. */\nexport interface McpStatusViewModel {\n activeEntries: McpStatusEntry[]\n filtered: McpStatusEntry[]\n filterCounts: { all: number; plugin: number; direct: number }\n /** Counted over the active (non-disabled-hidden) rows for the current view. */\n visibleTotals: { all: number; connected: number; degraded: number; failed: number; needsCredentials: number; orphaned: number; disabled: number; foreign: number }\n}\n\ninterface SearchableEntry {\n entry: McpStatusEntry\n haystack: string\n}\n\nconst searchableCache = new WeakMap<McpStatusPayload, SearchableEntry[]>()\n\n/** Derive active rows, filter counts, and visible rows in one pass. */\nexport function deriveMcpStatusViewModel(payload: McpStatusPayload, filter: McpStatusFilter, search: string): McpStatusViewModel {\n const searchable = searchableFor(payload)\n const activeEntries = searchable.map(item => item.entry)\n const filterCounts = { all: 0, plugin: 0, direct: 0 }\n const visibleTotals = { all: 0, connected: 0, degraded: 0, failed: 0, needsCredentials: 0, orphaned: 0, disabled: 0, foreign: 0 }\n const filtered: McpStatusEntry[] = []\n const needle = search.trim().toLowerCase()\n\n for (const item of searchable) {\n const entry = item.entry\n filterCounts.all++\n filterCounts[entry.kind]++\n visibleTotals.all++\n if (entry.state === 'connected') visibleTotals.connected++\n if (entry.state === 'degraded') visibleTotals.degraded++\n if (entry.state === 'failed') visibleTotals.failed++\n if (entry.state === 'needs-credentials') visibleTotals.needsCredentials++\n if (entry.state === 'orphaned') visibleTotals.orphaned++\n if (entry.state === 'disabled') visibleTotals.disabled++\n if (entry.state === 'foreign') visibleTotals.foreign++\n if (filter !== 'all' && entry.kind !== filter) continue\n if (needle !== '' && !item.haystack.includes(needle)) continue\n filtered.push(entry)\n }\n\n return {\n activeEntries,\n filtered,\n filterCounts,\n visibleTotals\n }\n}\n\nfunction searchableFor(payload: McpStatusPayload): SearchableEntry[] {\n const cached = searchableCache.get(payload)\n if (cached !== undefined) return cached\n const searchable = payload.entries\n .filter(entry => entry.state !== 'disabled')\n .map(entry => ({\n entry,\n haystack: `${entry.name} ${entry.source ?? ''} ${entry.endpoint ?? ''} ${entry.transport} ${entry.reason ?? ''} ${(entry.credentialRefs ?? []).join(' ')}`.toLowerCase()\n }))\n searchableCache.set(payload, searchable)\n return searchable\n}\n",".surface {\n display: flex;\n min-width: 0;\n flex-direction: column;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n.header {\n display: flex;\n flex: none;\n align-items: center;\n gap: 8px;\n padding: 4px 0 8px;\n}\n.title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n}\n.subtitle {\n margin: 2px 0 0;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 13px;\n line-height: 20px;\n}\n.headerActions {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-left: auto;\n}\n.summary {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n color: var(--dsw-alias-label-secondary, #667085);\n font-size: 12px;\n white-space: nowrap;\n}\n.errorSummary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n}\n/* Summary bar: one chip per non-healthy state, plus the observation time. */\n.summaryBar {\n display: flex;\n flex: none;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n}\n.summaryChip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 999px;\n font-size: 12px;\n line-height: 18px;\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n}\n.chiporphaned, .chipfailed {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n}\n.chipneedsCredentials, .chipdegraded {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n.chipdisabled {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n background: var(--dsw-alias-bg-layer-1, #fff);\n}\n.summaryAllGood {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n color: var(--dsw-alias-state-success-primary, #16a34a);\n font-size: 12px;\n}\n.summaryCount {\n font-weight: 700;\n}\n.summaryLabel {\n color: inherit;\n}\n.observedAt {\n margin-left: auto;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 11px;\n white-space: nowrap;\n}\n.summaryDotGreen, .summaryDotRed {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n}\n.summaryDotGreen { background: var(--dsw-alias-state-success-primary, #16a34a); }\n.summaryDotRed { background: var(--dsw-alias-state-error-primary, #dc2626); }\n.summaryDotWarn { background: var(--dsw-alias-state-warn-primary, #b45309); }\n.summaryDotInfo { background: var(--dsw-alias-brand-primary, #4f6ef7); }\n.toolbar {\n flex: none;\n margin-bottom: 24px;\n}\n.grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n min-width: 0;\n gap: 12px;\n align-content: start;\n}\n.list {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 8px;\n}\n.list .card {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n column-gap: 14px;\n row-gap: 8px;\n}\n.list .cardTop {\n flex: 0 1 260px;\n}\n.list .endpoint {\n flex: 1 1 200px;\n max-height: 18px;\n}\n.card {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n color: inherit;\n background: var(--dsw-alias-bg-layer-1, #fff);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 12px;\n cursor: pointer;\n font: inherit;\n text-align: left;\n user-select: none;\n transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;\n}\n.card:hover {\n border-color: var(--dsw-alias-border-l3, #d9dde3);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n box-shadow: 0 1px 4px rgba(16, 24, 40, 0.06);\n}\n.cardBody {\n display: flex;\n min-width: 0;\n flex: 1;\n flex-direction: column;\n gap: 8px;\n padding: 12px 14px 10px;\n}\n\n.card:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 2px;\n}\n.cardTop {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 8px;\n}\n.statusDot {\n width: 7px;\n height: 7px;\n flex: none;\n border-radius: 50%;\n background: var(--dsw-alias-state-success-primary, #16a34a);\n}\n.statusconnected { background: var(--dsw-alias-state-success-primary, #16a34a); }\n.statusdegraded { background: var(--dsw-alias-state-warn-primary, #b45309); }\n.statusfailed { background: var(--dsw-alias-state-error-primary, #dc2626); }\n.statusneeds-credentials { background: var(--dsw-alias-state-warn-primary, #b45309); }\n.statusorphaned { background: var(--dsw-alias-state-error-primary, #dc2626); }\n.statusdisabled { background: var(--dsw-alias-label-tertiary, #98a2b3); }\n.service {\n flex: 1;\n min-width: 0;\n}\n.name {\n display: block;\n overflow: hidden;\n color: var(--dsw-alias-label-primary, #1f2328);\n text-overflow: ellipsis;\n white-space: nowrap;\n font: 600 13px/22px ui-monospace, Menlo, Consolas, monospace;\n}\n.endpoint {\n /* Two-line truncation without legacy -webkit-box line clamping: the\n nested-scroll compositor paints -webkit-box text outside its box when\n the surrounding page re-scrolls, so cap the block height instead. */\n max-height: 36px;\n overflow: hidden;\n margin: 0;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font: 12px/18px ui-monospace, Menlo, Consolas, monospace;\n overflow-wrap: anywhere;\n}\n.sourcePlugin, .sourceDirect, .transport, .toolCount {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n padding: 1px 6px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n border: 1px solid var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 4px;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 18px;\n}\n.sourcePlugin svg, .sourceDirect svg {\n width: 14px;\n height: 14px;\n flex: none;\n color: currentColor;\n stroke: currentColor;\n stroke-width: 1.35;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.transport {\n font-family: ui-monospace, Menlo, Consolas, monospace;\n}\n.toolCount {\n flex: none;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n}\n.reasonLabel {\n flex: none;\n font-weight: 600;\n opacity: 0.85;\n}\n/* State pill: the card's one-line verdict, color-coded by severity. */\n.statePill {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 1px 8px;\n border-radius: 999px;\n font-size: 11px;\n line-height: 17px;\n white-space: nowrap;\n font-weight: 600;\n}\n.statePill::before {\n width: 6px;\n height: 6px;\n content: '';\n background: currentColor;\n border-radius: 50%;\n}\n.stateconnected {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237));\n}\n.statedegraded, .stateneeds-credentials {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n.statefailed, .stateorphaned {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n}\n.statedisabled {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n}\n/* Card left accent follows the state so scanning the grid is instant. */\n.cardConnected { border-left: 3px solid var(--dsw-alias-state-success-primary, #16a34a); }\n.cardDegraded, .cardNeedsCredentials { border-left: 3px solid var(--dsw-alias-state-warn-primary, #b45309); }\n.cardFailed, .cardOrphaned { border-left: 3px solid var(--dsw-alias-state-error-primary, #dc2626); }\n.cardDisabled { border-left: 3px solid var(--dsw-alias-label-tertiary, #98a2b3); }\n.state, .detailState {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n color: var(--dsw-alias-state-success-primary, #16a34a);\n font-size: 11px;\n white-space: nowrap;\n}\n.state::before, .detailState::before {\n width: 6px;\n height: 6px;\n content: '';\n background: currentColor;\n border-radius: 50%;\n}\n.stateconnected, .detailStateconnected { color: var(--dsw-alias-state-success-primary, #16a34a); }\n.statedegraded, .detailStatedegraded { color: var(--dsw-alias-state-warn-primary, #b45309); }\n.statefailed, .detailStatefailed { color: var(--dsw-alias-state-error-primary, #dc2626); }\n.stateneeds-credentials, .detailStateneeds-credentials { color: var(--dsw-alias-state-warn-primary, #b45309); }\n.stateorphaned, .detailStateorphaned { color: var(--dsw-alias-state-error-primary, #dc2626); }\n.statedisabled, .detailStatedisabled { color: var(--dsw-alias-label-tertiary, #98a2b3); }\n.chevron { color: var(--dsw-alias-label-tertiary, #8b93a1); font-size: 18px; }\n.empty, .detailEmpty {\n padding: 24px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 12px;\n text-align: center;\n}\n.error {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 16px 0;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n font-size: 12px;\n}\n.boundary {\n margin: 10px 0 0;\n padding: 9px 10px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border-left: 2px solid var(--dsw-alias-border-l3, #d9dde3);\n font-size: 11px;\n line-height: 17px;\n}\n.detailDialog { width: min(720px, 94vw); }\n.detailBody { max-height: 72vh; overflow-y: auto; }\n.modalFooter { display: flex; justify-content: flex-end; width: 100%; }\n.detail { display: flex; flex-direction: column; gap: 16px; }\n.detailMeta { display: flex; flex-wrap: wrap; gap: 6px; }\n/* Modal hero: state + endpoint above the fold. */\n.detailHero {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 14px;\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n}\n.detailHeroText {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 5px;\n}\n.detailEndpoint {\n margin: 0;\n color: var(--dsw-alias-label-secondary, #667085);\n overflow-wrap: anywhere;\n font: 12px/18px ui-monospace, Menlo, Consolas, monospace;\n}\n.reason {\n padding: 9px 10px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n border-left: 2px solid currentColor;\n font-size: 11px;\n line-height: 16px;\n}\n.reasonBox {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px 12px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n border-radius: 8px;\n}\n.reasonText {\n margin: 0;\n overflow-wrap: anywhere;\n font-size: 12px;\n line-height: 18px;\n}\n.detailSection { display: flex; flex-direction: column; gap: 7px; }\n.detailHead {\n margin: 0;\n padding-bottom: 5px;\n color: var(--dsw-alias-label-secondary, #667085);\n border-bottom: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n font-size: 12px;\n font-weight: 600;\n}\n.config {\n max-height: 220px;\n overflow: auto;\n margin: 0;\n padding: 10px;\n color: var(--dsw-alias-label-primary, #344054);\n background: var(--dsw-alias-bg-layer-2, #f6f8fc);\n border: 1px solid var(--dsw-alias-border-l1, #e2e7ef);\n border-radius: 7px;\n white-space: pre-wrap;\n word-break: break-word;\n font: 11px/17px ui-monospace, Menlo, Consolas, monospace;\n}\n.toolList { display: flex; flex-direction: column; }\n/* Two columns: the name track sizes to its content (long MCP tool names are\n the identity, never clipped), the description takes the remainder. */\n.tool {\n display: grid;\n grid-template-columns: minmax(140px, max-content) minmax(0, 1fr);\n gap: 12px;\n align-items: center;\n padding: 7px 0;\n border-bottom: 1px solid var(--dsw-alias-border-l1, #eef1f5);\n}\n.tool:last-child { border-bottom: none; }\n.toolName { overflow: hidden; color: var(--dsw-alias-label-primary, #1f2328); text-overflow: ellipsis; white-space: nowrap; font: 11px/16px ui-monospace, Menlo, Consolas, monospace; }\n.toolDescription { overflow: hidden; color: var(--dsw-alias-label-tertiary, #8b93a1); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }\n@media (max-width: 760px) {\n .header, .toolbar { padding-left: 0; padding-right: 0; }\n .header { flex-direction: column; }\n .headerActions { width: 100%; margin-left: 0; justify-content: space-between; }\n .grid { grid-template-columns: minmax(0, 1fr); }\n .list .cardTop { max-width: 100%; }\n .tool { grid-template-columns: minmax(0, 1fr); }\n .toolDescription { display: none; }\n .summaryBar { gap: 6px; padding: 8px 10px; }\n .observedAt { flex-basis: 100%; margin-left: 0; }\n}\n\n/* ── LSP status states (reuse the MCP pill/accent palette) ──────────────── */\n.statemounted {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237));\n}\n.statehost-missing {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n.stateconflict {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n}\n.statusmounted {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n}\n.statushost-missing {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n}\n.statusconflict {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n}\n.cardMounted { border-left: 3px solid var(--dsw-alias-state-success-primary, #16a34a); }\n.cardHostMissing { border-left: 3px solid var(--dsw-alias-state-warn-primary, #b45309); }\n.cardConflict { border-left: 3px solid var(--dsw-alias-state-error-primary, #dc2626); }\n.chipmounted { background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237)); }\n.chipblocked { background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231)); }\n\n/* ── Panel polish: spacing between header/summary/toolbar, compact rows ─── */\n.summaryBar + .toolbar,\n.toolbar {\n margin-top: 12px;\n}\n.header + .summaryBar {\n margin-top: 12px;\n}\n\n/* Hide the entire summary bar when every row is healthy: the green\n \"all good\" confirmation repeated above a green-stamped list is noise. */\n@media (prefers-reduced-data: no-preference) {\n /* no-op block keeps the section marker above meaningful rules only */\n}\n\n/* Compact list mode: one-line rows (state · name · meta pill on the right). */\n.list .card {\n min-height: 0;\n padding: 2px 0;\n}\n.list .cardBody {\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 12px;\n padding: 8px 14px;\n}\n.list .cardTop {\n flex: 0 1 300px;\n min-width: 0;\n}\n.list .endpoint {\n flex: 1 1 240px;\n max-height: 22px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n/* LSP extension-map rows: no index column — extension gets room to breathe. */\n.extRow {\n display: grid;\n grid-template-columns: minmax(64px, auto) 20px minmax(0, 1fr);\n gap: 10px;\n align-items: center;\n padding: 7px 0;\n border-bottom: 1px solid var(--dsw-alias-border-l1, #eef1f5);\n}\n.extRow:last-child { border-bottom: none; }\n.extName { color: var(--dsw-alias-label-primary, #1f2328); font: 12px/18px ui-monospace, Menlo, Consolas, monospace; }\n.extArrow { color: var(--dsw-alias-label-tertiary, #8b93a1); }\n.extLanguage { overflow: hidden; color: var(--dsw-alias-label-tertiary, #8b93a1); text-overflow: ellipsis; white-space: nowrap; font: 12px/18px ui-monospace, Menlo, Consolas, monospace; }\n\n/* ── Detail-dialog retry control: spinner + in-place outcome echo ────── */\n.retryStack {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n margin-right: 4px;\n}\n.retrySpinner {\n display: inline-flex;\n font-size: 13px;\n line-height: 1;\n}\n.spinning {\n animation: mcp-retry-spin 0.9s linear infinite;\n}\n@keyframes mcp-retry-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n@media (prefers-reduced-motion: reduce) {\n .spinning { animation: none; }\n}\n.retryEchoSuccess,\n.retryEchoFailure {\n font-size: 12px;\n line-height: 18px;\n white-space: nowrap;\n}\n.retryEchoSuccess { color: var(--dsw-alias-state-success-primary, #16a34a); }\n.retryEchoFailure { color: var(--dsw-alias-state-error-primary, #dc2626); }\n.statusstarting {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n animation: lspStartingPulse 1.2s ease-in-out infinite;\n}\n@keyframes lspStartingPulse {\n 50% { opacity: 0.35; }\n}\n\n.statusforeign { background: var(--dsw-alias-brand-primary, #4f6ef7); }\n\n.cardForeign { border-left: 3px solid var(--dsw-alias-brand-primary, #4f6ef7); }\n\n.reasonRaw {\n margin: 6px 0 0;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 11px;\n line-height: 1.5;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n word-break: break-all;\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { createElement as h } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { Translate } from './index.js'\nimport { fetchMcpStatus, reauthorizeMcpServer, retryMcpMounts, type McpStatusEntry, type McpStatusPayload } from './api.js'\nimport type { CredentialApi } from './credentials.js'\nimport { McpCredentialEditor } from './McpCredentialEditor.js'\nimport { SearchFilterToolbar, type SearchFilterToolbarView } from './SearchFilterToolbar.js'\nimport { deriveMcpStatusViewModel, type McpStatusFilter } from './features/mcp-status/mcp-status-view-model.js'\nimport css from './mcp-status.module.css'\n\ninterface McpStatusPanelProps {\n t: Translate\n credentials?: CredentialApi\n}\n\ntype Filter = McpStatusFilter\ntype ViewMode = SearchFilterToolbarView\n\nconst EMPTY_STATUS: McpStatusPayload = {\n entries: [],\n observedAt: '',\n totals: { all: 0, connected: 0, degraded: 0, failed: 0, needsCredentials: 0, orphaned: 0, disabled: 0, foreign: 0 },\n directObservationOnly: true\n}\n\n/** DSH-native MCP inventory with a per-state overview and per-service detail. */\nexport function McpStatusPanel({ t, credentials }: McpStatusPanelProps): ReactNode {\n const [payload, setPayload] = useState<McpStatusPayload>(EMPTY_STATUS)\n const [loading, setLoading] = useState(true)\n const [error, setError] = useState<string | undefined>(undefined)\n const [filter, setFilter] = useState<Filter>('all')\n const [search, setSearch] = useState('')\n const [view, setView] = useState<ViewMode>('grid')\n const [selected, setSelected] = useState<McpStatusEntry | undefined>(undefined)\n\n const retry = (entryId: string): Promise<boolean> => {\n return retryMcpMounts()\n .then(async () => {\n // The POST only acknowledges that a reconcile ran; the mount's real\n // verdict arrives in the refreshed status, so the outcome echo reads\n // the state instead of trusting the request.\n const refreshed = await fetchMcpStatus().catch(() => undefined)\n if (refreshed !== undefined) setPayload(refreshed)\n return refreshed?.entries.some(entry => entry.id === entryId && entry.state === 'connected') === true\n })\n .catch(async caught => {\n setError(caught instanceof Error ? caught.message : String(caught))\n // Still re-read: the failure may be transport-level while the mount\n // actually settled; the echo follows the observed state.\n const refreshed = await fetchMcpStatus().catch(() => undefined)\n if (refreshed !== undefined) setPayload(refreshed)\n return refreshed?.entries.some(entry => entry.id === entryId && entry.state === 'connected') === true\n })\n .finally(() => setLoading(false))\n }\n const reauthorize = (serverName: string): Promise<void> => {\n return reauthorizeMcpServer(serverName)\n .then(() => retryMcpMounts())\n .then(async () => {\n await new Promise(resolve => setTimeout(resolve, 500))\n const refreshed = await fetchMcpStatus().catch(() => undefined)\n if (refreshed !== undefined) setPayload(refreshed)\n })\n }\n\n const refresh = (): void => {\n setLoading(true)\n setError(undefined)\n fetchMcpStatus()\n .then(setPayload)\n .catch(caught => {\n setError(caught instanceof Error ? caught.message : String(caught))\n })\n .finally(() => setLoading(false))\n }\n\n useEffect(() => {\n refresh()\n }, [])\n\n const viewModel = deriveMcpStatusViewModel(payload, filter, search)\n const { activeEntries, filtered, filterCounts, visibleTotals } = viewModel\n // Hide the summary bar entirely while every active row is connected: the\n // green confirmation above an all-green list is noise, not information.\n const allHealthy = activeEntries.length > 0 && visibleTotals.connected === activeEntries.length\n\n return h(\n 'div',\n { className: css.surface },\n h(\n 'header',\n { className: css.header },\n h(\n 'div',\n { className: css.headerText },\n h('h2', { className: css.title }, t('mcpStatusTitle')),\n h('p', { className: css.subtitle }, t('mcpStatusSubtitle'))\n ),\n h(\n 'div',\n { className: css.headerActions },\n h(Button, { variant: 'ghost', size: 'sm', onClick: refresh, disabled: loading, title: t('refresh') }, `↻ ${t('refresh')}`)\n )\n ),\n activeEntries.length === 0 || allHealthy || loading\n ? null\n : h(StatusSummaryBar, { t, totals: visibleTotals, observedAt: payload.observedAt }),\n h(SearchFilterToolbar, {\n className: css.toolbar,\n search,\n searchLabel: t('mcpSearch'),\n searchPlaceholder: t('mcpSearch'),\n onSearchChange: setSearch,\n filters: (['all', 'plugin', 'direct'] as Filter[]).map(kind => ({\n id: kind,\n label: filterLabel(t, kind),\n count: filterCounts[kind],\n icon: h(McpFilterIcon, { kind }),\n active: filter === kind,\n onSelect: () => setFilter(kind),\n hint: mcpFilterHint(t, kind)\n })),\n view,\n gridLabel: t('grid'),\n listLabel: t('list'),\n onViewChange: nextView => setView(nextView)\n }),\n error !== undefined\n ? h('div', { className: css.error }, error, h(Button, { variant: 'ghost', size: 'sm', onClick: refresh }, t('mcpRetry')))\n : loading && activeEntries.length === 0\n ? h('div', { className: css.empty }, t('loading'))\n : filtered.length === 0\n ? h('div', { className: css.empty }, t('mcpEmpty'))\n : h(\n 'div',\n { className: view === 'grid' ? css.grid : css.list },\n filtered.map(entry => h(McpCard, { key: entry.id, entry, t, onClick: () => setSelected(entry) }))\n ),\n selected === undefined ? null : h(McpDetailModal, { entry: selected, t, credentials, onClose: () => setSelected(undefined), onRetry: retry, onReauthorize: reauthorize })\n )\n}\n\n/**\n * One chip per non-healthy state, shown only when that state is non-zero.\n *\n * The chips are ordered by severity so the first one the eye lands on is the\n * state that most needs attention, and the whole bar collapses to a single\n * \"all connected\" confirmation when nothing is wrong.\n */\nfunction StatusSummaryBar({ t, totals, observedAt }: { t: Translate; totals: McpStatusPayload['totals']; observedAt: string }): ReactNode {\n const chips: Array<{ key: string; count: number; label: string }> = [\n { key: 'orphaned', count: totals.orphaned, label: t('mcpOrphaned') },\n { key: 'failed', count: totals.failed, label: t('mcpFailed') },\n { key: 'needsCredentials', count: totals.needsCredentials, label: t('mcpNeedsCredentials') },\n { key: 'degraded', count: totals.degraded, label: t('mcpDegraded') },\n { key: 'foreign', count: totals.foreign, label: t('mcpForeign') },\n { key: 'disabled', count: totals.disabled, label: t('mcpDisabled') }\n ].filter(chip => chip.count > 0)\n\n return h(\n 'div',\n { className: css.summaryBar },\n chips.length === 0\n ? h('span', { className: css.summaryAllGood }, h('span', { className: css.summaryDotGreen }), t('mcpAllConnected'))\n : chips.map(chip =>\n h(\n 'span',\n { key: chip.key, className: `${css.summaryChip} ${css[`chip${chip.key}`]}`, title: `${chip.count} ${chip.label}` },\n h('span', { className: css[`summaryDot${dotTone(chip.key)}`] }),\n h('span', { className: css.summaryCount }, chip.count),\n h('span', { className: css.summaryLabel }, chip.label)\n )\n ),\n h('span', { className: css.observedAt }, observedAt === '' ? '' : formatObservedAt(observedAt))\n )\n}\n\nfunction dotTone(key: string): string {\n if (key === 'foreign') return 'Info'\n if (key === 'degraded' || key === 'needsCredentials') return 'Warn'\n return 'Red'\n}\n\nfunction formatObservedAt(iso: string): string {\n const date = new Date(iso)\n if (Number.isNaN(date.getTime())) return ''\n return date.toLocaleTimeString()\n}\n\nfunction McpCard({ entry, t, onClick }: { entry: McpStatusEntry; t: Translate; onClick: () => void }): ReactNode {\n const interactive = { role: 'button' as const, tabIndex: 0, onClick, onKeyDown: (event: { key: string; preventDefault: () => void }) => {\n // Enter and Space activate a role=\"button\" the same way a native one does.\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n onClick()\n } }\n return h(\n 'div',\n { className: `${css.card} ${css[`card${stateClass(entry.state)}`]}`, ...interactive },\n h(\n 'div',\n { className: css.cardBody },\n h(\n 'div',\n { className: css.cardTop },\n h('span', { className: `${css.statusDot} ${css[`status${entry.state}`]}`, 'aria-hidden': true }),\n h('span', { className: css.service }, h('span', { className: css.name }, entry.name)),\n h('span', { className: css.toolCount }, entry.tools.length === 1 ? `${entry.tools.length} ${t('mcpTool')}` : `${entry.tools.length} ${t('mcpTools')}`)\n ),\n h('p', { className: css.endpoint }, entry.endpoint ?? t('mcpObservedEndpoint'))\n // Reason text, the state pill, and every action (retry, configure,\n // details) live in the detail dialog: the card keeps only the identity\n // line and the endpoint, so a wall of red cards stays scannable.\n )\n )\n}\n\nfunction stateClass(state: string): string {\n return state\n .split('-')\n .map((part, index) => (index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)))\n .join('')\n .replace(/^./, char => char.toUpperCase())\n}\n\nfunction McpSourceIcon({ kind }: { kind: 'plugin' | 'direct' }): ReactNode {\n const common = { width: 14, height: 14, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n return kind === 'plugin'\n ? h(\n 'svg',\n common,\n h('path', {\n d: 'M6 2.5v2H4A1.5 1.5 0 0 0 2.5 6v2h2a1.5 1.5 0 1 1 0 3h-2v2A1.5 1.5 0 0 0 4 14.5h2v-2a1.5 1.5 0 1 1 3 0v2h2a1.5 1.5 0 0 0 1.5-1.5v-2h-2a1.5 1.5 0 1 1 0-3h2V6A1.5 1.5 0 0 0 11 4.5H9v-2a1.5 1.5 0 1 0-3 0Z'\n })\n )\n : h('svg', common, h('circle', { cx: 8, cy: 5, r: 2.2 }), h('path', { d: 'M3.5 13c.6-2.2 2.1-3.3 4.5-3.3s3.9 1.1 4.5 3.3' }))\n}\n\nfunction McpFilterIcon({ kind }: { kind: Filter }): ReactNode {\n if (kind === 'plugin') return h(McpSourceIcon, { kind: 'plugin' })\n if (kind === 'direct') return h(McpSourceIcon, { kind: 'direct' })\n return h(\n 'svg',\n { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true },\n h('path', { d: 'M2.5 5 8 2.5 13.5 5 8 7.5 2.5 5Zm0 3L8 10.5 13.5 8M2.5 11 8 13.5 13.5 11' })\n )\n}\n\n/**\n * The detail dialog owns every action and every long text: state, reason,\n * credentials, config, tools, and the retry control with its in-place result\n * echo. The state pill is dropped entirely — the dot and the reason box carry\n * that information without a second red stamp.\n */\nfunction McpDetailModal({ entry, t, credentials, onClose, onRetry, onReauthorize }: {\n entry: McpStatusEntry\n t: Translate\n credentials?: CredentialApi\n onClose: () => void\n onRetry: (entryId: string) => Promise<boolean>\n onReauthorize: (serverName: string) => Promise<void>\n}): ReactNode {\n const [retrying, setRetrying] = useState(false)\n const [retryOutcome, setRetryOutcome] = useState<'success' | 'failure' | undefined>(undefined)\n const [reauthorizing, setReauthorizing] = useState(false)\n const [reauthOutcome, setReauthOutcome] = useState<'success' | 'failure' | undefined>(undefined)\n const retry = (): void => {\n setRetrying(true)\n setRetryOutcome(undefined)\n onRetry(entry.id)\n .then(success => setRetryOutcome(success ? 'success' : 'failure'))\n .catch(() => setRetryOutcome('failure'))\n .finally(() => setRetrying(false))\n }\n const reauthorize = (): void => {\n setReauthorizing(true)\n setReauthOutcome(undefined)\n onReauthorize(entry.name)\n .then(() => setReauthOutcome('success'))\n .catch(() => setReauthOutcome('failure'))\n .finally(() => setReauthorizing(false))\n }\n return h(Modal, {\n open: true,\n onClose,\n title: entry.name,\n description: t('mcpServiceDetail'),\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h(\n 'div',\n { className: css.modalFooter },\n entry.kind === 'direct' || entry.state === 'connected' || entry.state === 'disabled' || entry.state === 'foreign'\n ? null\n : h(\n 'span',\n { className: css.retryStack },\n retryOutcome === 'success'\n ? h('span', { className: css.retryEchoSuccess, role: 'status' }, `✓ ${t('mcpRetrySuccess')}`)\n : retryOutcome === 'failure'\n ? h('span', { className: css.retryEchoFailure, role: 'alert' }, `✕ ${t('mcpRetryFailure')}`)\n : null,\n h(\n Button,\n { variant: 'ghost', size: 'sm', disabled: retrying, onClick: retry },\n h('span', { className: retrying ? `${css.retrySpinner} ${css.spinning}` : css.retrySpinner, 'aria-hidden': true }, '↻'),\n retrying ? t('mcpRetrying') : t('mcpRetry')\n )\n ),\n entry.kind === 'plugin'\n ? h(\n 'span',\n { className: css.retryStack },\n reauthOutcome === 'success'\n ? h('span', { className: css.retryEchoSuccess, role: 'status' }, `✓ ${t('mcpReauthSuccess')}`)\n : reauthOutcome === 'failure'\n ? h('span', { className: css.retryEchoFailure, role: 'alert' }, `✕ ${t('mcpReauthFailure')}`)\n : null,\n h(\n Button,\n { variant: 'ghost', size: 'sm', disabled: reauthorizing, title: entry.state === 'failed' ? t('mcpConnectHint') : t('mcpReauthHint'), onClick: reauthorize },\n reauthorizing ? t('mcpReauthorizing') : entry.state === 'failed' ? t('mcpConnect') : t('mcpReauthorize')\n )\n )\n : null,\n h(Button, { variant: 'ghost', onClick: onClose }, t('cancel'))\n ),\n children: h(\n 'div',\n { className: css.detail },\n h(\n 'div',\n { className: css.detailHero },\n h('span', { className: `${css.statusDot} ${css[`status${entry.state}`]}`, 'aria-hidden': true }),\n h(\n 'div',\n { className: css.detailHeroText },\n entry.endpoint === undefined ? null : h('p', { className: css.detailEndpoint }, entry.endpoint),\n // Source and transport moved here from the card meta row.\n h('p', { className: css.detailEndpoint }, [\n entry.kind === 'plugin' ? `${t('mcpPlugin')}: ${entry.source ?? '—'}` : t('mcpDirect'),\n entry.transport\n ].join(' · '))\n )\n ),\n // A foreign mount is informational: the localized hint replaces the raw\n // English reason, which drops to a dim secondary line for its tool names.\n entry.state === 'foreign'\n ? h(\n 'div',\n { className: css.reasonBox },\n h('span', { className: css.reasonLabel }, t('mcpReasonLabel')),\n h('p', { className: css.reasonText }, t('mcpForeignHint')),\n entry.reason === undefined ? null : h('p', { className: css.reasonRaw }, entry.reason)\n )\n : entry.reason === undefined\n ? null\n : h(\n 'div',\n { className: css.reasonBox },\n h('span', { className: css.reasonLabel }, t('mcpReasonLabel')),\n h('p', { className: css.reasonText }, entry.reason)\n ),\n entry.kind === 'direct' ? h('div', { className: css.reasonBox }, h('p', { className: css.reasonText }, t('mcpDirectBoundary'))) : null,\n entry.credentialRefs?.length === 0 || entry.credentialRefs === undefined ? null : h(McpCredentialEditor, { t, api: credentials, refs: entry.credentialRefs }),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, t('mcpConfig')),\n entry.config === undefined\n ? h('div', { className: css.detailEmpty }, t('mcpDirectConfigUnavailable'))\n : h('pre', { className: css.config }, JSON.stringify(entry.config, null, 2))\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('mcpTools')} (${entry.tools.length})`),\n entry.tools.length === 0\n ? h('div', { className: css.detailEmpty }, entry.advertisedTools === false && entry.state === 'degraded' ? t('mcpZeroTools') : t('mcpNoTools'))\n : h(\n 'div',\n { className: css.toolList },\n entry.tools.map(tool =>\n h(\n 'div',\n { key: tool.name, className: css.tool },\n h('span', { className: css.toolName }, tool.name),\n tool.description === undefined || tool.description === '' ? null : h('span', { className: css.toolDescription }, tool.description)\n )\n )\n )\n )\n )\n })\n}\n\nfunction filterLabel(t: Translate, kind: Filter): string {\n if (kind === 'plugin') return t('mcpPlugin')\n if (kind === 'direct') return t('mcpDirect')\n return t('mcpAll')\n}\n\n/** Hover/aria explanation for each MCP filter tab. */\nfunction mcpFilterHint(t: Translate, kind: Filter): string {\n if (kind === 'plugin') return t('mcpFilterPluginHint')\n if (kind === 'direct') return t('mcpFilterDirectHint')\n return t('mcpFilterAllHint')\n}\n\n","/**\n * LSP status panel: declared language servers of enabled suites with their\n * mount state. Rows come from the declaration-and-diagnostic model — the DSH\n * `ctx.lsp` seam has no provider snapshot, so \"mounted\" means the mount\n * registration succeeded, not that a process probe ran.\n *\n * Visual language mirrors McpStatusPanel: the same shared SearchFilterToolbar,\n * the same summary chips, cards, and state pills from mcp-status.module.css.\n * Cards stay lean (state dot + name + command + one state pill); the source\n * suite and the full extension map live in the detail dialog.\n */\nimport { useEffect, useState, type ReactNode } from 'react'\nimport { createElement as h } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { Translate } from './index.js'\nimport { fetchLspServers, fetchLspStatus, saveLspServers, type LspStatusEntry, type LspStatusPayload, type LspStatusState } from './api.js'\nimport { SearchFilterToolbar, type SearchFilterToolbarView } from './SearchFilterToolbar.js'\nimport css from './mcp-status.module.css'\n\ninterface LspStatusPanelProps {\n t: Translate\n}\n\nconst EMPTY_STATUS: LspStatusPayload = {\n entries: [],\n observedAt: '',\n totals: { all: 0, mounted: 0, failed: 0, blocked: 0, disabled: 0 },\n hostMissing: true\n}\n\ntype Filter = 'all' | 'plugin' | 'direct' | 'blocked'\n\nconst FILTER_KEYS: Filter[] = ['all', 'plugin', 'direct', 'blocked']\n\nconst FILTER_LABEL_KEYS: Record<Filter, 'lspAll' | 'lspPlugin' | 'lspDirect' | 'lspBlocked'> = {\n all: 'lspAll',\n plugin: 'lspPlugin',\n direct: 'lspDirect',\n blocked: 'lspBlocked'\n}\n\n/** Tooltip text per filter: the counts alone do not explain the grouping. */\nconst FILTER_HINT_KEYS: Partial<Record<Filter, 'lspFilterAllHint' | 'lspFilterPluginHint' | 'lspFilterDirectHint' | 'lspFilterBlockedHint'>> = {\n all: 'lspFilterAllHint',\n plugin: 'lspFilterPluginHint',\n direct: 'lspFilterDirectHint',\n blocked: 'lspFilterBlockedHint'\n}\nfunction matches(entry: LspStatusEntry, filter: Filter): boolean {\n if (filter === 'all') return true\n if (filter === 'plugin' || filter === 'direct') return entry.kind === filter\n return entry.state === 'host-missing' || entry.state === 'conflict' || entry.state === 'failed'\n}\n\nfunction severity(entry: LspStatusEntry): number {\n if (entry.state === 'failed') return 0\n if (entry.state === 'conflict') return 1\n if (entry.state === 'host-missing') return 2\n if (entry.state === 'starting') return 3\n if (entry.state === 'disabled') return 4\n return 5\n}\n\n/** Language-server inventory with per-state overview and per-server detail. */\nexport function LspStatusPanel({ t }: LspStatusPanelProps): ReactNode {\n const [payload, setPayload] = useState<LspStatusPayload>(EMPTY_STATUS)\n const [loading, setLoading] = useState(true)\n const [error, setError] = useState<string | undefined>(undefined)\n const [filter, setFilter] = useState<Filter>('all')\n const [search, setSearch] = useState('')\n const [view, setView] = useState<SearchFilterToolbarView>('grid')\n const [selected, setSelected] = useState<LspStatusEntry | undefined>(undefined)\n const [editorOpen, setEditorOpen] = useState(false)\n\n const refresh = (): void => {\n setLoading(true)\n setError(undefined)\n fetchLspStatus()\n .then(setPayload)\n .catch(caught => {\n setError(caught instanceof Error ? caught.message : String(caught))\n })\n .finally(() => setLoading(false))\n }\n\n useEffect(() => {\n refresh()\n }, [])\n\n // Startup follows a race: the reconciler mounts LSP servers in the host\n // process after discovery, so an early read can observe `starting` rows.\n // Poll quietly until every row settles (or the window closes) instead of\n // freezing a stale verdict on screen.\n const anyStarting = payload.entries.some(entry => entry.state === 'starting')\n useEffect(() => {\n if (!anyStarting) return\n let cancelled = false\n let attempts = 0\n const timer = setInterval(() => {\n attempts += 1\n if (cancelled || attempts > 20) {\n clearInterval(timer)\n return\n }\n fetchLspStatus()\n .then(value => {\n if (!cancelled) setPayload(value)\n })\n .catch(() => {})\n }, 1_000)\n return () => {\n cancelled = true\n clearInterval(timer)\n }\n }, [anyStarting])\n\n const needle = search.trim().toLowerCase()\n const counts = FILTER_KEYS.reduce<Record<string, number>>((acc, key) => {\n acc[key] = payload.entries.filter(entry => matches(entry, key)).length\n return acc\n }, {})\n const visible = payload.entries\n .filter(entry => matches(entry, filter))\n .filter(entry => needle === '' || `${entry.serverKey} ${entry.suiteName} ${entry.command}`.toLowerCase().includes(needle))\n const settled = payload.entries.filter(entry => entry.state !== 'starting')\n const allHealthy = settled.length > 0 && settled.every(entry => entry.state === 'mounted')\n\n return h(\n 'div',\n { className: css.surface },\n h(\n 'header',\n { className: css.header },\n h(\n 'div',\n { className: css.headerText },\n h('h2', { className: css.title }, t('lspStatusTitle')),\n h('p', { className: css.subtitle }, t('lspStatusSubtitle'))\n ),\n h(\n 'div',\n { className: css.headerActions },\n h(Button, { variant: 'ghost', size: 'sm', onClick: () => setEditorOpen(true), disabled: loading, title: t('lspConfigure') }, t('lspConfigure')),\n h(Button, { variant: 'ghost', size: 'sm', onClick: refresh, disabled: loading, title: t('refresh') }, `↻ ${t('refresh')}`)\n )\n ),\n // The summary bar appears only when attention is needed; a healthy panel\n // is silent (the green card accents already say \"mounted\").\n allHealthy || payload.entries.length === 0 || loading\n ? null\n : h(\n 'div',\n { className: css.summaryBar },\n payload.hostMissing\n ? h('span', { className: `${css.summaryChip} ${css.chipblocked}`, title: t('lspHostMissing') }, t('lspHostMissingShort'))\n : ([\n { key: 'failed', count: payload.totals.failed, label: t('lspFailed') },\n { key: 'blocked', count: payload.totals.blocked, label: t('lspBlocked') },\n { key: 'disabled', count: payload.totals.disabled, label: t('lspDisabled') }\n ] as Array<{ key: string; count: number; label: string }>)\n .filter(chip => chip.count > 0)\n .map(chip =>\n h(\n 'span',\n { key: chip.key, className: `${css.summaryChip} ${css[`chip${chip.key}`]}`, title: `${chip.count} ${chip.label}` },\n h('span', { className: css.summaryCount }, chip.count),\n h('span', { className: css.summaryLabel }, chip.label)\n )\n ),\n h('span', { className: css.observedAt }, formatObservedAt(payload.observedAt))\n ),\n h(SearchFilterToolbar, {\n className: css.toolbar,\n search,\n searchLabel: t('lspSearch'),\n searchPlaceholder: t('lspSearch'),\n onSearchChange: setSearch,\n filters: FILTER_KEYS.map(key => ({\n id: key,\n label: t(FILTER_LABEL_KEYS[key]),\n count: counts[key] ?? 0,\n icon: h(LspFilterIcon, { k: key }),\n active: filter === key,\n onSelect: () => setFilter(key),\n hint: FILTER_HINT_KEYS[key] === undefined ? undefined : t(FILTER_HINT_KEYS[key]!)\n })),\n view,\n gridLabel: t('grid'),\n listLabel: t('list'),\n onViewChange: nextView => setView(nextView)\n }),\n error !== undefined\n ? h('div', { className: css.error }, error, h(Button, { variant: 'ghost', size: 'sm', onClick: refresh }, t('mcpRetry')))\n : loading && payload.entries.length === 0\n ? h('div', { className: css.empty }, t('loading'))\n : visible.length === 0\n ? h('div', { className: css.empty }, t('lspEmpty'))\n : h(\n 'div',\n { className: view === 'grid' ? css.grid : css.list },\n [...visible].sort((left, right) => severity(left) - severity(right)).map(entry => h(LspRow, { key: entry.id, entry, t, onOpen: () => setSelected(entry) }))\n ),\n selected === undefined ? null : h(LspDetailModal, { entry: selected, t, onClose: () => setSelected(undefined) }),\n editorOpen\n ? h(LspConfigEditor, {\n t,\n onClose: () => setEditorOpen(false),\n onSaved: () => {\n setEditorOpen(false)\n refresh()\n }\n })\n : null\n )\n}\n\n/**\n * Direct LSP configuration editor: one JSON document shaped like Claude\n * Code's `lspServers` table. The host validates with the same fail-closed\n * rules as suite declarations and mounts direct servers on the next\n * reconcile pass.\n */\nfunction LspConfigEditor({ t, onClose, onSaved }: { t: Translate; onClose: () => void; onSaved: () => void }): ReactNode {\n const [text, setText] = useState<string | undefined>(undefined)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string | undefined>(undefined)\n\n useEffect(() => {\n let cancelled = false\n fetchLspServers()\n .then(servers => {\n if (cancelled) return\n setText(JSON.stringify({ lspServers: servers }, null, 2))\n })\n .catch(reason => {\n if (cancelled) setError(reason instanceof Error ? reason.message : String(reason))\n })\n return () => {\n cancelled = true\n }\n }, [])\n\n const save = async (): Promise<void> => {\n setBusy(true)\n setError(undefined)\n try {\n const parsed: unknown = JSON.parse(text ?? '')\n await saveLspServers(parsed)\n onSaved()\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setBusy(false)\n }\n }\n\n return h(Modal, {\n open: true,\n onClose,\n title: t('lspConfigure'),\n description: t('lspConfigureHint'),\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h(Button, { variant: 'ghost', onClick: onClose }, t('cancel')),\n h(Button, { variant: 'primary', disabled: busy || text === undefined, onClick: () => { void save() } }, t('lspSave'))\n ),\n children: h(\n 'div',\n { className: css.detail },\n error === undefined ? null : h('div', { className: css.error }, error),\n text === undefined\n ? h('div', { className: css.empty }, t('loading'))\n : h('textarea', {\n className: css.config,\n rows: 16,\n spellcheck: false,\n value: text,\n onChange: (event: { target: { value: string } }) => setText(event.target.value)\n })\n )\n })\n}\n\n/** Lean row: state dot, server key, command. The card accent + status dot\n * carry the state; no redundant pill for the healthy case. Kind badge shows\n * where the declaration comes from (suite vs user configuration). */\nfunction LspRow({ entry, t, onOpen }: { entry: LspStatusEntry; t: Translate; onOpen: () => void }): ReactNode {\n const interactive = {\n role: 'button' as const,\n tabIndex: 0,\n onClick: onOpen,\n onKeyDown: (event: { key: string; preventDefault: () => void }) => {\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n onOpen()\n }\n }\n const showPill = entry.state !== 'mounted'\n return h(\n 'div',\n { className: `${css.card} ${css[`card${accentClass(entry.state)}`]}`, ...interactive },\n h(\n 'div',\n { className: css.cardBody },\n h(\n 'div',\n { className: css.cardTop },\n h('span', { className: `${css.statusDot} ${css[`status${dotClass(entry.state)}`]}`, 'aria-hidden': true }),\n h('span', { className: css.service }, h('span', { className: css.name }, entry.serverKey)),\n entry.kind === 'plugin'\n ? h('span', { className: css.sourcePlugin }, entry.suiteName)\n : h('span', { className: css.sourceDirect }, t('lspDirect')),\n showPill ? h('span', { className: `${css.statePill} ${css[`state${pillClass(entry.state)}`]}` }, stateLabel(t, entry.state)) : null\n ),\n h('p', { className: css.endpoint }, [entry.command, ...entry.args].join(' '))\n )\n )\n}\n\nfunction LspDetailModal({ entry, t, onClose }: { entry: LspStatusEntry; t: Translate; onClose: () => void }): ReactNode {\n const extensions = Object.entries(entry.extensions)\n return h(Modal, {\n open: true,\n onClose,\n title: entry.serverKey,\n description: t('lspDetailSubtitle'),\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h('div', { className: css.modalFooter }, h(Button, { variant: 'ghost', onClick: onClose }, t('cancel'))),\n children: h(\n 'div',\n { className: css.detail },\n h(\n 'div',\n { className: css.detailHero },\n h('span', { className: `${css.statusDot} ${css[`status${dotClass(entry.state)}`]}`, 'aria-hidden': true }),\n h(\n 'div',\n { className: css.detailHeroText },\n // The status dot carries the healthy verdict; only non-healthy\n // states get an explicit pill.\n entry.state === 'mounted' ? null : h('span', { className: `${css.statePill} ${css[`state${pillClass(entry.state)}`]}` }, stateLabel(t, entry.state)),\n h('p', { className: css.detailEndpoint }, `${entry.suiteName} · ${entry.sourceId}`)\n )\n ),\n entry.reason === undefined\n ? null\n : h(\n 'div',\n { className: css.reasonBox },\n h('span', { className: css.reasonLabel }, t('lspReasonLabel')),\n h('p', { className: css.reasonText }, entry.reason)\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, t('lspDetailCommand')),\n h('pre', { className: css.config }, [entry.command, ...entry.args].join(' '))\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('lspDetailExtensions')} (${extensions.length})`),\n h(\n 'div',\n { className: css.toolList },\n extensions.map(([ext, languageId]) =>\n h(\n 'div',\n { key: ext, className: css.extRow },\n h('span', { className: css.extName }, ext),\n h('span', { className: css.extArrow, 'aria-hidden': true }, '→'),\n h('span', { className: css.extLanguage }, languageId)\n )\n )\n )\n )\n )\n })\n}\n\n/** Filter icons mirroring McpFilterIcon's language: shared glyph shapes for\n * all/plugin/direct so the two panels read as one system, plus a warning\n * triangle for the blocked state. */\nfunction LspFilterIcon({ k }: { k: string }): ReactNode {\n const common = { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n if (k === 'plugin') {\n return h('svg', common, h('path', { d: 'M6 2.5v2H4A1.5 1.5 0 0 0 2.5 6v2h2a1.5 1.5 0 1 1 0 3h-2v2A1.5 1.5 0 0 0 4 14.5h2v-2a1.5 1.5 0 1 1 3 0v2h2a1.5 1.5 0 0 0 1.5-1.5v-2h-2a1.5 1.5 0 1 1 0-3h2V6A1.5 1.5 0 0 0 11 4.5H9v-2a1.5 1.5 0 1 0-3 0Z' }))\n }\n if (k === 'direct') {\n return h('svg', common, h('circle', { cx: 8, cy: 5, r: 2.2 }), h('path', { d: 'M3.5 13c.6-2.2 2.1-3.3 4.5-3.3s3.9 1.1 4.5 3.3' }))\n }\n if (k === 'blocked') {\n return h('svg', common, h('path', { d: 'M8 2.5 14 13H2L8 2.5Z', stroke: 'currentColor', strokeLinejoin: 'round' }), h('path', { d: 'M8 6.5v3M8 11.2v.3', stroke: 'currentColor', strokeLinecap: 'round' }))\n }\n return h('svg', common, h('path', { d: 'M2.5 5 8 2.5 13.5 5 8 7.5 2.5 5Zm0 3L8 10.5 13.5 8M2.5 11 8 13.5 13.5 11' }))\n}\n\n/** The card-accent CSS suffix; host-missing uses the warn palette. */\nfunction accentClass(state: LspStatusState): string {\n if (state === 'mounted') return 'Mounted'\n if (state === 'host-missing') return 'HostMissing'\n if (state === 'conflict') return 'Conflict'\n if (state === 'failed') return 'Failed'\n return 'Disabled'\n}\n\n/** The status-dot CSS suffix (lowercase state names in the stylesheet). */\nfunction dotClass(state: LspStatusState): string {\n return state === 'host-missing' ? 'host-missing' : state\n}\n\n/** The state-pill CSS suffix; conflict borrows the failed palette and\n * starting borrows the warn palette. */\nfunction pillClass(state: LspStatusState): string {\n if (state === 'conflict') return 'failed'\n if (state === 'starting') return 'host-missing'\n return state\n}\n\nfunction stateLabel(t: Translate, state: LspStatusState): string {\n if (state === 'mounted') return t('lspMounted')\n if (state === 'starting') return t('lspStarting')\n if (state === 'host-missing') return t('lspHostMissingShort')\n if (state === 'failed') return t('lspFailed')\n if (state === 'conflict') return t('lspConflict')\n return t('lspDisabled')\n}\n\nfunction formatObservedAt(iso: string): string {\n const date = new Date(iso)\n if (Number.isNaN(date.getTime())) return ''\n return date.toLocaleTimeString()\n}\n","/**\n * The Agent Plugins Market card on the host's 插件配置 (plugin configuration)\n * tab: the market feature's configuration entry, named after the market\n * itself. Disclosed inside is the MCP enhancement switch — ON (default)\n * mounts suite MCP servers through the market's built-in bridge (OAuth\n * authorization, SSE, browser-leg hold); OFF falls back to the host's\n * `dsh-mcp-client` compatibility client.\n *\n * The switch state is the market's host settings namespace (bound by the\n * client entry), so a flip persists through the host settings document and\n * the node half's namespace watcher remounts the servers. The host client\n * version probe rides the market's own API.\n */\nimport { createElement as h, useCallback, useEffect, useState, type ReactNode } from 'react'\nimport * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { McpBackendInfo } from './api.js'\nimport { ToggleSwitch } from './ui/ToggleSwitch.js'\nimport css from './market.module.css'\n\n/** Locale subset the card needs (structural — the host binds the real one). */\ntype CardTranslate = (key: string, params?: Record<string, unknown>) => string\n\n/** The host's disclosure chevron, matching the native cards' glyph exactly. */\nconst chevronIcon = (primitives as unknown as Record<string, unknown>)['IconChevronDownOutline14'] as\n | ((props: { size?: number }) => ReactNode)\n | undefined\n\n/** The bound settings-namespace face the client entry hands the card. */\nexport interface McpEnhanceScopeFace {\n /** Whether the enhancement is on; defaults to true before the first answer. */\n enhanced(): boolean\n /** Whether the host settings document accepts writes. */\n writable(): boolean\n subscribe(listener: () => void): () => void\n setEnhanced(next: boolean): Promise<void>\n /** The persisted download region; `auto` follows the interface language. */\n region(): 'auto' | 'global' | 'china'\n setRegion(next: 'global' | 'china'): Promise<void>\n}\n\nexport interface McpPluginCardProps {\n t: CardTranslate\n scope: McpEnhanceScopeFace\n /** Live host-client probe (availability + version) from the market API. */\n probe: () => Promise<McpBackendInfo>\n}\n\nexport function McpPluginCard({ t, scope, probe }: McpPluginCardProps): ReactNode {\n const [open, setOpen] = useState(false)\n const [, setTick] = useState(0)\n const [probeInfo, setProbeInfo] = useState<McpBackendInfo | undefined>(undefined)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string | undefined>(undefined)\n\n useEffect(() => scope.subscribe(() => setTick(tick => tick + 1)), [scope])\n\n const refreshProbe = useCallback(async () => {\n try {\n setProbeInfo(await probe())\n } catch {\n // The version line degrades silently; the switch still works.\n }\n }, [probe])\n\n useEffect(() => { void refreshProbe() }, [refreshProbe])\n\n const enhanced = scope.enhanced()\n const writable = scope.writable()\n const regionSetting = scope.region()\n // The highlighted segment is the route clones actually take: the explicit\n // choice, or the language-resolved one while the setting is still auto.\n const effectiveRegion = probeInfo?.downloadRegion.effective ?? (regionSetting === 'china' ? 'china' : 'global')\n // Compat mode requires the host client to resolve; the enhanced (built-in)\n // client is always available because it ships inside this plugin.\n const hostUsable = probeInfo?.hostClient.available === true\n\n const onToggle = (): void => {\n if (busy || !writable) return\n const next = !enhanced\n if (!next && !hostUsable) {\n setError(t('mcpBackendHostMissing'))\n return\n }\n setBusy(true)\n setError(undefined)\n void scope.setEnhanced(next).then(() => {\n setBusy(false)\n }).catch((cause: unknown) => {\n setError(cause instanceof Error ? cause.message : String(cause))\n setBusy(false)\n })\n }\n\n return h(\n 'div',\n {\n className: open ? `${css.pluginCard} ${css.pluginCardOpen}` : css.pluginCard,\n 'data-busy': busy ? 'true' : undefined\n },\n h(\n 'button',\n {\n type: 'button',\n className: css.pluginCardHeader,\n 'aria-expanded': open,\n onClick: () => { setOpen(current => !current) },\n }, h(\n 'div',\n { className: css.pluginCardText },\n h('div', { className: css.pluginCardTitle }, t('nav')),\n h('div', { className: css.pluginCardDesc }, t('marketCardDesc'))\n ),\n h(\n 'span',\n { className: open ? `${css.pluginChevron} ${css.pluginChevronOpen}` : css.pluginChevron },\n chevronIcon !== undefined ? h(chevronIcon, { size: 14 }) : '▾'\n )\n ),\n open\n ? h(\n 'div',\n { className: css.pluginCardBody },\n h(\n 'div',\n { className: css.pluginCardRow },\n h(\n 'div',\n { className: css.pluginCardText },\n h('div', { className: css.pluginCardRowLabel }, t('mcpCardTitle')),\n h('div', { className: css.pluginCardDesc }, enhanced ? t('mcpCardDescOn') : t('mcpCardDescOff'))\n ),\n h(ToggleSwitch, {\n on: enhanced,\n disabled: busy || !writable,\n title: writable ? undefined : t('mcpCardReadonly'),\n onChange: onToggle\n })\n ),\n error !== undefined\n ? h('div', { className: css.pluginCardError }, error)\n : null,\n h(\n 'div',\n { className: css.pluginCardRow },\n h(\n 'div',\n { className: css.pluginCardText },\n h('div', { className: css.pluginCardRowLabel }, t('regionLabel')),\n h('div', { className: css.pluginCardDesc }, t('regionHint'))\n ),\n h(\n 'div',\n { className: css.regionSeg },\n (['global', 'china'] as const).map(region =>\n h(\n 'button',\n {\n key: region,\n type: 'button',\n disabled: busy || !writable,\n className: effectiveRegion === region ? css.regionSegOn : css.regionSegBtn,\n onClick: () => {\n if (regionSetting === region) return\n setBusy(true)\n setError(undefined)\n void scope.setRegion(region).then(() => {\n setBusy(false)\n }).catch((cause: unknown) => {\n setError(cause instanceof Error ? cause.message : String(cause))\n setBusy(false)\n })\n }\n },\n region === 'global' ? t('regionGlobal') : t('regionChina')\n )\n )\n )\n )\n )\n : null\n )\n}\n","/** Pure capability decision for the legacy page-mode fallback. */\n\n/**\n * Use the DOM page fallback only when the host has no settings page and does\n * expose a page shell for the fallback to mount into.\n *\n * @param settingsSurfaceAvailable - whether `settings.section` is live.\n * @param pageShellAvailable - whether the sidebar/conversation shell exists.\n * @returns true when the fallback is the only available market surface.\n */\nexport function shouldUseLegacyPageMode(settingsSurfaceAvailable: boolean, pageShellAvailable: boolean): boolean {\n return !settingsSurfaceAvailable && pageShellAvailable\n}\n","/**\n * Legacy Web page-mode adapter.\n *\n * Current DSH compositions expose `settings.section`; older compositions that\n * predate that slot can still host a top-level market panel through the DOM\n * shell used by the original page-mode integration. The adapter is deliberately\n * guarded by the live settings-slot state so one composition never renders two\n * market surfaces.\n */\nimport { createElement as h } from 'react'\nimport { createRoot, type Root } from 'react-dom/client'\nimport { MarketSection } from './MarketSection.js'\nimport { shouldUseLegacyPageMode } from './page-mode-selection.js'\nimport type { Translate } from './index.js'\nimport type { CredentialApi } from './credentials.js'\nimport css from './market.module.css'\n\n/** Browser-side inputs required by the legacy page-mode adapter. */\nexport interface LegacyPageModeOptions {\n /** Current namespace-bound translator. */\n t: Translate\n /** Host credentials wire used for write-only MCP env configuration. */\n credentials?: CredentialApi\n /** Whether the host has mounted a live `settings.section` declaration. */\n isSettingsSurfaceAvailable: () => boolean\n /** Optional locale revision subscription supplied by newer hosts. */\n subscribeLocale?: (listener: () => void) => () => void\n}\n\nconst ACTIVE_ATTRIBUTE = 'data-dsh-agent-plugins-market-page'\nconst VIEW_ATTRIBUTE = 'data-dsh-agent-plugins-market-page-view'\nconst ENTRY_ATTRIBUTE = 'data-dsh-agent-plugins-market-entry'\nconst SURFACE_EVENT = 'dsh-agent-plugins-market-settings-surface'\nconst PANEL_EVENT = 'dsh-panel-activate'\nconst PANEL_NAME = 'agent-plugins-market'\n\n/** Notify the page adapter that the settings-slot capability changed. */\nexport const LEGACY_PAGE_MODE_SURFACE_EVENT = SURFACE_EVENT\nconst SIDEBAR_COLUMN_SELECTOR = '[data-pane=\"sidebar\"], [class*=\"sidebarCol\"]'\nconst CONVERSATION_COLUMN_SELECTOR = '[data-pane=\"conversation\"], [class*=\"centerCol\"]'\nconst SIDEBAR_CONTEXT_SELECTOR = '[class*=\"sessionRow\"], [class*=\"projectRow\"], [class*=\"searchResultRow\"], [class*=\"searchResultWorkspace\"], [class*=\"newSession\"]'\n\n/**\n * Mount the page-mode fallback and its sidebar entry.\n *\n * The fallback remains dormant when the settings surface is present. It also\n * remains a no-op in non-browser runtimes or shells that expose neither the\n * sidebar nor the conversation column.\n *\n * @param options - page-mode dependencies and host capability probe.\n * @returns disposer that removes the injected entry, panel, listeners, and\n * active document marker.\n */\nexport function mountLegacyPageMode(options: LegacyPageModeOptions): () => void {\n if (typeof document === 'undefined' || typeof MutationObserver === 'undefined') return () => {}\n\n let stopped = false\n let open = false\n let root: Root | undefined\n let container: HTMLDivElement | undefined\n let entry: HTMLButtonElement | undefined\n let entryLabel: HTMLSpanElement | undefined\n let observer: MutationObserver | undefined\n\n const setActive = (next: boolean): void => {\n open = next\n if (open && !options.isSettingsSurfaceAvailable()) {\n document.documentElement.setAttribute(ACTIVE_ATTRIBUTE, '')\n document.dispatchEvent(new CustomEvent(PANEL_EVENT, { detail: PANEL_NAME }))\n } else {\n document.documentElement.removeAttribute(ACTIVE_ATTRIBUTE)\n }\n }\n\n const removeView = (): void => {\n setActive(false)\n root?.unmount()\n root = undefined\n container?.remove()\n container = undefined\n }\n\n const renderView = (): void => {\n if (root === undefined) return\n root.render(h(MarketSection, { t: options.t, credentials: options.credentials, mode: 'page' }))\n }\n\n const updateEntryCopy = (): void => {\n if (entryLabel === undefined || entry === undefined) return\n const label = options.t('nav')\n entryLabel.textContent = label\n entry.title = label\n entry.setAttribute('aria-label', label)\n }\n\n const ensureView = (): void => {\n if (stopped || options.isSettingsSurfaceAvailable()) {\n removeView()\n return\n }\n const column = conversationColumn()\n if (!shouldUseLegacyPageMode(options.isSettingsSurfaceAvailable(), column !== undefined)) {\n removeView()\n return\n }\n if (column === undefined) return\n if (container !== undefined && container.isConnected) return\n root?.unmount()\n container?.remove()\n container = document.createElement('div')\n container.setAttribute(VIEW_ATTRIBUTE, '')\n container.className = css.pageView\n column.appendChild(container)\n root = createRoot(container)\n renderView()\n }\n\n const ensureEntry = (): void => {\n if (stopped || options.isSettingsSurfaceAvailable()) {\n entry?.remove()\n return\n }\n const rootElement = sidebarRoot()\n const anchor = rootElement === undefined ? undefined : newSessionButton(rootElement)\n if (rootElement === undefined || anchor === undefined || anchor.parentElement === null) return\n if (entry === undefined) {\n entry = createEntry(() => { setActive(!open); ensureView() })\n entryLabel = entry.querySelector<HTMLSpanElement>('[data-dsh-agent-plugins-market-label]') ?? undefined\n updateEntryCopy()\n }\n if (entry.parentElement !== anchor.parentElement || entry.previousSibling !== anchor) {\n anchor.insertAdjacentElement('afterend', entry)\n }\n }\n\n const observeShell = (): void => {\n if (stopped || observer !== undefined || options.isSettingsSurfaceAvailable()) return\n observer = new MutationObserver(ensure)\n observer.observe(document.body ?? document.documentElement, { childList: true, subtree: true })\n }\n\n const stopObservingShell = (): void => {\n observer?.disconnect()\n observer = undefined\n }\n\n const ensure = (): void => {\n if (stopped) return\n if (options.isSettingsSurfaceAvailable()) {\n stopObservingShell()\n removeView()\n entry?.remove()\n return\n }\n observeShell()\n ensureView()\n ensureEntry()\n }\n\n const onLocale = (): void => {\n updateEntryCopy()\n renderView()\n }\n const onSurfaceChange = (): void => { ensure() }\n const unsubscribeLocale = options.subscribeLocale?.(onLocale)\n const onPanelActivate = (event: Event): void => {\n const detail = (event as CustomEvent<string>).detail\n if (detail !== PANEL_NAME && open) setActive(false)\n }\n const onSidebarContextClick = (event: MouseEvent): void => {\n if (!open) return\n const target = event.target\n if (!(target instanceof HTMLElement) || target.closest(SIDEBAR_CONTEXT_SELECTOR) === null) return\n setActive(false)\n }\n\n document.addEventListener(PANEL_EVENT, onPanelActivate)\n document.addEventListener(SURFACE_EVENT, onSurfaceChange)\n document.addEventListener('click', onSidebarContextClick, true)\n queueMicrotask(ensure)\n\n return () => {\n stopped = true\n unsubscribeLocale?.()\n document.removeEventListener(PANEL_EVENT, onPanelActivate)\n document.removeEventListener(SURFACE_EVENT, onSurfaceChange)\n document.removeEventListener('click', onSidebarContextClick, true)\n stopObservingShell()\n entry?.remove()\n removeView()\n }\n}\n\nfunction sidebarRoot(): HTMLElement | undefined {\n const column = document.querySelector<HTMLElement>(SIDEBAR_COLUMN_SELECTOR)\n if (column === null) return undefined\n return column.querySelector<HTMLElement>('[class*=\"logoRow\"]')?.parentElement\n ?? (column.firstElementChild as HTMLElement | null)\n ?? undefined\n}\n\nfunction newSessionButton(root: HTMLElement): HTMLButtonElement | undefined {\n const nested = root.querySelector<HTMLButtonElement>('button[class*=\"newSession\"]')\n if (nested !== null) return nested\n for (const child of root.children) {\n if (child instanceof HTMLButtonElement) return child\n }\n return undefined\n}\n\nfunction conversationColumn(): HTMLElement | undefined {\n return document.querySelector<HTMLElement>(CONVERSATION_COLUMN_SELECTOR) ?? undefined\n}\n\nfunction createEntry(onClick: () => void): HTMLButtonElement {\n const button = document.createElement('button')\n button.type = 'button'\n button.setAttribute(ENTRY_ATTRIBUTE, '')\n button.className = css.pageEntry\n button.innerHTML = '<svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"2\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"2\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/></svg>'\n const label = document.createElement('span')\n label.dataset.dshAgentPluginsMarketLabel = ''\n button.append(label)\n button.addEventListener('click', onClick)\n return button\n}\n","/**\n * dsh-agent-plugins-market client: registers the Agent Plugins Market section inside the Web\n * GUI's settings page (the same settings.section seat dshmarket uses), with a\n * guarded legacy top-level page fallback for older shells. The bundle's\n * browser externals are React, ReactDOM, and the injected `dsh.client.inject`\n * module table, so it cannot reach packages the host does not serve.\n */\nimport { createElement as h } from 'react'\nimport * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport { fetchMcpBackend } from './api.js'\nimport { en, zh, type LocaleKey } from './locales.js'\nimport { MarketSection } from './MarketSection.js'\nimport { McpStatusPanel } from './McpStatusPanel.js'\nimport { LspStatusPanel } from './LspStatusPanel.js'\nimport { McpPluginCard } from './McpPluginCard.js'\nimport type { CredentialApi } from './credentials.js'\nimport { LEGACY_PAGE_MODE_SURFACE_EVENT, mountLegacyPageMode } from './page-mode.js'\n\nconst NS = 'dsh-agent-plugins-market'\n\nexport type Translate = (key: LocaleKey, params?: Record<string, unknown>) => string\n\n/** The subset of the locale service this plugin touches. */\ninterface LocaleService {\n register(namespace: string, dicts: { zh: Record<string, string>; en: Record<string, string> }): unknown\n bind(namespace: string): Translate\n subscribe?: (listener: () => void) => () => void\n}\n\n/** The subset of the slots service this plugin touches. */\ninterface SlotsService {\n inject(slot: string, register: () => unknown): void\n register(meta: Record<string, unknown>, component: () => unknown): unknown\n}\n\n/** The subset of the host settings-scope service this plugin touches. */\ninterface SettingsScopeService {\n bind(options: { namespace: string }): {\n getSnapshot(): { value?: { mcpEnhanced?: boolean; downloadRegion?: string }; writable: boolean }\n subscribe(listener: () => void): () => void\n set(field: string, value: unknown): Promise<void>\n }\n}\n\n/** The client cordis context this plugin relies on (structural subset). */\ninterface SuiteClientContext {\n effect(callback: () => unknown, label?: string): void\n /** Late service resolution; absent on hosts predating cross-plugin inject. */\n inject?(services: string[], callback: (resolved: Record<string, unknown>) => void): void\n locale: LocaleService\n slots: SlotsService\n connection: { api: { credentials: CredentialApi } }\n}\n\nexport const name = 'dsh-agent-plugins-market'\nexport const inject = ['slots', 'locale', 'connection']\nexport const REQUIRED_PRIMITIVES = ['Button', 'Input', 'Modal', 'Toast', 'Tooltip'] as const\n\n/**\n * Register the MCP enhancement card into the host's shared 插件配置 tab\n * (`settings.plugin.item`), the same seat dshmarket uses. Called through\n * `ctx.inject(['settingsScope'])` at apply time; a host without the\n * settingsScope service simply skips the card.\n */\n\n/** Detect host primitives that predate the exports this UI relies on. */\nexport function missingPrimitives(module: Record<string, unknown>, required: readonly string[] = REQUIRED_PRIMITIVES): string[] {\n return required.filter(name => module[name] === undefined)\n}\n\nexport function apply(ctx: SuiteClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-agent-plugins: dictionaries')\n const t = ctx.locale.bind(NS)\n const credentials = ctx.connection.api.credentials\n\n const gaps = missingPrimitives(primitives as unknown as Record<string, unknown>)\n if (gaps.length > 0) {\n console.warn(`[dsh-agent-plugins-market] host ui-primitives missing ${gaps.join(', ')} — Agent Plugins Market section disabled (dsh web >= 0.1.0-rc.6 required)`)\n return\n }\n\n let settingsSurfaceAvailable = false\n ctx.effect(() => mountLegacyPageMode({\n t,\n credentials,\n isSettingsSurfaceAvailable: () => settingsSurfaceAvailable,\n subscribeLocale: ctx.locale.subscribe === undefined ? undefined : (listener) => ctx.locale.subscribe!(listener),\n }), 'dsh-agent-plugins-market: legacy page mode')\n\n // The host 插件配置 tab card. Registration rides the injected scope's slots\n // (the dshmarket / dsh-rewind pattern), and the card state binds the\n // market's settings namespace — the namespace the node half registers,\n // which is also what makes the tab serve our card at all.\n ctx.inject?.(['settingsScope'], (scoped: { settingsScope?: SettingsScopeService; slots?: SlotsService }) => {\n const service = scoped.settingsScope\n const slots = scoped.slots\n if (service === undefined || slots === undefined) return\n const tCard = ctx.locale.bind(NS)\n const scope = service.bind({ namespace: NS })\n slots.inject('settings.plugin.item', () =>\n slots.register({\n name: 'settings.plugin.item',\n key: NS,\n locale: NS,\n inject: () => ({ t: tCard }),\n }, () => h(McpPluginCard, {\n t: key => tCard(key as LocaleKey),\n scope: {\n enhanced: () => scope.getSnapshot().value?.mcpEnhanced !== false,\n writable: () => scope.getSnapshot().writable,\n subscribe: listener => scope.subscribe(listener),\n setEnhanced: next => scope.set('mcpEnhanced', next),\n region: () => {\n const value = scope.getSnapshot().value?.downloadRegion\n return value === 'global' || value === 'china' ? value : 'auto'\n },\n setRegion: next => scope.set('downloadRegion', next)\n },\n probe: () => fetchMcpBackend(),\n })),\n )\n })\n\n ctx.slots.inject('settings.section', () => {\n settingsSurfaceAvailable = true\n notifyPageModeSurfaceChange()\n const marketDispose = ctx.slots.register({\n name: 'settings.section',\n id: 'agent-plugin',\n order: 45,\n label: () => t('nav'),\n locale: NS,\n inject: () => ({ t }),\n }, () => h(MarketSection, {\n t,\n credentials,\n mode: 'settings',\n }))\n const mcpDispose = ctx.slots.register({\n name: 'settings.section',\n id: 'mcp-status',\n order: 46,\n label: () => t('mcpStatusNav'),\n locale: NS,\n inject: () => ({ t }),\n }, () => h(McpStatusPanel, { t, credentials }))\n const lspDispose = ctx.slots.register({\n name: 'settings.section',\n id: 'lsp-status',\n order: 47,\n label: () => t('lspStatusNav'),\n locale: NS,\n inject: () => ({ t }),\n }, () => h(LspStatusPanel, { t }))\n return () => {\n settingsSurfaceAvailable = false\n notifyPageModeSurfaceChange()\n if (typeof mcpDispose === 'function') mcpDispose()\n if (typeof lspDispose === 'function') lspDispose()\n if (typeof marketDispose === 'function') marketDispose()\n }\n })\n}\n\nfunction notifyPageModeSurfaceChange(): void {\n if (typeof document !== 'undefined') document.dispatchEvent(new Event(LEGACY_PAGE_MODE_SURFACE_EVENT))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAa,oBAAoB;;AAGjC,MAAa,gBAAgB;CAC3B,UAAU,GAAG,kBAAkB;CAC/B,WAAW,GAAG,kBAAkB;CAChC,WAAW,GAAG,kBAAkB;CAChC,YAAY,GAAG,kBAAkB;CACjC,UAAU,GAAG,kBAAkB;CAC/B,QAAQ,GAAG,kBAAkB;CAC7B,OAAO,GAAG,kBAAkB;CAC5B,OAAO,GAAG,kBAAkB;CAC5B,WAAW,GAAG,kBAAkB;CAChC,cAAc,GAAG,kBAAkB;CACnC,aAAa,GAAG,kBAAkB;CAClC,cAAc,GAAG,kBAAkB;CACnC,eAAe,GAAG,kBAAkB;CACpC,SAAS,GAAG,kBAAkB;CAC9B,WAAW,GAAG,kBAAkB;CAChC,YAAY,GAAG,kBAAkB;CACjC,YAAY,GAAG,kBAAkB;CACjC,cAAc,GAAG,kBAAkB;CACnC,gBAAgB,GAAG,kBAAkB;CACrC,UAAU,GAAG,kBAAkB;CAC/B,gBAAgB,GAAG,kBAAkB;CACrC,YAAY,GAAG,kBAAkB;CACjC,eAAe,GAAG,kBAAkB;AACtC;;AA+MA,SAAgB,WAAW,UAAkB,SAAyB;CACpE,OAAO,GAAG,cAAc,MAAM,YAAY,mBAAmB,QAAQ,EAAE,WAAW,mBAAmB,OAAO;AAC9G;;AAGA,SAAgB,WAAW,UAAkB,SAAiB,OAAuB;CACnF,OAAO,GAAG,cAAc,MAAM,YAAY,mBAAmB,QAAQ,EAAE,WAAW,mBAAmB,OAAO,EAAE,SAAS,mBAAmB,KAAK;AACjJ;;;;ACrNA,eAAsB,gBAAuC;CAC3D,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AAa,EAAE,cAAc;GAC7B,QAAQ;GACR,eAAe,EAAE,EAAE;EACrB,UAAA,GAASA,MAAAA,cAAAA,CAAE,gBAAgB;GAAE;GAAG;EAAY,CAAC,CAAC;EAC9C,MAAM,aAAa,IAAI,MAAM,SAAS;GACpC,MAAM;GACN,IAAI;GACJ,OAAO;GACP,aAAa,EAAE,cAAc;GAC7B,QAAQ;GACR,eAAe,EAAE,EAAE;EACrB,UAAA,GAASA,MAAAA,cAAAA,CAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;EACjC,aAAa;GACX,2BAA2B;GAC3B,4BAA4B;GAC5B,IAAI,OAAO,eAAe,YAAY,WAAW;GACjD,IAAI,OAAO,eAAe,YAAY,WAAW;GACjD,IAAI,OAAO,kBAAkB,YAAY,cAAc;EACzD;CACF,CAAC;AACH;AAEA,SAAS,8BAAoC;CAC3C,IAAI,OAAO,aAAa,aAAa,SAAS,cAAc,IAAI,MAAM,8BAA8B,CAAC;AACvG"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["listeners","snapshot","useSyncExternalStore","useState","useRef","h","css","IconLoadingOutline16","searchableCache","searchableFor","h","css","useRef","useState","useCallback","css","h","useState","h","css","Modal","Button","Input","h","Modal","css","Button","h","css","h","css","h","css","Button","Tooltip","h","Component","h","createContext","useContext","createPortal","useState","h","Modal","css","SCALAR","BREAK","SKIP","REMOVE","visit","SCALAR","floatNaN","floatExp","float","intIdentify","intResolve","intStringify","intOct","int","intHex","schema","intOct","int","intHex","floatNaN","floatExp","float","intIdentify","schema","schema","schema$2","SCALAR","SCALAR","h","css","MarkdownText","useState","useRef","h","css","Button","h","css","Input","h","css","Button","IconPlusOutline16","IconRefreshOutline16","IconLoadingOutline16","useState","Input","detailCss","Modal","useSyncExternalStore","useState","useCallback","useMemo","h","css","Toast","Modal","Button","useState","h","css","Button","IconTrashOutline16","IconPlusOutline16","useState","h","css","Button","useState","h","css","Button","EMPTY_STATUS","useState","h","css","Button","IconRefreshOutline16","Input","useState","h","css","Button","Input","h","css","useState","useState","useRef","useCallback","useMemo","h","css","IconEditOutline16","IconTrashOutline16","useState","h","css","primitives","useState","useCallback","h","css","h","css","createRoot","primitives","createRoot","h"],"sources":["../src/client/ui/busy-operation.ts","../src/client/ui/busy-overlay.module.css","../src/client/ui/BusyOverlay.tsx","../src/contracts/market.ts","../src/client/api.ts","../src/client/locales.ts","../src/client/features/market/market-resource.ts","../src/client/features/market/market-view-model.ts","../src/client/market.module.css","../src/client/features/market/SourceTab.tsx","../src/client/features/market/SourceTabsRow.tsx","../src/client/features/market/SourceEditorModal.tsx","../src/client/ui/interpolate.ts","../src/client/features/market/InstallConfirmModal.tsx","../src/client/ui/ToggleSwitch.tsx","../src/client/ui/resource-card.module.css","../src/client/ui/ResourceCard.tsx","../src/client/layout-label.ts","../src/client/features/market/SuiteCard.tsx","../src/client/ui/StatusIcon.tsx","../src/client/ErrorBoundary.tsx","../src/client/ui/detail.module.css","../src/client/ui/DetailModal.tsx","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/visit.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Alias.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyComment.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/foldFlowLines.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/map.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLSeq.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/string.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/null.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/bool.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyNumber.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/int.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/schema.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/tags.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/line-counter.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js","../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js","../src/client/features/personas/frontmatter.ts","../src/client/ui/MarkdownDocument.tsx","../src/client/features/suite-detail/suite-detail-resource.ts","../src/client/SuiteDetail.tsx","../src/client/SearchFilterToolbar.module.css","../src/client/SearchFilterToolbar.tsx","../src/client/ui/panel.module.css","../src/client/ui/panel.tsx","../src/client/ui/workspace-view.ts","../src/client/MarketSection.tsx","../src/client/ui/server-form.ts","../src/client/ui/ServerConfigEditor.tsx","../src/client/ui/ServerConfigDetail.tsx","../src/client/features/mcp-status/detail-actions.ts","../src/client/credentials.ts","../src/client/mcp-credential.module.css","../src/client/McpCredentialEditor.tsx","../src/client/features/mcp-status/mcp-status-view-model.ts","../home/runner/work/dsh-agent-plugins-market/dsh-agent-plugins-market/src/client/mcp-status.module.css","../home/runner/work/dsh-agent-plugins-market/dsh-agent-plugins-market/src/client/ui/panel.module.css","../src/client/McpStatusPanel.tsx","../src/client/LspStatusPanel.tsx","../src/client/features/personas/RoleMetadataFields.tsx","../src/client/ui/UserPanelSurface.tsx","../src/client/workspace.module.css","../src/client/PluginWorkspace.tsx","../src/client/McpPluginCard.tsx","../src/client/page-mode-selection.ts","../src/client/page-mode.tsx","../src/client/index.ts"],"sourcesContent":["/** One operation lease per asynchronous workflow; nested requests cannot dismiss another lease. */\nexport interface BusyOperation {\n id: number\n target: HTMLElement | null\n}\nconst pending = new Map<number, BusyOperation>()\nconst listeners = new Set<() => void>()\nlet nextId = 0\nlet snapshot: readonly BusyOperation[] = []\n\nfunction publish(): void {\n snapshot = [...pending.values()]\n listeners.forEach(listener => listener())\n}\n\nexport function operationTarget(): HTMLElement | null {\n if (typeof document === 'undefined') return null\n const dialogs = [...document.querySelectorAll<HTMLElement>('[role=\"dialog\"]')].filter(node => node.getClientRects().length > 0)\n return dialogs.at(-1) ?? document.querySelector<HTMLElement>('[data-agent-plugins-workspace]')\n}\n\nexport function beginBusyOperation(target = operationTarget()): () => void {\n const id = ++nextId\n pending.set(id, { id, target })\n publish()\n return () => {\n if (pending.delete(id)) publish()\n }\n}\n\nexport async function withBusyOperation<T>(work: () => Promise<T>): Promise<T> {\n const end = beginBusyOperation()\n try {\n return await work()\n } finally {\n end()\n }\n}\n\nexport function subscribeBusy(listener: () => void): () => void {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n}\nexport function busySnapshot(): readonly BusyOperation[] {\n return snapshot\n}\n",".overlay {\n position: fixed;\n z-index: 2147483647;\n display: grid;\n place-items: center;\n box-sizing: border-box;\n background: var(--dsw-alias-bg-mask-3);\n backdrop-filter: blur(3px);\n cursor: progress;\n outline: none;\n overflow: hidden;\n}\n.overlay[data-visible='false'] {\n background: transparent;\n backdrop-filter: none;\n}\n.overlay[data-visible='true'] {\n animation: busy-enter 140ms ease-out;\n}\n.content {\n width: min(360px, calc(100% - 32px));\n box-sizing: border-box;\n padding: 24px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n text-align: center;\n}\n.spinner {\n display: flex;\n width: 28px;\n height: 28px;\n animation: busy-spin 900ms linear infinite;\n}\n.label {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n}\n.hintViewport {\n min-height: 54px;\n width: 100%;\n overflow: hidden;\n}\n.hint {\n margin: 0;\n font-size: 13px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n animation: busy-hint 300ms ease-out;\n overflow-wrap: anywhere;\n}\n@keyframes busy-spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes busy-enter {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes busy-hint {\n from {\n opacity: 0;\n transform: translateY(14px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .overlay,\n .hint {\n animation: none;\n }\n .spinner {\n animation-duration: 2400ms;\n }\n}\n","import { createElement as h, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore, type ReactNode } from 'react'\nimport { IconLoadingOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { busySnapshot, operationTarget, subscribeBusy } from './busy-operation.js'\nimport type { Translate } from '../index.js'\nimport css from './busy-overlay.module.css'\n\nexport const BUSY_SHOW_DELAY_MS = 200\nexport const BUSY_MIN_VISIBLE_MS = 400\nexport const BUSY_SETTLE_MS = 100\n\n/** Mount once per client. A body-level host covers portaled dialogs without inheriting their inert state. */\nexport function BusyOverlay({ t }: { t: Translate }): ReactNode {\n const tasks = useSyncExternalStore(subscribeBusy, busySnapshot, busySnapshot)\n const target = [...tasks].reverse().find(task => task.target?.isConnected)?.target ?? (tasks.length ? operationTarget() : null)\n const [heldTarget, setHeldTarget] = useState<HTMLElement | null>(null)\n const [visible, setVisible] = useState(false)\n const startedAt = useRef<number | null>(null)\n const shownAt = useRef<number | null>(null)\n const active = tasks.length > 0\n\n useLayoutEffect(() => {\n let timer: ReturnType<typeof setTimeout> | undefined\n if (active && target) {\n setHeldTarget(target)\n startedAt.current ??= Date.now()\n if (shownAt.current === null) {\n timer = setTimeout(\n () => {\n shownAt.current = Date.now()\n setVisible(true)\n },\n Math.max(0, BUSY_SHOW_DELAY_MS - (Date.now() - startedAt.current))\n )\n }\n } else {\n const clear = (): void => {\n startedAt.current = null\n shownAt.current = null\n setVisible(false)\n setHeldTarget(null)\n }\n if (shownAt.current === null) clear()\n else timer = setTimeout(clear, Math.max(BUSY_SETTLE_MS, BUSY_MIN_VISIBLE_MS - (Date.now() - shownAt.current)))\n }\n return () => {\n if (timer !== undefined) clearTimeout(timer)\n }\n }, [active, target])\n\n const displayedTarget = target ?? (heldTarget?.isConnected ? heldTarget : null)\n return displayedTarget && (active || visible) ? h(ActiveOverlay, { target: displayedTarget, t, visible }) : null\n}\n\nfunction ActiveOverlay({ target, t, visible }: { target: HTMLElement; t: Translate; visible: boolean }): ReactNode {\n const ref = useRef<HTMLDivElement>(null)\n const [rect, setRect] = useState(() => target.getBoundingClientRect())\n const [message, setMessage] = useState(0)\n const hints = [t('busyHintProcessing'), t('busyHintRefresh'), t('busyHintWaiting')]\n\n useEffect(() => {\n if (!visible) return\n const timer = setInterval(() => setMessage(value => (value + 1) % hints.length), 3200)\n return () => clearInterval(timer)\n }, [hints.length, visible])\n\n useLayoutEffect(() => {\n const previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null\n const inertBefore = target.hasAttribute('inert')\n const busyBefore = target.getAttribute('aria-busy')\n target.setAttribute('inert', '')\n target.setAttribute('aria-busy', 'true')\n const scope = target.closest('[role=\"presentation\"]') ?? target\n const stop = (event: Event): void => {\n if (ref.current?.contains(event.target as Node)) return\n // Include the modal backdrop: otherwise a click outside the dialog can close an active save.\n if (event instanceof KeyboardEvent || scope.contains(event.target as Node)) {\n event.preventDefault()\n event.stopImmediatePropagation()\n }\n }\n const trapFocus = (event: FocusEvent): void => {\n if (scope.contains(event.target as Node)) ref.current?.focus({ preventScroll: true })\n }\n const update = (): void => {\n const next = target.getBoundingClientRect()\n setRect(previous => (previous.top === next.top && previous.left === next.left && previous.width === next.width && previous.height === next.height ? previous : next))\n }\n // ResizeObserver does not observe transform animations on the host dialog.\n let frame = 0\n const follow = (): void => {\n update()\n frame = requestAnimationFrame(follow)\n }\n if (typeof requestAnimationFrame !== 'undefined') frame = requestAnimationFrame(follow)\n const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(update)\n observer?.observe(target)\n window.addEventListener('resize', update)\n window.addEventListener('scroll', update, true)\n for (const event of ['pointerdown', 'click', 'keydown', 'submit']) window.addEventListener(event, stop, true)\n window.addEventListener('focusin', trapFocus, true)\n ref.current?.focus({ preventScroll: true })\n update()\n return () => {\n if (frame) cancelAnimationFrame(frame)\n observer?.disconnect()\n window.removeEventListener('resize', update)\n window.removeEventListener('scroll', update, true)\n for (const event of ['pointerdown', 'click', 'keydown', 'submit']) window.removeEventListener(event, stop, true)\n window.removeEventListener('focusin', trapFocus, true)\n if (!inertBefore) target.removeAttribute('inert')\n if (busyBefore === null) target.removeAttribute('aria-busy')\n else target.setAttribute('aria-busy', busyBefore)\n if (previousFocus?.isConnected && !previousFocus.closest('[inert]')) previousFocus.focus({ preventScroll: true })\n }\n }, [target])\n\n return h(\n 'div',\n {\n ref,\n className: css.overlay,\n tabIndex: -1,\n 'data-operation-overlay': true,\n 'data-visible': visible,\n role: 'status',\n 'aria-live': 'polite',\n 'aria-label': t('panelWorking'),\n style: { top: rect.top, left: rect.left, width: rect.width, height: rect.height, borderRadius: getComputedStyle(target).borderRadius },\n onKeyDown: (event: { preventDefault(): void; stopPropagation(): void }) => {\n event.preventDefault()\n event.stopPropagation()\n }\n },\n visible\n ? h(\n 'div',\n { className: css.content },\n h('span', { className: css.spinner, 'aria-hidden': true }, h(IconLoadingOutline16, { size: 28 })),\n h('strong', { className: css.label }, t('panelWorking')),\n h('div', { className: css.hintViewport }, h('p', { key: message, className: css.hint }, hints[message]))\n )\n : null\n )\n}\n","/** Browser-safe market wire records and route constants shared by host and client. */\n\n/** Prefix for all Agent Plugins Market HTTP routes. */\nexport const MARKET_API_PREFIX = '/api/agent-plugins/' as const\n\n/** Fixed Agent Plugins Market HTTP routes. */\nexport const MARKET_ROUTES = {\n overview: `${MARKET_API_PREFIX}overview`,\n mcpStatus: `${MARKET_API_PREFIX}mcp-status`,\n addMcpServer: `${MARKET_API_PREFIX}mcp-servers/add`,\n lspStatus: `${MARKET_API_PREFIX}lsp-status`,\n lspServers: `${MARKET_API_PREFIX}lsp-servers`,\n addLspServer: `${MARKET_API_PREFIX}lsp-servers/add`,\n serverConfig: `${MARKET_API_PREFIX}server-config`,\n saveServerConfig: `${MARKET_API_PREFIX}server-config/save`,\n progress: `${MARKET_API_PREFIX}progress`,\n config: `${MARKET_API_PREFIX}config`,\n modelCatalog: `${MARKET_API_PREFIX}model-catalog`,\n suite: `${MARKET_API_PREFIX}suite`,\n skill: `${MARKET_API_PREFIX}skill`,\n addSource: `${MARKET_API_PREFIX}sources/add`,\n updateSource: `${MARKET_API_PREFIX}sources/update`,\n adoptSource: `${MARKET_API_PREFIX}sources/adopt`,\n removeSource: `${MARKET_API_PREFIX}sources/remove`,\n refreshSource: `${MARKET_API_PREFIX}sources/refresh`,\n install: `${MARKET_API_PREFIX}install`,\n uninstall: `${MARKET_API_PREFIX}uninstall`,\n setEnabled: `${MARKET_API_PREFIX}set-enabled`,\n setSurface: `${MARKET_API_PREFIX}set-surface`,\n mcpOverrides: `${MARKET_API_PREFIX}mcp-overrides`,\n setMcpOverride: `${MARKET_API_PREFIX}set-mcp-override`,\n mcpRetry: `${MARKET_API_PREFIX}mcp-retry`,\n mcpReauthorize: `${MARKET_API_PREFIX}mcp-reauthorize`,\n mcpBackend: `${MARKET_API_PREFIX}mcp-backend`,\n setMcpBackend: `${MARKET_API_PREFIX}set-mcp-backend`,\n userPanel: `${MARKET_API_PREFIX}user-panel`\n} as const\n\n/** Editable service configuration; masked values are preserved when unchanged. */\nexport interface ServerConfigPayload {\n kind: 'mcp' | 'lsp'\n id: string\n editable: boolean\n config: Record<string, unknown>\n}\n\n/** Public model identities and exact-model reasoning options; never provider configuration. */\nexport interface ModelCatalogPayload {\n providers: Array<{ id: string; name: string }>\n models: Array<{ id: string; name: string }>\n reasoning?: { efforts: Array<{ id: string; name: string; description?: string }>; defaultEffort?: string }\n}\n\n/**\n * Mutation routes carry their verb in the path because the host webserver\n * keys its exact table by pathname only — a second registration on the same\n * path throws `duplicate exact route` at mount. The read route keeps the\n * bare panel path; every write gets a distinct segment below it.\n */\nexport type UserPanelMutation = 'create' | 'update' | 'delete'\n\n/** Build one user-panel list route URL (`GET`, no mutation). */\nexport function userPanelRoute(kind: UserPanelKind): string {\n return `${MARKET_ROUTES.userPanel}/${kind}`\n}\n\n/** Build one user-panel mutation route URL (all POSTs). */\nexport function userPanelMutationRoute(kind: UserPanelKind, mutation: UserPanelMutation, name?: string): string {\n const base = `${userPanelRoute(kind)}/${mutation}`\n return name === undefined ? base : `${base}?name=${encodeURIComponent(name)}`\n}\n\n/** The MCP mount backend state reported to the settings page. */\nexport interface McpBackendPayload {\n backend: 'builtin' | 'host'\n /** Whether the host `dsh-mcp-client` resolves from the plugin context. */\n hostClient: { available: boolean; version?: string }\n /** Download region: the persisted setting and its locale-resolved route. */\n downloadRegion: { setting: 'auto' | 'global' | 'china'; effective: 'global' | 'china' }\n}\n\n/** One unmanaged `.sources/` checkout the user can adopt as a source. */\nexport interface UnmanagedSource {\n id: string\n /** The checkout's `origin` remote URL; absent for non-git directories. */\n url?: string\n}\n\n/** A configured source row returned to the market client. */\nexport interface SourceOverview {\n id: string\n url: string\n branch?: string\n local?: boolean\n /** Acquisition kind (`git` / `local` / `archive`); `local` mirrors the legacy flag. */\n kind: string\n /** The checkout pre-existed (manually cloned or adopted); never deleted on removal. */\n adopted?: boolean\n cloned: boolean\n lockCommit?: string\n error?: string\n /** Scanner diagnostics for this source (dropped entries, fallbacks taken);\n * absent when the scan completed with no notes. */\n scanNotes?: string[]\n suiteIds: string[]\n}\n\n/** Counts of runtime surfaces displayed on a suite card. */\nexport interface SuiteSurfaceCounts {\n skills: number\n mcp: number\n hooks: number\n commands: number\n agents: number\n lsp: number\n}\n\n/** Effective per-surface enablement of an installed suite. */\nexport interface SuiteSurfaceToggles {\n skills: boolean\n mcp: boolean\n hooks: boolean\n commands: boolean\n agents: boolean\n lsp: boolean\n}\n\n/** One server's persisted MCP override (wire shape mirrors runtime types). */\nexport type McpServerOverrideWire = {\n enabled?: boolean\n url?: string\n headers?: Record<string, string>\n env?: Record<string, string>\n args?: string[]\n}\n\n/** Overrides for one suite keyed by mcp.json server key. */\nexport type McpSuiteOverridesWire = Record<string, McpServerOverrideWire>\n\n/** A normalized suite card returned by the overview route. */\nexport interface SuiteOverviewCard {\n sourceId: string\n suiteId: string\n name: string\n version?: string\n description?: string\n keywords: string[]\n surfaces: SuiteSurfaceCounts\n enabled: boolean\n installed: boolean\n /** Per-surface toggles; present on installed suites only. */\n surfaceToggles?: SuiteSurfaceToggles\n dimension: string\n layout: string\n remoteUrl?: string\n errors: string[]\n mcpErrors?: string[]\n}\n\n/** The market overview response. */\nexport interface OverviewPayload {\n sources: SourceOverview[]\n suites: SuiteOverviewCard[]\n totals: { all: number; installed: number; enabled: number }\n roots: { user: string; data: string }\n /** Unmanaged `.sources/` checkouts (manual clones) available for adoption. */\n unmanaged?: UnmanagedSource[]\n}\n\n/** Host-side progress of the source mutation currently in flight. */\nexport interface SourceProgress {\n active: boolean\n sourceId: string\n step: string\n}\n\n/** One skill's metadata inside a suite detail response. */\nexport interface SuiteSkillMeta {\n name: string\n description: string\n whenToUse?: string\n path: string\n}\n\n/** One command or agent preview in a suite detail response. */\nexport interface MarkdownPreview {\n name: string\n description?: string\n content: string\n}\n\n/** Claude Code command preview alias retained for feature-specific readability. */\nexport type CommandPreview = MarkdownPreview\n/** Claude Code agent preview alias retained for feature-specific readability. */\nexport type AgentPreview = MarkdownPreview\n\n/** One LSP definition preview in a suite detail response. */\nexport interface LspPreview {\n name: string\n content: string\n}\n\n/** One inline-declared LSP server in a suite detail response. */\nexport interface LspServerPreview {\n /** Server key from the declaring `lspServers` table. */\n key: string\n command: string\n args: string[]\n /** Lowercase leading-dot extension → LSP language id. */\n extensions: Record<string, string>\n env?: Record<string, string>\n}\n\n/** The suite's LSP surface: inline-declared servers plus directory definition files. */\nexport interface LspSurfaceDetail {\n servers: LspServerPreview[]\n raw: LspPreview[]\n}\n\n/** One flattened hook entry in a suite detail response. */\nexport interface HookPreview {\n event: string\n matcher?: string\n command: string\n}\n\n/** One validated MCP server detail in a suite detail response. */\nexport interface McpServerDetail {\n key: string\n type: string\n command?: string\n url?: string\n args?: string[]\n env?: Record<string, string>\n cwd?: string\n headers?: Record<string, string>\n /** External credential references used by env/header/argument placeholders. */\n credentialRefs: string[]\n}\n\n/** Full suite detail response served by the detail modal. */\nexport interface SuiteDetail {\n sourceId: string\n suiteId: string\n name: string\n version: string | null\n description: string | null\n author: string | null\n keywords: string[]\n layout: string\n dimension: string\n root: string\n remoteUrl: string | null\n installed: boolean\n enabled: boolean\n surfaceToggles: SuiteSurfaceToggles | null\n /** Persisted per-server MCP overrides (suite's mcp.json stays source-owned). */\n mcpOverrides?: McpSuiteOverridesWire\n skills: SuiteSkillMeta[]\n mcpServers: McpServerDetail[]\n hooks: { count: number; entries: HookPreview[] }\n commands: MarkdownPreview[]\n agents: MarkdownPreview[]\n lsp: LspSurfaceDetail\n errors: string[]\n mcpErrors: string[]\n}\n\n/** One skill's full file text served by the skill route. */\nexport interface SkillContent {\n name: string\n description: string\n content: string\n path: string\n}\n\n/** A user panel entry (skills / commands / agent personas) over HTTP. */\nexport interface UserPanelEntryWire {\n name: string\n description: string\n disabled: boolean\n /** User and managed plugin entries are editable; external source files remain read-only. */\n origin: 'user' | 'plugin'\n id?: string\n rawText: string\n /** Human-readable suite owner for a plugin-provided entry. */\n suiteName?: string\n metadata: Record<string, unknown>\n path: string\n content: string\n}\n\n/** The user panel surface the market exposes. */\nexport type UserPanelKind = 'skills' | 'commands' | 'agents'\n\n/** Build a suite-detail URL without duplicating route or query encoding logic. */\nexport function suiteRoute(sourceId: string, suiteId: string): string {\n return `${MARKET_ROUTES.suite}?sourceId=${encodeURIComponent(sourceId)}&suiteId=${encodeURIComponent(suiteId)}`\n}\n\n/** Build a skill-content URL without duplicating route or query encoding logic. */\nexport function skillRoute(sourceId: string, suiteId: string, skill: string): string {\n return `${MARKET_ROUTES.skill}?sourceId=${encodeURIComponent(sourceId)}&suiteId=${encodeURIComponent(suiteId)}&skill=${encodeURIComponent(skill)}`\n}\n","import { withBusyOperation } from './ui/busy-operation.js'\n/** Typed fetch helpers over the host's `/api/agent-plugins/*` routes. */\nimport { MARKET_ROUTES, userPanelMutationRoute, userPanelRoute, type UserPanelEntryWire, type UserPanelKind } from '../contracts/market.js'\nimport { MARKET_API_PREFIX, skillRoute, suiteRoute } from '../contracts/market.js'\nimport type { OverviewPayload, SkillContent, SourceProgress, SuiteDetail, SuiteOverviewCard } from '../contracts/market.js'\nimport type { McpStatusPayload } from '../contracts/mcp-status.js'\nimport type { LspStatusPayload } from '../contracts/lsp-status.js'\nimport type { LspServerSpec } from '../model/types.js'\n\nexport type {\n AgentPreview,\n HookPreview,\n LspPreview,\n MarkdownPreview,\n McpServerDetail,\n OverviewPayload,\n SkillContent,\n SourceOverview,\n SourceProgress,\n SuiteDetail,\n SuiteOverviewCard,\n SuiteSkillMeta,\n SuiteSurfaceCounts,\n UserPanelEntryWire,\n UserPanelKind\n} from '../contracts/market.js'\nexport type { McpStatusEntry, McpStatusPayload, McpStatusTool } from '../contracts/mcp-status.js'\nexport type { LspStatusEntry, LspStatusPayload, LspStatusState } from '../contracts/lsp-status.js'\nexport type { LspServerSpec } from '../model/types.js'\n\n/** Client-facing alias retained during migration from the original transport types. */\nexport type OverviewData = OverviewPayload\n/** Client-facing alias retained during migration from the original transport types. */\nexport type SuiteCardData = SuiteOverviewCard\n\nexport async function fetchServerConfig(kind: 'mcp' | 'lsp', id: string): Promise<import('../contracts/market.js').ServerConfigPayload> {\n return withBusyOperation(async () => {\n const response = await fetch(`${MARKET_ROUTES.serverConfig}?${new URLSearchParams({ kind, id })}`, { credentials: 'same-origin' })\n const body = (await response.json()) as import('../contracts/market.js').ServerConfigPayload & { error?: string }\n if (!response.ok) throw new Error(body.error ?? `Server configuration failed: ${response.status}`)\n return body\n })\n}\n\nexport async function saveServerConfig(kind: 'mcp' | 'lsp', id: string, config: Record<string, unknown>): Promise<void> {\n return withBusyOperation(async () => {\n await postAction('server-config/save', { kind, id, config })\n })\n}\n\n/** Load providers, models, or exact-model reasoning options from DSH's live LLM service. */\nexport async function fetchModelCatalog(provider?: string, signal?: AbortSignal, model?: string): Promise<import('../contracts/market.js').ModelCatalogPayload> {\n const params = new URLSearchParams()\n if (provider !== undefined) params.set('provider', provider)\n if (model !== undefined) params.set('model', model)\n const query = params.size === 0 ? '' : `?${params}`\n const response = await fetch(`${MARKET_ROUTES.modelCatalog}${query}`, { credentials: 'same-origin', signal })\n if (!response.ok) throw new Error(`DSH model directory failed: ${response.status}`)\n return response.json() as Promise<import('../contracts/market.js').ModelCatalogPayload>\n}\n\nexport async function fetchOverview(): Promise<OverviewData> {\n return withBusyOperation(async () => {\n const response = await fetch(MARKET_ROUTES.overview, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`overview failed: ${response.status}`)\n return response.json() as Promise<OverviewData>\n })\n}\n\nexport async function fetchSourceProgress(): Promise<SourceProgress> {\n const response = await fetch(MARKET_ROUTES.progress, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`progress failed: ${response.status}`)\n return response.json() as Promise<SourceProgress>\n}\n\nexport async function fetchSuiteDetail(sourceId: string, suiteId: string): Promise<SuiteDetail> {\n return withBusyOperation(async () => {\n const response = await fetch(suiteRoute(sourceId, suiteId), { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`suite detail failed: ${response.status}`)\n return response.json() as Promise<SuiteDetail>\n })\n}\n\nexport async function fetchMcpStatus(): Promise<McpStatusPayload> {\n return withBusyOperation(async () => {\n const response = await fetch(MARKET_ROUTES.mcpStatus, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`MCP status failed: ${response.status}`)\n return response.json() as Promise<McpStatusPayload>\n })\n}\n\nexport async function fetchLspStatus(background = false): Promise<LspStatusPayload> {\n const load = async (): Promise<LspStatusPayload> => {\n const response = await fetch(MARKET_ROUTES.lspStatus, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`LSP status failed: ${response.status}`)\n return response.json() as Promise<LspStatusPayload>\n }\n return background ? load() : withBusyOperation(load)\n}\n\n/** The user's direct LSP server table (normalized specs). */\nexport async function fetchLspServers(): Promise<Record<string, LspServerSpec>> {\n return withBusyOperation(async () => {\n const response = await fetch(MARKET_ROUTES.lspServers, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`LSP servers failed: ${response.status}`)\n const body = (await response.json()) as { lspServers?: Record<string, LspServerSpec> }\n return body.lspServers ?? {}\n })\n}\n\n/** Validate and persist the user's direct LSP server table. */\nexport async function saveLspServers(lspServers: unknown): Promise<Record<string, LspServerSpec>> {\n return withBusyOperation(async () => {\n const response = await fetch(`${MARKET_ROUTES.lspServers}/save`, {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ lspServers })\n })\n const body = (await response.json()) as { ok?: boolean; error?: string; lspServers?: Record<string, LspServerSpec> }\n if (!response.ok || body.ok === false) throw new Error(body.error ?? `LSP servers save failed: ${response.status}`)\n return body.lspServers ?? {}\n })\n}\nexport async function setLspServerEnabled(id: string, enabled: boolean): Promise<void> {\n return withBusyOperation(async () => {\n await postAction('lsp-servers/enabled', { id, enabled })\n })\n}\n\nexport async function addLspServer(name: string, config: Record<string, unknown>): Promise<void> {\n return withBusyOperation(async () => {\n await postAction('lsp-servers/add', { name, config })\n })\n}\n\nexport async function fetchSkillContent(sourceId: string, suiteId: string, skill: string): Promise<SkillContent> {\n return withBusyOperation(async () => {\n const response = await fetch(skillRoute(sourceId, suiteId, skill), { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`skill content failed: ${response.status}`)\n return response.json() as Promise<SkillContent>\n })\n}\n\n/** Re-run the host MCP reconcile: retries failed mounts, clears residual tools. */\nexport async function retryMcpMounts(): Promise<void> {\n return withBusyOperation(async () => {\n await postAction('mcp-retry', {})\n })\n}\n\n/** Persist and mount a user-owned MCP server. */\nexport async function addMcpServer(name: string, config: Record<string, unknown>): Promise<void> {\n return withBusyOperation(async () => {\n await postAction('mcp-servers/add', { name, config })\n })\n}\n\n/** Drop one server's OAuth grant so its next mount re-runs browser authorization. */\nexport async function reauthorizeMcpServer(serverName: string): Promise<void> {\n return withBusyOperation(async () => {\n await postAction('mcp-reauthorize', { serverName })\n })\n}\n\n/** The MCP backend card state: active client, host availability, download region. */\nexport interface McpBackendInfo {\n backend: 'builtin' | 'host'\n hostClient: { available: boolean; version?: string }\n downloadRegion: { setting: 'auto' | 'global' | 'china'; effective: 'global' | 'china' }\n}\n\nexport async function fetchMcpBackend(): Promise<McpBackendInfo> {\n const response = await fetch(MARKET_ROUTES.mcpBackend, { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`mcp backend failed: ${response.status}`)\n return response.json() as Promise<McpBackendInfo>\n}\n\nexport async function postAction(path: string, body: Record<string, unknown>): Promise<Record<string, unknown>> {\n return withBusyOperation(async () => {\n const response = await fetch(`${MARKET_API_PREFIX}${path}`, {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(body)\n })\n const payload = (await response.json()) as { ok: boolean; error?: string }\n if (!response.ok || payload.ok !== true) {\n throw new Error(payload.error ?? `request failed: ${response.status}`)\n }\n return payload\n })\n}\n\n/* ---- User panel CRUD (skills / commands / agent personas) -------------- */\n\n/** One user panel entry, client-facing alias of the wire shape. */\nexport type UserPanelEntry = UserPanelEntryWire\n\n/** List one panel's entries. */\nexport async function fetchUserPanel(kind: UserPanelKind): Promise<UserPanelEntry[]> {\n return withBusyOperation(async () => {\n const response = await fetch(userPanelRoute(kind), { credentials: 'same-origin' })\n if (!response.ok) throw new Error(`user panel failed: ${response.status}`)\n const body = (await response.json()) as { entries?: UserPanelEntry[] }\n return body.entries ?? []\n })\n}\n\n/** Create one panel entry. */\nexport async function createUserPanelEntry(kind: UserPanelKind, name: string, text: string): Promise<UserPanelEntry> {\n return withBusyOperation(async () => {\n const response = await fetch(userPanelMutationRoute(kind, 'create'), {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ name, text })\n })\n const payload = (await response.json()) as { ok?: boolean; error?: string; entry?: UserPanelEntry }\n if (!response.ok || payload.ok !== true || payload.entry === undefined) throw new Error(payload.error ?? `create failed: ${response.status}`)\n return payload.entry\n })\n}\n\n/** Replace one panel entry's file content. */\nexport async function updateUserPanelEntry(kind: UserPanelKind, name: string, text: string): Promise<void> {\n return withBusyOperation(async () => {\n const response = await fetch(userPanelMutationRoute(kind, 'update', name), {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ text })\n })\n const payload = (await response.json()) as { ok?: boolean; error?: string }\n if (!response.ok || payload.ok !== true) throw new Error(payload.error ?? `save failed: ${response.status}`)\n })\n}\n\n/** Delete one panel entry. */\nexport async function deleteUserPanelEntry(kind: UserPanelKind, name: string): Promise<void> {\n return withBusyOperation(async () => {\n const response = await fetch(userPanelMutationRoute(kind, 'delete'), {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ name })\n })\n const payload = (await response.json()) as { ok?: boolean; error?: string }\n if (!response.ok || payload.ok !== true) throw new Error(payload.error ?? `delete failed: ${response.status}`)\n })\n}\n","/** zh/en dictionaries for the Agent Plugins Market section. */\n\nexport type Dictionary = Record<string, string>\n\n/** Chinese is the source-of-truth key set; English is checked against it below. */\nexport const zh = {\n nav: 'Agent Plugins 市场',\n detailPreview: '预览',\n serverConfigReadOnly: '此服务由宿主管理,请在原始配置中编辑。',\n lspServerName: '服务名称',\n lspAddTitle: '新增 LSP 服务',\n detailMarkdown: 'Markdown 编辑',\n detailMetadata: '元数据',\n detailForm: '表单',\n detailJson: 'JSON',\n detailInvalidJson: 'JSON 无效',\n detailUseJson: '当前字段类型无法使用表单,请在 JSON 中修正。',\n detailTransport: '传输协议',\n detailCommand: '启动命令',\n detailArgs: '启动参数',\n detailEnv: '环境变量',\n detailUrl: '服务 URL',\n detailHeaders: 'HTTP 请求头',\n detailCwd: '工作目录',\n detailScope: 'OAuth scope',\n detailExtensions: '扩展名与语言映射',\n detailKey: '键',\n detailValue: '值',\n detailUniqueKeys: '键不能为空或重复',\n subtitle: '发现与安装 Agent Plugins(agent-plugins.org 便携包)',\n searchPh: '搜索 Agent Plugins…',\n tabAll: '全部',\n tabInstalled: '已安装',\n tabUninstalled: '未安装',\n market: '仓库源',\n addSource: '添加源',\n sourceIdPh: '源 id(小写字母数字)',\n sourceUrlPh: 'git 仓库地址',\n sourceUrlLocalPh: '本地仓库路径(绝对路径或 ~/…)',\n sourceUrlArchivePh: '压缩包地址(.zip / .tar.gz)',\n sourceModeGit: '远程 git',\n sourceModeArchive: '压缩包',\n sourceModeLocal: '本地目录',\n branchPh: '分支(可选)',\n sourceLocal: '本地',\n sourceArchive: '压缩包',\n sourceFoldExpand: '展开全部',\n sourceFoldCollapse: '收起',\n sha256Ph: 'SHA-256(可选,64 位十六进制)',\n unmanagedTitle: '检测到未登记的本地仓库:',\n unmanagedAdopt: '收编为源(只登记,不克隆不删除)',\n unmanagedNoRemote: '非 git 目录:将以本地目录形式登记',\n editSource: '编辑当前源',\n editSourceTitle: '编辑仓库源',\n addSourceTitle: '新增仓库源',\n save: '保存',\n confirmDelete: '确认删除',\n refreshAll: '刷新全部',\n detailTitle: 'Agent Plugins 详情',\n overviewSection: '概览',\n skillsSection: '技能',\n mcpSection: 'MCP 服务',\n commandsSection: '命令',\n agentsSection: '子代理',\n hooksLabel: 'Hooks',\n sourceLabel: '来源',\n dimensionLabel: '维度',\n layoutLabel: '布局',\n statusLabel: '状态',\n authorLabel: '作者',\n keywordsLabel: '关键词',\n disabledLabel: '已停用',\n notInstalledLabel: '未安装',\n surfaceTogglesSection: '运行时注入开关',\n surfaceTogglesHint: '按能力面控制注入:关闭后立即卸载对应注入(技能 / MCP / Hooks / 命令 / 子代理 / LSP)',\n mcpOverrideDisabledBadge: '已停用',\n noSkills: '(无技能)',\n noMcp: '(无 MCP 服务)',\n loading: '加载中…',\n lspSection: 'LSP 服务',\n editorHint: '仓库源提供 Agent Plugins。本地目录直接读取(实时反映工作树);git 源克隆到 ~/.dsh/agent-plugins/.sources/<id>。',\n idHint: '小写字母/数字/连字符,全局唯一',\n urlGitHint: 'git 仓库地址,例如 https://github.com/org/repo.git',\n urlArchiveHint: 'HTTPS 压缩包地址,例如 https://example.com/plugin.zip;下载后解压为源目录',\n urlLocalHint: '绝对路径或 ~/…,直接读取本地目录(不克隆、移除源时不会删除)',\n branchHint: '可选;不填则跟踪默认分支',\n sha256Hint: '可选;填写后校验下载内容的 SHA-256,不匹配即拒绝安装',\n idFixed: 'id 不可修改(源标识全局唯一)',\n progressStarting: '正在提交…',\n progressCloning: '正在克隆仓库(git clone),可能需要几十秒…',\n progressDownloading: '正在下载并解压压缩包,可能需要几十秒…',\n progressReading: '正在读取插件清单…',\n idAutoLabel: '源 ID(自动生成)',\n idAutoHint: '自动从插件清单名或仓库名解析,无需填写',\n detailHint: '点击技能或 MCP 服务行可展开查看详情',\n add: '添加',\n remove: '移除',\n refresh: '刷新',\n install: '安装',\n installing: '安装中…',\n installedBadge: '已安装',\n uninstall: '卸载',\n uninstallConfirmTitle: '卸载 Agent Plugins',\n uninstallConfirmDesc: '将从已安装列表移除该 Agent Plugins,其技能与 MCP 工具随即停止注入。仓库源克隆保留。',\n installConfirmTitle: '确认安装',\n installConfirmDesc: '安装后以下能力将注入当前会话。请确认来源可信,详情可查看插件卡片。',\n installConfirmAction: '确认安装',\n installConfirmNoSurfaces: '该套件未声明任何运行时能力。',\n installConfirmExecutable: '风险提示:安装后将启动该套件的 MCP 子进程并挂载 hooks(第三方代码)。请确认来源可信后再安装。',\n installConfirmSource: '来源',\n installConfirmLocalTree: '本地目录(工作树,未锁定提交)',\n removeSourceConfirmTitle: '移除仓库源「{sourceId}」',\n removeSourceConfirmDesc: '将删除该源的本地克隆与全部安装记录。',\n enable: '启用',\n disable: '禁用',\n cancel: '取消',\n confirm: '确认',\n empty: '没有匹配的 Agent Plugins',\n installedEmpty: '还没有安装 Agent Plugins',\n loadFail: 'Agent Plugins 目录加载失败,请稍后重试',\n actionFail: '操作失败',\n version: '版本',\n dimensionUser: '用户级',\n dimensionProject: '项目级',\n layoutV1: '便携 v1',\n layoutCC: 'Claude Code',\n layoutCodex: 'Codex',\n layoutSkills: '技能集合',\n layoutUniversal: '通用',\n layoutCursor: 'Cursor',\n layoutKimi: 'Kimi',\n layoutZcode: 'ZCode',\n layoutQoder: 'Qoder CLI',\n layoutCopilot: 'GitHub Copilot',\n layoutRemote: '远程引用',\n layoutProjectNative: '项目原生',\n remoteRef: '远程',\n surfaceSkills: '技能',\n surfaceMcp: 'MCP',\n surfaceHooks: 'Hooks',\n surfaceCommands: '命令',\n surfaceAgents: '子代理',\n surfaceLsp: 'LSP',\n sourceNotCloned: '未克隆',\n sourceCloned: '已克隆',\n errors: '校验问题',\n scanNotes: '扫描提示',\n sourceErrorSeparator: ';',\n viewMode: '视图模式',\n grid: '网格',\n list: '列表',\n openSettings: '在设置中打开',\n rootLabel: 'Agent Plugins 目录',\n dataLabel: 'Agent Plugins 数据目录',\n countAll: '共 {n} 个 Agent Plugins',\n countInstalled: '已装 {n}',\n countEnabled: '启用 {n}',\n mcpStatusNav: 'MCP 服务',\n lspStatusNav: 'LSP 服务',\n lspSearch: '搜索 LSP 服务',\n lspAllMounted: '全部已挂载',\n lspDirect: '直接安装',\n mcpStatusTitle: 'MCP 服务',\n mcpStatusSubtitle: '连接状态、来源和工具清单',\n mcpSearch: '搜索 MCP 名称、来源或地址…',\n mcpAll: '全部',\n mcpPlugin: 'Plugin',\n mcpDirect: '直接安装',\n mcpService: '服务',\n mcpSource: '来源',\n mcpTransport: '传输',\n mcpTools: '工具',\n mcpTool: '工具',\n mcpAllConnected: '全部已连接',\n mcpReasonLabel: '原因',\n mcpRetryNote: '已自动重试多次仍失败。点击「重试」立即重连,或在插件市场中检查该服务的配置。',\n mcpRetrying: '正在重连…',\n mcpRetrySuccess: '重连成功,服务已恢复',\n mcpRetryFailure: '重连失败,请检查原因说明',\n mcpReauthorize: '重新授权',\n mcpClose: '关闭',\n mcpRetryConnection: '重试连接',\n mcpRetryPreservesCredentials: '重新尝试连接失败的托管服务;保留已有凭据。此操作会检查所有托管 MCP 服务。',\n mcpReauthExplain: '这将清除本服务已保存的 OAuth 授权并重新连接,可能中断正在使用它的请求。仅在需要更换账号或授权权限时使用;若服务要求登录,请在打开的浏览器页面完成授权。',\n mcpConfirmReauth: '清除授权并重新连接',\n mcpSaveFirst: '请先保存配置,再执行连接操作;连接操作只使用已保存的配置。',\n mcpStillUnavailable: '操作已执行,但当前尚未确认服务已连接,请检查连接状态和错误原因',\n mcpConfigureCredentialsFirst: '请先在凭据配置中填写缺失的凭据;重试连接不会自动补齐凭据。',\n mcpSavedStatusUnknown: '配置已保存,但无法刷新连接状态',\n mcpEntryGone: '服务已不在当前列表中,请关闭详情并刷新',\n mcpConnect: '连接',\n mcpReauthorizing: '等待浏览器授权…',\n marketCardDesc: 'Agent Plugins 市场套件的安装、启用与运行时行为配置。',\n mcpCardTitle: 'MCP 增强模式',\n mcpCardDescOn: '已开启:支持 OAuth 授权、SSE、授权保持等功能。',\n mcpCardDescOff: '已关闭:使用宿主 dsh-mcp-client。',\n mcpCardReadonly: '当前环境设置文档只读,无法切换。',\n mcpForeign: '已由其他客户端挂载',\n mcpForeignHint:\n '该服务器已通过其他途径(原生配置或另一插件)挂载了同名 MCP,市场已跳过以避免重复挂载。如需由市场接管,请先停用另一来源的该服务器;若确认是残留挂载,重启宿主即可清除。',\n mcpDuplicateHint: '另一来源已挂载了相同的服务器,本副本未注册——同一服务器挂载两份对模型没有额外意义。卸载另一来源的套件后,本副本会在下次刷新时自动接管。',\n regionLabel: '下载区域',\n regionHint: '中国大陆走镜像线路,仅影响下载线路。',\n regionGlobal: '全球',\n regionChina: '中国大陆',\n mcpBackendHostMissing: '宿主 dsh-mcp-client 在当前环境不可用,无法切换到兼容模式。',\n mcpReauthHint: '删除已保存的授权令牌并重新走浏览器授权——用于权限范围选少了的场景。点击后请在弹出的页面完成登录。',\n mcpConnectHint: '删除旧的授权记录并重新发起浏览器登录。点击后请在弹出的页面完成授权,服务会自动连接。',\n mcpReauthSuccess: '已清除旧授权,请在弹出的浏览器页面重新登录',\n mcpReauthFailure: '重新授权失败,请稍后重试',\n mcpZeroTools: '该服务已连接,但未声明任何工具。',\n mcpConnected: '已连接',\n mcpDegraded: '降级',\n mcpFailed: '失败',\n mcpNeedsCredentials: '需要凭据',\n mcpOrphaned: '插件已卸载,工具残留',\n mcpConfigureCredentials: '配置凭据',\n mcpViewDetails: '查看详情',\n mcpCredentialTitle: '凭据配置',\n mcpCredentialConfigured: '已配置',\n mcpCredentialMissing: '未配置',\n mcpCredentialReadOnly: '由启动环境提供(只读;修改后需重启 DSH)',\n mcpCredentialUnavailable: '当前 profile 未提供凭据服务,请在启动 DSH 前设置环境变量。',\n mcpCredentialPlaceholder: '输入凭据(不会回显)',\n mcpCredentialSave: '保存凭据',\n mcpCredentialUnset: '删除凭据',\n mcpDisabled: '未启用',\n mcpObservedEndpoint: '当前工具表观测',\n mcpServiceDetail: '服务详情',\n mcpConfig: '连接配置',\n mcpSelectHint: '选择一个 MCP 服务查看配置与工具',\n mcpEmpty: '没有匹配的 MCP 服务',\n mcpNoTools: '当前没有已注册工具',\n mcpDirectConfigUnavailable: '宿主未提供直接安装 MCP 的配置记录',\n mcpDirectBoundary: '直接安装 MCP 仅显示当前工具表中可观测的服务;宿主未提供配置与连接状态 API。',\n mcpEnabled: '启用 MCP 服务',\n mcpAddTitle: '新增 MCP 服务',\n mcpServerName: '服务名称',\n mcpServerConfig: '服务配置(JSON)',\n mcpBackToMarket: '返回市场',\n mcpRetry: '重试',\n mcpFilterAllHint: '全部:插件套件声明的 MCP 服务与宿主直接安装的 MCP',\n mcpFilterPluginHint: 'Plugin:来自插件市场套件的 mcp.json 声明',\n mcpFilterDirectHint: '直接安装:宿主工具表中观测到、非套件来源的 MCP',\n lspStatusTitle: 'LSP 服务',\n lspStatusSubtitle: '语言服务器声明与挂载状态',\n lspAll: '全部',\n lspMounted: '已挂载',\n lspStarting: '启动中…',\n lspBlocked: '被阻塞',\n lspFailed: '失败',\n lspDisabled: '未启用',\n lspHostMissingShort: '宿主缺失',\n lspConflict: '扩展冲突',\n lspHostMissing: '当前 DSH 运行时未携带 LSP 组件(@deepseek-ai/dsh-lsp、dsh-lsp-stdio、dsh-tool-lsp),声明不会被挂载;升级宿主并在 profile 中挂载这三层后重新启用套件即可。',\n lspEmpty: '没有已声明的 LSP 服务器',\n lspReasonLabel: '原因',\n lspFilterAllHint: '全部:套件声明与用户自配的全部语言服务器',\n lspFilterPluginHint: 'Plugin:来自插件市场套件的内联 lspServers 声明',\n lspFilterDirectHint: '直接安装:用户自行配置的语言服务器(本面板配置)',\n lspFilterBlockedHint: '被阻塞:缺宿主组件、挂载失败或扩展冲突,点击卡片查看原因',\n lspFilterDisabledHint: '未启用:套件的 LSP 能力面开关已关闭',\n lspPlugin: 'Plugin',\n lspConfigure: '配置 LSP',\n lspConfigureHint: '编辑用户自配的语言服务器表(Claude Code lspServers 格式),保存后自动挂载',\n lspEnabled: '启用 LSP 服务',\n lspSave: '保存',\n lspDetailSubtitle: '语言服务器详情',\n lspDetailCommand: '启动命令',\n lspDetailExtensions: '扩展映射',\n mdCodeCopy: '复制',\n mdCodeCopied: '已复制',\n mdFootnotes: '脚注',\n /* ---- Workspace tabs (R10) ---- */\n workspaceTabMarket: '插件市场',\n workspaceTabSkills: '技能',\n workspaceTabCommands: '命令',\n workspaceTabPersonas: '代理角色',\n workspaceTabMcp: 'MCP 服务',\n workspaceTabLsp: 'LSP 服务',\n /* ---- Shared panel copy (R6/R7/R8/R9) ---- */\n personaRuntimeConfig: '运行配置',\n personaModel: '模型',\n personaReasoningEffort: '思考强度',\n personaEffortAutomatic: '自动',\n personaEffortModelDefault: '模型默认',\n personaEffortSaved: '已保存',\n personaProvider: '模型供应商',\n personaInherit: '继承主会话',\n personaSelectModel: '选择模型',\n personaUnavailable: '当前不可用',\n personaCatalogError: '无法读取 DSH 模型目录',\n personaTools: '允许使用的工具',\n personaModelHint: '模型目录来自 DSH;选择继承时沿用主会话配置。',\n personaToolsHint: '工具名称以逗号分隔;留空继承可用工具。原始 YAML 同样支持 tools 数组。',\n personaMetadataInvalid: '请先修复原始 YAML,才能使用运行配置。',\n panelDetails: '查看详情',\n panelSave: '保存',\n panelSourceUser: '用户',\n panelSourcePlugin: '插件',\n panelWorking: '正在执行…',\n busyHintProcessing: '正在处理请求,请稍候。',\n busyHintRefresh: '操作完成后,将自动更新当前视图。',\n busyHintWaiting: '等待时间取决于本地服务和网络响应。',\n panelSearchLabel: '搜索条目…',\n panelFilterAll: '全部',\n panelFilterDisabled: '已禁用',\n panelAdd: '新增',\n panelAddTitle: '新增条目',\n panelEditTitle: '编辑条目',\n panelNamePh: '名称(小写字母/数字/连字符)',\n panelTextPh: '内容(Markdown,frontmatter 可选)',\n panelDeleteTitle: '删除「{name}」',\n panelDeleteDesc: '将永久删除该条目文件({path}),此操作不可撤销。',\n panelEmpty: '暂无条目,点击右上角 + 新增',\n panelDisabledBadge: '已禁用',\n panelDelete: '删除',\n commandsPanelHint: '命令是聊天时的「快捷回复」:输入 /名称 即可把模板正文(含 $ARGUMENTS 占位符)作为指令转交模型执行。',\n skillsPanelDescription: '查看已加载技能,并维护用户技能。',\n commandsPanelDescription: '查看插件和用户命令。',\n personasPanelDescription: '查看插件代理角色与用户角色卡,维护常用的 SubAgent 设定。',\n panelDraftSkillDesc: '这个技能的用途描述(模型据此判断何时调用)',\n panelDraftSkillBody: '# 技能正文\\n\\n在这里写给模型的指令。',\n panelDraftCommandDesc: '命令的用途描述',\n panelDraftCommandBody: '请处理以下请求',\n panelDraftPersonaDesc: '角色卡描述(何时使用该角色)',\n panelDraftPersonaBody: '# 角色设定\\n\\n在这里写角色卡正文(系统指令)。',\n /* ---- Remove source dialog (R3) ---- */\n removeSourceDeleteFiles: '同时删除市场目录(外部本地源不会删除)',\n removeSourceKeepFiles: '仅取消登记,保留本地目录',\n feedbackToggleLabel: '体验反馈工具',\n projectLayoutsLabel: '扫描项目 Agent 布局',\n feedbackToggleDescOn: '已开启:Agent 遇到本插件的问题时可自动提交 issue 反馈。',\n feedbackToggleDescOff: '已关闭:Agent 无法自动提交反馈。'\n}\n\nexport type LocaleKey = keyof typeof zh\n\nexport const en: Record<LocaleKey, string> = {\n nav: 'Agent Plugins Market',\n detailPreview: 'Preview',\n serverConfigReadOnly: 'This service is managed by the host. Edit its original configuration.',\n lspServerName: 'Server name',\n lspAddTitle: 'New LSP server',\n detailMarkdown: 'Edit Markdown',\n detailMetadata: 'Metadata',\n detailForm: 'Form',\n detailJson: 'JSON',\n detailInvalidJson: 'Invalid JSON',\n detailUseJson: 'These field types cannot be edited as a form. Correct them in JSON.',\n detailTransport: 'Transport',\n detailCommand: 'Command',\n detailArgs: 'Arguments',\n detailEnv: 'Environment variables',\n detailUrl: 'Server URL',\n detailHeaders: 'HTTP headers',\n detailCwd: 'Working directory',\n detailScope: 'OAuth scope',\n detailExtensions: 'Extension-to-language mapping',\n detailKey: 'Key',\n detailValue: 'Value',\n detailUniqueKeys: 'Keys must be non-empty and unique',\n subtitle: 'Discover and install Agent Plugins suites (agent-plugins.org portable packages)',\n searchPh: 'Search suites…',\n tabAll: 'All',\n tabInstalled: 'Installed',\n tabUninstalled: 'Uninstalled',\n market: 'Sources',\n addSource: 'Add source',\n sourceIdPh: 'source id (lowercase alnum)',\n sourceUrlPh: 'git repository URL',\n sourceUrlLocalPh: 'local repository path (absolute or ~/…)',\n sourceUrlArchivePh: 'archive URL (.zip / .tar.gz)',\n sourceModeGit: 'remote git',\n sourceModeArchive: 'archive',\n sourceModeLocal: 'local dir',\n branchPh: 'branch (optional)',\n sourceLocal: 'local',\n sourceArchive: 'archive',\n sourceFoldExpand: 'Show all',\n sourceFoldCollapse: 'Show less',\n sha256Ph: 'SHA-256 (optional, 64 hex chars)',\n unmanagedTitle: 'Unregistered local checkouts found:',\n unmanagedAdopt: 'Adopt as a source (register only — no clone, no deletion)',\n unmanagedNoRemote: 'Not a git checkout: registered as a local directory source',\n editSource: 'Edit source',\n editSourceTitle: 'Edit source',\n addSourceTitle: 'Add source',\n save: 'Save',\n confirmDelete: 'Delete',\n refreshAll: 'Refresh all',\n detailTitle: 'Suite details',\n overviewSection: 'Overview',\n skillsSection: 'Skills',\n mcpSection: 'MCP servers',\n commandsSection: 'Commands',\n agentsSection: 'Subagents',\n hooksLabel: 'Hooks',\n sourceLabel: 'Source',\n dimensionLabel: 'Dimension',\n layoutLabel: 'Layout',\n statusLabel: 'Status',\n authorLabel: 'Author',\n keywordsLabel: 'Keywords',\n disabledLabel: 'disabled',\n notInstalledLabel: 'not installed',\n surfaceTogglesSection: 'Runtime injection toggles',\n surfaceTogglesHint: 'Control injection per surface: turning one off unmounts that surface immediately (skills / MCP / hooks / commands / subagents / LSP)',\n mcpOverrideDisabledBadge: 'disabled',\n noSkills: '(no skills)',\n noMcp: '(no MCP servers)',\n loading: 'Loading…',\n lspSection: 'LSP servers',\n editorHint: 'A source provides suites (Agent Plugins). Local directories are read in place (live working tree); git sources clone into ~/.dsh/agent-plugins/.sources/<id>.',\n idHint: 'lowercase letters / digits / hyphens, globally unique',\n urlGitHint: 'git repository URL, e.g. https://github.com/org/repo.git',\n urlArchiveHint: 'HTTPS archive URL, e.g. https://example.com/plugin.zip — downloaded and extracted as the source directory',\n urlLocalHint: 'absolute path or ~/…, read in place (never cloned, never deleted on removal)',\n branchHint: 'optional; defaults to the repository default branch',\n sha256Hint: 'optional; when set, the download SHA-256 is verified and mismatches reject the install',\n idFixed: 'id is fixed (the source identifier is globally unique)',\n progressStarting: 'Submitting…',\n progressCloning: 'Cloning the repository (git clone) — this can take tens of seconds…',\n progressDownloading: 'Downloading and extracting the archive — this can take tens of seconds…',\n progressReading: 'Reading plugin manifests…',\n idAutoLabel: 'Source ID (auto)',\n idAutoHint: 'Derived from the suite or repo name — no need to type it',\n detailHint: 'Click a skill or MCP server row to expand its details',\n add: 'Add',\n remove: 'Remove',\n refresh: 'Refresh',\n install: 'Install',\n installing: 'Installing…',\n installedBadge: 'Installed',\n uninstall: 'Uninstall',\n uninstallConfirmTitle: 'Uninstall suite',\n uninstallConfirmDesc: 'Removes the suite from the installed list; its skills and MCP tools stop injecting. The source clone stays.',\n installConfirmTitle: 'Confirm install',\n installConfirmDesc: 'After install, the surfaces below inject into your sessions. Confirm you trust the source; see the suite card for details.',\n installConfirmAction: 'Install',\n installConfirmNoSurfaces: 'This suite declares no runtime surfaces.',\n installConfirmExecutable: \"Risk notice: installing starts this suite's MCP child processes and mounts hooks (third-party code). Install only if you trust the source.\",\n installConfirmSource: 'Source',\n installConfirmLocalTree: 'Local directory (working tree, no locked commit)',\n removeSourceConfirmTitle: 'Remove source “{sourceId}”',\n removeSourceConfirmDesc: 'Deletes the local clone and all install records of this source.',\n enable: 'Enable',\n disable: 'Disable',\n cancel: 'Cancel',\n confirm: 'Confirm',\n empty: 'No matching suites',\n installedEmpty: 'No suites installed yet',\n loadFail: 'Failed to load the suite catalog, try again later',\n actionFail: 'Action failed',\n version: 'Version',\n dimensionUser: 'user',\n dimensionProject: 'project',\n layoutV1: 'portable v1',\n layoutCC: 'Claude Code',\n layoutCodex: 'Codex',\n layoutSkills: 'skill dir',\n layoutUniversal: 'universal',\n layoutCursor: 'Cursor',\n layoutKimi: 'Kimi',\n layoutZcode: 'ZCode',\n layoutQoder: 'Qoder CLI',\n layoutCopilot: 'GitHub Copilot',\n layoutRemote: 'remote reference',\n layoutProjectNative: 'project native',\n remoteRef: 'remote',\n surfaceSkills: 'skills',\n surfaceMcp: 'MCP',\n surfaceHooks: 'hooks',\n surfaceCommands: 'commands',\n surfaceAgents: 'subagents',\n surfaceLsp: 'LSP',\n sourceNotCloned: 'not cloned',\n sourceCloned: 'cloned',\n errors: 'validation issues',\n scanNotes: 'scan notes',\n sourceErrorSeparator: '; ',\n viewMode: 'View mode',\n grid: 'grid',\n list: 'list',\n openSettings: 'Open in settings',\n rootLabel: 'Suite root',\n dataLabel: 'Suite data root',\n countAll: '{n} suites',\n countInstalled: '{n} installed',\n countEnabled: '{n} enabled',\n mcpStatusNav: 'MCP services',\n lspStatusNav: 'LSP servers',\n lspSearch: 'Search LSP servers',\n lspAllMounted: 'All mounted',\n lspDirect: 'Direct',\n mcpStatusTitle: 'MCP services',\n mcpStatusSubtitle: 'Connection state, sources, and tools',\n mcpSearch: 'Search MCP names, sources, or endpoints…',\n mcpAll: 'All',\n mcpPlugin: 'Plugin',\n mcpDirect: 'Direct',\n mcpService: 'Service',\n mcpSource: 'Source',\n mcpTransport: 'Transport',\n mcpTools: 'tools',\n mcpTool: 'tool',\n mcpAllConnected: 'All connected',\n mcpReasonLabel: 'Reason',\n mcpRetryNote: 'Automatic retries were exhausted. Use Retry to reconnect now, or check the server configuration in the market.',\n mcpRetrying: 'Reconnecting…',\n mcpRetrySuccess: 'Reconnected — the service is live again',\n mcpRetryFailure: 'Reconnect failed — see the reason above',\n mcpReauthorize: 'Re-authorize',\n mcpClose: 'Close',\n mcpRetryConnection: 'Retry connection',\n mcpRetryPreservesCredentials: 'Retries failed managed connections without clearing credentials. Checks all managed MCP services.',\n mcpReauthExplain:\n 'This clears the saved OAuth grant for this service and reconnects it, which may interrupt active requests. Use it to change accounts or permissions. If sign-in is required, complete authorization in the browser page that opens.',\n mcpConfirmReauth: 'Clear authorization and reconnect',\n mcpSaveFirst: 'Save configuration before connection actions; they use saved configuration only.',\n mcpStillUnavailable: 'The operation finished, but the service is not confirmed connected. Check its status and error details',\n mcpConfigureCredentialsFirst: 'Configure the missing credentials first. Retrying cannot supply them automatically.',\n mcpSavedStatusUnknown: 'Configuration saved, but connection status could not be refreshed',\n mcpEntryGone: 'This service is no longer listed. Close the details and refresh.',\n mcpConnect: 'Connect',\n mcpReauthorizing: 'Waiting for browser authorization…',\n marketCardDesc: 'Install, enable, and runtime settings for Agent Plugins Market suites.',\n mcpCardTitle: 'MCP enhancement',\n mcpCardDescOn: 'On: enables OAuth authorization, SSE, authorization hold, and more.',\n mcpCardDescOff: 'Off: uses the host dsh-mcp-client.',\n mcpCardReadonly: 'The settings document is read-only in this environment; the switch is unavailable.',\n mcpForeign: 'Mounted elsewhere',\n mcpForeignHint:\n 'This server is already mounted through another path (native config or another plugin); the market skipped it to avoid a duplicate. To let the market take over, disable the other source first. If it is a leftover mount, a Host restart clears it.',\n mcpDuplicateHint:\n \"Another source already mounted this server, so this copy was not registered — mounting the same server twice adds nothing for the model. Uninstall the other source's suite and this copy takes over on the next refresh.\",\n regionLabel: 'Download region',\n regionHint: 'China mainland routes through a mirror. Affects the download route only.',\n regionGlobal: 'Global',\n regionChina: 'China mainland',\n mcpBackendHostMissing: 'The host dsh-mcp-client is not available here; compat mode cannot be enabled.',\n mcpReauthHint: 'Drops the saved OAuth token and re-runs the browser authorization — for when you picked too narrow a scope. Finish the sign-in in the page that opens.',\n mcpConnectHint: 'Drops the stale grant and starts a fresh browser sign-in. Approve in the page that opens and the service connects automatically.',\n mcpReauthSuccess: 'Old grant dropped — finish the sign-in in the browser page that opened',\n mcpReauthFailure: 'Re-authorization failed — try again shortly',\n mcpZeroTools: 'Connected, but this service advertises no tools.',\n mcpConnected: 'connected',\n mcpDegraded: 'degraded',\n mcpFailed: 'failed',\n mcpNeedsCredentials: 'credentials required',\n mcpOrphaned: 'plugin removed; tools remain',\n mcpConfigureCredentials: 'Configure credentials',\n mcpViewDetails: 'View details',\n mcpCredentialTitle: 'Credential configuration',\n mcpCredentialConfigured: 'configured',\n mcpCredentialMissing: 'not configured',\n mcpCredentialReadOnly: 'provided by the launch environment (read-only; restart DSH after changes)',\n mcpCredentialUnavailable: 'This profile has no credentials service. Set the environment variable before launching DSH.',\n mcpCredentialPlaceholder: 'Enter credential (not echoed)',\n mcpCredentialSave: 'Save credential',\n mcpCredentialUnset: 'Remove credential',\n mcpDisabled: 'disabled',\n mcpObservedEndpoint: 'observed from tool registry',\n mcpServiceDetail: 'Service detail',\n mcpConfig: 'Connection config',\n mcpSelectHint: 'Select an MCP service to inspect config and tools',\n mcpEmpty: 'No matching MCP services',\n mcpNoTools: 'No registered tools',\n mcpDirectConfigUnavailable: 'The host does not expose direct-MCP configuration',\n mcpDirectBoundary: 'Direct MCP entries only show services observed in the current tool registry; the host exposes no config or connection-status API.',\n mcpEnabled: 'Enable MCP service',\n mcpAddTitle: 'New MCP service',\n mcpServerName: 'Server name',\n mcpServerConfig: 'Server configuration (JSON)',\n mcpBackToMarket: 'Back to market',\n mcpRetry: 'Retry',\n mcpFilterAllHint: 'All: MCP services declared by plugin suites plus host-installed MCP',\n mcpFilterPluginHint: 'Plugin: mcp.json declarations from market suites',\n mcpFilterDirectHint: 'Direct: MCP observed in the host tool registry outside any suite',\n lspStatusTitle: 'LSP servers',\n lspStatusSubtitle: 'Declared language servers and their mount state',\n lspAll: 'All',\n lspMounted: 'Mounted',\n lspStarting: 'Starting…',\n lspBlocked: 'Blocked',\n lspFailed: 'Failed',\n lspDisabled: 'Disabled',\n lspHostMissingShort: 'Host missing',\n lspConflict: 'Extension conflict',\n lspHostMissing:\n 'This DSH runtime does not carry the LSP packages (@deepseek-ai/dsh-lsp, dsh-lsp-stdio, dsh-tool-lsp), so declarations are not mounted; upgrade the host, mount the three layers in the profile, and re-enable the suite.',\n lspEmpty: 'No declared LSP servers',\n lspReasonLabel: 'Reason',\n lspFilterAllHint: 'All: suite-declared and user-configured language servers',\n lspFilterPluginHint: 'Plugin: inline lspServers declarations from market suites',\n lspFilterDirectHint: 'Direct: user-configured language servers (configured in this panel)',\n lspFilterBlockedHint: 'Blocked: missing host packages, failed mounts, or extension conflicts — open a card for the reason',\n lspFilterDisabledHint: 'Disabled: the suite LSP surface toggle is off',\n lspPlugin: 'Plugin',\n lspConfigure: 'Configure LSP',\n lspConfigureHint: 'Edit the user-configured language-server table (Claude Code lspServers format); servers mount automatically after save',\n lspEnabled: 'Enable LSP service',\n lspSave: 'Save',\n lspDetailSubtitle: 'Language server detail',\n lspDetailCommand: 'Launch command',\n lspDetailExtensions: 'Extension map',\n mdCodeCopy: 'Copy',\n mdCodeCopied: 'Copied',\n mdFootnotes: 'Footnotes',\n workspaceTabMarket: 'Market',\n workspaceTabSkills: 'Skills',\n workspaceTabCommands: 'Commands',\n workspaceTabPersonas: 'Agent personas',\n workspaceTabMcp: 'MCP services',\n workspaceTabLsp: 'LSP servers',\n personaRuntimeConfig: 'Runtime configuration',\n personaModel: 'Model',\n personaReasoningEffort: 'Reasoning effort',\n personaEffortAutomatic: 'Automatic',\n personaEffortModelDefault: 'Model default',\n personaEffortSaved: 'Saved',\n personaProvider: 'Model provider',\n personaInherit: 'Inherit from session',\n personaSelectModel: 'Select model',\n personaUnavailable: 'Currently unavailable',\n personaCatalogError: 'Unable to load the DSH model directory',\n personaTools: 'Allowed tools',\n personaModelHint: 'Models come from DSH. Inheritance uses the session configuration.',\n personaToolsHint: 'Separate tool names with commas; leave blank to inherit available tools. Raw YAML also accepts a tools sequence.',\n personaMetadataInvalid: 'Fix the raw YAML before editing runtime configuration.',\n panelDetails: 'View details',\n panelSave: 'Save',\n panelSourceUser: 'user',\n panelSourcePlugin: 'plugin',\n panelWorking: 'Working…',\n busyHintProcessing: 'Your request is being processed. Please wait.',\n busyHintRefresh: 'The current view will update when the operation finishes.',\n busyHintWaiting: 'Waiting time depends on local services and network responses.',\n panelSearchLabel: 'Search entries…',\n panelFilterAll: 'All',\n panelFilterDisabled: 'Disabled',\n panelAdd: 'Add',\n panelAddTitle: 'New entry',\n panelEditTitle: 'Edit entry',\n panelNamePh: 'Name (lowercase letters / digits / dashes)',\n panelTextPh: 'Content (Markdown, optional frontmatter)',\n panelDeleteTitle: 'Delete “{name}”',\n panelDeleteDesc: 'Permanently deletes the entry file ({path}). This cannot be undone.',\n panelEmpty: 'No entries yet — use + to add one',\n panelDisabledBadge: 'disabled',\n panelDelete: 'Delete',\n commandsPanelHint: 'Commands are chat quick-replies: typing /name forwards the template body (with $ARGUMENTS) to the model as instructions.',\n skillsPanelDescription: 'Inspect loaded plugin and user skills, and maintain user skills.',\n commandsPanelDescription: 'Inspect plugin and user commands.',\n personasPanelDescription: 'Inspect plugin agent roles and user persona cards and maintain reusable SubAgent setups.',\n panelDraftSkillDesc: 'What this skill is for (the model routes on this description)',\n panelDraftSkillBody: '# Skill body\\n\\nWrite the model-facing instructions here.',\n panelDraftCommandDesc: 'What this command does',\n panelDraftCommandBody: 'Handle the following request',\n panelDraftPersonaDesc: 'Persona description (when to use this role)',\n panelDraftPersonaBody: '# Persona\\n\\nWrite the role card (system instructions) here.',\n removeSourceDeleteFiles: 'Also delete the managed market directory (external local sources are never deleted)',\n removeSourceKeepFiles: 'Unregister only; keep the local directory',\n feedbackToggleLabel: 'Experience feedback tool',\n projectLayoutsLabel: 'Scan project Agent layouts',\n feedbackToggleDescOn: 'On: the agent may auto-file an issue when it hits a problem in this plugin.',\n feedbackToggleDescOff: 'Off: the agent cannot auto-file feedback.'\n}\n","/** Market overview cache, invalidation, and source-progress resource helpers. */\nimport { fetchOverview, fetchSourceProgress, type OverviewData, type SourceProgress } from '../../api.js'\n\n/** UI state emitted while a source mutation is in flight. */\nexport interface SourceProgressState {\n step: string | undefined\n error: string | undefined\n}\n\nconst EMPTY_OVERVIEW: OverviewData = { sources: [], suites: [], totals: { all: 0, installed: 0, enabled: 0 }, roots: { user: '', data: '' }, unmanaged: [] }\n\nlet cachedOverview: OverviewData | undefined\nlet inflightOverview: Promise<OverviewData> | undefined\n\n/** Load the last overview immediately and revalidate one shared request. */\nexport function loadOverview(): { initial: OverviewData; revalidating: boolean; promise: Promise<OverviewData> } {\n const initial = cachedOverview ?? EMPTY_OVERVIEW\n if (inflightOverview === undefined) {\n inflightOverview = fetchOverview()\n .then(data => {\n cachedOverview = data\n return data\n })\n .finally(() => {\n inflightOverview = undefined\n })\n }\n return { initial, revalidating: cachedOverview === undefined, promise: inflightOverview }\n}\n\n/** Invalidate the shared overview after a mutating action. */\nexport function invalidateOverview(): void {\n cachedOverview = undefined\n}\n\n/**\n * Poll source mutation progress until stopped. Poll failures remain silent\n * because the add-source request is authoritative for mutation success.\n */\nexport function startSourceProgressPolling(\n report: (state: SourceProgressState) => void,\n resolveStep: (step: SourceProgress['step']) => string = step => step\n): { stop: () => void } {\n let stopped = false\n let timer: ReturnType<typeof setTimeout> | undefined\n const tick = async (): Promise<void> => {\n if (stopped) return\n try {\n const progress = await fetchSourceProgress()\n if (!stopped && progress.active) report({ step: resolveStep(progress.step), error: undefined })\n } catch {\n // Transient poll failures are ignored; the add request reports real errors.\n }\n if (!stopped)\n timer = setTimeout(() => {\n void tick()\n }, 800)\n }\n timer = setTimeout(() => {\n void tick()\n }, 400)\n return {\n stop: () => {\n stopped = true\n if (timer !== undefined) clearTimeout(timer)\n }\n }\n}\n","/** Pure market filtering and count derivation. */\nimport type { OverviewData, SuiteCardData } from '../../api.js'\n\n/** Market status filter. */\nexport type MarketFilter = 'all' | 'installed' | 'uninstalled'\n/** Market source scope. */\nexport type MarketCategory = 'all' | string\n\n/** Derived market view data used by the screen and its toolbar. */\nexport interface MarketViewModel {\n scopeTotals: { all: number; installed: number; enabled: number }\n filtered: SuiteCardData[]\n}\n\ninterface SearchableSuite {\n suite: SuiteCardData\n haystack: string\n}\n\nconst searchableCache = new WeakMap<OverviewData, SearchableSuite[]>()\n\n/** Derive visible cards and scope counts in one pass over a normalized payload. */\nexport function deriveMarketViewModel(overview: OverviewData, search: string, filter: MarketFilter, category: MarketCategory): MarketViewModel {\n const searchable = searchableFor(overview)\n const needle = search.trim().toLowerCase()\n let all = 0\n let installed = 0\n let enabled = 0\n const visible: SuiteCardData[] = []\n\n for (const entry of searchable) {\n const suite = entry.suite\n if (category !== 'all' && suite.sourceId !== category) continue\n all++\n if (suite.installed) installed++\n if (suite.enabled) enabled++\n if (filter === 'installed' && !suite.installed) continue\n if (filter === 'uninstalled' && suite.installed) continue\n if (needle !== '' && !entry.haystack.includes(needle)) continue\n visible.push(suite)\n }\n\n return { scopeTotals: { all, installed, enabled }, filtered: visible }\n}\n\nfunction searchableFor(overview: OverviewData): SearchableSuite[] {\n const cached = searchableCache.get(overview)\n if (cached !== undefined) return cached\n const searchable = overview.suites.map(suite => ({\n suite,\n haystack: `${suite.name} ${suite.description ?? ''} ${suite.keywords.join(' ')}`.toLowerCase()\n }))\n searchableCache.set(overview, searchable)\n return searchable\n}\n","/**\n * Agent Plugins Market section styles. Colors ride the dsh --dsw-alias-* tokens with\n * light-mode fallbacks so the page follows the active theme; the section\n * lives inside the settings dialog, so it scrolls within the dialog and\n * never takes over the app frame.\n */\n\n.market {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 24px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n/* Page mode owns the outer padding; settings mode receives it from the host shell.\n Page mode is a fixed inset-0 shell, so it owns the height and its lists scroll\n inside it; settings mode lets the host `.options` container be the only scroller\n (nested scrollers double-scroll and can paint text outside card bounds). */\n.pageMode {\n height: 100%;\n min-height: 0;\n width: 100%;\n min-width: 0;\n}\n\n.marketControls {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-height: 0;\n}\n\n.mcpSurface {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.surfaceSwitch {\n flex: none;\n align-self: center;\n height: 26px;\n padding: 0 10px;\n border: 1px solid var(--dsw-alias-border-l2, #d4dce8);\n border-radius: 7px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: var(--dsw-alias-brand-primary, #4966f5);\n cursor: pointer;\n font-size: 11px;\n}\n\n.surfaceSwitch:hover {\n background: var(--dsw-alias-state-business-tertiary, rgb(228, 237, 253));\n}\n\n/* Legacy page-mode shell: scoped to the injected data attributes. */\n:global(html[data-dsh-agent-plugins-market-page]) :global([data-pane='conversation']),\n:global(html[data-dsh-agent-plugins-market-page]) :global([class*='centerCol']) {\n position: relative;\n}\n\n.pageView {\n position: absolute;\n inset: 0;\n display: none;\n z-index: 60;\n min-width: 0;\n min-height: 0;\n padding: 20px 24px;\n overflow: hidden;\n background: var(--dsw-alias-bg-base, #f7f8fa);\n}\n\n:global(html[data-dsh-agent-plugins-market-page]) .pageView {\n display: flex;\n}\n\n:global(html[data-dsh-agent-plugins-market-page]) :global([data-pane='conversation']) > :not([data-dsh-agent-plugins-market-page-view]),\n:global(html[data-dsh-agent-plugins-market-page]) :global([class*='centerCol']) > :not([data-dsh-agent-plugins-market-page-view]) {\n display: none !important;\n}\n\n.pageEntry {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 32px;\n padding: 6px 12px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1f2328);\n cursor: pointer;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n text-align: left;\n}\n\n.pageEntry:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n}\n\n.pageEntry:active {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, 0.1));\n}\n\n.pageEntry svg {\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary, #6b7280);\n}\n\n.pageEntry span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n:global([data-dsh-frame][data-sidebar-collapsed]) .pageEntry {\n justify-content: center;\n padding-inline: 0;\n}\n\n:global([data-dsh-frame][data-sidebar-collapsed]) .pageEntry span {\n display: none;\n}\n\n.pageEntry:focus-visible,\n.srcTabMain:focus-visible,\n.srcTabEdit:focus-visible,\n.srcTabDel:focus-visible,\n.seg:focus-visible,\n.segOn:focus-visible,\n.detailItemRow:focus-visible,\n.detailItemOpen:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 2px;\n}\n\n.header {\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.titleRow {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n}\n\n.sub {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n margin: 0;\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.spacer {\n flex: 1;\n}\n\n.searchGroup {\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.body {\n display: flex;\n gap: 20px;\n min-height: 0;\n flex: 1;\n align-items: flex-start;\n}\n\n/* --- source tabs (top, primary) -------------------------------------------------- */\n\n/* Equal-width pill grid, exactly as the header always laid chips out. When the\n list needs more than two rows the strip folds to that height and the grid is\n lifted out of the flow, so hovering or focusing it expands as an overlay —\n the card grid below never moves. */\n.sourceTabsBox {\n position: relative;\n min-width: 0;\n}\n\n.sourceTabsRow {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));\n gap: 4px;\n min-width: 0;\n}\n\n/* Folded: two 24px rows plus the 4px gap, with 6px of overlay padding above\n only — a bottom pad would paint a white band over the toolbar below. */\n.sourceTabsBoxFold {\n height: 52px;\n}\n\n.sourceTabsBoxFold .sourceTabsRow {\n position: absolute;\n inset: -6px -6px auto;\n box-sizing: border-box;\n max-height: 58px;\n overflow: hidden;\n padding: 6px 6px 0;\n background: var(--dsw-alias-bg-layer-1, #fff);\n border-radius: 10px;\n transition: max-height 160ms ease, box-shadow 160ms ease, padding-bottom 160ms ease;\n /* The fade is the only affordance that more sources exist below the fold. */\n -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);\n mask-image: linear-gradient(180deg, #000 78%, transparent 100%);\n}\n\n/* Hover, or keyboard focus — `:focus-visible`, never plain `:focus-within`:\n a mouse click leaves the chip focused, and plain focus would re-open the\n strip on its own once the post-pick suppression expires. */\n.sourceTabsBoxFold:hover .sourceTabsRow,\n.sourceTabsBoxFold:has(:focus-visible) .sourceTabsRow {\n z-index: 30;\n max-height: 420px;\n padding-bottom: 6px;\n box-shadow:\n 0 0 0 1px var(--dsw-alias-border-l3, #d9dde3),\n 0 12px 28px rgba(16, 24, 40, 0.16);\n -webkit-mask-image: none;\n mask-image: none;\n}\n\n/* After a pick the strip folds again even though the pointer is still inside;\n leaving the strip clears `.sourceTabsBoxPicked` and re-arms the hover. */\n.sourceTabsBoxFold.sourceTabsBoxPicked:hover .sourceTabsRow,\n.sourceTabsBoxFold.sourceTabsBoxPicked:has(:focus-visible) .sourceTabsRow {\n max-height: 58px;\n padding-bottom: 0;\n box-shadow: none;\n -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);\n mask-image: linear-gradient(180deg, #000 78%, transparent 100%);\n}\n\n/* --- unmanaged checkout adoption row ---------------------------------------------- */\n\n.unmanagedRow {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n margin-top: 6px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #57606a);\n}\n\n.unmanagedLabel {\n flex-shrink: 0;\n}\n\n.unmanagedChip {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n height: 22px;\n padding: 0 4px 0 8px;\n border: 1px dashed var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 999px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n max-width: 220px;\n}\n\n.unmanagedChipName {\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.unmanagedAdopt {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n padding: 0 4px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.unmanagedAdopt:disabled {\n cursor: default;\n opacity: 0.5;\n}\n\n\n.srcTabEdit {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #9ca3af);\n padding: 0 2px;\n margin-left: 4px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.srcTabEdit:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.srcTabOn .srcTabEdit {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n.srcTabOn .srcTabEdit:hover {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n.srcTab,\n.srcTabOn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: auto;\n max-width: 100%;\n height: 24px;\n /* The pill owns the horizontal padding so the label keeps the same gap on\n both sides whether or not trailing edit/delete controls are present. */\n padding: 0 10px;\n border: 1px solid var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 999px;\n overflow: hidden;\n background: var(--dsw-alias-bg-layer-1, #fff);\n}\n\n.srcTabMain {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-primary, #1f2328);\n padding: 0;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n flex: 1;\n}\n\n.srcTabMain:hover {\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n}\n\n/* Selected scope: the harness primary color, exactly as its own primary fill\n uses it (primary Button, the toggle switch's ON track) — near-black on the\n light theme, near-white on the dark one, with the matching foreground. */\n.srcTabOn {\n background: var(--dsw-alias-brand-primary, #0f1115);\n border-color: var(--dsw-alias-brand-primary, #0f1115);\n}\n\n.srcTabOn .srcTabMain {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n font-weight: 600;\n}\n\n.srcTabDel {\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #9ca3af);\n padding: 0 2px;\n margin-left: 4px;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.srcTabDel:hover {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n}\n\n.srcTabOn .srcTabDel {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n.srcTabOn .srcTabDel:hover {\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n\n/* --- card grid ----------------------------------------------------------------- */\n\n/* Both host surfaces scroll inside the market's own list region: page mode is\n a fixed shell and settings mode stretches the workspace to the section, so\n the host `.options` container no longer scrolls the market. In-panel\n scrolling with a stable gutter also removes the layout jitter when a tab\n switch changes the scrollbar's visibility. */\n.grid {\n flex: 1;\n min-height: 0;\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n min-width: 0;\n align-content: start;\n overflow-y: auto;\n scrollbar-gutter: stable;\n padding-right: 4px;\n}\n\n.list {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n overflow-y: auto;\n scrollbar-gutter: stable;\n padding-right: 4px;\n}\n\n.list .card {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 14px;\n}\n\n.list .cardTop {\n flex: 0 0 auto;\n}\n\n.list .cardDesc {\n flex: 1;\n min-width: 200px;\n min-height: 0;\n max-height: 18px;\n overflow: hidden;\n}\n\n.list .cardActions {\n flex: 0 0 auto;\n}\n\n.list .meta,\n.list .tagRow {\n flex-basis: 100%;\n}\n\n.empty {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n padding: 48px 0;\n text-align: center;\n font-size: 13px;\n grid-column: 1 / -1;\n}\n\n.card {\n background: var(--dsw-alias-bg-layer-1, #fff);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-left: 3px solid var(--dsw-alias-border-l2);\n border-radius: 12px;\n padding: 12px 14px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 0;\n cursor: pointer;\n transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;\n}\n\n.card:hover {\n border-color: var(--dsw-alias-border-l3, #d9dde3);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n box-shadow: 0 1px 4px rgba(16, 24, 40, 0.06);\n}\n\n.cardTop {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.cardTitle {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n}\n\n.cardName {\n font-size: 13px;\n font-weight: 600;\n line-height: 22px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.version {\n font-size: 12px;\n line-height: 20px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-variant-numeric: tabular-nums;\n flex-shrink: 0;\n}\n\n.cardActions {\n display: flex;\n align-items: center;\n gap: 4px;\n flex-shrink: 0;\n}\n\n/* Flat icon-only action (harness Button ghost geometry: transparent fill,\n interactive-bg hover). Rendered inline so no button-chrome box shows. */\n.iconBtn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: none;\n border-radius: 999px;\n background: none;\n cursor: pointer;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n transition: background 0.15s ease, color 0.15s ease;\n}\n\n.iconBtn svg {\n width: 15px;\n height: 15px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.8;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.iconBtn:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.iconBtn:active:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, 0.1));\n}\n\n.iconBtn:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 1px;\n}\n\n.iconBtn:disabled {\n cursor: default;\n opacity: 0.4;\n}\n\n/* Destructive action only announces itself on hover, like the platform. */\n.iconBtnDanger:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n color: var(--dsw-alias-state-error-primary, rgb(236, 19, 19));\n}\n\n.switchOn,\n.switchOff {\n position: relative;\n width: 38px;\n height: 22px;\n border: none;\n border-radius: 999px;\n cursor: pointer;\n padding: 0;\n flex-shrink: 0;\n transition: background-color 0.15s ease;\n}\n\n/* ON rides the primary button fill (brand → dark in the platform theme),\n the same track color every other plugin toggle and native control uses —\n not state-success green, which reads as off-convention beside them. */\n.switchOn {\n background: var(--dsw-alias-button-primary-fill, var(--dsw-alias-brand-primary, #4f6ef7));\n}\n\n.switchOff {\n background: var(--dsw-alias-label-dimmed, rgb(225, 229, 238));\n}\n\n.switchOn:disabled,\n.switchOff:disabled {\n opacity: 0.6;\n cursor: default;\n}\n\n.switchThumb {\n position: absolute;\n top: 3px;\n left: 3px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n transition: left 0.15s ease;\n pointer-events: none;\n}\n\n.switchOn .switchThumb {\n left: 19px;\n}\n\n.desc {\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n /* Two-line cap without legacy -webkit-box clamping: the nested-scroll\n compositor can paint -webkit-box text outside its box, so bound the\n block height instead. */\n max-height: 36px;\n overflow: hidden;\n margin: 0;\n}\n\n.meta {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n\n/* Surface-count tags live on their own line below source · layout so the\n first meta row stays scannable. */\n.tagRow {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n\n.src {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #9ca3af);\n text-decoration: none;\n}\n\n.tag {\n border: 1px solid var(--dsw-alias-border-l3, #d9dde3);\n color: var(--dsw-alias-label-secondary, #6b7280);\n border-radius: 4px;\n flex-shrink: 0;\n padding: 1px 6px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.okState {\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-state-success-primary, #16a34a);\n white-space: nowrap;\n}\n\n.warnLine {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n font-weight: 600;\n font-size: 12px;\n line-height: 18px;\n margin: 0;\n cursor: help;\n}\n\n.modalFooter {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n width: 100%;\n}\n\n/* The remove-source \"also delete local files\" checkbox row (matches\n ui/panel.module.css .confirmCheck). */\n.confirmCheck {\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n}\n\n.modalFooterLeft {\n margin-right: auto;\n display: flex;\n gap: 8px;\n}\n\n/* --- source editor modal --------------------------------------------------------- */\n\n.editorDialog {\n width: min(500px, 92vw);\n}\n\n/* --- install confirmation modal --------------------------------------------------- */\n\n.installConfirmBody {\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-width: 0;\n}\n\n.installConfirmSuite {\n font-weight: 600;\n color: var(--dsw-alias-label-primary, #111827);\n}\n\n.installConfirmMeta {\n color: var(--dsw-alias-label-secondary, #4b5563);\n font-size: 12px;\n}\n\n.installConfirmCommit {\n color: var(--dsw-alias-label-secondary, #4b5563);\n font-size: 12px;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n\n.installConfirmTags {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.installConfirmWarn {\n color: var(--dsw-alias-state-warn-label, rgb(221, 134, 41));\n font-size: 12px;\n border: 1px solid var(--dsw-alias-state-warn-label, rgb(221, 134, 41));\n border-radius: 8px;\n padding: 8px 10px;\n}\n\n.editorForm {\n display: flex;\n flex-direction: column;\n gap: 14px;\n min-width: 0;\n}\n\n.modeRow {\n display: flex;\n gap: 6px;\n padding: 3px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n background: var(--dsw-alias-bg-layer-2, #f3f4f6);\n align-self: flex-start;\n}\n\n.seg,\n.segOn {\n border: none;\n background: none;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n padding: 5px 14px;\n border-radius: 8px;\n cursor: pointer;\n}\n\n.segOn {\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n}\n\n.fieldGroup {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\n.fieldLabel {\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-label-secondary, #6b7280);\n}\n\n.fieldHint {\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n}\n\n.staticId {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 7px 10px;\n border: 1px dashed var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-2, #f3f4f6);\n}\n\n.staticIdValue {\n font-size: 13px;\n font-weight: 600;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n/* --- suite detail modal ---------------------------------------------------------- */\n\n.detailDialog {\n width: min(800px, 94vw);\n}\n\n.detailBody {\n display: flex;\n flex-direction: column;\n gap: 14px;\n max-height: 78vh;\n overflow-y: auto;\n}\n\n.detailSections {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.detailSection {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.detailHead {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--dsw-alias-label-secondary, #6b7280);\n border-bottom: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n padding-bottom: 4px;\n}\n\n.detailGrid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n gap: 6px 14px;\n}\n\n.detailCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.detailKey {\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n}\n\n.detailValue {\n font-size: 13px;\n color: var(--dsw-alias-label-primary, #1f2328);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.detailDesc {\n margin: 4px 0 0;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n}\n\n.mono {\n font-family: ui-monospace, Menlo, Consolas, monospace;\n font-size: 12px;\n line-height: 18px;\n word-break: break-all;\n white-space: pre-wrap;\n margin: 0;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.detailItem {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 8px;\n overflow: hidden;\n}\n\n.detailItemRow,\n.detailItemOpen {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n border: none;\n background: none;\n font: inherit;\n text-align: left;\n padding: 7px 10px;\n cursor: pointer;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.detailItemRow:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n}\n\n.detailItemOpen {\n background: var(--dsw-alias-state-business-tertiary, rgb(228, 237, 253));\n}\n\n.detailItemName {\n font-size: 13px;\n font-weight: 600;\n flex-shrink: 0;\n}\n\n.detailItemDesc {\n flex: 1;\n min-width: 0;\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.detailChevron {\n flex-shrink: 0;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n}\n\n.skillContent {\n border-top: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n padding: 10px 12px;\n max-height: 320px;\n overflow-y: auto;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n/* --- add-source progress ------------------------------------------------------- */\n\n.progress,\n.progressError {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 20px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n background: var(--dsw-alias-bg-layer-2, rgba(127, 127, 127, 0.06));\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.progressError {\n border-color: var(--dsw-alias-state-error-primary, rgb(236, 19, 19));\n color: var(--dsw-alias-state-error-primary, rgb(236, 19, 19));\n}\n\n.progressSpin {\n flex-shrink: 0;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n border: 2px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-top-color: var(--dsw-alias-brand-primary, #4f6ef7);\n animation: dshApmSpin 0.8s linear infinite;\n}\n\n@keyframes dshApmSpin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.progressFail {\n font-size: 13px;\n flex-shrink: 0;\n}\n\n.progressText {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n@media (max-width: 720px) {\n .pageView {\n padding: 14px;\n }\n\n .titleRow {\n flex-wrap: wrap;\n }\n\n .title {\n flex: 1 0 auto;\n }\n\n .sub {\n flex: 1 0 100%;\n order: 3;\n white-space: normal;\n }\n\n .searchGroup {\n flex: 1 0 100%;\n order: 4;\n }\n\n /* Narrow panels fit fewer columns; keep pills equal width, never scroll. */\n .sourceTabsRow {\n grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));\n }\n\n .grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .list .cardTop,\n .list .cardActions {\n max-width: 100%;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .progressSpin,\n .switchOn,\n .switchOff,\n .switchThumb {\n animation: none;\n transition: none;\n }\n}\n\n.surfaceToggles {\n display: flex;\n flex-wrap: wrap;\n gap: 4px 14px;\n align-items: center;\n}\n\n.surfaceToggle {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, rgb(97, 102, 107));\n cursor: pointer;\n user-select: none;\n}\n\n.surfaceToggle input[type='checkbox'] {\n accent-color: var(--dsw-alias-brand-primary-new-colorprimary-new-color, rgb(65, 118, 230));\n margin: 0;\n}\n\n.mcpOverrideForm {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0 0 10px;\n padding: 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n}\n\n.mcpCredentialForm {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0 0 10px;\n padding: 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n}\n\n.mcpCredentialRow {\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\n.mcpCredentialControls {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mcpCredentialEditor {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.mcpOverrideCheck {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n cursor: pointer;\n user-select: none;\n}\n\n.mcpOverrideInput {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n font-size: 12px;\n}\n\n.mcpOverrideArea {\n width: 100%;\n box-sizing: border-box;\n padding: 6px 8px;\n font-size: 12px;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n resize: vertical;\n}\n\n.mcpOverrideActions {\n display: flex;\n gap: 8px;\n}\n\n.backendBlock {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 14px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 10px;\n opacity: 1;\n}\n\n.backendBlock[data-busy='true'] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.backendRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.backendTitle {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n}\n\n.backendCurrent {\n margin: 0;\n font-size: 12px;\n font-weight: 500;\n}\n\n.backendHint {\n margin: 0;\n font-size: 11px;\n opacity: 0.7;\n}\n\n.backendVersion {\n margin: 0;\n font-size: 11px;\n opacity: 0.55;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n}\n\n/* The 插件配置 card mirrors the host PluginCard chrome (border-l2 tokens,\n 14/16 header padding, disclosure body at 0 16px) so it sits visually\n identical beside the native cards. */\n\n.pluginCard {\n container: market-config / inline-size;\n list-style: none;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 12px;\n background: var(--dsw-alias-bg-layer-3, #fff);\n transition: border-color 0.16s, background 0.16s;\n}\n\n.pluginCard:hover {\n border-color: var(--dsw-alias-label-dimmed, #c8ccd4);\n}\n\n.pluginCardOpen {\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border-color: var(--dsw-alias-label-dimmed, #c8ccd4);\n}\n\n.pluginCard[data-busy='true'] {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.pluginCardHeader {\n width: 100%;\n appearance: none;\n border: 0;\n background: none;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 16px;\n border-radius: 12px;\n}\n\n.pluginCardHeader:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: -2px;\n}\n\n.pluginCardBody {\n border-top: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n margin: 0 16px;\n padding: 4px 0 8px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.pluginCardRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n padding: 8px 0 4px;\n}\n\n.pluginCardText {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n flex: 1;\n}\n\n.pluginCardTitle {\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 15px;\n font-weight: 600;\n line-height: 1.4;\n}\n\n.pluginCardDesc {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 13px;\n line-height: 1.5;\n}\n\n.pluginCardRowLabel {\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n}\n\n@container market-config (max-width: 320px) {\n .pluginCardRow {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n .pluginCardText {\n width: 100%;\n overflow-wrap: anywhere;\n }\n .regionSeg {\n flex-wrap: wrap;\n max-width: 100%;\n }\n}\n\n/* The switch is the shared ui/ToggleSwitch component (the same one the\n suite cards use) — no parallel switch styles here. */\n\n.pluginCardError {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n font-size: 12px;\n line-height: 1.5;\n margin: 0;\n}\n\n.pluginChevron {\n flex: none;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n transition: transform 0.16s;\n display: inline-flex;\n}\n\n.pluginChevronOpen {\n transform: rotate(180deg);\n}\n\n/* Region segmented control, mirroring dshmarket's setSeg chrome. */\n.regionSeg {\n flex: none;\n display: inline-flex;\n gap: 2px;\n padding: 2px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 8px;\n}\n\n.regionSegBtn {\n appearance: none;\n border: none;\n background: none;\n font: inherit;\n color: var(--dsw-alias-label-secondary, #6b7280);\n cursor: pointer;\n border-radius: 6px;\n padding: 3px 10px;\n font-size: 12px;\n line-height: 18px;\n}\n\n.regionSegOn {\n appearance: none;\n border: none;\n font: inherit;\n cursor: pointer;\n border-radius: 6px;\n padding: 3px 10px;\n font-size: 12px;\n line-height: 18px;\n background: var(--dsw-alias-bg-layer-2, #eef0f4);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n}\n\n.regionSegBtn:disabled,\n.regionSegOn:disabled {\n cursor: default;\n opacity: 0.5;\n}\n","/** A source tab with trailing edit and delete controls. */\nimport { createElement as h, type ReactNode } from 'react'\nimport type { Translate } from '../../index.js'\nimport css from '../../market.module.css'\n\nexport interface SourceTabProps {\n t: Translate\n active?: boolean\n label: string\n /** Hover hint for the tab (e.g. scan diagnostics); undefined hides it. */\n title?: string\n onSelect: () => void\n onDelete?: () => void\n onEdit?: () => void\n}\n\n/** A source chip with a trailing delete control (deletion confirms at the section level). */\nexport function SourceTab(props: SourceTabProps): ReactNode {\n const { t, active = false, label, title, onSelect, onDelete, onEdit } = props\n return h(\n 'div',\n { className: active ? css.srcTabOn : css.srcTab, title },\n h('button', { type: 'button', className: css.srcTabMain, onClick: onSelect }, label),\n onEdit === undefined\n ? null\n : h(\n 'button',\n {\n type: 'button',\n className: css.srcTabEdit,\n title: t('editSource'),\n onClick: (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n onEdit()\n }\n },\n '✎'\n ),\n onDelete === undefined\n ? null\n : h(\n 'button',\n {\n type: 'button',\n className: css.srcTabDel,\n title: t('remove'),\n onClick: (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n onDelete()\n }\n },\n '×'\n )\n )\n}\n","/**\n * The source chip strip: an equal-width pill grid that folds to two rows and\n * expands in place on hover or keyboard focus.\n *\n * Chips keep the header's original `auto-fill` grid, so every pill in a row is\n * the same width and long ids ellipsize instead of stretching a column. While\n * folded the grid is lifted out of the flow at a fixed two-row height with a\n * bottom fade hinting at the rest; hovering or focusing it grows the same grid\n * as an overlay, so the card grid below never moves. Picking a source folds the\n * strip again at once. Chips keep their id order — the selected source is not\n * moved to the front.\n */\nimport { createElement as h, useCallback, useEffect, useLayoutEffect, useRef, useState, type FocusEvent, type ReactNode } from 'react'\nimport { SourceTab } from './SourceTab.js'\nimport type { Translate } from '../../index.js'\nimport css from '../../market.module.css'\n\n/** Rows kept visible while folded. */\nconst COLLAPSED_ROWS = 2\n/** One chip row: the 24px pill plus the 4px grid gap that follows it. */\nconst CHIP_ROW_HEIGHT = 28\n/** Folded content height: two rows without the trailing gap. */\nconst COLLAPSED_CONTENT_HEIGHT = CHIP_ROW_HEIGHT * COLLAPSED_ROWS - 4\n/** Overlay padding above the grid; `scrollHeight` includes it. */\nconst OVERLAY_PADDING = 6\n/** `scrollHeight` that still fits the folded grid — taller means it can expand. */\nconst COLLAPSED_SCROLL_HEIGHT = COLLAPSED_CONTENT_HEIGHT + OVERLAY_PADDING\n/**\n * How long the pointer must stay outside the strip before hover expansion is\n * re-armed. Folding after a pick can push the pointer out of the box\n * mid-gesture; without this grace the very next pointer move reopens the strip.\n */\nconst LEAVE_GRACE_MS = 300\n\n/** One chip in the source strip. */\nexport interface SourceTabItem {\n id: string\n /** Visible chip text: `id · kind count`. */\n label: string\n /** Hover hint (scan diagnostics); undefined renders no title. */\n title?: string\n /** The selected source exposes its edit control. */\n editable?: boolean\n /** Source chips can be removed; the leading `全部` chip cannot. */\n deletable?: boolean\n}\n\nexport interface SourceTabsRowProps {\n t: Translate\n /** `全部` first, the selected source second, the remaining sources after it. */\n items: readonly SourceTabItem[]\n activeId: string\n onSelect: (id: string) => void\n onDelete: (id: string) => void\n onEdit: (id: string) => void\n}\n\n/**\n * Render the source chip grid, folded when it needs more than two rows.\n *\n * @param props - Chips in display order, the active scope, and chip actions.\n * @returns An equal-width pill grid that unfolds as an overlay.\n */\nexport function SourceTabsRow(props: SourceTabsRowProps): ReactNode {\n const { t, items, activeId, onSelect, onDelete, onEdit } = props\n const gridRef = useRef<HTMLDivElement>(null)\n const leaveTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined)\n const [folded, setFolded] = useState(false)\n // Picking a source folds the strip immediately, even though the pointer is\n // still inside it; leaving the strip (or focus) re-arms the hover expansion.\n const [picked, setPicked] = useState(false)\n\n const cancelLeave = useCallback(() => {\n if (leaveTimer.current === undefined) return\n clearTimeout(leaveTimer.current)\n leaveTimer.current = undefined\n }, [])\n useEffect(() => cancelLeave, [cancelLeave])\n\n const measure = useCallback(() => {\n const grid = gridRef.current\n if (grid === null) return\n // scrollHeight reports the full content height even while the fold clips\n // it, and it does not change when the overlay expands on hover — so the\n // fold state stays stable while the pointer is inside the strip.\n setFolded(grid.scrollHeight > COLLAPSED_SCROLL_HEIGHT)\n }, [])\n\n useLayoutEffect(() => {\n measure()\n const grid = gridRef.current\n if (grid === null || typeof ResizeObserver === 'undefined') return\n const observer = new ResizeObserver(() => measure())\n observer.observe(grid)\n return () => observer.disconnect()\n }, [measure, items])\n\n const className = [css.sourceTabsBox, folded ? css.sourceTabsBoxFold : '', picked ? css.sourceTabsBoxPicked : ''].filter(Boolean).join(' ')\n return h(\n 'div',\n {\n className,\n onMouseEnter: cancelLeave,\n onMouseLeave: () => {\n // Grace period: a pointer swept out by the fold itself must not count\n // as \"left the strip\", or the next move reopens it at once.\n cancelLeave()\n leaveTimer.current = setTimeout(() => {\n leaveTimer.current = undefined\n setPicked(false)\n }, LEAVE_GRACE_MS)\n },\n onBlur: (event: FocusEvent<HTMLDivElement>) => {\n // Focus left the strip entirely (the clicked pill keeps focus inside).\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) {\n cancelLeave()\n setPicked(false)\n }\n }\n },\n h(\n 'div',\n { ref: gridRef, className: css.sourceTabsRow },\n ...items.map(item =>\n h(SourceTab, {\n key: item.id,\n t,\n active: item.id === activeId,\n label: item.label,\n title: item.title,\n onSelect: () => {\n setPicked(true)\n onSelect(item.id)\n },\n onDelete: item.deletable === true ? () => onDelete(item.id) : undefined,\n onEdit: item.editable === true ? () => onEdit(item.id) : undefined\n })\n )\n )\n )\n}\n","/** Source editor modal for adding or editing a catalog source. */\nimport { createElement as h, useState, type ReactNode } from 'react'\nimport { Button, Input, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SourceOverview } from '../../api.js'\nimport type { SourceProgressState } from './market-resource.js'\nimport type { Translate } from '../../index.js'\nimport css from '../../market.module.css'\n\nexport type EditorState = { mode: 'edit'; source: SourceOverview } | { mode: 'add' } | undefined\n\n/** Which acquisition path the editor configures. */\nexport type SourceEditorKind = 'git' | 'archive' | 'local'\n\nexport interface SourceEditorModalProps {\n t: Translate\n editor: Exclude<EditorState, undefined>\n busy: boolean\n progress: SourceProgressState\n onClose: () => void\n onSave: (input: { url: string; branch: string; kind: SourceEditorKind; sha256: string }) => Promise<boolean>\n onRemove: (id: string) => void\n}\n\nexport function SourceEditorModal(props: SourceEditorModalProps): ReactNode {\n const { t, editor } = props\n const [kind, setKind] = useState<SourceEditorKind>(editor.mode === 'edit' ? (editor.source.kind === 'archive' ? 'archive' : editor.source.local === true ? 'local' : 'git') : 'git')\n const [url, setUrl] = useState(editor.mode === 'edit' ? editor.source.url : '')\n const [branch, setBranch] = useState(editor.mode === 'edit' ? (editor.source.branch ?? '') : '')\n const [sha256, setSha256] = useState('')\n const id = editor.mode === 'edit' ? editor.source.id : ''\n const title = editor.mode === 'edit' ? t('editSourceTitle') : t('addSourceTitle')\n const urlPlaceholder = kind === 'local' ? t('sourceUrlLocalPh') : kind === 'archive' ? t('sourceUrlArchivePh') : t('sourceUrlPh')\n const urlHint = kind === 'local' ? t('urlLocalHint') : kind === 'archive' ? t('urlArchiveHint') : t('urlGitHint')\n const segment = (value: SourceEditorKind, label: string): ReactNode =>\n h(\n 'button',\n {\n type: 'button',\n className: kind === value ? css.segOn : css.seg,\n onClick: () => setKind(value)\n },\n label\n )\n return h(Modal, {\n open: true,\n onClose: props.onClose,\n title,\n description: t('editorHint'),\n closeLabel: t('cancel'),\n className: css.editorDialog,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h('div', { className: css.modalFooterLeft }, editor.mode === 'edit' ? h(Button, { variant: 'ghost', onClick: () => props.onRemove(id) }, `🗑 ${t('remove')}`) : null),\n h(Button, { variant: 'ghost', onClick: props.onClose }, t('cancel')),\n h(\n Button,\n {\n variant: 'primary',\n disabled: props.busy,\n onClick: () => {\n void props.onSave({ url: url.trim(), branch: branch.trim(), kind, sha256: sha256.trim() })\n }\n },\n t('save')\n )\n ),\n children: h(\n 'div',\n { className: css.editorForm },\n h(\n 'div',\n { className: css.modeRow },\n segment('git', t('sourceModeGit')),\n segment('archive', t('sourceModeArchive')),\n segment('local', t('sourceModeLocal'))\n ),\n editor.mode === 'edit'\n ? h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, t('sourceIdPh')),\n h('div', { className: css.staticId }, h('span', { className: css.staticIdValue }, id), h('span', { className: css.fieldHint }, t('idFixed')))\n )\n : null,\n h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, urlPlaceholder),\n h(Input, { placeholder: urlPlaceholder, value: url, onChange: event => setUrl((event.target as HTMLInputElement).value) }),\n h('span', { className: css.fieldHint }, urlHint)\n ),\n kind === 'git'\n ? h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, t('branchPh')),\n h(Input, { placeholder: t('branchPh'), value: branch, onChange: event => setBranch((event.target as HTMLInputElement).value) }),\n h('span', { className: css.fieldHint }, t('branchHint'))\n )\n : null,\n kind === 'archive'\n ? h(\n 'div',\n { className: css.fieldGroup },\n h('label', { className: css.fieldLabel }, t('sha256Ph')),\n h(Input, { placeholder: t('sha256Ph'), value: sha256, onChange: event => setSha256((event.target as HTMLInputElement).value) }),\n h('span', { className: css.fieldHint }, t('sha256Hint'))\n )\n : null,\n props.progress.error === undefined && props.progress.step === undefined\n ? null\n : h(\n 'div',\n {\n className: props.progress.error === undefined ? css.progress : css.progressError\n },\n props.progress.error === undefined ? h('span', { className: css.progressSpin }) : h('span', { className: css.progressFail }, '✕'),\n h('span', { className: css.progressText }, props.progress.error === undefined ? props.progress.step : `${t('actionFail')}: ${props.progress.error}`)\n )\n )\n })\n}\n","/** Locale parameter interpolation shared by the market client surfaces. */\n\n/**\n * Replace `{name}` placeholders with their parameter values.\n *\n * Kept local because hosts whose bound translator ignores params still return\n * the raw template; unknown placeholders pass through untouched.\n *\n * @param text - Localized template containing `{name}` placeholders.\n * @param params - Values keyed by placeholder name.\n * @returns The template with every known placeholder substituted.\n */\nexport function interpolate(text: string, params: Record<string, unknown>): string {\n return text.replace(/\\{(\\w+)\\}/g, (match, key: string) => (key in params ? String(params[key]) : match))\n}\n","/** Pre-install confirmation modal: concise surface counts plus a risk notice. */\nimport { createElement as h, type ReactNode } from 'react'\nimport { Button, Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SuiteCardData } from '../../api.js'\nimport type { Translate } from '../../index.js'\nimport css from '../../market.module.css'\n\nexport interface InstallConfirmState {\n suite: SuiteCardData\n /** Locked source commit shown in the confirm dialog; undefined for local sources. */\n lockCommit?: string\n /** True when the source is a local working tree (no immutable commit). */\n localSource?: boolean\n}\n\nexport interface InstallConfirmModalProps {\n t: Translate\n state: InstallConfirmState\n busy: boolean\n onClose: () => void\n onConfirm: () => Promise<boolean>\n}\n\n/** Surface count tags shown on the card; keys mirror SuiteCard's tag list. */\nconst SURFACE_TAGS: Array<{ key: 'skills' | 'mcp' | 'hooks' | 'commands' | 'agents' | 'lsp'; labelKey: 'surfaceSkills' | 'surfaceMcp' | 'surfaceHooks' | 'surfaceCommands' | 'surfaceAgents' | 'surfaceLsp' }> = [\n { key: 'skills', labelKey: 'surfaceSkills' },\n { key: 'mcp', labelKey: 'surfaceMcp' },\n { key: 'hooks', labelKey: 'surfaceHooks' },\n { key: 'commands', labelKey: 'surfaceCommands' },\n { key: 'agents', labelKey: 'surfaceAgents' },\n { key: 'lsp', labelKey: 'surfaceLsp' }\n]\n\nexport function InstallConfirmModal(props: InstallConfirmModalProps): ReactNode {\n const { t, state, busy } = props\n const surfaces = state.suite.surfaces\n const tags = SURFACE_TAGS.filter(tag => surfaces[tag.key] > 0)\n const executable = surfaces.mcp > 0 || surfaces.hooks > 0\n\n return h(Modal, {\n open: true,\n onClose: props.onClose,\n title: t('installConfirmTitle'),\n description: t('installConfirmDesc'),\n closeLabel: t('cancel'),\n className: css.editorDialog,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h(Button, { variant: 'ghost', disabled: busy, onClick: props.onClose }, t('cancel')),\n h(\n Button,\n {\n variant: 'primary',\n disabled: busy,\n onClick: () => {\n void props.onConfirm()\n }\n },\n t('installConfirmAction')\n )\n ),\n children: h(\n 'div',\n { className: css.installConfirmBody },\n h('div', { className: css.installConfirmSuite }, `${state.suite.sourceId} / ${state.suite.name}`),\n state.suite.version === undefined ? null : h('div', { className: css.installConfirmMeta }, `${t('version')}: v${state.suite.version}`),\n state.lockCommit === undefined\n ? null\n : h('div', { className: css.installConfirmCommit }, `${t('installConfirmSource')}: ${state.lockCommit.slice(0, 12)}`),\n state.lockCommit === undefined && state.localSource === true\n ? h('div', { className: css.installConfirmCommit }, `${t('installConfirmSource')}: ${t('installConfirmLocalTree')}`)\n : null,\n tags.length === 0\n ? h('div', { className: css.installConfirmMeta }, t('installConfirmNoSurfaces'))\n : h(\n 'div',\n { className: css.installConfirmTags },\n tags.map(tag => h('span', { key: tag.key, className: css.tag }, `${t(tag.labelKey)} ${surfaces[tag.key]}`))\n ),\n executable ? h('div', { className: css.installConfirmWarn }, t('installConfirmExecutable')) : null\n )\n })\n}\n","/** Shared switch control (ON = primary button fill, like every host toggle). */\nimport { createElement as h, type ReactNode } from 'react'\nimport css from '../market.module.css'\n\nexport interface ToggleSwitchProps {\n on: boolean\n disabled?: boolean\n title?: string\n onChange: () => void\n}\n\n/** A green/gray switch control for suite enable state. */\nexport function ToggleSwitch(props: ToggleSwitchProps): ReactNode {\n return h(\n 'button',\n {\n type: 'button',\n role: 'switch',\n 'aria-checked': props.on,\n title: props.title,\n 'aria-label': props.title,\n disabled: props.disabled,\n className: props.on ? css.switchOn : css.switchOff,\n onClick: (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n props.onChange()\n }\n },\n h('span', { className: css.switchThumb })\n )\n}\n",".card[data-resource-state] {\n box-sizing: border-box;\n min-width: 0;\n max-width: 100%;\n border: 1px solid var(--dsw-alias-border-l2);\n border-left-width: 3px;\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-primary);\n box-shadow: none;\n}\n.card[data-resource-state='active'] { border-left-color: var(--dsw-alias-state-success-primary); }\n.card[data-resource-state='disabled'] { border-left-color: var(--dsw-alias-label-tertiary); }\n.card[data-resource-state='warning'] { border-left-color: var(--dsw-alias-state-warn-primary); }\n.card[data-resource-state='error'] { border-left-color: var(--dsw-alias-state-error-primary); }\n.card[data-resource-state]:hover { background: var(--dsw-alias-interactive-bg-hover); }\n\n.collection[data-resource-view] {\n min-width: 0;\n min-height: 0;\n width: 100%;\n box-sizing: border-box;\n overflow-y: auto;\n scrollbar-gutter: stable;\n align-content: start;\n align-items: stretch;\n gap: 12px;\n}\n.collection[data-resource-view='grid'] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.collection[data-resource-view='list'] { display: flex; flex-direction: column; }\n.collection[data-resource-view='list'] > .card { flex-shrink: 0; }\n","import { createElement as h, type HTMLAttributes, type ReactNode } from 'react'\nimport css from './resource-card.module.css'\n\nexport type ResourceState = 'active' | 'disabled' | 'warning' | 'error'\n\n/** State chrome shared by every resource, independent of the source and the content layout. */\nexport function ResourceCard({ state, className, children, ...props }: HTMLAttributes<HTMLElement> & { state: ResourceState; children?: ReactNode }): ReactNode {\n return h('article', { ...props, className: `${className ?? ''} ${css.card}`, 'data-resource-state': state }, children)\n}\n\n/** A shared, shrinkable scroll area: grid and list never stretch individual cards vertically. */\nexport function ResourceCollection({ view, className, children }: { view: 'grid' | 'list'; className?: string; children?: ReactNode }): ReactNode {\n return h('div', { className: `${className ?? ''} ${css.collection}`, 'data-resource-view': view }, children)\n}\n","import type { SuiteLayoutKind } from '../model/types.js'\nimport type { Translate } from './index.js'\n\nconst KEYS = {\n 'agent-plugin-v1': 'layoutV1',\n 'claude-code': 'layoutCC',\n codex: 'layoutCodex',\n universal: 'layoutUniversal',\n cursor: 'layoutCursor',\n kimi: 'layoutKimi',\n zcode: 'layoutZcode',\n qoder: 'layoutQoder',\n 'github-copilot': 'layoutCopilot',\n remote: 'layoutRemote',\n 'project-native': 'layoutProjectNative',\n 'skill-collection': 'layoutSkills'\n} as const satisfies Record<SuiteLayoutKind, Parameters<Translate>[0]>\n\nexport function suiteLayoutLabel(layout: string, t: Translate): string {\n return Object.hasOwn(KEYS, layout) ? t(KEYS[layout as SuiteLayoutKind]) : layout\n}\n","/** A suite card in the market grid/list. */\nimport { createElement as h, type ReactElement, type ReactNode } from 'react'\nimport { Button, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { SuiteCardData } from '../../api.js'\nimport type { Translate } from '../../index.js'\nimport { ToggleSwitch } from '../../ui/ToggleSwitch.js'\nimport css from '../../market.module.css'\nimport { ResourceCard } from '../../ui/ResourceCard.js'\nimport { suiteLayoutLabel } from '../../layout-label.js'\n\nexport interface SuiteCardProps {\n t: Translate\n suite: SuiteCardData\n busy: boolean\n onOpen: () => void\n onInstall: () => void\n onAddSource: () => void\n onToggle: () => void\n onRefresh: () => void\n onUninstall: () => void\n}\n\nexport function SuiteCard(props: SuiteCardProps): ReactNode {\n const { t, suite, busy } = props\n const tags: Array<[string, number]> = (\n [\n [t('surfaceSkills'), suite.surfaces.skills],\n [t('surfaceMcp'), suite.surfaces.mcp],\n [t('surfaceHooks'), suite.surfaces.hooks],\n [t('surfaceCommands'), suite.surfaces.commands],\n [t('surfaceAgents'), suite.surfaces.agents],\n [t('surfaceLsp'), suite.surfaces.lsp]\n ] as Array<[string, number]>\n ).filter(([, count]) => count > 0)\n const layoutLabel = suiteLayoutLabel(suite.layout, t)\n const isRemote = suite.remoteUrl !== undefined\n const hasTagRow = tags.length > 0 || suite.errors.length > 0 || (suite.mcpErrors?.length ?? 0) > 0\n const stop = (callback: () => void) => (event: { stopPropagation(): void }) => {\n event.stopPropagation()\n callback()\n }\n // Installed cards carry the MCP card's left accent: green = enabled, gray = disabled.\n return h(\n ResourceCard,\n { className: css.card, state: suite.installed && suite.enabled ? 'active' : 'disabled', onClick: props.onOpen },\n h(\n 'div',\n { className: css.cardTop },\n h(\n 'div',\n { className: css.cardTitle },\n h('span', { className: css.cardName }, suite.name),\n suite.version === undefined ? null : h('span', { className: css.version }, `v${suite.version}`)\n ),\n h(\n 'div',\n { className: css.cardActions },\n suite.installed\n ? [\n h(\n 'button',\n {\n key: 'refresh',\n type: 'button',\n className: css.iconBtn,\n title: t('refresh'),\n disabled: busy,\n onClick: stop(props.onRefresh)\n },\n h(\n 'svg',\n { viewBox: '0 0 24 24', 'aria-hidden': 'true' },\n h('path', { d: 'M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8' }),\n h('path', { d: 'M21 3v5h-5' })\n )\n ),\n h(\n 'button',\n {\n key: 'uninstall',\n type: 'button',\n className: `${css.iconBtn} ${css.iconBtnDanger}`,\n title: t('uninstall'),\n disabled: busy,\n onClick: stop(props.onUninstall)\n },\n h(\n 'svg',\n { viewBox: '0 0 24 24', 'aria-hidden': 'true' },\n h('path', { d: 'M3 6h18' }),\n h('path', { d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6' }),\n h('path', { d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2' })\n )\n ),\n // The enable switch reads last, at the card's trailing edge.\n h(ToggleSwitch, {\n key: 'toggle',\n on: suite.enabled,\n disabled: busy,\n title: suite.enabled ? t('disable') : t('enable'),\n onChange: props.onToggle\n })\n ]\n : isRemote\n ? h(\n Button,\n {\n variant: 'primary',\n size: 'sm',\n disabled: busy,\n title: suite.remoteUrl,\n onClick: stop(props.onAddSource)\n },\n t('addSource')\n )\n : h(\n Button,\n {\n variant: 'primary',\n size: 'sm',\n disabled: busy,\n onClick: stop(props.onInstall)\n },\n t('install')\n )\n )\n ),\n h('p', { className: css.desc }, suite.description ?? ''),\n h(\n 'div',\n { className: css.meta },\n h('span', { className: css.src }, `${suite.sourceId} · ${isRemote ? t('remoteRef') : suite.dimension === 'user' ? t('dimensionUser') : t('dimensionProject')}`),\n h('span', { className: css.tag }, layoutLabel)\n ),\n hasTagRow\n ? h(\n 'div',\n { className: css.tagRow },\n ...tags.map(([label, count]) => h('span', { key: label, className: css.tag }, `${label} ${count}`)),\n suite.errors.length === 0\n ? null\n : h(Tooltip, {\n label: suite.errors.slice(0, 8).join(t('sourceErrorSeparator')),\n children: h('span', { className: css.warnLine }, `⚠ ${t('errors')} ${suite.errors.length}`) as unknown as ReactElement\n }),\n (suite.mcpErrors?.length ?? 0) === 0\n ? null\n : h(Tooltip, {\n label: suite.mcpErrors!.slice(0, 8).join(t('sourceErrorSeparator')),\n children: h('span', { className: css.warnLine }, `⚠ ${t('mcpSection')} ${suite.mcpErrors!.length}`) as unknown as ReactElement\n })\n )\n : null\n )\n}\n","/** Shared status icon used by market and MCP status filter tabs. */\nimport { createElement as h, type ReactNode } from 'react'\n\nexport type StatusIconKind = 'all' | 'installed' | 'uninstalled'\n\nexport interface StatusIconProps {\n kind: StatusIconKind\n}\n\n/** An SVG status icon for the all/installed/uninstalled filter tabs. */\nexport function StatusIcon({ kind }: StatusIconProps): ReactNode {\n const common = { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n if (kind === 'installed') {\n return h('svg', common, h('circle', { cx: 8, cy: 8, r: 5.5 }), h('path', { d: 'm5.5 8 1.7 1.7 3.4-3.4' }))\n }\n if (kind === 'uninstalled') {\n return h('svg', common, h('path', { d: 'M8 2v8m-3-3 3 3 3-3M3 13h10' }))\n }\n return h('svg', common, h('path', { d: 'M2.5 5 8 2.5 13.5 5 8 7.5 2.5 5Zm0 3L8 10.5 13.5 8M2.5 11 8 13.5 13.5 11' }))\n}\n","/**\n * Error boundary for untrusted preview content.\n *\n * Skill/command/agent bodies and hook/LSP JSON are third-party content; a\n * renderer throw must degrade to a plain-text fallback instead of unmounting\n * the whole settings section (React has no built-in boundary).\n */\nimport { createElement as h, Component, type ReactNode } from 'react'\n\ninterface Props {\n children: ReactNode\n fallback?: (error: Error) => ReactNode\n}\n\ninterface State {\n error: Error | undefined\n}\n\nexport class ErrorBoundary extends Component<Props, State> {\n override state: State = { error: undefined }\n\n static getDerivedStateFromError(error: Error): State {\n return { error }\n }\n\n override componentDidCatch(error: Error, info: unknown): void {\n console.warn('[dsh-agent-plugins-market] preview render failed:', error, info)\n }\n\n override render(): ReactNode {\n if (this.state.error !== undefined) {\n return this.props.fallback === undefined\n ? h('pre', { className: 'dsh-agent-plugins-fallback' }, `预览渲染失败:${this.state.error.message}`)\n : this.props.fallback(this.state.error)\n }\n return this.props.children\n }\n}\n",".dialog[role='dialog'] {\n box-sizing: border-box;\n width: min(1120px, calc(100vw - 48px));\n max-width: calc(100vw - 48px);\n max-height: calc(100dvh - 48px);\n}\n.body {\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n max-height: calc(100dvh - 200px);\n overflow-wrap: anywhere;\n}\n.modes {\n display: flex;\n gap: 4px;\n flex-wrap: wrap;\n margin-bottom: 12px;\n}\n.footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n width: 100%;\n}\n.footer > :first-child {\n flex: 1;\n}\n.footerSlot:empty {\n display: none;\n}\n.mode {\n padding: 6px 12px;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 4px;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n cursor: pointer;\n}\n.mode[aria-pressed='true'] {\n background: var(--dsw-alias-interactive-bg-active);\n color: var(--dsw-alias-label-primary);\n}\n.mode:focus-visible,\n.raw:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 2px;\n}\n.raw {\n box-sizing: border-box;\n width: 100%;\n min-height: 320px;\n resize: vertical;\n padding: 12px;\n font:\n 13px/1.6 ui-monospace,\n monospace;\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 6px;\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-alias-bg-layer-1);\n}\n.section {\n min-width: 0;\n margin: 0 0 16px;\n}\n.heading {\n margin: 0 0 8px;\n font-size: 13px;\n font-weight: 600;\n}\n.metadata {\n display: grid;\n grid-template-columns: minmax(100px, 180px) minmax(0, 1fr);\n margin: 0;\n font-size: 13px;\n}\n.metadata dt,\n.metadata dd {\n margin: 0;\n padding: 8px 0;\n border-bottom: 1px solid var(--dsw-alias-border-l1);\n min-width: 0;\n}\n.metadata dt {\n color: var(--dsw-alias-label-secondary);\n padding-right: 12px;\n}\n.metadata dd {\n color: var(--dsw-alias-label-primary);\n}\n.values {\n display: flex;\n gap: 6px;\n flex-wrap: wrap;\n}\n.value {\n max-width: 100%;\n padding: 2px 6px;\n background: var(--dsw-alias-interactive-bg-hover);\n border-radius: 4px;\n}\n.preview {\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n font-size: 14px;\n line-height: 1.6;\n}\n.preview pre,\n.preview table {\n max-width: 100%;\n overflow: auto;\n}\n.preview img {\n max-width: 100%;\n height: auto;\n}\n.error {\n color: var(--dsw-alias-state-error-primary);\n margin: 8px 0;\n font-size: 13px;\n}\n.form {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 16px;\n}\n.field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n font-size: 13px;\n}\n.field input,\n.field select,\n.field textarea {\n box-sizing: border-box;\n min-width: 0;\n max-width: 100%;\n padding: 8px;\n color: var(--dsw-alias-label-primary);\n background: var(--dsw-alias-bg-layer-1);\n border: 1px solid var(--dsw-alias-border-l2);\n border-radius: 4px;\n font: inherit;\n}\n.wide {\n grid-column: 1 / -1;\n}\n.rows {\n display: flex;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n}\n.row {\n display: flex;\n gap: 6px;\n align-items: center;\n min-width: 0;\n}\n.row input {\n flex: 1;\n width: 0;\n}\n.row button {\n flex: none;\n}\n.rows > button {\n align-self: flex-start;\n}\n@media (max-width: 640px) {\n .dialog[role='dialog'] {\n width: calc(100vw - 16px);\n max-width: calc(100vw - 16px);\n max-height: calc(100dvh - 16px);\n }\n .form {\n grid-template-columns: minmax(0, 1fr);\n }\n .metadata {\n grid-template-columns: minmax(80px, 30%) minmax(0, 1fr);\n }\n}\n","import { createContext, createElement as h, useContext, useState, type ComponentProps, type ReactNode } from 'react'\nimport { Modal } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { createPortal } from 'react-dom'\nimport css from './detail.module.css'\n\nconst FooterTarget = createContext<HTMLDivElement | null>(null)\n\n/** Configuration editors contribute their save action to the same fixed footer as other details. */\nexport function DetailFooterAction({ children }: { children: ReactNode }): ReactNode {\n const target = useContext(FooterTarget)\n return target === null ? null : createPortal(children, target)\n}\n\n/** One wide, viewport-bounded dialog for all resource details and editors. */\nexport function DetailModal(props: ComponentProps<typeof Modal>): ReactNode {\n const [target, setTarget] = useState<HTMLDivElement | null>(null)\n return h(\n FooterTarget.Provider,\n { value: target },\n h(Modal, {\n ...props,\n className: `${props.className ?? ''} ${css.dialog}`,\n contentClassName: `${props.contentClassName ?? ''} ${css.body}`,\n footer: h('div', { className: css.footer }, props.footer, h('div', { ref: setTarget, className: css.footerSlot }))\n })\n )\n}\n","const ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n}\nfunction isNode(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\nexport { ALIAS, DOC, MAP, NODE_TYPE, PAIR, SCALAR, SEQ, hasAnchor, isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq };\n","import { isDocument, isNode, isPair, isCollection, isMap, isSeq, isScalar, isAlias } from './nodes/identity.js';\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (isDocument(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if (isNode(ctrl) || isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `Promise`: Must resolve to one of the following values\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (isDocument(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if (isNode(ctrl) || isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\nfunction initVisitor(visitor) {\n if (typeof visitor === 'object' &&\n (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n if (typeof visitor === 'function')\n return visitor(key, node, path);\n if (isMap(node))\n return visitor.Map?.(key, node, path);\n if (isSeq(node))\n return visitor.Seq?.(key, node, path);\n if (isPair(node))\n return visitor.Pair?.(key, node, path);\n if (isScalar(node))\n return visitor.Scalar?.(key, node, path);\n if (isAlias(node))\n return visitor.Alias?.(key, node, path);\n return undefined;\n}\nfunction replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if (isCollection(parent)) {\n parent.items[key] = node;\n }\n else if (isPair(parent)) {\n if (key === 'key')\n parent.key = node;\n else\n parent.value = node;\n }\n else if (isDocument(parent)) {\n parent.contents = node;\n }\n else {\n const pt = isAlias(parent) ? 'alias' : 'scalar';\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n}\n\nexport { visit, visitAsync };\n","import { isNode } from '../nodes/identity.js';\nimport { visit } from '../visit.js';\n\nconst escapeChars = {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n constructor(yaml, tags) {\n /**\n * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n * included in the document's stringified representation.\n */\n this.docStart = null;\n /** The doc-end marker `...`. */\n this.docEnd = false;\n this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n this.tags = Object.assign({}, Directives.defaultTags, tags);\n }\n clone() {\n const copy = new Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case '1.1':\n this.atNextDocument = true;\n break;\n case '1.2':\n this.atNextDocument = false;\n this.yaml = {\n explicit: Directives.defaultYaml.explicit,\n version: '1.2'\n };\n this.tags = Object.assign({}, Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n this.tags = Object.assign({}, Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case '%TAG': {\n if (parts.length !== 2) {\n onError(0, '%TAG directive should contain exactly two parts');\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case '%YAML': {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, '%YAML directive should contain exactly one part');\n return false;\n }\n const [version] = parts;\n if (version === '1.1' || version === '1.2') {\n this.yaml.version = version;\n return true;\n }\n else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === '!')\n return '!'; // non-specific tag\n if (source[0] !== '!') {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === '<') {\n const verbatim = source.slice(2, -1);\n if (verbatim === '!' || verbatim === '!!') {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== '>')\n onError('Verbatim tags must end with a >');\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix) {\n try {\n return prefix + decodeURIComponent(suffix);\n }\n catch (error) {\n onError(String(error));\n return null;\n }\n }\n if (handle === '!')\n return source; // local tag\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === '!' ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit\n ? [`%YAML ${this.yaml.version || '1.2'}`]\n : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && isNode(doc.contents)) {\n const tags = {};\n visit(doc.contents, (_key, node) => {\n if (isNode(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n }\n else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n continue;\n if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join('\\n');\n }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\nexport { Directives };\n","import { isScalar, isCollection } from '../nodes/identity.js';\nimport { visit } from '../visit.js';\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n}\nfunction anchorNames(root) {\n const anchors = new Set();\n visit(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}\nfunction createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n prevAnchors ?? (prevAnchors = anchorNames(doc));\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === 'object' &&\n ref.anchor &&\n (isScalar(ref.node) || isCollection(ref.node))) {\n ref.node.anchor = ref.anchor;\n }\n else {\n const error = new Error('Failed to resolve repeated object (this should not happen)');\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n}\n\nexport { anchorIsValid, anchorNames, createNodeAnchors, findNewAnchor };\n","/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n if (val && typeof val === 'object') {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n // eslint-disable-next-line @typescript-eslint/no-array-delete\n if (v1 === undefined)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n }\n else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n }\n else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === undefined)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n }\n else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n}\n\nexport { applyReviver };\n","import { hasAnchor } from './identity.js';\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n * as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n * `{ keep: true }` is not set, output should be suitable for JSON\n * stringification.\n */\nfunction toJS(value, arg, ctx) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (!ctx || !hasAnchor(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: undefined };\n ctx.anchors.set(value, data);\n ctx.onCreate = res => {\n data.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === 'bigint' && !ctx?.keep)\n return Number(value);\n return value;\n}\n\nexport { toJS };\n","import { applyReviver } from '../doc/applyReviver.js';\nimport { NODE_TYPE, isDocument } from './identity.js';\nimport { toJS } from './toJS.js';\n\nclass NodeBase {\n constructor(type) {\n Object.defineProperty(this, NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!isDocument(doc))\n throw new TypeError('A document argument is required');\n const ctx = {\n anchors: new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS(this, '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n}\n\nexport { NodeBase };\n","import { anchorIsValid } from '../doc/anchors.js';\nimport { visit } from '../visit.js';\nimport { ALIAS, isAlias, isCollection, isPair, hasAnchor } from './identity.js';\nimport { NodeBase } from './Node.js';\nimport { toJS } from './toJS.js';\n\nclass Alias extends NodeBase {\n constructor(source) {\n super(ALIAS);\n this.source = source;\n Object.defineProperty(this, 'tag', {\n set() {\n throw new Error('Alias nodes cannot have tags');\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc, ctx) {\n if (ctx?.maxAliasCount === 0)\n throw new ReferenceError('Alias resolution is disabled');\n let nodes;\n if (ctx?.aliasResolveCache) {\n nodes = ctx.aliasResolveCache;\n }\n else {\n nodes = [];\n visit(doc, {\n Node: (_key, node) => {\n if (isAlias(node) || hasAnchor(node))\n nodes.push(node);\n }\n });\n if (ctx)\n ctx.aliasResolveCache = nodes;\n }\n let found = undefined;\n for (const node of nodes) {\n if (node === this)\n break;\n if (node.anchor === this.source)\n found = node;\n }\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const { anchors, doc, maxAliasCount } = ctx;\n const source = this.resolve(doc, ctx);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n let data = anchors.get(source);\n if (!data) {\n // Resolve anchors for Node.prototype.toJS()\n toJS(source, null, ctx);\n data = anchors.get(source);\n }\n /* istanbul ignore if */\n if (data?.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc, source, anchors);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n throw new ReferenceError(msg);\n }\n }\n return data.res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n anchorIsValid(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n}\nfunction getAliasCount(doc, node, anchors) {\n if (isAlias(node)) {\n const source = node.resolve(doc);\n const anchor = anchors && source && anchors.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n }\n else if (isCollection(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors);\n if (c > count)\n count = c;\n }\n return count;\n }\n else if (isPair(node)) {\n const kc = getAliasCount(doc, node.key, anchors);\n const vc = getAliasCount(doc, node.value, anchors);\n return Math.max(kc, vc);\n }\n return 1;\n}\n\nexport { Alias };\n","import { SCALAR } from './identity.js';\nimport { NodeBase } from './Node.js';\nimport { toJS } from './toJS.js';\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends NodeBase {\n constructor(value) {\n super(SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : toJS(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\nexport { Scalar, isScalarValue };\n","import { Alias } from '../nodes/Alias.js';\nimport { isNode, isPair, MAP, SEQ, isDocument } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n if (isDocument(value))\n value = value.contents;\n if (isNode(value))\n return value;\n if (isPair(value)) {\n const map = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String ||\n value instanceof Number ||\n value instanceof Boolean ||\n (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n ) {\n // https://tc39.es/ecma262/#sec-serializejsonproperty\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `ref` wrapper allows for circular references to resolve.\n let ref = undefined;\n if (aliasDuplicateObjects && value && typeof value === 'object') {\n ref = sourceObjects.get(value);\n if (ref) {\n ref.anchor ?? (ref.anchor = onAnchor(value));\n return new Alias(ref.anchor);\n }\n else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith('!!'))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n value = value.toJSON();\n }\n if (!value || typeof value !== 'object') {\n const node = new Scalar(value);\n if (ref)\n ref.node = node;\n return node;\n }\n tagObj =\n value instanceof Map\n ? schema[MAP]\n : Symbol.iterator in Object(value)\n ? schema[SEQ]\n : schema[MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode\n ? tagObj.createNode(ctx.schema, value, ctx)\n : typeof tagObj?.nodeClass?.from === 'function'\n ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n : new Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n}\n\nexport { createNode };\n","import { createNode } from '../doc/createNode.js';\nimport { isNode, isPair, isCollection, isScalar } from './identity.js';\nimport { NodeBase } from './Node.js';\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n }\n else {\n v = new Map([[k, v]]);\n }\n }\n return createNode(v, undefined, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error('This should not happen, please report a bug.');\n },\n schema,\n sourceObjects: new Map()\n });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, 'schema', {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map(it => isNode(it) || isPair(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (isCollection(node))\n node.addIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if (isCollection(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && isScalar(node) ? node.value : node;\n else\n return isCollection(node) ? node.getIn(rest, keepScalar) : undefined;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every(node => {\n if (!isPair(node))\n return false;\n const n = node.value;\n return (n == null ||\n (allowScalar &&\n isScalar(n) &&\n n.value == null &&\n !n.commentBefore &&\n !n.comment &&\n !n.tag));\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return isCollection(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n }\n else {\n const node = this.get(key, true);\n if (isCollection(node))\n node.setIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n}\n\nexport { Collection, collectionFromPath, isEmptyPath };\n","/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n ? indentComment(comment, indent)\n : comment.includes('\\n')\n ? '\\n' + indentComment(comment, indent)\n : (str.endsWith(' ') ? '' : ' ') + comment;\n\nexport { indentComment, lineComment, stringifyComment };\n","const FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n if (lineWidth < minContentWidth)\n minContentWidth = 0;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i, indent.length);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; (ch = text[(i += 1)]);) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n case 'u':\n i += 5;\n break;\n case 'U':\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i, indent.length);\n end = i + indent.length + endStep;\n split = undefined;\n }\n else {\n if (ch === ' ' &&\n prev &&\n prev !== ' ' &&\n prev !== '\\n' &&\n prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n }\n else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[(i += 1)];\n overflow = true;\n }\n // Account for newline escape, but don't break preceding escape\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n // Bail out if lineWidth & minContentWidth are shorter than an escape string\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n }\n else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (fold === 0)\n res = `\\n${indent}${text.slice(0, end)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n }\n return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i, indent) {\n let end = i;\n let start = i + 1;\n let ch = text[start];\n while (ch === ' ' || ch === '\\t') {\n if (i < start + indent) {\n ch = text[++i];\n }\n else {\n do {\n ch = text[++i];\n } while (ch && ch !== '\\n');\n end = i;\n start = i + 1;\n ch = text[start];\n }\n }\n return end;\n}\n\nexport { FOLD_BLOCK, FOLD_FLOW, FOLD_QUOTED, foldFlowLines };\n","import { Scalar } from '../nodes/Scalar.js';\nimport { foldFlowLines, FOLD_FLOW, FOLD_QUOTED, FOLD_BLOCK } from './foldFlowLines.js';\n\nconst getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n}\nfunction doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n if (ch === '\\\\')\n switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n case '0007':\n str += '\\\\a';\n break;\n case '000b':\n str += '\\\\v';\n break;\n case '001b':\n str += '\\\\e';\n break;\n case '0085':\n str += '\\\\N';\n break;\n case '00a0':\n str += '\\\\_';\n break;\n case '2028':\n str += '\\\\L';\n break;\n case '2029':\n str += '\\\\P';\n break;\n default:\n if (code.substr(0, 2) === '00')\n str += '\\\\x' + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case 'n':\n if (implicitKey ||\n json[i + 2] === '\"' ||\n json.length < minMultiLineLength) {\n i += 1;\n }\n else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n while (json[i + 2] === '\\\\' &&\n json[i + 3] === 'n' &&\n json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n str += indent;\n // space after newline needs to be escaped to not be folded\n if (json[i + 2] === ' ')\n str += '\\\\';\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey\n ? str\n : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false ||\n (ctx.implicitKey && value.includes('\\n')) ||\n /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n )\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey\n ? res\n : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n blockEndNewlines = new RegExp('(^|(?<!\\n))\\n+(?!\\n|$)', 'g');\n}\ncatch {\n blockEndNewlines = /\\n+(?!\\n|$)/g;\n}\nfunction blockString({ comment, type, value }, ctx, onComment, onChompKeep) {\n const { blockQuote, commentString, lineWidth } = ctx.options;\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (!blockQuote || /\\n[\\t ]+$/.test(value)) {\n return quotedString(value, ctx);\n }\n const indent = ctx.indent ||\n (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const literal = blockQuote === 'literal'\n ? true\n : blockQuote === 'folded' || type === Scalar.BLOCK_FOLDED\n ? false\n : type === Scalar.BLOCK_LITERAL\n ? true\n : !lineLengthOverLimit(value, lineWidth, indent.length);\n if (!value)\n return literal ? '|\\n' : '>\\n';\n // determine chomping from whitespace at value end\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf('\\n');\n if (endNlPos === -1) {\n chomp = '-'; // strip\n }\n else if (value === end || endNlPos !== end.length - 1) {\n chomp = '+'; // keep\n if (onChompKeep)\n onChompKeep();\n }\n else {\n chomp = ''; // clip\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === '\\n')\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n // determine indent indicator from whitespace at value start\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === ' ')\n startWithSpace = true;\n else if (ch === '\\n')\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? '2' : '1'; // root is at -1\n // Leading | or > is added later\n let header = (startWithSpace ? indentSize : '') + chomp;\n if (comment) {\n header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n if (onComment)\n onComment();\n }\n if (!literal) {\n const foldedValue = value\n .replace(/\\n+/g, '\\n$&')\n .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n let literalFallback = false;\n const foldOptions = getFoldOptions(ctx, true);\n if (blockQuote !== 'folded' && type !== Scalar.BLOCK_FOLDED) {\n foldOptions.onOverflow = () => {\n literalFallback = true;\n };\n }\n const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions);\n if (!literalFallback)\n return `>${header}\\n${indent}${body}`;\n }\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `|${header}\\n${indent}${start}${value}${end}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if ((implicitKey && value.includes('\\n')) ||\n (inFlow && /[[\\]{},]/.test(value))) {\n return quotedString(value, ctx);\n }\n if (/^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || !value.includes('\\n')\n ? quotedString(value, ctx)\n : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey &&\n !inFlow &&\n type !== Scalar.PLAIN &&\n value.includes('\\n')) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === '') {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey\n ? str\n : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === 'string'\n ? item\n : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== Scalar.QUOTE_DOUBLE) {\n // force double quotes on control characters & unpaired surrogates\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case Scalar.BLOCK_FOLDED:\n case Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow\n ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n : blockString(ss, ctx, onComment, onChompKeep);\n case Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = (implicitKey && defaultKeyType) || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n}\n\nexport { stringifyString };\n","import { anchorIsValid } from '../doc/anchors.js';\nimport { isPair, isAlias, isNode, isScalar, isCollection } from '../nodes/identity.js';\nimport { stringifyComment } from './stringifyComment.js';\nimport { stringifyString } from './stringifyString.js';\n\nfunction createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: stringifyComment,\n defaultKeyType: null,\n defaultStringType: 'PLAIN',\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: 'false',\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: 'null',\n simpleKeys: false,\n singleQuote: null,\n trailingComma: false,\n trueStr: 'true',\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case 'block':\n inFlow = false;\n break;\n case 'flow':\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n indent: '',\n indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',\n inFlow,\n options: opt\n };\n}\nfunction getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0)\n return match.find(t => t.format === item.format) ?? match[0];\n }\n let tagObj = undefined;\n let obj;\n if (isScalar(item)) {\n obj = item.value;\n let match = tags.filter(t => t.identify?.(obj));\n if (match.length > 1) {\n const testMatch = match.filter(t => t.test);\n if (testMatch.length > 0)\n match = testMatch;\n }\n tagObj =\n match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n }\n else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (isScalar(node) || isCollection(node)) && node.anchor;\n if (anchor && anchorIsValid(anchor)) {\n anchors.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n if (isPair(item))\n return item.toString(ctx, onComment, onChompKeep);\n if (isAlias(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n }\n else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = undefined;\n const node = isNode(item)\n ? item\n : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function'\n ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n : isScalar(node)\n ? stringifyString(node, ctx, onComment, onChompKeep)\n : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return isScalar(node) || str[0] === '{' || str[0] === '['\n ? `${props} ${str}`\n : `${props}\\n${ctx.indent}${str}`;\n}\n\nexport { createStringifyContext, stringify };\n","import { isCollection, isNode, isScalar, isSeq } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\nimport { stringify } from './stringify.js';\nimport { lineComment, indentComment } from './stringifyComment.js';\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = (isNode(key) && key.comment) || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n if (isCollection(key) || (!isNode(key) && typeof key === 'object')) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys &&\n (!key ||\n (keyComment && value == null && !ctx.inFlow) ||\n isCollection(key) ||\n (isScalar(key)\n ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL\n : typeof key === 'object'));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n }\n }\n else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += lineComment(str, ctx.indent, commentString(keyComment));\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += lineComment(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\\n${indent}:`;\n }\n else {\n str = `${str}:`;\n if (keyComment)\n str += lineComment(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if (isNode(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n }\n else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === 'object')\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && isScalar(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq &&\n indentStep.length >= 2 &&\n !ctx.inFlow &&\n !explicitKey &&\n isSeq(value) &&\n !value.flow &&\n !value.tag &&\n !value.anchor) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n let ws = ' ';\n if (keyComment || vsb || vcb) {\n ws = vsb ? '\\n' : '';\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\\n${indentComment(cs, ctx.indent)}`;\n }\n if (valueStr === '' && !ctx.inFlow) {\n if (ws === '\\n' && valueComment)\n ws = '\\n\\n';\n }\n else {\n ws += `\\n${ctx.indent}`;\n }\n }\n else if (!explicitKey && isCollection(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf('\\n');\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n let sp0 = valueStr.indexOf(' ');\n if (vs0 === '&' &&\n sp0 !== -1 &&\n sp0 < nl0 &&\n valueStr[sp0 + 1] === '!') {\n sp0 = valueStr.indexOf(' ', sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\\n${ctx.indent}`;\n }\n }\n else if (valueStr === '' || valueStr[0] === '\\n') {\n ws = '';\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n }\n else if (valueComment && !valueCommentDone) {\n str += lineComment(str, ctx.indent, commentString(valueComment));\n }\n else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n}\n\nexport { stringifyPair };\n","function debug(logLevel, ...messages) {\n if (logLevel === 'debug')\n console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n if (logLevel === 'debug' || logLevel === 'warn') {\n console.warn(warning);\n }\n}\n\nexport { debug, warn };\n","import { isScalar, isSeq, isAlias, isMap } from '../../nodes/identity.js';\nimport { Scalar } from '../../nodes/Scalar.js';\n\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nconst MERGE_KEY = '<<';\nconst merge = {\n identify: value => value === MERGE_KEY ||\n (typeof value === 'symbol' && value.description === MERGE_KEY),\n default: 'key',\n tag: 'tag:yaml.org,2002:merge',\n test: /^<<$/,\n resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), {\n addToJSMap: addMergeToJSMap\n }),\n stringify: () => MERGE_KEY\n};\nconst isMergeKey = (ctx, key) => (merge.identify(key) ||\n (isScalar(key) &&\n (!key.type || key.type === Scalar.PLAIN) &&\n merge.identify(key.value))) &&\n ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);\nfunction addMergeToJSMap(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (isSeq(source))\n for (const it of source.items)\n mergeValue(ctx, map, it);\n else if (Array.isArray(source))\n for (const it of source)\n mergeValue(ctx, map, it);\n else\n mergeValue(ctx, map, source);\n}\nfunction mergeValue(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (!isMap(source))\n throw new Error('Merge sources must be maps or map aliases');\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value);\n }\n else if (map instanceof Set) {\n map.add(key);\n }\n else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n}\nfunction resolveAliasValue(ctx, value) {\n return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;\n}\n\nexport { addMergeToJSMap, isMergeKey, merge };\n","import { warn } from '../log.js';\nimport { isMergeKey, addMergeToJSMap } from '../schema/yaml-1.1/merge.js';\nimport { createStringifyContext } from '../stringify/stringify.js';\nimport { isNode } from './identity.js';\nimport { toJS } from './toJS.js';\n\nfunction addPairToJSMap(ctx, map, { key, value }) {\n if (isNode(key) && key.addToJSMap)\n key.addToJSMap(ctx, map, value);\n // TODO: Should drop this special case for bare << handling\n else if (isMergeKey(ctx, key))\n addMergeToJSMap(ctx, map, value);\n else {\n const jsKey = toJS(key, '', ctx);\n if (map instanceof Map) {\n map.set(jsKey, toJS(value, jsKey, ctx));\n }\n else if (map instanceof Set) {\n map.add(jsKey);\n }\n else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = toJS(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return '';\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n if (typeof jsKey !== 'object')\n return String(jsKey);\n if (isNode(key) && ctx?.doc) {\n const strCtx = createStringifyContext(ctx.doc, {});\n strCtx.anchors = new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n}\n\nexport { addPairToJSMap };\n","import { createNode } from '../doc/createNode.js';\nimport { stringifyPair } from '../stringify/stringifyPair.js';\nimport { addPairToJSMap } from './addPairToJSMap.js';\nimport { NODE_TYPE, PAIR, isNode } from './identity.js';\n\nfunction createPair(key, value, ctx) {\n const k = createNode(key, undefined, ctx);\n const v = createNode(value, undefined, ctx);\n return new Pair(k, v);\n}\nclass Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, NODE_TYPE, { value: PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if (isNode(key))\n key = key.clone(schema);\n if (isNode(value))\n value = value.clone(schema);\n return new Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? new Map() : {};\n return addPairToJSMap(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc\n ? stringifyPair(this, ctx, onComment, onChompKeep)\n : JSON.stringify(this);\n }\n}\n\nexport { Pair, createPair };\n","import { isNode, isPair } from '../nodes/identity.js';\nimport { stringify } from './stringify.js';\nimport { lineComment, indentComment } from './stringifyComment.js';\n\nfunction stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false; // flag for the preceding node's status\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (isNode(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment = item.comment;\n }\n else if (isPair(item)) {\n const ik = isNode(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str = stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n if (comment)\n str += lineComment(str, itemIndent, commentString(comment));\n if (chompKeep && comment)\n chompKeep = false;\n lines.push(blockItemPrefix + str);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n }\n else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\\n${indent}${line}` : '\\n';\n }\n }\n if (comment) {\n str += '\\n' + indentComment(commentString(comment), indent);\n if (onComment)\n onComment();\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n}\nfunction stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (isNode(item)) {\n if (item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n }\n else if (isPair(item)) {\n const ik = isNode(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = isNode(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n }\n else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = stringify(item, itemCtx, () => (comment = null));\n reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\\n'));\n if (i < items.length - 1) {\n str += ',';\n }\n else if (ctx.options.trailingComma) {\n if (ctx.options.lineWidth > 0) {\n reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +\n (str.length + 2) >\n ctx.options.lineWidth);\n }\n if (reqNewline) {\n str += ',';\n }\n }\n if (comment)\n str += lineComment(str, itemIndent, commentString(comment));\n lines.push(str);\n linesAtValue = lines.length;\n }\n const { start, end } = flowChars;\n if (lines.length === 0) {\n return start + end;\n }\n else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n }\n if (reqNewline) {\n let str = start;\n for (const line of lines)\n str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n return `${str}\\n${indent}${end}`;\n }\n else {\n return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n }\n }\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, '');\n if (comment) {\n const ic = indentComment(commentString(comment), indent);\n lines.push(ic.trimStart()); // Avoid double indent on first line\n }\n}\n\nexport { stringifyCollection };\n","import { stringifyCollection } from '../stringify/stringifyCollection.js';\nimport { addPairToJSMap } from './addPairToJSMap.js';\nimport { Collection } from './Collection.js';\nimport { MAP, isPair, isScalar } from './identity.js';\nimport { Pair, createPair } from './Pair.js';\nimport { isScalarValue } from './Scalar.js';\n\nfunction findPair(items, key) {\n const k = isScalar(key) ? key.value : key;\n for (const it of items) {\n if (isPair(it)) {\n if (it.key === key || it.key === k)\n return it;\n if (isScalar(it.key) && it.key.value === k)\n return it;\n }\n }\n return undefined;\n}\nclass YAMLMap extends Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:map';\n }\n constructor(schema) {\n super(MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === 'function')\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== undefined || keepUndefined)\n map.items.push(createPair(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n }\n else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if (isPair(pair))\n _pair = pair;\n else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n // In TypeScript, this never happens.\n _pair = new Pair(pair, pair?.value);\n }\n else\n _pair = new Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n // For scalars, keep the old node & its comments and anchors\n if (isScalar(prev.value) && isScalarValue(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n }\n else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n }\n else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && isScalar(node) ? node.value : node) ?? undefined;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n addPairToJSMap(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!isPair(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return stringifyCollection(this, ctx, {\n blockItemPrefix: '',\n flowChars: { start: '{', end: '}' },\n itemIndent: ctx.indent || '',\n onChompKeep,\n onComment\n });\n }\n}\n\nexport { YAMLMap, findPair };\n","import { isMap } from '../../nodes/identity.js';\nimport { YAMLMap } from '../../nodes/YAMLMap.js';\n\nconst map = {\n collection: 'map',\n default: true,\n nodeClass: YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve(map, onError) {\n if (!isMap(map))\n onError('Expected a mapping for this tag');\n return map;\n },\n createNode: (schema, obj, ctx) => YAMLMap.from(schema, obj, ctx)\n};\n\nexport { map };\n","import { createNode } from '../doc/createNode.js';\nimport { stringifyCollection } from '../stringify/stringifyCollection.js';\nimport { Collection } from './Collection.js';\nimport { SEQ, isScalar } from './identity.js';\nimport { isScalarValue } from './Scalar.js';\nimport { toJS } from './toJS.js';\n\nclass YAMLSeq extends Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:seq';\n }\n constructor(schema) {\n super(SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return undefined;\n const it = this.items[idx];\n return !keepScalar && isScalar(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if (isScalar(prev) && isScalarValue(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push(toJS(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return stringifyCollection(this, ctx, {\n blockItemPrefix: '- ',\n flowChars: { start: '[', end: ']' },\n itemIndent: (ctx.indent || '') + ' ',\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === 'function') {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push(createNode(it, undefined, ctx));\n }\n }\n return seq;\n }\n}\nfunction asItemIndex(key) {\n let idx = isScalar(key) ? key.value : key;\n if (idx && typeof idx === 'string')\n idx = Number(idx);\n return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n ? idx\n : null;\n}\n\nexport { YAMLSeq };\n","import { isSeq } from '../../nodes/identity.js';\nimport { YAMLSeq } from '../../nodes/YAMLSeq.js';\n\nconst seq = {\n collection: 'seq',\n default: true,\n nodeClass: YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve(seq, onError) {\n if (!isSeq(seq))\n onError('Expected a sequence for this tag');\n return seq;\n },\n createNode: (schema, obj, ctx) => YAMLSeq.from(schema, obj, ctx)\n};\n\nexport { seq };\n","import { stringifyString } from '../../stringify/stringifyString.js';\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return stringifyString(item, ctx, onComment, onChompKeep);\n }\n};\n\nexport { string };\n","import { Scalar } from '../../nodes/Scalar.js';\n\nconst nullTag = {\n identify: value => value == null,\n createNode: () => new Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new Scalar(null),\n stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n ? source\n : ctx.options.nullStr\n};\n\nexport { nullTag };\n","import { Scalar } from '../../nodes/Scalar.js';\n\nconst boolTag = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => new Scalar(str[0] === 't' || str[0] === 'T'),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === 't' || source[0] === 'T';\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n};\n\nexport { boolTag };\n","function stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === 'bigint')\n return String(value);\n const num = typeof value === 'number' ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);\n if (!format &&\n minFractionDigits &&\n (!tag || tag === 'tag:yaml.org,2002:float') &&\n /^-?\\d/.test(n) &&\n !n.includes('e')) {\n let i = n.indexOf('.');\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += '0';\n }\n return n;\n}\n\nexport { stringifyNumber };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: str => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new Scalar(parseFloat(str));\n const dot = str.indexOf('.');\n if (dot !== -1 && str[str.length - 1] === '0')\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: stringifyNumber\n};\n\nexport { float, floatExp, floatNaN };\n","import { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return stringifyNumber(node);\n}\nconst intOct = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber\n};\nconst intHex = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexport { int, intHex, intOct };\n","import { map } from '../common/map.js';\nimport { nullTag } from '../common/null.js';\nimport { seq } from '../common/seq.js';\nimport { string } from '../common/string.js';\nimport { boolTag } from './bool.js';\nimport { floatNaN, floatExp, float } from './float.js';\nimport { intOct, int, intHex } from './int.js';\n\nconst schema = [\n map,\n seq,\n string,\n nullTag,\n boolTag,\n intOct,\n int,\n intHex,\n floatNaN,\n floatExp,\n float\n];\n\nexport { schema };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { map } from '../common/map.js';\nimport { seq } from '../common/seq.js';\n\nfunction intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify: stringifyJSON\n },\n {\n identify: value => value == null,\n createNode: () => new Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true$|^false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n }\n];\nconst jsonError = {\n default: true,\n tag: '',\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n};\nconst schema = [map, seq].concat(jsonScalars, jsonError);\n\nexport { schema };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { stringifyString } from '../../stringify/stringifyString.js';\n\nconst binary = {\n identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n }\n else {\n onError('This environment does not support reading binary tags; either Buffer or atob is required');\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n if (!value)\n return '';\n const buf = value; // checked earlier by binary.identify()\n let str;\n if (typeof btoa === 'function') {\n let s = '';\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n }\n else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n type ?? (type = Scalar.BLOCK_LITERAL);\n if (type !== Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n }\n return stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n};\n\nexport { binary };\n","import { isSeq, isPair, isMap } from '../../nodes/identity.js';\nimport { createPair, Pair } from '../../nodes/Pair.js';\nimport { Scalar } from '../../nodes/Scalar.js';\nimport { YAMLSeq } from '../../nodes/YAMLSeq.js';\n\nfunction resolvePairs(seq, onError) {\n if (isSeq(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (isPair(item))\n continue;\n else if (isMap(item)) {\n if (item.items.length > 1)\n onError('Each pair must have its own sequence indicator');\n const pair = item.items[0] || new Pair(new Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore\n ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment\n ? `${item.comment}\\n${cn.comment}`\n : item.comment;\n }\n item = pair;\n }\n seq.items[i] = isPair(item) ? item : new Pair(item);\n }\n }\n else\n onError('Expected a sequence for this tag');\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs = new YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === 'function')\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n }\n else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n }\n else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n }\n else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n }\n else {\n key = it;\n }\n pairs.items.push(createPair(key, value, ctx));\n }\n return pairs;\n}\nconst pairs = {\n collection: 'seq',\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: resolvePairs,\n createNode: createPairs\n};\n\nexport { createPairs, pairs, resolvePairs };\n","import { isScalar, isPair } from '../../nodes/identity.js';\nimport { toJS } from '../../nodes/toJS.js';\nimport { YAMLMap } from '../../nodes/YAMLMap.js';\nimport { YAMLSeq } from '../../nodes/YAMLSeq.js';\nimport { resolvePairs, createPairs } from './pairs.js';\n\nclass YAMLOMap extends YAMLSeq {\n constructor() {\n super();\n this.add = YAMLMap.prototype.add.bind(this);\n this.delete = YAMLMap.prototype.delete.bind(this);\n this.get = YAMLMap.prototype.get.bind(this);\n this.has = YAMLMap.prototype.has.bind(this);\n this.set = YAMLMap.prototype.set.bind(this);\n this.tag = YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if (isPair(pair)) {\n key = toJS(pair.key, '', ctx);\n value = toJS(pair.value, key, ctx);\n }\n else {\n key = toJS(pair, '', ctx);\n }\n if (map.has(key))\n throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs = createPairs(schema, iterable, ctx);\n const omap = new this();\n omap.items = pairs.items;\n return omap;\n }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n collection: 'seq',\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve(seq, onError) {\n const pairs = resolvePairs(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs.items) {\n if (isScalar(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n }\n else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\nexport { YAMLOMap, omap };\n","import { Scalar } from '../../nodes/Scalar.js';\n\nfunction boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n identify: value => value === true,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new Scalar(true),\n stringify: boolStringify\n};\nconst falseTag = {\n identify: value => value === false,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n resolve: () => new Scalar(false),\n stringify: boolStringify\n};\n\nexport { falseTag, trueTag };\n","import { Scalar } from '../../nodes/Scalar.js';\nimport { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, '')),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new Scalar(parseFloat(str.replace(/_/g, '')));\n const dot = str.indexOf('.');\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, '');\n if (f[f.length - 1] === '0')\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: stringifyNumber\n};\n\nexport { float, floatExp, floatNaN };\n","import { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === '-' || sign === '+')\n offset += 1;\n str = str.substring(offset).replace(/_/g, '');\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n return stringifyNumber(node);\n}\nconst intBin = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber\n};\nconst intHex = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexport { int, intBin, intHex, intOct };\n","import { isMap, isPair, isScalar } from '../../nodes/identity.js';\nimport { Pair, createPair } from '../../nodes/Pair.js';\nimport { YAMLMap, findPair } from '../../nodes/YAMLMap.js';\n\nclass YAMLSet extends YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = YAMLSet.tag;\n }\n add(key) {\n let pair;\n if (isPair(key))\n pair = key;\n else if (key &&\n typeof key === 'object' &&\n 'key' in key &&\n 'value' in key &&\n key.value === null)\n pair = new Pair(key.key, null);\n else\n pair = new Pair(key, null);\n const prev = findPair(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = findPair(this.items, key);\n return !keepPair && isPair(pair)\n ? isScalar(pair.key)\n ? pair.key.value\n : pair.key\n : pair;\n }\n set(key, value) {\n if (typeof value !== 'boolean')\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = findPair(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n }\n else if (!prev && value) {\n this.items.push(new Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error('Set items must all have null values');\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === 'function')\n value = replacer.call(iterable, value, value);\n set.items.push(createPair(value, null, ctx));\n }\n return set;\n }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n collection: 'map',\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if (isMap(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError('Set items must all have null values');\n }\n else\n onError('Expected a mapping for this tag');\n return map;\n }\n};\n\nexport { YAMLSet, set };\n","import { stringifyNumber } from '../../stringify/stringifyNumber.js';\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts\n .replace(/_/g, '')\n .split(':')\n .reduce((res, p) => res * num(60) + num(p), num(0));\n return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === 'bigint')\n num = n => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return stringifyNumber(node);\n let sign = '';\n if (value < 0) {\n sign = '-';\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60]; // seconds, including ms\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n }\n else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60); // minutes\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value); // hours\n }\n }\n return (sign +\n parts\n .map(n => String(n).padStart(2, '0'))\n .join(':')\n .replace(/000000\\d*$/, '') // % 60 may introduce error\n );\n}\nconst intTime = {\n identify: value => typeof value === 'bigint' || Number.isInteger(value),\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: str => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:' + // time is optional\n '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?$'),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 60000 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\\.000Z$/, '') ?? ''\n};\n\nexport { floatTime, intTime, timestamp };\n","import { map } from '../common/map.js';\nimport { nullTag } from '../common/null.js';\nimport { seq } from '../common/seq.js';\nimport { string } from '../common/string.js';\nimport { binary } from './binary.js';\nimport { trueTag, falseTag } from './bool.js';\nimport { floatNaN, floatExp, float } from './float.js';\nimport { intBin, intOct, int, intHex } from './int.js';\nimport { merge } from './merge.js';\nimport { omap } from './omap.js';\nimport { pairs } from './pairs.js';\nimport { set } from './set.js';\nimport { intTime, floatTime, timestamp } from './timestamp.js';\n\nconst schema = [\n map,\n seq,\n string,\n nullTag,\n trueTag,\n falseTag,\n intBin,\n intOct,\n int,\n intHex,\n floatNaN,\n floatExp,\n float,\n binary,\n merge,\n omap,\n pairs,\n set,\n intTime,\n floatTime,\n timestamp\n];\n\nexport { schema };\n","import { map } from './common/map.js';\nimport { nullTag } from './common/null.js';\nimport { seq } from './common/seq.js';\nimport { string } from './common/string.js';\nimport { boolTag } from './core/bool.js';\nimport { floatNaN, floatExp, float } from './core/float.js';\nimport { intOct, intHex, int } from './core/int.js';\nimport { schema } from './core/schema.js';\nimport { schema as schema$1 } from './json/schema.js';\nimport { binary } from './yaml-1.1/binary.js';\nimport { merge } from './yaml-1.1/merge.js';\nimport { omap } from './yaml-1.1/omap.js';\nimport { pairs } from './yaml-1.1/pairs.js';\nimport { schema as schema$2 } from './yaml-1.1/schema.js';\nimport { set } from './yaml-1.1/set.js';\nimport { timestamp, intTime, floatTime } from './yaml-1.1/timestamp.js';\n\nconst schemas = new Map([\n ['core', schema],\n ['failsafe', [map, seq, string]],\n ['json', schema$1],\n ['yaml11', schema$2],\n ['yaml-1.1', schema$2]\n]);\nconst tagsByName = {\n binary,\n bool: boolTag,\n float,\n floatExp,\n floatNaN,\n floatTime,\n int,\n intHex,\n intOct,\n intTime,\n map,\n merge,\n null: nullTag,\n omap,\n pairs,\n seq,\n set,\n timestamp\n};\nconst coreKnownTags = {\n 'tag:yaml.org,2002:binary': binary,\n 'tag:yaml.org,2002:merge': merge,\n 'tag:yaml.org,2002:omap': omap,\n 'tag:yaml.org,2002:pairs': pairs,\n 'tag:yaml.org,2002:set': set,\n 'tag:yaml.org,2002:timestamp': timestamp\n};\nfunction getTags(customTags, schemaName, addMergeTag) {\n const schemaTags = schemas.get(schemaName);\n if (schemaTags && !customTags) {\n return addMergeTag && !schemaTags.includes(merge)\n ? schemaTags.concat(merge)\n : schemaTags.slice();\n }\n let tags = schemaTags;\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys())\n .filter(key => key !== 'yaml11')\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n }\n else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n if (addMergeTag)\n tags = tags.concat(merge);\n return tags.reduce((tags, tag) => {\n const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag;\n if (!tagObj) {\n const tagName = JSON.stringify(tag);\n const keys = Object.keys(tagsByName)\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);\n }\n if (!tags.includes(tagObj))\n tags.push(tagObj);\n return tags;\n }, []);\n}\n\nexport { coreKnownTags, getTags };\n","import { MAP, SCALAR, SEQ } from '../nodes/identity.js';\nimport { map } from './common/map.js';\nimport { seq } from './common/seq.js';\nimport { string } from './common/string.js';\nimport { getTags, coreKnownTags } from './tags.js';\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat)\n ? getTags(compat, 'compat')\n : compat\n ? getTags(null, compat)\n : null;\n this.name = (typeof schema === 'string' && schema) || 'core';\n this.knownTags = resolveKnownTags ? coreKnownTags : {};\n this.tags = getTags(customTags, this.name, merge);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, MAP, { value: map });\n Object.defineProperty(this, SCALAR, { value: string });\n Object.defineProperty(this, SEQ, { value: seq });\n // Used by createMap()\n this.sortMapEntries =\n typeof sortMapEntries === 'function'\n ? sortMapEntries\n : sortMapEntries === true\n ? sortMapEntriesByKey\n : null;\n }\n clone() {\n const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n}\n\nexport { Schema };\n","import { isNode } from '../nodes/identity.js';\nimport { createStringifyContext, stringify } from './stringify.js';\nimport { indentComment, lineComment } from './stringifyComment.js';\n\nfunction stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n }\n else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push('---');\n const ctx = createStringifyContext(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift('');\n const cs = commentString(doc.commentBefore);\n lines.unshift(indentComment(cs, ''));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if (isNode(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push('');\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push(indentComment(cs, ''));\n }\n // top-level block scalars need to be indented if followed by a comment\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n let body = stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n if (contentComment)\n body += lineComment(body, '', commentString(contentComment));\n if ((body[0] === '|' || body[0] === '>') &&\n lines[lines.length - 1] === '---') {\n // Top-level block scalars with a preceding doc marker ought to use the\n // same line for their header.\n lines[lines.length - 1] = `--- ${body}`;\n }\n else\n lines.push(body);\n }\n else {\n lines.push(stringify(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes('\\n')) {\n lines.push('...');\n lines.push(indentComment(cs, ''));\n }\n else {\n lines.push(`... ${cs}`);\n }\n }\n else {\n lines.push('...');\n }\n }\n else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, '');\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n lines.push('');\n lines.push(indentComment(commentString(dc), ''));\n }\n }\n return lines.join('\\n') + '\\n';\n}\n\nexport { stringifyDocument };\n","import { Alias } from '../nodes/Alias.js';\nimport { isEmptyPath, collectionFromPath } from '../nodes/Collection.js';\nimport { NODE_TYPE, DOC, isNode, isCollection, isScalar } from '../nodes/identity.js';\nimport { Pair } from '../nodes/Pair.js';\nimport { toJS } from '../nodes/toJS.js';\nimport { Schema } from '../schema/Schema.js';\nimport { stringifyDocument } from '../stringify/stringifyDocument.js';\nimport { anchorNames, findNewAnchor, createNodeAnchors } from './anchors.js';\nimport { applyReviver } from './applyReviver.js';\nimport { createNode } from './createNode.js';\nimport { Directives } from './directives.js';\n\nclass Document {\n constructor(value, replacer, options) {\n /** A comment before this Document */\n this.commentBefore = null;\n /** A comment immediately after this Document */\n this.comment = null;\n /** Errors encountered during parsing. */\n this.errors = [];\n /** Warnings encountered during parsing. */\n this.warnings = [];\n Object.defineProperty(this, NODE_TYPE, { value: DOC });\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: 'warn',\n prettyErrors: true,\n strict: true,\n stringKeys: false,\n uniqueKeys: true,\n version: '1.2'\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n }\n else\n this.directives = new Directives({ version });\n this.setSchema(version, options);\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents =\n value === undefined ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(Document.prototype, {\n [NODE_TYPE]: { value: DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n // @ts-expect-error We can't really know that this matches Contents.\n copy.contents = isNode(this.contents)\n ? this.contents.clone(copy.schema)\n : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = anchorNames(this);\n node.anchor =\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? findNewAnchor(name || 'a', prev) : name;\n }\n return new Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = undefined;\n if (typeof replacer === 'function') {\n value = replacer.call({ '': value }, '', value);\n _replacer = replacer;\n }\n else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = createNodeAnchors(this, \n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || 'a');\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = createNode(value, tag, ctx);\n if (flow && isCollection(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if (isEmptyPath(path)) {\n if (this.contents == null)\n return false;\n // @ts-expect-error Presumed impossible if Strict extends false\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents)\n ? this.contents.deleteIn(path)\n : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return isCollection(this.contents)\n ? this.contents.get(key, keepScalar)\n : undefined;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if (isEmptyPath(path))\n return !keepScalar && isScalar(this.contents)\n ? this.contents.value\n : this.contents;\n return isCollection(this.contents)\n ? this.contents.getIn(path, keepScalar)\n : undefined;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return isCollection(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if (isEmptyPath(path))\n return this.contents !== undefined;\n return isCollection(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = collectionFromPath(this.schema, [key], value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if (isEmptyPath(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === 'number')\n version = String(version);\n let opt;\n switch (version) {\n case '1.1':\n if (this.directives)\n this.directives.yaml.version = '1.1';\n else\n this.directives = new Directives({ version: '1.1' });\n opt = { resolveKnownTags: false, schema: 'yaml-1.1' };\n break;\n case '1.2':\n case 'next':\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new Directives({ version });\n opt = { resolveKnownTags: true, schema: 'core' };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n // Not using `instanceof Schema` to allow for duck typing\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS(this.contents, jsonArg ?? '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error('Document with errors cannot be stringified');\n if ('indent' in options &&\n (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return stringifyDocument(this, options);\n }\n}\nfunction assertCollection(contents) {\n if (isCollection(contents))\n return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nexport { Document };\n","class YAMLError extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n}\nclass YAMLParseError extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLParseError', pos, code, message);\n }\n}\nclass YAMLWarning extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLWarning', pos, code, message);\n }\n}\nconst prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map(pos => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src\n .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n .replace(/[\\n\\r]+$/, '');\n // Trim to max 80 chars, keeping col position near the middle\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = '…' + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + '…';\n // Include previous line in context if pointing at line start\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n // Regexp won't match if start is trimmed\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + '…\\n';\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end?.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = ' '.repeat(ci) + '^'.repeat(count);\n error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n }\n};\n\nexport { YAMLError, YAMLParseError, YAMLWarning, prettifyError };\n","function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = '';\n let commentSep = '';\n let hasNewline = false;\n let reqSpace = false;\n let tab = null;\n let anchor = null;\n let tag = null;\n let newlineAfterProp = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== 'space' &&\n token.type !== 'newline' &&\n token.type !== 'comma')\n onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n reqSpace = false;\n }\n if (tab) {\n if (atNewline && token.type !== 'comment' && token.type !== 'newline') {\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n }\n tab = null;\n }\n switch (token.type) {\n case 'space':\n // At the doc level, tabs at line start may be parsed\n // as leading white space rather than indentation.\n // In a flow collection, only the parser handles indent.\n if (!flow &&\n (indicator !== 'doc-start' || next?.type !== 'flow-collection') &&\n token.source.includes('\\t')) {\n tab = token;\n }\n hasSpace = true;\n break;\n case 'comment': {\n if (!hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = token.source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = '';\n atNewline = false;\n break;\n }\n case 'newline':\n if (atNewline) {\n if (comment)\n comment += token.source;\n else if (!found || indicator !== 'seq-item-ind')\n spaceBefore = true;\n }\n else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n newlineAfterProp = token;\n hasSpace = true;\n break;\n case 'anchor':\n if (anchor)\n onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n if (token.source.endsWith(':'))\n onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n anchor = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case 'tag': {\n if (tag)\n onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n tag = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n // Could here handle preceding comments differently\n if (anchor || tag)\n onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n found = token;\n atNewline =\n indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';\n hasSpace = false;\n break;\n case 'comma':\n if (flow) {\n if (comma)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n // else fallthrough\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace &&\n next &&\n next.type !== 'space' &&\n next.type !== 'newline' &&\n next.type !== 'comma' &&\n (next.type !== 'scalar' || next.source !== '')) {\n onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n }\n if (tab &&\n ((atNewline && tab.indent <= parentIndent) ||\n next?.type === 'block-map' ||\n next?.type === 'block-seq'))\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n anchor,\n tag,\n newlineAfterProp,\n end,\n start: start ?? end\n };\n}\n\nexport { resolveProps };\n","function containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case 'alias':\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n if (key.source.includes('\\n'))\n return true;\n if (key.end)\n for (const st of key.end)\n if (st.type === 'newline')\n return true;\n return false;\n case 'flow-collection':\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === 'newline')\n return true;\n if (it.sep)\n for (const st of it.sep)\n if (st.type === 'newline')\n return true;\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n}\n\nexport { containsNewline };\n","import { containsNewline } from './util-contains-newline.js';\n\nfunction flowIndentCheck(indent, fc, onError) {\n if (fc?.type === 'flow-collection') {\n const end = fc.end[0];\n if (end.indent === indent &&\n (end.source === ']' || end.source === '}') &&\n containsNewline(fc)) {\n const msg = 'Flow end indicator should be more indented than parent';\n onError(end, 'BAD_INDENT', msg, true);\n }\n }\n}\n\nexport { flowIndentCheck };\n","import { isScalar } from '../nodes/identity.js';\n\nfunction mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === 'function'\n ? uniqueKeys\n : (a, b) => a === b || (isScalar(a) && isScalar(b) && a.value === b.value);\n return items.some(pair => isEqual(pair.key, search));\n}\n\nexport { mapIncludes };\n","import { Pair } from '../nodes/Pair.js';\nimport { YAMLMap } from '../nodes/YAMLMap.js';\nimport { resolveProps } from './resolve-props.js';\nimport { containsNewline } from './util-contains-newline.js';\nimport { flowIndentCheck } from './util-flow-indent-check.js';\nimport { mapIncludes } from './util-map-includes.js';\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n // key properties\n const keyProps = resolveProps(start, {\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: bm.indent,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === 'block-seq')\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n else if ('indent' in key && key.indent !== bm.indent)\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += '\\n' + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.newlineAfterProp || containsNewline(key)) {\n onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n }\n }\n else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n // key value\n ctx.atKey = true;\n const keyStart = keyProps.end;\n const keyNode = key\n ? composeNode(ctx, key, keyProps, onError)\n : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n flowIndentCheck(bm.indent, key, onError);\n ctx.atKey = false;\n if (mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n // value properties\n const valueProps = resolveProps(sep ?? [], {\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: bm.indent,\n startOnNewline: !key || key.type === 'block-scalar'\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === 'block-map' && !valueProps.hasNewline)\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n if (ctx.options.strict &&\n keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n flowIndentCheck(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n else {\n // key with no value\n if (implicitKey)\n onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n}\n\nexport { resolveBlockMap };\n","import { YAMLSeq } from '../nodes/YAMLSeq.js';\nimport { resolveProps } from './resolve-props.js';\nimport { flowIndentCheck } from './util-flow-indent-check.js';\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = resolveProps(start, {\n indicator: 'seq-item-ind',\n next: value,\n offset,\n onError,\n parentIndent: bs.indent,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value?.type === 'block-seq')\n onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n else\n onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n }\n else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n flowIndentCheck(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n}\n\nexport { resolveBlockSeq };\n","function resolveEnd(end, offset, reqSpace, onError) {\n let comment = '';\n if (end) {\n let hasSpace = false;\n let sep = '';\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case 'space':\n hasSpace = true;\n break;\n case 'comment': {\n if (reqSpace && !hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = '';\n break;\n }\n case 'newline':\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n}\n\nexport { resolveEnd };\n","import { isPair } from '../nodes/identity.js';\nimport { Pair } from '../nodes/Pair.js';\nimport { YAMLMap } from '../nodes/YAMLMap.js';\nimport { YAMLSeq } from '../nodes/YAMLSeq.js';\nimport { resolveEnd } from './resolve-end.js';\nimport { resolveProps } from './resolve-props.js';\nimport { containsNewline } from './util-contains-newline.js';\nimport { mapIncludes } from './util-map-includes.js';\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === '{';\n const fcName = isMap ? 'flow map' : 'flow sequence';\n const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq));\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = resolveProps(start, {\n flow: fcName,\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += '\\n' + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && containsNewline(key))\n onError(key, // checked by containsNewline()\n 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n }\n else {\n if (!props.comma)\n onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = '';\n loop: for (const st of start) {\n switch (st.type) {\n case 'comma':\n case 'space':\n break;\n case 'comment':\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if (isPair(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += '\\n' + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n // item is a value in a seq\n // → key & sep are empty, start does not include ? or :\n const valueNode = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else {\n // item is a key+value pair\n // key value\n ctx.atKey = true;\n const keyStart = props.end;\n const keyNode = key\n ? composeNode(ctx, key, props, onError)\n : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n ctx.atKey = false;\n // value properties\n const valueProps = resolveProps(sep ?? [], {\n flow: fcName,\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === 'newline') {\n onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n }\n }\n else if (value) {\n if ('source' in value && value.source?.[0] === ':')\n onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : valueProps.found\n ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if (mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n map.items.push(pair);\n }\n else {\n const map = new YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n const endRange = (valueNode ?? keyNode).range;\n map.range = [keyNode.range[0], endRange[1], endRange[2]];\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? '}' : ']';\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce?.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot\n ? `${name} must end with a ${expectedEnd}`\n : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = resolveEnd(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += '\\n' + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n }\n else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n}\n\nexport { resolveFlowCollection };\n","import { isNode } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\nimport { YAMLMap } from '../nodes/YAMLMap.js';\nimport { YAMLSeq } from '../nodes/YAMLSeq.js';\nimport { resolveBlockMap } from './resolve-block-map.js';\nimport { resolveBlockSeq } from './resolve-block-seq.js';\nimport { resolveFlowCollection } from './resolve-flow-collection.js';\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === 'block-map'\n ? resolveBlockMap(CN, ctx, token, onError, tag)\n : token.type === 'block-seq'\n ? resolveBlockSeq(CN, ctx, token, onError, tag)\n : resolveFlowCollection(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n // If we got a tagName matching the class, or the tag name is '!',\n // then use the tagName from the node class used to create it.\n if (tagName === '!' || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n}\nfunction composeCollection(CN, ctx, token, props, onError) {\n const tagToken = props.tag;\n const tagName = !tagToken\n ? null\n : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n if (token.type === 'block-seq') {\n const { anchor, newlineAfterProp: nl } = props;\n const lastProp = anchor && tagToken\n ? anchor.offset > tagToken.offset\n ? anchor\n : tagToken\n : (anchor ?? tagToken);\n if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n const message = 'Missing newline after block sequence props';\n onError(lastProp, 'MISSING_CHAR', message);\n }\n }\n const expType = token.type === 'block-map'\n ? 'map'\n : token.type === 'block-seq'\n ? 'seq'\n : token.start.source === '{'\n ? 'map'\n : 'seq';\n // shortcut: check if it's a generic YAMLMap or YAMLSeq\n // before jumping into the custom tag logic.\n if (!tagToken ||\n !tagName ||\n tagName === '!' ||\n (tagName === YAMLMap.tagName && expType === 'map') ||\n (tagName === YAMLSeq.tagName && expType === 'seq')) {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt?.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n }\n else {\n if (kt) {\n onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);\n }\n else {\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n const node = isNode(res)\n ? res\n : new Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n}\n\nexport { composeCollection };\n","import { Scalar } from '../nodes/Scalar.js';\n\nfunction resolveBlockScalar(ctx, scalar, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n if (!header)\n return { value: '', type: null, comment: '', range: [start, start, start] };\n const type = header.mode === '>' ? Scalar.BLOCK_FOLDED : Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n // determine the end of content & start of chomping\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === '' || content === '\\r')\n chompStart = i;\n else\n break;\n }\n // shortcut for empty contents\n if (chompStart === 0) {\n const value = header.chomp === '+' && lines.length > 0\n ? '\\n'.repeat(Math.max(1, lines.length - 1))\n : '';\n let end = start + header.length;\n if (scalar.source)\n end += scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n // find the indentation level to trim from start\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === '' || content === '\\r') {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n }\n else {\n if (indent.length < trimIndent) {\n const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n onError(offset + indent.length, 'MISSING_CHAR', message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n if (trimIndent === 0 && !ctx.atRoot) {\n const message = 'Block scalar values in collections must be indented';\n onError(offset, 'BAD_INDENT', message);\n }\n break;\n }\n offset += indent.length + content.length + 1;\n }\n // include trailing more-indented empty lines in content\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = '';\n let sep = '';\n let prevMoreIndented = false;\n // leading whitespace is kept intact\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + '\\n';\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === '\\r';\n if (crlf)\n content = content.slice(0, -1);\n /* istanbul ignore if already caught in lexer */\n if (content && indent.length < trimIndent) {\n const src = header.indent\n ? 'explicit indentation indicator'\n : 'first line';\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n indent = '';\n }\n if (type === Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n }\n else if (indent.length > trimIndent || content[0] === '\\t') {\n // more-indented content within a folded block\n if (sep === ' ')\n sep = '\\n';\n else if (!prevMoreIndented && sep === '\\n')\n sep = '\\n\\n';\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n prevMoreIndented = true;\n }\n else if (content === '') {\n // empty line\n if (sep === '\\n')\n value += '\\n';\n else\n sep = '\\n';\n }\n else {\n value += sep + content;\n sep = ' ';\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case '-':\n break;\n case '+':\n for (let i = chompStart; i < lines.length; ++i)\n value += '\\n' + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== '\\n')\n value += '\\n';\n break;\n default:\n value += '\\n';\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n /* istanbul ignore if should not happen */\n if (props[0].type !== 'block-scalar-header') {\n onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = '';\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === '-' || ch === '+'))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = '';\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case 'space':\n hasSpace = true;\n // fallthrough\n case 'newline':\n length += token.source.length;\n break;\n case 'comment':\n if (strict && !hasSpace) {\n const message = 'Comments must be separated from other tokens by white space characters';\n onError(token, 'MISSING_CHAR', message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case 'error':\n onError(token, 'UNEXPECTED_TOKEN', token.message);\n length += token.source.length;\n break;\n /* istanbul ignore next should not happen */\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n const ts = token.source;\n if (ts && typeof ts === 'string')\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1]\n ? [m[1], first.slice(m[1].length)]\n : ['', first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n}\n\nexport { resolveBlockScalar };\n","import { Scalar } from '../nodes/Scalar.js';\nimport { resolveEnd } from './resolve-end.js';\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case 'scalar':\n _type = Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case 'single-quoted-scalar':\n _type = Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case 'double-quoted-scalar':\n _type = Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n /* istanbul ignore next should not happen */\n default:\n onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n return {\n value: '',\n type: null,\n comment: '',\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = resolveEnd(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n}\nfunction plainValue(source, onError) {\n let badChar = '';\n switch (source[0]) {\n /* istanbul ignore next should not happen */\n case '\\t':\n badChar = 'a tab character';\n break;\n case ',':\n badChar = 'flow indicator character ,';\n break;\n case '%':\n badChar = 'directive indicator character %';\n break;\n case '|':\n case '>': {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case '@':\n case '`': {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n return foldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n return foldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction foldLines(source) {\n /**\n * The negative lookbehind here and in the `re` RegExp is to\n * prevent causing a polynomial search time in certain cases.\n *\n * The try-catch is for Safari, which doesn't support this yet:\n * https://caniuse.com/js-regexp-lookbehind\n */\n let first, line;\n try {\n first = new RegExp('(.*?)(?<![ \\t])[ \\t]*\\r?\\n', 'sy');\n line = new RegExp('[ \\t]*(.*?)(?:(?<![ \\t])[ \\t]*)?\\r?\\n', 'sy');\n }\n catch {\n first = /(.*?)[ \\t]*\\r?\\n/sy;\n line = /[ \\t]*(.*?)[ \\t]*\\r?\\n/sy;\n }\n let match = first.exec(source);\n if (!match)\n return source;\n let res = match[1];\n let sep = ' ';\n let pos = first.lastIndex;\n line.lastIndex = pos;\n while ((match = line.exec(source))) {\n if (match[1] === '') {\n if (sep === '\\n')\n res += sep;\n else\n sep = '\\n';\n }\n else {\n res += sep + match[1];\n sep = ' ';\n }\n pos = line.lastIndex;\n }\n const last = /[ \\t]*(.*)/sy;\n last.lastIndex = pos;\n match = last.exec(source);\n return res + sep + (match?.[1] ?? '');\n}\nfunction doubleQuotedValue(source, onError) {\n let res = '';\n for (let i = 1; i < source.length - 1; ++i) {\n const ch = source[i];\n if (ch === '\\r' && source[i + 1] === '\\n')\n continue;\n if (ch === '\\n') {\n const { fold, offset } = foldNewline(source, i);\n res += fold;\n i = offset;\n }\n else if (ch === '\\\\') {\n let next = source[++i];\n const cc = escapeCodes[next];\n if (cc)\n res += cc;\n else if (next === '\\n') {\n // skip escaped newlines, but still trim the following line\n next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === '\\r' && source[i + 1] === '\\n') {\n // skip escaped CRLF newlines, but still trim the following line\n next = source[++i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === 'x' || next === 'u' || next === 'U') {\n const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;\n res += parseCharCode(source, i + 1, length, onError);\n i += length;\n }\n else {\n const raw = source.substr(i - 1, 2);\n onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n res += raw;\n }\n }\n else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n if (next !== '\\n' && !(next === '\\r' && source[i + 2] === '\\n'))\n res += i > wsStart ? source.slice(wsStart, i + 1) : ch;\n }\n else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n let fold = '';\n let ch = source[offset + 1];\n while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n if (ch === '\\r' && source[offset + 2] !== '\\n')\n break;\n if (ch === '\\n')\n fold += '\\n';\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = ' ';\n return { fold, offset };\n}\nconst escapeCodes = {\n '0': '\\0', // null character\n a: '\\x07', // bell character\n b: '\\b', // backspace\n e: '\\x1b', // escape character\n f: '\\f', // form feed\n n: '\\n', // line feed\n r: '\\r', // carriage return\n t: '\\t', // horizontal tab\n v: '\\v', // vertical tab\n N: '\\u0085', // Unicode next line\n _: '\\u00a0', // Unicode non-breaking space\n L: '\\u2028', // Unicode line separator\n P: '\\u2029', // Unicode paragraph separator\n ' ': ' ',\n '\"': '\"',\n '/': '/',\n '\\\\': '\\\\',\n '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n try {\n return String.fromCodePoint(code);\n }\n catch {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n return raw;\n }\n}\n\nexport { resolveFlowScalar };\n","import { isScalar, SCALAR } from '../nodes/identity.js';\nimport { Scalar } from '../nodes/Scalar.js';\nimport { resolveBlockScalar } from './resolve-block-scalar.js';\nimport { resolveFlowScalar } from './resolve-flow-scalar.js';\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === 'block-scalar'\n ? resolveBlockScalar(ctx, token, onError)\n : resolveFlowScalar(token, ctx.options.strict, onError);\n const tagName = tagToken\n ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n : null;\n let tag;\n if (ctx.options.stringKeys && ctx.atKey) {\n tag = ctx.schema[SCALAR];\n }\n else if (tagName)\n tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);\n else if (token.type === 'scalar')\n tag = findScalarTagByTest(ctx, value, token, onError);\n else\n tag = ctx.schema[SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n scalar = isScalar(res) ? res : new Scalar(res);\n }\n catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n scalar = new Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === '!')\n return schema[SCALAR]; // non-specific tag\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n // Ensure that the known tag is available for stringifying,\n // but does not get used by default.\n schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n return kt;\n }\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n return schema[SCALAR];\n}\nfunction findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {\n const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) &&\n tag.test?.test(value)) || schema[SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n schema[SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n }\n }\n return tag;\n}\n\nexport { composeScalar };\n","function emptyScalarPosition(offset, before, pos) {\n if (before) {\n pos ?? (pos = before.length);\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case 'space':\n case 'comment':\n case 'newline':\n offset -= st.source.length;\n continue;\n }\n // Technically, an empty scalar is immediately after the last non-empty\n // node, but it's more useful to place it after any whitespace.\n st = before[++i];\n while (st?.type === 'space') {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n}\n\nexport { emptyScalarPosition };\n","import { Alias } from '../nodes/Alias.js';\nimport { isScalar } from '../nodes/identity.js';\nimport { composeCollection } from './compose-collection.js';\nimport { composeScalar } from './compose-scalar.js';\nimport { resolveEnd } from './resolve-end.js';\nimport { emptyScalarPosition } from './util-empty-scalar-position.js';\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n const atKey = ctx.atKey;\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case 'alias':\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n break;\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'block-scalar':\n node = composeScalar(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case 'block-map':\n case 'block-seq':\n case 'flow-collection':\n try {\n node = composeCollection(CN, ctx, token, props, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n }\n catch (error) {\n // Almost certainly here due to a stack overflow\n const message = error instanceof Error ? error.message : String(error);\n onError(token, 'RESOURCE_EXHAUSTION', message);\n }\n break;\n default: {\n const message = token.type === 'error'\n ? token.message\n : `Unsupported token (type: ${token.type})`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n isSrcToken = false;\n }\n }\n node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));\n if (anchor && node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n if (atKey &&\n ctx.options.stringKeys &&\n (!isScalar(node) ||\n typeof node.value !== 'string' ||\n (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) {\n const msg = 'With stringKeys, all keys must be strings';\n onError(tag ?? token, 'NON_STRING_KEY', msg);\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === 'scalar' && token.source === '')\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n // @ts-expect-error Type checking misses meaning of isSrcToken\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: 'scalar',\n offset: emptyScalarPosition(offset, before, pos),\n indent: -1,\n source: ''\n };\n const node = composeScalar(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new Alias(source.substring(1));\n if (alias.source === '')\n onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n if (alias.source.endsWith(':'))\n onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n const valueEnd = offset + source.length;\n const re = resolveEnd(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n}\n\nexport { composeEmptyNode, composeNode };\n","import { Document } from '../doc/Document.js';\nimport { composeNode, composeEmptyNode } from './compose-node.js';\nimport { resolveEnd } from './resolve-end.js';\nimport { resolveProps } from './resolve-props.js';\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new Document(undefined, opts);\n const ctx = {\n atKey: false,\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = resolveProps(start, {\n indicator: 'doc-start',\n next: value ?? end?.[0],\n offset,\n onError,\n parentIndent: 0,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value &&\n (value.type === 'block-map' || value.type === 'block-seq') &&\n !props.hasNewline)\n onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n }\n // @ts-expect-error If Contents is set, let's trust the user\n doc.contents = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = resolveEnd(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n}\n\nexport { composeDoc };\n","import { Directives } from '../doc/directives.js';\nimport { Document } from '../doc/Document.js';\nimport { YAMLWarning, YAMLParseError } from '../errors.js';\nimport { isCollection, isPair } from '../nodes/identity.js';\nimport { composeDoc } from './compose-doc.js';\nimport { resolveEnd } from './resolve-end.js';\n\nfunction getErrorPos(src) {\n if (typeof src === 'number')\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n let comment = '';\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case '#':\n comment +=\n (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n (source.substring(1) || ' ');\n atComment = true;\n afterEmptyLine = false;\n break;\n case '%':\n if (prelude[i + 1]?.[0] !== '#')\n i += 1;\n atComment = false;\n break;\n default:\n // This may be wrong after doc-end, but in that case it doesn't matter\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new YAMLWarning(pos, code, message));\n else\n this.errors.push(new YAMLParseError(pos, code, message));\n };\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n this.directives = new Directives({ version: options.version || '1.2' });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n //console.log({ dc: doc.comment, prelude, comment })\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n }\n else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n }\n else if (isCollection(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if (isPair(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n for (let i = 0; i < this.errors.length; ++i)\n doc.errors.push(this.errors[i]);\n for (let i = 0; i < this.warnings.length; ++i)\n doc.warnings.push(this.warnings[i]);\n }\n else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n switch (token.type) {\n case 'directive':\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case 'document': {\n const doc = composeDoc(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case 'byte-order-mark':\n case 'space':\n break;\n case 'comment':\n case 'newline':\n this.prelude.push(token.source);\n break;\n case 'error': {\n const msg = token.source\n ? `${token.message}: ${JSON.stringify(token.source)}`\n : token.message;\n const error = new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case 'doc-end': {\n if (!this.doc) {\n const msg = 'Unexpected doc-end without preceding document';\n this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n }\n else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new Document(undefined, opts);\n if (this.atDirectives)\n this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n}\n\nexport { Composer };\n","const BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n * - `item`: The current item, which included the following members:\n * - `start: SourceToken[]` – Source tokens before the key or value,\n * possibly including its anchor or tag.\n * - `key?: Token | null` – Set for pair values. May then be `null`, if\n * the key before the `:` separator is empty.\n * - `sep?: SourceToken[]` – Source tokens between the key and the value,\n * which should include the `:` map value indicator if `value` is set.\n * - `value?: Token` – The value of a sequence item, or of a map pair.\n * - `path`: The steps from the root to the current node, as an array of\n * `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this token, continue with\n * next sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current item, then continue with the next one\n * - `number`: Set the index of the next step. This is useful especially if\n * the index of the current token has changed.\n * - `function`: Define the next visitor for this item. After the original\n * visitor is called on item entry, next visitors are called after handling\n * a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n if ('type' in cst && cst.type === 'document')\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && 'items' in tok) {\n item = tok.items[index];\n }\n else\n return undefined;\n }\n return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && 'items' in coll)\n return coll;\n throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === 'symbol')\n return ctrl;\n for (const field of ['key', 'value']) {\n const token = item[field];\n if (token && 'items' in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === 'function' && field === 'key')\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\nexport { visit };\n","export { createScalarToken, resolveAsScalar, setScalarValue } from './cst-scalar.js';\nexport { stringify } from './cst-stringify.js';\nexport { visit } from './cst-visit.js';\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n (token.type === 'scalar' ||\n token.type === 'single-quoted-scalar' ||\n token.type === 'double-quoted-scalar' ||\n token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n switch (token) {\n case BOM:\n return '<BOM>';\n case DOCUMENT:\n return '<DOC>';\n case FLOW_END:\n return '<FLOW_END>';\n case SCALAR:\n return '<SCALAR>';\n default:\n return JSON.stringify(token);\n }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n switch (source) {\n case BOM:\n return 'byte-order-mark';\n case DOCUMENT:\n return 'doc-mode';\n case FLOW_END:\n return 'flow-error-end';\n case SCALAR:\n return 'scalar';\n case '---':\n return 'doc-start';\n case '...':\n return 'doc-end';\n case '':\n case '\\n':\n case '\\r\\n':\n return 'newline';\n case '-':\n return 'seq-item-ind';\n case '?':\n return 'explicit-key-ind';\n case ':':\n return 'map-value-ind';\n case '{':\n return 'flow-map-start';\n case '}':\n return 'flow-map-end';\n case '[':\n return 'flow-seq-start';\n case ']':\n return 'flow-seq-end';\n case ',':\n return 'comma';\n }\n switch (source[0]) {\n case ' ':\n case '\\t':\n return 'space';\n case '#':\n return 'comment';\n case '%':\n return 'directive-line';\n case '*':\n return 'alias';\n case '&':\n return 'anchor';\n case '!':\n return 'tag';\n case \"'\":\n return 'single-quoted-scalar';\n case '\"':\n return 'double-quoted-scalar';\n case '|':\n case '>':\n return 'block-scalar-header';\n }\n return null;\n}\n\nexport { BOM, DOCUMENT, FLOW_END, SCALAR, isCollection, isScalar, prettyToken, tokenType };\n","import { BOM, DOCUMENT, FLOW_END, SCALAR } from './cst.js';\n\n/*\nSTART -> stream\n\nstream\n directive -> line-end -> stream\n indent + line-end -> stream\n [else] -> line-start\n\nline-end\n comment -> line-end\n newline -> .\n input-end -> END\n\nline-start\n doc-start -> doc\n doc-end -> stream\n [else] -> indent -> block-start\n\nblock-start\n seq-item-start -> block-start\n explicit-key-start -> block-start\n map-value-start -> block-start\n [else] -> doc\n\ndoc\n line-end -> line-start\n spaces -> doc\n anchor -> doc\n tag -> doc\n flow-start -> flow -> doc\n flow-end -> error -> doc\n seq-item-start -> error -> doc\n explicit-key-start -> error -> doc\n map-value-start -> doc\n alias -> doc\n quote-start -> quoted-scalar -> doc\n block-scalar-header -> line-end -> block-scalar(min) -> line-start\n [else] -> plain-scalar(false, min) -> doc\n\nflow\n line-end -> flow\n spaces -> flow\n anchor -> flow\n tag -> flow\n flow-start -> flow -> flow\n flow-end -> .\n seq-item-start -> error -> flow\n explicit-key-start -> flow\n map-value-start -> flow\n alias -> flow\n quote-start -> quoted-scalar -> flow\n comma -> flow\n [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n quote-end -> .\n [else] -> quoted-scalar\n\nblock-scalar(min)\n newline + peek(indent < min) -> .\n [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n scalar-end(is-flow) -> .\n peek(newline + (indent < min)) -> .\n [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n switch (ch) {\n case undefined:\n case ' ':\n case '\\n':\n case '\\r':\n case '\\t':\n return true;\n default:\n return false;\n }\n}\nconst hexDigits = new Set('0123456789ABCDEFabcdef');\nconst tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\nconst flowIndicatorChars = new Set(',[]{}');\nconst invalidAnchorChars = new Set(' ,[]{}\\n\\r\\t');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n constructor() {\n /**\n * Flag indicating whether the end of the current buffer marks the end of\n * all input\n */\n this.atEnd = false;\n /**\n * Explicit indent set in block scalar header, as an offset from the current\n * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n * explicitly set.\n */\n this.blockScalarIndent = -1;\n /**\n * Block scalars that include a + (keep) chomping indicator in their header\n * include trailing empty lines, which are otherwise excluded from the\n * scalar's contents.\n */\n this.blockScalarKeep = false;\n /** Current input */\n this.buffer = '';\n /**\n * Flag noting whether the map value indicator : can immediately follow this\n * node within a flow context.\n */\n this.flowKey = false;\n /** Count of surrounding flow collection levels. */\n this.flowLevel = 0;\n /**\n * Minimum level of indentation required for next lines to be parsed as a\n * part of the current scalar value.\n */\n this.indentNext = 0;\n /** Indentation level of the current line. */\n this.indentValue = 0;\n /** Position of the next \\n character. */\n this.lineEndPos = null;\n /** Stores the state of the lexer if reaching the end of incpomplete input */\n this.next = null;\n /** A pointer to `buffer`; the current position of the lexer. */\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n if (typeof source !== 'string')\n throw TypeError('source is not a string');\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? 'stream';\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[++i];\n if (!ch || ch === '#' || ch === '\\n')\n return true;\n if (ch === '\\r')\n return this.buffer[i + 1] === '\\n';\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === ' ')\n ch = this.buffer[++indent + offset];\n if (ch === '\\r') {\n const next = this.buffer[indent + offset + 1];\n if (next === '\\n' || (!next && !this.atEnd))\n return offset + indent + 1;\n }\n return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n ? offset + indent\n : -1;\n }\n if (ch === '-' || ch === '.') {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n end = this.buffer.indexOf('\\n', this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === '\\r')\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case 'stream':\n return yield* this.parseStream();\n case 'line-start':\n return yield* this.parseLineStart();\n case 'block-start':\n return yield* this.parseBlockStart();\n case 'doc':\n return yield* this.parseDocument();\n case 'flow':\n return yield* this.parseFlowCollection();\n case 'quoted-scalar':\n return yield* this.parseQuotedScalar();\n case 'block-scalar':\n return yield* this.parseBlockScalar();\n case 'plain-scalar':\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext('stream');\n if (line[0] === BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === '%') {\n let dirEnd = line.length;\n let cs = line.indexOf('#');\n while (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === ' ' || ch === '\\t') {\n dirEnd = cs - 1;\n break;\n }\n else {\n cs = line.indexOf('#', cs + 1);\n }\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n); // possible comment\n this.pushNewline();\n return 'stream';\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return 'stream';\n }\n yield DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext('line-start');\n if (ch === '-' || ch === '.') {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext('line-start');\n const s = this.peek(3);\n if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return s === '---' ? 'doc' : 'stream';\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext('block-start');\n if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return 'block-start';\n }\n return 'doc';\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext('doc');\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case '#':\n yield* this.pushCount(line.length - n);\n // fallthrough\n case undefined:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return 'flow';\n case '}':\n case ']':\n // this is an error\n yield* this.pushCount(1);\n return 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'doc';\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case '|':\n case '>':\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n }\n else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext('flow');\n if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n (indent === 0 &&\n (line.startsWith('---') || line.startsWith('...')) &&\n isEmpty(line[3]))) {\n // Allowing for the terminal ] or } at the same (rather than greater)\n // indent level as the initial [ or { is technically invalid, but\n // failing here would be surprising to users.\n const atFlowEndMarker = indent === this.indentNext - 1 &&\n this.flowLevel === 1 &&\n (line[0] === ']' || line[0] === '}');\n if (!atFlowEndMarker) {\n // this is an error\n this.flowLevel = 0;\n yield FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === ',') {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case undefined:\n return 'flow';\n case '#':\n yield* this.pushCount(line.length - n);\n return 'flow';\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return 'flow';\n case '}':\n case ']':\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? 'flow' : 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'flow';\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case ':': {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === ',') {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return 'flow';\n }\n }\n // fallthrough\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n }\n else {\n // double-quote\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === '\\\\')\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n // Only looking for newlines within the quotes\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf('\\n', this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf('\\n', cs);\n }\n if (nl !== -1) {\n // this is an error caused by an unexpected unindent\n end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext('quoted-scalar');\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? 'flow' : 'doc';\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === '+')\n this.blockScalarKeep = true;\n else if (ch > '0' && ch <= '9')\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== '-')\n break;\n }\n return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n }\n *parseBlockScalar() {\n let nl = this.pos - 1; // may be -1 if this.pos === 0\n let indent = 0;\n let ch;\n loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n switch (ch) {\n case ' ':\n indent += 1;\n break;\n case '\\n':\n nl = i;\n indent = 0;\n break;\n case '\\r': {\n const next = this.buffer[i + 1];\n if (!next && !this.atEnd)\n return this.setNext('block-scalar');\n if (next === '\\n')\n break;\n } // fallthrough\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('block-scalar');\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else {\n this.indentNext =\n this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n }\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf('\\n', cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext('block-scalar');\n nl = this.buffer.length;\n }\n }\n // Trailing insufficiently indented tabs are invalid.\n // To catch that during parsing, we include them in the block scalar value.\n let i = nl + 1;\n ch = this.buffer[i];\n while (ch === ' ')\n ch = this.buffer[++i];\n if (ch === '\\t') {\n while (ch === '\\t' || ch === ' ' || ch === '\\r' || ch === '\\n')\n ch = this.buffer[++i];\n nl = i - 1;\n }\n else if (!this.blockScalarKeep) {\n do {\n let i = nl - 1;\n let ch = this.buffer[i];\n if (ch === '\\r')\n ch = this.buffer[--i];\n const lastChar = i; // Drop the line if last char not more indented\n while (ch === ' ')\n ch = this.buffer[--i];\n if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n nl = i;\n else\n break;\n } while (true);\n }\n yield SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while ((ch = this.buffer[++i])) {\n if (ch === ':') {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))\n break;\n end = i;\n }\n else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === '\\r') {\n if (next === '\\n') {\n i += 1;\n ch = '\\n';\n next = this.buffer[i + 1];\n }\n else\n end = i;\n }\n if (next === '#' || (inFlow && flowIndicatorChars.has(next)))\n break;\n if (ch === '\\n') {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n }\n }\n else {\n if (inFlow && flowIndicatorChars.has(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('plain-scalar');\n yield SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? 'flow' : 'doc';\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n }\n else if (allowEmpty)\n yield '';\n return 0;\n }\n *pushIndicators() {\n let n = 0;\n loop: while (true) {\n switch (this.charAt(0)) {\n case '!':\n n += yield* this.pushTag();\n n += yield* this.pushSpaces(true);\n continue loop;\n case '&':\n n += yield* this.pushUntil(isNotAnchorChar);\n n += yield* this.pushSpaces(true);\n continue loop;\n case '-': // this is an error\n case '?': // this is an error outside flow collections\n case ':': {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n continue loop;\n }\n }\n }\n break loop;\n }\n return n;\n }\n *pushTag() {\n if (this.charAt(1) === '<') {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== '>')\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n }\n else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.has(ch))\n ch = this.buffer[++i];\n else if (ch === '%' &&\n hexDigits.has(this.buffer[i + 1]) &&\n hexDigits.has(this.buffer[i + 2])) {\n ch = this.buffer[(i += 3)];\n }\n else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === '\\n')\n return yield* this.pushCount(1);\n else if (ch === '\\r' && this.charAt(1) === '\\n')\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === ' ' || (allowTabs && ch === '\\t'));\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n}\n\nexport { Lexer };\n","/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n constructor() {\n this.lineStarts = [];\n /**\n * Should be called in ascending order. Otherwise, call\n * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n */\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n /**\n * Performs a binary search and returns the 1-indexed { line, col }\n * position of `offset`. If `line === 0`, `addNewLine` has never been\n * called or `offset` is before the first known newline.\n */\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n}\n\nexport { LineCounter };\n","import { tokenType } from './cst.js';\nimport { Lexer } from './lexer.js';\n\nfunction includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n}\nfunction findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case 'space':\n case 'comment':\n case 'newline':\n break;\n default:\n return i;\n }\n }\n return -1;\n}\nfunction isFlowToken(token) {\n switch (token?.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'flow-collection':\n return true;\n default:\n return false;\n }\n}\nfunction getPrevProps(parent) {\n switch (parent.type) {\n case 'document':\n return parent.start;\n case 'block-map': {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case 'block-seq':\n return parent.items[parent.items.length - 1].start;\n /* istanbul ignore next should not happen */\n default:\n return [];\n }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case 'doc-start':\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n case 'newline':\n break loop;\n }\n }\n while (prev[++i]?.type === 'space') {\n /* loop */\n }\n return prev.splice(i, prev.length);\n}\nfunction arrayPushArray(target, source) {\n // May exhaust call stack with large `source` array\n if (source.length < 1e5)\n Array.prototype.push.apply(target, source);\n else\n for (let i = 0; i < source.length; ++i)\n target.push(source[i]);\n}\nfunction fixFlowSeqItems(fc) {\n if (fc.start.type === 'flow-seq-start') {\n for (const it of fc.items) {\n if (it.sep &&\n !it.value &&\n !includesToken(it.start, 'explicit-key-ind') &&\n !includesToken(it.sep, 'map-value-ind')) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n arrayPushArray(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n }\n else\n arrayPushArray(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n * // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n * const parser = new Parser()\n * for (const lexeme of lexer.lex(source))\n * yield* parser.next(lexeme)\n * yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n * // token: Token\n * }\n * ```\n */\nclass Parser {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n /** If true, space and sequence indicators count as indentation */\n this.atNewLine = true;\n /** If true, next token is a scalar value */\n this.atScalar = false;\n /** Current indentation level */\n this.indent = 0;\n /** Current offset since the start of parsing */\n this.offset = 0;\n /** On the same line with a block map key */\n this.onKeyLine = false;\n /** Top indicates the node that's currently being built */\n this.stack = [];\n /** The source of the current token, set in parse() */\n this.source = '';\n /** The type of the current token, set in parse() */\n this.type = '';\n // Must be defined after `next()`\n this.lexer = new Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = tokenType(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: 'error', offset: this.offset, message, source });\n this.offset += source.length;\n }\n else if (type === 'scalar') {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = 'scalar';\n }\n else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case 'newline':\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case 'space':\n if (this.atNewLine && source[0] === ' ')\n this.indent += source.length;\n break;\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case 'doc-mode':\n case 'flow-error-end':\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === 'doc-end' && top?.type !== 'doc-end') {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: 'doc-end',\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case 'document':\n return yield* this.document(top);\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return yield* this.scalar(top);\n case 'block-scalar':\n return yield* this.blockScalar(top);\n case 'block-map':\n return yield* this.blockMap(top);\n case 'block-seq':\n return yield* this.blockSequence(top);\n case 'flow-collection':\n return yield* this.flowCollection(top);\n case 'doc-end':\n return yield* this.documentEnd(top);\n }\n /* istanbul ignore next should not happen */\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n /* istanbul ignore if should not happen */\n if (!token) {\n const message = 'Tried to pop an empty stack';\n yield { type: 'error', offset: this.offset, source: '', message };\n }\n else if (this.stack.length === 0) {\n yield token;\n }\n else {\n const top = this.peek(1);\n if (token.type === 'block-scalar') {\n // Block scalars use their parent rather than header indent\n token.indent = 'indent' in top ? top.indent : 0;\n }\n else if (token.type === 'flow-collection' && top.type === 'document') {\n // Ignore all indent for top-level flow collections\n token.indent = 0;\n }\n if (token.type === 'flow-collection')\n fixFlowSeqItems(token);\n switch (top.type) {\n case 'document':\n top.value = token;\n break;\n case 'block-scalar':\n top.props.push(token); // error\n break;\n case 'block-map': {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n }\n else if (it.sep) {\n it.value = token;\n }\n else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !it.explicitKey;\n return;\n }\n break;\n }\n case 'block-seq': {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case 'flow-collection': {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === 'document' ||\n top.type === 'block-map' ||\n top.type === 'block-seq') &&\n (token.type === 'block-map' || token.type === 'block-seq')) {\n const last = token.items[token.items.length - 1];\n if (last &&\n !last.sep &&\n !last.value &&\n last.start.length > 0 &&\n findNonEmptyIndex(last.start) === -1 &&\n (token.indent === 0 ||\n last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n if (top.type === 'document')\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case 'directive-line':\n yield { type: 'directive', offset: this.offset, source: this.source };\n return;\n case 'byte-order-mark':\n case 'space':\n case 'comment':\n case 'newline':\n yield this.sourceToken;\n return;\n case 'doc-mode':\n case 'doc-start': {\n const doc = {\n type: 'document',\n offset: this.offset,\n start: []\n };\n if (this.type === 'doc-start')\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case 'doc-start': {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n }\n else\n doc.start.push(this.sourceToken);\n return;\n }\n case 'anchor':\n case 'tag':\n case 'space':\n case 'comment':\n case 'newline':\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === 'map-value-ind') {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n }\n else\n sep = [this.sourceToken];\n const map = {\n type: 'block-map',\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case 'space':\n case 'comment':\n case 'newline':\n scalar.props.push(this.sourceToken);\n return;\n case 'scalar':\n scalar.source = this.source;\n // block-scalar source includes trailing newline\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n yield* this.pop();\n break;\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n // it.sep is true-ish if pair already has key or : separator\n switch (this.type) {\n case 'newline':\n this.onKeyLine = false;\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'space':\n case 'comment':\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n const atNextItem = atMapIndent &&\n (it.sep || it.explicitKey) &&\n this.type !== 'seq-item-ind';\n // For empty nodes, assign newline-separated not indented empty tokens to following node\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case 'newline':\n nl.push(i);\n break;\n case 'space':\n break;\n case 'comment':\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case 'anchor':\n case 'tag':\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'explicit-key-ind':\n if (!it.sep && !it.explicitKey) {\n it.start.push(this.sourceToken);\n it.explicitKey = true;\n }\n else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start, explicitKey: true });\n }\n else {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken], explicitKey: true }]\n });\n }\n this.onKeyLine = true;\n return;\n case 'map-value-ind':\n if (it.explicitKey) {\n if (!it.sep) {\n if (includesToken(it.start, 'newline')) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else {\n const start = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n }\n else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n else if (isFlowToken(it.key) &&\n !includesToken(it.sep, 'newline')) {\n const start = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n // @ts-expect-error type guard is wrong here\n delete it.key;\n // @ts-expect-error type guard is wrong here\n delete it.sep;\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key, sep }]\n });\n }\n else if (start.length > 0) {\n // Not actually at next item\n it.sep = it.sep.concat(start, this.sourceToken);\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n this.stack.push(fs);\n }\n else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (bv.type === 'block-seq') {\n if (!it.explicitKey &&\n it.sep &&\n !includesToken(it.sep, 'newline')) {\n yield* this.pop({\n type: 'error',\n offset: this.offset,\n message: 'Unexpected block-seq-ind on same line with key',\n source: this.source\n });\n return;\n }\n }\n else if (atMapIndent) {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case 'newline':\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n }\n else\n it.start.push(this.sourceToken);\n return;\n case 'space':\n case 'comment':\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case 'anchor':\n case 'tag':\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case 'seq-item-ind':\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, 'seq-item-ind'))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === 'flow-error-end') {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top?.type === 'flow-collection');\n }\n else if (fc.end.length === 0) {\n switch (this.type) {\n case 'comma':\n case 'explicit-key-ind':\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case 'map-value-ind':\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case 'space':\n case 'comment':\n case 'newline':\n case 'anchor':\n case 'tag':\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case 'flow-map-end':\n case 'flow-seq-end':\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n /* istanbul ignore else should not happen */\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n }\n else {\n const parent = this.peek(2);\n if (parent.type === 'block-map' &&\n ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n (this.type === 'newline' &&\n !parent.items[parent.items.length - 1].sep))) {\n yield* this.pop();\n yield* this.step();\n }\n else if (this.type === 'map-value-ind' &&\n parent.type !== 'flow-collection') {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: 'block-map',\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return this.flowScalar(this.type);\n case 'block-scalar-header':\n return {\n type: 'block-scalar',\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: ''\n };\n case 'flow-map-start':\n case 'flow-seq-start':\n return {\n type: 'flow-collection',\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case 'seq-item-ind':\n return {\n type: 'block-seq',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case 'explicit-key-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, explicitKey: true }]\n };\n }\n case 'map-value-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== 'comment')\n return false;\n if (this.indent <= indent)\n return false;\n return start.every(st => st.type === 'newline' || st.type === 'space');\n }\n *documentEnd(docEnd) {\n if (this.type !== 'doc-mode') {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case 'comma':\n case 'doc-start':\n case 'doc-end':\n case 'flow-seq-end':\n case 'flow-map-end':\n case 'map-value-ind':\n yield* this.pop();\n yield* this.step();\n break;\n case 'newline':\n this.onKeyLine = false;\n // fallthrough\n case 'space':\n case 'comment':\n default:\n // all other values are errors\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n}\n\nexport { Parser };\n","import { Composer } from './compose/composer.js';\nimport { Document } from './doc/Document.js';\nimport { prettifyError, YAMLParseError } from './errors.js';\nimport { warn } from './log.js';\nimport { isDocument } from './nodes/identity.js';\nimport { LineCounter } from './parse/line-counter.js';\nimport { Parser } from './parse/parser.js';\n\nfunction parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter = options.lineCounter || (prettyErrors && new LineCounter()) || null;\n return { lineCounter, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n * EmptyStream and contain additional stream information. In\n * TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser = new Parser(lineCounter?.addNewLine);\n const composer = new Composer(options);\n const docs = Array.from(composer.compose(parser.parse(source)));\n if (prettyErrors && lineCounter)\n for (const doc of docs) {\n doc.errors.forEach(prettifyError(source, lineCounter));\n doc.warnings.forEach(prettifyError(source, lineCounter));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser = new Parser(lineCounter?.addNewLine);\n const composer = new Composer(options);\n // `doc` is always set by compose.end(true) at the very latest\n let doc = null;\n for (const _doc of composer.compose(parser.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== 'silent') {\n doc.errors.push(new YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n break;\n }\n }\n if (prettyErrors && lineCounter) {\n doc.errors.forEach(prettifyError(source, lineCounter));\n doc.warnings.forEach(prettifyError(source, lineCounter));\n }\n return doc;\n}\nfunction parse(src, reviver, options) {\n let _reviver = undefined;\n if (typeof reviver === 'function') {\n _reviver = reviver;\n }\n else if (options === undefined && reviver && typeof reviver === 'object') {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach(warning => warn(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== 'silent')\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n }\n if (typeof options === 'string')\n options = options.length;\n if (typeof options === 'number') {\n const indent = Math.round(options);\n options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === undefined) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return undefined;\n }\n if (isDocument(value) && !_replacer)\n return value.toString(options);\n return new Document(value, _replacer, options).toString(options);\n}\n\nexport { parse, parseAllDocuments, parseDocument, stringify };\n","import { isMap, parseDocument } from 'yaml'\n\n/** Parse an editable document without flattening nested YAML or discarding comments. */\nexport function frontmatter(text: string) {\n const match = /^(?:\\uFEFF)?---\\r?\\n([\\s\\S]*?)\\r?\\n---[ \\t]*(?:\\r?\\n|$)/.exec(text)\n if (/^(?:\\uFEFF)?---\\r?\\n/.test(text) && match === null) throw new Error('Unclosed YAML frontmatter')\n const document = parseDocument(match?.[1] ?? '')\n if (document.errors.length > 0) throw new Error(document.errors[0]!.message)\n if (document.contents !== null && !isMap(document.contents)) throw new Error('Frontmatter must be a YAML mapping')\n return { document, body: match === null ? text : text.slice(match[0].length), matched: match !== null }\n}\n\nexport function readRoleFields(text: string): { model: string; provider: string; tools: string; reasoningEffort: string } {\n const { document } = frontmatter(text)\n const fields = (document.toJS() ?? {}) as Record<string, unknown>\n for (const key of ['reasoning_effort', 'reasoningEffort']) {\n if (fields[key] !== undefined && (typeof fields[key] !== 'string' || (fields[key] as string).trim() === '')) throw new Error(`${key} must be a non-empty string`)\n }\n const effort = typeof fields.reasoning_effort === 'string' ? fields.reasoning_effort.trim() : undefined\n const alias = typeof fields.reasoningEffort === 'string' ? fields.reasoningEffort.trim() : undefined\n if (effort !== undefined && alias !== undefined && effort !== alias) throw new Error('reasoning_effort and reasoningEffort conflict')\n return {\n reasoningEffort: effort ?? alias ?? '',\n model: typeof fields.model === 'string' ? fields.model : '',\n provider: typeof fields.provider === 'string' ? fields.provider : '',\n tools: Array.isArray(fields.tools) ? fields.tools.join(', ') : typeof fields.tools === 'string' ? fields.tools : ''\n }\n}\n\n/** Store the canonical effort key and remove its alias so execution cannot see conflicting values. */\nexport function updateRoleReasoning(text: string, value: string): string {\n const { document, body, matched } = frontmatter(text)\n if (!matched && value === '') return text\n document.delete('reasoningEffort')\n if (value === '') document.delete('reasoning_effort')\n else document.set('reasoning_effort', value)\n return `---\\n${document.toString()}---\\n${body}`\n}\n\n/** Change only the selected key; retain unknown keys, comments, scalar types and Markdown body. */\nexport function updateFrontmatter(text: string, key: string, value: unknown): string {\n const { document, body, matched } = frontmatter(text)\n if (value === undefined || value === '') {\n if (!matched) return text\n document.delete(key)\n } else {\n document.set(key, value)\n }\n return `---\\n${document.toString()}---\\n${body}`\n}\n","import { createElement as h, type ReactNode } from 'react'\nimport { MarkdownText } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { Translate } from '../index.js'\nimport { frontmatter } from '../features/personas/frontmatter.js'\nimport css from './detail.module.css'\n\nfunction metadataValue(value: unknown, depth = 0, parents = new Set<object>()): ReactNode {\n if (value === null || value === undefined) return h('span', null, 'null')\n if (typeof value !== 'object') return h('span', null, String(value))\n if (parents.has(value)) return h('span', null, '[Circular]')\n const next = new Set(parents).add(value)\n if (depth >= 12) return h('span', null, '[...]')\n if (Array.isArray(value))\n return h(\n 'div',\n { className: css.values },\n value.map((item, index) => h('span', { className: css.value, key: index }, metadataValue(item, depth + 1, next)))\n )\n return h(\n 'dl',\n { className: css.metadata },\n Object.entries(value).flatMap(([key, item]) => [h('dt', { key: `${key}-key` }, key), h('dd', { key }, metadataValue(item, depth + 1, next))])\n )\n}\n\n/** Render YAML metadata separately without exposing frontmatter as Markdown body text. */\nexport function MarkdownDocument({ text, t }: { text: string; t: Translate }): ReactNode {\n let parsed: ReturnType<typeof frontmatter>\n let metadata: Record<string, unknown> | null\n try {\n parsed = frontmatter(text)\n metadata = parsed.document.toJS({ maxAliasCount: 100 }) as Record<string, unknown> | null\n } catch (error) {\n return h('div', { role: 'alert', className: css.error }, t('personaMetadataInvalid'), ' ', error instanceof Error ? error.message : String(error))\n }\n return h(\n 'div',\n { className: css.preview },\n metadata && Object.keys(metadata).length ? h('section', { className: css.section }, h('h3', { className: css.heading }, t('detailMetadata')), metadataValue(metadata)) : null,\n h(MarkdownText, { text: parsed.body, labels: { code: { copyLabel: t('mdCodeCopy'), copiedLabel: t('mdCodeCopied') }, footnotes: t('mdFootnotes') } })\n )\n}\n","/** Request-order guard for asynchronously loaded suite detail content. */\n\n/** A small monotonic guard that invalidates stale detail responses. */\nexport interface LatestRequestGuard {\n next(): number\n invalidate(): void\n isCurrent(requestId: number): boolean\n}\n\n/** Create a request guard for one detail modal instance. */\nexport function createLatestRequestGuard(): LatestRequestGuard {\n let revision = 0\n return {\n next: () => ++revision,\n invalidate: () => {\n revision++\n },\n isCurrent: requestId => requestId === revision\n }\n}\n","/**\n * Suite detail modal: click one suite card to browse its internals.\n *\n * Sections: manifest overview, the skill list (each skill expands to its\n * SKILL.md body through the safe MarkdownText renderer), the validated\n * mcp.json servers (each expands to its full config — display only), the\n * command/subagent file lists, hook/LSP counts, and validation diagnostics.\n *\n * The MCP region is intentionally read-only: credentials and per-server\n * overrides are configured on the MCP services panel (their own detail\n * dialog), not inside the suite detail preview.\n */\nimport { createElement as h, useEffect, useRef, useState, type ReactNode } from 'react'\nimport { Button } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { DetailModal } from './ui/DetailModal.js'\nimport { MarkdownDocument } from './ui/MarkdownDocument.js'\nimport { fetchSkillContent, fetchSuiteDetail, postAction, type McpServerDetail, type SuiteDetail } from './api.js'\nimport type { Translate } from './index.js'\nimport { suiteLayoutLabel } from './layout-label.js'\nimport { ErrorBoundary } from './ErrorBoundary.js'\nimport type { CredentialApi } from './credentials.js'\nimport { createLatestRequestGuard } from './features/suite-detail/suite-detail-resource.js'\nimport css from './market.module.css'\n\n/** Toggleable surface keys paired with their translation keys. */\nconst SURFACE_TOGGLE_ROWS = [\n ['skills', 'surfaceSkills'],\n ['mcp', 'surfaceMcp'],\n ['hooks', 'surfaceHooks'],\n ['commands', 'surfaceCommands'],\n ['agents', 'surfaceAgents'],\n ['lsp', 'surfaceLsp']\n] as const\n\nexport interface SuiteDetailModalProps {\n t: Translate\n credentials?: CredentialApi\n sourceId: string\n suiteId: string\n onClose: () => void\n}\n\nexport function SuiteDetailModal({ t, sourceId, suiteId, onClose }: SuiteDetailModalProps): ReactNode {\n // MarkdownText's chrome (code copy buttons, footnotes heading) is\n // Cordis-free and takes its copy through this labels object.\n const [detail, setDetail] = useState<SuiteDetail | undefined>(undefined)\n const [error, setError] = useState<string | undefined>(undefined)\n const [openSkill, setOpenSkill] = useState<string | undefined>(undefined)\n const [skillText, setSkillText] = useState<string | undefined>(undefined)\n const [skillLoading, setSkillLoading] = useState(false)\n const skillRequestGuard = useRef(createLatestRequestGuard())\n const [openMcp, setOpenMcp] = useState<string | undefined>(undefined)\n const [openPreview, setOpenPreview] = useState<string | undefined>(undefined)\n\n useEffect(() => {\n let cancelled = false\n skillRequestGuard.current.invalidate()\n setDetail(undefined)\n setError(undefined)\n setOpenSkill(undefined)\n setSkillText(undefined)\n fetchSuiteDetail(sourceId, suiteId)\n .then(value => {\n if (!cancelled) setDetail(value)\n })\n .catch(reason => {\n if (!cancelled) setError(reason instanceof Error ? reason.message : String(reason))\n })\n return () => {\n cancelled = true\n skillRequestGuard.current.invalidate()\n }\n }, [sourceId, suiteId])\n\n const toggleSkill = async (name: string): Promise<void> => {\n const requestId = skillRequestGuard.current.next()\n if (openSkill === name) {\n setOpenSkill(undefined)\n return\n }\n setOpenSkill(name)\n setSkillLoading(true)\n setSkillText(undefined)\n try {\n const content = await fetchSkillContent(sourceId, suiteId, name)\n if (skillRequestGuard.current.isCurrent(requestId)) setSkillText(content.content)\n } catch (reason) {\n if (skillRequestGuard.current.isCurrent(requestId)) setSkillText(`⚠ ${reason instanceof Error ? reason.message : String(reason)}`)\n } finally {\n if (skillRequestGuard.current.isCurrent(requestId)) setSkillLoading(false)\n }\n }\n\n const toggleMcp = (key: string): void => {\n setOpenMcp(openMcp === key ? undefined : key)\n }\n\n const [surfaceBusy, setSurfaceBusy] = useState(false)\n const toggleSurface = async (surface: string, enabled: boolean): Promise<void> => {\n setSurfaceBusy(true)\n try {\n await postAction('set-surface', { sourceId, suiteId, surface, enabled })\n const next = await fetchSuiteDetail(sourceId, suiteId)\n setDetail(next)\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setSurfaceBusy(false)\n }\n }\n\n const layoutLabel = detail === undefined ? '' : suiteLayoutLabel(detail.layout, t)\n\n return h(DetailModal, {\n open: true,\n onClose,\n title: detail === undefined ? t('detailTitle') : `${detail.name}${detail.version === null ? '' : ` v${detail.version}`}`,\n description: detail === undefined ? undefined : t('detailHint'),\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h('div', { className: css.modalFooter }, h(Button, { variant: 'ghost', onClick: onClose }, t('cancel'))),\n children: h(ErrorBoundary, {\n fallback: boundaryError => h('div', { className: css.warnLine }, `${t('actionFail')}: ${boundaryError.message}`),\n children:\n error !== undefined\n ? h('div', { className: css.warnLine }, error)\n : detail === undefined\n ? h('div', { className: css.empty }, t('loading'))\n : h(\n 'div',\n { className: css.detailSections },\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, t('overviewSection')),\n h(\n 'div',\n { className: css.detailGrid },\n h('div', { className: css.detailCell }, h('span', { className: css.detailKey }, t('sourceLabel')), h('span', { className: css.detailValue }, detail.sourceId)),\n h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('dimensionLabel')),\n h('span', { className: css.detailValue }, detail.dimension === 'user' ? t('dimensionUser') : t('dimensionProject'))\n ),\n h('div', { className: css.detailCell }, h('span', { className: css.detailKey }, t('layoutLabel')), h('span', { className: css.detailValue }, layoutLabel)),\n h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('statusLabel')),\n h(\n 'span',\n { className: detail.enabled ? css.okState : css.detailValue },\n detail.installed ? (detail.enabled ? t('installedBadge') : t('disabledLabel')) : t('notInstalledLabel')\n )\n ),\n detail.author === null\n ? null\n : h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('authorLabel')),\n h('span', { className: css.detailValue }, detail.author)\n ),\n detail.keywords.length === 0\n ? null\n : h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('keywordsLabel')),\n h('span', { className: css.detailValue }, detail.keywords.join(', '))\n )\n ),\n detail.description === null ? null : h('p', { className: css.detailDesc }, detail.description),\n h('div', { className: css.detailCell }, h('span', { className: css.detailKey }, t('rootLabel')), h('span', { className: css.mono }, detail.root)),\n detail.installed === false || detail.surfaceToggles === null\n ? null\n : h(\n 'div',\n { className: css.detailCell },\n h('span', { className: css.detailKey }, t('surfaceTogglesSection')),\n h(\n 'div',\n { className: css.surfaceToggles, title: t('surfaceTogglesHint') },\n ...SURFACE_TOGGLE_ROWS.map(([key, labelKey]) =>\n h('label', { key, className: css.surfaceToggle }, h('input', {\n type: 'checkbox',\n checked: detail.surfaceToggles![key],\n disabled: surfaceBusy,\n onChange: event => {\n void toggleSurface(key, (event.target as HTMLInputElement).checked)\n }\n }), t(labelKey))\n )\n )\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('skillsSection')} (${detail.skills.length})`),\n detail.skills.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.skills.map(skill =>\n h(\n 'div',\n { key: skill.name, className: css.detailItem },\n h(\n 'button',\n {\n type: 'button',\n className: openSkill === skill.name ? css.detailItemOpen : css.detailItemRow,\n onClick: () => {\n void toggleSkill(skill.name)\n }\n },\n h('span', { className: css.detailItemName }, skill.name),\n h('span', { className: css.detailItemDesc }, skill.description),\n h('span', { className: css.detailChevron }, openSkill === skill.name ? '▾' : '▸')\n ),\n openSkill !== skill.name ? null : h('div', { className: css.skillContent }, skillLoading ? t('loading') : h(MarkdownDocument, { text: skillText ?? '', t }))\n )\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('mcpSection')} (${detail.mcpServers.length})`),\n detail.mcpErrors.length === 0\n ? null\n : h('div', { className: css.warnLine, style: { margin: '0 0 6px' } }, `⚠ ${detail.mcpErrors.join(t('sourceErrorSeparator'))}`),\n detail.mcpServers.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.mcpServers.map(server => {\n const disabled = detail.mcpOverrides?.[server.key]?.enabled === false\n return h(\n 'div',\n { key: server.key, className: css.detailItem },\n h(\n 'button',\n {\n type: 'button',\n className: openMcp === server.key ? css.detailItemOpen : css.detailItemRow,\n onClick: () => toggleMcp(server.key)\n },\n h('span', { className: css.detailItemName }, server.key),\n h(\n 'span',\n { className: css.detailItemDesc },\n `${mcpSummary(server)}${disabled ? ` · ${t('mcpOverrideDisabledBadge')}` : ''}`\n ),\n h('span', { className: css.detailChevron }, openMcp === server.key ? '▾' : '▸')\n ),\n openMcp === server.key\n ? h(\n 'div',\n { className: css.skillContent },\n // Read-only preview of the validated config.\n // Credentials and overrides are configured on\n // the MCP services panel, not here.\n h('pre', { className: css.mono }, JSON.stringify(server, null, 2))\n )\n : null\n )\n })\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('commandsSection')} (${detail.commands.length})`),\n detail.commands.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.commands.map(command =>\n h(PreviewRow, {\n key: `c:${command.name}`,\n t,\n name: `/${command.name}`,\n description: command.description,\n open: openPreview === `c:${command.name}`,\n onToggle: () => setOpenPreview(openPreview === `c:${command.name}` ? undefined : `c:${command.name}`),\n children: h(MarkdownDocument, { text: command.content, t })\n })\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('agentsSection')} (${detail.agents.length})`),\n detail.agents.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.agents.map(agent =>\n h(PreviewRow, {\n key: `a:${agent.name}`,\n t,\n name: agent.name,\n description: agent.description,\n open: openPreview === `a:${agent.name}`,\n onToggle: () => setOpenPreview(openPreview === `a:${agent.name}` ? undefined : `a:${agent.name}`),\n children: h(MarkdownDocument, { text: agent.content, t })\n })\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('hooksLabel')} (${detail.hooks.count})`),\n detail.hooks.count === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : detail.hooks.entries.map((hook, index) =>\n h(PreviewRow, {\n key: `h:${index}`,\n t,\n name: hook.event,\n description: hook.command,\n open: openPreview === `h:${index}`,\n onToggle: () => setOpenPreview(openPreview === `h:${index}` ? undefined : `h:${index}`),\n children: h('pre', { className: css.mono }, JSON.stringify(hook, null, 2))\n })\n )\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('lspSection')} (${detail.lsp.servers.length + detail.lsp.raw.length})`),\n detail.lsp.servers.length === 0 && detail.lsp.raw.length === 0\n ? h('div', { className: css.sidebarEmpty }, '—')\n : [\n ...detail.lsp.servers.map(server =>\n h(PreviewRow, {\n key: `l:${server.key}`,\n t,\n name: server.key,\n description: lspSummary(server),\n open: openPreview === `l:${server.key}`,\n onToggle: () => setOpenPreview(openPreview === `l:${server.key}` ? undefined : `l:${server.key}`),\n children: h('pre', { className: css.mono }, JSON.stringify(server, null, 2))\n })\n ),\n ...detail.lsp.raw.map(entry =>\n h(PreviewRow, {\n key: `l:${entry.name}`,\n t,\n name: entry.name,\n open: openPreview === `l:${entry.name}`,\n onToggle: () => setOpenPreview(openPreview === `l:${entry.name}` ? undefined : `l:${entry.name}`),\n children: h('pre', { className: css.mono }, entry.content)\n })\n )\n ]\n ),\n detail.errors.length === 0\n ? null\n : h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('errors')} (${detail.errors.length})`),\n detail.errors.map((entry, index) => h('div', { key: index, className: css.warnLine }, entry))\n )\n )\n })\n })\n}\n\nfunction mcpSummary(server: McpServerDetail): string {\n if (server.type === 'stdio') return server.command ?? server.type\n return server.url ?? server.type\n}\n\n/** One-line summary of a declared LSP server: command plus mapped extension list. */\nfunction lspSummary(server: { command: string; extensions: Record<string, string> }): string {\n return [server.command, Object.keys(server.extensions).join(' ')].join(' · ')\n}\n\nfunction PreviewRow(props: { t: Translate; name: string; description?: string; open: boolean; onToggle: () => void; children: ReactNode }): ReactNode {\n const { name, description, open, onToggle, children } = props\n return h(\n 'div',\n { className: css.detailItem },\n h(\n 'button',\n {\n type: 'button',\n className: open ? css.detailItemOpen : css.detailItemRow,\n onClick: onToggle\n },\n h('span', { className: css.detailItemName }, name),\n description === undefined ? null : h('span', { className: css.detailItemDesc }, description),\n h('span', { className: css.detailChevron }, open ? '▾' : '▸')\n ),\n open ? h('div', { className: css.skillContent }, children) : null\n )\n}\n","/* Shared search + filter + view-switch row.\n *\n * Flexbox, not a fixed column grid: panels pass different filter counts\n * (MCP 3, LSP 4), and a hard-coded grid template overflowed on the fourth\n * filter, pushing the view switch onto its own row and forcing a horizontal\n * scrollbar. Here the search box flexes, filter buttons keep their natural\n * width, and the spacer pushes the view switch to the trailing edge. */\n.toolbar {\n display: flex;\n align-items: flex-end;\n gap: 6px;\n min-width: 0;\n flex: none;\n}\n\n.filterGap,\n.viewGap {\n flex: 1 0 12px;\n min-width: 0;\n}\n\n.search {\n display: flex;\n flex: 0 1 240px;\n align-items: center;\n box-sizing: border-box;\n min-width: 0;\n height: 36px;\n}\n\n.search input {\n box-sizing: border-box;\n min-width: 0;\n width: 100%;\n height: 36px;\n min-height: 36px;\n max-height: 36px;\n padding-top: 0;\n padding-bottom: 0;\n font-size: 12px;\n line-height: 20px;\n}\n\n.filter,\n.filterOn {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 54px;\n height: 36px;\n padding: 7px 9px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n border: none;\n border-bottom: 2px solid transparent;\n background: none;\n cursor: pointer;\n font: inherit;\n font-size: 13px;\n white-space: nowrap;\n}\n\n.filterOn {\n color: var(--dsw-alias-brand-primary, #4f6ef7);\n border-bottom-color: var(--dsw-alias-brand-primary, #4f6ef7);\n font-weight: 600;\n}\n\n.filter svg,\n.filterOn svg,\n.viewSwitch svg {\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.filterCount {\n font-variant-numeric: tabular-nums;\n}\n\n.viewSwitch {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 36px;\n color: var(--dsw-alias-label-tertiary, #9ca3af);\n border: none;\n border-bottom: 2px solid transparent;\n background: none;\n cursor: pointer;\n}\n\n/* The unified \"+ add\" seat: a text label, so unlike the icon-only view\n switch it needs an auto width and no wrap. */\n.extraAction {\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: 6px;\n height: 36px;\n padding: 0 10px;\n color: var(--dsw-alias-label-tertiary, #9ca3af);\n border: none;\n border-bottom: 2px solid transparent;\n background: none;\n cursor: pointer;\n font: inherit;\n font-size: 13px;\n white-space: nowrap;\n}\n\n.extraAction:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.viewSwitch:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.viewSwitch:focus-visible,\n.filter:focus-visible,\n.filterOn:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 2px;\n}\n\n@container (max-width: 700px) {\n .toolbar {\n flex-wrap: wrap;\n justify-content: flex-end;\n }\n\n .search {\n flex-basis: 100%;\n }\n\n .filterGap {\n display: none;\n }\n}\n","/**\n * Shared search, filter, and view controls for catalog-style settings panels.\n */\nimport { createElement as h, type ReactNode } from 'react'\nimport { Input } from '@deepseek-ai/dsh-client-ui-primitives'\nimport css from './SearchFilterToolbar.module.css'\n\nexport type SearchFilterToolbarView = 'grid' | 'list'\n\nexport interface SearchFilterToolbarFilter {\n id: string\n label: string\n count: number\n icon: ReactNode\n active: boolean\n onSelect: () => void\n /** Extended hover/aria explanation; falls back to the label when absent. */\n hint?: string\n}\n\nexport interface SearchFilterToolbarProps {\n search: string\n searchLabel: string\n searchPlaceholder: string\n onSearchChange: (search: string) => void\n filters: readonly SearchFilterToolbarFilter[]\n view: SearchFilterToolbarView\n gridLabel: string\n listLabel: string\n onViewChange: (view: SearchFilterToolbarView) => void\n className?: string\n}\n\n/**\n * Render a consistent control row for searchable grid and list content.\n *\n * @param props - Search state, selectable filters, and view-mode state.\n * @returns Search input, filter tabs, and an accessible grid/list toggle.\n */\nexport function SearchFilterToolbar(props: SearchFilterToolbarProps): ReactNode {\n const nextView: SearchFilterToolbarView = props.view === 'grid' ? 'list' : 'grid'\n const nextViewLabel = nextView === 'grid' ? props.gridLabel : props.listLabel\n return h(\n 'div',\n { className: props.className === undefined ? css.toolbar : `${css.toolbar} ${props.className}`, 'data-panel-toolbar': true },\n h(Input, {\n className: css.search,\n value: props.search,\n placeholder: props.searchPlaceholder,\n 'aria-label': props.searchLabel,\n onChange: event => props.onSearchChange((event.target as HTMLInputElement).value)\n }),\n h('div', { className: css.filterGap }),\n ...props.filters.map(filter =>\n h(\n 'button',\n {\n key: filter.id,\n type: 'button',\n className: filter.active ? css.filterOn : css.filter,\n title: filter.hint ?? `${filter.label} ${filter.count}`,\n 'aria-label': filter.hint ?? `${filter.label} ${filter.count}`,\n 'aria-pressed': filter.active,\n onClick: filter.onSelect\n },\n filter.label,\n h('span', { className: css.filterCount }, filter.count)\n )\n ),\n h('div', { className: css.viewGap }),\n h(\n 'button',\n {\n type: 'button',\n className: css.viewSwitch,\n 'aria-label': nextViewLabel,\n title: nextViewLabel,\n onClick: () => props.onViewChange(nextView)\n },\n h(ViewIcon, { mode: nextView })\n )\n )\n}\n\nfunction ViewIcon({ mode }: { mode: SearchFilterToolbarView }): ReactNode {\n const common = { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n return mode === 'list'\n ? h('svg', common, h('path', { d: 'M3 4h10M3 8h10M3 12h10' }))\n : h(\n 'svg',\n common,\n h('rect', { x: 2.5, y: 2.5, width: 4, height: 4, rx: 0.8 }),\n h('rect', { x: 9.5, y: 2.5, width: 4, height: 4, rx: 0.8 }),\n h('rect', { x: 2.5, y: 9.5, width: 4, height: 4, rx: 0.8 }),\n h('rect', { x: 9.5, y: 9.5, width: 4, height: 4, rx: 0.8 })\n )\n}\n","/**\n * Shared panel building-block styles (PanelShell, BusyIndicator, badges,\n * editors). Colors ride the dsh --dsw-alias-* tokens exclusively so dark\n * mode follows the active theme with no per-rule branches.\n */\n\n/* ---- PanelShell ------------------------------------------------------- */\n\n.shell {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 16px;\n color: var(--dsw-alias-label-primary, #1f2328);\n container-type: inline-size;\n}\n\n.header {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n min-height: 46px;\n}\n\n.headerText {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 2px;\n}\n\n.title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n}\n\n.subtitle {\n margin: 0;\n color: var(--dsw-alias-label-secondary);\n font-size: 13px;\n line-height: 20px;\n}\n\n.headerActions {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n}\n\n/* The scroll region: every panel scrolls inside its own body, never the\n full settings column, so switching tabs cannot shift the layout. */\n.body {\n display: flex;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 12px;\n overflow-y: auto;\n scrollbar-gutter: stable;\n}\n\n/* ---- BusyIndicator ---------------------------------------------------- */\n\n.busyLine {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n color: var(--dsw-alias-label-secondary, #6b7280);\n font-size: 12px;\n}\n\n.busyLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.spinner {\n display: inline-flex;\n flex: none;\n color: var(--dsw-alias-label-secondary, #6b7280);\n font-size: 13px;\n}\n\n.spinning {\n animation: panel-spin 0.9s linear infinite;\n}\n\n@keyframes panel-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinning {\n animation-duration: 2.4s;\n }\n}\n\n/* ---- SourceBadge ------------------------------------------------------ */\n\n.badgePlugin,\n.badgeUser {\n display: inline-flex;\n flex: none;\n align-items: center;\n padding: 1px 8px;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n white-space: nowrap;\n max-width: 100%;\n min-width: 0;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.badgePlugin {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n.badgeUser {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n/* ---- EntryEditorModal / ConfirmModal ---------------------------------- */\n\n.editorDialog {\n max-width: 720px;\n}\n\n.editorBody {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.editorForm {\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-width: 0;\n}\n\n.editorNameRow {\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: baseline;\n}\n\n.editorName {\n font-size: 13px;\n font-weight: 600;\n}\n\n.editorPath {\n overflow: hidden;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.editorHint {\n margin: 0;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-size: 11px;\n line-height: 16px;\n}\n\n.editorArea {\n width: 100%;\n padding: 8px 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 12px;\n line-height: 18px;\n resize: vertical;\n}\n\n.editorFooter {\n display: flex;\n flex: 1;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n justify-content: flex-end;\n}\n\n.editorError {\n margin-right: auto;\n color: var(--dsw-alias-state-error-primary, rgb(200, 30, 30));\n font-size: 12px;\n}\n\n.confirmCheck {\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n}\n\n/* ---- Shared rows / cards for list panels ------------------------------ */\n\n.entryList {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.entryRow {\n display: flex;\n flex-direction: row;\n gap: 10px;\n align-items: flex-start;\n padding: 10px 12px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-left: 3px solid var(--dsw-alias-border-l2);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n}\n\n.entryRowDisabled {\n opacity: 0.72;\n}\n\n\n.entryMain {\n display: flex;\n min-width: 0;\n max-width: 100%;\n flex: 1;\n flex-direction: column;\n gap: 4px;\n}\n\n.entryHead {\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: baseline;\n}\n\n.entryName {\n overflow: hidden;\n font-size: 13px;\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.entryDesc {\n margin: 0;\n overflow-wrap: anywhere;\n display: -webkit-box;\n overflow: hidden;\n color: var(--dsw-alias-label-secondary, #6b7280);\n font-size: 12px;\n line-height: 18px;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n.entryPath {\n overflow: hidden;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.entryActions {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 2px;\n align-items: center;\n margin-left: auto;\n}\n\n.iconBtn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #6b7280);\n cursor: pointer;\n font-size: 13px;\n}\n\n.iconBtn:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.iconBtn:disabled {\n cursor: default;\n opacity: 0.4;\n}\n\n.iconBtnDanger:hover {\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n color: var(--dsw-alias-state-error-primary, rgb(200, 30, 30));\n}\n\n.empty {\n padding: 24px 12px;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-size: 12px;\n text-align: center;\n}\n\n.entryGrid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n}\n\n.entryGrid .entryPath {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.entryGrid .entryRow {\n flex-direction: column;\n}\n\n.entryGrid .entryActions {\n align-self: flex-end;\n margin-top: auto;\n}\n\n.iconBtn:focus-visible,\n.entryName:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 2px;\n}\n\n@container (max-width: 540px) {\n .entryGrid { grid-template-columns: minmax(0, 1fr); }\n .entryRow { flex-wrap: wrap; }\n .entryActions { margin-left: auto; }\n .entryMain { flex-basis: 100%; }\n}\n\n.entryName {\n max-width: 100%;\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.entryName:hover {\n text-decoration: underline;\n}\n\n.entryHead {\n flex-wrap: wrap;\n}\n\n.roleFields {\n display: grid;\n min-width: 0;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 10px;\n padding: 12px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n}\n\n.roleFields legend {\n font-size: 13px;\n font-weight: 600;\n}\n\n.roleFields .editorHint,\n.roleFields .editorError {\n grid-column: 1 / -1;\n}\n\n.editorLabel {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 6px;\n font-size: 12px;\n}\n\n.editorInput {\n min-width: 0;\n padding: 8px 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: inherit;\n font: inherit;\n}\n\n@media (max-width: 480px) {\n .roleFields {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n","/**\n * Shared panel building blocks for the plugin workspace surfaces\n * (market / skills / commands / personas / MCP / LSP).\n *\n * Everything the six panels repeat lives here: the surface shell (title +\n * actions + toolbar + scrollable content region), the busy indicator, the\n * entry editor modal, the danger-confirm modal, and the source badge. The\n * pieces are intentionally small and prop-driven so a panel composes them\n * instead of re-implementing the geometry.\n * @module client/ui/panel\n */\nimport { createElement as h, useEffect, useState, type ReactNode } from 'react'\nimport { Button, Input, Modal, IconLoadingOutline16, IconPlusOutline16, IconRefreshOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'\nimport css from './panel.module.css'\nimport { beginBusyOperation } from './busy-operation.js'\nimport { DetailModal } from './DetailModal.js'\nimport { MarkdownDocument } from './MarkdownDocument.js'\nimport type { Translate } from '../index.js'\nimport detailCss from './detail.module.css'\n\n/** One header action slot (a button + its handler). */\nexport interface PanelAction {\n key: string\n label: string\n title?: string\n danger?: boolean\n disabled?: boolean\n onSelect: () => void\n}\n\n/** The trailing header commands have one position and one visual treatment. */\nexport function PanelActions(props: { addLabel?: string; onAdd?: () => void; refreshLabel?: string; onRefresh?: () => void; busy?: boolean }): ReactNode {\n return h('div', { className: css.headerActions },\n props.onAdd === undefined ? null : h(Button, { variant: 'ghost', size: 'sm', disabled: props.busy, title: props.addLabel, 'aria-label': props.addLabel, onClick: props.onAdd }, h(IconPlusOutline16), props.addLabel),\n props.onRefresh === undefined ? null : h(Button, { variant: 'ghost', size: 'sm', disabled: props.busy, title: props.refreshLabel, 'aria-label': props.refreshLabel, onClick: props.onRefresh }, h(IconRefreshOutline16)))\n}\n\n/** Shared heading geometry for all resource tabs. */\nexport function PanelHeader(props: { title: string; subtitle?: string; actions?: ReactNode }): ReactNode {\n return h('header', { className: css.header, 'data-panel-header': true },\n h('div', { className: css.headerText },\n h('h2', { className: css.title }, props.title),\n props.subtitle === undefined ? null : h('p', { className: css.subtitle }, props.subtitle)),\n props.actions === undefined ? null : h('div', { className: css.headerActions }, props.actions))\n}\n\n/** Shared panel shell: title, subtitle, actions, and the scroll region body. */\nexport function PanelShell(props: { title: string; subtitle?: string; actions?: PanelAction[]; children: ReactNode }): ReactNode {\n return h(\n 'div',\n { className: css.shell },\n h(PanelHeader, {\n title: props.title,\n subtitle: props.subtitle,\n actions: props.actions?.map(action =>\n h(\n Button,\n {\n key: action.key,\n variant: 'ghost',\n size: 'sm',\n disabled: action.disabled === true,\n title: action.title ?? action.label,\n onClick: action.onSelect\n },\n action.label\n )\n )\n }),\n h('div', { className: css.body }, props.children)\n )\n}\n\n/**\n * Inline loading feedback, or a lease on the client's shared blocking overlay.\n * Overlay leases render no layout element and can span request + refresh work.\n */\nexport function BusyIndicator(props: { label?: string; overlay?: boolean }): ReactNode {\n if (props.overlay) return h(BusyLease)\n return h(\n 'div',\n { className: css.busyLine, role: 'status' },\n h('span', { className: `${css.spinner} ${css.spinning}`, 'aria-hidden': true }, h(IconLoadingOutline16)),\n props.label === undefined ? null : h('span', { className: css.busyLabel }, props.label)\n )\n}\n\n/** Hold the shared mask through local refresh/validation after the HTTP mutation finishes. */\nfunction BusyLease(): ReactNode {\n useEffect(() => beginBusyOperation(), [])\n return null\n}\n\n/** The source badge: where an entry comes from (suite plugin vs user). */\nexport function SourceBadge(props: { kind: 'plugin' | 'user'; label: string; detail?: string }): ReactNode {\n return h('span', { className: props.kind === 'plugin' ? css.badgePlugin : css.badgeUser, title: props.detail ?? props.label }, props.label)\n}\n\n/** Editor state for the shared entry editor modal. */\nexport interface PanelEditorState {\n /** 'create' starts a blank draft; 'edit' loads the entry's raw text. */\n mode: 'create' | 'edit'\n name: string\n id?: string\n path?: string\n text: string\n}\n\n/** The shared Markdown entry editor: name (create only) + raw text. */\nexport function EntryEditorModal(props: {\n t: Translate\n open: boolean\n state: PanelEditorState | undefined\n title: string\n nameLabel: string\n textLabel: string\n hint?: string\n busy?: boolean\n saveError?: string\n saveLabel?: string\n cancelLabel?: string\n renderFields?: (text: string, onChange: (text: string) => void) => ReactNode\n onClose: () => void\n onSave: (state: PanelEditorState) => Promise<boolean>\n}): ReactNode {\n const [draft, setDraft] = useState<PanelEditorState | undefined>(props.state)\n const [error, setError] = useState<string | undefined>(undefined)\n const [mode, setMode] = useState<'preview' | 'edit'>(props.state?.mode === 'create' ? 'edit' : 'preview')\n useEffect(() => {\n setDraft(props.state)\n setError(undefined)\n setMode(props.state?.mode === 'create' ? 'edit' : 'preview')\n }, [props.state, props.open])\n if (!props.open || props.state === undefined) return null\n const current = draft ?? props.state\n return h(\n DetailModal,\n {\n open: true,\n onClose: () => {\n if (props.busy !== true) props.onClose()\n },\n title: props.title,\n closeLabel: props.cancelLabel ?? '×',\n className: css.editorDialog,\n contentClassName: css.editorBody,\n footer: h(\n 'div',\n { className: css.editorFooter },\n (error ?? props.saveError) === undefined ? null : h('span', { className: css.editorError, role: 'alert' }, error ?? props.saveError),\n h(Button, { variant: 'ghost', disabled: props.busy, onClick: props.onClose }, props.cancelLabel ?? '×'),\n h(\n Button,\n {\n variant: 'primary',\n disabled: props.busy === true,\n onClick: () => {\n if (current.name.trim() === '') {\n setError(props.nameLabel)\n return\n }\n void props\n .onSave({ ...current, name: current.name.trim() })\n .then(ok => {\n // A failed save keeps the modal open; the panel-level\n // error strip also carries the message, so only clear a\n // stale inline validation error here.\n if (ok) setError(undefined)\n })\n .catch(reason => setError(reason instanceof Error ? reason.message : String(reason)))\n }\n },\n props.saveLabel ?? '✓'\n )\n )\n },\n h(\n 'div',\n { className: css.editorForm },\n props.state.mode === 'create'\n ? h(\n 'label',\n { className: css.editorLabel },\n props.nameLabel,\n h(Input, {\n value: current.name,\n disabled: props.busy,\n placeholder: props.nameLabel,\n 'aria-label': props.nameLabel,\n onChange: (event: { target: HTMLInputElement }) => setDraft({ ...current, name: event.target.value })\n })\n )\n : h(\n 'div',\n { className: css.editorNameRow },\n h('code', { className: css.editorPath }, props.state.path ?? props.state.name)\n ),\n props.renderFields?.(current.text, text => setDraft({ ...current, text })),\n props.hint === undefined ? null : h('p', { className: css.editorHint }, props.hint),\n h('div', { className: detailCss.modes }, (['preview', 'edit'] as const).map(value => h('button', { type: 'button', className: detailCss.mode, 'aria-pressed': mode === value, onClick: () => setMode(value), key: value }, props.t(value === 'preview' ? 'detailPreview' : 'detailMarkdown')))),\n mode === 'preview' ? h(MarkdownDocument, { text: current.text, t: props.t }) : h(\n 'label',\n { className: css.editorLabel },\n props.textLabel,\n h('textarea', {\n className: css.editorArea,\n value: current.text,\n disabled: props.busy,\n rows: 14,\n spellCheck: false,\n 'aria-label': props.textLabel,\n onChange: (event: { target: HTMLTextAreaElement }) => setDraft({ ...current, text: event.target.value })\n })\n )\n )\n )\n}\n\n/** Danger-confirm state for the shared confirm modal. */\nexport interface PanelConfirmState {\n title: string\n description?: string\n /** Optional extra checkbox (e.g. \"also delete local files\"). */\n checkbox?: { label: string; checked: boolean }\n onConfirm: (checkboxChecked: boolean) => Promise<void> | void\n}\n\n/** The shared danger-confirm modal with an optional checkbox. */\nexport function ConfirmModal(props: { state: PanelConfirmState | undefined; confirmLabel: string; cancelLabel: string; busy?: boolean; onClose: () => void }): ReactNode {\n const [checked, setChecked] = useState(false)\n useEffect(() => {\n setChecked(props.state?.checkbox?.checked === true)\n }, [props.state])\n if (props.state === undefined) return null\n return h(\n Modal,\n {\n open: true,\n onClose: props.onClose,\n title: props.state.title,\n description: props.state.description,\n closeLabel: props.cancelLabel,\n footer: h(\n 'div',\n { className: css.editorFooter },\n h(Button, { variant: 'ghost', onClick: props.onClose }, props.cancelLabel),\n h(\n Button,\n {\n variant: 'primary',\n disabled: props.busy === true,\n onClick: () => {\n void Promise.resolve(props.state!.onConfirm(checked)).then(() => props.onClose())\n }\n },\n props.confirmLabel\n )\n )\n },\n props.state.checkbox === undefined\n ? null\n : h(\n 'label',\n { className: css.confirmCheck },\n h('input', {\n type: 'checkbox',\n checked,\n onChange: (event: { target: HTMLInputElement }) => setChecked(event.target.checked)\n }),\n props.state.checkbox.label\n )\n )\n}\n","import { useSyncExternalStore } from 'react'\n\nexport type WorkspaceView = 'grid' | 'list'\nconst KEY = 'dsh-agent-plugins-market:view'\nconst listeners = new Set<() => void>()\nlet view: WorkspaceView = 'grid'\nlet initialized = false\n\nfunction snapshot(): WorkspaceView {\n if (!initialized && typeof window !== 'undefined') {\n initialized = true\n try { view = window.localStorage.getItem(KEY) === 'list' ? 'list' : 'grid' } catch { /* Session state still works without storage. */ }\n }\n return view\n}\n\nfunction setView(next: WorkspaceView): void {\n view = next\n initialized = true\n try { window.localStorage.setItem(KEY, next) } catch { /* Keep the selection for this session. */ }\n listeners.forEach(listener => listener())\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener)\n const onStorage = (event: StorageEvent): void => {\n if (event.key !== KEY && event.key !== null) return\n initialized = false\n snapshot()\n listener()\n }\n window.addEventListener('storage', onStorage)\n return () => { listeners.delete(listener); window.removeEventListener('storage', onStorage) }\n}\n\n/** All workspace tabs share one persisted display preference. Search and filters remain tab-specific. */\nexport function useWorkspaceView(): readonly [WorkspaceView, typeof setView] {\n return [useSyncExternalStore(subscribe, snapshot, () => 'grid'), setView]\n}\n","/**\n * The Agent Plugins Market settings section.\n *\n * Layout: repository sources run along the TOP as chips (全部 first), with\n * edit-current / add / refresh-all controls on the right; below sit search,\n * status tabs, and the card grid. Colors ride the dsh --dsw-alias-* tokens\n * with light-mode fallbacks so the page follows the active theme.\n */\nimport { createElement as h, useCallback, useEffect, useMemo, useState, type ReactNode } from 'react'\nimport { Button, Modal, Toast } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { postAction, type OverviewData, type SuiteCardData } from './api.js'\nimport { loadOverview, invalidateOverview, startSourceProgressPolling, type SourceProgressState } from './features/market/market-resource.js'\nimport { deriveMarketViewModel, type MarketCategory, type MarketFilter } from './features/market/market-view-model.js'\nimport { SourceTabsRow, type SourceTabItem } from './features/market/SourceTabsRow.js'\nimport { SourceEditorModal, type EditorState } from './features/market/SourceEditorModal.js'\nimport { interpolate } from './ui/interpolate.js'\nimport { InstallConfirmModal, type InstallConfirmState } from './features/market/InstallConfirmModal.js'\nimport { SuiteCard } from './features/market/SuiteCard.js'\nimport { StatusIcon } from './ui/StatusIcon.js'\nimport type { Translate } from './index.js'\nimport type { CredentialApi } from './credentials.js'\nimport { ErrorBoundary } from './ErrorBoundary.js'\nimport { SuiteDetailModal } from './SuiteDetail.js'\nimport { SearchFilterToolbar } from './SearchFilterToolbar.js'\nimport { BusyIndicator } from './ui/panel.js'\nimport css from './market.module.css'\nimport { useWorkspaceView } from './ui/workspace-view.js'\nimport { PanelHeader, PanelActions } from './ui/panel.js'\nimport { ResourceCollection } from './ui/ResourceCard.js'\n\n/** Host step keys -> translation keys, resolved against the active t(). */\nconst PROGRESS_STEP_LABELS: Record<string, string> = {\n cloning: 'progressCloning',\n downloading: 'progressDownloading',\n reading: 'progressReading'\n}\n\nexport interface MarketSectionProps {\n t: Translate\n /** Host credentials wire used for write-only MCP env configuration. */\n credentials?: CredentialApi\n /** The host surface controls only outer spacing; data and actions stay shared. */\n mode?: 'settings' | 'page'\n}\n\ntype Tab = MarketFilter\ntype Category = MarketCategory\n\ninterface ToastState {\n key: number\n message: string\n}\n\ninterface ConfirmState {\n kind: 'uninstall' | 'removeSource'\n sourceId: string\n suiteId?: string\n /** removeSource only: also physically delete the managed checkout. */\n deleteCheckout: boolean\n}\n\nfunction progressStepLabel(t: Translate, step: string): string {\n const key = PROGRESS_STEP_LABELS[step]\n return key === undefined ? step : t(key as Parameters<Translate>[0])\n}\n\nexport function MarketSection({ t, credentials, mode = 'settings' }: MarketSectionProps): ReactNode {\n const [overview, setOverview] = useState<OverviewData>(() => loadOverview().initial)\n const [loading, setLoading] = useState(() => loadOverview().revalidating)\n const [search, setSearch] = useState('')\n const [tab, setTab] = useState<Tab>('all')\n const [category, setCategory] = useState<Category>('all')\n const [view, setView] = useWorkspaceView()\n const [busy, setBusy] = useState<string | undefined>(undefined)\n const [toast, setToast] = useState<ToastState | undefined>(undefined)\n const [confirm, setConfirm] = useState<ConfirmState | undefined>(undefined)\n const [installConfirm, setInstallConfirm] = useState<InstallConfirmState | undefined>(undefined)\n const [editor, setEditor] = useState<EditorState>(undefined)\n const [detail, setDetail] = useState<{ sourceId: string; suiteId: string } | undefined>(undefined)\n const [progress, setProgress] = useState<SourceProgressState>({ step: undefined, error: undefined })\n\n const refresh = useCallback(async () => {\n invalidateOverview()\n try {\n const data = await loadOverview().promise\n setOverview(data)\n } catch {\n setToast({ key: Date.now(), message: t('loadFail') })\n } finally {\n setLoading(false)\n }\n }, [t])\n\n useEffect(() => {\n void refresh()\n }, [refresh])\n\n const action = useCallback(\n async (key: string, path: string, body: Record<string, unknown>): Promise<boolean> => {\n setBusy(key)\n try {\n await postAction(path, body)\n invalidateOverview()\n await refresh()\n return true\n } catch (error) {\n setToast({ key: Date.now(), message: `${t('actionFail')}: ${error instanceof Error ? error.message : String(error)}` })\n return false\n } finally {\n setBusy(undefined)\n }\n },\n [refresh, t]\n )\n\n const viewModel = useMemo(() => deriveMarketViewModel(overview, search, tab, category), [overview, search, tab, category])\n const { scopeTotals, filtered } = viewModel\n\n const openUninstall = useCallback((suite: SuiteCardData) => {\n setConfirm({ kind: 'uninstall', sourceId: suite.sourceId, suiteId: suite.suiteId, deleteCheckout: false })\n }, [])\n\n const confirmAction = useCallback(async () => {\n if (confirm === undefined) return\n if (confirm.kind === 'uninstall' && confirm.suiteId !== undefined) {\n await action(`u:${confirm.suiteId}`, 'uninstall', { sourceId: confirm.sourceId, suiteId: confirm.suiteId })\n } else if (confirm.kind === 'removeSource') {\n // deleteCheckout physically removes self-acquired checkouts (the host\n // still protects adopted/local directories), so the removed source\n // does not reappear as an \"unmanaged checkout\" entry.\n await action(`s:${confirm.sourceId}`, 'sources/remove', { id: confirm.sourceId, deleteCheckout: confirm.deleteCheckout })\n if (category === confirm.sourceId) setCategory('all')\n }\n setConfirm(undefined)\n }, [confirm, action, category])\n\n const selectedSource = category === 'all' ? undefined : overview.sources.find(source => source.id === category)\n\n // Chips read `全部` first, then the selected source, then every other source\n // by id: picking a source keeps it in view once the strip folds, and the\n // rest of the strip never reshuffles. Kind badges are limited to\n // `本地`/`压缩包`; an adopted checkout is an implementation detail, not a\n // user-facing state.\n const sourceItems = useMemo<SourceTabItem[]>(() => {\n const sorted = [...overview.sources].sort((a, b) => a.id.localeCompare(b.id))\n const ordered =\n selectedSource === undefined ? sorted : [selectedSource, ...sorted.filter(source => source.id !== selectedSource.id)]\n return [\n { id: 'all', label: `${t('tabAll')} ${overview.totals.all}` },\n ...ordered.map(source => {\n const notes = source.scanNotes ?? []\n const noteHint = notes.length === 0 ? undefined : `${t('scanNotes')}: ${notes.slice(0, 8).join(t('sourceErrorSeparator'))}`\n const kindBadge = source.local === true ? t('sourceLocal') : source.kind === 'archive' ? t('sourceArchive') : undefined\n return {\n id: source.id,\n label: `${source.id}${kindBadge === undefined ? '' : ` · ${kindBadge}`} ${source.suiteIds.length}${source.cloned === false || notes.length > 0 ? ' ⚠' : ''}`,\n ...(noteHint === undefined ? {} : { title: noteHint }),\n editable: selectedSource?.id === source.id,\n deletable: true\n }\n })\n ]\n }, [overview.sources, overview.totals.all, selectedSource, t])\n\n const adoptSource = useCallback(\n async (id: string) => {\n await action(`s:adopt:${id}`, 'sources/adopt', { id })\n },\n [action]\n )\n const unmanaged = overview.unmanaged ?? []\n\n return h(ErrorBoundary, {\n fallback: error => h('div', { className: css.empty }, `${t('actionFail')}: ${error.message}`),\n children: h(\n 'div',\n { className: mode === 'page' ? `${css.market} ${css.pageMode}` : css.market },\n h(\n 'div',\n { className: css.header },\n h(PanelHeader, { title: t('nav'), actions: h(PanelActions, { addLabel: t('addSource'), onAdd: () => setEditor({ mode: 'add' }), refreshLabel: t('refreshAll'), onRefresh: () => { void action('s:refresh:all', 'sources/refresh', {}) }, busy: busy !== undefined }) }),\n h(\n 'div',\n { className: css.marketControls },\n h(SourceTabsRow, {\n t,\n items: sourceItems,\n activeId: category,\n onSelect: setCategory,\n onDelete: id => setConfirm({ kind: 'removeSource', sourceId: id, deleteCheckout: true }),\n onEdit: id => {\n const source = overview.sources.find(entry => entry.id === id)\n if (source !== undefined) setEditor({ mode: 'edit', source })\n }\n }),\n unmanaged.length === 0\n ? null\n : h(\n 'div',\n { className: css.unmanagedRow },\n h('span', { className: css.unmanagedLabel }, t('unmanagedTitle')),\n ...unmanaged.map(entry =>\n h(\n 'span',\n { key: entry.id, className: css.unmanagedChip, title: entry.url ?? t('unmanagedNoRemote') },\n h('span', { className: css.unmanagedChipName }, entry.id),\n h(\n 'button',\n {\n type: 'button',\n className: css.unmanagedAdopt,\n disabled: busy !== undefined,\n title: t('unmanagedAdopt'),\n onClick: () => {\n void adoptSource(entry.id)\n }\n },\n '+'\n )\n )\n )\n ),\n h(SearchFilterToolbar, {\n search,\n searchLabel: t('searchPh'),\n searchPlaceholder: t('searchPh'),\n onSearchChange: setSearch,\n filters: [\n { id: 'all', label: t('tabAll'), count: scopeTotals.all, icon: h(StatusIcon, { kind: 'all' }), active: tab === 'all', onSelect: () => setTab('all') },\n {\n id: 'installed',\n label: t('tabInstalled'),\n count: scopeTotals.installed,\n icon: h(StatusIcon, { kind: 'installed' }),\n active: tab === 'installed',\n onSelect: () => setTab('installed')\n },\n {\n id: 'uninstalled',\n label: t('tabUninstalled'),\n count: scopeTotals.all - scopeTotals.installed,\n icon: h(StatusIcon, { kind: 'uninstalled' }),\n active: tab === 'uninstalled',\n onSelect: () => setTab('uninstalled')\n }\n ],\n view,\n gridLabel: t('grid'),\n listLabel: t('list'),\n onViewChange: nextView => setView(nextView)\n })\n )\n ),\n // Keep the global mask until both the mutation and list refresh finish.\n busy !== undefined ? h(BusyIndicator, { overlay: true, label: t('panelWorking') }) : null,\n h(\n ResourceCollection,\n { view, className: view === 'grid' ? css.grid : css.list },\n loading\n ? h('div', { className: css.empty }, t('loading'))\n : filtered.length === 0\n ? h('div', { className: css.empty }, tab === 'installed' ? t('installedEmpty') : t('empty'))\n : filtered.map(suite =>\n h(SuiteCard, {\n key: `${suite.sourceId}/${suite.suiteId}`,\n t,\n suite,\n busy: busy !== undefined,\n onOpen: () => setDetail({ sourceId: suite.sourceId, suiteId: suite.suiteId }),\n onInstall: () => {\n const source = overview.sources.find(entry => entry.id === suite.sourceId)\n setInstallConfirm({\n suite,\n ...(source?.lockCommit === undefined ? {} : { lockCommit: source.lockCommit }),\n ...(source?.local === true ? { localSource: true } : {})\n })\n },\n onAddSource: () => {\n if (suite.remoteUrl !== undefined) void action(`a:${suite.suiteId}`, 'sources/add', { url: suite.remoteUrl })\n },\n onToggle: () => {\n void action(`e:${suite.suiteId}`, 'set-enabled', { sourceId: suite.sourceId, suiteId: suite.suiteId, enabled: !suite.enabled })\n },\n onRefresh: () => {\n void action(`r:${suite.suiteId}`, 'sources/refresh', { id: suite.sourceId })\n },\n onUninstall: () => openUninstall(suite)\n })\n )\n ),\n toast === undefined ? null : h(Toast, { key: toast.key, text: toast.message, onDone: () => setToast(undefined) }),\n installConfirm === undefined\n ? null\n : h(InstallConfirmModal, {\n t,\n state: installConfirm,\n busy: busy !== undefined,\n onClose: () => setInstallConfirm(undefined),\n onConfirm: async () => {\n const ok = await action(`i:${installConfirm.suite.suiteId}`, 'install', {\n sourceId: installConfirm.suite.sourceId,\n suiteId: installConfirm.suite.suiteId\n })\n if (ok) setInstallConfirm(undefined)\n return ok\n }\n }),\n confirm === undefined\n ? null\n : h(Modal, {\n open: true,\n onClose: () => setConfirm(undefined),\n title:\n confirm.kind === 'uninstall'\n ? t('uninstallConfirmTitle')\n : interpolate(t('removeSourceConfirmTitle', { sourceId: confirm.sourceId }), { sourceId: confirm.sourceId }),\n closeLabel: t('cancel'),\n description: confirm.kind === 'uninstall' ? t('uninstallConfirmDesc') : t('removeSourceConfirmDesc'),\n children:\n confirm.kind === 'removeSource'\n ? h(\n 'label',\n { className: css.confirmCheck },\n h('input', {\n type: 'checkbox',\n checked: confirm.deleteCheckout,\n onChange: event =>\n setConfirm({\n ...confirm,\n deleteCheckout: (event.target as HTMLInputElement).checked\n })\n }),\n confirm.deleteCheckout ? t('removeSourceDeleteFiles') : t('removeSourceKeepFiles')\n )\n : null,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h(Button, { variant: 'ghost', disabled: busy !== undefined, onClick: () => setConfirm(undefined) }, t('cancel')),\n h(\n Button,\n {\n variant: 'primary',\n disabled: busy !== undefined,\n onClick: () => {\n void confirmAction()\n }\n },\n t('confirmDelete')\n )\n )\n }),\n detail === undefined\n ? null\n : h(SuiteDetailModal, {\n t,\n credentials,\n sourceId: detail.sourceId,\n suiteId: detail.suiteId,\n onClose: () => setDetail(undefined)\n }),\n editor === undefined\n ? null\n : h(SourceEditorModal, {\n t,\n editor,\n busy: busy !== undefined,\n progress,\n onClose: () => setEditor(undefined),\n onSave: async ({ url, branch, kind, sha256 }) => {\n const key = editor.mode === 'edit' ? `s:edit:${editor.source.id}` : `s:add:${url}`\n const body: Record<string, unknown> = { url, local: kind === 'local', kind }\n if (branch !== '' && kind === 'git') body['branch'] = branch\n if (sha256 !== '' && kind === 'archive') body['sha256'] = sha256\n if (editor.mode === 'add') {\n setBusy(key)\n setProgress({ step: t('progressStarting'), error: undefined })\n const poll = startSourceProgressPolling(setProgress, step => progressStepLabel(t, step))\n try {\n const payload = await postAction('sources/add', body)\n const derived = (payload['source'] as { id?: string } | undefined)?.id\n invalidateOverview()\n await refresh()\n setEditor(undefined)\n if (derived !== undefined) setCategory(derived)\n return true\n } catch (error) {\n setToast({ key: Date.now(), message: `${t('actionFail')}: ${error instanceof Error ? error.message : String(error)}` })\n setProgress({ step: undefined, error: error instanceof Error ? error.message : String(error) })\n return false\n } finally {\n poll.stop()\n setBusy(undefined)\n }\n }\n const ok = await action(key, 'sources/update', { id: editor.source.id, ...body })\n if (ok) setEditor(undefined)\n return ok\n },\n onRemove: async id => {\n setConfirm({ kind: 'removeSource', sourceId: id, deleteCheckout: true })\n setEditor(undefined)\n }\n })\n )\n })\n}\n","export type ServerKind = 'mcp' | 'lsp'\nexport type ServerConfig = Record<string, unknown>\n\nexport function parseServerConfig(text: string): ServerConfig {\n const value: unknown = JSON.parse(text)\n if (value === null || typeof value !== 'object' || Array.isArray(value)) throw new Error('Configuration must be a JSON object')\n return value as ServerConfig\n}\n\n/** Switching transport removes only transport-specific fields; all unrelated keys survive edits. */\nexport function changeTransport(config: ServerConfig, type: string): ServerConfig {\n const next: ServerConfig = { ...config, type }\n if (type === 'stdio') {\n delete next['url']\n delete next['headers']\n delete next['auth']\n } else {\n delete next['command']\n delete next['args']\n delete next['env']\n delete next['cwd']\n }\n return next\n}\n\nexport function serverFormCompatible(config: ServerConfig, kind: ServerKind): boolean {\n const isMap = (value: unknown): boolean =>\n value === undefined || (value !== null && typeof value === 'object' && !Array.isArray(value) && Object.values(value).every(v => typeof v === 'string'))\n if (!['command', 'url', 'cwd'].every(key => config[key] === undefined || typeof config[key] === 'string')) return false\n if (config.args !== undefined && (!Array.isArray(config.args) || config.args.some(value => typeof value !== 'string'))) return false\n if (!isMap(config.env) || !isMap(config.headers) || !isMap(config.extensionToLanguage)) return false\n if (kind === 'mcp' && config.type !== undefined && !['stdio', 'streamable-http', 'sse'].includes(String(config.type))) return false\n if (config.auth !== undefined && (config.auth === null || typeof config.auth !== 'object' || Array.isArray(config.auth))) return false\n const auth = config.auth as Record<string, unknown> | undefined\n if (auth?.enabled !== undefined && typeof auth.enabled !== 'boolean') return false\n if (auth?.scope !== undefined && typeof auth.scope !== 'string') return false\n return true\n}\n","import { createElement as h, useEffect, useState, type ReactNode } from 'react'\nimport { Button, IconPlusOutline16, IconTrashOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { Translate } from '../index.js'\nimport { changeTransport, parseServerConfig, serverFormCompatible, type ServerKind, type ServerConfig } from './server-form.js'\nimport css from './detail.module.css'\n\n/** One JSON document backs both modes. Invalid JSON is retained, never silently converted or reset. */\nexport function ServerConfigEditor(props: {\n kind: ServerKind\n text: string\n onChange: (text: string) => void\n t: Translate\n disabled?: boolean\n onValidityChange?: (valid: boolean) => void\n}): ReactNode {\n const [mode, setMode] = useState<'form' | 'json'>('form')\n const [issues, setIssues] = useState<Record<string, boolean>>({})\n let config: ServerConfig | undefined\n let parseError: string | undefined\n try {\n config = parseServerConfig(props.text)\n } catch (error) {\n parseError = error instanceof Error ? error.message : String(error)\n }\n const compatible = config !== undefined && serverFormCompatible(config, props.kind)\n const hasIssue = Object.values(issues).some(Boolean)\n const requiredValid =\n config !== undefined &&\n (props.kind === 'lsp'\n ? typeof config.command === 'string' &&\n config.command.trim() !== '' &&\n config.extensionToLanguage !== null &&\n typeof config.extensionToLanguage === 'object' &&\n Object.keys(config.extensionToLanguage).length > 0\n : config.type === 'stdio'\n ? typeof config.command === 'string' && config.command.trim() !== ''\n : ['sse', 'streamable-http'].includes(String(config.type)) && typeof config.url === 'string' && config.url.trim() !== '')\n const valid = compatible && !hasIssue && requiredValid\n useEffect(() => {\n props.onValidityChange?.(valid)\n }, [valid, props.onValidityChange])\n const update = (next: ServerConfig): void => props.onChange(JSON.stringify(next, null, 2))\n const field = (key: string, value: unknown): void => {\n const next = { ...config }\n if (value === undefined) delete next[key]\n else next[key] = value\n update(next)\n }\n const issue = (key: string, bad: boolean): void => {\n setIssues(current => {\n const next = { ...current, [key]: bad }\n return next\n })\n }\n const textField = (key: string, label: string, required = false): ReactNode =>\n h(\n 'label',\n { className: css.field, key },\n label,\n h('input', {\n value: typeof config?.[key] === 'string' ? config[key] : '',\n required,\n 'aria-label': label,\n onChange: (event: { target: HTMLInputElement }) => field(key, event.target.value === '' && !required ? undefined : event.target.value)\n })\n )\n const mapField = (key: string, label: string): ReactNode =>\n h(\n 'div',\n { className: `${css.field} ${css.wide}`, key },\n h('span', null, label),\n h(StringRows, {\n key,\n label,\n t: props.t,\n map: true,\n value: config?.[key] as Record<string, string> | undefined,\n onChange: value => field(key, value),\n onIssue: bad => issue(key, bad)\n })\n )\n const type = String(config?.type ?? 'stdio')\n const auth = (config?.auth ?? {}) as Record<string, unknown>\n return h(\n 'div',\n { className: css.section },\n h(\n 'div',\n { className: css.modes },\n (['form', 'json'] as const).map(value =>\n h(\n 'button',\n {\n type: 'button',\n key: value,\n className: css.mode,\n 'aria-pressed': mode === value,\n disabled: props.disabled || (value === 'json' && hasIssue),\n onClick: () => setMode(value)\n },\n props.t(value === 'form' ? 'detailForm' : 'detailJson')\n )\n )\n ),\n parseError ? h('div', { role: 'alert', className: css.error }, props.t('detailInvalidJson'), ' ', parseError) : null,\n mode === 'json'\n ? h('textarea', {\n className: css.raw,\n value: props.text,\n disabled: props.disabled,\n spellCheck: false,\n 'aria-label': props.t('detailJson'),\n onChange: (event: { target: HTMLTextAreaElement }) => props.onChange(event.target.value)\n })\n : !compatible\n ? h('div', { role: 'alert', className: css.error }, props.t('detailUseJson'))\n : h(\n 'fieldset',\n { disabled: props.disabled, className: css.form, style: { border: 0, margin: 0, padding: 0 } },\n props.kind === 'mcp'\n ? h(\n 'label',\n { className: css.field },\n props.t('detailTransport'),\n h(\n 'select',\n {\n value: type,\n 'aria-label': props.t('detailTransport'),\n disabled: hasIssue,\n onChange: (event: { target: HTMLSelectElement }) => update(changeTransport(config!, event.target.value))\n },\n ['stdio', 'streamable-http', 'sse'].map(value => h('option', { key: value, value }, value))\n )\n )\n : null,\n props.kind === 'lsp' || type === 'stdio'\n ? [\n textField('command', props.t('detailCommand'), true),\n h(\n 'div',\n { className: `${css.field} ${css.wide}`, key: 'args' },\n h('span', null, props.t('detailArgs')),\n h(StringRows, {\n label: props.t('detailArgs'),\n t: props.t,\n map: false,\n value: config!.args as string[] | undefined,\n onChange: value => field('args', value),\n onIssue: bad => issue('args', bad)\n })\n ),\n mapField('env', props.t('detailEnv'))\n ]\n : [textField('url', props.t('detailUrl'), true), mapField('headers', props.t('detailHeaders'))],\n props.kind === 'mcp' && type === 'stdio' ? textField('cwd', props.t('detailCwd')) : null,\n props.kind === 'mcp' && type !== 'stdio'\n ? h(\n 'div',\n { className: css.field },\n h(\n 'label',\n null,\n h('input', {\n type: 'checkbox',\n checked: auth.enabled !== false,\n onChange: (event: { target: HTMLInputElement }) => field('auth', { ...auth, enabled: event.target.checked })\n }),\n ' OAuth'\n ),\n h(\n 'label',\n { className: css.field },\n props.t('detailScope'),\n h('input', {\n value: typeof auth.scope === 'string' ? auth.scope : '',\n 'aria-label': props.t('detailScope'),\n onChange: (event: { target: HTMLInputElement }) => {\n const next = { ...auth, scope: event.target.value }\n field('auth', next)\n }\n })\n )\n )\n : null,\n props.kind === 'lsp'\n ? [\n mapField('extensionToLanguage', props.t('detailExtensions')),\n ...(['initializationOptions', 'configuration'] as const).map(key =>\n h(JsonField, { key, label: key, value: config![key], onChange: value => field(key, value), onIssue: bad => issue(key, bad) })\n )\n ]\n : null\n )\n )\n}\n\nfunction StringRows(props: {\n label: string\n t: Translate\n map: boolean\n value?: Record<string, string> | string[]\n onChange: (value: Record<string, string> | string[]) => void\n onIssue: (bad: boolean) => void\n}): ReactNode {\n const [rows, setRows] = useState<Array<[string, string]>>(() => (props.map ? Object.entries(props.value ?? {}) : ((props.value as string[]) ?? []).map(value => ['', value])))\n const [invalid, setInvalid] = useState(false)\n const change = (next: Array<[string, string]>): void => {\n setRows(next)\n const bad = props.map && (next.some(([key]) => key.trim() === '') || new Set(next.map(([key]) => key)).size !== next.length)\n setInvalid(bad)\n props.onIssue(bad)\n if (!bad) props.onChange(props.map ? Object.fromEntries(next) : next.map(([, value]) => value))\n }\n return h(\n 'div',\n { className: css.rows },\n rows.map(([key, value], index) =>\n h(\n 'div',\n { className: css.row, key: index },\n props.map\n ? h('input', {\n value: key,\n 'aria-label': `${props.label} ${props.t('detailKey')} ${index + 1}`,\n onChange: (event: { target: HTMLInputElement }) => change(rows.map((row, i) => (i === index ? [event.target.value, row[1]] : row)))\n })\n : null,\n h('input', {\n value,\n 'aria-label': `${props.label} ${props.t('detailValue')} ${index + 1}`,\n onChange: (event: { target: HTMLInputElement }) => change(rows.map((row, i) => (i === index ? [row[0], event.target.value] : row)))\n }),\n h(\n Button,\n {\n variant: 'ghost',\n size: 'sm',\n title: props.t('panelDelete'),\n 'aria-label': `${props.t('panelDelete')} ${props.label} ${index + 1}`,\n onClick: () => change(rows.filter((_, i) => i !== index))\n },\n h(IconTrashOutline16)\n )\n )\n ),\n invalid ? h('span', { role: 'alert', className: css.error }, props.t('detailUniqueKeys')) : null,\n h(\n Button,\n { variant: 'ghost', size: 'sm', title: props.t('panelAdd'), 'aria-label': `${props.t('panelAdd')} ${props.label}`, onClick: () => change([...rows, ['', '']]) },\n h(IconPlusOutline16),\n props.t('panelAdd')\n )\n )\n}\n\nfunction JsonField(props: { label: string; value: unknown; onChange: (value: unknown) => void; onIssue: (bad: boolean) => void }): ReactNode {\n const [text, setText] = useState(props.value === undefined ? '' : JSON.stringify(props.value, null, 2))\n const [error, setError] = useState('')\n return h(\n 'label',\n { className: `${css.field} ${css.wide}` },\n props.label,\n h('textarea', {\n value: text,\n rows: 4,\n 'aria-label': props.label,\n onChange: (event: { target: HTMLTextAreaElement }) => {\n const next = event.target.value\n setText(next)\n try {\n const value: unknown = next.trim() === '' ? undefined : JSON.parse(next)\n setError('')\n props.onIssue(false)\n props.onChange(value)\n } catch (reason) {\n setError(String(reason))\n props.onIssue(true)\n }\n }\n }),\n error ? h('span', { role: 'alert', className: css.error }, error) : null\n )\n}\n","import { createElement as h, useEffect, useState, type ReactNode } from 'react'\nimport { Button } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { fetchServerConfig, saveServerConfig } from '../api.js'\nimport type { Translate } from '../index.js'\nimport { ServerConfigEditor } from './ServerConfigEditor.js'\nimport { parseServerConfig, type ServerKind } from './server-form.js'\nimport css from './detail.module.css'\nimport { DetailFooterAction } from './DetailModal.js'\n\n/** Loads complete configuration rather than editing the abbreviated status projection. */\nexport function ServerConfigDetail({\n kind,\n id,\n t,\n onSaved,\n onDirtyChange\n}: {\n kind: ServerKind\n id: string\n t: Translate\n onSaved?: () => void\n onDirtyChange?: (dirty: boolean) => void\n}): ReactNode {\n const [text, setText] = useState<string>()\n const [editable, setEditable] = useState(false)\n const [valid, setValid] = useState(false)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string>()\n const [loading, setLoading] = useState(true)\n const [dirty, setDirty] = useState(false)\n useEffect(() => {\n onDirtyChange?.(dirty)\n }, [dirty, onDirtyChange])\n useEffect(() => {\n let active = true\n setLoading(true)\n setText(undefined)\n setError(undefined)\n setDirty(false)\n void fetchServerConfig(kind, id)\n .then(result => {\n if (!active) return\n setEditable(result.editable)\n setText(result.config === undefined ? undefined : JSON.stringify(result.config, null, 2))\n })\n .catch(reason => {\n if (active) setError(String(reason))\n })\n .finally(() => {\n if (active) setLoading(false)\n })\n return () => {\n active = false\n }\n }, [kind, id])\n const save = async (): Promise<void> => {\n setBusy(true)\n setError(undefined)\n try {\n await saveServerConfig(kind, id, parseServerConfig(text ?? ''))\n setDirty(false)\n onSaved?.()\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setBusy(false)\n }\n }\n return h(\n 'section',\n null,\n error ? h('p', { role: 'alert', className: css.error }, error) : null,\n loading\n ? h('p', { role: 'status' }, t('loading'))\n : text === undefined\n ? null\n : h(ServerConfigEditor, {\n kind,\n text,\n t,\n disabled: busy || !editable,\n onValidityChange: setValid,\n onChange: value => {\n setText(value)\n setDirty(true)\n }\n }),\n loading || (error && text === undefined)\n ? null\n : editable\n ? h(DetailFooterAction, {\n children: h(\n Button,\n {\n variant: 'primary',\n disabled: busy || !valid || !dirty,\n onClick: () => {\n void save()\n }\n },\n busy ? t('loading') : t('save')\n )\n })\n : h('p', null, t('serverConfigReadOnly'))\n )\n}\n","import type { McpStatusEntry } from '../../../contracts/mcp-status.js'\n\n/** Actions describe different effects: retry preserves credentials; OAuth reset is explicit. */\nexport function mcpDetailActions(entry: McpStatusEntry) {\n const owned = entry.kind === 'plugin' || entry.managed === true\n return {\n retry: owned && (entry.state === 'failed' || entry.state === 'orphaned') && entry.code !== 'unsupported-transport',\n reauthorize: owned && entry.canReauthorize === true && !['disabled', 'foreign', 'orphaned', 'needs-credentials'].includes(entry.state)\n }\n}\n","import { withBusyOperation } from './ui/busy-operation.js'\n/** Browser-safe structural subset of the Host credentials wire. */\n\nexport interface CredentialView {\n configured: boolean\n source?: string\n writable: boolean\n}\n\nexport interface CredentialApi {\n describe(payload: { refs: string[] }): Promise<unknown>\n set(payload: { ref: string; value: string }): Promise<unknown>\n unset(payload: { ref: string }): Promise<unknown>\n}\n\ninterface CredentialDescribeResponse {\n result?: {\n ok?: boolean\n value?: { credentials?: Record<string, CredentialView> }\n error?: { message?: string }\n }\n}\n\ninterface CredentialMutationResponse {\n result?: { ok?: boolean; error?: { message?: string } }\n}\n\n/** Read one value-free credential view; secret values never enter the browser state. */\nexport async function describeCredential(api: CredentialApi | undefined, ref: string): Promise<CredentialView | undefined> {\n if (api === undefined) return undefined\n const response = (await api.describe({ refs: [ref] })) as CredentialDescribeResponse\n if (response.result?.ok !== true) throw new Error(response.result?.error?.message ?? 'credential lookup failed')\n return response.result.value?.credentials?.[ref]\n}\n\nexport async function setCredential(api: CredentialApi, ref: string, value: string): Promise<void> {\n return withBusyOperation(async () => {\n const response = (await api.set({ ref, value })) as CredentialMutationResponse\n if (response.result?.ok !== true) throw new Error(response.result?.error?.message ?? 'credential save failed')\n })\n}\n\nexport async function unsetCredential(api: CredentialApi, ref: string): Promise<void> {\n return withBusyOperation(async () => {\n const response = (await api.unset({ ref })) as CredentialMutationResponse\n if (response.result?.ok !== true) throw new Error(response.result?.error?.message ?? 'credential removal failed')\n })\n}\n\n/** Current Host remote service; methods return unwrapped RPC results. */\nexport interface CredentialRemote {\n describe(refs: string[]): Promise<{ ok: boolean; value?: Record<string, CredentialView>; error?: { message?: string } }>\n set(ref: string, value: string): Promise<unknown>\n unset(ref: string): Promise<unknown>\n}\n\n/** Adapt the current Host service to the credential editor's wire contract. */\nexport function credentialApi(remote: CredentialRemote): CredentialApi {\n return {\n describe: async ({ refs }) => {\n const result = await remote.describe(refs)\n return { result: result.ok ? { ok: true, value: { credentials: result.value } } : result }\n },\n set: async ({ ref, value }) => ({ result: await remote.set(ref, value) }),\n unset: async ({ ref }) => ({ result: await remote.unset(ref) })\n }\n}\n","/* Write-only MCP credential editor. Colors ride dsh --dsw-alias-* tokens. */\n\n.form {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px 14px;\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n}\n\n.head {\n margin: 0;\n color: var(--dsw-alias-label-secondary, #667085);\n font-size: 12px;\n font-weight: 600;\n}\n\n.error {\n padding: 8px 10px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n border-radius: 8px;\n overflow-wrap: anywhere;\n font-size: 12px;\n line-height: 18px;\n}\n\n.row {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 6px;\n padding-top: 8px;\n border-top: 1px solid var(--dsw-alias-border-l1, #eef1f5);\n}\n\n.ref {\n color: var(--dsw-alias-label-primary, #1f2328);\n font: 600 12px/18px ui-monospace, Menlo, Consolas, monospace;\n}\n\n.controls {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 8px;\n}\n\n.facts {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.factOk, .factMiss {\n padding: 1px 8px;\n border-radius: 999px;\n font-size: 11px;\n line-height: 17px;\n}\n\n.factOk {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237));\n}\n\n.factMiss {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n\n.note {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 11px;\n line-height: 17px;\n}\n\n.editor {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.input {\n width: 100%;\n box-sizing: border-box;\n padding: 7px 10px;\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-bg-layer-1, #fff);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 8px;\n font-size: 12px;\n}\n\n.input:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 1px;\n}\n\n.actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n","/**\n * Write-only credential editor for MCP `${ENV_NAME}` references.\n *\n * Read facts (configured / source / writable) come from the value-free\n * credentials wire; a typed value crosses the wire exactly once, inside\n * `credentials.set`, and never re-enters component state. Read-only\n * launch-environment credentials render guidance instead of a form that could\n * only fake success.\n */\nimport { useEffect, useState, type ReactNode } from 'react'\nimport { createElement as h } from 'react'\nimport { Button } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { describeCredential, setCredential, unsetCredential, type CredentialApi, type CredentialView } from './credentials.js'\nimport { BusyIndicator } from './ui/panel.js'\nimport type { Translate } from './index.js'\nimport css from './mcp-credential.module.css'\n\nexport function McpCredentialEditor(props: { t: Translate; api?: CredentialApi; refs: string[] }): ReactNode {\n const { t, api, refs } = props\n const [views, setViews] = useState<Record<string, CredentialView>>({})\n const [drafts, setDrafts] = useState<Record<string, string>>({})\n const [busy, setBusy] = useState<string | undefined>(undefined)\n const [error, setError] = useState<string | undefined>(undefined)\n const refKey = refs.join('|')\n\n useEffect(() => {\n let cancelled = false\n setViews({})\n setError(undefined)\n if (api === undefined || refs.length === 0) return () => {\n cancelled = true\n }\n void Promise.all(refs.map(async ref => [ref, await describeCredential(api, ref)] as const))\n .then(entries => {\n if (cancelled) return\n setViews(Object.fromEntries(entries.flatMap(([ref, view]) => (view === undefined ? [] : [[ref, view]]))))\n })\n .catch(reason => {\n if (!cancelled) setError(reason instanceof Error ? reason.message : String(reason))\n })\n return () => {\n cancelled = true\n }\n }, [api, refKey])\n\n if (refs.length === 0) return null\n const refresh = async (ref: string): Promise<void> => {\n if (api === undefined) return\n const view = await describeCredential(api, ref)\n if (view !== undefined) setViews(current => ({ ...current, [ref]: view }))\n }\n const save = async (ref: string): Promise<void> => {\n const value = drafts[ref]?.trim()\n if (api === undefined || value === undefined || value === '') return\n setBusy(ref)\n setError(undefined)\n try {\n await setCredential(api, ref, value)\n setDrafts(current => ({ ...current, [ref]: '' }))\n await refresh(ref)\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setBusy(undefined)\n }\n }\n const unset = async (ref: string): Promise<void> => {\n if (api === undefined) return\n setBusy(ref)\n setError(undefined)\n try {\n await unsetCredential(api, ref)\n await refresh(ref)\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setBusy(undefined)\n }\n }\n\n return h(\n 'section',\n { className: css.form },\n busy === undefined ? null : h(BusyIndicator, { overlay: true }),\n h('h4', { className: css.head }, t('mcpCredentialTitle')),\n error === undefined ? null : h('div', { className: css.error }, error),\n refs.map(ref => {\n const view = views[ref]\n const refBusy = busy === ref\n return h(\n 'div',\n { key: ref, className: css.row },\n h('code', { className: css.ref }, ref),\n view === undefined\n ? h('div', { className: css.note }, api === undefined ? t('mcpCredentialUnavailable') : t('loading'))\n : h(\n 'div',\n { className: css.controls },\n h(\n 'div',\n { className: css.facts },\n h('span', { className: view.configured ? css.factOk : css.factMiss }, view.configured ? t('mcpCredentialConfigured') : t('mcpCredentialMissing')),\n view.source === undefined ? null : h('span', { className: css.note }, view.source)\n ),\n view.writable\n ? h(\n 'div',\n { className: css.editor },\n h('input', {\n className: css.input,\n type: 'password',\n autoComplete: 'new-password',\n value: drafts[ref] ?? '',\n placeholder: t('mcpCredentialPlaceholder'),\n disabled: refBusy,\n onChange: event => setDrafts(current => ({ ...current, [ref]: (event.target as HTMLInputElement).value }))\n }),\n h(\n 'div',\n { className: css.actions },\n h(Button, { variant: 'primary', size: 'sm', disabled: refBusy || (drafts[ref]?.trim() ?? '') === '', onClick: () => void save(ref) }, t('mcpCredentialSave')),\n view.configured ? h(Button, { variant: 'ghost', size: 'sm', disabled: refBusy, onClick: () => void unset(ref) }, t('mcpCredentialUnset')) : null\n )\n )\n : h('div', { className: css.note }, t('mcpCredentialReadOnly'))\n )\n )\n })\n )\n}\n","/** Pure MCP status filtering and count derivation. */\nimport type { McpStatusEntry, McpStatusPayload } from '../../api.js'\n\n/** MCP status list filter. */\nexport type McpStatusFilter = 'all' | 'plugin' | 'direct'\n\n/** Derived MCP list data used by the status screen. */\nexport interface McpStatusViewModel {\n activeEntries: McpStatusEntry[]\n filtered: McpStatusEntry[]\n filterCounts: { all: number; plugin: number; direct: number }\n /** Counted over the active (non-disabled-hidden) rows for the current view. */\n visibleTotals: { all: number; connected: number; degraded: number; failed: number; needsCredentials: number; orphaned: number; disabled: number; foreign: number }\n}\n\ninterface SearchableEntry {\n entry: McpStatusEntry\n haystack: string\n}\n\nconst searchableCache = new WeakMap<McpStatusPayload, SearchableEntry[]>()\n\n/** Derive active rows, filter counts, and visible rows in one pass. */\nexport function deriveMcpStatusViewModel(payload: McpStatusPayload, filter: McpStatusFilter, search: string): McpStatusViewModel {\n const searchable = searchableFor(payload)\n const activeEntries = searchable.map(item => item.entry)\n const filterCounts = { all: 0, plugin: 0, direct: 0 }\n const visibleTotals = { all: 0, connected: 0, degraded: 0, failed: 0, needsCredentials: 0, orphaned: 0, disabled: 0, foreign: 0 }\n const filtered: McpStatusEntry[] = []\n const needle = search.trim().toLowerCase()\n\n for (const item of searchable) {\n const entry = item.entry\n filterCounts.all++\n filterCounts[entry.kind]++\n visibleTotals.all++\n if (entry.state === 'connected') visibleTotals.connected++\n if (entry.state === 'degraded') visibleTotals.degraded++\n if (entry.state === 'failed') visibleTotals.failed++\n if (entry.state === 'needs-credentials') visibleTotals.needsCredentials++\n if (entry.state === 'orphaned') visibleTotals.orphaned++\n if (entry.state === 'disabled') visibleTotals.disabled++\n if (entry.state === 'foreign') visibleTotals.foreign++\n if (filter !== 'all' && entry.kind !== filter) continue\n if (needle !== '' && !item.haystack.includes(needle)) continue\n filtered.push(entry)\n }\n\n return {\n activeEntries,\n filtered,\n filterCounts,\n visibleTotals\n }\n}\n\nfunction searchableFor(payload: McpStatusPayload): SearchableEntry[] {\n const cached = searchableCache.get(payload)\n if (cached !== undefined) return cached\n const searchable = payload.entries\n .filter(entry => entry.state !== 'disabled')\n .map(entry => ({\n entry,\n haystack: `${entry.name} ${entry.source ?? ''} ${entry.endpoint ?? ''} ${entry.transport} ${entry.reason ?? ''} ${(entry.credentialRefs ?? []).join(' ')}`.toLowerCase()\n }))\n searchableCache.set(payload, searchable)\n return searchable\n}\n",".surface {\n composes: shell from './ui/panel.module.css';\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n.summary {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n color: var(--dsw-alias-label-secondary, #667085);\n font-size: 12px;\n white-space: nowrap;\n}\n.errorSummary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n}\n/* Summary bar: one chip per non-healthy state, plus the observation time. */\n.summaryBar {\n display: flex;\n flex: none;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 10px 12px;\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n}\n.summaryChip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 999px;\n font-size: 12px;\n line-height: 18px;\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n}\n.chiporphaned, .chipfailed {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n}\n.chipneedsCredentials, .chipdegraded {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n.chipdisabled {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n background: var(--dsw-alias-bg-layer-1, #fff);\n}\n.summaryAllGood {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n color: var(--dsw-alias-state-success-primary, #16a34a);\n font-size: 12px;\n}\n.summaryCount {\n font-weight: 700;\n}\n.summaryLabel {\n color: inherit;\n}\n.observedAt {\n margin-left: auto;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 11px;\n white-space: nowrap;\n}\n.summaryDotGreen, .summaryDotRed {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n}\n.summaryDotGreen { background: var(--dsw-alias-state-success-primary, #16a34a); }\n.summaryDotRed { background: var(--dsw-alias-state-error-primary, #dc2626); }\n.summaryDotWarn { background: var(--dsw-alias-state-warn-primary, #b45309); }\n.summaryDotInfo { background: var(--dsw-alias-brand-primary, #4f6ef7); }\n.toolbar {\n flex: none;\n}\n.grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n min-width: 0;\n min-height: 0;\n gap: 12px;\n align-content: start;\n overflow-y: auto;\n scrollbar-gutter: stable;\n padding-right: 4px;\n}\n\n@media (max-width: 760px) {\n .grid { grid-template-columns: minmax(0, 1fr); }\n}\n.list {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n gap: 8px;\n overflow-y: auto;\n scrollbar-gutter: stable;\n padding-right: 4px;\n}\n\n.list .card {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n column-gap: 14px;\n row-gap: 8px;\n}\n.card {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n color: inherit;\n background: var(--dsw-alias-bg-layer-1, #fff);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 8px;\n cursor: pointer;\n font: inherit;\n text-align: left;\n user-select: none;\n transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;\n}\n.card:hover {\n border-color: var(--dsw-alias-border-l3, #d9dde3);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n}\n.cardBody {\n display: flex;\n min-width: 0;\n flex: 1;\n flex-direction: column;\n gap: 8px;\n padding: 12px 14px 10px;\n}\n\n.card:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4f6ef7);\n outline-offset: 2px;\n}\n.cardTop {\n display: flex;\n align-items: center;\n min-width: 0;\n gap: 8px;\n}\n.statusDot {\n width: 7px;\n height: 7px;\n flex: none;\n border-radius: 50%;\n background: var(--dsw-alias-state-success-primary, #16a34a);\n}\n.statusconnected { background: var(--dsw-alias-state-success-primary, #16a34a); }\n.statusdegraded { background: var(--dsw-alias-state-warn-primary, #b45309); }\n.statusfailed { background: var(--dsw-alias-state-error-primary, #dc2626); }\n.statusneeds-credentials { background: var(--dsw-alias-state-warn-primary, #b45309); }\n.statusorphaned { background: var(--dsw-alias-state-error-primary, #dc2626); }\n.statusdisabled { background: var(--dsw-alias-label-tertiary, #98a2b3); }\n.service {\n flex: 1;\n min-width: 0;\n}\n.name {\n display: block;\n overflow: hidden;\n color: var(--dsw-alias-label-primary, #1f2328);\n text-overflow: ellipsis;\n white-space: nowrap;\n font: 600 13px/22px ui-monospace, Menlo, Consolas, monospace;\n}\n.endpoint {\n /* Two-line truncation without legacy -webkit-box line clamping: the\n nested-scroll compositor paints -webkit-box text outside its box when\n the surrounding page re-scrolls, so cap the block height instead. */\n max-height: 36px;\n overflow: hidden;\n margin: 0;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font: 12px/18px ui-monospace, Menlo, Consolas, monospace;\n overflow-wrap: anywhere;\n}\n\n.sourcePlugin, .sourceDirect, .transport, .toolCount {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n padding: 1px 6px;\n color: var(--dsw-alias-label-secondary, #6b7280);\n border: 1px solid var(--dsw-alias-border-l3, #d9dde3);\n border-radius: 4px;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n line-height: 18px;\n}\n.sourcePlugin svg, .sourceDirect svg {\n width: 14px;\n height: 14px;\n flex: none;\n color: currentColor;\n stroke: currentColor;\n stroke-width: 1.35;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.transport {\n font-family: ui-monospace, Menlo, Consolas, monospace;\n}\n.toolCount {\n flex: none;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n}\n.reasonLabel {\n flex: none;\n font-weight: 600;\n opacity: 0.85;\n}\n/* State pill: the card's one-line verdict, color-coded by severity. */\n.statePill {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 1px 8px;\n border-radius: 999px;\n font-size: 11px;\n line-height: 17px;\n white-space: nowrap;\n font-weight: 600;\n}\n.statePill::before {\n width: 6px;\n height: 6px;\n content: '';\n background: currentColor;\n border-radius: 50%;\n}\n.stateconnected {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237));\n}\n.statedegraded, .stateneeds-credentials {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n.statefailed, .stateorphaned {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n}\n.statedisabled {\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n}\n/* Card left accent follows the state so scanning the grid is instant. */\n.state, .detailState {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n color: var(--dsw-alias-state-success-primary, #16a34a);\n font-size: 11px;\n white-space: nowrap;\n}\n.state::before, .detailState::before {\n width: 6px;\n height: 6px;\n content: '';\n background: currentColor;\n border-radius: 50%;\n}\n.stateconnected, .detailStateconnected { color: var(--dsw-alias-state-success-primary, #16a34a); }\n.statedegraded, .detailStatedegraded { color: var(--dsw-alias-state-warn-primary, #b45309); }\n.statefailed, .detailStatefailed { color: var(--dsw-alias-state-error-primary, #dc2626); }\n.stateneeds-credentials, .detailStateneeds-credentials { color: var(--dsw-alias-state-warn-primary, #b45309); }\n.stateorphaned, .detailStateorphaned { color: var(--dsw-alias-state-error-primary, #dc2626); }\n.statedisabled, .detailStatedisabled { color: var(--dsw-alias-label-tertiary, #98a2b3); }\n.chevron { color: var(--dsw-alias-label-tertiary, #8b93a1); font-size: 18px; }\n.empty, .detailEmpty {\n padding: 24px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 12px;\n text-align: center;\n}\n.error {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 16px 0;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n font-size: 12px;\n}\n.boundary {\n margin: 10px 0 0;\n padding: 9px 10px;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border-left: 2px solid var(--dsw-alias-border-l3, #d9dde3);\n font-size: 11px;\n line-height: 17px;\n}\n.detailDialog { width: min(720px, 94vw); }\n.detailBody { max-height: 72vh; overflow-y: auto; }\n.modalFooter { display: flex; justify-content: flex-end; width: 100%; }\n.detail { display: flex; flex-direction: column; gap: 16px; }\n.detailMeta { display: flex; flex-wrap: wrap; gap: 6px; }\n/* Modal hero: state + endpoint above the fold. */\n.detailHero {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 12px 14px;\n background: var(--dsw-alias-bg-layer-2, #f7f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n border-radius: 10px;\n}\n.detailHeroText {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 5px;\n}\n.detailEndpoint {\n margin: 0;\n color: var(--dsw-alias-label-secondary, #667085);\n overflow-wrap: anywhere;\n font: 12px/18px ui-monospace, Menlo, Consolas, monospace;\n}\n.reason {\n padding: 9px 10px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n border-left: 2px solid currentColor;\n font-size: 11px;\n line-height: 16px;\n}\n.reasonBox {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px 12px;\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n border-radius: 8px;\n}\n.reasonText {\n margin: 0;\n overflow-wrap: anywhere;\n font-size: 12px;\n line-height: 18px;\n}\n.detailSection { display: flex; flex-direction: column; gap: 7px; }\n.detailHead {\n margin: 0;\n padding-bottom: 5px;\n color: var(--dsw-alias-label-secondary, #667085);\n border-bottom: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n font-size: 12px;\n font-weight: 600;\n}\n.config {\n max-height: 220px;\n overflow: auto;\n margin: 0;\n padding: 10px;\n color: var(--dsw-alias-label-primary, #344054);\n background: var(--dsw-alias-bg-layer-2, #f6f8fc);\n border: 1px solid var(--dsw-alias-border-l1, #e2e7ef);\n border-radius: 7px;\n white-space: pre-wrap;\n word-break: break-word;\n font: 11px/17px ui-monospace, Menlo, Consolas, monospace;\n}\n.toolList { display: flex; flex-direction: column; }\n/* Two columns: the name track sizes to its content (long MCP tool names are\n the identity, never clipped), the description takes the remainder. */\n.tool {\n display: grid;\n grid-template-columns: minmax(140px, max-content) minmax(0, 1fr);\n gap: 12px;\n align-items: center;\n padding: 7px 0;\n border-bottom: 1px solid var(--dsw-alias-border-l1, #eef1f5);\n}\n.tool:last-child { border-bottom: none; }\n.toolName { overflow: hidden; color: var(--dsw-alias-label-primary, #1f2328); text-overflow: ellipsis; white-space: nowrap; font: 11px/16px ui-monospace, Menlo, Consolas, monospace; }\n.toolDescription { overflow: hidden; color: var(--dsw-alias-label-tertiary, #8b93a1); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }\n@media (max-width: 760px) {\n .header, .toolbar { padding-left: 0; padding-right: 0; }\n .header { flex-direction: column; }\n .headerActions { width: 100%; margin-left: 0; justify-content: space-between; }\n .grid { grid-template-columns: minmax(0, 1fr); }\n .list .cardTop { max-width: 100%; }\n .tool { grid-template-columns: minmax(0, 1fr); }\n .toolDescription { display: none; }\n .summaryBar { gap: 6px; padding: 8px 10px; }\n .observedAt { flex-basis: 100%; margin-left: 0; }\n}\n\n/* ── LSP status states (reuse the MCP pill/accent palette) ──────────────── */\n.statemounted {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237));\n}\n.statehost-missing {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231));\n}\n.stateconflict {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n}\n.statusmounted {\n color: var(--dsw-alias-state-success-primary, #16a34a);\n}\n.statushost-missing {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n}\n.statusconflict {\n color: var(--dsw-alias-state-error-primary, #dc2626);\n}\n.chipmounted { background: var(--dsw-alias-state-success-tertiary, rgb(230, 250, 237)); }\n.chipblocked { background: var(--dsw-alias-state-warn-tertiary, rgb(254, 245, 231)); }\n\n/* Hide the entire summary bar when every row is healthy: the green\n \"all good\" confirmation repeated above a green-stamped list is noise. */\n@media (prefers-reduced-data: no-preference) {\n /* no-op block keeps the section marker above meaningful rules only */\n}\n\n/* Compact list mode: one-line rows (state · name · meta pill on the right). */\n.list .card {\n min-height: 0;\n padding: 2px 0;\n}\n.list .cardBody {\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 12px;\n padding: 8px 14px;\n}\n.list .cardTop {\n flex: 0 1 300px;\n min-width: 0;\n}\n.list .endpoint {\n flex: 1 1 240px;\n max-height: 22px;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n/* LSP extension-map rows: no index column — extension gets room to breathe. */\n.extRow {\n display: grid;\n grid-template-columns: minmax(64px, auto) 20px minmax(0, 1fr);\n gap: 10px;\n align-items: center;\n padding: 7px 0;\n border-bottom: 1px solid var(--dsw-alias-border-l1, #eef1f5);\n}\n.extRow:last-child { border-bottom: none; }\n.extName { color: var(--dsw-alias-label-primary, #1f2328); font: 12px/18px ui-monospace, Menlo, Consolas, monospace; }\n.extArrow { color: var(--dsw-alias-label-tertiary, #8b93a1); }\n.extLanguage { overflow: hidden; color: var(--dsw-alias-label-tertiary, #8b93a1); text-overflow: ellipsis; white-space: nowrap; font: 12px/18px ui-monospace, Menlo, Consolas, monospace; }\n\n/* ── Detail-dialog retry control: spinner + in-place outcome echo ────── */\n.retryStack {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n margin-right: 4px;\n}\n.retrySpinner {\n display: inline-flex;\n font-size: 13px;\n line-height: 1;\n}\n.spinning {\n animation: mcp-retry-spin 0.9s linear infinite;\n}\n@keyframes mcp-retry-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n@media (prefers-reduced-motion: reduce) {\n .spinning { animation: none; }\n}\n.retryEchoSuccess,\n.retryEchoFailure {\n font-size: 12px;\n line-height: 18px;\n white-space: nowrap;\n}\n.retryEchoSuccess { color: var(--dsw-alias-state-success-primary, #16a34a); }\n.retryEchoFailure { color: var(--dsw-alias-state-error-primary, #dc2626); }\n.statusstarting {\n color: var(--dsw-alias-state-warn-primary, #b45309);\n animation: lspStartingPulse 1.2s ease-in-out infinite;\n}\n@keyframes lspStartingPulse {\n 50% { opacity: 0.35; }\n}\n\n.statusforeign { background: var(--dsw-alias-brand-primary, #4f6ef7); }\n\n\n.reasonRaw {\n margin: 6px 0 0;\n color: var(--dsw-alias-label-tertiary, #8b93a1);\n font-size: 11px;\n line-height: 1.5;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n word-break: break-all;\n}\n","/**\n * Shared panel building-block styles (PanelShell, BusyIndicator, badges,\n * editors). Colors ride the dsh --dsw-alias-* tokens exclusively so dark\n * mode follows the active theme with no per-rule branches.\n */\n\n/* ---- PanelShell ------------------------------------------------------- */\n\n.shell {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 16px;\n color: var(--dsw-alias-label-primary, #1f2328);\n container-type: inline-size;\n}\n\n.header {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 12px;\n align-items: center;\n justify-content: space-between;\n min-height: 46px;\n}\n\n.headerText {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 2px;\n}\n\n.title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n}\n\n.subtitle {\n margin: 0;\n color: var(--dsw-alias-label-secondary);\n font-size: 13px;\n line-height: 20px;\n}\n\n.headerActions {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 6px;\n align-items: center;\n}\n\n/* The scroll region: every panel scrolls inside its own body, never the\n full settings column, so switching tabs cannot shift the layout. */\n.body {\n display: flex;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n gap: 12px;\n overflow-y: auto;\n scrollbar-gutter: stable;\n}\n\n/* ---- BusyIndicator ---------------------------------------------------- */\n\n.busyLine {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n color: var(--dsw-alias-label-secondary, #6b7280);\n font-size: 12px;\n}\n\n.busyLabel {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.spinner {\n display: inline-flex;\n flex: none;\n color: var(--dsw-alias-label-secondary, #6b7280);\n font-size: 13px;\n}\n\n.spinning {\n animation: panel-spin 0.9s linear infinite;\n}\n\n@keyframes panel-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinning {\n animation-duration: 2.4s;\n }\n}\n\n/* ---- SourceBadge ------------------------------------------------------ */\n\n.badgePlugin,\n.badgeUser {\n display: inline-flex;\n flex: none;\n align-items: center;\n padding: 1px 8px;\n border-radius: 4px;\n font-size: 11px;\n line-height: 16px;\n white-space: nowrap;\n max-width: 100%;\n min-width: 0;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.badgePlugin {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n.badgeUser {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n\n/* ---- EntryEditorModal / ConfirmModal ---------------------------------- */\n\n.editorDialog {\n max-width: 720px;\n}\n\n.editorBody {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.editorForm {\n display: flex;\n flex-direction: column;\n gap: 10px;\n min-width: 0;\n}\n\n.editorNameRow {\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: baseline;\n}\n\n.editorName {\n font-size: 13px;\n font-weight: 600;\n}\n\n.editorPath {\n overflow: hidden;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.editorHint {\n margin: 0;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-size: 11px;\n line-height: 16px;\n}\n\n.editorArea {\n width: 100%;\n padding: 8px 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 12px;\n line-height: 18px;\n resize: vertical;\n}\n\n.editorFooter {\n display: flex;\n flex: 1;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n justify-content: flex-end;\n}\n\n.editorError {\n margin-right: auto;\n color: var(--dsw-alias-state-error-primary, rgb(200, 30, 30));\n font-size: 12px;\n}\n\n.confirmCheck {\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n}\n\n/* ---- Shared rows / cards for list panels ------------------------------ */\n\n.entryList {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.entryRow {\n display: flex;\n flex-direction: row;\n gap: 10px;\n align-items: flex-start;\n padding: 10px 12px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-left: 3px solid var(--dsw-alias-border-l2);\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n}\n\n.entryRowDisabled {\n opacity: 0.72;\n}\n\n\n.entryMain {\n display: flex;\n min-width: 0;\n max-width: 100%;\n flex: 1;\n flex-direction: column;\n gap: 4px;\n}\n\n.entryHead {\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: baseline;\n}\n\n.entryName {\n overflow: hidden;\n font-size: 13px;\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.entryDesc {\n margin: 0;\n overflow-wrap: anywhere;\n display: -webkit-box;\n overflow: hidden;\n color: var(--dsw-alias-label-secondary, #6b7280);\n font-size: 12px;\n line-height: 18px;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n\n.entryPath {\n overflow: hidden;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 11px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.entryActions {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 2px;\n align-items: center;\n margin-left: auto;\n}\n\n.iconBtn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #6b7280);\n cursor: pointer;\n font-size: 13px;\n}\n\n.iconBtn:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.iconBtn:disabled {\n cursor: default;\n opacity: 0.4;\n}\n\n.iconBtnDanger:hover {\n background: var(--dsw-alias-interactive-bg-hover-danger, rgba(236, 19, 19, 0.05));\n color: var(--dsw-alias-state-error-primary, rgb(200, 30, 30));\n}\n\n.empty {\n padding: 24px 12px;\n color: var(--dsw-alias-label-tertiary, #6b7280);\n font-size: 12px;\n text-align: center;\n}\n\n.entryGrid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 12px;\n}\n\n.entryGrid .entryPath {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.entryGrid .entryRow {\n flex-direction: column;\n}\n\n.entryGrid .entryActions {\n align-self: flex-end;\n margin-top: auto;\n}\n\n.iconBtn:focus-visible,\n.entryName:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 2px;\n}\n\n@container (max-width: 540px) {\n .entryGrid { grid-template-columns: minmax(0, 1fr); }\n .entryRow { flex-wrap: wrap; }\n .entryActions { margin-left: auto; }\n .entryMain { flex-basis: 100%; }\n}\n\n.entryName {\n max-width: 100%;\n padding: 0;\n border: none;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.entryName:hover {\n text-decoration: underline;\n}\n\n.entryHead {\n flex-wrap: wrap;\n}\n\n.roleFields {\n display: grid;\n min-width: 0;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 10px;\n padding: 12px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 8px;\n}\n\n.roleFields legend {\n font-size: 13px;\n font-weight: 600;\n}\n\n.roleFields .editorHint,\n.roleFields .editorError {\n grid-column: 1 / -1;\n}\n\n.editorLabel {\n display: flex;\n min-width: 0;\n flex-direction: column;\n gap: 6px;\n font-size: 12px;\n}\n\n.editorInput {\n min-width: 0;\n padding: 8px 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-1, #fff);\n color: inherit;\n font: inherit;\n}\n\n@media (max-width: 480px) {\n .roleFields {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { createElement as h } from 'react'\nimport { Button, Input, IconRefreshOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { DetailModal } from './ui/DetailModal.js'\nimport { ServerConfigEditor } from './ui/ServerConfigEditor.js'\nimport { ServerConfigDetail } from './ui/ServerConfigDetail.js'\nimport { parseServerConfig } from './ui/server-form.js'\nimport { PanelActions, PanelHeader } from './ui/panel.js'\nimport { mcpDetailActions } from './features/mcp-status/detail-actions.js'\nimport type { Translate } from './index.js'\nimport { addMcpServer, fetchMcpStatus, reauthorizeMcpServer, retryMcpMounts, type McpStatusEntry, type McpStatusPayload } from './api.js'\nimport type { CredentialApi } from './credentials.js'\nimport { McpCredentialEditor } from './McpCredentialEditor.js'\nimport { SearchFilterToolbar } from './SearchFilterToolbar.js'\nimport { ResourceCard, ResourceCollection } from './ui/ResourceCard.js'\nimport { useWorkspaceView } from './ui/workspace-view.js'\nimport { deriveMcpStatusViewModel, type McpStatusFilter } from './features/mcp-status/mcp-status-view-model.js'\nimport css from './mcp-status.module.css'\nimport { withBusyOperation } from './ui/busy-operation.js'\n\ninterface McpStatusPanelProps {\n t: Translate\n credentials?: CredentialApi\n}\n\ntype Filter = McpStatusFilter\n\nconst EMPTY_STATUS: McpStatusPayload = {\n entries: [],\n observedAt: '',\n totals: { all: 0, connected: 0, degraded: 0, failed: 0, needsCredentials: 0, orphaned: 0, disabled: 0, foreign: 0 },\n directObservationOnly: true\n}\n\n/** DSH-native MCP inventory with a per-state overview and per-service detail. */\nexport function McpStatusPanel({ t, credentials }: McpStatusPanelProps): ReactNode {\n const [payload, setPayload] = useState<McpStatusPayload>(EMPTY_STATUS)\n const [loading, setLoading] = useState(true)\n const [error, setError] = useState<string | undefined>(undefined)\n const [filter, setFilter] = useState<Filter>('all')\n const [search, setSearch] = useState('')\n const [view, setView] = useWorkspaceView()\n const [selected, setSelected] = useState<McpStatusEntry | undefined>(undefined)\n const [adding, setAdding] = useState(false)\n\n const observe = async (id: string): Promise<McpStatusEntry> => {\n const refreshed = await fetchMcpStatus()\n setPayload(refreshed)\n const current = refreshed.entries.find(item => item.id === id)\n if (!current) throw new Error(t('mcpEntryGone'))\n setSelected(current)\n return current\n }\n const retry = (id: string): Promise<McpStatusEntry> =>\n withBusyOperation(async () => {\n await retryMcpMounts()\n return observe(id)\n })\n const reauthorize = (id: string, serverName: string): Promise<McpStatusEntry> =>\n withBusyOperation(async () => {\n await reauthorizeMcpServer(serverName)\n return observe(id)\n })\n\n const refresh = (): void => {\n setLoading(true)\n setError(undefined)\n fetchMcpStatus()\n .then(setPayload)\n .catch(caught => {\n setError(caught instanceof Error ? caught.message : String(caught))\n })\n .finally(() => setLoading(false))\n }\n\n useEffect(() => {\n refresh()\n }, [])\n\n const viewModel = deriveMcpStatusViewModel(payload, filter, search)\n const { activeEntries, filtered, filterCounts } = viewModel\n // Hide the summary bar entirely while every active row is connected: the\n // green confirmation above an all-green list is noise, not information.\n\n return h(\n 'div',\n { className: css.surface },\n h(PanelHeader, {\n title: t('mcpStatusTitle'),\n subtitle: t('mcpStatusSubtitle'),\n actions: h(PanelActions, { addLabel: t('panelAdd'), onAdd: () => setAdding(true), refreshLabel: t('refresh'), onRefresh: refresh, busy: loading })\n }),\n h(SearchFilterToolbar, {\n className: css.toolbar,\n search,\n searchLabel: t('mcpSearch'),\n searchPlaceholder: t('mcpSearch'),\n onSearchChange: setSearch,\n filters: (['all', 'plugin', 'direct'] as Filter[]).map(kind => ({\n id: kind,\n label: filterLabel(t, kind),\n count: filterCounts[kind],\n icon: h(McpFilterIcon, { kind }),\n active: filter === kind,\n onSelect: () => setFilter(kind),\n hint: mcpFilterHint(t, kind)\n })),\n view,\n gridLabel: t('grid'),\n listLabel: t('list'),\n onViewChange: nextView => setView(nextView)\n }),\n error !== undefined\n ? h('div', { className: css.error }, error, h(Button, { variant: 'ghost', size: 'sm', onClick: refresh }, t('mcpRetry')))\n : loading && activeEntries.length === 0\n ? h('div', { className: css.empty }, t('loading'))\n : filtered.length === 0\n ? h('div', { className: css.empty }, t('mcpEmpty'))\n : h(\n ResourceCollection,\n { view, className: view === 'grid' ? css.grid : css.list },\n filtered.map(entry => h(McpCard, { key: entry.id, entry, t, onClick: () => setSelected(entry) }))\n ),\n adding\n ? h(McpAddModal, {\n t,\n onClose: () => setAdding(false),\n onSaved: () => {\n setAdding(false)\n refresh()\n }\n })\n : null,\n selected === undefined\n ? null\n : h(McpDetailModal, {\n entry: selected,\n t,\n credentials,\n onClose: () => {\n setSelected(undefined)\n refresh()\n },\n onRetry: retry,\n onReauthorize: reauthorize,\n onRefresh: observe\n })\n )\n}\n\n/**\n * One chip per non-healthy state, shown only when that state is non-zero.\n *\n * The chips are ordered by severity so the first one the eye lands on is the\n * state that most needs attention, and the whole bar collapses to a single\n * \"all connected\" confirmation when nothing is wrong.\n */\nfunction McpCard({ entry, t, onClick }: { entry: McpStatusEntry; t: Translate; onClick: () => void }): ReactNode {\n const interactive = {\n role: 'button' as const,\n tabIndex: 0,\n onClick,\n onKeyDown: (event: { key: string; preventDefault: () => void }) => {\n // Enter and Space activate a role=\"button\" the same way a native one does.\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n onClick()\n }\n }\n return h(\n ResourceCard,\n {\n className: css.card,\n state: entry.state === 'connected' ? 'active' : entry.state === 'disabled' ? 'disabled' : entry.state === 'failed' || entry.state === 'orphaned' ? 'error' : 'warning',\n ...interactive\n },\n h(\n 'div',\n { className: css.cardBody },\n h(\n 'div',\n { className: css.cardTop },\n h('span', { className: `${css.statusDot} ${css[`status${entry.state}`]}`, 'aria-hidden': true }),\n h('span', { className: css.service }, h('span', { className: css.name }, entry.name)),\n h('span', { className: css.toolCount }, entry.tools.length === 1 ? `${entry.tools.length} ${t('mcpTool')}` : `${entry.tools.length} ${t('mcpTools')}`)\n ),\n h('p', { className: css.endpoint }, entry.endpoint ?? t('mcpObservedEndpoint'))\n // Reason text, the state pill, and every action (retry, configure,\n // details) live in the detail dialog: the card keeps only the identity\n // line and the endpoint, so a wall of red cards stays scannable.\n )\n )\n}\n\nfunction McpSourceIcon({ kind }: { kind: 'plugin' | 'direct' }): ReactNode {\n const common = { width: 14, height: 14, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n return kind === 'plugin'\n ? h(\n 'svg',\n common,\n h('path', {\n d: 'M6 2.5v2H4A1.5 1.5 0 0 0 2.5 6v2h2a1.5 1.5 0 1 1 0 3h-2v2A1.5 1.5 0 0 0 4 14.5h2v-2a1.5 1.5 0 1 1 3 0v2h2a1.5 1.5 0 0 0 1.5-1.5v-2h-2a1.5 1.5 0 1 1 0-3h2V6A1.5 1.5 0 0 0 11 4.5H9v-2a1.5 1.5 0 1 0-3 0Z'\n })\n )\n : h('svg', common, h('circle', { cx: 8, cy: 5, r: 2.2 }), h('path', { d: 'M3.5 13c.6-2.2 2.1-3.3 4.5-3.3s3.9 1.1 4.5 3.3' }))\n}\n\nfunction McpFilterIcon({ kind }: { kind: Filter }): ReactNode {\n if (kind === 'plugin') return h(McpSourceIcon, { kind: 'plugin' })\n if (kind === 'direct') return h(McpSourceIcon, { kind: 'direct' })\n return h(\n 'svg',\n { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true },\n h('path', { d: 'M2.5 5 8 2.5 13.5 5 8 7.5 2.5 5Zm0 3L8 10.5 13.5 8M2.5 11 8 13.5 13.5 11' })\n )\n}\n\n/**\n * The detail dialog owns every action and every long text: state, reason,\n * credentials, config, tools, and the retry control with its in-place result\n * echo. The state pill is dropped entirely — the dot and the reason box carry\n * that information without a second red stamp.\n */\nexport function McpDetailModal({\n entry,\n t,\n credentials,\n onClose,\n onRetry,\n onReauthorize,\n onRefresh\n}: {\n entry: McpStatusEntry\n t: Translate\n credentials?: CredentialApi\n onClose: () => void\n onRetry: (entryId: string) => Promise<McpStatusEntry>\n onReauthorize: (id: string, serverName: string) => Promise<McpStatusEntry>\n onRefresh: (id: string) => Promise<McpStatusEntry>\n}): ReactNode {\n const [pending, setPending] = useState(false)\n const [dirty, setDirty] = useState(false)\n const [confirmAuth, setConfirmAuth] = useState(false)\n const [feedback, setFeedback] = useState<{ error: boolean; text: string }>()\n const actions = mcpDetailActions(entry)\n const run = async (authorize: boolean): Promise<void> => {\n setConfirmAuth(false)\n setPending(true)\n setFeedback(undefined)\n try {\n const current = authorize ? await onReauthorize(entry.id, entry.name) : await onRetry(entry.id)\n const connected = current.state === 'connected'\n setFeedback({ error: !connected, text: connected ? t('mcpRetrySuccess') : t('mcpStillUnavailable') + (current.reason ? ': ' + current.reason : '') })\n } catch (reason) {\n setFeedback({ error: true, text: t('actionFail') + ': ' + (reason instanceof Error ? reason.message : String(reason)) })\n } finally {\n setPending(false)\n }\n }\n return h(DetailModal, {\n open: true,\n onClose: () => {\n if (!pending) onClose()\n },\n title: entry.name,\n description: t('mcpServiceDetail'),\n closeLabel: t('mcpClose'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h(\n 'div',\n { className: css.modalFooter },\n actions.retry\n ? h(\n Button,\n {\n variant: 'ghost',\n size: 'sm',\n disabled: pending || dirty,\n title: dirty ? t('mcpSaveFirst') : t('mcpRetryPreservesCredentials'),\n onClick: () => {\n void run(false)\n }\n },\n h(IconRefreshOutline16),\n t('mcpRetryConnection')\n )\n : null,\n actions.reauthorize\n ? h(\n Button,\n {\n variant: 'ghost',\n size: 'sm',\n disabled: pending || dirty,\n title: dirty ? t('mcpSaveFirst') : t('mcpReauthExplain'),\n onClick: () => {\n setConfirmAuth(true)\n setFeedback(undefined)\n }\n },\n t('mcpReauthorize')\n )\n : null,\n h(Button, { variant: 'ghost', disabled: pending, onClick: onClose }, t('mcpClose'))\n ),\n children: h(\n 'div',\n { className: css.detail },\n feedback ? h('p', { role: feedback.error ? 'alert' : 'status', className: feedback.error ? css.error : css.retryEchoSuccess }, feedback.text) : null,\n confirmAuth\n ? h(\n 'section',\n { className: css.reasonBox, role: 'alert' },\n h('p', null, t('mcpReauthExplain')),\n h(Button, { variant: 'ghost', onClick: () => setConfirmAuth(false) }, t('cancel')),\n h(\n Button,\n {\n variant: 'primary',\n disabled: dirty || pending,\n onClick: () => {\n void run(true)\n }\n },\n t('mcpConfirmReauth')\n )\n )\n : null,\n dirty && (actions.retry || actions.reauthorize) ? h('p', { className: css.reasonText }, t('mcpSaveFirst')) : null,\n entry.state === 'needs-credentials' ? h('p', { className: css.reasonText }, t('mcpConfigureCredentialsFirst')) : null,\n h(\n 'div',\n { className: css.detailHero },\n h('span', { className: `${css.statusDot} ${css[`status${entry.state}`]}`, 'aria-hidden': true }),\n h(\n 'div',\n { className: css.detailHeroText },\n entry.endpoint === undefined ? null : h('p', { className: css.detailEndpoint }, entry.endpoint),\n // Source and transport moved here from the card meta row. The\n // qualified suite id disambiguates same-named servers from\n // different sources (e.g. two context7 installs).\n h(\n 'p',\n { className: css.detailEndpoint },\n [entry.kind === 'plugin' ? `${t('mcpPlugin')}: ${entry.suiteId ?? entry.source ?? '—'}` : t('mcpDirect'), entry.transport].join(' · ')\n )\n )\n ),\n // A foreign mount is informational: the localized hint (per cause —\n // another plugin, or another source's identical suite) replaces the raw\n // English reason, which drops to a dim secondary line for its details.\n entry.state === 'foreign'\n ? h(\n 'div',\n { className: css.reasonBox },\n h('span', { className: css.reasonLabel }, t('mcpReasonLabel')),\n h('p', { className: css.reasonText }, entry.code === 'duplicate-mount' ? t('mcpDuplicateHint') : t('mcpForeignHint')),\n entry.reason === undefined ? null : h('p', { className: css.reasonRaw }, entry.reason)\n )\n : entry.reason === undefined\n ? null\n : h('div', { className: css.reasonBox }, h('span', { className: css.reasonLabel }, t('mcpReasonLabel')), h('p', { className: css.reasonText }, entry.reason)),\n entry.kind === 'direct' && !entry.managed ? h('div', { className: css.reasonBox }, h('p', { className: css.reasonText }, t('mcpDirectBoundary'))) : null,\n entry.credentialRefs?.length === 0 || entry.credentialRefs === undefined ? null : h(McpCredentialEditor, { t, api: credentials, refs: entry.credentialRefs }),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, t('mcpConfig')),\n h(ServerConfigDetail, {\n kind: 'mcp',\n id: entry.id,\n t,\n onDirtyChange: setDirty,\n onSaved: () => {\n void onRefresh(entry.id).catch(reason => setFeedback({ error: true, text: t('mcpSavedStatusUnknown') + ': ' + String(reason) }))\n }\n })\n ),\n h(\n 'section',\n { className: css.detailSection },\n h('h4', { className: css.detailHead }, `${t('mcpTools')} (${entry.tools.length})`),\n entry.tools.length === 0\n ? h('div', { className: css.detailEmpty }, entry.advertisedTools === false && entry.state === 'degraded' ? t('mcpZeroTools') : t('mcpNoTools'))\n : h(\n 'div',\n { className: css.toolList },\n entry.tools.map(tool =>\n h(\n 'div',\n { key: tool.name, className: css.tool },\n h('span', { className: css.toolName }, tool.name),\n tool.description === undefined || tool.description === '' ? null : h('span', { className: css.toolDescription }, tool.description)\n )\n )\n )\n )\n )\n })\n}\n\nfunction McpAddModal({ t, onClose, onSaved }: { t: Translate; onClose: () => void; onSaved: () => void }): ReactNode {\n const [name, setName] = useState('')\n const [config, setConfig] = useState('{\"type\":\"stdio\",\"command\":\"\"}')\n const [valid, setValid] = useState(false)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string>()\n const save = (): void => {\n setBusy(true)\n setError(undefined)\n void Promise.resolve()\n .then(() => addMcpServer(name.trim(), parseServerConfig(config)))\n .then(onSaved)\n .catch(caught => setError(caught instanceof Error ? caught.message : String(caught)))\n .finally(() => setBusy(false))\n }\n return h(DetailModal, {\n open: true,\n title: t('mcpAddTitle'),\n onClose: busy ? () => {} : onClose,\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h(Button, { variant: 'ghost', disabled: busy, onClick: onClose }, t('cancel')),\n h(Button, { disabled: busy || name.trim() === '' || !valid, onClick: save }, t('save'))\n ),\n children: h(\n 'div',\n { className: css.detail },\n h(\n 'label',\n null,\n t('mcpServerName'),\n h(Input, {\n value: name,\n placeholder: t('mcpServerName'),\n 'aria-label': t('mcpServerName'),\n disabled: busy,\n onChange: (event: { target: { value: string } }) => setName(event.target.value)\n })\n ),\n h(ServerConfigEditor, { kind: 'mcp', text: config, onChange: setConfig, t, disabled: busy, onValidityChange: setValid }),\n error === undefined ? null : h('div', { role: 'alert', className: css.error }, error)\n )\n })\n}\n\nfunction filterLabel(t: Translate, kind: Filter): string {\n if (kind === 'plugin') return t('mcpPlugin')\n if (kind === 'direct') return t('mcpDirect')\n return t('mcpAll')\n}\n\n/** Hover/aria explanation for each MCP filter tab. */\nfunction mcpFilterHint(t: Translate, kind: Filter): string {\n if (kind === 'plugin') return t('mcpFilterPluginHint')\n if (kind === 'direct') return t('mcpFilterDirectHint')\n return t('mcpFilterAllHint')\n}\n","/**\n * LSP status panel: declared language servers of enabled suites with their\n * mount state. Rows come from the declaration-and-diagnostic model — the DSH\n * `ctx.lsp` seam has no provider snapshot, so \"mounted\" means the mount\n * registration succeeded, not that a process probe ran.\n *\n * Visual language mirrors McpStatusPanel: the same shared SearchFilterToolbar,\n * the same summary chips, cards, and state pills from mcp-status.module.css.\n * Cards stay lean (state dot + name + command + one state pill); the source\n * suite and the full extension map live in the detail dialog.\n */\nimport { useEffect, useState, type ReactNode } from 'react'\nimport { createElement as h } from 'react'\nimport { Button, Input } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { DetailModal } from './ui/DetailModal.js'\nimport { ServerConfigEditor } from './ui/ServerConfigEditor.js'\nimport { ServerConfigDetail } from './ui/ServerConfigDetail.js'\nimport { parseServerConfig } from './ui/server-form.js'\nimport { PanelHeader, PanelActions } from './ui/panel.js'\nimport type { Translate } from './index.js'\nimport { addLspServer, fetchLspStatus, type LspStatusEntry, type LspStatusPayload, type LspStatusState } from './api.js'\nimport { SearchFilterToolbar } from './SearchFilterToolbar.js'\nimport { ResourceCard, ResourceCollection } from './ui/ResourceCard.js'\nimport { useWorkspaceView } from './ui/workspace-view.js'\nimport css from './mcp-status.module.css'\n\ninterface LspStatusPanelProps {\n t: Translate\n}\n\nconst EMPTY_STATUS: LspStatusPayload = {\n entries: [],\n observedAt: '',\n totals: { all: 0, mounted: 0, failed: 0, blocked: 0, disabled: 0 },\n hostMissing: true\n}\n\ntype Filter = 'all' | 'plugin' | 'direct'\n\nconst FILTER_KEYS: Filter[] = ['all', 'plugin', 'direct']\n\nconst FILTER_LABEL_KEYS: Record<Filter, 'lspAll' | 'lspPlugin' | 'lspDirect'> = {\n all: 'lspAll',\n plugin: 'lspPlugin',\n direct: 'lspDirect',\n}\n\n/** Tooltip text per filter: the counts alone do not explain the grouping. */\nconst FILTER_HINT_KEYS: Partial<Record<Filter, 'lspFilterAllHint' | 'lspFilterPluginHint' | 'lspFilterDirectHint'>> = {\n all: 'lspFilterAllHint',\n plugin: 'lspFilterPluginHint',\n direct: 'lspFilterDirectHint',\n}\nfunction matches(entry: LspStatusEntry, filter: Filter): boolean {\n if (filter === 'all') return true\n if (filter === 'plugin' || filter === 'direct') return entry.kind === filter\n return false\n}\n\nfunction severity(entry: LspStatusEntry): number {\n if (entry.state === 'failed') return 0\n if (entry.state === 'conflict') return 1\n if (entry.state === 'host-missing') return 2\n if (entry.state === 'starting') return 3\n if (entry.state === 'disabled') return 4\n return 5\n}\n\n/** Language-server inventory with per-state overview and per-server detail. */\nexport function LspStatusPanel({ t }: LspStatusPanelProps): ReactNode {\n const [payload, setPayload] = useState<LspStatusPayload>(EMPTY_STATUS)\n const [loading, setLoading] = useState(true)\n const [error, setError] = useState<string | undefined>(undefined)\n const [filter, setFilter] = useState<Filter>('all')\n const [search, setSearch] = useState('')\n const [view, setView] = useWorkspaceView()\n const [selected, setSelected] = useState<LspStatusEntry | undefined>(undefined)\n const [editorOpen, setEditorOpen] = useState(false)\n\n const refresh = (): void => {\n setLoading(true)\n setError(undefined)\n fetchLspStatus()\n .then(setPayload)\n .catch(caught => {\n setError(caught instanceof Error ? caught.message : String(caught))\n })\n .finally(() => setLoading(false))\n }\n\n useEffect(() => {\n refresh()\n }, [])\n\n // Startup follows a race: the reconciler mounts LSP servers in the host\n // process after discovery, so an early read can observe `starting` rows.\n // Poll quietly until every row settles (or the window closes) instead of\n // freezing a stale verdict on screen.\n const anyStarting = payload.entries.some(entry => entry.state === 'starting')\n useEffect(() => {\n if (!anyStarting) return\n let cancelled = false\n let attempts = 0\n const timer = setInterval(() => {\n attempts += 1\n if (cancelled || attempts > 20) {\n clearInterval(timer)\n return\n }\n fetchLspStatus(true)\n .then(value => {\n if (!cancelled) setPayload(value)\n })\n .catch(() => {})\n }, 1_000)\n return () => {\n cancelled = true\n clearInterval(timer)\n }\n }, [anyStarting])\n\n const needle = search.trim().toLowerCase()\n const counts = FILTER_KEYS.reduce<Record<string, number>>((acc, key) => {\n acc[key] = payload.entries.filter(entry => matches(entry, key)).length\n return acc\n }, {})\n const visible = payload.entries\n .filter(entry => matches(entry, filter))\n .filter(entry => needle === '' || `${entry.serverKey} ${entry.suiteName} ${entry.command}`.toLowerCase().includes(needle))\n\n return h(\n 'div',\n { className: css.surface },\n h(PanelHeader, { title: t('lspStatusTitle'), subtitle: t('lspStatusSubtitle'), actions: h(PanelActions, { addLabel: t('panelAdd'), onAdd: () => setEditorOpen(true), refreshLabel: t('refresh'), onRefresh: refresh, busy: loading }) }),\n h(SearchFilterToolbar, {\n className: css.toolbar,\n search,\n searchLabel: t('lspSearch'),\n searchPlaceholder: t('lspSearch'),\n onSearchChange: setSearch,\n filters: FILTER_KEYS.map(key => ({\n id: key,\n label: t(FILTER_LABEL_KEYS[key]),\n count: counts[key] ?? 0,\n icon: h(LspFilterIcon, { k: key }),\n active: filter === key,\n onSelect: () => setFilter(key),\n hint: FILTER_HINT_KEYS[key] === undefined ? undefined : t(FILTER_HINT_KEYS[key]!)\n })),\n view,\n gridLabel: t('grid'),\n listLabel: t('list'),\n onViewChange: nextView => setView(nextView)\n }),\n error !== undefined\n ? h('div', { className: css.error }, error, h(Button, { variant: 'ghost', size: 'sm', onClick: refresh }, t('mcpRetry')))\n : loading && payload.entries.length === 0\n ? h('div', { className: css.empty }, t('loading'))\n : visible.length === 0\n ? h('div', { className: css.empty }, t('lspEmpty'))\n : h(\n ResourceCollection,\n { view, className: view === 'grid' ? css.grid : css.list },\n [...visible].sort((left, right) => severity(left) - severity(right)).map(entry => h(LspRow, { key: entry.id, entry, t, onOpen: () => setSelected(entry) }))\n ),\n selected === undefined ? null : h(LspDetailModal, { entry: selected, t, onClose: () => { setSelected(undefined); refresh() } }),\n editorOpen\n ? h(LspConfigEditor, {\n t,\n onClose: () => setEditorOpen(false),\n onSaved: () => {\n setEditorOpen(false)\n refresh()\n }\n })\n : null\n )\n}\n\n/**\n * Direct LSP configuration editor: one JSON document shaped like Claude\n * Code's `lspServers` table. The host validates with the same fail-closed\n * rules as suite declarations and mounts direct servers on the next\n * reconcile pass.\n */\nfunction LspConfigEditor({ t, onClose, onSaved }: { t: Translate; onClose: () => void; onSaved: () => void }): ReactNode {\n const [text, setText] = useState('{\"command\":\"\",\"extensionToLanguage\":{}}')\n const [name, setName] = useState('')\n const [valid, setValid] = useState(false)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string | undefined>(undefined)\n\n const save = async (): Promise<void> => {\n setBusy(true)\n setError(undefined)\n try {\n await addLspServer(name.trim(), parseServerConfig(text))\n onSaved()\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n setBusy(false)\n }\n }\n\n return h(DetailModal, {\n open: true,\n onClose: busy ? () => {} : onClose,\n title: t('lspAddTitle'),\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h(\n 'div',\n { className: css.modalFooter },\n h(Button, { variant: 'ghost', disabled: busy, onClick: onClose }, t('cancel')),\n h(Button, { variant: 'primary', disabled: busy || !valid || name.trim() === '', onClick: () => { void save() } }, t('lspSave'))\n ),\n children: h(\n 'div',\n { className: css.detail },\n error === undefined ? null : h('div', { className: css.error }, error),\n h('label', null, t('lspServerName'), h(Input, { value: name, disabled: busy, 'aria-label': t('lspServerName'), onChange: (event: { target: { value: string } }) => setName(event.target.value) })),\n h(ServerConfigEditor, { kind: 'lsp', text, onChange: setText, t, disabled: busy, onValidityChange: setValid })\n )\n })\n}\n\n/** Lean row: state dot, server key, command. The card accent + status dot\n * carry the state; no redundant pill for the healthy case. Kind badge shows\n * where the declaration comes from (suite vs user configuration). */\nfunction LspRow({ entry, t, onOpen }: { entry: LspStatusEntry; t: Translate; onOpen: () => void }): ReactNode {\n const interactive = {\n role: 'button' as const,\n tabIndex: 0,\n onClick: onOpen,\n onKeyDown: (event: { key: string; preventDefault: () => void }) => {\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n onOpen()\n }\n }\n const showPill = entry.state !== 'mounted'\n return h(\n ResourceCard,\n { className: css.card, state: entry.state === 'mounted' ? 'active' : entry.state === 'disabled' ? 'disabled' : entry.state === 'failed' || entry.state === 'conflict' ? 'error' : 'warning', ...interactive },\n h(\n 'div',\n { className: css.cardBody },\n h(\n 'div',\n { className: css.cardTop },\n h('span', { className: `${css.statusDot} ${css[`status${dotClass(entry.state)}`]}`, 'aria-hidden': true }),\n h('span', { className: css.service }, h('span', { className: css.name }, entry.serverKey)),\n entry.kind === 'plugin'\n ? h('span', { className: css.sourcePlugin }, entry.suiteName)\n : h('span', { className: css.sourceDirect }, t('lspDirect')),\n showPill ? h('span', { className: `${css.statePill} ${css[`state${pillClass(entry.state)}`]}` }, stateLabel(t, entry.state)) : null\n ),\n h('p', { className: css.endpoint }, [entry.command, ...entry.args].join(' ')),\n )\n )\n}\n\nfunction LspDetailModal({ entry, t, onClose }: { entry: LspStatusEntry; t: Translate; onClose: () => void }): ReactNode {\n return h(DetailModal, {\n open: true,\n onClose,\n title: entry.serverKey,\n description: t('lspDetailSubtitle'),\n closeLabel: t('cancel'),\n className: css.detailDialog,\n contentClassName: css.detailBody,\n footer: h('div', { className: css.modalFooter }, h(Button, { variant: 'ghost', onClick: onClose }, t('cancel'))),\n children: h(\n 'div',\n { className: css.detail },\n h(\n 'div',\n { className: css.detailHero },\n h('span', { className: `${css.statusDot} ${css[`status${dotClass(entry.state)}`]}`, 'aria-hidden': true }),\n h(\n 'div',\n { className: css.detailHeroText },\n // The status dot carries the healthy verdict; only non-healthy\n // states get an explicit pill.\n entry.state === 'mounted' ? null : h('span', { className: `${css.statePill} ${css[`state${pillClass(entry.state)}`]}` }, stateLabel(t, entry.state)),\n h('p', { className: css.detailEndpoint }, `${entry.suiteName} · ${entry.sourceId}`)\n )\n ),\n entry.reason === undefined\n ? null\n : h(\n 'div',\n { className: css.reasonBox },\n h('span', { className: css.reasonLabel }, t('lspReasonLabel')),\n h('p', { className: css.reasonText }, entry.reason)\n ),\n h(ServerConfigDetail, { kind: 'lsp', id: entry.id, t })\n )\n })\n}\n\n/** Filter icons mirroring McpFilterIcon's language: shared glyph shapes for\n * all/plugin/direct so the two panels read as one system, plus a warning\n * triangle for the blocked state. */\nfunction LspFilterIcon({ k }: { k: string }): ReactNode {\n const common = { width: 16, height: 16, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true } as const\n if (k === 'plugin') {\n return h('svg', common, h('path', { d: 'M6 2.5v2H4A1.5 1.5 0 0 0 2.5 6v2h2a1.5 1.5 0 1 1 0 3h-2v2A1.5 1.5 0 0 0 4 14.5h2v-2a1.5 1.5 0 1 1 3 0v2h2a1.5 1.5 0 0 0 1.5-1.5v-2h-2a1.5 1.5 0 1 1 0-3h2V6A1.5 1.5 0 0 0 11 4.5H9v-2a1.5 1.5 0 1 0-3 0Z' }))\n }\n if (k === 'direct') {\n return h('svg', common, h('circle', { cx: 8, cy: 5, r: 2.2 }), h('path', { d: 'M3.5 13c.6-2.2 2.1-3.3 4.5-3.3s3.9 1.1 4.5 3.3' }))\n }\n if (k === 'blocked') {\n return h('svg', common, h('path', { d: 'M8 2.5 14 13H2L8 2.5Z', stroke: 'currentColor', strokeLinejoin: 'round' }), h('path', { d: 'M8 6.5v3M8 11.2v.3', stroke: 'currentColor', strokeLinecap: 'round' }))\n }\n return h('svg', common, h('path', { d: 'M2.5 5 8 2.5 13.5 5 8 7.5 2.5 5Zm0 3L8 10.5 13.5 8M2.5 11 8 13.5 13.5 11' }))\n}\n\n/** The status-dot CSS suffix (lowercase state names in the stylesheet). */\nfunction dotClass(state: LspStatusState): string {\n return state === 'host-missing' ? 'host-missing' : state\n}\n\n/** The state-pill CSS suffix; conflict borrows the failed palette and\n * starting borrows the warn palette. */\nfunction pillClass(state: LspStatusState): string {\n if (state === 'conflict') return 'failed'\n if (state === 'starting') return 'host-missing'\n return state\n}\n\nfunction stateLabel(t: Translate, state: LspStatusState): string {\n if (state === 'mounted') return t('lspMounted')\n if (state === 'starting') return t('lspStarting')\n if (state === 'host-missing') return t('lspHostMissingShort')\n if (state === 'failed') return t('lspFailed')\n if (state === 'conflict') return t('lspConflict')\n return t('lspDisabled')\n}\n","import { createElement as h, useEffect, useState, type ReactNode } from 'react'\nimport type { Translate } from '../../index.js'\nimport { fetchModelCatalog } from '../../api.js'\nimport type { ModelCatalogPayload } from '../../../contracts/market.js'\nimport css from '../../ui/panel.module.css'\nimport { readRoleFields, updateFrontmatter, updateRoleReasoning } from './frontmatter.js'\n\n/** Structured controls edit the same frontmatter as the raw Markdown editor. */\nexport function RoleMetadataFields(props: { text: string; onChange: (text: string) => void; t: Translate; disabled?: boolean }): ReactNode {\n let fields: ReturnType<typeof readRoleFields>\n try {\n fields = readRoleFields(props.text)\n } catch (error) {\n return h('p', { className: css.editorError, role: 'alert' }, props.t('personaMetadataInvalid'), ' ', String(error instanceof Error ? error.message : error))\n }\n return h(RoleFields, { ...props, fields })\n}\n\nfunction RoleFields(props: { text: string; onChange: (text: string) => void; t: Translate; disabled?: boolean; fields: ReturnType<typeof readRoleFields> }): ReactNode {\n const { fields, t } = props\n const [providers, setProviders] = useState<ModelCatalogPayload['providers']>([])\n const [models, setModels] = useState<ModelCatalogPayload['models']>([])\n const [loading, setLoading] = useState(true)\n const [providerError, setProviderError] = useState(false)\n const [modelError, setModelError] = useState(false)\n const [revision, setRevision] = useState(0)\n const [reasoning, setReasoning] = useState<{ route: string; value: ModelCatalogPayload['reasoning'] }>()\n const [effortError, setEffortError] = useState<string>()\n const qualified = providers.filter(entry => fields.model.startsWith(`${entry.id}/`)).sort((a, b) => b.id.length - a.id.length)[0]\n const provider = fields.provider || qualified?.id || ''\n const model = !fields.provider && qualified ? fields.model.slice(qualified.id.length + 1) : fields.model === 'inherit' ? '' : fields.model\n const route = JSON.stringify([provider, model])\n const hasRoute = provider !== '' && model !== ''\n const effortLoading = hasRoute && reasoning?.route !== route && effortError !== route\n const efforts = reasoning?.route === route ? reasoning.value?.efforts ?? [] : []\n\n useEffect(() => {\n const controller = new AbortController()\n setProviderError(false)\n void fetchModelCatalog(undefined, controller.signal).then(data => {\n if (!controller.signal.aborted) setProviders(data.providers)\n }).catch(() => { if (!controller.signal.aborted) setProviderError(true) })\n return () => controller.abort()\n }, [revision])\n\n useEffect(() => {\n const controller = new AbortController()\n setModels([])\n setModelError(false)\n if (provider === '') { setLoading(false); return () => controller.abort() }\n setLoading(true)\n void fetchModelCatalog(provider, controller.signal).then(data => {\n if (!controller.signal.aborted) setModels(data.models)\n }).catch(() => { if (!controller.signal.aborted) setModelError(true) })\n .finally(() => { if (!controller.signal.aborted) setLoading(false) })\n return () => controller.abort()\n }, [provider, revision])\n\n useEffect(() => {\n const controller = new AbortController()\n setReasoning(undefined)\n setEffortError(undefined)\n if (!hasRoute) return () => controller.abort()\n void fetchModelCatalog(provider, controller.signal, model).then(data => {\n if (!controller.signal.aborted) setReasoning({ route, value: data.reasoning })\n }).catch(() => { if (!controller.signal.aborted) setEffortError(route) })\n return () => controller.abort()\n }, [provider, model, route, hasRoute, revision])\n\n const selectProvider = (value: string): void => {\n const next = updateFrontmatter(props.text, 'provider', value)\n props.onChange(updateRoleReasoning(updateFrontmatter(next, 'model', value === '' ? 'inherit' : ''), ''))\n }\n return h(\n 'fieldset',\n { className: css.roleFields, disabled: props.disabled },\n h('legend', null, props.t('personaRuntimeConfig')),\n h('label', { className: css.editorLabel }, t('personaProvider'),\n h('select', { className: css.editorInput, 'aria-label': t('personaProvider'), value: provider, onChange: (event: { target: HTMLSelectElement }) => selectProvider(event.target.value) },\n h('option', { value: '' }, t('personaInherit')),\n provider !== '' && !providers.some(entry => entry.id === provider) ? h('option', { value: provider }, `${provider} (${t('personaUnavailable')})`) : null,\n providers.map(entry => h('option', { key: entry.id, value: entry.id }, entry.name))\n )\n ),\n h('label', { className: css.editorLabel }, t('personaModel'),\n h('select', { className: css.editorInput, 'aria-label': t('personaModel'), value: model, disabled: provider === '' || loading, onChange: (event: { target: HTMLSelectElement }) => props.onChange(updateRoleReasoning(updateFrontmatter(updateFrontmatter(props.text, 'provider', provider), 'model', event.target.value), '')) },\n h('option', { value: '', disabled: provider !== '' }, provider === '' ? t('personaInherit') : loading ? t('loading') : t('personaSelectModel')),\n model !== '' && !models.some(entry => entry.id === model) ? h('option', { value: model }, `${model} (${t('personaUnavailable')})`) : null,\n models.map(entry => h('option', { key: entry.id, value: entry.id }, entry.name))\n )\n ),\n h('label', { className: css.editorLabel }, t('personaReasoningEffort'),\n h('select', {\n className: css.editorInput,\n 'aria-label': t('personaReasoningEffort'),\n value: fields.reasoningEffort,\n disabled: effortLoading,\n onChange: (event: { target: HTMLSelectElement }) => props.onChange(updateRoleReasoning(props.text, event.target.value))\n },\n h('option', { value: '' }, effortLoading ? t('loading') : t('personaEffortAutomatic')),\n fields.reasoningEffort !== '' && !efforts.some(effort => effort.id === fields.reasoningEffort)\n ? h('option', { value: fields.reasoningEffort }, `${fields.reasoningEffort} (${t(reasoning?.route === route ? 'personaUnavailable' : 'personaEffortSaved')})`)\n : null,\n efforts.map(effort => h('option', { key: effort.id, value: effort.id, title: effort.description }, reasoning?.value?.defaultEffort === effort.id ? `${effort.name} (${t('personaEffortModelDefault')})` : effort.name))\n )\n ),\n providerError || modelError || effortError === route ? h('div', { role: 'alert', className: css.editorError }, t('personaCatalogError'), h('button', { type: 'button', onClick: () => setRevision(value => value + 1) }, t('refresh'))) : null,\n (['tools'] as const).map(key =>\n h(\n 'label',\n { className: css.editorLabel, key },\n props.t('personaTools'),\n h('input', {\n className: css.editorInput,\n value: fields[key],\n onChange: (event: { target: HTMLInputElement }) => props.onChange(updateFrontmatter(props.text, key, event.target.value))\n })\n )\n ),\n h('p', { className: css.editorHint }, props.t('personaModelHint')),\n h('p', { className: css.editorHint }, props.t('personaToolsHint'))\n )\n}\n","/**\n * The generic user-panel surface: search, state filter, grid/list toggle,\n * and full CRUD over one user panel directory. The skills / commands /\n * agent-personas panels mount this component with their own kind and copy —\n * one implementation, three surfaces, identical interaction language.\n * @module client/ui/UserPanelSurface\n */\nimport { createElement as h, useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'\nimport { IconEditOutline16, IconTrashOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'\nimport { ToggleSwitch } from './ToggleSwitch.js'\nimport { createUserPanelEntry, deleteUserPanelEntry, fetchUserPanel, updateUserPanelEntry, type UserPanelEntry, type UserPanelKind } from '../api.js'\nimport type { Translate } from '../index.js'\nimport { SearchFilterToolbar } from '../SearchFilterToolbar.js'\nimport { ResourceCard, ResourceCollection } from './ResourceCard.js'\nimport { useWorkspaceView } from './workspace-view.js'\nimport { PanelActions, PanelHeader, BusyIndicator, ConfirmModal, EntryEditorModal, SourceBadge, type PanelConfirmState, type PanelEditorState } from './panel.js'\nimport css from './panel.module.css'\nimport { RoleMetadataFields } from '../features/personas/RoleMetadataFields.js'\nimport { readRoleFields, updateFrontmatter } from '../features/personas/frontmatter.js'\n\n/** Draft templates per panel kind (bilingual; the user edits from here). */\nfunction draftTemplate(kind: UserPanelKind, t: Translate): string {\n if (kind === 'skills') {\n return ['---', `description: ${t('panelDraftSkillDesc')}`, '---', '', t('panelDraftSkillBody'), ''].join('\\n')\n }\n if (kind === 'commands') {\n return ['---', `description: ${t('panelDraftCommandDesc')}`, 'argument-hint: ', '---', '', `${t('panelDraftCommandBody')}: $ARGUMENTS`, ''].join('\\n')\n }\n return ['---', `description: ${t('panelDraftPersonaDesc')}`, '---', '', t('panelDraftPersonaBody'), ''].join('\\n')\n}\n\ntype PanelFilter = 'all' | 'disabled' | 'user' | 'plugin'\n\n/** The generic user-panel surface for one panel kind. */\nexport function UserPanelSurface(props: {\n t: Translate\n kind: UserPanelKind\n /** The \"quick reply\" hint line, only rendered for commands. */\n hint?: string\n}): ReactNode {\n const { t, kind } = props\n const [entries, setEntries] = useState<UserPanelEntry[]>([])\n const [loading, setLoading] = useState(true)\n const [error, setError] = useState<string | undefined>(undefined)\n const [busy, setBusy] = useState(false)\n const [search, setSearch] = useState('')\n const [filter, setFilter] = useState<PanelFilter>('all')\n const [view, setView] = useWorkspaceView()\n const [editor, setEditor] = useState<PanelEditorState | undefined>(undefined)\n const [confirm, setConfirm] = useState<PanelConfirmState | undefined>(undefined)\n // Latest-wins guard: overlapping mutations re-read the list, and a slow\n // earlier response must never overwrite a newer one's result.\n const refreshSeq = useRef(0)\n\n const refresh = useCallback(async (): Promise<void> => {\n const seq = ++refreshSeq.current\n setError(undefined)\n try {\n const data = await fetchUserPanel(kind)\n if (refreshSeq.current === seq) setEntries(data)\n } catch (reason) {\n if (refreshSeq.current === seq) setError(reason instanceof Error ? reason.message : String(reason))\n } finally {\n if (refreshSeq.current === seq) setLoading(false)\n }\n }, [kind])\n\n useEffect(() => {\n setEntries([])\n setLoading(true)\n setSearch('')\n setFilter('all')\n setEditor(undefined)\n setConfirm(undefined)\n void refresh()\n return () => {\n refreshSeq.current++\n }\n }, [refresh])\n\n /** Mutate with the shared busy spinner + error surface, then re-read. */\n const mutate = useCallback(\n async (work: () => Promise<unknown>): Promise<boolean> => {\n setBusy(true)\n setError(undefined)\n try {\n await work()\n await refresh()\n return true\n } catch (reason) {\n setError(reason instanceof Error ? reason.message : String(reason))\n return false\n } finally {\n setBusy(false)\n }\n },\n [refresh]\n )\n\n const needle = search.trim().toLowerCase()\n const visible = useMemo(\n () =>\n entries.filter(entry => {\n if ((filter === 'user' || filter === 'plugin') && entry.origin !== filter) return false\n if (filter === 'disabled' && !entry.disabled) return false\n if (needle !== '' && !`${entry.name} ${entry.description} ${entry.suiteName ?? ''} ${entry.path}`.toLowerCase().includes(needle)) return false\n return true\n }),\n [entries, needle, filter]\n )\n const disabledCount = entries.filter(entry => entry.disabled).length\n\n const openCreate = (): void => {\n setError(undefined)\n setEditor({ mode: 'create', name: '', text: draftTemplate(kind, t) })\n }\n\n const openEdit = (entry: UserPanelEntry): void => {\n setError(undefined)\n // The server's raw document preserves YAML metadata and Markdown exactly.\n setEditor({ mode: 'edit', id: entry.id ?? entry.name, name: entry.name, path: entry.path, text: entry.rawText })\n }\n\n const toggleDisabled = (entry: UserPanelEntry): void => {\n void mutate(() => updateUserPanelEntry(kind, entry.id ?? entry.name, updateFrontmatter(entry.rawText, 'disabled', !entry.disabled)))\n }\n\n const saveEditor = async (state: PanelEditorState): Promise<boolean> => {\n if (kind === 'agents') {\n const fields = readRoleFields(state.text)\n if (fields.provider !== '' && (fields.model === '' || fields.model === 'inherit')) {\n setError(t('personaSelectModel'))\n return false\n }\n }\n if (state.mode === 'create') {\n const ok = await mutate(() => createUserPanelEntry(kind, state.name, state.text))\n if (ok) setEditor(undefined)\n return ok\n }\n const ok = await mutate(() => updateUserPanelEntry(kind, state.id ?? state.name, state.text))\n if (ok) setEditor(undefined)\n return ok\n }\n\n const openDelete = (entry: UserPanelEntry): void => {\n setConfirm({\n title: t('panelDeleteTitle', { name: entry.name }),\n description: t('panelDeleteDesc', { path: entry.path }),\n onConfirm: async () => {\n await mutate(() => deleteUserPanelEntry(kind, entry.id ?? entry.name))\n }\n })\n }\n\n const panelTitle = kind === 'skills' ? t('workspaceTabSkills') : kind === 'commands' ? t('workspaceTabCommands') : t('workspaceTabPersonas')\n const panelDescription = kind === 'skills' ? t('skillsPanelDescription') : kind === 'commands' ? t('commandsPanelDescription') : t('personasPanelDescription')\n\n return h(\n 'div',\n { className: css.shell },\n h(PanelHeader, { title: panelTitle, subtitle: panelDescription, actions: h(PanelActions, { addLabel: t('panelAdd'), onAdd: openCreate, refreshLabel: t('refresh'), onRefresh: () => { void refresh() }, busy }) }),\n error === undefined ? null : h('div', { className: css.editorError }, error),\n busy ? h(BusyIndicator, { overlay: true, label: t('panelWorking') }) : null,\n h(SearchFilterToolbar, {\n search,\n searchLabel: t('panelSearchLabel'),\n searchPlaceholder: t('panelSearchLabel'),\n onSearchChange: setSearch,\n filters: [\n { id: 'all', label: t('panelFilterAll'), count: entries.length, icon: null, active: filter === 'all', onSelect: () => setFilter('all') },\n ...(['user', 'plugin'] as const).map(origin => ({\n id: origin,\n label: t(origin === 'user' ? 'panelSourceUser' : 'panelSourcePlugin'),\n count: entries.filter(entry => entry.origin === origin).length,\n icon: null,\n active: filter === origin,\n onSelect: () => setFilter(origin)\n })),\n { id: 'disabled', label: t('panelFilterDisabled'), count: disabledCount, icon: null, active: filter === 'disabled', onSelect: () => setFilter('disabled') }\n ],\n view,\n gridLabel: t('grid'),\n listLabel: t('list'),\n onViewChange: nextView => setView(nextView),\n }),\n h(\n 'div',\n { className: css.body },\n loading && entries.length === 0\n ? h('div', { className: css.empty }, t('loading'))\n : visible.length === 0\n ? h('div', { className: css.empty }, t('panelEmpty'))\n : h(\n ResourceCollection,\n { view, className: view === 'grid' ? css.entryGrid : css.entryList },\n visible.map(entry =>\n h(UserEntryRow, {\n key: entry.id ?? entry.name,\n entry,\n t,\n compact: view === 'grid',\n kind,\n busy,\n onEdit: () => openEdit(entry),\n onToggle: () => toggleDisabled(entry),\n onDelete: () => openDelete(entry)\n })\n )\n ),\n props.hint === undefined ? null : h('p', { className: css.editorHint }, props.hint)\n ),\n h(EntryEditorModal, {\n t,\n open: editor !== undefined,\n state: editor,\n title: editor?.mode === 'create' ? t('panelAddTitle') : editor?.name ?? t('panelEditTitle'),\n nameLabel: t('panelNamePh'),\n textLabel: t('panelTextPh'),\n busy,\n saveError: error,\n saveLabel: t('panelSave'),\n cancelLabel: t('cancel'),\n renderFields: kind === 'agents' ? (text, onChange) => h(RoleMetadataFields, { text, onChange, t, disabled: busy }) : undefined,\n onClose: () => setEditor(undefined),\n onSave: saveEditor\n }),\n h(ConfirmModal, {\n state: confirm,\n confirmLabel: t('confirmDelete'),\n cancelLabel: t('cancel'),\n busy,\n onClose: () => setConfirm(undefined)\n })\n )\n}\n\n/** One entry row: name, source badge, description, path, and row actions. */\nfunction UserEntryRow(props: {\n entry: UserPanelEntry\n t: Translate\n compact: boolean\n kind: UserPanelKind\n busy: boolean\n onEdit: () => void\n onToggle: () => void\n onDelete: () => void\n}): ReactNode {\n const { entry, t } = props\n const metaPairs = Object.entries(entry.metadata).filter(([key]) => key !== 'description' && key !== 'disabled' && key !== 'name')\n return h(\n ResourceCard,\n { className: css.entryRow, state: entry.disabled ? 'disabled' : 'active' },\n h(\n 'div',\n { className: css.entryMain },\n h(\n 'div',\n { className: css.entryHead },\n h('button', { type: 'button', className: css.entryName, onClick: props.onEdit, title: t('panelDetails') }, props.kind === 'commands' ? `/${entry.name}` : entry.name),\n h(SourceBadge, {\n kind: entry.origin,\n label: entry.origin === 'user' ? t('panelSourceUser') : `${t('panelSourcePlugin')}${entry.suiteName ? ` · ${entry.suiteName}` : ''}`,\n detail: entry.path\n }),\n entry.disabled ? h('span', { className: css.editorPath }, t('panelDisabledBadge')) : null\n ),\n entry.description === '' ? null : h('p', { className: css.entryDesc }, entry.description),\n props.compact ? null : h('span', { className: css.entryPath }, entry.path),\n metaPairs.length === 0 || props.compact\n ? null\n : h('span', { className: css.entryPath }, metaPairs.map(([key, value]) => `${key}: ${typeof value === 'string' ? value : JSON.stringify(value)}`).join(' · '))\n ),\n h(\n 'div',\n { className: css.entryActions },\n h('button', { type: 'button', className: css.iconBtn, 'aria-label': t('panelEditTitle'), disabled: props.busy, title: t('panelEditTitle'), onClick: props.onEdit }, h(IconEditOutline16)),\n h(\n 'button',\n {\n type: 'button',\n className: `${css.iconBtn} ${css.iconBtnDanger}`,\n 'aria-label': t('panelDelete'),\n disabled: props.busy,\n title: t('panelDelete'),\n onClick: props.onDelete\n },\n h(IconTrashOutline16)\n ),\n h(ToggleSwitch, { on: !entry.disabled, disabled: props.busy, title: entry.disabled ? t('enable') : t('disable'), onChange: props.onToggle })\n )\n )\n}\n","/**\n * Plugin workspace layout: the top tab row plus the active tab's scroll\n * region. The workspace owns the height in both host surfaces (settings\n * section and legacy page mode), so each tab's content scrolls inside its\n * own panel and switching tabs never moves the page.\n */\n\n.workspace {\n display: flex;\n min-width: 0;\n min-height: 0;\n height: 100%;\n flex: 1;\n flex-direction: column;\n gap: 12px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n/* Page mode is a fixed shell; settings mode stretches to the host column.\n The `height: 100%` chain (workspace → tab panel → section) is what keeps\n every panel's scrollbar inside its own content area. */\n.pageMode {\n box-sizing: border-box;\n padding: 4px 0;\n}\n\n.tabRow {\n display: flex;\n flex: none;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n overflow-x: auto;\n border-bottom: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.1));\n scrollbar-width: none;\n}\n\n.tab,\n.tabOn {\n position: relative;\n flex: none;\n padding: 7px 14px;\n border: none;\n border-radius: 8px 8px 0 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #6b7280);\n cursor: pointer;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n white-space: nowrap;\n}\n\n.tab:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, 0.06));\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n\n.tabOn {\n color: var(--dsw-alias-label-primary, #1f2328);\n font-weight: 600;\n}\n\n.tabOn::after {\n position: absolute;\n right: 10px;\n bottom: 0;\n left: 10px;\n height: 2px;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary);\n content: '';\n}\n\n.tabPanel {\n display: flex;\n min-height: 0;\n flex: 1;\n flex-direction: column;\n}\n","/**\n * The plugin workspace: one page, six top tabs.\n *\n * The market, skills, commands, agent personas, MCP services, and LSP\n * servers panels all render inside this shell, so the settings sidebar keeps\n * a single \"Agent Plugins\" entry and users switch surfaces with the tab row.\n * Each tab's content scrolls inside its own region (never the settings\n * column), which removes the scrollbar show/hide jitter when tabs with\n * different content heights swap.\n * @module client/PluginWorkspace\n */\nimport { createElement as h, useEffect, useState, type ReactNode } from 'react'\nimport type { Translate } from './index.js'\nimport type { CredentialApi } from './credentials.js'\nimport { MarketSection } from './MarketSection.js'\nimport { McpStatusPanel } from './McpStatusPanel.js'\nimport { LspStatusPanel } from './LspStatusPanel.js'\nimport { UserPanelSurface } from './ui/UserPanelSurface.js'\nimport css from './workspace.module.css'\n\n/** The six workspace tabs in display order. */\nexport type WorkspaceTab = 'market' | 'skills' | 'commands' | 'personas' | 'mcp' | 'lsp'\n\nconst TAB_ORDER: ReadonlyArray<WorkspaceTab> = ['market', 'skills', 'commands', 'personas', 'mcp', 'lsp']\n\nexport interface PluginWorkspaceProps {\n t: Translate\n credentials?: CredentialApi\n /** The host surface controls only outer spacing; data and actions stay shared. */\n mode?: 'settings' | 'page'\n}\n\n/** One page with six top tabs; state is local so switching is instant. */\nexport function PluginWorkspace({ t, credentials, mode = 'settings' }: PluginWorkspaceProps): ReactNode {\n const [active, setActive] = useState<WorkspaceTab>('market')\n\n // Deep links: a `#/agent-plugins/<tab>` hash selects the tab directly, and\n // a tab click writes the hash back (guarded — replaceState keeps the\n // session history clean) so a copied URL reopens on the same tab.\n useEffect(() => {\n const applyHash = (): void => {\n const match = /^#\\/agent-plugins\\/(\\w+)$/.exec(typeof window === 'undefined' ? '' : window.location.hash)\n if (match === null) return\n const tab = match[1] as WorkspaceTab\n if (TAB_ORDER.includes(tab)) setActive(tab)\n }\n applyHash()\n if (typeof window === 'undefined') return\n window.addEventListener('hashchange', applyHash)\n return () => window.removeEventListener('hashchange', applyHash)\n }, [])\n\n const select = (tab: WorkspaceTab): void => {\n setActive(tab)\n if (typeof window === 'undefined' || typeof window.history === 'undefined') return\n try {\n window.history.replaceState(null, '', `#/agent-plugins/${tab}`)\n } catch {\n // Sandboxed contexts may refuse history writes; the tab still switches.\n }\n }\n\n const labelKeys: Record<WorkspaceTab, string> = {\n market: t('workspaceTabMarket'),\n skills: t('workspaceTabSkills'),\n commands: t('workspaceTabCommands'),\n personas: t('workspaceTabPersonas'),\n mcp: t('workspaceTabMcp'),\n lsp: t('workspaceTabLsp')\n }\n\n return h(\n 'div',\n { className: mode === 'page' ? `${css.workspace} ${css.pageMode}` : css.workspace, 'data-agent-plugins-workspace': true },\n h(\n 'nav',\n { className: css.tabRow, role: 'tablist' },\n TAB_ORDER.map(tab =>\n h(\n 'button',\n {\n key: tab,\n type: 'button',\n role: 'tab',\n 'aria-selected': active === tab,\n className: active === tab ? css.tabOn : css.tab,\n onClick: () => select(tab)\n },\n labelKeys[tab]\n )\n )\n ),\n h('div', { className: css.tabPanel, role: 'tabpanel' }, renderTab(active, t, credentials, mode))\n )\n}\n\nfunction renderTab(tab: WorkspaceTab, t: Translate, credentials: CredentialApi | undefined, mode: 'settings' | 'page'): ReactNode {\n switch (tab) {\n case 'market':\n return h(MarketSection, { t, credentials, mode })\n case 'skills':\n return h(UserPanelSurface, { t, kind: 'skills' })\n case 'commands':\n return h(UserPanelSurface, { t, kind: 'commands', hint: t('commandsPanelHint') })\n case 'personas':\n return h(UserPanelSurface, { t, kind: 'agents' })\n case 'mcp':\n return h(McpStatusPanel, { t, credentials })\n case 'lsp':\n return h(LspStatusPanel, { t })\n }\n}\n","/**\n * The Agent Plugins Market card on the host's 插件配置 (plugin configuration)\n * tab: the market feature's configuration entry, named after the market\n * itself. Disclosed inside is the MCP enhancement switch — ON (default)\n * mounts suite MCP servers through the market's built-in bridge (OAuth\n * authorization, SSE, browser-leg hold); OFF falls back to the host's\n * `dsh-mcp-client` compatibility client.\n *\n * The switch state is the market's host settings namespace (bound by the\n * client entry), so a flip persists through the host settings document and\n * the node half's namespace watcher remounts the servers. The host client\n * version probe rides the market's own API.\n */\nimport { createElement as h, useCallback, useEffect, useState, type ReactNode } from 'react'\nimport * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { McpBackendInfo } from './api.js'\nimport { ToggleSwitch } from './ui/ToggleSwitch.js'\nimport css from './market.module.css'\n\n/** Locale subset the card needs (structural — the host binds the real one). */\ntype CardTranslate = (key: string, params?: Record<string, unknown>) => string\n\n/** The host's disclosure chevron, matching the native cards' glyph exactly. */\nconst chevronIcon = (primitives as unknown as Record<string, unknown>)['IconChevronDownOutline14'] as\n | ((props: { size?: number }) => ReactNode)\n | undefined\n\n/** The bound settings-namespace face the client entry hands the card. */\nexport interface McpEnhanceScopeFace {\n /** Whether the enhancement is on; defaults to true before the first answer. */\n enhanced(): boolean\n /** Whether the host settings document accepts writes. */\n writable(): boolean\n subscribe(listener: () => void): () => void\n setEnhanced(next: boolean): Promise<void>\n /** The persisted download region; `auto` follows the interface language. */\n region(): 'auto' | 'global' | 'china'\n setRegion(next: 'global' | 'china'): Promise<void>\n /** Whether the experience-feedback model tool is registered (default true). */\n feedbackEnabled?(): boolean\n scanProjectLayouts?(): boolean\n setScanProjectLayouts?(next: boolean): Promise<void>\n /** Register/unregister the experience-feedback model tool. */\n setFeedbackEnabled?(next: boolean): Promise<void>\n}\n\nexport interface McpPluginCardProps {\n t: CardTranslate\n scope: McpEnhanceScopeFace\n /** Live host-client probe (availability + version) from the market API. */\n probe: () => Promise<McpBackendInfo>\n}\n\nexport function McpPluginCard({ t, scope, probe }: McpPluginCardProps): ReactNode {\n const [open, setOpen] = useState(false)\n const [, setTick] = useState(0)\n const [probeInfo, setProbeInfo] = useState<McpBackendInfo | undefined>(undefined)\n const [busy, setBusy] = useState(false)\n const [error, setError] = useState<string | undefined>(undefined)\n\n useEffect(() => scope.subscribe(() => setTick(tick => tick + 1)), [scope])\n\n const refreshProbe = useCallback(async () => {\n try {\n setProbeInfo(await probe())\n } catch {\n // The version line degrades silently; the switch still works.\n }\n }, [probe])\n\n useEffect(() => { void refreshProbe() }, [refreshProbe])\n\n const enhanced = scope.enhanced()\n const writable = scope.writable()\n const regionSetting = scope.region()\n // The highlighted segment is the route clones actually take: the explicit\n // choice, or the language-resolved one while the setting is still auto.\n const effectiveRegion = probeInfo?.downloadRegion.effective ?? (regionSetting === 'china' ? 'china' : 'global')\n // Compat mode requires the host client to resolve; the enhanced (built-in)\n // client is always available because it ships inside this plugin.\n const hostUsable = probeInfo?.hostClient.available === true\n\n const onToggle = (): void => {\n if (busy || !writable) return\n const next = !enhanced\n if (!next && !hostUsable) {\n setError(t('mcpBackendHostMissing'))\n return\n }\n setBusy(true)\n setError(undefined)\n void scope.setEnhanced(next).then(() => {\n setBusy(false)\n }).catch((cause: unknown) => {\n setError(cause instanceof Error ? cause.message : String(cause))\n setBusy(false)\n })\n }\n\n return h(\n 'div',\n {\n className: open ? `${css.pluginCard} ${css.pluginCardOpen}` : css.pluginCard,\n 'data-busy': busy ? 'true' : undefined\n },\n h(\n 'button',\n {\n type: 'button',\n className: css.pluginCardHeader,\n 'aria-expanded': open,\n onClick: () => { setOpen(current => !current) },\n }, h(\n 'div',\n { className: css.pluginCardText },\n h('div', { className: css.pluginCardTitle }, t('nav')),\n h('div', { className: css.pluginCardDesc }, t('marketCardDesc'))\n ),\n h(\n 'span',\n { className: open ? `${css.pluginChevron} ${css.pluginChevronOpen}` : css.pluginChevron },\n chevronIcon !== undefined ? h(chevronIcon, { size: 14 }) : '▾'\n )\n ),\n open\n ? h(\n 'div',\n { className: css.pluginCardBody },\n h(\n 'div',\n { className: css.pluginCardRow },\n h(\n 'div',\n { className: css.pluginCardText },\n h('div', { className: css.pluginCardRowLabel }, t('mcpCardTitle')),\n h('div', { className: css.pluginCardDesc }, enhanced ? t('mcpCardDescOn') : t('mcpCardDescOff'))\n ),\n h(ToggleSwitch, {\n on: enhanced,\n disabled: busy || !writable,\n title: writable ? undefined : t('mcpCardReadonly'),\n onChange: onToggle\n })\n ),\n error !== undefined\n ? h('div', { className: css.pluginCardError }, error)\n : null,\n h(\n 'div',\n { className: css.pluginCardRow },\n h(\n 'div',\n { className: css.pluginCardText },\n h('div', { className: css.pluginCardRowLabel }, t('regionLabel')),\n h('div', { className: css.pluginCardDesc }, t('regionHint'))\n ),\n h(\n 'div',\n { className: css.regionSeg },\n (['global', 'china'] as const).map(region =>\n h(\n 'button',\n {\n key: region,\n type: 'button',\n disabled: busy || !writable,\n className: effectiveRegion === region ? css.regionSegOn : css.regionSegBtn,\n onClick: () => {\n if (regionSetting === region) return\n setBusy(true)\n setError(undefined)\n void scope.setRegion(region).then(() => {\n setBusy(false)\n }).catch((cause: unknown) => {\n setError(cause instanceof Error ? cause.message : String(cause))\n setBusy(false)\n })\n }\n },\n region === 'global' ? t('regionGlobal') : t('regionChina')\n )\n )\n )\n ),\n scope.scanProjectLayouts !== undefined && scope.setScanProjectLayouts !== undefined\n ? h('div', { className: css.pluginCardRow },\n h('div', { className: css.pluginCardText }, h('div', { className: css.pluginCardRowLabel }, t('projectLayoutsLabel'))),\n h(ToggleSwitch, {\n on: scope.scanProjectLayouts(),\n title: t('projectLayoutsLabel'),\n disabled: busy || !writable,\n onChange: () => {\n if (busy || !writable) return\n setBusy(true)\n setError(undefined)\n void scope.setScanProjectLayouts!(!scope.scanProjectLayouts!()).catch((cause: unknown) => {\n setError(cause instanceof Error ? cause.message : String(cause))\n }).finally(() => setBusy(false))\n }\n }))\n : null,\n scope.feedbackEnabled !== undefined && scope.setFeedbackEnabled !== undefined\n ? h(\n 'div',\n { className: css.pluginCardRow },\n h(\n 'div',\n { className: css.pluginCardText },\n h('div', { className: css.pluginCardRowLabel }, t('feedbackToggleLabel')),\n h('div', { className: css.pluginCardDesc }, scope.feedbackEnabled() ? t('feedbackToggleDescOn') : t('feedbackToggleDescOff'))\n ),\n h(ToggleSwitch, {\n on: scope.feedbackEnabled(),\n disabled: busy || !writable,\n onChange: () => {\n if (busy || !writable) return\n setBusy(true)\n setError(undefined)\n void scope.setFeedbackEnabled!(!scope.feedbackEnabled!()).then(() => {\n setBusy(false)\n }).catch((cause: unknown) => {\n setError(cause instanceof Error ? cause.message : String(cause))\n setBusy(false)\n })\n }\n })\n )\n : null\n )\n : null\n )\n}\n","/** Pure capability decision for the legacy page-mode fallback. */\n\n/**\n * Use the DOM page fallback only when the host has no settings page and does\n * expose a page shell for the fallback to mount into.\n *\n * @param settingsSurfaceAvailable - whether `settings.section` is live.\n * @param pageShellAvailable - whether the sidebar/conversation shell exists.\n * @returns true when the fallback is the only available market surface.\n */\nexport function shouldUseLegacyPageMode(settingsSurfaceAvailable: boolean, pageShellAvailable: boolean): boolean {\n return !settingsSurfaceAvailable && pageShellAvailable\n}\n","/**\n * Legacy Web page-mode adapter.\n *\n * Current DSH compositions expose `settings.section`; older compositions that\n * predate that slot can still host a top-level market panel through the DOM\n * shell used by the original page-mode integration. The adapter is deliberately\n * guarded by the live settings-slot state so one composition never renders two\n * market surfaces.\n */\nimport { createElement as h } from 'react'\nimport { createRoot, type Root } from 'react-dom/client'\nimport { PluginWorkspace } from './PluginWorkspace.js'\nimport { shouldUseLegacyPageMode } from './page-mode-selection.js'\nimport type { Translate } from './index.js'\nimport type { CredentialApi } from './credentials.js'\nimport css from './market.module.css'\n\n/** Browser-side inputs required by the legacy page-mode adapter. */\nexport interface LegacyPageModeOptions {\n /** Current namespace-bound translator. */\n t: Translate\n /** Host credentials wire used for write-only MCP env configuration. */\n credentials?: CredentialApi\n /** Whether the host has mounted a live `settings.section` declaration. */\n isSettingsSurfaceAvailable: () => boolean\n /** Optional locale revision subscription supplied by newer hosts. */\n subscribeLocale?: (listener: () => void) => () => void\n}\n\nconst ACTIVE_ATTRIBUTE = 'data-dsh-agent-plugins-market-page'\nconst VIEW_ATTRIBUTE = 'data-dsh-agent-plugins-market-page-view'\nconst ENTRY_ATTRIBUTE = 'data-dsh-agent-plugins-market-entry'\nconst SURFACE_EVENT = 'dsh-agent-plugins-market-settings-surface'\nconst PANEL_EVENT = 'dsh-panel-activate'\nconst PANEL_NAME = 'agent-plugins-market'\n\n/** Notify the page adapter that the settings-slot capability changed. */\nexport const LEGACY_PAGE_MODE_SURFACE_EVENT = SURFACE_EVENT\nconst SIDEBAR_COLUMN_SELECTOR = '[data-pane=\"sidebar\"], [class*=\"sidebarCol\"]'\nconst CONVERSATION_COLUMN_SELECTOR = '[data-pane=\"conversation\"], [class*=\"centerCol\"]'\nconst SIDEBAR_CONTEXT_SELECTOR = '[class*=\"sessionRow\"], [class*=\"projectRow\"], [class*=\"searchResultRow\"], [class*=\"searchResultWorkspace\"], [class*=\"newSession\"]'\n\n/**\n * Mount the page-mode fallback and its sidebar entry.\n *\n * The fallback remains dormant when the settings surface is present. It also\n * remains a no-op in non-browser runtimes or shells that expose neither the\n * sidebar nor the conversation column.\n *\n * @param options - page-mode dependencies and host capability probe.\n * @returns disposer that removes the injected entry, panel, listeners, and\n * active document marker.\n */\nexport function mountLegacyPageMode(options: LegacyPageModeOptions): () => void {\n if (typeof document === 'undefined' || typeof MutationObserver === 'undefined') return () => {}\n\n let stopped = false\n let open = false\n let root: Root | undefined\n let container: HTMLDivElement | undefined\n let entry: HTMLButtonElement | undefined\n let entryLabel: HTMLSpanElement | undefined\n let observer: MutationObserver | undefined\n\n const unmountView = (): void => {\n root?.unmount()\n root = undefined\n container?.remove()\n container = undefined\n }\n\n const setActive = (next: boolean): void => {\n open = next\n if (open && !options.isSettingsSurfaceAvailable()) {\n document.documentElement.setAttribute(ACTIVE_ATTRIBUTE, '')\n document.dispatchEvent(new CustomEvent(PANEL_EVENT, { detail: PANEL_NAME }))\n } else {\n document.documentElement.removeAttribute(ACTIVE_ATTRIBUTE)\n unmountView()\n }\n }\n\n const removeView = (): void => {\n setActive(false)\n }\n\n const renderView = (): void => {\n if (root === undefined) return\n root.render(h(PluginWorkspace, { t: options.t, credentials: options.credentials, mode: 'page' }))\n }\n\n const updateEntryCopy = (): void => {\n if (entryLabel === undefined || entry === undefined) return\n const label = options.t('nav')\n entryLabel.textContent = label\n entry.title = label\n entry.setAttribute('aria-label', label)\n }\n\n const ensureView = (): void => {\n if (stopped || options.isSettingsSurfaceAvailable()) {\n removeView()\n return\n }\n if (!open) return\n const column = conversationColumn()\n if (!shouldUseLegacyPageMode(options.isSettingsSurfaceAvailable(), column !== undefined)) {\n removeView()\n return\n }\n if (column === undefined) return\n if (container !== undefined && container.isConnected) return\n root?.unmount()\n container?.remove()\n container = document.createElement('div')\n container.setAttribute(VIEW_ATTRIBUTE, '')\n container.className = css.pageView\n column.appendChild(container)\n root = createRoot(container)\n renderView()\n }\n\n const ensureEntry = (): void => {\n if (stopped || options.isSettingsSurfaceAvailable()) {\n entry?.remove()\n return\n }\n const rootElement = sidebarRoot()\n const anchor = rootElement === undefined ? undefined : newSessionButton(rootElement)\n if (rootElement === undefined || anchor === undefined || anchor.parentElement === null) return\n if (entry === undefined) {\n entry = createEntry(() => { setActive(!open); ensureView() })\n entryLabel = entry.querySelector<HTMLSpanElement>('[data-dsh-agent-plugins-market-label]') ?? undefined\n updateEntryCopy()\n }\n // Other plugins share this anchor; competing for its immediate next sibling\n // creates an endless MutationObserver loop across their adapters.\n if (entry.parentElement !== anchor.parentElement) {\n anchor.insertAdjacentElement('afterend', entry)\n }\n }\n\n const observeShell = (): void => {\n if (stopped || observer !== undefined || options.isSettingsSurfaceAvailable()) return\n observer = new MutationObserver(records => {\n if (records.some(record => !container?.contains(record.target) && !entry?.contains(record.target))) ensure()\n })\n observer.observe(document.body ?? document.documentElement, { childList: true, subtree: true })\n }\n\n const stopObservingShell = (): void => {\n observer?.disconnect()\n observer = undefined\n }\n\n const ensure = (): void => {\n if (stopped) return\n if (options.isSettingsSurfaceAvailable()) {\n stopObservingShell()\n removeView()\n entry?.remove()\n return\n }\n observeShell()\n ensureView()\n ensureEntry()\n }\n\n const onLocale = (): void => {\n updateEntryCopy()\n renderView()\n }\n const onSurfaceChange = (): void => { ensure() }\n const unsubscribeLocale = options.subscribeLocale?.(onLocale)\n const onPanelActivate = (event: Event): void => {\n const detail = (event as CustomEvent<string>).detail\n if (detail !== PANEL_NAME && open) setActive(false)\n }\n const onSidebarContextClick = (event: MouseEvent): void => {\n if (!open) return\n const target = event.target\n if (!(target instanceof HTMLElement) || target.closest(SIDEBAR_CONTEXT_SELECTOR) === null) return\n setActive(false)\n }\n\n document.addEventListener(PANEL_EVENT, onPanelActivate)\n document.addEventListener(SURFACE_EVENT, onSurfaceChange)\n document.addEventListener('click', onSidebarContextClick, true)\n queueMicrotask(ensure)\n\n return () => {\n stopped = true\n unsubscribeLocale?.()\n document.removeEventListener(PANEL_EVENT, onPanelActivate)\n document.removeEventListener(SURFACE_EVENT, onSurfaceChange)\n document.removeEventListener('click', onSidebarContextClick, true)\n stopObservingShell()\n entry?.remove()\n removeView()\n }\n}\n\nfunction sidebarRoot(): HTMLElement | undefined {\n const column = document.querySelector<HTMLElement>(SIDEBAR_COLUMN_SELECTOR)\n if (column === null) return undefined\n return column.querySelector<HTMLElement>('[class*=\"logoRow\"]')?.parentElement\n ?? (column.firstElementChild as HTMLElement | null)\n ?? undefined\n}\n\nfunction newSessionButton(root: HTMLElement): HTMLButtonElement | undefined {\n const nested = root.querySelector<HTMLButtonElement>('button[class*=\"newSession\"]')\n if (nested !== null) return nested\n for (const child of root.children) {\n if (child instanceof HTMLButtonElement) return child\n }\n return undefined\n}\n\nfunction conversationColumn(): HTMLElement | undefined {\n return document.querySelector<HTMLElement>(CONVERSATION_COLUMN_SELECTOR) ?? undefined\n}\n\nfunction createEntry(onClick: () => void): HTMLButtonElement {\n const button = document.createElement('button')\n button.type = 'button'\n button.setAttribute(ENTRY_ATTRIBUTE, '')\n button.className = css.pageEntry\n button.innerHTML = '<svg viewBox=\"0 0 16 16\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"2\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"2\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"2\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/><rect x=\"9\" y=\"9\" width=\"5\" height=\"5\" rx=\"1\"/></svg>'\n const label = document.createElement('span')\n label.dataset.dshAgentPluginsMarketLabel = ''\n button.append(label)\n button.addEventListener('click', onClick)\n return button\n}\n","/**\n * dsh-agent-plugins-market client: registers the Agent Plugins Market section inside the Web\n * GUI's settings page (the same settings.section seat dshmarket uses), with a\n * guarded legacy top-level page fallback for older shells. The bundle's\n * browser externals are React, ReactDOM, and the injected `dsh.client.inject`\n * module table, so it cannot reach packages the host does not serve.\n */\nimport { createElement as h } from 'react'\nimport { createRoot } from 'react-dom/client'\nimport { BusyOverlay } from './ui/BusyOverlay.js'\nimport { withBusyOperation } from './ui/busy-operation.js'\nimport * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport { fetchMcpBackend } from './api.js'\nimport { en, zh, type LocaleKey } from './locales.js'\nimport { PluginWorkspace } from './PluginWorkspace.js'\nimport { McpPluginCard } from './McpPluginCard.js'\nimport { credentialApi, type CredentialRemote } from './credentials.js'\nimport { LEGACY_PAGE_MODE_SURFACE_EVENT, mountLegacyPageMode } from './page-mode.js'\n\nconst NS = 'dsh-agent-plugins-market'\n\nexport type Translate = (key: LocaleKey, params?: Record<string, unknown>) => string\n\n/** The subset of the locale service this plugin touches. */\ninterface LocaleService {\n register(namespace: string, dicts: { zh: Record<string, string>; en: Record<string, string> }): unknown\n bind(namespace: string): Translate\n subscribe?: (listener: () => void) => () => void\n}\n\n/** The subset of the slots service this plugin touches. */\ninterface SlotsService {\n inject(slot: string, register: () => unknown): void\n register(meta: Record<string, unknown>, component: () => unknown): unknown\n}\n\n/** The subset of the host settings-scope service this plugin touches. */\ninterface SettingsScopeService {\n bind(options: { namespace: string }): {\n getSnapshot(): { value?: { mcpEnhanced?: boolean; downloadRegion?: string; feedbackEnabled?: boolean; scanProjectLayouts?: boolean }; writable: boolean }\n subscribe(listener: () => void): () => void\n set(field: string, value: unknown): Promise<void>\n }\n}\n\n/** The client cordis context this plugin relies on (structural subset). */\ninterface SuiteClientContext {\n effect(callback: () => unknown, label?: string): void\n /** Late service resolution; absent on hosts predating cross-plugin inject. */\n inject?(services: string[], callback: (resolved: Record<string, unknown>) => void): void\n locale: LocaleService\n slots: SlotsService\n remote: { credentials: CredentialRemote }\n}\n\nexport const name = 'dsh-agent-plugins-market'\nexport const inject = ['slots', 'locale', 'remote', 'remote.credentials']\nexport const REQUIRED_PRIMITIVES = ['Button', 'Input', 'Modal', 'Toast', 'Tooltip'] as const\n\n/**\n * Register the MCP enhancement card into the host's shared 插件配置 tab\n * (`settings.plugin.item`), the same seat dshmarket uses. Called through\n * `ctx.inject(['settingsScope'])` at apply time; a host without the\n * settingsScope service simply skips the card.\n */\n\n/** Detect host primitives that predate the exports this UI relies on. */\nexport function missingPrimitives(module: Record<string, unknown>, required: readonly string[] = REQUIRED_PRIMITIVES): string[] {\n return required.filter(name => module[name] === undefined)\n}\n\nexport function apply(ctx: SuiteClientContext): void {\n ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'dsh-agent-plugins: dictionaries')\n const t = ctx.locale.bind(NS)\n const credentials = credentialApi(ctx.remote.credentials)\n\n const gaps = missingPrimitives(primitives as unknown as Record<string, unknown>)\n if (gaps.length > 0) {\n console.warn(`[dsh-agent-plugins-market] host ui-primitives missing ${gaps.join(', ')} — Agent Plugins Market section disabled (dsh web >= 0.1.0-rc.6 required)`)\n return\n }\n\n let settingsSurfaceAvailable = false\n ctx.effect(() => {\n if (typeof document === 'undefined') return\n const element = document.createElement('div')\n element.dataset.agentPluginsBusyHost = ''\n document.body.append(element)\n const root = createRoot(element)\n root.render(h(BusyOverlay, { t }))\n return () => { root.unmount(); element.remove() }\n }, 'dsh-agent-plugins-market: operation overlay')\n ctx.effect(() => mountLegacyPageMode({\n t,\n credentials,\n isSettingsSurfaceAvailable: () => settingsSurfaceAvailable,\n subscribeLocale: ctx.locale.subscribe === undefined ? undefined : (listener) => ctx.locale.subscribe!(listener),\n }), 'dsh-agent-plugins-market: legacy page mode')\n\n // The host 插件配置 tab card. Registration rides the injected scope's slots\n // (the dshmarket / dsh-rewind pattern), and the card state binds the\n // market's settings namespace — the namespace the node half registers,\n // which is also what makes the tab serve our card at all.\n ctx.inject?.(['settingsScope'], (scoped: { settingsScope?: SettingsScopeService; slots?: SlotsService }) => {\n const service = scoped.settingsScope\n const slots = scoped.slots\n if (service === undefined || slots === undefined) return\n const tCard = ctx.locale.bind(NS)\n const scope = service.bind({ namespace: NS })\n slots.inject('settings.plugin.item', () =>\n slots.register({\n name: 'settings.plugin.item',\n key: NS,\n locale: NS,\n inject: () => ({ t: tCard }),\n }, () => h(McpPluginCard, {\n t: key => tCard(key as LocaleKey),\n scope: {\n enhanced: () => scope.getSnapshot().value?.mcpEnhanced !== false,\n writable: () => scope.getSnapshot().writable,\n subscribe: listener => scope.subscribe(listener),\n setEnhanced: next => withBusyOperation(() => scope.set('mcpEnhanced', next)),\n region: () => {\n const value = scope.getSnapshot().value?.downloadRegion\n return value === 'global' || value === 'china' ? value : 'auto'\n },\n setRegion: next => withBusyOperation(() => scope.set('downloadRegion', next)),\n feedbackEnabled: () => scope.getSnapshot().value?.feedbackEnabled !== false,\n setFeedbackEnabled: next => withBusyOperation(() => scope.set('feedbackEnabled', next)),\n scanProjectLayouts: () => scope.getSnapshot().value?.scanProjectLayouts !== false,\n setScanProjectLayouts: next => withBusyOperation(() => scope.set('scanProjectLayouts', next))\n },\n probe: () => fetchMcpBackend(),\n })),\n )\n })\n\n ctx.slots.inject('settings.section', () => {\n settingsSurfaceAvailable = true\n notifyPageModeSurfaceChange()\n // One section, six top tabs (market / skills / commands / personas /\n // MCP / LSP) — the PluginWorkspace owns the tab row and per-tab scroll.\n const workspaceDispose = ctx.slots.register({\n name: 'settings.section',\n id: 'agent-plugin-workspace',\n order: 45,\n label: () => t('nav'),\n locale: NS,\n inject: () => ({ t }),\n }, () => h(PluginWorkspace, {\n t,\n credentials,\n mode: 'settings',\n }))\n return () => {\n settingsSurfaceAvailable = false\n notifyPageModeSurfaceChange()\n if (typeof workspaceDispose === 'function') workspaceDispose()\n }\n })\n}\n\nfunction notifyPageModeSurfaceChange(): void {\n if (typeof document !== 'undefined') document.dispatchEvent(new Event(LEGACY_PAGE_MODE_SURFACE_EVENT))\n}\n"],"x_google_ignoreList":[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,0BAAU,IAAI,IAA2B;AAC/C,MAAMA,8BAAY,IAAI,IAAgB;AACtC,IAAI,SAAS;AACb,IAAIC,aAAqC,CAAC;AAE1C,SAAS,UAAgB;CACvB,aAAW,CAAC,GAAG,QAAQ,OAAO,CAAC;CAC/B,YAAU,SAAQ,aAAY,SAAS,CAAC;AAC1C;AAEA,SAAgB,kBAAsC;CACpD,IAAI,OAAO,aAAa,aAAa,OAAO;CAE5C,OADgB,CAAC,GAAG,SAAS,iBAA8B,mBAAiB,CAAC,CAAC,CAAC,QAAO,SAAQ,KAAK,eAAe,CAAC,CAAC,SAAS,CAChH,CAAC,CAAC,GAAG,EAAE,KAAK,SAAS,cAA2B,gCAAgC;AAC/F;AAEA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