@comecaramelos/dsh-chrome-mcp 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -39
- package/lib/client.js +2186 -614
- package/lib/client.js.map +4 -4
- package/lib/host/apply.d.ts +38 -1
- package/lib/host/apply.d.ts.map +1 -1
- package/lib/host/apply.js +43 -17
- package/lib/host/apply.js.map +1 -1
- package/lib/host/bridge.d.ts +28 -19
- package/lib/host/bridge.d.ts.map +1 -1
- package/lib/host/bridge.js +71 -79
- package/lib/host/bridge.js.map +1 -1
- package/lib/host/catalog.d.ts +2 -2
- package/lib/host/catalog.js +2 -2
- package/lib/host/commands/chrome-path.d.ts +4 -0
- package/lib/host/commands/chrome-path.d.ts.map +1 -0
- package/lib/host/commands/chrome-path.js +65 -0
- package/lib/host/commands/chrome-path.js.map +1 -0
- package/lib/host/commands/chrome-refresh.d.ts +17 -0
- package/lib/host/commands/chrome-refresh.d.ts.map +1 -0
- package/lib/host/commands/chrome-refresh.js +37 -0
- package/lib/host/commands/chrome-refresh.js.map +1 -0
- package/lib/host/commands/index.d.ts +26 -0
- package/lib/host/commands/index.d.ts.map +1 -0
- package/lib/host/commands/index.js +41 -0
- package/lib/host/commands/index.js.map +1 -0
- package/lib/host/constants.d.ts +107 -30
- package/lib/host/constants.d.ts.map +1 -1
- package/lib/host/constants.js +107 -30
- package/lib/host/constants.js.map +1 -1
- package/lib/host/controller/_trace.d.ts +3 -0
- package/lib/host/controller/_trace.d.ts.map +1 -0
- package/lib/host/controller/_trace.js +14 -0
- package/lib/host/controller/_trace.js.map +1 -0
- package/lib/host/controller/bridge-run.d.ts +4 -2
- package/lib/host/controller/bridge-run.d.ts.map +1 -1
- package/lib/host/controller/bridge-run.js +24 -8
- package/lib/host/controller/bridge-run.js.map +1 -1
- package/lib/host/controller/captures.d.ts +9 -16
- package/lib/host/controller/captures.d.ts.map +1 -1
- package/lib/host/controller/captures.js +73 -48
- package/lib/host/controller/captures.js.map +1 -1
- package/lib/host/controller/commits.d.ts +2 -2
- package/lib/host/controller/commits.d.ts.map +1 -1
- package/lib/host/controller/commits.js +97 -41
- package/lib/host/controller/commits.js.map +1 -1
- package/lib/host/controller/connections.d.ts +38 -0
- package/lib/host/controller/connections.d.ts.map +1 -0
- package/lib/host/controller/connections.js +71 -0
- package/lib/host/controller/connections.js.map +1 -0
- package/lib/host/controller/controller.d.ts +19 -24
- package/lib/host/controller/controller.d.ts.map +1 -1
- package/lib/host/controller/controller.js +181 -114
- package/lib/host/controller/controller.js.map +1 -1
- package/lib/host/controller/index.d.ts +18 -14
- package/lib/host/controller/index.d.ts.map +1 -1
- package/lib/host/controller/index.js +16 -14
- package/lib/host/controller/index.js.map +1 -1
- package/lib/host/controller/notes.d.ts +9 -9
- package/lib/host/controller/notes.d.ts.map +1 -1
- package/lib/host/controller/notes.js +16 -21
- package/lib/host/controller/notes.js.map +1 -1
- package/lib/host/controller/persist.d.ts +10 -3
- package/lib/host/controller/persist.d.ts.map +1 -1
- package/lib/host/controller/persist.js +89 -42
- package/lib/host/controller/persist.js.map +1 -1
- package/lib/host/controller/publish.d.ts +4 -0
- package/lib/host/controller/publish.d.ts.map +1 -0
- package/lib/host/controller/publish.js +56 -0
- package/lib/host/controller/publish.js.map +1 -0
- package/lib/host/controller/runs.d.ts +34 -10
- package/lib/host/controller/runs.d.ts.map +1 -1
- package/lib/host/controller/runs.js +241 -58
- package/lib/host/controller/runs.js.map +1 -1
- package/lib/host/controller/state.d.ts +122 -20
- package/lib/host/controller/state.d.ts.map +1 -1
- package/lib/host/controller/windows-run.d.ts +10 -2
- package/lib/host/controller/windows-run.d.ts.map +1 -1
- package/lib/host/controller/windows-run.js +66 -35
- package/lib/host/controller/windows-run.js.map +1 -1
- package/lib/host/discovery/candidates.d.ts +23 -13
- package/lib/host/discovery/candidates.d.ts.map +1 -1
- package/lib/host/discovery/candidates.js +20 -8
- package/lib/host/discovery/candidates.js.map +1 -1
- package/lib/host/discovery/index.d.ts +1 -0
- package/lib/host/discovery/index.d.ts.map +1 -1
- package/lib/host/discovery/index.js +1 -0
- package/lib/host/discovery/index.js.map +1 -1
- package/lib/host/discovery/probe.d.ts +16 -5
- package/lib/host/discovery/probe.d.ts.map +1 -1
- package/lib/host/discovery/probe.js +68 -10
- package/lib/host/discovery/probe.js.map +1 -1
- package/lib/host/discovery/scan.d.ts +14 -9
- package/lib/host/discovery/scan.d.ts.map +1 -1
- package/lib/host/discovery/scan.js +56 -30
- package/lib/host/discovery/scan.js.map +1 -1
- package/lib/host/flags.d.ts +28 -5
- package/lib/host/flags.d.ts.map +1 -1
- package/lib/host/flags.js +75 -7
- package/lib/host/flags.js.map +1 -1
- package/lib/host/kind.d.ts +45 -0
- package/lib/host/kind.d.ts.map +1 -0
- package/lib/host/kind.js +251 -0
- package/lib/host/kind.js.map +1 -0
- package/lib/host/manager.d.ts +21 -0
- package/lib/host/manager.d.ts.map +1 -0
- package/lib/host/manager.js +113 -0
- package/lib/host/manager.js.map +1 -0
- package/lib/host/migration.d.ts +26 -0
- package/lib/host/migration.d.ts.map +1 -0
- package/lib/host/migration.js +127 -0
- package/lib/host/migration.js.map +1 -0
- package/lib/host/plugin-meta.d.ts +12 -3
- package/lib/host/plugin-meta.d.ts.map +1 -1
- package/lib/host/plugin-meta.js +13 -4
- package/lib/host/plugin-meta.js.map +1 -1
- package/lib/host/schema.d.ts +301 -247
- package/lib/host/schema.d.ts.map +1 -1
- package/lib/host/schema.js +145 -120
- package/lib/host/schema.js.map +1 -1
- package/lib/host/settings.d.ts +22 -3
- package/lib/host/settings.d.ts.map +1 -1
- package/lib/host/settings.js +81 -60
- package/lib/host/settings.js.map +1 -1
- package/lib/host/status.d.ts +7 -10
- package/lib/host/status.d.ts.map +1 -1
- package/lib/host/status.js +8 -23
- package/lib/host/status.js.map +1 -1
- package/lib/host/tool.d.ts +13 -7
- package/lib/host/tool.d.ts.map +1 -1
- package/lib/host/tool.js +4 -3
- package/lib/host/tool.js.map +1 -1
- package/lib/host/types/config.d.ts +66 -12
- package/lib/host/types/config.d.ts.map +1 -1
- package/lib/host/types/executable.d.ts +8 -3
- package/lib/host/types/executable.d.ts.map +1 -1
- package/lib/host/types/index.d.ts +5 -4
- package/lib/host/types/index.d.ts.map +1 -1
- package/lib/host/types/services.d.ts +26 -0
- package/lib/host/types/services.d.ts.map +1 -0
- package/lib/host/types/services.js +9 -0
- package/lib/host/types/services.js.map +1 -0
- package/lib/host/types/settings.d.ts +118 -65
- package/lib/host/types/settings.d.ts.map +1 -1
- package/lib/host/types/stderr.d.ts +3 -5
- package/lib/host/types/stderr.d.ts.map +1 -1
- package/lib/host/values.d.ts +152 -37
- package/lib/host/values.d.ts.map +1 -1
- package/lib/host/values.js +304 -112
- package/lib/host/values.js.map +1 -1
- package/lib/host/windows/connect-flags.d.ts +19 -8
- package/lib/host/windows/connect-flags.d.ts.map +1 -1
- package/lib/host/windows/connect-flags.js +50 -20
- package/lib/host/windows/connect-flags.js.map +1 -1
- package/lib/host/windows/index.d.ts +1 -1
- package/lib/host/windows/index.d.ts.map +1 -1
- package/lib/host/windows/index.js +1 -1
- package/lib/host/windows/index.js.map +1 -1
- package/lib/host/windows/paths.d.ts +27 -6
- package/lib/host/windows/paths.d.ts.map +1 -1
- package/lib/host/windows/paths.js +40 -13
- package/lib/host/windows/paths.js.map +1 -1
- package/lib/host/windows/run.d.ts.map +1 -1
- package/lib/host/windows/run.js +3 -2
- package/lib/host/windows/run.js.map +1 -1
- package/lib/index.d.ts +72 -56
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +74 -55
- package/lib/index.js.map +1 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +35 -14
- package/cordis.patch.yml +0 -5
package/lib/client.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/client/index.ts", "../src/client/card/index.ts", "dsh-css:/home/roberto/dev/dsh/dsh-chrome-mcp/src/client/styles/ChromeMcpCard.module.css", "../src/client/card/flags.ts", "../src/client/plugin-meta.ts", "../src/client/card/icons.ts", "../src/client/card/rows.ts", "../src/client/card/picker.ts", "../src/client/card/dialog.ts", "../src/client/card/run-actions.ts", "../src/client/card/toggle.ts", "../src/client/
|
|
4
|
-
"sourcesContent": ["/**\n * @comecaramelos/dsh-chrome-mcp \u2014 browser half, public surface.\n *\n * The one module the bundler walks, so the emitted `client.js` exports exactly\n * what the shell consumes: `apply` (mount the card) and `inject` (the services\n * this half needs). The two poll budgets ride on the surface for the same\n * test-facing reason \u2014 the loader ignores them. Everything behind these\n * re-exports stays an implementation detail, so tests import the bundle,\n * never a module inside it.\n *\n * Re-export only: nothing here decides anything.\n */\nexport { apply } from \"./apply.js\";\nexport { inject } from \"./plugin-meta.js\";\nexport { CHECK_POLL_TICK_MS, CHECK_POLL_TIMEOUT_MS } from \"./controller/index.js\";\n", "/**\n * Browser half \u2014 the settings/status card.\n *\n * Registers one card into the shared `settings.plugin.item` slot (Settings \u2192\n * Plugins \u2192 Plugin configuration), keyed by the `chrome-mcp` settings namespace\n * the host half serves. Collapsible like the stock plugin cards \u2014 closed by\n * default, the header as its disclosure button \u2014 with the header carrying the\n * status dot.\n *\n * The body is three catalog blocks, the same shape and in the same order the\n * sibling card (`dsh-docker-desktop-mcp`) carries: the named executable picker\n * (the pill the bridge actually launches with, over the saved-executable rows,\n * which the fetch action refreshes through the choose-to-add dialog), the extra\n * flags rows, and the \"Reduce log output\" toggle. Both row lists are the same\n * widget read through different fields, and they live in ./rows.ts. Two blocks\n * sit alongside them as this plugin's extensions \u2014 the WSL + Windows-executable\n * notice, and the probe result line under the picker's rows.\n *\n * There is no \"auto\" mode anywhere: the rows are what is available, what gets\n * picked stays picked, and a picked path that later stops running is reported\n * broken rather than silently re-resolved.\n *\n * This file is only the body's composition. The imperative run logic \u2014 the\n * fetch and Windows actions with their busy/dialog/clock state \u2014 lives in\n * ./run-actions.ts, what one served snapshot means lives in ./view.ts, and the\n * blocks it assembles live alongside:\n *\n * ./view.ts what one served snapshot means (options, notes, the dot)\n * ./run-actions.ts the imperative runs + their state (busy, dialog, clock)\n * ./picker.ts the executable picker: pill + saved-row catalog\n * ./flags.ts the extra-flags rows (the one-field reading of ./rows.ts)\n * ./rows.ts the one row list both catalogs render\n * ./toggle.ts the \"Reduce log output\" catalog block\n * ./dialog.ts the choose-to-add modal a fetch opens\n * ./icons.ts the icon paths the shell primitives do not carry\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport * as react from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport type { CatalogEntry } from \"../catalog.js\";\nimport type { ChromeExecutableStatus } from \"../controller/index.js\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { ExtraFlagsEditor } from \"./flags.js\";\nimport { CHEVRON_PATH } from \"./icons.js\";\nimport { CatalogPicker } from \"./picker.js\";\nimport { CandidateDialog } from \"./dialog.js\";\nimport { useRunActions } from \"./run-actions.js\";\nimport { LogOutputToggle } from \"./toggle.js\";\nimport { describeCard, executableLabel, isBroken, probeAge, windowsChromeButton } from \"./view.js\";\n\n/** One option's label: the row's name, plus the tag the run gave a broken one. */\nfunction optionLabel(view: ReturnType<typeof describeCard>, id: string, t: (key: string) => string): string {\n const label = executableLabel(view, id);\n return isBroken(view, id) ? label + \" (\" + t(\"unavailableSuffix\") + \")\" : label;\n}\n\n/**\n * Hook result for the card component: locale copy, the snapshot selector, and\n * the controller-backed actions (all injected by the slot registration).\n */\nexport interface ChromeMcpCardProps {\n t: (key: string) => string;\n useChromeMcpCard: <T>(selector: (snapshot: any) => T) => T;\n saveFlags: (flags: string[]) => Promise<void>;\n toggleStderr: () => Promise<void>;\n /** Write the selected executable id (persisted; bridge restart). */\n selectExecutable: (id: string) => Promise<void>;\n /** Save the whole saved-executables rows list (host re-runs the run). */\n saveExecutables: (entries: CatalogEntry[]) => Promise<void>;\n /** Ask the host to run the executable discovery, answering with every\n * candidate it looked at and what it said about each. */\n refreshExecutables: () => Promise<ChromeExecutableStatus[]>;\n /** Merge ids picked in the dialog into the saved rows. */\n addExecutables: (ids: string[]) => Promise<void>;\n /** Ask the host to drive a Windows-side Chrome in connect mode (locate,\n * prereq, launch, connect \u2014 all host-side; the answer lands in\n * `windowsChromeStatus`). */\n openWindowsChrome: () => Promise<void>;\n /** One mirror re-read (used when the card opens). */\n refresh: () => Promise<void>;\n}\n\n/**\n * Render the DSH Chrome MCP settings/status card.\n * @param props - locale copy, the card snapshot hook, and its actions.\n * @returns the card, or nothing until the namespace is served.\n */\nexport function ChromeMcpCard(props: ChromeMcpCardProps) {\n const t = props.t;\n const state = props.useChromeMcpCard((snapshot) => snapshot);\n const openState = react.useState(false);\n const open = openState[0];\n const setOpen = openState[1];\n const menuState = react.useState(false);\n const menuOpen = menuState[0];\n const setMenuOpen = menuState[1];\n const bodyId = react.useId();\n // The imperative half \u2014 the two host runs and the busy/dialog/clock state\n // they own \u2014 lives in ./run-actions.ts so this body stays composition.\n const runs = useRunActions({\n refreshExecutables: props.refreshExecutables,\n openWindowsChrome: props.openWindowsChrome,\n addExecutables: props.addExecutables\n });\n if (!state.available) return null;\n\n const view = describeCard(state);\n const rows = view.executableEntries;\n const savedIds = rows.map((entry: CatalogEntry) => entry.id);\n const options = view.executableOptions.map((option: { id: string }) => ({ id: option.id, label: optionLabel(view, option.id, t) }));\n // The error dot: red while an error line is present (a captured bridge/tool\n // failure or a rejected action), or the known \"executable not found\" state;\n // the tooltip always holds what the dot stands for.\n const dotLabel = view.error !== \"\" ? view.error : t(\"chromeMissing\");\n const dotAria = view.dotIsError || view.missing ? t(\"statusError\") : t(\"statusOk\");\n\n const windowsButton = windowsChromeButton(view);\n const windowsDisabled = windowsButton.disabled || runs.windowsRunning || !state.writable;\n const windowsBusy = windowsButton.busy || runs.windowsRunning;\n\n // Connect mode: the bridge connects instead of launching \u2014 so what the pill\n // claims is the connect address, not a local executable the host no longer\n // launches, probes or may not even have.\n const connectLabel =\n view.windowsChrome.port > 0\n ? t(\"connectModeLabel\") + \" (http://127.0.0.1:\" + String(view.windowsChrome.port) + \")\"\n : t(\"connectModeLabel\");\n const selectedLabel = view.connectMode\n ? connectLabel\n : view.effectivePath === \"\"\n ? t(\"executableNone\")\n : executableLabel(view, view.effectivePath);\n\n // What the last run answered for the **selected** executable \u2014 the line\n // beneath the rows that produced it. While a run is in flight the line says\n // so: a healthy host leaves the version unchanged, so without this the\n // action would only be a label flip. A failed run clears the version\n // host-side, so the line never claims what it did not answer with.\n const statusLine = runs.running\n ? jsx(\"p\", { className: STYLES.result, role: \"status\", children: t(\"probing\") })\n : view.version === \"\"\n ? null\n : jsxs(\"p\", {\n className: STYLES.result,\n role: \"status\",\n children: [\n t(\"versionLabel\"),\n jsx(\"span\", { className: STYLES.resultValue, children: view.version }),\n runs.lastProbedAt === 0 ? null : jsx(\"span\", { className: STYLES.resultAge, children: probeAge(runs.lastProbedAt, runs.clock, t) })\n ]\n });\n\n return jsx(\"li\", {\n className: STYLES.card + (open ? \" \" + STYLES.cardOpen : \"\"),\n children: [\n jsxs(\"button\", {\n type: \"button\",\n className: STYLES.header,\n \"aria-expanded\": open,\n \"aria-label\": t(open ? \"collapse\" : \"expand\") + \": \" + t(\"title\"),\n \"aria-controls\": bodyId,\n onClick: () => {\n setOpen(!open);\n if (!open && typeof props.refresh === \"function\") void props.refresh();\n },\n children: [\n jsxs(\"span\", {\n className: STYLES.headText,\n children: [\n jsxs(\"div\", {\n className: STYLES.nameRow,\n children: [\n jsx(\"span\", { className: STYLES.name, children: t(\"title\") }),\n view.dotIsError || view.missing\n ? jsx(\"span\", {\n className: STYLES.dot + \" \" + STYLES.dotError,\n role: \"img\",\n \"aria-label\": dotAria,\n title: dotLabel\n })\n : null\n ]\n }),\n jsx(\"span\", { className: STYLES.desc, children: t(\"description\") })\n ]\n }),\n jsx(\"svg\", {\n width: 14,\n height: 14,\n className: STYLES.chevron + (open ? \" \" + STYLES.chevronOpen : \"\"),\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: jsx(\"path\", { d: CHEVRON_PATH, fill: \"currentColor\" })\n })\n ]\n }),\n open\n ? jsxs(\"div\", {\n id: bodyId,\n className: STYLES.body,\n children: [\n !state.writable\n ? jsx(\"p\", { className: STYLES.readOnly, role: \"status\", children: t(\"readOnly\") })\n : null,\n jsx(CatalogPicker, {\n t: t,\n entries: rows,\n options: options,\n idPlaceholder: t(\"executableIdPlaceholder\"),\n namePlaceholder: t(\"namePlaceholder\"),\n selectedId: view.effectivePath,\n selectedLabel: selectedLabel,\n selectedTitle: view.connectMode ? connectLabel : view.effectivePath !== \"\" ? view.effectivePath : selectedLabel,\n writable: state.writable,\n busy: runs.running,\n menuOpen: menuOpen,\n setMenuOpen: setMenuOpen,\n connectMode: view.connectMode,\n selectorLabel: t(\"executableLabel\"),\n hint: view.connectMode ? t(\"connectModeHint\") : t(\"executableHint\"),\n windowsLabel: windowsBusy ? t(\"openWindowsChromeBusy\") : t(windowsButton.labelKey),\n windowsTitle: t(windowsButton.titleKey),\n windowsDisabled: windowsDisabled,\n windowsOnOpen: runs.runWindowsChrome,\n rowsLabel: t(\"executableRows\"),\n emptyText: t(\"executableEmpty\"),\n idLabel: t(\"executableIdLabel\"),\n nameLabel: t(\"executableNameLabel\"),\n removeLabel: t(\"removeExecutable\"),\n addLabel: t(\"addExecutable\"),\n refreshLabel: t(\"fetchExecutables\"),\n busyLabel: t(\"fetching\"),\n select: (id: string) => {\n if (typeof props.selectExecutable === \"function\") void props.selectExecutable(id);\n },\n saveEntries: (entries: CatalogEntry[]) => props.saveExecutables(entries),\n refresh: runs.runFetch,\n statusLine: statusLine\n }),\n // The one state no control of this card can express: the\n // host runs under WSL and what is selected is a Windows\n // executable \u2014 which the bridge cannot launch, however\n // healthy its `--version` answer looks. Nothing has failed\n // yet, so this is a notice (static copy, shown only while\n // the host reports the state), not a third error surface:\n // the required configuration differs.\n view.wslWindowsExecutable\n ? jsxs(\"div\", {\n className: STYLES.notice,\n role: \"note\",\n children: [\n jsx(\"div\", { className: STYLES.noticeTitle, children: t(\"wslWindowsTitle\") }),\n jsx(\"div\", { className: STYLES.noticeBody, children: t(\"wslWindowsNote\") })\n ]\n })\n : null,\n jsx(ExtraFlagsEditor, {\n t: t,\n flags: Array.isArray(state.extraFlags) ? state.extraFlags : [],\n defaultFlags: Array.isArray(state.defaultExtraFlags) ? state.defaultExtraFlags : [],\n wslFlags: Array.isArray(state.wslExtraFlags) ? state.wslExtraFlags : [],\n writable: state.writable,\n saveFlags: props.saveFlags\n }),\n jsx(LogOutputToggle, {\n t: t,\n checked: view.reduceChecked,\n disabled: !state.writable,\n onToggle: props.toggleStderr\n }),\n state.lastError\n ? jsx(\"p\", { className: STYLES.error, role: \"status\", children: state.lastError })\n : null,\n state.actionError\n ? jsx(\"p\", { className: STYLES.error, role: \"status\", children: state.actionError })\n : null,\n runs.dialog !== null\n ? jsx(CandidateDialog, {\n t: t,\n candidates: runs.dialog.candidates,\n savedIds: savedIds,\n title: t(\"dialogExecutablesTitle\"),\n description: t(\"dialogExecutablesDescription\"),\n searchPlaceholder: t(\"searchExecutables\"),\n onAdd: runs.addFromDialog,\n onClose: runs.closeDialog\n })\n : null\n ]\n })\n : null\n ]\n });\n}\n", "export const cssText = \".e5pfpa_card{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-3);border-radius:16px;list-style:none;transition:border-color .16s,background .16s}.e5pfpa_card:hover{border-color:var(--dsw-alias-label-dimmed)}.e5pfpa_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.e5pfpa_header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}.e5pfpa_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.e5pfpa_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.e5pfpa_nameRow{align-items:center;gap:8px;min-width:0;display:flex}.e5pfpa_name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}.e5pfpa_desc{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}.e5pfpa_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.e5pfpa_chevronOpen{transform:rotate(180deg)}.e5pfpa_body{border-top:.5px solid var(--dsw-alias-border-l2);display:flex;flex-direction:column;gap:10px;margin:0 16px;padding:12px 0}.e5pfpa_field{align-items:flex-start;gap:4px;display:flex;flex-direction:column;width:100%}.e5pfpa_fieldRow{align-items:center;gap:8px;display:flex;width:100%}.e5pfpa_fieldTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px;flex:1;min-width:0}.e5pfpa_fieldDesc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px;width:100%}.e5pfpa_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.e5pfpa_selector:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_selector:disabled{cursor:default}.e5pfpa_selectorWrap{display:flex}.e5pfpa_pillChevron{flex:none}.e5pfpa_row{display:flex;gap:10px;align-items:center}.e5pfpa_button{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:.5px solid var(--dsw-alias-border-l3);border-radius:14px;cursor:pointer;font-size:12px;line-height:18px;color:var(--dsw-alias-label-primary);background:transparent;padding:0 10px;height:28px}.e5pfpa_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_button:disabled{cursor:not-allowed;opacity:.4}.e5pfpa_button:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_readOnly{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.e5pfpa_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}.e5pfpa_dot{box-sizing:border-box;corner-shape:round;border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}.e5pfpa_dotError{background:var(--dsw-alias-state-error-primary)}.e5pfpa_empty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.e5pfpa_catalog{flex-direction:column;align-items:stretch;gap:10px;display:flex}.e5pfpa_catalog+.e5pfpa_catalog{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:12px}.e5pfpa_catalog>.e5pfpa_linkButton{align-self:flex-start}.e5pfpa_catalog>.e5pfpa_linkButtonRow{align-self:flex-start;display:flex;gap:8px;align-items:center}.e5pfpa_linkButton{box-sizing:border-box;border:none;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer;border-radius:14px;align-items:center;height:28px;padding:0 10px;font:inherit;font-size:12px;line-height:18px;display:inline-flex}.e5pfpa_linkButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.e5pfpa_linkButton:disabled{opacity:.4;cursor:default}.e5pfpa_linkButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_catalogEntry{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-module-platform);border-radius:10px;padding:6px}.e5pfpa_catalogRow{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;align-items:center;gap:6px;display:grid}.e5pfpa_catalogInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;height:28px;padding:0 10px;font:inherit;font-size:14px;line-height:22px;min-width:0;width:100%}.e5pfpa_catalogInput::placeholder{color:var(--dsw-alias-label-dimmed)}.e5pfpa_catalogInput:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.e5pfpa_catalogInput:disabled{opacity:.6;cursor:default}.e5pfpa_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.e5pfpa_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.e5pfpa_iconButton:disabled{opacity:.4;cursor:default}.e5pfpa_iconButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_iconButtonDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.e5pfpa_addButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:14px;align-self:flex-start;align-items:center;gap:4px;height:28px;padding:0 10px;font:inherit;font-size:12px;line-height:18px;display:inline-flex}.e5pfpa_addButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_addButton:disabled{opacity:.4;cursor:default}.e5pfpa_disclosure{flex-direction:column;gap:10px;display:flex}.e5pfpa_disclosureSummary{color:var(--dsw-alias-label-secondary);cursor:pointer;list-style:none;align-items:center;gap:6px;font-size:12px;line-height:18px;user-select:none;display:flex}.e5pfpa_disclosureSummary::-webkit-details-marker{display:none}.e5pfpa_disclosureSummary:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-radius:6px}.e5pfpa_disclosureLabel:before{content:\\\"\\\\25b8\\\";display:inline-block;margin-right:6px;transition:transform .16s}.e5pfpa_disclosure[open] .e5pfpa_disclosureLabel:before{transform:rotate(90deg)}.e5pfpa_disclosureCount{color:var(--dsw-alias-label-tertiary)}.e5pfpa_disclosureBody{flex-direction:column;gap:10px;display:flex}.e5pfpa_disclosureBody>.e5pfpa_linkButton{align-self:flex-start}.e5pfpa_disclosureBody>.e5pfpa_linkButtonRow{align-self:flex-start;display:flex;gap:8px;align-items:center}.e5pfpa_toggleLabel{align-items:center;display:inline-flex;flex:none}.e5pfpa_fetchDialog{background:color-mix(in srgb,var(--dsw-alias-label-primary) 28%,transparent);align-items:center;justify-content:center;display:flex;position:fixed;inset:0;z-index:90}.e5pfpa_dialogContent{background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l3);border-radius:16px;flex-direction:column;gap:10px;width:min(520px,calc(100vw - 32px));max-height:min(620px,calc(100vh - 48px));display:flex;overflow:hidden}.e5pfpa_dialogHeader{align-items:center;gap:8px;padding:14px 16px 0;display:flex}.e5pfpa_dialogTitle{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:22px;flex:1;min-width:0;margin:0}.e5pfpa_dialogClose{box-sizing:border-box;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;flex:none;width:28px;height:28px;display:inline-flex}.e5pfpa_dialogClose:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.e5pfpa_dialogClose:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_dialogDescription{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;margin:0;padding:0 16px}.e5pfpa_dialogBody{flex-direction:column;flex:1;gap:8px;min-height:0;padding:0 16px;display:flex}.e5pfpa_candidateToolbar{align-items:center;gap:8px;display:flex}.e5pfpa_candidateSearch{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;height:32px;padding:0 10px;font:inherit;font-size:12px;line-height:20px;flex:1;min-width:0}.e5pfpa_candidateSearch::placeholder{color:var(--dsw-alias-label-dimmed)}.e5pfpa_candidateSearch:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.e5pfpa_candidateList{flex-direction:column;gap:2px;margin:0;padding:0 0 10px;list-style:none;overflow-y:auto;display:flex}.e5pfpa_candidate{border-radius:8px;padding:4px 6px}.e5pfpa_candidate:hover{background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_candidateLabel{align-items:center;gap:8px;min-width:0;display:flex}.e5pfpa_candidateLabel input[type=checkbox]{accent-color:var(--dsw-alias-brand-primary);flex:none;margin:0}.e5pfpa_candidateId{color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.e5pfpa_candidateNote{color:var(--dsw-alias-label-tertiary);flex:none;font-size:11px;line-height:16px}.e5pfpa_dialogFooter{border-top:.5px solid var(--dsw-alias-border-l2);align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.e5pfpa_dialogButton{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:.5px solid var(--dsw-alias-border-l3);border-radius:16px;cursor:pointer;font-size:13px;line-height:20px;color:var(--dsw-alias-label-primary);background:transparent;padding:0 12px;height:32px}.e5pfpa_dialogButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_dialogButton:disabled{cursor:not-allowed;opacity:.4}.e5pfpa_dialogButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_dialogButtonPrimary{color:var(--dsw-alias-label-primary);font-weight:600}.e5pfpa_selectorLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.e5pfpa_result{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.e5pfpa_resultValue{color:var(--dsw-alias-label-secondary);margin-left:4px}.e5pfpa_resultAge{color:var(--dsw-alias-label-dimmed);margin-left:4px}.e5pfpa_notice{flex-direction:column;gap:4px;display:flex;border:.5px solid var(--dsw-alias-border-l3);border-radius:10px;background:var(--dsw-alias-bg-layer-1);padding:8px 10px}.e5pfpa_noticeTitle{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:600;line-height:18px}.e5pfpa_noticeBody{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.e5pfpa_docsLink{color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;display:inline-flex;text-decoration:none;font-size:12px;line-height:1.5}.e5pfpa_docsLinkLabel{text-decoration:none}.e5pfpa_docsLink:hover{color:var(--dsw-alias-brand-primary)}.e5pfpa_docsLink:hover .e5pfpa_docsLinkLabel{text-decoration:underline}.e5pfpa_docsLink:hover .e5pfpa_docsIcon{color:var(--dsw-alias-brand-primary)}.e5pfpa_docsIcon{color:var(--dsw-alias-label-tertiary);flex:none}.e5pfpa_docsLink:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-radius:4px}.e5pfpa_catalogRowSingle{grid-template-columns:minmax(0,1fr) auto}.e5pfpa_catalogInputMono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}\\n\";\nexport default {\"card\":\"e5pfpa_card\",\"cardOpen\":\"e5pfpa_cardOpen\",\"header\":\"e5pfpa_header\",\"headText\":\"e5pfpa_headText\",\"nameRow\":\"e5pfpa_nameRow\",\"name\":\"e5pfpa_name\",\"desc\":\"e5pfpa_desc\",\"chevron\":\"e5pfpa_chevron\",\"chevronOpen\":\"e5pfpa_chevronOpen\",\"body\":\"e5pfpa_body\",\"field\":\"e5pfpa_field\",\"fieldRow\":\"e5pfpa_fieldRow\",\"fieldTitle\":\"e5pfpa_fieldTitle\",\"fieldDesc\":\"e5pfpa_fieldDesc\",\"selector\":\"e5pfpa_selector\",\"selectorWrap\":\"e5pfpa_selectorWrap\",\"pillChevron\":\"e5pfpa_pillChevron\",\"row\":\"e5pfpa_row\",\"button\":\"e5pfpa_button\",\"readOnly\":\"e5pfpa_readOnly\",\"error\":\"e5pfpa_error\",\"dot\":\"e5pfpa_dot\",\"dotError\":\"e5pfpa_dotError\",\"empty\":\"e5pfpa_empty\",\"catalog\":\"e5pfpa_catalog\",\"linkButton\":\"e5pfpa_linkButton\",\"linkButtonRow\":\"e5pfpa_linkButtonRow\",\"catalogEntry\":\"e5pfpa_catalogEntry\",\"catalogRow\":\"e5pfpa_catalogRow\",\"catalogInput\":\"e5pfpa_catalogInput\",\"iconButton\":\"e5pfpa_iconButton\",\"iconButtonDanger\":\"e5pfpa_iconButtonDanger\",\"addButton\":\"e5pfpa_addButton\",\"disclosure\":\"e5pfpa_disclosure\",\"disclosureSummary\":\"e5pfpa_disclosureSummary\",\"disclosureLabel\":\"e5pfpa_disclosureLabel\",\"disclosureCount\":\"e5pfpa_disclosureCount\",\"disclosureBody\":\"e5pfpa_disclosureBody\",\"toggleLabel\":\"e5pfpa_toggleLabel\",\"fetchDialog\":\"e5pfpa_fetchDialog\",\"dialogContent\":\"e5pfpa_dialogContent\",\"dialogHeader\":\"e5pfpa_dialogHeader\",\"dialogTitle\":\"e5pfpa_dialogTitle\",\"dialogClose\":\"e5pfpa_dialogClose\",\"dialogDescription\":\"e5pfpa_dialogDescription\",\"dialogBody\":\"e5pfpa_dialogBody\",\"candidateToolbar\":\"e5pfpa_candidateToolbar\",\"candidateSearch\":\"e5pfpa_candidateSearch\",\"candidateList\":\"e5pfpa_candidateList\",\"candidate\":\"e5pfpa_candidate\",\"candidateLabel\":\"e5pfpa_candidateLabel\",\"candidateId\":\"e5pfpa_candidateId\",\"candidateNote\":\"e5pfpa_candidateNote\",\"dialogFooter\":\"e5pfpa_dialogFooter\",\"dialogButton\":\"e5pfpa_dialogButton\",\"dialogButtonPrimary\":\"e5pfpa_dialogButtonPrimary\",\"selectorLabel\":\"e5pfpa_selectorLabel\",\"result\":\"e5pfpa_result\",\"resultValue\":\"e5pfpa_resultValue\",\"resultAge\":\"e5pfpa_resultAge\",\"notice\":\"e5pfpa_notice\",\"noticeTitle\":\"e5pfpa_noticeTitle\",\"noticeBody\":\"e5pfpa_noticeBody\",\"docsLink\":\"e5pfpa_docsLink\",\"docsLinkLabel\":\"e5pfpa_docsLinkLabel\",\"docsIcon\":\"e5pfpa_docsIcon\",\"catalogRowSingle\":\"e5pfpa_catalogRowSingle\",\"catalogInputMono\":\"e5pfpa_catalogInputMono\"};", "/**\n * The extra-flags editor \u2014 the one catalog block the reference card has no\n * equivalent for (it carries no free-form list field). It is the flags half of\n * the two halves `./rows.ts` renders: the same rows, read through the single\n * field a flag actually has \u2014 the value itself \u2014 instead of the executable\n * block's path + display name. Nothing about the list's rules changes on the\n * way here: a blur/Enter commits the whole list, a delete persists on the spot,\n * and a blank added row is local until it carries text.\n *\n * The block keeps the shape the reference's catalogs carry: the two-row field\n * (title with the configuration-guide link inline, hint below) and then the\n * rows, folded behind the same collapsed `<details>` disclosure the executable\n * block uses, so the two catalogs read as one widget shape.\n *\n * The write goes through `saveFlags` (the host validates the list, then\n * restarts the bridge connection in place). An empty row is never persisted:\n * the write side rejects an empty flag, so a row with no text is dropped on the\n * way out \u2014 the same rule the executable rows follow with an id-less row.\n *\n * The **Restore defaults** control is the list's own action: it keeps every\n * flag the rows already carry and appends only the defaults still missing (the\n * host serves the defaults list, so the card carries no copy of it), writing\n * the merged list exactly the way any other row write does \u2014 defaults are\n * recovered, nothing that is there is dropped.\n *\n * **Flags WSL** rides the same list with the same merge rule against a\n * different served list: it keeps everything the rows carry, appends only the\n * recommended WSL \u2194 Windows flags still missing, and modifies or drops nothing\n * (the host serves the recommended list too, the same way it serves the\n * defaults).\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { CONFIGURATION_URL } from \"../plugin-meta.js\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { DOCS_PATHS } from \"./icons.js\";\nimport { RowList } from \"./rows.js\";\n\n/** One flag list per row: the single field, held as one column. */\nfunction rowsOf(flags: readonly string[]): string[][] {\n return flags.map((flag: string) => [flag]);\n}\n\n/** The rows as a plain flags list: trimmed, with a row still without a value\n * dropped rather than persisted (the write side rejects an empty flag) and\n * duplicates folded \u2014 first row wins, the rule the saved executable rows\n * already follow for a repeated id. */\nfunction flagsOf(rows: readonly string[][]): string[] {\n var flags: string[] = [];\n for (const row of rows) {\n var flag = typeof row === \"undefined\" || row === null ? \"\" : String(row[0] ?? \"\").trim();\n if (flag === \"\") continue;\n if (flags.indexOf(flag) !== -1) continue;\n flags.push(flag);\n }\n return flags;\n}\n\nexport function ExtraFlagsEditor(props: any): any {\n var t = props.t;\n var writable = props.writable;\n var flags: string[] = Array.isArray(props.flags) ? props.flags : [];\n var defaults: string[] = Array.isArray(props.defaultFlags) ? props.defaultFlags : [];\n var wsl: string[] = Array.isArray(props.wslFlags) ? props.wslFlags : [];\n var save = (next: string[][]) => {\n if (typeof props.saveFlags !== \"function\") return Promise.resolve();\n return Promise.resolve(props.saveFlags(flagsOf(next)));\n };\n /**\n * Restore defaults without dropping anything: every flag the rows carry is\n * kept, and only the host-served defaults still missing are appended. The\n * write is an ordinary whole-list row write, so the local view and the\n * saved list never disagree.\n */\n var restoreAction = (visible: string[][]) => {\n var current = flagsOf(visible);\n var merged = current.concat(defaults.filter((flag: string) => current.indexOf(flag) === -1));\n return jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n // The defaults list is host-served \u2014 with nothing to recover there\n // is nothing to do.\n disabled: !writable || defaults.length === 0,\n title: t(\"flagsRestoreTitle\"),\n onClick: () => {\n if (!writable) return;\n save(merged.map((flag: string) => [flag]));\n },\n children: t(\"flagsRestore\")\n });\n };\n /**\n * **Flags WSL** \u2014 the list's other append action, the same merge rule read\n * through the recommended list the host serves instead of the defaults:\n * every flag the rows already carry stays exactly where it is (nothing is\n * dropped, nothing is modified), and only the recommended flags still\n * missing are appended. As with the defaults, the card carries no copy of\n * the list \u2014 it is what the host answers with that gets added.\n */\n var wslAction = (visible: string[][]) => {\n var current = flagsOf(visible);\n var merged = current.concat(wsl.filter((flag: string) => current.indexOf(flag) === -1));\n return jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n // The recommended list is host-served \u2014 with every one of them\n // already in the rows there is nothing left to add.\n disabled: !writable || wsl.length === 0,\n title: t(\"flagsWslTitle\"),\n onClick: () => {\n if (!writable) return;\n save(merged.map((flag: string) => [flag]));\n },\n children: t(\"flagsWsl\")\n });\n };\n /** Both list actions ride the list's one action slot, side by side in one\n * line \u2014 they do the same job against two different host-served lists. */\n var renderActions = (visible: string[][]) =>\n jsxs(\"div\", {\n className: STYLES.linkButtonRow,\n children: [restoreAction(visible), wslAction(visible)]\n });\n return jsxs(\"div\", {\n className: STYLES.catalog,\n children: [\n jsxs(\"div\", {\n className: STYLES.field,\n children: [\n jsxs(\"div\", {\n className: STYLES.fieldRow,\n children: [\n jsx(\"span\", { className: STYLES.fieldTitle, children: t(\"flagsTitle\") }),\n // The guide link rides the same field row the picker's\n // pill occupies.\n jsxs(\"a\", {\n className: STYLES.docsLink,\n href: CONFIGURATION_URL,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n title: t(\"docsMessage\"),\n children: [\n jsx(\"svg\", {\n className: STYLES.docsIcon,\n width: 14,\n height: 14,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n \"aria-hidden\": \"true\",\n children: DOCS_PATHS.map((d: string, at: number) => jsx(\"path\", { d: d }, at))\n }),\n jsx(\"span\", { className: STYLES.docsLinkLabel, children: t(\"docsLinkLabel\") })\n ]\n })\n ]\n }),\n jsx(\"div\", { className: STYLES.fieldDesc, children: t(\"flagsHint\") })\n ]\n }),\n // One row per saved flag: the single field is the flag itself, and\n // the two append controls \u2014 Restore defaults and Flags WSL \u2014 ride\n // the list's action line.\n jsx(RowList, {\n values: rowsOf(flags),\n labels: [t(\"flagsValueLabel\")],\n placeholders: [t(\"flagsValuePlaceholder\")],\n writable: writable,\n save: save,\n renderAction: renderActions,\n emptyText: t(\"flagsEmpty\"),\n rowsLabel: t(\"flagsRows\"),\n addLabel: t(\"addFlag\"),\n removeLabel: t(\"removeFlag\"),\n rowClassName: STYLES.catalogRowSingle,\n inputClassName: STYLES.catalogInputMono,\n disclosure: true\n })\n ]\n });\n}\n", "/**\n * Browser half \u2014 identity and the services the shell must resolve.\n *\n * The identifiers are contracts with the host half: the settings namespace key\n * is also the card's slot key, the locale namespace is the lookup root for\n * every string the card renders, and the plugin id tags every DOM node this\n * half owns. The browser half is emitted on its own, so it cannot import\n * ./host/constants.ts and they are mirrored here \u2014 `test/client.test.mjs`\n * pins the mirror against the host half's export so a drift fails loudly.\n */\n\n/** Fixed settings namespace served by the host half; also the slot key. */\nexport const SETTINGS_NAMESPACE = \"chrome-mcp\";\n\n/** Locale dictionary namespace this half registers and renders from. */\nexport const LOCALE_NAMESPACE = \"chromeMcp\";\n\n/** npm id of this bundle; tags the injected `style` element. */\nexport const PLUGIN_ID = \"@comecaramelos/dsh-chrome-mcp\";\n\n/** Upstream configuration docs link (must match host CONFIGURATION_DOCS_URL). */\nexport const CONFIGURATION_URL =\n \"https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/configuration.md\";\n\n/**\n * Services the shell must resolve before `apply` runs: the settings scope (the\n * card's whole data source), the locale service (copy), and the slot service\n * (where the card is registered).\n */\nexport const inject = [\"slots\", \"locale\", \"settingsScope\"];\n", "/**\n * The card's icon paths \u2014 the shapes the stock primitives do not carry.\n *\n * Every card icon is copied from the matching shell primitive so the card\n * matches the rest of the UI pixel for pixel; a shell icon bump is the only\n * reason to touch these. The external-link mark is the exception: no shell\n * primitive carries it, so it is the stroke idiom the reference card uses for\n * the same purpose \u2014 stroke-only paths on a 24-unit viewBox, `currentColor`\n * carried by the stroke, rounded caps and joins.\n */\n\n/** Chevron matching the shell's IconChevronDownOutline14 primitive. */\nexport const CHEVRON_PATH =\n \"M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z\";\n\n/** Trash icon for a row's delete button (stock 16px stroke idiom). */\nexport const TRASH_PATH =\n \"M2.5 4h11M6.5 4V2.5h3V4M4 4l.7 9a1 1 0 001 .9h4.6a1 1 0 001-.9L12 4M6.5 6.8v4.4M9.5 6.8v4.4\";\n\n/** The two diagonals of the fetch dialog's close icon (stock 16px cross). */\nexport const CLOSE_PATHS = [\n \"M14.1168 13.197L13.197 14.1167L1.8833 2.80303L2.80309 1.88324L14.1168 13.197Z\",\n \"M13.197 1.88326L14.1168 2.80305L2.80309 14.1168L1.8833 13.197L13.197 1.88326Z\"\n];\n\n/** External-link mark, in the same stroke idiom. */\nexport const DOCS_PATHS = [\n \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\",\n \"M15 3h6v6\",\n \"M10 14 21 3\"\n];\n", "/**\n * The rows list both catalogs render \u2014 the reference card's catalog rows, held\n * in one module so the saved executables and the extra flags read as one widget\n * instead of two lookalikes.\n *\n * A row is a bordered box of text fields in column order, every box ending on\n * the row's delete control; the list opens on the empty line and closes on the\n * add control. The executable block hands it two fields (the path and the\n * display name) folded behind the reference card's \"Customized settings\"\n * disclosure, the flags block a single field (the flag itself). Both now fold\n * behind the same collapsed `<details>` disclosure \u2014 the two blocks read as one\n * widget shape, differing only in how many fields a row carries.\n *\n * Like the reference card's `editing` map, rows come from the served snapshot\n * with a local draft overlaying them only while an edit is pending: typing does\n * not persist, a blur/Enter commits the whole list, a delete persists\n * immediately, and \"add\" appends a local blank row that only becomes a saved row\n * once it is typed in. Once the field is idle, the next host push (a discovery\n * merge that added rows, or a defaults restore) becomes the view again.\n *\n * The list action belongs to the caller (`renderAction`) and is handed the rows\n * exactly as they are visible plus the write that persists them: the picker's\n * **Fetch executables** asks the host to re-scan the machine's list, and the\n * flags block lines its two append controls up in the one slot \u2014 **Restore\n * defaults** appends what the defaults list is missing to precisely what the\n * rows already carry, **Flags WSL** the missing recommended WSL \u2194 Windows\n * flags the same way.\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport * as react from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { TRASH_PATH } from \"./icons.js\";\n\n/** One row's field values, in column order (the path + the name, or the flag). */\nexport type RowValues = string[];\n\n/** Persist one whole row list; the write side re-normalizes what lands. */\nexport type SaveRows = (rows: RowValues[]) => unknown;\n\n/**\n * Render one catalog's row list \u2014 the empty line, the rows and the add control.\n * @param props - the served rows (`values`), the per-column copy (`labels`,\n * `placeholders`), the write (`save`) and the shape knobs: `disclosure` folds\n * the rows behind a `<details>` (the two-field executable list, which sits\n * under the pill), `rowClassName` / `inputClassName` carry the single-field\n * column variant a block needs when the two-column grid would not fit.\n */\nexport function RowList(props: any): any {\n var served: RowValues[] = Array.isArray(props.values) ? props.values : [];\n var writable = props.writable === true;\n var busy = props.busy === true;\n var labels: string[] = Array.isArray(props.labels) ? props.labels : [];\n var placeholders: string[] = Array.isArray(props.placeholders) ? props.placeholders : [];\n var columns = Math.max(1, labels.length);\n var blankRow: RowValues = [];\n for (var blank = 0; blank < columns; blank++) blankRow.push(\"\");\n var draftState = react.useState<RowValues[] | null>(null);\n var draft = draftState[0];\n var setDraft = draftState[1];\n var focusedState = react.useState(false);\n var focused = focusedState[0];\n var setFocused = focusedState[1];\n var servedKey = JSON.stringify(served);\n var syncState = react.useState(\"\");\n var servedSync = syncState[0];\n var setServedSync = syncState[1];\n // A host push replaces an idle draft \u2014 that is how a discovery merge that\n // added rows (or a defaults restore) becomes visible again.\n if (servedKey !== servedSync) {\n setServedSync(servedKey);\n if (!focused) setDraft(null);\n }\n var rows: RowValues[] = draft === null ? served : draft;\n\n /**\n * Persist one whole list, and hold the local view to exactly what was\n * written: every structural change (delete, the caller's own action) lands\n * this way, so the draft never disagrees with the write. Deciding whether a\n * write is worth doing belongs to the write side, which normalizes and\n * compares \u2014 the list only hands it rows.\n */\n var save = (next: RowValues[]) => {\n if (typeof props.save !== \"function\") return Promise.resolve();\n setDraft(next);\n return Promise.resolve(props.save(next)).catch(() => { });\n };\n\n var withDraft = (make: (current: RowValues[]) => RowValues[]) => make(draft === null ? served : draft);\n\n var patchRow = (index: number, column: number, value: string) => {\n setFocused(true);\n setDraft(\n withDraft((current: RowValues[]) =>\n current.map((row: RowValues, at: number) =>\n at === index ? row.map((cell: string, field: number) => (field === column ? value : cell)) : row\n )\n )\n );\n };\n\n var removeRow = (index: number) => {\n if (!writable || rows[index] === void 0) return;\n save(rows.filter((_row: RowValues, at: number) => at !== index));\n };\n\n var addRow = () => {\n if (!writable) return;\n // A blank row is local until it carries a value: a write that strips the\n // empty row is what turns it into a saved row \u2014 the draft keeps it\n // visible either way.\n setDraft(withDraft((current: RowValues[]) => current.concat([blankRow])));\n };\n\n /** Idle rows are the truth; only a pending edit has to be written. */\n var commit = () => {\n if (draft === null) return;\n save(rows);\n };\n\n var fieldNode = (row: RowValues, index: number, column: number) =>\n jsx(\"input\", {\n className: props.inputClassName ? STYLES.catalogInput + \" \" + props.inputClassName : STYLES.catalogInput,\n type: \"text\",\n value: row[column] === undefined ? \"\" : row[column],\n placeholder: placeholders[column],\n \"aria-label\": labels[column] + \" \" + (index + 1),\n title: column === 0 ? row[column] : void 0,\n disabled: !writable,\n spellCheck: false,\n autoComplete: \"off\",\n autocapitalize: \"off\",\n onChange: (event: any) => {\n patchRow(index, column, event && event.target ? String(event.target.value ?? \"\") : \"\");\n },\n onFocus: () => setFocused(true),\n onBlur: () => {\n setFocused(false);\n commit();\n },\n onKeyDown: (event: any) => {\n if (event && event.key === \"Enter\") {\n setFocused(false);\n commit();\n }\n }\n }, column);\n\n var entryNode = (row: RowValues, index: number) => {\n var cells: any[] = [];\n var width = row.length === 0 ? columns : row.length;\n for (var column = 0; column < width; column++) cells.push(fieldNode(row, index, column));\n cells.push(\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.iconButton + \" \" + STYLES.iconButtonDanger,\n \"aria-label\": props.removeLabel + \" \" + (index + 1),\n title: props.removeLabel,\n disabled: !writable,\n onClick: () => {\n removeRow(index);\n },\n children: jsx(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n children: jsx(\"path\", {\n d: TRASH_PATH,\n stroke: \"currentColor\",\n strokeWidth: 1.3,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })\n })\n );\n return jsx(\"div\", {\n className: STYLES.catalogEntry,\n children: jsxs(\"div\", {\n className: props.rowClassName ? STYLES.catalogRow + \" \" + props.rowClassName : STYLES.catalogRow,\n children: cells\n })\n }, index);\n };\n\n // The body, in render order: the caller's action (the reference card's body\n // opens on its fetch link, the flags block opens on Restore defaults), one\n // box per row, then the add control.\n var body: any[] = [];\n if (typeof props.renderAction === \"function\") body.push(props.renderAction(rows, save));\n var visible: any[] = [];\n for (var index = 0; index < rows.length; index++) visible.push(entryNode(rows[index], index));\n body = body.concat(visible);\n body.push(\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.addButton,\n disabled: !writable || busy,\n onClick: addRow,\n children: props.addLabel\n })\n );\n var emptyLine = rows.length === 0 ? jsx(\"p\", { className: STYLES.empty, children: props.emptyText }) : null;\n\n if (props.disclosure !== true) {\n // No disclosure to fold behind: the single-field list reads straight\n // into the block, the same boxes at the same rhythm.\n return [emptyLine].concat(body);\n }\n return [\n emptyLine,\n jsxs(\"details\", {\n className: STYLES.disclosure,\n children: [\n jsxs(\"summary\", {\n className: STYLES.disclosureSummary,\n children: [\n jsx(\"span\", { className: STYLES.disclosureLabel, children: props.rowsLabel }),\n jsx(\"span\", { className: STYLES.disclosureCount, children: String(rows.length) })\n ]\n }),\n jsx(\"div\", { className: STYLES.disclosureBody, children: body })\n ]\n })\n ];\n}\n", "/**\n * The named picker \u2014 one Menu pill over the saved rows plus a catalog list you\n * can refresh, extend by hand and prune. It mirrors the reference card's picker\n * byte for byte in structure (field row \u2192 disclosure \u2192 rows) so the two cards\n * read as one component set; `statusLine` is the only extra slot, and the card\n * uses it for the probe result line the reference has no equivalent for.\n *\n * The row list itself is ./rows.ts \u2014 the same half the extra-flags block\n * renders, read here through two fields (the path and the display name) and\n * folded behind a collapsed `<details>` disclosure (the reference card's\n * \"Customized settings\" idiom), so only the field row and the dropdown are\n * visible until the user opens the row list.\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Menu } from \"@deepseek-ai/dsh-client-ui-primitives\";\nimport type { CatalogEntry } from \"../catalog.js\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { CHEVRON_PATH } from \"./icons.js\";\nimport { RowList } from \"./rows.js\";\n\nexport function CatalogPicker(props: any): any {\n var entries: CatalogEntry[] = props.entries;\n var options = props.options;\n var selectedId = props.selectedId;\n var writable = props.writable;\n var busy = props.busy === true;\n // The saved rows are what the list renders: `id` is the path that goes on\n // the wire, `name` the label the card shows (\"\" \u2192 render the path).\n var rows: string[][] = entries.map((entry: CatalogEntry) => [entry.id, entry.name]);\n\n /**\n * A whole-list write: the list owns the draft, the controller normalizes on\n * the way in and re-runs the scan the new ids imply.\n */\n var saveEntries = (next: string[][]) => {\n if (typeof props.saveEntries !== \"function\") return Promise.resolve();\n return Promise.resolve(props.saveEntries(next.map((row) => ({ id: row[0] ?? \"\", name: row[1] ?? \"\" }))));\n };\n\n // The fetch action belongs to this catalog's rows, so it lives inside the\n // body's head, not the field row. The Windows Chrome button rides the same\n // line (the two actions of the executable block, like the flags block\n // carries its two append actions).\n var fetchAction = () =>\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n disabled: !writable || busy,\n onClick: () => {\n props.refresh();\n },\n children: busy ? props.busyLabel : props.refreshLabel\n });\n var windowsAction = () =>\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n disabled: props.windowsDisabled === true,\n title: props.windowsTitle,\n onClick: () => {\n if (typeof props.windowsOnOpen === \"function\") props.windowsOnOpen();\n },\n children: props.windowsLabel\n });\n var renderActions = () =>\n jsxs(\"div\", {\n className: STYLES.linkButtonRow,\n children: [fetchAction(), windowsAction()]\n });\n\n return jsxs(\"div\", {\n className: STYLES.catalog,\n children: [\n jsxs(\"div\", {\n className: STYLES.field,\n children: [\n jsxs(\"div\", {\n className: STYLES.fieldRow,\n children: [\n jsx(\"span\", { className: STYLES.fieldTitle, children: props.selectorLabel }),\n jsx(\"span\", {\n className: STYLES.selectorWrap,\n children: jsx(Menu, {\n open: props.menuOpen,\n onClose: () => {\n props.setMenuOpen(false);\n },\n items: options,\n selectedId: options.some((option: { id: string }) => option.id === selectedId) ? selectedId : \"\",\n onSelect: (id: string) => {\n props.setMenuOpen(false);\n props.select(id);\n },\n align: \"end\",\n portal: true,\n anchor: jsxs(\"button\", {\n type: \"button\",\n className: STYLES.selector,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": props.menuOpen,\n disabled: !writable || busy,\n title: props.selectedTitle,\n onClick: () => {\n props.setMenuOpen(!props.menuOpen);\n },\n children: [\n // The reference card hands the pill a bare label;\n // the path needs its own truncating span.\n jsx(\"span\", { className: STYLES.selectorLabel, children: props.selectedLabel }),\n jsx(\"svg\", {\n width: 14,\n height: 14,\n className: STYLES.pillChevron,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: jsx(\"path\", { d: CHEVRON_PATH, fill: \"currentColor\" })\n })\n ]\n })\n })\n })\n ]\n }),\n jsx(\"div\", { className: STYLES.fieldDesc, children: props.hint })\n ]\n }),\n // The saved rows: two fields per row, folded behind the disclosure,\n // with the fetch action sitting inside the body.\n jsx(RowList, {\n values: rows,\n labels: [props.idLabel, props.nameLabel],\n placeholders: [props.idPlaceholder, props.namePlaceholder],\n writable: writable,\n busy: busy,\n save: saveEntries,\n renderAction: renderActions,\n emptyText: props.emptyText,\n rowsLabel: props.rowsLabel,\n addLabel: props.addLabel,\n removeLabel: props.removeLabel,\n disclosure: true\n }),\n props.statusLine === undefined || props.statusLine === null ? null : props.statusLine\n ]\n });\n}\n", "/**\n * The fetch dialog \u2014 the \"choose which executables to keep\" modal the fetch\n * action opens once the host's executable run settled.\n *\n * One checkbox row per detected candidate \u2014 each carrying the answer the run\n * gave for it (its version line, or why it is not runnable), the reference\n * card's note slot. Already-saved paths are carried pre-checked and disabled\n * (removal is the row list's delete button, never a dialog side effect), a\n * search field sifts long path lists, and the footer's \"Add selected\" merges\n * the checked paths into the saved rows. Nothing here persists on its own:\n * closing with Cancel or the header X leaves the catalog untouched.\n */\nimport * as react from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { CLOSE_PATHS } from \"./icons.js\";\n\n/**\n * Candidate rows arrive from the run that opened the dialog (the controller's\n * candidate list); the dialog itself keeps only its filter/selection draft, so\n * a re-render of the card cannot disturb the draft.\n */\nexport function CandidateDialog(props: any): any {\n var t = props.t;\n var candidates: { id: string; note: string; broken: boolean }[] = props.candidates;\n var savedIds: string[] = props.savedIds;\n var savedSet = new Set(savedIds);\n var initialChecked = candidates.filter((candidate) => savedSet.has(candidate.id)).map((candidate) => candidate.id);\n // The dialog mounts over a run that just landed; one keyed draft object\n // holds the filter + selection so a new candidate list resets the whole\n // draft (the row list's served-sync idiom, for a whole dialog session \u2014\n // nothing may bleed from a previous run).\n var servedKey = JSON.stringify(candidates) + \"|\" + JSON.stringify(savedIds);\n var draftState = react.useState({ key: \"\", query: \"\", checked: [] as string[] });\n var draft = draftState[0];\n var setDraft = draftState[1];\n var dirty = draft.key !== servedKey;\n var query = dirty ? \"\" : draft.query;\n var checked = dirty ? initialChecked : draft.checked;\n var checkedSet = new Set(checked);\n var setQuery = (value: string) => {\n setDraft({ key: servedKey, query: value, checked: Array.from(checkedSet) });\n };\n var setChecked = (make: (current: string[]) => string[]) => {\n setDraft({ key: servedKey, query: query, checked: make(checked) });\n };\n var needle = query.trim().toLowerCase();\n var shown = needle === \"\" ? candidates : candidates.filter((candidate) => candidate.id.toLowerCase().indexOf(needle) !== -1);\n var addable = shown.filter((candidate) => !savedSet.has(candidate.id)).map((candidate) => candidate.id);\n var allChecked = addable.length > 0 && addable.every((id: string) => checkedSet.has(id));\n\n var toggle = (id: string, value: boolean) => {\n setChecked((current: string[]) => (value ? current.concat([id]) : current.filter((entry: string) => entry !== id)));\n };\n\n return jsxs(\"div\", {\n className: STYLES.fetchDialog,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n \"aria-label\": props.title,\n children: [\n jsxs(\"div\", {\n className: STYLES.dialogContent,\n children: [\n jsxs(\"div\", {\n className: STYLES.dialogHeader,\n children: [\n jsx(\"h2\", { className: STYLES.dialogTitle, children: props.title }),\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.dialogClose,\n \"aria-label\": t(\"close\"),\n onClick: () => props.onClose(),\n children: jsx(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n children: CLOSE_PATHS.map((d: string, at: number) => jsx(\"path\", { d: d, fill: \"currentColor\" }, at))\n })\n })\n ]\n }),\n jsx(\"p\", { className: STYLES.dialogDescription, children: props.description }),\n jsxs(\"div\", {\n className: STYLES.dialogBody,\n children: [\n jsxs(\"div\", {\n className: STYLES.candidateToolbar,\n children: [\n jsx(\"input\", {\n className: STYLES.candidateSearch,\n type: \"search\",\n placeholder: props.searchPlaceholder,\n \"aria-label\": props.searchPlaceholder,\n value: query,\n onChange: (event: any) => {\n setQuery(event && event.target ? String(event.target.value ?? \"\") : \"\");\n }\n }),\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n onClick: () => {\n if (allChecked) setChecked(() => []);\n else setChecked((current: string[]) => Array.from(new Set(current.concat(addable))));\n },\n children: t(\"selectAll\")\n })\n ]\n }),\n shown.length === 0\n ? jsx(\"p\", { className: STYLES.empty, children: t(\"dialogEmpty\") })\n : jsx(\"ul\", {\n className: STYLES.candidateList,\n children: shown.map((candidate) => {\n var isSaved = savedSet.has(candidate.id);\n // A row already saved carries the tag that\n // says so; anything else carries the run's\n // own answer.\n // Whatever the run answered leads the row;\n // a saved path with nothing to report says\n // it is already saved.\n var note = candidate.note !== \"\" ? candidate.note : (isSaved ? t(\"candidateSaved\") : \"\");\n return jsx(\"li\", {\n className: STYLES.candidate,\n children: jsxs(\"label\", {\n className: STYLES.candidateLabel,\n children: [\n jsx(\"input\", {\n type: \"checkbox\",\n checked: isSaved ? true : checkedSet.has(candidate.id),\n disabled: isSaved,\n onChange: (event: any) => {\n toggle(candidate.id, !!(event && event.target && event.target.checked));\n }\n }),\n jsx(\"span\", { className: STYLES.candidateId, children: candidate.id }),\n note === \"\" ? null : jsx(\"span\", { className: STYLES.candidateNote, children: note })\n ]\n })\n }, candidate.id);\n })\n })\n ]\n }),\n jsxs(\"div\", {\n className: STYLES.dialogFooter,\n children: [\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.dialogButton,\n onClick: () => props.onClose(),\n children: t(\"cancel\")\n }),\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.dialogButton + \" \" + STYLES.dialogButtonPrimary,\n onClick: () => props.onAdd(Array.from(checkedSet)),\n children: t(\"addSelected\")\n })\n ]\n })\n ]\n })\n ]\n });\n}\n", "/**\n * The card's imperative run logic.\n *\n * The two host actions the executable block drives \u2014 **Fetch executables** (run\n * the discovery, then open the choose-to-add dialog over what it answered for)\n * and **Prelaunch Windows Chrome** (drive the whole Windows path; the answer\n * lands in the served `windowsChromeStatus`, not the promise) \u2014 plus the one-run-\n * at-a-time busy overlays and the probe-freshness clock they own. It is a hook\n * so `./index.ts` stays the composition of the body while the imperative half\n * lives here; the widget owns none of this state by hand.\n */\n/// <reference path=\"../shell-modules.d.ts\" />\nimport * as react from \"react\";\n\nimport type { ChromeExecutableStatus } from \"../controller/index.js\";\n\n/** How often the probe result line re-reads its clock to age the \"ago\" suffix. */\nexport const PROBED_AGE_TICK_MS = 10000;\n\n/** One row the fetch dialog offers: a path, what the run said about it, and\n * whether that answer is a failure (an empty version carrying an error). */\nexport type FetchCandidate = { id: string; note: string; broken: boolean };\n\n/** The shape `runFetch` opens the dialog over. */\nexport type FetchDialog = { candidates: FetchCandidate[] } | null;\n\n/** The run half `./index.ts` wires into the picker + the dialog. */\nexport type RunActions = {\n /** A fetch is in flight \u2014 the picker's pill reads busy. */\n running: boolean;\n /** A Windows run is in flight \u2014 the button reads busy. */\n windowsRunning: boolean;\n /** The open fetch dialog (null = closed). */\n dialog: FetchDialog;\n /** Fire the fetch action. */\n runFetch: () => void;\n /** Fire the Windows Chrome action. */\n runWindowsChrome: () => void;\n /** Merge the dialog's checked ids into the rows, then close. */\n addFromDialog: (ids: string[]) => void;\n /** Close the dialog. */\n closeDialog: () => void;\n /** When the last fetch settled, for the result line's age suffix. */\n lastProbedAt: number;\n /** The card's local clock, ticked while open so the age stays honest. */\n clock: number;\n};\n\n/**\n * Drive the two host runs, keeping the busy overlays, the fetch dialog, and the\n * probe-freshness clock in one place.\n */\nexport function useRunActions(deps: {\n /** The host executable run, answering with every candidate it looked at. */\n refreshExecutables: () => Promise<ChromeExecutableStatus[]>;\n /** The host Windows Chrome run. */\n openWindowsChrome: () => Promise<void>;\n /** Merge dialog ids into the saved rows. */\n addExecutables: (ids: string[]) => Promise<void>;\n}): RunActions {\n const runningState = react.useState(false);\n const isRunning = runningState[0];\n const setRunning = runningState[1];\n const windowsRunningState = react.useState(false);\n const isWindowsRunning = windowsRunningState[0];\n const setWindowsRunning = windowsRunningState[1];\n const dialogRef = react.useState<FetchDialog>(null);\n const dialog = dialogRef[0];\n const setDialog = dialogRef[1];\n // The probe's freshness clock: a run is only visible when the answer\n // differs, so the line ages the last run the card itself ran; the effect\n // keeps the age honest while the card stays open.\n const probedState = react.useState(0);\n const lastProbedAt = probedState[0];\n const setLastProbedAt = probedState[1];\n const clockState = react.useState(() => Date.now());\n const clock = clockState[0];\n const setClock = clockState[1];\n react.useEffect(() => {\n const tick = setInterval(() => setClock(Date.now()), PROBED_AGE_TICK_MS);\n return () => clearInterval(tick);\n }, []);\n\n /**\n * The fetch action: run the host's executable discovery, then open the\n * choose-to-add dialog over what it answered for. A run that found nothing\n * leaves the card exactly as it was \u2014 an empty list has nothing to select \u2014\n * so the dialog opens only when there are candidates.\n */\n const runFetch = () => {\n setRunning(true);\n let promise;\n try {\n promise = deps.refreshExecutables();\n } catch (caught) {\n promise = Promise.reject(caught);\n }\n Promise.resolve(promise).then(\n async (statuses) => {\n setRunning(false);\n const settled = Date.now();\n setLastProbedAt(settled);\n setClock(settled);\n if (!Array.isArray(statuses) || statuses.length === 0) return;\n // The dialog's rows: the whole run's answer list, so every path\n // the machine carries reads with its answer, not only the saved\n // ones. A path the run could not launch keeps its place carrying\n // the failure line.\n const candidates = statuses.map((status) => ({\n id: status.path,\n note: status.version !== \"\" ? status.version : status.error,\n broken: status.version === \"\" && status.error !== \"\"\n }));\n setDialog({ candidates });\n },\n () => {\n setRunning(false);\n }\n );\n };\n\n /**\n * The Windows Chrome action: it asks the host to run the whole Windows\n * path (locate, prereq, launch, connect). The run is not visible in the\n * promise it resolves with \u2014 everything it answers lands in the served\n * `windowsChromeStatus` \u2014 but, like every executable action, the click keeps\n * the button busy until the host's revision counter moves.\n */\n const runWindowsChrome = () => {\n setWindowsRunning(true);\n let promise;\n try {\n promise = deps.openWindowsChrome();\n } catch (caught) {\n promise = Promise.reject(caught);\n }\n Promise.resolve(promise).then(\n () => {\n setWindowsRunning(false);\n },\n () => {\n setWindowsRunning(false);\n }\n );\n };\n\n /** \"Add selected\": merge the dialog's checked ids into the rows, then close.\n * The controller owns the merge rules (and skips a no-op write). */\n const addFromDialog = (ids: string[]) => {\n setDialog(null);\n if (typeof deps.addExecutables === \"function\") Promise.resolve(deps.addExecutables(ids)).catch(() => { });\n };\n\n return {\n running: isRunning,\n windowsRunning: isWindowsRunning,\n dialog,\n runFetch,\n runWindowsChrome,\n addFromDialog,\n closeDialog: () => setDialog(null),\n lastProbedAt,\n clock\n };\n}\n", "/**\n * The \"Reduce log output\" toggle \u2014 a catalog block in its own right.\n *\n * It renders as a `.catalog` carrying the two-row field (title + switch inline,\n * hint below), so the section reads exactly like the picker block (and inherits\n * the same seam rule: only the block-to-block seam draws a hairline). The switch\n * mirrors what the host actually resolves \u2014 the explicit user-layer `stderrMode`\n * when set, else the row-config `rowStderr` fallback \u2014 never a phantom state.\n *\n * The Switch primitive renders only the control and names it through `label`,\n * which becomes the control's aria-label; the tooltip therefore lives on the\n * wrapper span the switch is rendered inside.\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Switch } from \"@deepseek-ai/dsh-client-ui-primitives\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\n\n/** The one catalog block that is a switch rather than a picker. */\nexport function LogOutputToggle(props: any): any {\n var t = props.t;\n return jsxs(\"div\", {\n className: STYLES.catalog,\n children: [\n jsxs(\"div\", {\n className: STYLES.field,\n children: [\n jsxs(\"div\", {\n className: STYLES.fieldRow,\n children: [\n jsx(\"span\", { className: STYLES.fieldTitle, children: t(\"reduceLabel\") }),\n jsx(\"span\", {\n className: STYLES.toggleLabel,\n title: t(\"reduceTitle\"),\n children: jsx(Switch, {\n checked: props.checked,\n label: t(\"reduceLabel\"),\n disabled: props.disabled,\n onChange: () => {\n if (typeof props.onToggle === \"function\") props.onToggle();\n }\n })\n })\n ]\n }),\n jsx(\"div\", { className: STYLES.fieldDesc, children: t(\"reduceHint\") })\n ]\n })\n ]\n });\n}\n", "/**\n * Browser half \u2014 the saved-executable rows the picker lists.\n *\n * This is the client-side mirror of `src/host/catalog.ts` (the two halves\n * compile into separate bundles and cannot share a module). Both halves follow\n * the same rules \u2014 trim the id, ignore ids that cannot go on the wire, keep the\n * first row per id, label a row by its custom name when it has one \u2014 and\n * `test/client.test.mjs` pins the mirror against the same fixtures the host\n * tests use, so a drift between the halves fails loudly.\n */\n/** One saved row: the path on the wire (`--executablePath=<id>`) + the label. */\nexport type CatalogEntry = { id: string; name: string };\n\n/** A saved row's id is a path: no control character may reach it (the same rule\n * the host's `CHROME_PATH_PATTERN` enforces), capped like the reference's\n * `COMMAND_MAX_LENGTH`. */\nconst ID_MAX_LENGTH = 1024;\nconst PATH_PATTERN = /^[^\\x00-\\x1f\\x7f]{1,1024}$/u;\n\n/** Cap of one row's display name (must match host `CATALOG_NAME_MAX_LENGTH`). */\nexport const NAME_MAX_LENGTH = 200;\n\n/** Cap of the saved rows (must match host `CATALOG_MAX_LENGTH`); the tail drops\n * off, so a merged run can never grow the persisted list without limit. */\nexport const ENTRY_CAP = 50;\n\n/** Whether one id is usable as a saved-row id. */\nexport function isValidEntryId(id: string): boolean {\n if (id === \"\" || id.length > ID_MAX_LENGTH) return false;\n return PATH_PATTERN.test(id);\n}\n\n/** One row label: the custom name when set, else the path itself. */\nexport function entryLabel(entry: CatalogEntry): string {\n const name = entry.name.trim();\n return name === \"\" ? entry.id : name;\n}\n\n/**\n * Coerce a served value into well-formed rows. Host-served arrays are already\n * normalized; a value read straight from the settings document may not be, so\n * the card can be handed anything.\n */\nexport function normalizeEntries(value: unknown): CatalogEntry[] {\n if (!Array.isArray(value)) return [];\n const out: CatalogEntry[] = [];\n const seen = new Set<string>();\n for (const item of value) {\n if (out.length === ENTRY_CAP) break;\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) continue;\n const raw = item as { id?: unknown; name?: unknown };\n const id = typeof raw.id === \"string\" ? raw.id.trim() : \"\";\n if (!isValidEntryId(id) || seen.has(id)) continue;\n seen.add(id);\n const name = typeof raw.name === \"string\" ? raw.name.trim() : \"\";\n out.push({ id, name: name.slice(0, NAME_MAX_LENGTH) });\n }\n return out;\n}\n", "/**\n * The card's derived view \u2014 what one served snapshot actually means.\n *\n * Everything the widget renders but does not own: the saved executable rows\n * (run through the same id rules the rows follow), the dropdown options the pill\n * lists, the ids the last run could not launch, the effective stderr mode\n * behind the toggle, and the header status dot. Pure derivation, no hooks \u2014 the\n * widget owns its state, this section reads it.\n *\n * The reference card (`dsh-docker-desktop-mcp`) carries the same shape here; the\n * difference is `brokenIds`, which the host's per-path probe answer feeds.\n */\nimport { entryLabel, normalizeEntries, type CatalogEntry } from \"../catalog.js\";\nimport type { ChromeExecutableStatus, WindowsChromeStatus } from \"../controller/index.js\";\n\n/** What the card renders, derived from the served snapshot. */\nexport type CardView = {\n /** The error line the header dot and the body paragraph report. */\n error: string;\n /** Whether the \"Reduce log output\" switch reads as on. */\n reduceChecked: boolean;\n /** Saved executable rows, normalized \u2014 the rows list and the dropdown. */\n executableEntries: CatalogEntry[];\n /** The pill's options: the saved rows, plus the executable in use. */\n executableOptions: { id: string; label: string }[];\n /** Ids the last run could not launch \u2014 the pill tags those. */\n brokenIds: string[];\n /** What the bridge launches with (\"\" = nothing resolved yet). */\n effectivePath: string;\n /** What the selected executable answered with (\"\" = nothing answered). */\n version: string;\n /** Whether the known \"executable not found\" state is set. */\n missing: boolean;\n /** Whether the status dot reports an error (true) or a missing executable. */\n dotIsError: boolean;\n /** The host runs under WSL and the selection is a Windows executable. */\n wslWindowsExecutable: boolean;\n /** What the **Prelaunch Windows Chrome** run is doing \u2014 served by the host. */\n windowsChrome: WindowsChromeStatus;\n /** True while the bridge launches with a connect-mode flag; the pill then\n * reads \"connect mode\" and the local selection is muted. */\n connectMode: boolean;\n};\n\nfunction labelOf(entries: readonly CatalogEntry[], id: string): string {\n const row = entries.find((entry: CatalogEntry) => entry.id === id);\n return row === void 0 ? id : entryLabel(row);\n}\n\n/** Project one served snapshot onto everything the widget renders. */\nexport function describeCard(state: any): CardView {\n const error = state.lastError || state.actionError || \"\";\n // The \"Reduce log output\" switch mirrors what the host actually resolves:\n // the explicit `stderrMode` when set, else the row-config fallback\n // (`rowStderr`). Never a phantom state.\n const servedMode = typeof state.stderrMode === \"string\" ? state.stderrMode : \"\";\n const stderrEffective = servedMode !== \"\" ? servedMode : state.rowStderr === \"console\" ? \"console\" : \"log\";\n const executableEntries = normalizeEntries(state.executables);\n const statusList: ChromeExecutableStatus[] = Array.isArray(state.executableStatus) ? state.executableStatus : [];\n\n // The pill's options: the saved rows, plus what is actually running so a\n // picked path never disappears from the list.\n const optionIds = executableEntries.map((entry: CatalogEntry) => entry.id);\n const effectivePath = typeof state.effectiveChromePath === \"string\" ? state.effectiveChromePath : \"\";\n if (effectivePath !== \"\" && optionIds.indexOf(effectivePath) === -1) optionIds.push(effectivePath);\n const executableOptions = optionIds.map((id: string) => ({ id, label: labelOf(executableEntries, id) }));\n // Which ids the last run could not launch: the option list tags those, the\n // same way the reference card tags a broken row.\n const brokenIds = statusList.filter((status) => status.version === \"\" && status.error !== \"\").map((status) => status.path);\n\n return {\n error,\n reduceChecked: stderrEffective === \"log\",\n executableEntries,\n executableOptions,\n brokenIds,\n effectivePath,\n version: typeof state.chromeVersion === \"string\" ? state.chromeVersion : \"\",\n missing: state.chromeMissing === true && error === \"\",\n dotIsError: error !== \"\",\n wslWindowsExecutable: state.wslWindowsExecutable === true,\n windowsChrome: readWindowsChrome(state.windowsChromeStatus),\n connectMode: state.carriesConnectionMode === true\n };\n}\n\n/** One row's menu label: its display name \u2014 the tag a broken row carries is\n * added by the picker, which owns the copy. */\nexport function executableLabel(view: CardView, id: string): string {\n return labelOf(view.executableEntries, id);\n}\n\n/** The served Windows-Chrome status, coerced to the shape this file renders. */\nfunction readWindowsChrome(value: unknown): WindowsChromeStatus {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return { state: \"off\", port: 0, error: \"\" };\n const record = value as Record<string, unknown>;\n const known = [\"off\", \"launching\", \"connected\", \"unreachable\", \"not-found\", \"launch-failed\", \"not-applicable\"];\n const state = typeof record.state === \"string\" && known.indexOf(record.state) !== -1 ? record.state as WindowsChromeStatus[\"state\"] : \"off\";\n const port = typeof record.port === \"number\" && Number.isFinite(record.port) ? Math.trunc(record.port) : 0;\n const error = typeof record.error === \"string\" ? record.error : \"\";\n return { state, port, error };\n}\n\n/** What the **Prelaunch Windows Chrome** button renders right now. The copy keys\n * carry the whole disabled reason (mirrored prereq, no Windows binary, off\n * WSL), so the button itself never re-derives what the host already answered. */\nexport type WindowsButton = {\n /** The action's copy key. */\n labelKey: string;\n /** The tooltip's copy key. */\n titleKey: string;\n /** Whether the click does nothing (disabled reason lives in `titleKey`). */\n disabled: boolean;\n /** Whether the run is in flight \u2014 the button reads as busy, not disabled. */\n busy: boolean;\n};\n\nexport function windowsChromeButton(view: CardView): WindowsButton {\n const status = view.windowsChrome;\n if (status.state === \"launching\") return { labelKey: \"openWindowsChromeBusy\", titleKey: \"openWindowsChromeTitle\", disabled: true, busy: true };\n if (status.state === \"not-applicable\") return { labelKey: \"openWindowsChrome\", titleKey: \"windowsChromeNotWsl\", disabled: true, busy: false };\n if (status.state === \"not-found\") return { labelKey: \"openWindowsChrome\", titleKey: \"windowsChromeNotFound\", disabled: true, busy: false };\n if (status.state === \"unreachable\") return { labelKey: \"openWindowsChrome\", titleKey: \"windowsChromeUnreachable\", disabled: true, busy: false };\n // `off`, `connected` and `launch-failed` are all idle answers: the button\n // stays available so the run can be re-tried or re-adjusted.\n return { labelKey: \"openWindowsChrome\", titleKey: \"openWindowsChromeTitle\", disabled: false, busy: false };\n}\n\n/** Whether the run could not launch this id (the pill tags it, the dialog\n * renders its note as a failure). */\nexport function isBroken(view: CardView, id: string): boolean {\n return view.brokenIds.indexOf(id) !== -1;\n}\n\n/**\n * The result line's age suffix. A run whose answer equals what the line already\n * says is otherwise a no-op on screen, so the line states when the card last ran\n * one.\n */\nexport function probeAge(since: number, now: number, t: (key: string) => string): string {\n const seconds = Math.max(0, Math.floor((now - since) / 1000));\n if (seconds < 10) return t(\"probeJustNow\");\n if (seconds < 60) return String(seconds) + \" \" + t(\"probeSecondsAgo\");\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return String(minutes) + \" \" + t(\"probeMinutesAgo\");\n return String(Math.floor(minutes / 60)) + \" \" + t(\"probeHoursAgo\");\n}\n", "/**\n * Browser card controller \u2014 the polling budgets.\n *\n * The two timings every action that waits for the host's run re-reads the shared\n * describe mirror uses. They live here so the card and the tests quote one source\n * rather than the loader (which ignores them) or the controller class.\n */\n\n/** Re-describe cadence (ms) while waiting for the host's executable run. */\nexport const CHECK_POLL_TICK_MS = 700;\n/** Give up waiting for the waited-on revision to advance after this (ms). The\n * host's probe subprocess times out at 15s, its scan is bounded by the same. */\nexport const CHECK_POLL_TIMEOUT_MS = 20000;\n", "/**\n * Browser half \u2014 the card's data controller (the class).\n *\n * Projects the bound `chrome-mcp` settings scope onto a snapshot store the card\n * reads through its `useChromeMcpCard` hook, and owns the write actions the\n * card's controls call: save flags, pick a saved executable, save the rows, run\n * the search, flip the stderr-mode toggle. `mirror` is the shared settings\n * describe mirror (`settingsScope.describe()`) every waiting action re-reads\n * while the host's in-memory status is still en route \u2014 module plugins have no\n * client\u2192host push channel beyond persisted writes.\n *\n * One counter carries the host's answer: `executableDiscoveryRevision`, what\n * every executable run advances (the merged scan, and the probe of what is\n * selected that follows it). A selection change, a rows change and **Search\n * executables** all wait on it, so the two never settle each other; `publish`\n * starts a catch-up poll for it when the first read still finds zero.\n *\n * The types it projects ride in ./snapshot.ts, the read helpers in ./read.ts and\n * the poll budgets in ./budget.ts \u2014 this file is only the store + the actions.\n */\nimport { createSnapshotStore } from \"@deepseek-ai/dsh-client-store\";\n\nimport { normalizeEntries, type CatalogEntry } from \"../catalog.js\";\nimport { CHECK_POLL_TICK_MS, CHECK_POLL_TIMEOUT_MS } from \"./budget.js\";\nimport { readNumber, readStatus, readString, readWindowsChromeStatus } from \"./read.js\";\nimport type { ChromeExecutableStatus, ChromeMcpCardSnapshot, DescribeMirror, SettingsScope } from \"./snapshot.js\";\n\n/**\n * The card's data half: store, publish-on-notify, and the write actions the\n * card's slot registration injects as props.\n */\nexport class ChromeMcpCardController {\n private readonly scope: SettingsScope;\n private readonly mirror: DescribeMirror;\n private disposed = false;\n private pollTimer: ReturnType<typeof setTimeout> | null = null;\n private pollGeneration = 0;\n private waitStarted = false;\n readonly store: ReturnType<typeof createSnapshotStore<ChromeMcpCardSnapshot>>;\n private readonly unsubscribe: () => void;\n\n constructor(scope: SettingsScope, mirror: DescribeMirror) {\n this.scope = scope;\n this.mirror = mirror;\n this.store = createSnapshotStore<ChromeMcpCardSnapshot>({\n available: false,\n writable: false,\n extraFlags: [],\n lastError: \"\",\n chromeMissing: false,\n executableDiscoveryRevision: 0,\n chromeVersion: \"\",\n executables: [],\n executableStatus: [],\n chromePath: \"\",\n effectiveChromePath: \"\",\n effectiveSource: \"\",\n stderrMode: \"\",\n rowStderr: \"log\",\n defaultExtraFlags: [],\n wslExtraFlags: [],\n wslWindowsExecutable: false,\n windowsChromeStatus: { state: \"off\", port: 0, error: \"\" },\n carriesConnectionMode: false,\n actionError: \"\"\n });\n this.unsubscribe = scope.subscribe(() => this.publish());\n this.publish();\n }\n\n /** Republish the latest scope snapshot into the card store. */\n private publish(): void {\n if (this.disposed) return;\n const previous = this.store.getSnapshot();\n const snapshot = this.scope.getSnapshot();\n if (snapshot.status !== \"ready\" || snapshot.value === void 0) {\n this.store.set({\n available: false,\n writable: false,\n extraFlags: [],\n lastError: \"\",\n chromeMissing: false,\n executableDiscoveryRevision: 0,\n chromeVersion: \"\",\n executables: [],\n executableStatus: [],\n chromePath: \"\",\n effectiveChromePath: \"\",\n effectiveSource: \"\",\n stderrMode: \"\",\n rowStderr: \"log\",\n defaultExtraFlags: [],\n wslExtraFlags: [],\n wslWindowsExecutable: false,\n windowsChromeStatus: { state: \"off\", port: 0, error: \"\" },\n carriesConnectionMode: false,\n actionError: previous.actionError\n });\n return;\n }\n const value = snapshot.value;\n // The status fields (lastError / chromeMissing /\n // executableDiscoveryRevision / chromeVersion / executableStatus /\n // effectiveChromePath / effectiveSource) ride the composition **base**\n // layer: describe() clones that entry object fresh on every read, while\n // the frozen resolved `value` folds the base in only at commits.\n // Base-only host changes \u2014 the registration run, bridge-log and\n // tool-call captures \u2014 are therefore invisible to `value`, so status is\n // read from `base`, falling back to `value` only when the read carries\n // no base layer. The user-authored fields keep reading `value`: the\n // persisted layer wins there, not the host-seeded entry field.\n const base = snapshot.base ?? {};\n const servedRevision = readNumber(base.executableDiscoveryRevision, readNumber(value.executableDiscoveryRevision, 0));\n const servedVersion = readString(base.chromeVersion, readString(value.chromeVersion, \"\"));\n // The rows are user-authored, so the persisted layer is what the card\n // edits; the per-row answers are host state, and only the base layer\n // carries them.\n const servedExecutables = normalizeEntries(value.executables);\n const servedStatus = readStatus(base.executableStatus);\n // The pill shows what the bridge launches with, so the path/source come\n // from the base layer (the host resolves them); the persisted\n // `chromePath` is what the store echoes back for the picker's selection.\n const servedEffectivePath = readString(\n base.effectiveChromePath,\n readString(value.effectiveChromePath, readString(value.chromePath, \"\"))\n );\n const servedSource: \"\" | \"selected\" | \"row-config\" =\n base.effectiveSource === \"selected\" || base.effectiveSource === \"row-config\"\n ? base.effectiveSource\n : value.effectiveSource === \"selected\" || value.effectiveSource === \"row-config\"\n ? value.effectiveSource\n : \"\";\n // `stderrMode` is the persisted user layer (like extraFlags) \u2014 read it\n // from `value`; `rowStderr` is a static base-layer mirror \u2014 read it from\n // the base clone, falling back to `value` only when the read carries no\n // base layer.\n const servedStderrMode = typeof value.stderrMode === \"string\" ? value.stderrMode : \"\";\n const servedRowStderr =\n typeof base.rowStderr === \"string\" ? base.rowStderr : (typeof value.rowStderr === \"string\" ? value.rowStderr : \"log\");\n // The default-flags list is a host static \u2014 served by the base clone,\n // like `rowStderr`, falling back to the resolved value only when the\n // read carries no base layer.\n const servedDefaults: string[] = Array.isArray(base.defaultExtraFlags)\n ? base.defaultExtraFlags.filter((flag) => typeof flag === \"string\" && flag !== \"\")\n : Array.isArray(value.defaultExtraFlags)\n ? value.defaultExtraFlags.filter((flag) => typeof flag === \"string\" && flag !== \"\")\n : [];\n // The recommended WSL-flags list is a host static too, served the same\n // way \u2014 the card carries no copy of it either.\n const servedWslFlags: string[] = Array.isArray(base.wslExtraFlags)\n ? base.wslExtraFlags.filter((flag) => typeof flag === \"string\" && flag !== \"\")\n : Array.isArray(value.wslExtraFlags)\n ? value.wslExtraFlags.filter((flag) => typeof flag === \"string\" && flag !== \"\")\n : [];\n // The Windows-executable-under-WSL mirror is host state \u2014 only the host\n // knows where it is running \u2014 so it rides the base layer with the rest\n // of the status fields.\n const servedWslWindows = base.wslWindowsExecutable === undefined ? value.wslWindowsExecutable === true : base.wslWindowsExecutable === true;\n // The Windows Chrome run answer and the connect-mode flag mirror are\n // host state too: served by the base clone, like the rest.\n const servedWindowsChrome = readWindowsChromeStatus(base.windowsChromeStatus !== undefined ? base.windowsChromeStatus : value.windowsChromeStatus);\n const servedConnectMode = base.carriesConnectionMode === undefined ? value.carriesConnectionMode === true : base.carriesConnectionMode === true;\n this.store.set({\n available: true,\n writable: snapshot.writable === true,\n extraFlags: Array.isArray(value.extraFlags) ? value.extraFlags : [],\n lastError: typeof base.lastError === \"string\" ? base.lastError : ((value.lastError as string) ?? \"\"),\n chromeMissing: base.chromeMissing === undefined ? value.chromeMissing === true : base.chromeMissing === true,\n executableDiscoveryRevision: servedRevision,\n chromeVersion: servedVersion,\n executables: servedExecutables,\n executableStatus: servedStatus,\n chromePath: readString(value.chromePath, \"\"),\n effectiveChromePath: servedEffectivePath,\n effectiveSource: servedSource,\n stderrMode: servedStderrMode === \"log\" || servedStderrMode === \"console\" ? servedStderrMode : \"\",\n rowStderr: servedRowStderr === \"console\" ? \"console\" : \"log\",\n defaultExtraFlags: servedDefaults,\n wslExtraFlags: servedWslFlags,\n wslWindowsExecutable: servedWslWindows,\n windowsChromeStatus: servedWindowsChrome,\n carriesConnectionMode: servedConnectMode,\n actionError: \"\"\n });\n // Startup catch-up: the registration run lands in the base layer\n // *after* this first describe read, and a module plugin has no push\n // channel \u2014 poll the shared describe mirror until the served revision\n // advances (the same budget the executable actions wait with). A card\n // attaching after the run already settled sees a nonzero revision and\n // does not poll.\n if (!this.waitStarted) {\n this.waitStarted = true;\n if (servedRevision === 0) void this.waitFor(\"executableDiscoveryRevision\", 0, Date.now() + CHECK_POLL_TIMEOUT_MS);\n }\n }\n\n /**\n * Immediate write of the user's extra flags (persisted; the host's\n * validate hook rejects invalid lists here, and the next bridge\n * launch starts with them).\n */\n saveFlags(flags: string[]): Promise<void> {\n return this.scope.set(\"extraFlags\", flags).catch((error) => this.noteError(error));\n }\n\n /**\n * Pick one saved executable. Writes the persisted `chromePath` (the host\n * restarts the bridge connection carrying it and re-runs the discovery), then\n * waits until the served revision advances past the click-time value.\n */\n selectExecutable(id: string): Promise<void> {\n if (this.disposed) return Promise.resolve();\n const target = typeof id === \"string\" ? id.trim() : \"\";\n if (target === \"\") return Promise.resolve();\n const baseline = this.store.getSnapshot().executableDiscoveryRevision;\n const wait = this.waitFor(\"executableDiscoveryRevision\", baseline, Date.now() + CHECK_POLL_TIMEOUT_MS);\n return this.scope\n .set(\"chromePath\", target)\n .catch((error) => this.noteError(error))\n .then(() => wait);\n }\n\n /**\n * Save the whole rows list: the card owns the draft, the host re-normalizes\n * on the way in and re-runs the scan the new ids imply.\n */\n saveExecutables(entries: CatalogEntry[]): Promise<void> {\n if (this.disposed) return Promise.resolve();\n const rows = normalizeEntries(entries);\n const snapshot = this.store.getSnapshot();\n const unchanged = JSON.stringify(rows) === JSON.stringify(snapshot.executables);\n if (unchanged) return Promise.resolve();\n const baseline = snapshot.executableDiscoveryRevision;\n const wait = this.waitFor(\"executableDiscoveryRevision\", baseline, Date.now() + CHECK_POLL_TIMEOUT_MS);\n return this.scope\n .set(\"executables\", rows)\n .catch((error) => this.noteError(error))\n .then(() => wait);\n }\n\n /**\n * Ask the host to re-probe the saved rows and fold what it finds into them,\n * then wait for the served revision to advance: write the trigger, then poll\n * the shared describe mirror until it moves \u2014 or the budget elapses. Resolves\n * with every candidate the run answered for and what it said about each, so\n * the dialog opens over the run's own answer list.\n */\n refreshExecutables(): Promise<ChromeExecutableStatus[]> {\n if (this.disposed) return Promise.resolve([]);\n const baseline = this.store.getSnapshot().executableDiscoveryRevision;\n const wait = this.waitFor(\"executableDiscoveryRevision\", baseline, Date.now() + CHECK_POLL_TIMEOUT_MS);\n return this.scope\n .set(\"refreshExecutablesNonce\", Date.now())\n .catch((error) => this.noteError(error))\n .then(() => wait)\n .then(() => {\n const served = this.store.getSnapshot();\n return Array.isArray(served.executableStatus) ? served.executableStatus : [];\n });\n }\n\n /**\n * Merge the ids picked in the dialog into the saved rows: every id already\n * there keeps its place (and its name), the missing ones append nameless.\n * The host re-normalizes on the way in and re-runs the scan the new ids\n * imply, so the same revision counter carries the wait.\n */\n addExecutables(ids: string[]): Promise<void> {\n if (this.disposed) return Promise.resolve();\n const served = this.store.getSnapshot();\n const rows = normalizeEntries(served.executables);\n const merged = rows.concat(\n (Array.isArray(ids) ? ids : [])\n .filter((id) => typeof id === \"string\" && id.trim() !== \"\")\n .map((id) => ({ id: id.trim(), name: \"\" }))\n );\n const next = normalizeEntries(merged);\n if (JSON.stringify(next) === JSON.stringify(rows)) return Promise.resolve();\n const baseline = served.executableDiscoveryRevision;\n const wait = this.waitFor(\"executableDiscoveryRevision\", baseline, Date.now() + CHECK_POLL_TIMEOUT_MS);\n return this.scope\n .set(\"executables\", next)\n .catch((error) => this.noteError(error))\n .then(() => wait);\n }\n\n /**\n * Ask the host to drive a Windows-side Chrome in connect mode: write the\n * trigger, then wait for the run to settle (same revision counter every\n * executable run advances). What the button ends up reporting \u2014 launched,\n * already connected, prereq missing \u2014 is served through\n * `windowsChromeStatus`, not through the promise.\n */\n openWindowsChrome(): Promise<void> {\n if (this.disposed) return Promise.resolve();\n const baseline = this.store.getSnapshot().executableDiscoveryRevision;\n const wait = this.waitFor(\"executableDiscoveryRevision\", baseline, Date.now() + CHECK_POLL_TIMEOUT_MS);\n return this.scope\n .set(\"openWindowsChromeNonce\", Date.now())\n .catch((error) => this.noteError(error))\n .then(() => wait);\n }\n\n /**\n * Flip the \"Reduce log output\" toggle: persists `stderrMode` as \"log\"\n * (capture stderr into the bridge log file) or \"console\" (echo it for\n * debugging), starting from what the host currently resolves \u2014 the served\n * `stderrMode` when set, else the row-config `rowStderr` fallback. The host\n * restarts the bridge connection on the change.\n */\n toggleStderr(): Promise<void> {\n if (this.disposed) return Promise.resolve();\n const snapshot = this.store.getSnapshot();\n const effective =\n snapshot.stderrMode === \"log\" || snapshot.stderrMode === \"console\"\n ? snapshot.stderrMode\n : snapshot.rowStderr === \"console\"\n ? \"console\"\n : \"log\";\n const next = effective === \"log\" ? \"console\" : \"log\";\n return this.scope.set(\"stderrMode\", next).catch((error) => this.noteError(error));\n }\n\n /** The face the card's slot registration injects. */\n inject(): Record<string, unknown> {\n return {\n hooks: { chromeMcpCard: this.store },\n saveFlags: (flags: string[]) => this.saveFlags(flags),\n toggleStderr: () => this.toggleStderr(),\n selectExecutable: (id: string) => this.selectExecutable(id),\n saveExecutables: (entries: CatalogEntry[]) => this.saveExecutables(entries),\n refreshExecutables: () => this.refreshExecutables(),\n addExecutables: (ids: string[]) => this.addExecutables(ids),\n openWindowsChrome: () => this.openWindowsChrome(),\n /** One mirror re-read (used when the card opens). */\n refresh: () => this.refresh()\n };\n }\n\n /**\n * Re-read the shared describe mirror once so base-layer status\n * captured asynchronously by the host (bridge connection errors)\n * reaches an opened card without waiting for a write or a run.\n */\n refresh(): Promise<unknown> {\n if (this.disposed) return Promise.resolve();\n let load: unknown;\n try {\n load = this.mirror.load();\n } catch {\n load = void 0;\n }\n return Promise.resolve(load).catch(() => { });\n }\n\n dispose(): void {\n this.disposed = true;\n if (this.pollTimer !== null) {\n clearTimeout(this.pollTimer);\n this.pollTimer = null;\n }\n this.unsubscribe();\n }\n\n /**\n * Re-describe the settings mirror every tick until the given revision field\n * advances past `baseline`, or the deadline passes.\n */\n private waitFor(field: \"executableDiscoveryRevision\", baseline: number, deadline: number): Promise<void> {\n // A new wait supersedes any pending one (the startup catch-up poll\n // yielding to a manual action), so exactly one poll loop runs and the\n // superseded wait settles instead of dangling.\n const generation = ++this.pollGeneration;\n const controller = this;\n return new Promise<void>((resolve) => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let settled = false;\n const arm = (delay: number) => {\n timer = setTimeout(tick, delay);\n controller.pollTimer = timer ?? null;\n };\n const finish = () => {\n if (settled) return;\n settled = true;\n clearTimeout(timer);\n if (controller.pollTimer === (timer ?? null)) controller.pollTimer = null;\n resolve();\n };\n const satisfied = () => readNumber(controller.store.getSnapshot()[field], baseline) > baseline || Date.now() >= deadline;\n const stale = () => controller.disposed || generation !== controller.pollGeneration;\n const tick = () => {\n if (stale() || satisfied()) {\n finish();\n return;\n }\n let loaded: unknown;\n try {\n loaded = controller.mirror.load();\n } catch {\n loaded = void 0; // mirror read failure: the next tick retries\n }\n Promise.resolve(loaded)\n .catch(() => ({}))\n .then(() => {\n if (stale() || satisfied()) {\n finish();\n return;\n }\n arm(CHECK_POLL_TICK_MS);\n });\n };\n arm(CHECK_POLL_TICK_MS);\n });\n }\n\n /** Surface a rejected action on the card (store-only; never host state). */\n private noteError(error: unknown): void {\n if (this.disposed) return;\n const previous = this.store.getSnapshot();\n this.store.set({\n ...previous,\n actionError: error != null && typeof (error as any).message === \"string\" ? (error as any).message : String(error)\n });\n }\n}\n", "/**\n * Browser card controller \u2014 the safe reads that project a served value onto the\n * snapshot.\n *\n * The host serves base-layer status through the describe clone, and describe()\n * may carry no base layer at all; the controller's `publish` folds what is there\n * into the snapshot through these small, total readers so no field ever reads\n * `undefined`. They are pure, so the class keeps to just the store + actions.\n */\nimport type { ChromeExecutableStatus, WindowsChromeStatus } from \"./snapshot.js\";\n\n/** Number read from any value, `fallback` when absent or not a number. */\nexport function readNumber(value: unknown, fallback: number): number {\n return typeof value === \"number\" ? value : fallback;\n}\n\n/** String read from any value, `fallback` when absent or not a string. */\nexport function readString(value: unknown, fallback: string): string {\n return typeof value === \"string\" ? value : fallback;\n}\n\n/** Coerce the served Windows-Chrome status into the shape the card renders. */\nexport function readWindowsChromeStatus(value: unknown): WindowsChromeStatus {\n const fallback: WindowsChromeStatus = { state: \"off\", port: 0, error: \"\" };\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return fallback;\n const status = (value as Record<string, unknown>).state;\n const states = [\"off\", \"launching\", \"connected\", \"unreachable\", \"not-found\", \"launch-failed\", \"not-applicable\"];\n const port = (value as Record<string, unknown>).port;\n const error = (value as Record<string, unknown>).error;\n return {\n state: typeof status === \"string\" && states.indexOf(status) !== -1 ? status as WindowsChromeStatus[\"state\"] : \"off\",\n port: typeof port === \"number\" && Number.isFinite(port) ? Math.trunc(port) : 0,\n error: typeof error === \"string\" ? error : \"\"\n };\n}\n\n/** Coerce the served per-row answers into the shape the card renders. */\nexport function readStatus(value: unknown): ChromeExecutableStatus[] {\n if (!Array.isArray(value)) return [];\n const statuses: ChromeExecutableStatus[] = [];\n for (const item of value) {\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) continue;\n const path = readString((item as { path?: unknown }).path, \"\");\n if (path === \"\") continue;\n statuses.push({\n path,\n version: readString((item as { version?: unknown }).version, \"\"),\n error: readString((item as { error?: unknown }).error, \"\")\n });\n }\n return statuses;\n}\n", "/**\n * English copy \u2014 the dictionary every other tag falls back to.\n *\n * Every string the card renders lives here; the widget itself stays\n * copy-free. Add a locale by dropping a sibling file and registering it in\n * ./index.ts.\n *\n * No key describes an \"automatic\" state, because there is no auto mode: what\n * the saved-executable rows list is what can be picked, and the only automatic\n * step is the host seeding a never-configured host once.\n */\nexport const en = {\n title: \"DSH Chrome MCP\",\n description: \"DSH Chrome MCP server (chrome-devtools-mcp) settings and status\",\n executableLabel: \"Chrome executable\",\n executableHint: \"The saved executable the bridge launches with. Selecting one restarts the connection.\",\n executableNone: \"No Chrome executable detected\",\n executableRows: \"Saved executables\",\n executableIdLabel: \"Executable path\",\n executableIdPlaceholder: \"Path to a Chrome executable\",\n executableNameLabel: \"Display name\",\n namePlaceholder: \"Display name\",\n addExecutable: \"Add executable\",\n removeExecutable: \"Delete executable\",\n fetchExecutables: \"Fetch executables\",\n fetching: \"Fetching\u2026\",\n executableEmpty: \"No executables saved. Use \u201CFetch executables\u201D, or add the Chrome path by hand.\",\n dialogExecutablesTitle: \"Choose executables to add\",\n dialogExecutablesDescription: \"These are the Chrome executables this host's last run answered for. Choose the ones to add.\",\n dialogEmpty: \"Nothing matches your search.\",\n searchExecutables: \"Search executables\",\n selectAll: \"Select all\",\n addSelected: \"Add selected\",\n candidateSaved: \"Saved\",\n close: \"Close\",\n cancel: \"Cancel\",\n unavailableSuffix: \"not runnable\",\n wslWindowsTitle: \"Windows executable under WSL\",\n wslWindowsNote:\n \"This host runs inside Windows Subsystem for Linux and the selected executable is the Windows Chrome, which the bridge cannot launch: the debug pipes it opens do not survive the WSL interop boundary, and its debugging port stays bound to the Windows loopback, unreachable over the WSL2 NAT bridge. It answers --version correctly, so the pill looks healthy until the first tool call fails. To drive the Windows browser, start Chrome yourself with --remote-debugging-port=9222 --user-data-dir=C:\\\\chrome-debug, add --browserUrl=http://127.0.0.1:9222 to the extra flags, and make Windows loopback reachable from WSL by setting networkingMode=mirrored in %USERPROFILE%\\\\.wslconfig followed by wsl --shutdown. Chrome installed inside the Linux distro needs none of this.\",\n probing: \"Checking the executables\u2026\",\n versionLabel: \"Probed version:\",\n probeJustNow: \"just now\",\n probeSecondsAgo: \"seconds ago\",\n probeMinutesAgo: \"minutes ago\",\n probeHoursAgo: \"hours ago\",\n flagsTitle: \"Extra flags\",\n flagsHint: \"The extra flags the bridge launches with. One flag per row \u2014 saving restarts the connection.\",\n flagsEmpty: \"No extra flags saved. Add one by hand, or use \u201CRestore defaults\u201D.\",\n flagsRows: \"Saved flags\",\n flagsValueLabel: \"Extra flag\",\n flagsValuePlaceholder: \"e.g. --headless\",\n addFlag: \"Add flag\",\n removeFlag: \"Delete flag\",\n flagsRestore: \"Restore defaults\",\n flagsRestoreTitle: \"Keep every flag the rows carry and append the defaults that are still missing\",\n flagsWsl: \"Flags WSL\",\n flagsWslTitle: \"A\u00F1adir flags recomendados para WSL<->Windows\",\n openWindowsChrome: \"Prelaunch Windows Chrome\",\n openWindowsChromeTitle: \"Lanza el Chrome del lado Windows con --remote-debugging-port y deja el bridge en modo conexi\u00F3n\",\n openWindowsChromeBusy: \"Iniciando Chrome de Windows\u2026\",\n windowsChromeNotWsl: \"Windows Chrome no aplica fuera de WSL.\",\n windowsChromeNotFound: \"No se encontr\u00F3 Chrome en el lado Windows (Program Files / Program Files (x86)).\",\n windowsChromeUnreachable:\n \"Requiere networkingMode=mirrored en %USERPROFILE%\\\\.wslconfig, con wsl --shutdown: hoy el loopback de Windows no es alcanzable desde este host WSL.\",\n connectModeLabel: \"Connect mode\",\n connectModeHint: \"Modo conexi\u00F3n: el bridge no lanza un Chrome local (conecta con --browserUrl / --wsEndpoint); la selecci\u00F3n local queda a la espera.\",\n reduceLabel: \"Reduce log output\",\n reduceTitle: \"Capture the bridge's stderr into the plugin's log file\",\n reduceHint: \"Captures stderr into the plugin's log file. Turn it off to debug the raw bridge output; switching restarts the bridge connection.\",\n docsMessage: \"Find the complete list of server parameters (e.g., --headless, --isolated, --slim) and how to configure WebSocket connections in the Configuration Guide.\",\n docsLinkLabel: \"Configuration Guide\",\n statusError: \"Error\",\n statusOk: \"OK\",\n chromeMissing: \"Chrome executable not found\",\n readOnly: \"Settings are read-only in this deployment.\",\n expand: \"Expand\",\n collapse: \"Collapse\"\n};\n", "/**\n * Locale dictionaries registered on the shell locale service.\n *\n * One dictionary per tag; `en` is the fallback every other tag resolves\n * missing keys through, so it must always be present.\n */\nimport { en } from \"./en-US.js\";\n\n/** tag \u2192 dictionary. Registered wholesale under the plugin's locale namespace. */\nexport const DICTIONARIES: Record<string, Record<string, string>> = { en };\n\n/** Every tag this half registers; the first entry is the fallback. */\nexport const TAGS = [\"en\"];\n", "/**\n * Browser half \u2014 the card's stylesheet surface.\n *\n * The rules and the class names live in `ChromeMcpCard.module.css`; the\n * build's CSS-modules step (scripts/build-client.mjs) compiles it \u2014 minified,\n * class names scoped `hash_local` \u2014 and the card imports that map directly,\n * the same way every shipped `dsh-client-ui-*` card consumes its own\n * stylesheet. This module keeps only the one-shot injection.\n *\n * The injection idiom is what every other plugin card uses: a `style` element\n * tagged with the plugin id, so a re-materialized bundle never stacks a second\n * copy. It is called from `apply`, never from a module body, so importing a\n * module for its class names cannot have DOM side effects.\n */\nimport { PLUGIN_ID } from \"../plugin-meta.js\";\nimport { cssText } from \"./ChromeMcpCard.module.css\";\n\n/** The one-shot `style` element's identity: `<plugin id>/<card>.module.css`. */\nconst CARD_CSS_ID = PLUGIN_ID + \"/ChromeMcpCard.module.css\";\n\n/**\n * Append the card's stylesheet once.\n *\n * Idempotent by construction: the element is tagged with the plugin id plus\n * the card's stylesheet id, so a re-materialized bundle never stacks a second\n * copy.\n */\nexport function injectCardStyles(): void {\n if (typeof document === \"undefined\") return;\n if (document.querySelector('style[data-plugin-css=\"' + CARD_CSS_ID + '\"]') !== null) return;\n const styleTag = document.createElement(\"style\");\n styleTag.dataset.plugin = PLUGIN_ID;\n styleTag.dataset.pluginCss = CARD_CSS_ID;\n styleTag.textContent = cssText;\n document.head.appendChild(styleTag);\n}\n", "/**\n * Browser half \u2014 the plugin body.\n *\n * The entry the loader calls: inject the stylesheet, hand the shell the\n * card's locales, bind the namespace scope behind the controller, and mount\n * the card into the Settings \u2192 Plugins \u2192 Plugin configuration slot keyed by\n * the `chrome-mcp` namespace the host half serves. Every other module here is\n * a dependency of this one, never the other way round.\n */\nimport { ChromeMcpCard } from \"./card/index.js\";\nimport { ChromeMcpCardController } from \"./controller/index.js\";\nimport { DICTIONARIES } from \"./locales/index.js\";\nimport { LOCALE_NAMESPACE, SETTINGS_NAMESPACE } from \"./plugin-meta.js\";\nimport { injectCardStyles } from \"./styles/index.js\";\n\n/** Browser plugin context as provided by the DSH shell. */\nexport interface BrowserPluginContext {\n effect(fn: () => (() => void) | void, label?: string): void;\n locale: {\n register(namespace: string, dicts: Record<string, Record<string, string>>): void;\n };\n settingsScope: {\n bind(spec: { namespace: string }): {\n getSnapshot(): { status: string; value?: Record<string, unknown> };\n subscribe(fn: () => void): () => void;\n set(field: string, value: unknown): Promise<void>;\n };\n describe(): { load(): Promise<unknown> };\n };\n slots: {\n inject(slot: string, register: () => void): void;\n register(\n spec: { name: string; key: string; locale: string; inject: () => Record<string, unknown> },\n Component: (props: any) => unknown\n ): void;\n };\n}\n\n/**\n * Mount the settings/status card.\n * @param ctx - the browser plugin context.\n */\nexport function apply(ctx: BrowserPluginContext): void {\n injectCardStyles();\n ctx.effect(() => ctx.locale.register(LOCALE_NAMESPACE, DICTIONARIES), `${SETTINGS_NAMESPACE}: dictionaries`);\n const binder = ctx.settingsScope;\n const scope = binder.bind({ namespace: SETTINGS_NAMESPACE });\n // The shared describe mirror: an executable action re-reads it while the\n // host's in-memory check status is en route.\n const controller = new ChromeMcpCardController(scope as any, binder.describe());\n ctx.effect(\n () => () => controller.dispose(),\n `${SETTINGS_NAMESPACE}: card controller`\n );\n ctx.slots.inject(\"settings.plugin.item\", () =>\n ctx.slots.register(\n {\n name: \"settings.plugin.item\",\n key: SETTINGS_NAMESPACE,\n locale: LOCALE_NAMESPACE,\n inject: () => controller.inject()\n },\n ChromeMcpCard as any\n ));\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACsCA,IAAAA,SAAuB;AACvB,IAAAC,sBAA0B;;;ACvCnB,IAAM,UAAU;AACvB,IAAO,wBAAQ,EAAC,QAAO,eAAc,YAAW,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;ACrEO,IAAM,eAAuD,EAAE,GAAG;;;ACSzE,IAAM,cAAc,YAAY;AASzB,SAAS,mBAAyB;AACrC,MAAI,OAAO,aAAa,YAAa;AACrC,MAAI,SAAS,cAAc,4BAA4B,cAAc,IAAI,MAAM,KAAM;AACrF,QAAM,WAAW,SAAS,cAAc,OAAO;AAC/C,WAAS,QAAQ,SAAS;AAC1B,WAAS,QAAQ,YAAY;AAC7B,WAAS,cAAc;AACvB,WAAS,KAAK,YAAY,QAAQ;AACtC;;;ACOO,SAAS,MAAM,KAAiC;AACnD,mBAAiB;AACjB,MAAI,OAAO,MAAM,IAAI,OAAO,SAAS,kBAAkB,YAAY,GAAG,GAAG,kBAAkB,gBAAgB;AAC3G,QAAM,SAAS,IAAI;AACnB,QAAM,QAAQ,OAAO,KAAK,EAAE,WAAW,mBAAmB,CAAC;AAG3D,QAAM,aAAa,IAAI,wBAAwB,OAAc,OAAO,SAAS,CAAC;AAC9E,MAAI;AAAA,IACA,MAAM,MAAM,WAAW,QAAQ;AAAA,IAC/B,GAAG,kBAAkB;AAAA,EACzB;AACA,MAAI,MAAM,OAAO,wBAAwB,MACrC,IAAI,MAAM;AAAA,IACN;AAAA,MACI,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ,MAAM,WAAW,OAAO;AAAA,IACpC;AAAA,IACA;AAAA,EACJ,CAAC;AACT;",
|
|
6
|
-
"names": ["react", "import_jsx_runtime", "import_jsx_runtime", "index", "import_jsx_runtime", "react", "import_jsx_runtime", "react", "import_jsx_runtime", "import_dsh_client_ui_primitives"]
|
|
3
|
+
"sources": ["../src/client/index.ts", "../node_modules/@comecaramelos/dsh-ancesters/lib/client.esm.js", "../src/client/catalog.ts", "../src/client/card/index.ts", "dsh-css:/home/roberto/dev/dsh/dsh-chrome-mcp/src/client/styles/ChromeMcpCard.module.css", "../src/client/card/flags.ts", "../src/client/plugin-meta.ts", "../src/client/card/icons.ts", "../src/client/card/rows.ts", "../src/client/card/picker.ts", "../src/client/card/dialog.ts", "../src/client/card/run-actions.ts", "../src/client/card/toggle.ts", "../src/client/card/view.ts", "../src/client/read.ts", "../src/client/project.ts", "../src/client/block.ts", "../src/client/locales/en-US.ts", "../src/client/locales/index.ts", "../src/client/styles/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @comecaramelos/dsh-chrome-mcp \u2014 browser half, public surface.\n *\n * The card is built from `@comecaramelos/dsh-ancesters`' `mountSettingsCard`:\n * the dictionaries, the controller over this row's configuration form (staged,\n * immediate and trigger writes, the fenced write door, the settle), the\n * page-wide failure toasts and the `plugins.row.config` registration keyed by\n * `<bundle>#<row id>` all come from the shared half. What is declared here is\n * the descriptor and the one block this row owns (./block.ts).\n *\n * The one module the bundler walks, so the emitted `client.js` exports exactly\n * what the shell consumes \u2014 `apply` and `inject` \u2014 plus the settle deadline and\n * the live keys, on the surface for the tests (the loader ignores them).\n */\nimport { mountSettingsCard } from \"@comecaramelos/dsh-ancesters/client\";\n\nimport { ChromeCardBlock } from \"./block.js\";\nimport { DICTIONARIES } from \"./locales/index.js\";\nimport { BUNDLE_ID, ENTRY_ID, LIVE_KEYS, LOCALE_NAMESPACE, PLUGIN_ID, RUN_SETTLE_TIMEOUT_MS } from \"./plugin-meta.js\";\nimport { injectCardStyles } from \"./styles/index.js\";\n\n/** The descriptor that makes this component's card. */\nexport const card = mountSettingsCard({\n entryId: ENTRY_ID,\n pluginId: PLUGIN_ID,\n bundleId: BUNDLE_ID,\n localeNamespace: LOCALE_NAMESPACE,\n locale: DICTIONARIES,\n fields: {\n // The flags and the \"Reduce log output\" mode are edited as a draft:\n // nothing reaches the Host until Apply.\n staged: [\"extraFlags\", \"stderrMode\"],\n // The saved rows and the selection drive a Host run, so they land on\n // the click that asked for them.\n immediate: [\"executables\", \"chromePath\"],\n triggers: [\"refreshExecutablesNonce\", \"openWindowsChromeNonce\"],\n liveKeys: [...LIVE_KEYS]\n },\n blocks: [{ block: ChromeCardBlock as never, bind: (_snapshot: unknown, controller: unknown) => ({ controller }) }],\n // The body states the error itself (the dot and the line under the\n // toggle), so the shared second line stays off.\n errorLine: false,\n // A failure that lands while the person is elsewhere in the app is still\n // announced: the row page is closed most of the time a run is happening.\n // An error carries the Host's own line; a stall has no text of its own and\n // reads from the mirror \u2014 the known missing-executable answer when it\n // stands, the \"the host did not answer\" line otherwise.\n toasts: {\n text: (notice: { kind: \"error\" | \"stall\"; text: string }, snapshot: { values?: Record<string, unknown> }, t: (key: string) => string) =>\n notice.kind === \"error\"\n ? (notice.text !== \"\" ? notice.text : t(\"toastError\"))\n : (snapshot.values?.chromeMissing === true ? t(\"chromeMissing\") : t(\"toastStall\"))\n },\n settleField: \"executableDiscoveryRevision\",\n settleDeadlineMs: RUN_SETTLE_TIMEOUT_MS\n});\n\n/** Services the shell must resolve before `apply` runs. */\nexport const inject = card.inject;\n\n/** The loader entry: the card's own stylesheet first (the shared machinery\n * injects only its own sheet), then the mounted card. */\nexport function apply(ctx: Parameters<typeof card.apply>[0]): void {\n injectCardStyles();\n card.apply(ctx);\n}\n\nexport { LIVE_KEYS, RUN_SETTLE_TIMEOUT_MS };\n/** The seam between the shared controller and the card (test surface). */\nexport { cardActions, cardState } from \"./block.js\";\n", "// src/client/apply.ts\nimport * as react4 from \"react\";\nimport { jsx as jsx9 } from \"react/jsx-runtime\";\n\n// src/host/identity.ts\nfunction rowConfigKey(pkgName, entryId) {\n if (typeof pkgName !== \"string\" || pkgName === \"\") {\n throw new Error(\"dsh-ancesters: rowConfigKey(pkg, entryId) requires a non-empty package name\");\n }\n if (typeof entryId !== \"string\" || entryId === \"\") {\n throw new Error(\"dsh-ancesters: rowConfigKey(pkg, entryId) requires a non-empty entry id\");\n }\n return `${pkgName}#${entryId}`;\n}\n\n// src/client/blocks/rows.ts\nimport * as react from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\n// dsh-css:/home/roberto/dev/dsh/dsh-ancesters/src/client/styles/shared.module.css\nvar cssText = '.qox3mn_body{flex-direction:column;gap:10px;display:flex}.qox3mn_field{align-items:flex-start;gap:4px;display:flex;flex-direction:column;width:100%}.qox3mn_fieldRow{align-items:center;gap:8px;display:flex;width:100%}.qox3mn_fieldTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px;flex:1;min-width:0}.qox3mn_fieldDesc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px;width:100%}.qox3mn_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.qox3mn_selector:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.qox3mn_selector:disabled{cursor:default}.qox3mn_selectorWrap{display:flex}.qox3mn_pillChevron{flex:none}.qox3mn_row{display:flex;gap:10px;align-items:center}.qox3mn_button{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:.5px solid var(--dsw-alias-border-l3);border-radius:14px;cursor:pointer;font-size:12px;line-height:18px;color:var(--dsw-alias-label-primary);background:transparent;padding:0 10px;height:28px}.qox3mn_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.qox3mn_button:disabled{cursor:not-allowed;opacity:.4}.qox3mn_button:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.qox3mn_readOnly{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.qox3mn_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}.qox3mn_dot{box-sizing:border-box;corner-shape:round;border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}.qox3mn_dotError{background:var(--dsw-alias-state-error-primary)}.qox3mn_badge{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1);border-radius:10px;padding:1px 8px;font-size:11px;line-height:16px;display:inline-flex;align-items:center;flex:none}.qox3mn_empty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.qox3mn_catalog{flex-direction:column;align-items:stretch;gap:10px;display:flex}.qox3mn_catalog+.qox3mn_catalog{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:12px}.qox3mn_catalog>.qox3mn_linkButton{align-self:flex-start}.qox3mn_catalog>.qox3mn_linkButtonRow{align-self:flex-start;display:flex;gap:8px;align-items:center}.qox3mn_linkButton{box-sizing:border-box;border:none;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer;border-radius:14px;align-items:center;height:28px;padding:0 10px;font:inherit;font-size:12px;line-height:18px;display:inline-flex}.qox3mn_linkButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.qox3mn_linkButton:disabled{opacity:.4;cursor:default}.qox3mn_linkButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.qox3mn_rowList{flex-direction:column;align-items:stretch;gap:6px;display:flex}.qox3mn_rowList>button{align-self:flex-start}.qox3mn_catalogEntry{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-module-platform);border-radius:10px;padding:6px}.qox3mn_catalogRow{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;align-items:center;gap:6px;display:grid}.qox3mn_catalogInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;height:28px;padding:0 10px;font:inherit;font-size:14px;line-height:22px;min-width:0;width:100%}.qox3mn_catalogInput::placeholder{color:var(--dsw-alias-label-dimmed)}.qox3mn_catalogInput:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.qox3mn_catalogInput:disabled{opacity:.6;cursor:default}.qox3mn_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.qox3mn_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.qox3mn_iconButton:disabled{opacity:.4;cursor:default}.qox3mn_iconButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.qox3mn_iconButtonDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.qox3mn_addButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:14px;align-self:flex-start;align-items:center;gap:4px;height:28px;padding:0 10px;font:inherit;font-size:12px;line-height:18px;display:inline-flex}.qox3mn_addButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.qox3mn_addButton:disabled{opacity:.4;cursor:default}.qox3mn_disclosure{flex-direction:column;gap:10px;display:flex}.qox3mn_disclosureSummary{color:var(--dsw-alias-label-secondary);cursor:pointer;list-style:none;align-items:center;gap:6px;font-size:12px;line-height:18px;user-select:none;display:flex}.qox3mn_disclosureSummary::-webkit-details-marker{display:none}.qox3mn_disclosureSummary:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-radius:6px}.qox3mn_disclosureLabel:before{content:\"\\\\25b8\";display:inline-block;margin-right:6px;transition:transform .16s}.qox3mn_disclosure[open] .qox3mn_disclosureLabel:before{transform:rotate(90deg)}.qox3mn_disclosureCount{color:var(--dsw-alias-label-tertiary)}.qox3mn_disclosureBody{flex-direction:column;gap:10px;display:flex}.qox3mn_disclosureBody>.qox3mn_linkButton{align-self:flex-start}.qox3mn_disclosureBody>.qox3mn_linkButtonRow{align-self:flex-start;display:flex;gap:8px;align-items:center}.qox3mn_toggleLabel{align-items:center;display:inline-flex;flex:none}.qox3mn_fetchDialog{background:color-mix(in srgb,var(--dsw-alias-label-primary) 28%,transparent);align-items:center;justify-content:center;display:flex;position:fixed;inset:0;z-index:90}.qox3mn_dialogContent{background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l3);border-radius:16px;flex-direction:column;gap:10px;width:min(520px,calc(100vw - 32px));max-height:min(620px,calc(100vh - 48px));display:flex;overflow:hidden}.qox3mn_dialogHeader{align-items:center;gap:8px;padding:14px 16px 0;display:flex}.qox3mn_dialogTitle{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:22px;flex:1;min-width:0;margin:0}.qox3mn_dialogClose{box-sizing:border-box;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;flex:none;width:28px;height:28px;display:inline-flex}.qox3mn_dialogClose:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.qox3mn_dialogClose:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.qox3mn_dialogDescription{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;margin:0;padding:0 16px}.qox3mn_dialogBody{flex-direction:column;flex:1;gap:8px;min-height:0;padding:0 16px;display:flex}.qox3mn_candidateToolbar{align-items:center;gap:8px;display:flex}.qox3mn_candidateSearch{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;height:32px;padding:0 10px;font:inherit;font-size:12px;line-height:20px;flex:1;min-width:0}.qox3mn_candidateSearch::placeholder{color:var(--dsw-alias-label-dimmed)}.qox3mn_candidateSearch:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.qox3mn_candidateList{flex-direction:column;gap:2px;margin:0;padding:0 0 10px;list-style:none;overflow-y:auto;display:flex}.qox3mn_candidate{border-radius:8px;padding:4px 6px}.qox3mn_candidate:hover{background:var(--dsw-alias-interactive-bg-hover)}.qox3mn_candidateLabel{align-items:center;gap:8px;min-width:0;display:flex}.qox3mn_candidateLabel input[type=checkbox]{accent-color:var(--dsw-alias-brand-primary);flex:none;margin:0}.qox3mn_candidateId{color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.qox3mn_candidateNote{color:var(--dsw-alias-label-tertiary);flex:0 1 auto;min-width:0;overflow-wrap:anywhere;font-size:11px;line-height:16px}.qox3mn_dialogFooter{border-top:.5px solid var(--dsw-alias-border-l2);align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.qox3mn_dialogButton{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:.5px solid var(--dsw-alias-border-l3);border-radius:16px;cursor:pointer;font-size:13px;line-height:20px;color:var(--dsw-alias-label-primary);background:transparent;padding:0 12px;height:32px}.qox3mn_dialogButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.qox3mn_dialogButton:disabled{cursor:not-allowed;opacity:.4}.qox3mn_dialogButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.qox3mn_dialogButtonPrimary{color:var(--dsw-alias-label-primary);font-weight:600}.qox3mn_selectorLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.qox3mn_result{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.qox3mn_resultValue{color:var(--dsw-alias-label-secondary);margin-left:4px}.qox3mn_resultAge{color:var(--dsw-alias-label-dimmed);margin-left:4px}.qox3mn_notice{flex-direction:column;gap:4px;display:flex;border:.5px solid var(--dsw-alias-border-l3);border-radius:10px;background:var(--dsw-alias-bg-layer-1);padding:8px 10px}.qox3mn_noticeTitle{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:600;line-height:18px}.qox3mn_noticeBody{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.qox3mn_docsLink{color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;display:inline-flex;text-decoration:none;font-size:12px;line-height:1.5}.qox3mn_docsLinkLabel{text-decoration:none}.qox3mn_docsLink:hover{color:var(--dsw-alias-brand-primary)}.qox3mn_docsLink:hover .qox3mn_docsLinkLabel{text-decoration:underline}.qox3mn_docsLink:hover .qox3mn_docsIcon{color:var(--dsw-alias-brand-primary)}.qox3mn_docsIcon{color:var(--dsw-alias-label-tertiary);flex:none}.qox3mn_docsLink:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-radius:4px}.qox3mn_catalogRowSingle{grid-template-columns:minmax(0,1fr) auto}.qox3mn_catalogInputMono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.qox3mn_footer{border-top:.5px solid var(--dsw-alias-border-l2);align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 0;display:flex}.qox3mn_footerError{color:var(--dsw-alias-label-error);text-align:right;min-width:0;flex:1;margin:0;font-size:12px;line-height:1.5}.qox3mn_footerButton{border:.5px solid var(--dsw-alias-border-l3);border-radius:8px;cursor:pointer;color:var(--dsw-alias-label-secondary);background:transparent;padding:5px 14px;font-size:13px;line-height:1.5}.qox3mn_footerButton:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.qox3mn_footerButton:disabled{cursor:default;opacity:.4}.qox3mn_footerButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.qox3mn_footerButtonPrimary{color:var(--dsw-alias-bg-layer-3);font-weight:600;background:var(--dsw-alias-label-primary);border-color:transparent}.qox3mn_footerButtonPrimary:hover:not(:disabled){color:var(--dsw-alias-bg-layer-3);background:var(--dsw-alias-label-secondary);border-color:transparent}.qox3mn_liveLine{align-items:center;gap:8px;display:flex;padding:6px 10px;border:.5px solid var(--dsw-alias-border-l3);border-radius:8px;background:var(--dsw-alias-bg-layer-1)}.qox3mn_liveLine:hover{border-color:var(--dsw-alias-border-l4)}.qox3mn_liveText{flex:1;min-width:0;display:flex;align-items:center;gap:8px}.qox3mn_liveName{color:var(--dsw-alias-label-primary);font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.qox3mn_liveState{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.qox3mn_tools{flex:1 1 auto;min-width:0;display:flex;flex-wrap:wrap;gap:4px;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}.qox3mn_tools span{padding:0 6px;border:.5px solid var(--dsw-alias-border-l3);border-radius:6px;background:var(--dsw-alias-bg-module-platform)}.qox3mn_control{box-sizing:border-box;width:100%;min-width:0;height:28px;padding:0 10px;border:.5px solid var(--dsw-alias-border-l4);border-radius:8px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:22px}.qox3mn_control::placeholder{color:var(--dsw-alias-label-dimmed)}.qox3mn_control:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.qox3mn_control:disabled{opacity:.6;cursor:default}.qox3mn_textarea{box-sizing:border-box;width:100%;min-width:0;min-height:64px;padding:6px 10px;border:.5px solid var(--dsw-alias-border-l4);border-radius:8px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:18px;resize:vertical}.qox3mn_textarea:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.qox3mn_textarea:disabled{opacity:.6;cursor:default}.qox3mn_select{box-sizing:border-box;height:28px;min-width:0;padding:0 8px;border:.5px solid var(--dsw-alias-border-l4);border-radius:8px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:22px}.qox3mn_select:disabled{opacity:.6;cursor:default}.qox3mn_checkbox{margin:0;accent-color:var(--dsw-alias-brand-primary)}.qox3mn_controlField{align-items:flex-start;gap:4px;display:flex;flex-direction:column;width:100%}.qox3mn_controlTitle{color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px}.qox3mn_controlField .qox3mn_control,.qox3mn_controlField .qox3mn_textarea{margin-top:2px}.qox3mn_grid{display:grid;grid-template-columns:minmax(96px,20%) minmax(0,1fr);gap:6px 10px;align-items:center;width:100%}.qox3mn_grid>label{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.qox3mn_editor{gap:10px;display:flex;flex-direction:column;padding:10px;border:.5px solid var(--dsw-alias-border-l3);border-radius:10px;background:var(--dsw-alias-bg-layer-1)}.qox3mn_editorTitle{color:var(--dsw-alias-label-primary);font-size:14px;line-height:20px}.qox3mn_editorHint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.qox3mn_editorActions{align-items:center;gap:8px;display:flex;justify-content:flex-end}.qox3mn_transport{color:var(--dsw-alias-label-tertiary);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:18px;word-break:break-all}.qox3mn_summary{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px;display:flex;align-items:center;gap:6px}.qox3mn_summaryItem{color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.qox3mn_summaryNone{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:20px}.qox3mn_summaryBroken{color:var(--dsw-alias-state-error-primary);font-size:13px;line-height:20px}.qox3mn_toastRoot{z-index:2147483000;flex-direction:column;gap:8px;display:flex;position:fixed;right:16px;bottom:16px;max-width:min(360px,50vw)}.qox3mn_toast{border:.5px solid var(--dsw-alias-border-l3);border-radius:10px;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);padding:8px 10px;font-size:12px;line-height:18px;box-shadow:0 4px 12px #0000001f;overflow-wrap:anywhere}.qox3mn_toast[data-notice-kind=error]{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary)}.qox3mn_toast[data-notice-kind=stall]{border-color:var(--dsw-alias-border-l4);color:var(--dsw-alias-label-tertiary)}.qox3mn_composerPills{display:inline-flex;gap:4px}.qox3mn_composerPillRoot{display:flex}.qox3mn_composerPill{min-width:0;max-width:220px;height:28px;font:inherit;font-size:13px;font-weight:500;line-height:20px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:transparent;border:none;border-radius:24px;outline:none;align-items:center;gap:4px;padding:0 4px 0 8px;display:inline-flex}.qox3mn_composerPill:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.qox3mn_composerPill:disabled{cursor:default}.qox3mn_composerPillIcon{flex:none;display:inline-flex;color:var(--dsw-alias-label-secondary)}.qox3mn_composerPillLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.qox3mn_composerPillChevron{color:var(--dsw-alias-label-caption);flex:none;transition:transform .12s;display:inline-flex}.qox3mn_composerPillChevronOpen{transform:rotate(180deg)}\\n';\nvar shared_default = { \"body\": \"qox3mn_body\", \"field\": \"qox3mn_field\", \"fieldRow\": \"qox3mn_fieldRow\", \"fieldTitle\": \"qox3mn_fieldTitle\", \"fieldDesc\": \"qox3mn_fieldDesc\", \"selector\": \"qox3mn_selector\", \"selectorWrap\": \"qox3mn_selectorWrap\", \"pillChevron\": \"qox3mn_pillChevron\", \"row\": \"qox3mn_row\", \"button\": \"qox3mn_button\", \"readOnly\": \"qox3mn_readOnly\", \"error\": \"qox3mn_error\", \"dot\": \"qox3mn_dot\", \"dotError\": \"qox3mn_dotError\", \"badge\": \"qox3mn_badge\", \"empty\": \"qox3mn_empty\", \"catalog\": \"qox3mn_catalog\", \"linkButton\": \"qox3mn_linkButton\", \"linkButtonRow\": \"qox3mn_linkButtonRow\", \"rowList\": \"qox3mn_rowList\", \"catalogEntry\": \"qox3mn_catalogEntry\", \"catalogRow\": \"qox3mn_catalogRow\", \"catalogInput\": \"qox3mn_catalogInput\", \"iconButton\": \"qox3mn_iconButton\", \"iconButtonDanger\": \"qox3mn_iconButtonDanger\", \"addButton\": \"qox3mn_addButton\", \"disclosure\": \"qox3mn_disclosure\", \"disclosureSummary\": \"qox3mn_disclosureSummary\", \"disclosureLabel\": \"qox3mn_disclosureLabel\", \"disclosureCount\": \"qox3mn_disclosureCount\", \"disclosureBody\": \"qox3mn_disclosureBody\", \"toggleLabel\": \"qox3mn_toggleLabel\", \"fetchDialog\": \"qox3mn_fetchDialog\", \"dialogContent\": \"qox3mn_dialogContent\", \"dialogHeader\": \"qox3mn_dialogHeader\", \"dialogTitle\": \"qox3mn_dialogTitle\", \"dialogClose\": \"qox3mn_dialogClose\", \"dialogDescription\": \"qox3mn_dialogDescription\", \"dialogBody\": \"qox3mn_dialogBody\", \"candidateToolbar\": \"qox3mn_candidateToolbar\", \"candidateSearch\": \"qox3mn_candidateSearch\", \"candidateList\": \"qox3mn_candidateList\", \"candidate\": \"qox3mn_candidate\", \"candidateLabel\": \"qox3mn_candidateLabel\", \"candidateId\": \"qox3mn_candidateId\", \"candidateNote\": \"qox3mn_candidateNote\", \"dialogFooter\": \"qox3mn_dialogFooter\", \"dialogButton\": \"qox3mn_dialogButton\", \"dialogButtonPrimary\": \"qox3mn_dialogButtonPrimary\", \"selectorLabel\": \"qox3mn_selectorLabel\", \"result\": \"qox3mn_result\", \"resultValue\": \"qox3mn_resultValue\", \"resultAge\": \"qox3mn_resultAge\", \"notice\": \"qox3mn_notice\", \"noticeTitle\": \"qox3mn_noticeTitle\", \"noticeBody\": \"qox3mn_noticeBody\", \"docsLink\": \"qox3mn_docsLink\", \"docsLinkLabel\": \"qox3mn_docsLinkLabel\", \"docsIcon\": \"qox3mn_docsIcon\", \"catalogRowSingle\": \"qox3mn_catalogRowSingle\", \"catalogInputMono\": \"qox3mn_catalogInputMono\", \"footer\": \"qox3mn_footer\", \"footerError\": \"qox3mn_footerError\", \"footerButton\": \"qox3mn_footerButton\", \"footerButtonPrimary\": \"qox3mn_footerButtonPrimary\", \"liveLine\": \"qox3mn_liveLine\", \"liveText\": \"qox3mn_liveText\", \"liveName\": \"qox3mn_liveName\", \"liveState\": \"qox3mn_liveState\", \"tools\": \"qox3mn_tools\", \"control\": \"qox3mn_control\", \"textarea\": \"qox3mn_textarea\", \"select\": \"qox3mn_select\", \"checkbox\": \"qox3mn_checkbox\", \"controlField\": \"qox3mn_controlField\", \"controlTitle\": \"qox3mn_controlTitle\", \"grid\": \"qox3mn_grid\", \"editor\": \"qox3mn_editor\", \"editorTitle\": \"qox3mn_editorTitle\", \"editorHint\": \"qox3mn_editorHint\", \"editorActions\": \"qox3mn_editorActions\", \"transport\": \"qox3mn_transport\", \"summary\": \"qox3mn_summary\", \"summaryItem\": \"qox3mn_summaryItem\", \"summaryNone\": \"qox3mn_summaryNone\", \"summaryBroken\": \"qox3mn_summaryBroken\", \"toastRoot\": \"qox3mn_toastRoot\", \"toast\": \"qox3mn_toast\", \"composerPills\": \"qox3mn_composerPills\", \"composerPillRoot\": \"qox3mn_composerPillRoot\", \"composerPill\": \"qox3mn_composerPill\", \"composerPillIcon\": \"qox3mn_composerPillIcon\", \"composerPillLabel\": \"qox3mn_composerPillLabel\", \"composerPillChevron\": \"qox3mn_composerPillChevron\", \"composerPillChevronOpen\": \"qox3mn_composerPillChevronOpen\" };\n\n// src/client/blocks/icons.ts\nvar CHEVRON_PATH = \"M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z\";\nvar TRASH_PATH = \"M2.5 4h11M6.5 4V2.5h3V4M4 4l.7 9a1 1 0 001 .9h4.6a1 1 0 001-.9L12 4M6.5 6.8v4.4M9.5 6.8v4.4\";\nvar CLOSE_PATHS = [\n \"M14.1168 13.197L13.197 14.1167L1.8833 2.80303L2.80309 1.88324L14.1168 13.197Z\",\n \"M13.197 1.88326L14.1168 2.80305L2.80309 14.1168L1.8833 13.197L13.197 1.88326Z\"\n];\nvar DOCS_PATHS = [\n \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\",\n \"M15 3h6v6\",\n \"M10 14 21 3\"\n];\n\n// src/client/blocks/rows.ts\nfunction RowsBlock(props) {\n const served = Array.isArray(props.values) ? props.values : [];\n const writable = props.writable === true;\n const busy = props.busy === true;\n const labels = Array.isArray(props.labels) ? props.labels : [];\n const placeholders = Array.isArray(props.placeholders) ? props.placeholders : [];\n const columns = Math.max(1, labels.length);\n const blankRow = [];\n for (let blank = 0; blank < columns; blank++) blankRow.push(\"\");\n const servedKey = JSON.stringify(served);\n const draftState = react.useState({ key: \"\", rows: [] });\n const draft = draftState[0];\n const setDraft = draftState[1];\n const rows = draft.key === servedKey ? draft.rows : served.map((row) => Array.from(row));\n const write = (next) => {\n const saved = props.save === void 0 ? void 0 : props.save(next);\n return Promise.resolve(saved === void 0 ? void 0 : saved).then(\n () => {\n setDraft({ key: \"\", rows: [] });\n },\n (failure) => {\n throw failure;\n }\n );\n };\n const setCell = (at, column, value) => {\n const next = rows.map((row, index) => index === at ? row.map((cell, cellIndex) => cellIndex === column ? value : cell) : row.slice());\n setDraft({ key: servedKey, rows: next });\n };\n const commit = () => {\n const cleaned = [];\n for (const row of rows) {\n const cells = row.map((cell) => String(cell ?? \"\").trim());\n if (cells.some((cell) => cell !== \"\")) cleaned.push(cells);\n }\n return write(cleaned);\n };\n const remove = (at) => {\n return write(rows.filter((_row, index) => index !== at));\n };\n const add = () => {\n setDraft({ key: servedKey, rows: rows.concat([blankRow.slice()]) });\n };\n const rowClass = props.rowClassName === void 0 || props.rowClassName === shared_default.catalogRow ? shared_default.catalogRow : shared_default.catalogRow + \" \" + props.rowClassName;\n const inputClass = props.inputClassName === void 0 ? shared_default.catalogInput : props.inputClassName;\n const list = jsxs(\"div\", {\n className: shared_default.rowList,\n children: [\n served.length === 0 && props.emptyLabel !== void 0 ? jsx(\"div\", { className: shared_default.empty, children: props.emptyLabel }, \"empty\") : null,\n rows.map(\n (row, at) => jsx(\"div\", {\n className: shared_default.catalogEntry,\n children: jsxs(\"div\", {\n className: rowClass,\n children: [\n row.map(\n (cell, column) => jsx(\"input\", {\n className: inputClass,\n type: \"text\",\n value: cell === void 0 ? \"\" : cell,\n placeholder: placeholders[column] === void 0 ? \"\" : placeholders[column],\n disabled: !writable || busy,\n onChange: (event) => {\n setCell(at, column, typeof event?.target?.value === \"string\" ? event.target.value : \"\");\n },\n onBlur: () => {\n if (writable && !busy) void commit();\n },\n onKeyDown: (event) => {\n if (event.key === \"Enter\") {\n if (typeof event.preventDefault === \"function\") event.preventDefault();\n if (writable && !busy) void commit();\n }\n }\n }, column)\n ),\n jsx(\"button\", {\n type: \"button\",\n className: shared_default.iconButton + \" \" + shared_default.iconButtonDanger,\n disabled: !writable || busy,\n title: props.removeLabel === void 0 ? \"\" : props.removeLabel,\n onClick: () => {\n if (writable && !busy) void remove(at);\n },\n children: jsx(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n stroke: \"currentColor\",\n children: jsx(\"path\", { d: TRASH_PATH })\n })\n }, \"remove\")\n ]\n })\n }, at)\n ),\n jsx(\"button\", {\n type: \"button\",\n className: shared_default.linkButton,\n disabled: !writable || busy,\n title: props.addTitle === void 0 ? \"\" : props.addTitle,\n onClick: () => {\n if (!writable || busy) return;\n add();\n },\n children: props.addLabel === void 0 ? \"\" : props.addLabel\n }, \"add\"),\n props.renderAction === void 0 ? null : props.renderAction(rows)\n ]\n });\n if (props.disclosure !== true) return list;\n return jsxs(\"details\", {\n className: shared_default.disclosure,\n children: [\n jsxs(\"summary\", {\n className: shared_default.disclosureSummary,\n children: [\n jsx(\"span\", { className: shared_default.disclosureLabel, children: props.disclosureLabel === void 0 ? \"\" : props.disclosureLabel }),\n jsx(\"span\", {\n className: shared_default.disclosureCount,\n children: (props.disclosureCountLabel === void 0 ? String(rows.length) : props.disclosureCountLabel).replace(\"{count}\", String(rows.length))\n })\n ]\n }),\n jsx(\"div\", { className: shared_default.disclosureBody, children: list })\n ]\n });\n}\nvar RowList = RowsBlock;\n\n// src/client/blocks/dialog.ts\nimport * as react2 from \"react\";\nimport { jsx as jsx2, jsxs as jsxs2 } from \"react/jsx-runtime\";\nfunction DialogBlock(props) {\n var t = props.t;\n var candidates = Array.from(props.candidates);\n var savedIds = Array.from(props.savedIds);\n var savedSet = new Set(savedIds);\n var initialChecked = candidates.filter((candidate) => savedSet.has(candidate.id)).map((candidate) => candidate.id);\n var servedKey = JSON.stringify(candidates) + \"|\" + JSON.stringify(savedIds);\n var draftState = react2.useState({ key: \"\", query: \"\", checked: [] });\n var draft = draftState[0];\n var setDraft = draftState[1];\n var dirty = draft.key !== servedKey;\n var query = dirty ? \"\" : draft.query;\n var checked = dirty ? initialChecked : draft.checked;\n var checkedSet = new Set(checked);\n var setQuery = (value) => {\n setDraft({ key: servedKey, query: value, checked: Array.from(checkedSet) });\n };\n var setChecked = (make) => {\n setDraft({ key: servedKey, query, checked: make(checked) });\n };\n var needle = query.trim().toLowerCase();\n var shown = needle === \"\" ? candidates : candidates.filter((candidate) => candidate.id.toLowerCase().indexOf(needle) !== -1);\n var addable = shown.filter((candidate) => !savedSet.has(candidate.id)).map((candidate) => candidate.id);\n var allChecked = addable.length > 0 && addable.every((id) => checkedSet.has(id));\n var toggle = (id, value) => {\n setChecked((current) => value ? current.concat([id]) : current.filter((entry) => entry !== id));\n };\n return jsxs2(\"div\", {\n className: shared_default.fetchDialog,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n \"aria-label\": props.title,\n children: [\n jsxs2(\"div\", {\n className: shared_default.dialogContent,\n children: [\n jsxs2(\"div\", {\n className: shared_default.dialogHeader,\n children: [\n jsx2(\"h2\", { className: shared_default.dialogTitle, children: props.title }),\n jsx2(\"button\", {\n type: \"button\",\n className: shared_default.dialogClose,\n \"aria-label\": t(\"close\"),\n onClick: () => props.onClose(),\n children: jsx2(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n children: CLOSE_PATHS.map((d, at) => jsx2(\"path\", { d, fill: \"currentColor\" }, at))\n })\n })\n ]\n }),\n jsx2(\"p\", { className: shared_default.dialogDescription, children: props.description }),\n jsxs2(\"div\", {\n className: shared_default.dialogBody,\n children: [\n jsxs2(\"div\", {\n className: shared_default.candidateToolbar,\n children: [\n jsx2(\"input\", {\n className: shared_default.candidateSearch,\n type: \"search\",\n placeholder: props.searchPlaceholder,\n \"aria-label\": props.searchPlaceholder,\n value: query,\n onChange: (event) => {\n setQuery(event && event.target ? String(event.target.value ?? \"\") : \"\");\n }\n }),\n jsx2(\"button\", {\n type: \"button\",\n className: shared_default.linkButton,\n onClick: () => {\n if (allChecked) setChecked(() => []);\n else setChecked((current) => Array.from(new Set(current.concat(addable))));\n },\n children: t(\"selectAll\")\n })\n ]\n }),\n shown.length === 0 ? jsx2(\"p\", { className: shared_default.empty, children: t(\"dialogEmpty\") }) : jsx2(\"ul\", {\n className: shared_default.candidateList,\n children: shown.map((candidate) => {\n var isSaved = savedSet.has(candidate.id);\n var note = candidate.note !== \"\" ? candidate.note : isSaved ? t(\"candidateSaved\") : \"\";\n return jsx2(\"li\", {\n className: shared_default.candidate,\n children: jsxs2(\"label\", {\n className: shared_default.candidateLabel,\n children: [\n jsx2(\"input\", {\n type: \"checkbox\",\n checked: isSaved ? true : checkedSet.has(candidate.id),\n disabled: isSaved,\n onChange: (event) => {\n toggle(candidate.id, !!(event && event.target && event.target.checked));\n }\n }),\n jsx2(\"span\", { className: shared_default.candidateId, children: candidate.id }),\n note === \"\" ? null : jsx2(\"span\", { className: shared_default.candidateNote, children: note })\n ]\n })\n }, candidate.id);\n })\n })\n ]\n }),\n jsxs2(\"div\", {\n className: shared_default.dialogFooter,\n children: [\n jsx2(\"button\", {\n type: \"button\",\n className: shared_default.dialogButton,\n onClick: () => props.onClose(),\n children: t(\"cancel\")\n }),\n jsx2(\"button\", {\n type: \"button\",\n className: shared_default.dialogButton + \" \" + shared_default.dialogButtonPrimary,\n onClick: () => props.onAdd(Array.from(checkedSet)),\n children: t(\"addSelected\")\n })\n ]\n })\n ]\n })\n ]\n });\n}\n\n// src/client/blocks/picker.ts\nimport { jsx as jsx3, jsxs as jsxs3 } from \"react/jsx-runtime\";\nimport { Menu } from \"@deepseek-ai/dsh-client-ui-primitives\";\nfunction PickerBlock(props) {\n const entries = Array.isArray(props.entries) ? props.entries : [];\n const options = Array.isArray(props.options) ? props.options : [];\n const selectedId = props.selectedId === void 0 ? \"\" : props.selectedId;\n const writable = props.writable === true;\n const busy = props.busy === true;\n const rows = entries.map((entry) => [entry.id, entry.name]);\n const saveEntries = (next) => {\n if (props.save === void 0) return Promise.resolve();\n return Promise.resolve(props.save(next.map((row) => ({ id: row[0] ?? \"\", name: row[1] ?? \"\" }))));\n };\n const refreshAction = () => jsx3(\"button\", {\n type: \"button\",\n className: shared_default.linkButton,\n disabled: !writable || busy,\n onClick: () => {\n props.refresh();\n },\n children: busy && props.busyLabel !== void 0 ? props.busyLabel : props.refreshLabel\n });\n const extras = props.actions === void 0 ? [] : props.actions;\n const renderActions = () => jsxs3(\"div\", {\n className: shared_default.linkButtonRow,\n children: [\n refreshAction(),\n ...extras.map(\n (action, index) => jsx3(\"button\", {\n type: \"button\",\n className: shared_default.linkButton,\n disabled: !writable || busy || action.disabled === true,\n title: action.title === void 0 ? \"\" : action.title,\n onClick: () => {\n action.onClick();\n },\n children: action.label\n }, index)\n )\n ]\n });\n return jsxs3(\"div\", {\n className: shared_default.catalog,\n children: [\n jsxs3(\"div\", {\n className: shared_default.field,\n children: [\n jsxs3(\"div\", {\n className: shared_default.fieldRow,\n children: [\n props.selectorLabel === void 0 || props.selectorLabel === \"\" ? null : jsx3(\"span\", { className: shared_default.fieldTitle, children: props.selectorLabel }),\n jsx3(\"span\", {\n className: shared_default.selectorWrap,\n children: jsx3(Menu, {\n open: props.menuOpen === true,\n onClose: () => {\n props.setMenuOpen(false);\n },\n items: options.map((option) => ({ id: option.id, label: option.label })),\n selectedId: options.some((option) => option.id === selectedId) ? selectedId : \"\",\n onSelect: (id) => {\n props.setMenuOpen(false);\n props.select(id);\n },\n align: \"end\",\n portal: true,\n anchor: jsxs3(\"button\", {\n type: \"button\",\n className: shared_default.selector,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": props.menuOpen === true,\n disabled: !writable || busy,\n title: props.selectedTitle === void 0 ? \"\" : props.selectedTitle,\n onClick: () => {\n props.setMenuOpen(!(props.menuOpen === true));\n },\n children: [\n // A bare label; a path needs its own\n // truncating span.\n jsx3(\"span\", { className: shared_default.selectorLabel, children: props.selectedLabel }),\n jsx3(\"svg\", {\n width: 14,\n height: 14,\n className: shared_default.pillChevron,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n children: jsx3(\"path\", { d: CHEVRON_PATH, fill: \"currentColor\" })\n })\n ]\n })\n })\n })\n ]\n }),\n props.hint === void 0 ? null : jsx3(\"div\", { className: shared_default.fieldDesc, children: props.hint })\n ]\n }),\n RowsBlock({\n values: rows,\n save: saveEntries,\n labels: [props.idLabel === void 0 ? \"\" : props.idLabel, props.nameLabel === void 0 ? \"\" : props.nameLabel],\n placeholders: [props.idPlaceholder === void 0 ? \"\" : props.idPlaceholder, props.namePlaceholder === void 0 ? \"\" : props.namePlaceholder],\n writable: props.writable,\n busy,\n emptyLabel: props.emptyText,\n addLabel: props.addLabel,\n removeLabel: props.removeLabel,\n disclosureLabel: props.rowsLabel,\n disclosure: true,\n rowClassName: shared_default.catalogRow,\n renderAction: renderActions\n }),\n props.statusLine === void 0 || props.statusLine === null ? null : props.statusLine\n ]\n });\n}\n\n// src/client/blocks/flags.ts\nimport { jsx as jsx4, jsxs as jsxs4 } from \"react/jsx-runtime\";\nfunction FlagsBlock(props) {\n const writable = props.writable === true;\n const busy = props.busy === true;\n const flags = Array.isArray(props.flags) ? props.flags : [];\n const saveValues = (next) => {\n const cleaned = next.map((row) => String(row === void 0 || row === null ? \"\" : row[0] ?? \"\").trim()).filter((flag) => flag !== \"\").filter((flag, index, all) => all.indexOf(flag) === index);\n if (typeof props.save !== \"function\") return Promise.resolve();\n return Promise.resolve(props.save(cleaned));\n };\n const actions = props.actions === void 0 ? [] : props.actions;\n const renderAction = (visible) => jsxs4(\"div\", {\n className: shared_default.linkButtonRow,\n children: actions.map(\n (action, index) => jsx4(\n \"button\",\n {\n type: \"button\",\n className: shared_default.linkButton,\n disabled: !writable || busy || action.disabled === true,\n title: action.title === void 0 ? action.label : action.title,\n onClick: () => {\n if (!writable || busy) return;\n const current = visible.map((row) => String(row[0] ?? \"\").trim()).filter((flag) => flag !== \"\");\n const merged = Array.from(/* @__PURE__ */ new Set([...current, ...action.merged(current)]));\n void saveValues(merged.map((flag) => [flag]));\n },\n children: action.label\n },\n index\n )\n )\n }, \"actions\");\n return jsxs4(\"div\", {\n className: shared_default.catalog,\n children: [\n jsxs4(\"div\", {\n className: shared_default.field,\n children: [\n jsxs4(\"div\", {\n className: shared_default.fieldRow,\n children: [\n jsx4(\"span\", { className: shared_default.fieldTitle, children: props.title }),\n props.link === void 0 || props.link.href === \"\" ? null : jsxs4(\"a\", {\n className: shared_default.docsLink,\n href: props.link.href,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n title: props.link.title === void 0 ? props.link.label : props.link.title,\n children: [\n jsx4(\"svg\", {\n className: shared_default.docsIcon,\n width: 14,\n height: 14,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n \"aria-hidden\": \"true\",\n children: DOCS_PATHS.map((d, at) => jsx4(\"path\", { d }, at))\n }),\n jsx4(\"span\", { className: shared_default.docsLinkLabel, children: props.link.label })\n ]\n })\n ]\n }),\n props.hint === void 0 ? null : jsx4(\"div\", { className: shared_default.fieldDesc, children: props.hint })\n ]\n }),\n RowsBlock({\n values: flags.map((flag) => [flag]),\n save: saveValues,\n labels: [props.rowLabel === void 0 ? \"\" : props.rowLabel],\n placeholders: [props.rowPlaceholder === void 0 ? \"\" : props.rowPlaceholder],\n writable: props.writable,\n busy,\n emptyLabel: props.emptyText,\n addLabel: props.addLabel,\n removeLabel: props.removeLabel,\n disclosureLabel: props.disclosureLabel,\n disclosure: props.disclosure === true,\n rowClassName: shared_default.catalogRowSingle,\n inputClassName: shared_default.catalogInput,\n renderAction\n })\n ]\n });\n}\n\n// src/client/blocks/toggle.ts\nimport { jsx as jsx5, jsxs as jsxs5 } from \"react/jsx-runtime\";\nimport { Switch } from \"@deepseek-ai/dsh-client-ui-primitives\";\nfunction SwitchField(props) {\n const control = jsx5(Switch, {\n checked: props.checked === true,\n label: props.label,\n disabled: props.disabled === true || props.busy === true,\n onChange: () => {\n if (typeof props.onToggle === \"function\") props.onToggle();\n }\n });\n if (props.variant === \"row\") {\n return jsx5(\"span\", {\n className: shared_default.toggleLabel,\n title: props.title === void 0 ? props.label : props.title,\n \"aria-label\": props.label,\n children: control\n });\n }\n return jsxs5(\"div\", {\n className: shared_default.catalog,\n children: [\n jsxs5(\"div\", {\n className: shared_default.field,\n children: [\n jsxs5(\"div\", {\n className: shared_default.fieldRow,\n children: [\n jsx5(\"span\", { className: shared_default.fieldTitle, children: props.label }),\n jsx5(\"span\", {\n className: shared_default.toggleLabel,\n title: props.title === void 0 ? props.label : props.title,\n children: control\n })\n ]\n }),\n props.hint === void 0 ? null : jsx5(\"div\", { className: shared_default.fieldDesc, children: props.hint })\n ]\n })\n ]\n });\n}\n\n// src/client/blocks/status-line.ts\nimport { jsx as jsx6, jsxs as jsxs6 } from \"react/jsx-runtime\";\nfunction LinkButtonRow(props) {\n return jsxs6(\"div\", { className: shared_default.linkButtonRow, children: props.children === void 0 ? [] : [props.children] });\n}\nfunction ErrorLine(props) {\n const text2 = String(props.text ?? \"\");\n if (text2 === \"\") return null;\n return jsxs6(\"p\", {\n className: shared_default.error,\n role: \"status\",\n children: [\n jsx6(\"span\", { className: shared_default.dot + \" \" + shared_default.dotError, \"aria-hidden\": \"true\" }),\n jsx6(\"span\", { children: text2 })\n ]\n });\n}\n\n// src/client/blocks/controls.ts\nimport * as react3 from \"react\";\nimport { jsx as jsx7, jsxs as jsxs7 } from \"react/jsx-runtime\";\nimport { Menu as Menu2 } from \"@deepseek-ai/dsh-client-ui-primitives\";\nfunction TextField(props) {\n return field(props, jsx7(\"input\", {\n type: \"text\",\n className: shared_default.control,\n value: text(props.value),\n placeholder: props.placeholder ?? \"\",\n disabled: props.disabled === true,\n \"aria-label\": props.label,\n onChange: (event) => props.onChange(event.target.value)\n }));\n}\nfunction LinesField(props) {\n const box = useTypedBox(linesOf(props.value).join(\"\\n\"));\n return field(props, jsx7(\"textarea\", {\n className: shared_default.textarea,\n value: box.text,\n placeholder: props.placeholder ?? \"\",\n disabled: props.disabled === true,\n \"aria-label\": props.label,\n onChange: (event) => {\n const typed = event.target.value;\n box.stage(typed);\n props.onChange(parseLines(typed));\n }\n }));\n}\nfunction MapField(props) {\n const box = useTypedBox(serializeMap(props.value));\n return field(props, jsx7(\"textarea\", {\n className: shared_default.textarea,\n value: box.text,\n placeholder: props.placeholder ?? \"\",\n disabled: props.disabled === true,\n \"aria-label\": props.label,\n onChange: (event) => {\n const typed = event.target.value;\n box.stage(typed);\n props.onChange(parseMap(typed));\n }\n }));\n}\nfunction SelectField(props) {\n const options = selectOptions(props.value, props.options ?? [], props.placeholder);\n return field(\n props,\n jsx7(\"select\", {\n className: shared_default.select,\n value: text(props.value),\n disabled: props.disabled === true,\n \"aria-label\": props.label,\n onChange: (event) => {\n const picked = options.find((option) => text(option.value) === event.target.value);\n props.onChange(picked === void 0 ? event.target.value : picked.value);\n },\n children: options.map(\n (option) => jsx7(\"option\", { value: text(option.value), children: option.label }, text(option.value))\n )\n })\n );\n}\nfunction DropdownField(props) {\n const openState = react3.useState(false);\n const open = openState[0];\n const setOpen = openState[1];\n const disabled = props.disabled === true;\n const options = selectOptions(props.value, props.options ?? [], props.placeholder);\n const held = text(props.value);\n const current = options.find((option) => text(option.value) === held);\n return field(\n props,\n jsx7(\"span\", {\n className: shared_default.selectorWrap,\n children: jsx7(Menu2, {\n open: open && !disabled,\n onClose: () => setOpen(false),\n items: options.map((option) => ({ id: text(option.value), label: option.label })),\n selectedId: current === void 0 ? \"\" : held,\n onSelect: (id) => {\n setOpen(false);\n if (id === held) return;\n const picked = options.find((option) => text(option.value) === id);\n props.onChange(picked === void 0 ? id : picked.value);\n },\n align: \"start\",\n portal: true,\n anchor: jsxs7(\"button\", {\n type: \"button\",\n className: shared_default.selector,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open && !disabled,\n \"aria-label\": props.label,\n disabled,\n onClick: () => setOpen(!open),\n children: [\n jsx7(\"span\", { className: shared_default.selectorLabel, children: current === void 0 ? props.placeholder ?? \"\" : current.label }),\n jsx7(\"svg\", {\n width: 14,\n height: 14,\n className: shared_default.pillChevron,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n children: jsx7(\"path\", { d: CHEVRON_PATH, fill: \"currentColor\" })\n })\n ]\n })\n })\n })\n );\n}\nfunction ExtraField(props) {\n const type = props.type === void 0 ? \"string\" : props.type;\n if (type === \"boolean\") {\n return field(\n props,\n jsx7(\"input\", {\n type: \"checkbox\",\n className: shared_default.checkbox,\n checked: props.value === true,\n disabled: props.disabled === true,\n \"aria-label\": props.label,\n onChange: (event) => props.onChange(event.target.checked)\n })\n );\n }\n if (type === \"lines\") return jsx7(LinesField, props);\n if (type === \"select\") return SelectField(props);\n if (type === \"secret\") {\n return field(\n props,\n jsx7(\"input\", {\n type: \"password\",\n className: shared_default.control,\n value: text(props.value),\n placeholder: props.placeholder ?? \"\",\n disabled: props.disabled === true,\n \"aria-label\": props.label,\n onChange: (event) => props.onChange(event.target.value)\n })\n );\n }\n if ((props.options ?? []).length > 0) return SelectField(props);\n return TextField(props);\n}\nfunction selectOptions(value, served, placeholder) {\n const out = [];\n const seen = /* @__PURE__ */ new Set();\n const held = text(value);\n if (held === \"\" && placeholder !== void 0 && placeholder !== \"\" && !served.some((option) => text(option.value) === \"\")) {\n out.push({ value: \"\", label: placeholder });\n seen.add(\"\");\n }\n for (const option of served) {\n const key = text(option.value);\n if (seen.has(key)) continue;\n seen.add(key);\n out.push(option);\n }\n if (held !== \"\" && !seen.has(held)) out.push({ value, label: held });\n return out;\n}\nfunction linesOf(value) {\n if (Array.isArray(value)) return value.map((item) => text(item)).filter((item) => item.trim() !== \"\");\n if (typeof value === \"string\") return parseLines(value);\n return [];\n}\nfunction useTypedBox(served) {\n const typedState = react3.useState({ key: \"\", text: \"\" });\n const typed = typedState[0];\n const setTyped = typedState[1];\n return {\n text: typed.key === served ? typed.text : served,\n stage: (text2) => setTyped({ key: served, text: text2 })\n };\n}\nfunction text(value) {\n if (value === void 0 || value === null) return \"\";\n return typeof value === \"string\" ? value : String(value);\n}\nfunction parseLines(text2) {\n return String(text2).split(\"\\n\").filter((line) => line.trim() !== \"\");\n}\nfunction parseMap(text2) {\n const out = {};\n for (const line of String(text2).split(\"\\n\")) {\n if (line.trim() === \"\") continue;\n const split = line.indexOf(\"=\");\n if (split <= 0) continue;\n const key = line.slice(0, split);\n if (key.trim() === \"\") continue;\n out[key] = line.slice(split + 1);\n }\n return out;\n}\nfunction mapText(value) {\n if (value === void 0 || value === null) return \"\";\n if (typeof value === \"string\") return value;\n if (Array.isArray(value)) return value.map((item) => text(item)).join(\",\");\n if (typeof value === \"object\") return JSON.stringify(value);\n return String(value);\n}\nfunction serializeMap(value) {\n if (typeof value === \"string\") return value;\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return \"\";\n return Object.entries(value).map(([key, item]) => `${key}=${mapText(item)}`).join(\"\\n\");\n}\nfunction field(props, control) {\n return jsxs7(\"div\", {\n className: shared_default.controlField,\n children: [\n jsx7(\"div\", { className: shared_default.controlTitle, children: props.label }),\n control,\n props.help === void 0 || props.help === \"\" ? null : jsx7(\"div\", { className: shared_default.fieldDesc, children: props.help })\n ]\n });\n}\n\n// src/client/blocks/pill.ts\nimport { jsx as jsx8, jsxs as jsxs8 } from \"react/jsx-runtime\";\nimport { Menu as Menu3 } from \"@deepseek-ai/dsh-client-ui-primitives\";\nfunction ComposerPill(props) {\n const disabled = props.disabled === true;\n return jsx8(\"span\", {\n className: shared_default.composerPillRoot,\n \"data-pill\": props.key,\n children: jsx8(Menu3, {\n open: props.open && !disabled,\n onClose: () => props.setOpen(false),\n items: props.options,\n selectedId: props.selectedId,\n onSelect: (id) => {\n props.setOpen(false);\n if (id === props.selectedId) return;\n Promise.resolve(props.onSelect(id)).catch(() => void 0);\n },\n align: \"start\",\n side: \"top\",\n portal: true,\n anchor: jsxs8(\"button\", {\n type: \"button\",\n className: shared_default.composerPill,\n \"aria-label\": props.ariaLabel ?? (props.title === void 0 ? props.label : `${props.title}: ${props.label}`),\n title: props.title ?? props.label,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": props.open && !disabled,\n disabled,\n onClick: () => props.setOpen(!props.open),\n children: [\n props.icon === void 0 || props.icon.length === 0 ? null : jsx8(\"span\", {\n className: shared_default.composerPillIcon,\n \"aria-hidden\": true,\n children: jsx8(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: props.icon.map(\n (d, at) => jsx8(\"path\", { d, stroke: \"currentColor\", strokeWidth: 2, strokeLinecap: \"round\", strokeLinejoin: \"round\" }, at)\n )\n })\n }),\n jsx8(\"span\", { className: shared_default.composerPillLabel, children: props.label }),\n jsx8(\"span\", {\n className: shared_default.composerPillChevron + (props.open && !disabled ? \" \" + shared_default.composerPillChevronOpen : \"\"),\n \"aria-hidden\": true,\n children: jsx8(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: jsx8(\"path\", { d: CHEVRON_PATH, fill: \"currentColor\" })\n })\n })\n ]\n })\n })\n });\n}\n\n// src/client/blocks/index.ts\nvar Blocks = {\n RowsBlock,\n DialogBlock,\n PickerBlock,\n FlagsBlock,\n SwitchField,\n LinkButtonRow,\n ErrorLine,\n TextField,\n LinesField,\n MapField,\n SelectField,\n DropdownField,\n ExtraField,\n ComposerPill\n};\n\n// src/client/controller/controller.ts\nimport { createSnapshotStore } from \"@deepseek-ai/dsh-client-store\";\n\n// src/host/values.ts\nfunction tag(value) {\n return Object.prototype.toString.call(value).slice(8, -1);\n}\nfunction isPlainObject(value) {\n const prototype = Object.getPrototypeOf(value);\n if (prototype === null) return true;\n if (prototype === Object.prototype) return true;\n return Object.getPrototypeOf(prototype) === null && tag(value) === \"Object\";\n}\nfunction canonicalCollection(value, kind) {\n if (kind === \"Set\") {\n return [...value].map(canonical).sort((left, right) => stableKey(left) < stableKey(right) ? -1 : 1);\n }\n return [...value].map(([key, item]) => [canonical(key), canonical(item)]).sort((left, right) => stableKey(left[0]) < stableKey(right[0]) ? -1 : 1);\n}\nfunction answersNothing(value) {\n return value === void 0 || value === null;\n}\nfunction meaningfulKeys(value) {\n return Object.keys(value).filter((key) => !answersNothing(value[key]));\n}\nfunction canonical(value) {\n const kind = tag(value);\n if (kind === \"Set\" || kind === \"Map\") return canonicalCollection(value, kind);\n return value;\n}\nfunction stableKey(value) {\n const text2 = JSON.stringify(value, (_key, item) => {\n if (item !== null && typeof item === \"object\") {\n const kind = tag(item);\n if (kind === \"Set\" || kind === \"Map\") return canonicalCollection(item, kind);\n }\n if (item !== null && typeof item === \"object\" && !Array.isArray(item)) {\n const sorted = {};\n for (const name of Object.keys(item).sort()) {\n const child = item[name];\n if (!answersNothing(child)) sorted[name] = child;\n }\n return sorted;\n }\n return item === void 0 ? null : item;\n });\n return text2 === void 0 ? \"null\" : text2;\n}\nfunction sameValue(a, b) {\n if (a === b) return true;\n if (typeof a === \"number\" && typeof b === \"number\") return Number.isNaN(a) && Number.isNaN(b);\n const leftMissing = answersNothing(a);\n const rightMissing = answersNothing(b);\n if (leftMissing || rightMissing) return leftMissing && rightMissing;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) return false;\n return a.every((item, index) => sameValue(item, b[index]));\n }\n if (!isPlainObject(a) || !isPlainObject(b)) return sameOpaqueValue(a, b);\n const left = meaningfulKeys(a);\n const right = meaningfulKeys(b);\n if (left.length !== right.length) return false;\n return left.every(\n (key) => Object.prototype.hasOwnProperty.call(b, key) && sameValue(a[key], b[key])\n );\n}\nfunction sameOpaqueValue(a, b) {\n const kind = tag(a);\n if (kind !== tag(b)) return false;\n if (kind === \"Date\") return sameValue(a.getTime(), b.getTime());\n if (kind === \"RegExp\") {\n return sameValue(a.source, b.source) && sameValue(a.flags, b.flags);\n }\n if (kind === \"Map\" || kind === \"Set\") {\n return sameValue(canonical(a), canonical(b));\n }\n if (kind === \"String\" || kind === \"Number\" || kind === \"Boolean\") {\n return sameValue(a.valueOf(), b.valueOf());\n }\n return false;\n}\n\n// src/client/controller/snapshot.ts\nfunction nothingCardSnapshot() {\n return {\n available: false,\n writable: false,\n values: {},\n overridden: [],\n lastError: \"\",\n dirty: false,\n saving: false,\n failed: false,\n actionError: \"\",\n notice: null\n };\n}\n\n// src/client/controller/wait.ts\nvar RUN_SETTLE_TIMEOUT_MS = 9e4;\nfunction settleOnRevision(host, settled, write, deadline = RUN_SETTLE_TIMEOUT_MS) {\n if (host.disposed) return Promise.resolve();\n let satisfied = false;\n const armed = host.settleOn((snapshot) => {\n if (settled(snapshot) !== true) return false;\n satisfied = true;\n return true;\n });\n return new Promise((resolve) => {\n let done = false;\n const timer = setTimeout(() => finish(), deadline);\n host.settleTimer = timer;\n const finish = (refused = false) => {\n if (done) return;\n done = true;\n clearTimeout(timer);\n if (host.settleTimer === timer) host.settleTimer = null;\n armed.cancel();\n resolve();\n if (refused || satisfied || host.disposed) return;\n const state = host.getSnapshot();\n if (state.lastError !== \"\") host.noteNotice(\"error\", state.lastError);\n else host.noteNotice(\"stall\", \"\");\n };\n void armed.settle.then(() => finish());\n void Promise.resolve(write()).then(\n (accepted) => {\n if (accepted === false) {\n host.noteError(\"configuration write refused\");\n finish(true);\n }\n },\n (error) => {\n host.noteError(error);\n finish(true);\n }\n );\n });\n}\n\n// src/client/controller/controller.ts\nvar MAX_WRITE_PASSES = 4;\nvar CardController = class {\n /** Disposed \u2014 every late answer and timer bails on this flag first. */\n disposed = false;\n /** The armed stall-deadline timer (owned by ./wait.ts). */\n settleTimer = null;\n store;\n fields;\n errorField;\n settleDeadlineMs;\n settleField;\n /** The last pass of the write door, when the mount can issue it unfenced. */\n unfencedMutate;\n /** The form the entry's row page handed (`view: \"page\"`), if any. */\n pageForm;\n formRef;\n unsubscribe;\n /** Staged drafts: only fields that differ from what is served. */\n draft = {};\n /** The last served (undrafted) answers, recomputed on every push. */\n served = {};\n saving = false;\n failed = false;\n actionError = \"\";\n noticeQueue = null;\n noticeSeq = 0;\n /** Every armed settle; keyed against a published snapshot. */\n waits = [];\n constructor(form, spec = {}) {\n this.fields = spec.fields ?? {};\n this.errorField = spec.errorField ?? \"lastError\";\n this.settleDeadlineMs = spec.settleDeadlineMs;\n this.settleField = spec.settleField === void 0 || spec.settleField === \"\" ? void 0 : spec.settleField;\n this.unfencedMutate = spec.unfencedMutate;\n this.formRef = form;\n this.store = createSnapshotStore(nothingCardSnapshot());\n this.unsubscribe = form === void 0 ? void 0 : form.subscribe(() => {\n this.actionError = \"\";\n this.publish();\n });\n this.publish();\n }\n /** Adopt the form the row page hands with `view: \"page\"` (identity guarded:\n * an unchanged adopt is a no-op, keeping its publish out of the render). */\n adoptForm(form) {\n if (this.disposed) return;\n const next = form === void 0 ? void 0 : form;\n if (this.pageForm === next) return;\n this.pageForm = next;\n this.publish();\n }\n /** The card's store is what the card body renders. */\n getSnapshot() {\n return this.store.getSnapshot();\n }\n /** Whether anything serves this entry. */\n available() {\n return this.store.getSnapshot().available === true;\n }\n /** Read one field off the current snapshot (drafts overlaid). */\n value(field2) {\n return this.store.getSnapshot().values[field2];\n }\n /** One field as the Host serves it, drafts left out \u2014 what a staged edit\n * that lands back on it is compared against. */\n servedValue(field2) {\n return this.documentValue(field2);\n }\n /** One field as the served document answers it (what a wait arms against). */\n documentValue(field2) {\n const snapshot = this.readSnapshot();\n if (snapshot === void 0 || snapshot.status !== \"ready\" || snapshot.value === void 0) return void 0;\n return snapshot.value[field2];\n }\n /**\n * Staged edit: save one value as a draft. A draft equal to what is served\n * is not dirty \u2014 it stages nothing and dirties nothing.\n */\n stage(field2, value) {\n if (this.disposed) return;\n const servedValue = this.served[field2];\n if (valuesEqual(servedValue, value)) {\n delete this.draft[field2];\n } else {\n this.draft[field2] = value;\n }\n this.publish();\n }\n /** Drop every staged draft: the card answers with what is served. */\n discard() {\n if (this.disposed) return;\n for (const key of Object.keys(this.draft)) delete this.draft[key];\n this.failed = false;\n this.publish();\n }\n /** Apply exactly the staged fields. Accepted: the drafts clear with the\n * Host's answers. Refused: the drafts stand, `failed` says so. */\n async applyStaged() {\n if (this.disposed) return false;\n const staged = Object.entries(this.draft);\n if (staged.length === 0) return true;\n this.saving = true;\n this.publish();\n const ops = staged.map(([field2, value]) => ({ op: \"set\", path: [field2], value }));\n const accepted = await this.writeDoor(() => ops);\n if (accepted) {\n for (const field2 of Object.keys(this.draft)) delete this.draft[field2];\n this.failed = false;\n } else {\n this.failed = true;\n this.actionError = \"configuration write refused\";\n }\n this.saving = false;\n this.publish();\n return accepted;\n }\n /** Immediate write of one field \u2014 rows, selections: written on the spot. */\n async writeField(field2, value) {\n if (this.disposed) return false;\n const accepted = await this.writeDoor(() => [{ op: \"set\", path: [field2], value }]);\n this.publish();\n return accepted;\n }\n /** Return one field to what the row's own configuration answers: the field\n * leaves the user layer (an `unset`), and any draft standing over it goes. */\n async resetField(field2) {\n if (this.disposed) return false;\n const accepted = await this.writeDoor(() => [{ op: \"unset\", path: [field2] }]);\n if (accepted) delete this.draft[field2];\n this.publish();\n return accepted;\n }\n /**\n * Trigger write \u2014 a nonce: the value is always a stamp that moved off what\n * stood before it (`nextStamp`), so a later commit always reads as a diff.\n * Returns as soon as the write lands; waiting for the Host *run* is the job\n * of `settle` \u2014 armed before this crosses the wire, so nothing can slip\n * between. A stamp that stands where it stood answers no run at all: two\n * actions inside one millisecond must not read as nothing happened.\n */\n async writeTrigger(field2) {\n return this.writeDoor((document2) => [{ op: \"set\", path: [field2], value: nextStamp(document2[field2]) }]);\n }\n /** Write a trigger and wait for the mirror to satisfy `settled`. */\n settleAndTrigger(settled, field2) {\n return settleOnRevision(this, settled, () => this.writeTrigger(field2), this.settleDeadlineMs);\n }\n /** The immediate-write shape of `settleAndTrigger`: write one field on the\n * spot (a selection, a saved list) and wait for the Host run behind it to\n * satisfy `settled` \u2014 the wait armed before the write crosses the wire. */\n settleAndWrite(settled, field2, value) {\n return settleOnRevision(this, settled, () => this.writeField(field2, value), this.settleDeadlineMs);\n }\n /**\n * Entry trigger \u2014 the keyed nonce (`entryActions` hole): stamps a moved\n * value **under `key`** inside the field's map, keeping every other row's\n * stamp, and writes the whole map through the door. The Host's trigger diff\n * answers per key (`host/adapter/form.ts`), so exactly the row that stamped\n * fires its run. The merge is composed inside the door (what the document\n * stands on now), never from what this half last rendered.\n */\n async writeEntryTrigger(field2, key) {\n const wanted = String(key);\n return this.writeDoor((document2) => {\n const current = document2[field2];\n const stamps = current !== null && typeof current === \"object\" && !Array.isArray(current) ? { ...current } : {};\n stamps[wanted] = nextStamp(stamps[wanted]);\n return [{ op: \"set\", path: [field2], value: stamps }];\n });\n }\n /** The keyed shape of `settleAndTrigger`: arm the wait, write the entry\n * nonce, settle when `settled` stands. */\n settleAndTriggerEntry(settled, field2, key) {\n return settleOnRevision(this, settled, () => this.writeEntryTrigger(field2, key), this.settleDeadlineMs);\n }\n /** Host-run settle on the `settleField` hole: write the trigger for\n * `triggerField`, settle once what `watchField` answers moves off the value\n * it stood at when the wait was armed \u2014 the diff is the answer, the wall\n * clock only the backstop. With no `watchField` declared anywhere, the\n * trigger field itself is what must move.\n *\n * Both sides read the **served document**: the store is what the body\n * renders, and at arm time it may not have answered the field at all (nothing\n * published yet) \u2014 armed against that, every answer reads as a move. */\n settleTrigger(triggerField, watchField) {\n const watched = watchField ?? this.settleField ?? triggerField;\n const armed = this.documentValue(watched);\n return settleOnRevision(\n this,\n () => !sameValue(this.documentValue(watched), armed),\n () => this.writeTrigger(triggerField),\n this.settleDeadlineMs\n );\n }\n /** The keyed shape of `settleTrigger`: the wait answers **per entry** \u2014 what\n * `watchField` answers for `key` moves off what it answered when armed. A\n * mirror shaped as a list of lines answers it by the line's own `id`/`key`,\n * which is the shape a live mirror really carries. */\n settleEntryTrigger(triggerField, key, watchField) {\n const watched = watchField ?? this.settleField ?? triggerField;\n const wanted = String(key);\n const armed = keyedAnswer(this.documentValue(watched), wanted);\n return settleOnRevision(\n this,\n () => !sameValue(keyedAnswer(this.documentValue(watched), wanted), armed),\n () => this.writeEntryTrigger(triggerField, key),\n this.settleDeadlineMs\n );\n }\n /** Arm one predicate against the next publish (the wait surface). */\n settleOn(settled) {\n let resolve = () => void 0;\n const settle = new Promise((done) => {\n resolve = done;\n });\n const wait = { settled, resolve };\n this.waits.push(wait);\n return {\n settle,\n cancel: () => {\n const index = this.waits.indexOf(wait);\n if (index >= 0) this.waits.splice(index, 1);\n resolve();\n }\n };\n }\n /** Stage one failure notice for the body's toast host. */\n noteNotice(kind, text2) {\n this.noticeSeq += 1;\n this.noticeQueue = { seq: this.noticeSeq, kind, text: String(text2 ?? \"\") };\n this.publish();\n }\n /** Drop one announced notice (by `seq`). */\n clearNotice(seq) {\n if (this.noticeQueue !== null && this.noticeQueue.seq === seq) this.noticeQueue = null;\n this.publish();\n }\n /** Surface a refused or failed write as the card's own error line. */\n noteError(error) {\n this.actionError = String(error instanceof Error ? error.message : error);\n this.publish();\n }\n /** Release everything: subscriptions, settle, timers. */\n dispose() {\n this.disposed = true;\n this.unsubscribe?.();\n this.unsubscribe = void 0;\n this.pageForm = void 0;\n for (const wait of [...this.waits]) wait.resolve();\n this.waits.length = 0;\n if (this.settleTimer !== null && this.settleTimer !== void 0) {\n clearTimeout(this.settleTimer);\n this.settleTimer = null;\n }\n }\n /** Everything a registered card body receives \u2014 the same object for every\n * render (identity stable), so a re-render cannot disturb the store. */\n inject() {\n return {\n store: this.store,\n controller: this,\n fields: this.fields\n };\n }\n /** Push the served answers, overlaid by drafts, into the store. */\n publish() {\n if (this.disposed) return;\n const previous = this.store.getSnapshot();\n const snapshot = this.readSnapshot();\n let values = {};\n let overridden = [];\n let available = false;\n let writable = false;\n if (snapshot !== void 0 && snapshot.status === \"ready\" && snapshot.value !== void 0) {\n available = true;\n writable = snapshot.writable !== false;\n values = { ...snapshot.value };\n const user = snapshot.user;\n if (user !== null && typeof user === \"object\") overridden = Object.keys(user);\n for (const [field2, value] of Object.entries(this.draft)) values[field2] = value;\n } else {\n for (const key of Object.keys(this.draft)) delete this.draft[key];\n this.releaseWaits();\n }\n this.served = snapshot !== void 0 && snapshot.status === \"ready\" && snapshot.value !== void 0 ? { ...snapshot.value } : {};\n this.store.set({\n available,\n writable,\n values,\n overridden,\n lastError: typeof values[this.errorField] === \"string\" ? String(values[this.errorField]) : \"\",\n dirty: Object.keys(this.draft).length > 0,\n saving: this.saving,\n failed: this.failed,\n actionError: this.actionError,\n notice: this.noticeQueue\n });\n const state = this.store.getSnapshot();\n for (const wait of [...this.waits]) {\n if (wait.settled(state) === true) {\n this.waits.splice(this.waits.indexOf(wait), 1);\n wait.resolve();\n }\n }\n }\n /** What every read stands on: the shared form's mirror, which subscribes\n * and so moves with every Host answer. The page's handed `state` is a\n * snapshot taken when the page rendered \u2014 only the fallback when no shared\n * form stands; the page form is adopted as the write **door**, not as the\n * source. */\n readSnapshot() {\n if (this.formRef !== void 0) {\n try {\n return this.formRef.getSnapshot();\n } catch {\n }\n }\n return this.pageForm?.state;\n }\n /**\n * The write door \u2014 a refused pass is re-issued against the re-read document\n * until the budget runs out, then the refusal is *reported*.\n *\n * The door takes what the ops are **made of**, not the ops themselves, for\n * one reason: anything that has to carry what the document already says (a\n * keyed trigger's stamp map, a stamp that must move) is composed against\n * what the document says *now*, on every pass. Composing it once from what\n * this half last rendered would re-issue a merge made against a document\n * that already moved \u2014 and drop the other row's stamp on the floor.\n */\n async writeDoor(compose) {\n for (let pass = 0; pass < MAX_WRITE_PASSES; pass++) {\n const snapshot = this.readSnapshot();\n if (snapshot === void 0 || snapshot.status !== \"ready\") return false;\n const document2 = snapshot.value ?? {};\n const ops = withLiveCleared(compose(document2), this.fields.liveKeys);\n const pageForm = this.pageForm;\n const formRef = this.formRef;\n const door = pageForm !== void 0 ? (next) => pageForm.mutate(next) : formRef !== void 0 ? (next) => formRef.mutate(next) : void 0;\n if (door === void 0) return false;\n const last = pass === MAX_WRITE_PASSES - 1 && this.unfencedMutate !== void 0;\n try {\n const accepted = last ? await this.unfencedMutate(ops) : await door(ops);\n if (accepted === true) return true;\n } catch {\n }\n }\n return false;\n }\n /** Nothing serves: no wait can settle. */\n releaseWaits() {\n for (const wait of [...this.waits]) {\n this.waits.splice(this.waits.indexOf(wait), 1);\n wait.resolve();\n }\n }\n};\nfunction withLiveCleared(ops, liveKeys) {\n if (liveKeys === void 0 || liveKeys.length === 0) return ops;\n const written = new Set(ops.map((op) => op.path[0]));\n const clears = liveKeys.filter((key) => !written.has(key)).map((key) => ({ op: \"unset\", path: [key] }));\n return clears.length === 0 ? ops : [...ops, ...clears];\n}\nfunction valuesEqual(a, b) {\n return sameValue(a, b);\n}\nfunction keyedAnswer(value, key) {\n if (value === null || typeof value !== \"object\") return value;\n if (Array.isArray(value)) {\n const rows = value;\n const row = rows.find((item) => identityOf(item) === key);\n if (rows.some((item) => identityOf(item) !== void 0)) return row;\n return value;\n }\n if (Object.prototype.hasOwnProperty.call(value, key)) return value[key];\n return value;\n}\nfunction identityOf(row) {\n if (row === null || typeof row !== \"object\") return void 0;\n const claimed = row.id ?? row.key;\n if (typeof claimed === \"string\") return claimed;\n if (typeof claimed === \"number\") return String(claimed);\n return void 0;\n}\nfunction nextStamp(previous) {\n const standing = typeof previous === \"number\" && Number.isFinite(previous) ? previous : 0;\n return Math.max(Date.now(), standing + 1);\n}\n\n// src/client/locales/index.ts\nvar LOCALE_NAMESPACE = \"dshAncesters\";\nvar DICTIONARIES = {\n en: {\n apply: \"Apply\",\n discard: \"Discard\",\n saving: \"Saving\\u2026\",\n unsaved: \"Unsaved changes\",\n saveFailed: \"Save failed\",\n cancel: \"Cancel\",\n close: \"Close\",\n search: \"Search\",\n searchNoResults: \"No matches\",\n searchPlaceholder: \"Search\\u2026\",\n addSelected: \"Add selected\",\n // The page-wide notices (`toasts`): a wait that ended with nothing\n // answered, and a failure the Host answered without a line of its own.\n toastStall: \"The host did not answer the action \\u2014 try it again.\",\n toastError: \"The host reported a failure.\"\n }\n};\nfunction mergeDictionaries(base = DICTIONARIES, override = {}) {\n const merged = {};\n for (const locale of [...Object.keys(base), ...Object.keys(override)]) {\n merged[locale] = { ...base[locale] === void 0 ? {} : base[locale], ...override[locale] === void 0 ? {} : override[locale] };\n }\n return merged;\n}\n\n// src/client/toasts.ts\nvar TOAST_ROOT_SELECTOR = \"div[data-dsh-ancesters-toasts]\";\nvar TOAST_DISMISS_MS = 8e3;\nfunction noticeText(notice, t) {\n if (notice.kind === \"stall\") return t(\"toastStall\");\n return notice.text !== \"\" ? notice.text : t(\"toastError\");\n}\nfunction mountToastMirror(source, host, options = {}) {\n const doc = documentOf(host);\n if (doc === void 0) return () => void 0;\n const root = host === void 0 || host === null ? toastRoot(doc) : host;\n if (root === void 0 || typeof root.appendChild !== \"function\") return () => void 0;\n const t = typeof options.t === \"function\" ? options.t : (key) => key;\n const dismissMs = typeof options.dismissMs === \"number\" && options.dismissMs >= 0 ? options.dismissMs : TOAST_DISMISS_MS;\n let node = void 0;\n let shownSeq = -1;\n let timer = void 0;\n const dismiss = (seq) => {\n if (typeof source.clearNotice === \"function\") source.clearNotice(seq);\n };\n const stopTimer = () => {\n if (timer !== void 0) clearTimeout(timer);\n timer = void 0;\n };\n const paint = () => {\n const snapshot = source.store.getSnapshot();\n const notice = snapshot.notice ?? null;\n if (notice === null) {\n stopTimer();\n shownSeq = -1;\n if (node !== void 0) {\n root.removeChild(node);\n node = void 0;\n }\n return;\n }\n if (node === void 0) {\n node = doc.createElement(\"div\");\n node.className = shared_default.toast;\n root.appendChild(node);\n }\n node.dataset.dshAncestersToast = String(notice.seq);\n node.dataset.noticeKind = notice.kind;\n node.textContent = typeof options.text === \"function\" ? options.text(notice, snapshot, t) : noticeText(notice, t);\n const seq = notice.seq;\n node.onclick = () => dismiss(seq);\n if (seq !== shownSeq) {\n shownSeq = seq;\n stopTimer();\n if (dismissMs > 0 && typeof setTimeout === \"function\") timer = setTimeout(() => dismiss(seq), dismissMs);\n }\n };\n const unsubscribe = source.store.subscribe(() => paint());\n paint();\n return () => {\n unsubscribe();\n stopTimer();\n if (node !== void 0) {\n root.removeChild(node);\n node = void 0;\n }\n };\n}\nfunction documentOf(host) {\n const own = host !== void 0 && host !== null ? host.ownerDocument : void 0;\n if (own !== void 0 && own !== null) return own;\n return typeof document === \"undefined\" ? void 0 : document;\n}\nfunction toastRoot(doc) {\n const standing = doc.querySelectorAll(TOAST_ROOT_SELECTOR);\n if (standing.length > 0) return standing[0];\n const root = doc.createElement(\"div\");\n root.className = shared_default.toastRoot;\n root.dataset.dshAncestersToasts = \"1\";\n const container = doc.body ?? doc.head;\n if (container === void 0) return void 0;\n container.appendChild(root);\n return root;\n}\n\n// src/client/styles/index.ts\nvar SHEET_ID = \"dsh-ancesters-\" + hash(cssText);\nfunction sheetId(css) {\n return \"dsh-ancesters-\" + hash(css);\n}\nfunction injected(id) {\n return document.querySelectorAll('style[data-dsh-ancesters-css=\"' + id + '\"]').length > 0;\n}\nfunction injectCardStyles(sheets) {\n if (typeof document === \"undefined\") return;\n const wanted = [cssText, ...sheets ?? []].filter((sheet) => typeof sheet === \"string\" && sheet !== \"\");\n for (const sheet of wanted) {\n const id = sheetId(sheet);\n if (injected(id)) continue;\n const styleTag = document.createElement(\"style\");\n styleTag.dataset.dshAncestersCss = id;\n styleTag.textContent = sheet;\n document.head.appendChild(styleTag);\n }\n}\nfunction hash(text2) {\n let value = 2166136261 >>> 0;\n for (let index = 0; index < text2.length; index++) {\n value ^= text2.charCodeAt(index);\n value = Math.imul(value, 16777619) >>> 0;\n }\n return value.toString(36).padStart(6, \"0\").slice(0, 6) + \"-\" + text2.length.toString(36);\n}\n\n// src/client/apply.ts\nfunction unfencedSettingsWrite(ctx, ns) {\n const settings = ctx.remote?.settings;\n const mutate = settings?.mutate;\n if (settings === void 0 || typeof mutate !== \"function\") return void 0;\n return async (ops) => {\n try {\n const response = await mutate.call(settings, ns, ops, void 0);\n return response?.ok === true;\n } catch {\n return false;\n }\n };\n}\nfunction mountSettingsCard(spec) {\n if (spec === void 0 || typeof spec !== \"object\" || Array.isArray(spec)) {\n throw new TypeError(\"mountSettingsCard: requires a descriptor object ({ entryId, fields, blocks \\u2026 })\");\n }\n if (typeof spec.entryId !== \"string\" || spec.entryId === \"\") {\n throw new TypeError(\"mountSettingsCard: the descriptor requires a non-empty `entryId`\");\n }\n if (spec.pluginId !== void 0 && (typeof spec.pluginId !== \"string\" || spec.pluginId === \"\")) {\n throw new TypeError(\"mountSettingsCard: the descriptor's `pluginId` must be a non-empty string (the row key needs the package identity)\");\n }\n if (spec.bundleId !== void 0 && (typeof spec.bundleId !== \"string\" || spec.bundleId === \"\")) {\n throw new TypeError(\"mountSettingsCard: the descriptor's `bundleId` must be a non-empty string (it is the bundle package the row key is built from)\");\n }\n if (spec.placement !== void 0 && spec.placement !== \"row\" && spec.placement !== \"bundle\") {\n throw new TypeError('mountSettingsCard: the descriptor\\'s `placement` is \"row\" or \"bundle\"');\n }\n const namespace = spec.localeNamespace === void 0 || spec.localeNamespace === \"\" ? LOCALE_NAMESPACE : spec.localeNamespace;\n const bundle = spec.placement === \"bundle\";\n const slotName = bundle ? \"plugins.bundle.config\" : \"plugins.row.config\";\n return {\n inject: [\"configForms\", \"slots\", \"locale\", \"remote\", \"remote.settings\"],\n apply(ctx) {\n if (ctx === void 0 || typeof ctx !== \"object\" || ctx.slots === void 0 || typeof ctx.slots.inject !== \"function\") {\n throw new TypeError(\"mountSettingsCard.apply: needs the browser plugin context (the shell's `slots` service)\");\n }\n injectCardStyles();\n const dicts = mergeDictionaries(DICTIONARIES, spec.locale ?? {});\n if (ctx.locale !== void 0 && typeof ctx.locale.register === \"function\") {\n ctx.effect(() => ctx.locale.register(namespace, dicts), `${spec.entryId}: dictionaries`);\n }\n const form = ctx.configForms === void 0 ? void 0 : ctx.configForms.get(spec.entryId);\n const controller = new CardController(form, {\n fields: spec.fields,\n errorField: spec.errorField,\n settleDeadlineMs: spec.settleDeadlineMs,\n settleField: spec.settleField,\n unfencedMutate: unfencedSettingsWrite(ctx, spec.entryId)\n });\n ctx.effect(() => () => controller.dispose(), `${spec.entryId}: card controller`);\n const translate = ctx.locale !== void 0 && typeof ctx.locale.bind === \"function\" ? ctx.locale.bind(namespace) : (key) => key;\n if (spec.toasts === true || spec.toasts !== void 0 && typeof spec.toasts === \"object\") {\n const toastHost = typeof spec.toasts === \"object\" ? spec.toasts.host : void 0;\n const dismissMs = typeof spec.toasts === \"object\" ? spec.toasts.dismissMs : void 0;\n const text2 = typeof spec.toasts === \"object\" ? spec.toasts.text : void 0;\n ctx.effect(\n () => mountToastMirror(controller, toastHost, { t: translate, dismissMs, text: text2 }),\n `${spec.entryId}: toast host`\n );\n }\n const body = (props) => {\n const view = String(props?.view) === \"page\" ? \"page\" : \"summary\";\n controller.adoptForm(props?.form === void 0 ? void 0 : props.form);\n const snapshot = controller.getSnapshot();\n if (view === \"summary\") {\n if (typeof spec.renderSummary !== \"function\") return null;\n return spec.renderSummary(snapshot, translate);\n }\n if (!snapshot.available && (spec.blocks ?? []).length === 0) return null;\n const renders = (spec.blocks ?? []).map(\n (block, index) => renderBlock(block, { snapshot, controller, view, t: translate })\n );\n const composed = renders.filter((rendered) => rendered !== null && rendered !== void 0);\n if (spec.errorLine === false) return composed;\n const error = snapshot.actionError !== \"\" ? snapshot.actionError : snapshot.lastError;\n const line = ErrorLine({ text: error === \"\" ? \"\" : error });\n return line === null ? composed : [...composed, line];\n };\n const pageKey = bundle ? bundleConfigKey(spec.bundleId ?? spec.pluginId) : rowConfigKey(spec.bundleId ?? spec.pluginId ?? \"\", spec.entryId);\n ctx.slots.inject(slotName, () => {\n ctx.slots.register(\n {\n name: slotName,\n key: pageKey,\n locale: namespace,\n inject: () => controller.inject()\n },\n body\n );\n });\n const composer = spec.composer;\n if (composer !== void 0) {\n if (typeof composer.id !== \"string\" || composer.id === \"\" || typeof composer.bind !== \"function\") {\n throw new TypeError(\"mountSettingsCard: `composer` needs a non-empty `id` and a `bind` function\");\n }\n const pills = (props) => {\n const subscribe = props?.useAncestersComposer;\n const snapshot = typeof subscribe === \"function\" ? subscribe((state) => state) : controller.getSnapshot();\n const openState = react4.useState(\"\");\n const open = openState[0];\n const setOpen = openState[1];\n if (snapshot?.available !== true) return null;\n const t = typeof props?.t === \"function\" ? props.t : translate;\n const declared = composer.bind(snapshot, controller, t) ?? [];\n if (declared.length === 0) return null;\n return jsx9(\"span\", {\n className: shared_default.composerPills,\n children: declared.map(\n (pill) => jsx9(\n ComposerPill,\n { ...pill, open: open === pill.key, setOpen: (next) => setOpen(next ? pill.key : \"\") },\n pill.key\n )\n )\n });\n };\n ctx.slots.inject(\"conversation.input.left\", () => {\n ctx.slots.register(\n {\n name: \"conversation.input.left\",\n // The slot is kind `list`: entries are deduped and\n // placed by a stable `id`, not a keyed `key`.\n id: composer.id,\n locale: namespace,\n inject: () => ({ hooks: { ancestersComposer: controller.store }, controller })\n },\n pills\n );\n });\n }\n }\n };\n}\nfunction bundleConfigKey(pkgName) {\n if (typeof pkgName !== \"string\" || pkgName === \"\") {\n throw new TypeError('mountSettingsCard: `placement: \"bundle\"` needs `pluginId` or `bundleId` (the bundle page is keyed by its package name)');\n }\n return pkgName;\n}\nfunction renderBlock(block, props) {\n if (block.hideWhenUnavailable === true && props.snapshot.available !== true) return null;\n const compose = { ...block.props ?? {} };\n if (block.field !== void 0) {\n compose.value = props.snapshot.values[block.field];\n compose.field = block.field;\n }\n if (block.liveKeys !== void 0) {\n for (const liveKey of block.liveKeys) compose[liveKey] = props.snapshot.values[liveKey];\n }\n if (typeof block.bind === \"function\") Object.assign(compose, block.bind(props.snapshot, props.controller, props.t));\n if (block.action !== void 0) compose.action = composeAction(block.action, props.controller, block.field);\n const component = typeof block.block === \"string\" ? BlocksByName[block.block] : block.block;\n if (typeof component !== \"function\") return null;\n return component({ ...compose, t: props.t });\n}\nfunction composeAction(action, controller, field2) {\n if (typeof action === \"function\") return action(controller);\n if (action === \"stage\") return (value) => controller.stage(String(field2 ?? \"\"), value);\n if (action === \"apply\") return () => controller.applyStaged();\n if (action === \"discard\") return () => controller.discard();\n if (action === \"write\") return (value) => controller.writeField(String(field2 ?? \"\"), value);\n return (value) => value === void 0 ? controller.writeTrigger(String(field2 ?? \"\")) : controller.writeEntryTrigger(String(field2 ?? \"\"), value);\n}\nvar BlocksByName = Blocks;\n\n// src/host/catalog.ts\nvar NAME_MAX_LENGTH = 200;\nvar ENTRY_CAP = 50;\nvar DEFAULT_ID_PATTERN = /^[^\\x00-\\x1f\\x7f]{1,1024}$/u;\nfunction isValidEntryId(id, rules = {}) {\n if (typeof id !== \"string\") return false;\n const trimmed = id.trim();\n if (trimmed === \"\") return false;\n return rules.idRule === void 0 ? DEFAULT_ID_PATTERN.test(trimmed) : rules.idRule(trimmed);\n}\nfunction entryLabel(entry) {\n const name = String(entry?.name ?? \"\").trim();\n return name === \"\" ? entry.id : name;\n}\nfunction normalizeEntries(value, rules = {}) {\n if (!Array.isArray(value)) return [];\n const cap = rules.cap === void 0 ? ENTRY_CAP : rules.cap;\n const nameMax = rules.nameMax === void 0 ? NAME_MAX_LENGTH : rules.nameMax;\n const rows = [];\n const sources = [];\n const seen = /* @__PURE__ */ new Set();\n for (const item of value) {\n if (rows.length === cap) break;\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) continue;\n const raw = item;\n const id = typeof raw.id === \"string\" ? raw.id.trim() : \"\";\n if (!isValidEntryId(id, rules) || seen.has(id)) continue;\n seen.add(id);\n const name = typeof raw.name === \"string\" ? raw.name.trim() : \"\";\n rows.push({ id, name: name.slice(0, nameMax) });\n sources.push(item);\n }\n if (rules.fields === void 0) return rows;\n return rows.map((row, index) => {\n const extra = rules.fields?.(sources[index]);\n return extra === void 0 || typeof extra !== \"object\" ? row : { ...row, ...extra };\n });\n}\nfunction mergeEntries(stored, ids, rules = {}) {\n const entries = normalizeEntries(stored, rules);\n const present = new Set(entries.map((entry) => entry.id));\n const cap = rules.cap === void 0 ? ENTRY_CAP : rules.cap;\n const merged = entries.slice();\n for (const id of ids) {\n if (merged.length >= cap) break;\n const trimmed = typeof id === \"string\" ? id.trim() : \"\";\n if (!isValidEntryId(trimmed, rules) || present.has(trimmed)) continue;\n present.add(trimmed);\n merged.push({ id: trimmed, name: \"\" });\n }\n return { entries: merged, changed: JSON.stringify(merged) !== JSON.stringify(entries) };\n}\nfunction entryIds(entries) {\n return (entries === void 0 ? [] : entries).map((entry) => entry.id);\n}\nfunction findEntry(entries, id) {\n return entries.find((entry) => entry.id === id);\n}\n\n// src/client/index.ts\nfunction mountSettingsCard2(spec) {\n return mountSettingsCard(spec);\n}\nvar dshAncestersClientPhase = 1;\nvar inject = [\"configForms\", \"slots\", \"locale\"];\nfunction apply(ctx) {\n throw new Error(\n \"dsh-ancesters/client: apply(ctx) answers through the card a plugin mounted \\u2014 call mountSettingsCard(spec).apply(ctx) from the plugin body\"\n );\n}\nexport {\n Blocks,\n CardController,\n ComposerPill,\n DICTIONARIES,\n DialogBlock,\n DropdownField,\n ErrorLine,\n ExtraField,\n FlagsBlock,\n LOCALE_NAMESPACE,\n LinesField,\n LinkButtonRow,\n MAX_WRITE_PASSES,\n MapField,\n PickerBlock,\n RUN_SETTLE_TIMEOUT_MS,\n RowList,\n RowsBlock,\n SHEET_ID,\n SelectField,\n SwitchField,\n TextField,\n apply,\n dshAncestersClientPhase,\n entryIds,\n entryLabel,\n findEntry,\n inject,\n injectCardStyles,\n isValidEntryId,\n mergeDictionaries,\n mergeEntries,\n mountSettingsCard2 as mountSettingsCard,\n normalizeEntries,\n nothingCardSnapshot,\n sheetId\n};\n", "/**\n * Browser half \u2014 the saved-executable rows the picker lists.\n *\n * This is the client-side mirror of `src/host/catalog.ts` (the two halves\n * compile into separate bundles and cannot share a module). Both halves follow\n * the same rules \u2014 trim the id, ignore ids that cannot go on the wire, keep the\n * first row per id, label a row by its custom name when it has one \u2014 and\n * `test/client.test.mjs` pins the mirror against the same fixtures the host\n * tests use, so a drift between the halves fails loudly.\n */\n/** One saved row: the path on the wire (`--executablePath=<id>`) + the label. */\nexport type CatalogEntry = { id: string; name: string };\n\n/** A saved row's id is a path: no control character may reach it (the same rule\n * the host's `CHROME_PATH_PATTERN` enforces), capped like the reference's\n * `COMMAND_MAX_LENGTH`. */\nconst ID_MAX_LENGTH = 1024;\nconst PATH_PATTERN = /^[^\\x00-\\x1f\\x7f]{1,1024}$/u;\n\n/** Cap of one row's display name (must match host `CATALOG_NAME_MAX_LENGTH`). */\nexport const NAME_MAX_LENGTH = 200;\n\n/** Cap of the saved rows (must match host `CATALOG_MAX_LENGTH`); the tail drops\n * off, so a merged run can never grow the persisted list without limit. */\nexport const ENTRY_CAP = 50;\n\n/** Whether one id is usable as a saved-row id. */\nexport function isValidEntryId(id: string): boolean {\n if (id === \"\" || id.length > ID_MAX_LENGTH) return false;\n return PATH_PATTERN.test(id);\n}\n\n/** One row label: the custom name when set, else the path itself. */\nexport function entryLabel(entry: CatalogEntry): string {\n const name = entry.name.trim();\n return name === \"\" ? entry.id : name;\n}\n\n/**\n * Coerce a served value into well-formed rows. Host-served arrays are already\n * normalized; a value read straight from the settings document may not be, so\n * the card can be handed anything.\n */\nexport function normalizeEntries(value: unknown): CatalogEntry[] {\n if (!Array.isArray(value)) return [];\n const out: CatalogEntry[] = [];\n const seen = new Set<string>();\n for (const item of value) {\n if (out.length === ENTRY_CAP) break;\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) continue;\n const raw = item as { id?: unknown; name?: unknown };\n const id = typeof raw.id === \"string\" ? raw.id.trim() : \"\";\n if (!isValidEntryId(id) || seen.has(id)) continue;\n seen.add(id);\n const name = typeof raw.name === \"string\" ? raw.name.trim() : \"\";\n out.push({ id, name: name.slice(0, NAME_MAX_LENGTH) });\n }\n return out;\n}\n", "/**\n * Browser half \u2014 the settings/status configuration.\n *\n * What the Plugins page renders for this bundle's own row: it registers into\n * the shared `plugins.row.config` slot, keyed by the package and row id, and\n * renders only what the page asks the body for (`view: \"page\"`). Since dsh\n * 0.2.0 the page owns the container and its identity line \u2014 the crumb, the\n * icon, the row title and description, and the section the body sits in \u2014 so\n * what is rendered here is the configuration itself: nothing collapsed behind a\n * header, no card shell, and no status line duplicating what the page already\n * states.\n *\n * The body is three catalog blocks, the same shape and in the same order the\n * sibling card (`dsh-docker-desktop-mcp`) carries: the named executable picker\n * (the pill the bridge actually launches with, over the saved-executable rows,\n * which the fetch action refreshes through the choose-to-add dialog), the extra\n * flags rows, and the \"Reduce log output\" toggle. Both row lists are the same\n * widget read through different fields, and they live in ./rows.ts. Two blocks\n * sit alongside them as this plugin's extensions \u2014 the WSL + Windows-executable\n * notice, and the probe result line under the picker's rows.\n *\n * There is no \"auto\" mode anywhere: the rows are what is available, what gets\n * picked stays picked, and a picked path that later stops running is reported\n * broken rather than silently re-resolved.\n *\n * This file is only the body's composition. The imperative run logic \u2014 the\n * fetch and Windows actions with their busy/dialog/clock state \u2014 lives in\n * ./run-actions.ts, what one served snapshot means lives in ./view.ts, and the\n * blocks it assembles live alongside:\n *\n * ./view.ts what one served snapshot means (options, notes, the dot)\n * ./run-actions.ts the imperative runs + their state (busy, dialog, clock)\n * ./picker.ts the executable picker: pill + saved-row catalog\n * ./flags.ts the extra-flags rows (the one-field reading of ./rows.ts)\n * ./rows.ts the one row list both catalogs render\n * ./toggle.ts the \"Reduce log output\" catalog block\n * ./dialog.ts the choose-to-add modal a fetch opens\n * ./icons.ts the icon paths the shell primitives do not carry\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport * as react from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport type { CatalogEntry } from \"../catalog.js\";\nimport type { ChromeExecutableStatus } from \"../types.js\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { ExtraFlagsEditor } from \"./flags.js\";\nimport { CatalogPicker } from \"./picker.js\";\nimport { CandidateDialog } from \"./dialog.js\";\nimport { useRunActions } from \"./run-actions.js\";\nimport { LogOutputToggle } from \"./toggle.js\";\nimport { describeCard, executableLabel, isBroken, probeAge, windowsChromeButton } from \"./view.js\";\n\n/** One option's label: the row's name, plus the tag the run gave a broken one. */\nfunction optionLabel(view: ReturnType<typeof describeCard>, id: string, t: (key: string) => string): string {\n const label = executableLabel(view, id);\n return isBroken(view, id) ? label + \" (\" + t(\"unavailableSuffix\") + \")\" : label;\n}\n\n/**\n * Hook result for the card component: locale copy, the snapshot selector, and\n * the controller-backed actions (all injected by the slot registration).\n */\nexport interface ChromeMcpCardProps {\n t: (key: string) => string;\n useChromeMcpCard: <T>(selector: (snapshot: any) => T) => T;\n saveFlags: (flags: string[]) => Promise<void>;\n toggleStderr: () => Promise<void>;\n /** Write the selected executable id (persisted; the default answers shift with it). */\n selectExecutable: (id: string) => Promise<void>;\n /** Save the whole saved-executables rows list (host re-runs the run). */\n saveExecutables: (entries: CatalogEntry[]) => Promise<void>;\n /** Ask the host to run the executable discovery, answering with every\n * candidate it looked at and what it said about each. */\n refreshExecutables: () => Promise<ChromeExecutableStatus[]>;\n /** Merge ids picked in the dialog into the saved rows. */\n addExecutables: (ids: string[]) => Promise<void>;\n /** Ask the host to drive a Windows-side Chrome in connect mode (locate,\n * prereq, launch, connect \u2014 all host-side; the answer lands in\n * `windowsChromeStatus`). */\n openWindowsChrome: () => Promise<void>;\n /** Persist every staged edit in one pass; nothing was applied until now. */\n apply: () => Promise<void>;\n /** Drop every staged edit, reverting the card to what the host serves. */\n discard: () => void;\n /** The shape the page asks for: `summary` is the one-liner, `page` the body.\n * (The page's own form handle is adopted by the shared body before any\n * block renders.) */\n view?: \"summary\" | \"page\";\n}\n\n/**\n * Render the DSH Chrome MCP settings/status configuration.\n * @param props - locale copy, the card snapshot hook, its actions, and the page\n * shape the slot renders this entry for.\n * @returns the configuration body, or nothing the page did not ask the body for.\n */\nexport function ChromeMcpCard(props: ChromeMcpCardProps) {\n const t = props.t;\n const state = props.useChromeMcpCard((snapshot) => snapshot);\n const menuState = react.useState(false);\n const menuOpen = menuState[0];\n const setMenuOpen = menuState[1];\n // The imperative half \u2014 the two host runs and the busy/dialog/clock state\n // they own \u2014 lives in ./run-actions.ts so this body stays composition.\n const runs = useRunActions({\n refreshExecutables: props.refreshExecutables,\n openWindowsChrome: props.openWindowsChrome,\n addExecutables: props.addExecutables\n });\n // The Plugins page asks for two shapes of the same slot: a one-line summary\n // and the body. Only the body is ours to render \u2014 the summary is the page's\n // own one-liner, and rendering the whole form inside one line would be\n // nonsense.\n if (props.view !== \"page\") return null;\n if (!state.available) return null;\n\n const view = describeCard(state);\n const rows = view.executableEntries;\n const savedIds = rows.map((entry: CatalogEntry) => entry.id);\n const options = view.executableOptions.map((option: { id: string }) => ({ id: option.id, label: optionLabel(view, option.id, t) }));\n // The error dot: red while an error line is present (a captured bridge/tool\n // failure or a rejected action), or the known \"executable not found\" state;\n // the tooltip always holds what the dot stands for. It used to ride the\n // card's own header; with no header of ours any more it rides the body's\n // error line instead, the one place the failure is stated.\n const dotLabel = view.error !== \"\" ? view.error : t(\"chromeMissing\");\n const dotAria = view.dotIsError || view.missing ? t(\"statusError\") : t(\"statusOk\");\n const statusDot = jsx(\"span\", {\n className: STYLES.dot + \" \" + STYLES.dotError,\n role: \"img\",\n \"aria-label\": dotAria,\n title: dotLabel\n });\n\n const windowsButton = windowsChromeButton(view);\n const windowsDisabled = windowsButton.disabled || runs.windowsRunning || !state.writable;\n const windowsBusy = windowsButton.busy || runs.windowsRunning;\n\n // Connect mode: the bridge connects instead of launching \u2014 so what the pill\n // claims is the connect address, not a local executable the host no longer\n // launches, probes or may not even have.\n const connectLabel =\n view.windowsChrome.port > 0\n ? t(\"connectModeLabel\") + \" (http://127.0.0.1:\" + String(view.windowsChrome.port) + \")\"\n : t(\"connectModeLabel\");\n const selectedLabel = view.connectMode\n ? connectLabel\n : view.effectivePath === \"\"\n ? t(\"executableNone\")\n : executableLabel(view, view.effectivePath);\n\n // What the last run answered for the **selected** executable \u2014 the line\n // beneath the rows that produced it. While a run is in flight the line says\n // so: a healthy host leaves the version unchanged, so without this the\n // action would only be a label flip. A failed run clears the version\n // host-side, so the line never claims what it did not answer with.\n const statusLine = runs.running\n ? jsx(\"p\", { className: STYLES.result, role: \"status\", children: t(\"probing\") })\n : view.version === \"\"\n ? null\n : jsxs(\"p\", {\n className: STYLES.result,\n role: \"status\",\n children: [\n t(\"versionLabel\"),\n jsx(\"span\", { className: STYLES.resultValue, children: view.version }),\n runs.lastProbedAt === 0 ? null : jsx(\"span\", { className: STYLES.resultAge, children: probeAge(runs.lastProbedAt, runs.clock, t) })\n ]\n });\n\n // The body's one error line: what the bridge or a tool call reported (or a\n // rejected write), else the known \"executable not found\" state \u2014 the dot\n // leading the same line so the failure and its marker read as one report.\n const errorLine = view.error !== \"\"\n ? jsxs(\"p\", { className: STYLES.error, role: \"status\", children: [statusDot, view.error] })\n : view.missing\n ? jsxs(\"p\", { className: STYLES.error, role: \"status\", children: [statusDot, t(\"chromeMissing\")] })\n : null;\n\n // The page renders its own section around what is returned, so the body is\n // the stack of blocks itself \u2014 no card shell and no collapsed header.\n return jsxs(\"div\", {\n className: STYLES.body,\n children: [\n // Nothing the page can write from here is writable: the row's\n // configuration is owned elsewhere (a home patch or the page's own\n // read-only state).\n !state.writable\n ? jsx(\"p\", { className: STYLES.readOnly, role: \"status\", children: t(\"readOnly\") })\n : null,\n jsx(CatalogPicker, {\n t: t,\n entries: rows,\n options: options,\n idPlaceholder: t(\"executableIdPlaceholder\"),\n namePlaceholder: t(\"namePlaceholder\"),\n selectedId: view.effectivePath,\n selectedLabel: selectedLabel,\n selectedTitle: view.connectMode ? connectLabel : view.effectivePath !== \"\" ? view.effectivePath : selectedLabel,\n writable: state.writable,\n busy: runs.running,\n menuOpen: menuOpen,\n setMenuOpen: setMenuOpen,\n connectMode: view.connectMode,\n selectorLabel: t(\"executableLabel\"),\n hint: view.connectMode ? t(\"connectModeHint\") : t(\"executableHint\"),\n windowsLabel: windowsBusy ? t(\"openWindowsChromeBusy\") : t(windowsButton.labelKey),\n windowsTitle: t(windowsButton.titleKey),\n windowsDisabled: windowsDisabled,\n windowsOnOpen: runs.runWindowsChrome,\n rowsLabel: t(\"executableRows\"),\n emptyText: t(\"executableEmpty\"),\n idLabel: t(\"executableIdLabel\"),\n nameLabel: t(\"executableNameLabel\"),\n removeLabel: t(\"removeExecutable\"),\n addLabel: t(\"addExecutable\"),\n refreshLabel: t(\"fetchExecutables\"),\n busyLabel: t(\"fetching\"),\n select: (id: string) => {\n if (typeof props.selectExecutable === \"function\") void props.selectExecutable(id);\n },\n saveEntries: (entries: CatalogEntry[]) => props.saveExecutables(entries),\n refresh: runs.runFetch,\n statusLine: statusLine\n }),\n // The one state no control of this form can express: the host runs\n // under WSL and what is selected is a Windows executable \u2014 which the\n // bridge cannot launch, however healthy its `--version` answer looks.\n // Nothing has failed yet, so this is a notice (static copy, shown only\n // while the host reports the state), not a third error surface: the\n // required configuration differs.\n view.wslWindowsExecutable\n ? jsxs(\"div\", {\n className: STYLES.notice,\n role: \"note\",\n children: [\n jsx(\"div\", { className: STYLES.noticeTitle, children: t(\"wslWindowsTitle\") }),\n jsx(\"div\", { className: STYLES.noticeBody, children: t(\"wslWindowsNote\") })\n ]\n })\n : null,\n jsx(ExtraFlagsEditor, {\n t: t,\n flags: Array.isArray(state.extraFlags) ? state.extraFlags : [],\n defaultFlags: Array.isArray(state.defaultExtraFlags) ? state.defaultExtraFlags : [],\n wslFlags: Array.isArray(state.wslExtraFlags) ? state.wslExtraFlags : [],\n writable: state.writable,\n saveFlags: props.saveFlags\n }),\n jsx(LogOutputToggle, {\n t: t,\n checked: view.reduceChecked,\n disabled: !state.writable,\n onToggle: props.toggleStderr\n }),\n errorLine,\n runs.dialog !== null\n ? jsx(CandidateDialog, {\n t: t,\n candidates: runs.dialog.candidates,\n savedIds: savedIds,\n title: t(\"dialogExecutablesTitle\"),\n description: t(\"dialogExecutablesDescription\"),\n searchPlaceholder: t(\"searchExecutables\"),\n onAdd: runs.addFromDialog,\n onClose: runs.closeDialog\n })\n : null,\n // The form writes nothing as it is edited: every staged edit is\n // persisted only when **Apply** lands them, and **Discard** drops the\n // whole draft \u2014 reverting every staged value to what the host already\n // serves.\n jsxs(\"div\", {\n className: STYLES.footer,\n children: [\n // A staged edit announces itself on the save line, since the\n // identity line the page draws says nothing about it.\n state.dirty\n ? jsx(\"span\", { className: STYLES.badge, children: t(\"unsaved\") })\n : null,\n state.failed\n ? jsx(\"p\", { className: STYLES.footerError, role: \"status\", children: t(\"saveFailed\") })\n : null,\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.footerButton,\n onClick: () => {\n if (typeof props.discard === \"function\") props.discard();\n },\n children: t(\"discard\")\n }),\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.footerButton + \" \" + STYLES.footerButtonPrimary,\n disabled: !state.dirty || state.saving || !state.writable,\n onClick: () => {\n if (typeof props.apply === \"function\") void props.apply();\n },\n children: state.saving ? t(\"saving\") : t(\"apply\")\n })\n ]\n })\n ]\n });\n}\n", "export const cssText = \".e5pfpa_body{flex-direction:column;gap:10px;display:flex}.e5pfpa_field{align-items:flex-start;gap:4px;display:flex;flex-direction:column;width:100%}.e5pfpa_fieldRow{align-items:center;gap:8px;display:flex;width:100%}.e5pfpa_fieldTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px;flex:1;min-width:0}.e5pfpa_fieldDesc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px;width:100%}.e5pfpa_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.e5pfpa_selector:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_selector:disabled{cursor:default}.e5pfpa_selectorWrap{display:flex}.e5pfpa_pillChevron{flex:none}.e5pfpa_row{display:flex;gap:10px;align-items:center}.e5pfpa_button{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:.5px solid var(--dsw-alias-border-l3);border-radius:14px;cursor:pointer;font-size:12px;line-height:18px;color:var(--dsw-alias-label-primary);background:transparent;padding:0 10px;height:28px}.e5pfpa_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_button:disabled{cursor:not-allowed;opacity:.4}.e5pfpa_button:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_readOnly{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.e5pfpa_error{color:var(--dsw-alias-state-error-primary);margin:0;font-size:12px;line-height:1.5}.e5pfpa_dot{box-sizing:border-box;corner-shape:round;border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}.e5pfpa_dotError{background:var(--dsw-alias-state-error-primary)}.e5pfpa_badge{color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1);border-radius:10px;padding:1px 8px;font-size:11px;line-height:16px;display:inline-flex;align-items:center;flex:none}.e5pfpa_empty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px}.e5pfpa_catalog{flex-direction:column;align-items:stretch;gap:10px;display:flex}.e5pfpa_catalog+.e5pfpa_catalog{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:12px}.e5pfpa_catalog>.e5pfpa_linkButton{align-self:flex-start}.e5pfpa_catalog>.e5pfpa_linkButtonRow{align-self:flex-start;display:flex;gap:8px;align-items:center}.e5pfpa_linkButton{box-sizing:border-box;border:none;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer;border-radius:14px;align-items:center;height:28px;padding:0 10px;font:inherit;font-size:12px;line-height:18px;display:inline-flex}.e5pfpa_linkButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.e5pfpa_linkButton:disabled{opacity:.4;cursor:default}.e5pfpa_linkButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_catalogEntry{border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-module-platform);border-radius:10px;padding:6px}.e5pfpa_catalogRow{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;align-items:center;gap:6px;display:grid}.e5pfpa_catalogInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;height:28px;padding:0 10px;font:inherit;font-size:14px;line-height:22px;min-width:0;width:100%}.e5pfpa_catalogInput::placeholder{color:var(--dsw-alias-label-dimmed)}.e5pfpa_catalogInput:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.e5pfpa_catalogInput:disabled{opacity:.6;cursor:default}.e5pfpa_iconButton{box-sizing:border-box;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.e5pfpa_iconButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.e5pfpa_iconButton:disabled{opacity:.4;cursor:default}.e5pfpa_iconButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_iconButtonDanger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}.e5pfpa_addButton{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border-radius:14px;align-self:flex-start;align-items:center;gap:4px;height:28px;padding:0 10px;font:inherit;font-size:12px;line-height:18px;display:inline-flex}.e5pfpa_addButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_addButton:disabled{opacity:.4;cursor:default}.e5pfpa_disclosure{flex-direction:column;gap:10px;display:flex}.e5pfpa_disclosureSummary{color:var(--dsw-alias-label-secondary);cursor:pointer;list-style:none;align-items:center;gap:6px;font-size:12px;line-height:18px;user-select:none;display:flex}.e5pfpa_disclosureSummary::-webkit-details-marker{display:none}.e5pfpa_disclosureSummary:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-radius:6px}.e5pfpa_disclosureLabel:before{content:\\\"\\\\25b8\\\";display:inline-block;margin-right:6px;transition:transform .16s}.e5pfpa_disclosure[open] .e5pfpa_disclosureLabel:before{transform:rotate(90deg)}.e5pfpa_disclosureCount{color:var(--dsw-alias-label-tertiary)}.e5pfpa_disclosureBody{flex-direction:column;gap:10px;display:flex}.e5pfpa_disclosureBody>.e5pfpa_linkButton{align-self:flex-start}.e5pfpa_disclosureBody>.e5pfpa_linkButtonRow{align-self:flex-start;display:flex;gap:8px;align-items:center}.e5pfpa_toggleLabel{align-items:center;display:inline-flex;flex:none}.e5pfpa_fetchDialog{background:color-mix(in srgb,var(--dsw-alias-label-primary) 28%,transparent);align-items:center;justify-content:center;display:flex;position:fixed;inset:0;z-index:90}.e5pfpa_dialogContent{background:var(--dsw-alias-bg-layer-3);border:.5px solid var(--dsw-alias-border-l3);border-radius:16px;flex-direction:column;gap:10px;width:min(520px,calc(100vw - 32px));max-height:min(620px,calc(100vh - 48px));display:flex;overflow:hidden}.e5pfpa_dialogHeader{align-items:center;gap:8px;padding:14px 16px 0;display:flex}.e5pfpa_dialogTitle{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:22px;flex:1;min-width:0;margin:0}.e5pfpa_dialogClose{box-sizing:border-box;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;flex:none;width:28px;height:28px;display:inline-flex}.e5pfpa_dialogClose:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.e5pfpa_dialogClose:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_dialogDescription{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px;margin:0;padding:0 16px}.e5pfpa_dialogBody{flex-direction:column;flex:1;gap:8px;min-height:0;padding:0 16px;display:flex}.e5pfpa_candidateToolbar{align-items:center;gap:8px;display:flex}.e5pfpa_candidateSearch{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);border-radius:8px;height:32px;padding:0 10px;font:inherit;font-size:12px;line-height:20px;flex:1;min-width:0}.e5pfpa_candidateSearch::placeholder{color:var(--dsw-alias-label-dimmed)}.e5pfpa_candidateSearch:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}.e5pfpa_candidateList{flex-direction:column;gap:2px;margin:0;padding:0 0 10px;list-style:none;overflow-y:auto;display:flex}.e5pfpa_candidate{border-radius:8px;padding:4px 6px}.e5pfpa_candidate:hover{background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_candidateLabel{align-items:center;gap:8px;min-width:0;display:flex}.e5pfpa_candidateLabel input[type=checkbox]{accent-color:var(--dsw-alias-brand-primary);flex:none;margin:0}.e5pfpa_candidateId{color:var(--dsw-alias-label-primary);font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.e5pfpa_candidateNote{color:var(--dsw-alias-label-tertiary);flex:0 1 auto;min-width:0;overflow-wrap:anywhere;font-size:11px;line-height:16px}.e5pfpa_dialogFooter{border-top:.5px solid var(--dsw-alias-border-l2);align-items:center;justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.e5pfpa_dialogButton{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:.5px solid var(--dsw-alias-border-l3);border-radius:16px;cursor:pointer;font-size:13px;line-height:20px;color:var(--dsw-alias-label-primary);background:transparent;padding:0 12px;height:32px}.e5pfpa_dialogButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.e5pfpa_dialogButton:disabled{cursor:not-allowed;opacity:.4}.e5pfpa_dialogButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_dialogButtonPrimary{color:var(--dsw-alias-label-primary);font-weight:600}.e5pfpa_selectorLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.e5pfpa_result{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}.e5pfpa_resultValue{color:var(--dsw-alias-label-secondary);margin-left:4px}.e5pfpa_resultAge{color:var(--dsw-alias-label-dimmed);margin-left:4px}.e5pfpa_notice{flex-direction:column;gap:4px;display:flex;border:.5px solid var(--dsw-alias-border-l3);border-radius:10px;background:var(--dsw-alias-bg-layer-1);padding:8px 10px}.e5pfpa_noticeTitle{color:var(--dsw-alias-label-primary);font-size:12px;font-weight:600;line-height:18px}.e5pfpa_noticeBody{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.e5pfpa_docsLink{color:var(--dsw-alias-label-tertiary);align-items:center;gap:4px;display:inline-flex;text-decoration:none;font-size:12px;line-height:1.5}.e5pfpa_docsLinkLabel{text-decoration:none}.e5pfpa_docsLink:hover{color:var(--dsw-alias-brand-primary)}.e5pfpa_docsLink:hover .e5pfpa_docsLinkLabel{text-decoration:underline}.e5pfpa_docsLink:hover .e5pfpa_docsIcon{color:var(--dsw-alias-brand-primary)}.e5pfpa_docsIcon{color:var(--dsw-alias-label-tertiary);flex:none}.e5pfpa_docsLink:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;border-radius:4px}.e5pfpa_catalogRowSingle{grid-template-columns:minmax(0,1fr) auto}.e5pfpa_catalogInputMono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.e5pfpa_footer{border-top:.5px solid var(--dsw-alias-border-l2);align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 0;display:flex}.e5pfpa_footerError{color:var(--dsw-alias-label-error);text-align:right;min-width:0;flex:1;margin:0;font-size:12px;line-height:1.5}.e5pfpa_footerButton{border:.5px solid var(--dsw-alias-border-l3);border-radius:8px;cursor:pointer;color:var(--dsw-alias-label-secondary);background:transparent;padding:5px 14px;font-size:13px;line-height:1.5}.e5pfpa_footerButton:hover:not(:disabled){color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-label-dimmed)}.e5pfpa_footerButton:disabled{cursor:default;opacity:.4}.e5pfpa_footerButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.e5pfpa_footerButtonPrimary{color:var(--dsw-alias-bg-layer-3);font-weight:600;background:var(--dsw-alias-label-primary);border-color:transparent}.e5pfpa_footerButtonPrimary:hover:not(:disabled){color:var(--dsw-alias-bg-layer-3);background:var(--dsw-alias-label-secondary);border-color:transparent}\\n\";\nexport default {\"body\":\"e5pfpa_body\",\"field\":\"e5pfpa_field\",\"fieldRow\":\"e5pfpa_fieldRow\",\"fieldTitle\":\"e5pfpa_fieldTitle\",\"fieldDesc\":\"e5pfpa_fieldDesc\",\"selector\":\"e5pfpa_selector\",\"selectorWrap\":\"e5pfpa_selectorWrap\",\"pillChevron\":\"e5pfpa_pillChevron\",\"row\":\"e5pfpa_row\",\"button\":\"e5pfpa_button\",\"readOnly\":\"e5pfpa_readOnly\",\"error\":\"e5pfpa_error\",\"dot\":\"e5pfpa_dot\",\"dotError\":\"e5pfpa_dotError\",\"badge\":\"e5pfpa_badge\",\"empty\":\"e5pfpa_empty\",\"catalog\":\"e5pfpa_catalog\",\"linkButton\":\"e5pfpa_linkButton\",\"linkButtonRow\":\"e5pfpa_linkButtonRow\",\"catalogEntry\":\"e5pfpa_catalogEntry\",\"catalogRow\":\"e5pfpa_catalogRow\",\"catalogInput\":\"e5pfpa_catalogInput\",\"iconButton\":\"e5pfpa_iconButton\",\"iconButtonDanger\":\"e5pfpa_iconButtonDanger\",\"addButton\":\"e5pfpa_addButton\",\"disclosure\":\"e5pfpa_disclosure\",\"disclosureSummary\":\"e5pfpa_disclosureSummary\",\"disclosureLabel\":\"e5pfpa_disclosureLabel\",\"disclosureCount\":\"e5pfpa_disclosureCount\",\"disclosureBody\":\"e5pfpa_disclosureBody\",\"toggleLabel\":\"e5pfpa_toggleLabel\",\"fetchDialog\":\"e5pfpa_fetchDialog\",\"dialogContent\":\"e5pfpa_dialogContent\",\"dialogHeader\":\"e5pfpa_dialogHeader\",\"dialogTitle\":\"e5pfpa_dialogTitle\",\"dialogClose\":\"e5pfpa_dialogClose\",\"dialogDescription\":\"e5pfpa_dialogDescription\",\"dialogBody\":\"e5pfpa_dialogBody\",\"candidateToolbar\":\"e5pfpa_candidateToolbar\",\"candidateSearch\":\"e5pfpa_candidateSearch\",\"candidateList\":\"e5pfpa_candidateList\",\"candidate\":\"e5pfpa_candidate\",\"candidateLabel\":\"e5pfpa_candidateLabel\",\"candidateId\":\"e5pfpa_candidateId\",\"candidateNote\":\"e5pfpa_candidateNote\",\"dialogFooter\":\"e5pfpa_dialogFooter\",\"dialogButton\":\"e5pfpa_dialogButton\",\"dialogButtonPrimary\":\"e5pfpa_dialogButtonPrimary\",\"selectorLabel\":\"e5pfpa_selectorLabel\",\"result\":\"e5pfpa_result\",\"resultValue\":\"e5pfpa_resultValue\",\"resultAge\":\"e5pfpa_resultAge\",\"notice\":\"e5pfpa_notice\",\"noticeTitle\":\"e5pfpa_noticeTitle\",\"noticeBody\":\"e5pfpa_noticeBody\",\"docsLink\":\"e5pfpa_docsLink\",\"docsLinkLabel\":\"e5pfpa_docsLinkLabel\",\"docsIcon\":\"e5pfpa_docsIcon\",\"catalogRowSingle\":\"e5pfpa_catalogRowSingle\",\"catalogInputMono\":\"e5pfpa_catalogInputMono\",\"footer\":\"e5pfpa_footer\",\"footerError\":\"e5pfpa_footerError\",\"footerButton\":\"e5pfpa_footerButton\",\"footerButtonPrimary\":\"e5pfpa_footerButtonPrimary\"};", "/**\n * The extra-flags editor \u2014 the one catalog block the reference card has no\n * equivalent for (it carries no free-form list field). It is the flags half of\n * the two halves `./rows.ts` renders: the same rows, read through the single\n * field a flag actually has \u2014 the value itself \u2014 instead of the executable\n * block's path + display name. Nothing about the list's rules changes on the\n * way here: a blur/Enter commits the whole list, a delete persists on the spot,\n * and a blank added row is local until it carries text.\n *\n * The block keeps the shape the reference's catalogs carry: the two-row field\n * (title with the configuration-guide link inline, hint below) and then the\n * rows, folded behind the same collapsed `<details>` disclosure the executable\n * block uses, so the two catalogs read as one widget shape.\n *\n * The write goes through `saveFlags` (the host validates the list, then\n * restarts the bridge connection in place). An empty row is never persisted:\n * the write side rejects an empty flag, so a row with no text is dropped on the\n * way out \u2014 the same rule the executable rows follow with an id-less row.\n *\n * The **Restore defaults** control is the list's own action: it keeps every\n * flag the rows already carry and appends only the defaults still missing (the\n * host serves the defaults list, so the card carries no copy of it), writing\n * the merged list exactly the way any other row write does \u2014 defaults are\n * recovered, nothing that is there is dropped.\n *\n * **Flags WSL** rides the same list with the same merge rule against a\n * different served list: it keeps everything the rows carry, appends only the\n * recommended WSL \u2194 Windows flags still missing, and modifies or drops nothing\n * (the host serves the recommended list too, the same way it serves the\n * defaults).\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { CONFIGURATION_URL } from \"../plugin-meta.js\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { DOCS_PATHS } from \"./icons.js\";\nimport { RowList } from \"./rows.js\";\n\n/** One flag list per row: the single field, held as one column. */\nfunction rowsOf(flags: readonly string[]): string[][] {\n return flags.map((flag: string) => [flag]);\n}\n\n/** The rows as a plain flags list: trimmed, with a row still without a value\n * dropped rather than persisted (the write side rejects an empty flag) and\n * duplicates folded \u2014 first row wins, the rule the saved executable rows\n * already follow for a repeated id. */\nfunction flagsOf(rows: readonly string[][]): string[] {\n var flags: string[] = [];\n for (const row of rows) {\n var flag = typeof row === \"undefined\" || row === null ? \"\" : String(row[0] ?? \"\").trim();\n if (flag === \"\") continue;\n if (flags.indexOf(flag) !== -1) continue;\n flags.push(flag);\n }\n return flags;\n}\n\nexport function ExtraFlagsEditor(props: any): any {\n var t = props.t;\n var writable = props.writable;\n var flags: string[] = Array.isArray(props.flags) ? props.flags : [];\n var defaults: string[] = Array.isArray(props.defaultFlags) ? props.defaultFlags : [];\n var wsl: string[] = Array.isArray(props.wslFlags) ? props.wslFlags : [];\n var save = (next: string[][]) => {\n if (typeof props.saveFlags !== \"function\") return Promise.resolve();\n return Promise.resolve(props.saveFlags(flagsOf(next)));\n };\n /**\n * Restore defaults without dropping anything: every flag the rows carry is\n * kept, and only the host-served defaults still missing are appended. The\n * write is an ordinary whole-list row write, so the local view and the\n * saved list never disagree.\n */\n var restoreAction = (visible: string[][]) => {\n var current = flagsOf(visible);\n var merged = current.concat(defaults.filter((flag: string) => current.indexOf(flag) === -1));\n return jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n // The defaults list is host-served \u2014 with nothing to recover there\n // is nothing to do.\n disabled: !writable || defaults.length === 0,\n title: t(\"flagsRestoreTitle\"),\n onClick: () => {\n if (!writable) return;\n save(merged.map((flag: string) => [flag]));\n },\n children: t(\"flagsRestore\")\n });\n };\n /**\n * **Flags WSL** \u2014 the list's other append action, the same merge rule read\n * through the recommended list the host serves instead of the defaults:\n * every flag the rows already carry stays exactly where it is (nothing is\n * dropped, nothing is modified), and only the recommended flags still\n * missing are appended. As with the defaults, the card carries no copy of\n * the list \u2014 it is what the host answers with that gets added.\n */\n var wslAction = (visible: string[][]) => {\n var current = flagsOf(visible);\n var merged = current.concat(wsl.filter((flag: string) => current.indexOf(flag) === -1));\n return jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n // The recommended list is host-served \u2014 with every one of them\n // already in the rows there is nothing left to add.\n disabled: !writable || wsl.length === 0,\n title: t(\"flagsWslTitle\"),\n onClick: () => {\n if (!writable) return;\n save(merged.map((flag: string) => [flag]));\n },\n children: t(\"flagsWsl\")\n });\n };\n /** Both list actions ride the list's one action slot, side by side in one\n * line \u2014 they do the same job against two different host-served lists. */\n var renderActions = (visible: string[][]) =>\n jsxs(\"div\", {\n className: STYLES.linkButtonRow,\n children: [restoreAction(visible), wslAction(visible)]\n });\n return jsxs(\"div\", {\n className: STYLES.catalog,\n children: [\n jsxs(\"div\", {\n className: STYLES.field,\n children: [\n jsxs(\"div\", {\n className: STYLES.fieldRow,\n children: [\n jsx(\"span\", { className: STYLES.fieldTitle, children: t(\"flagsTitle\") }),\n // The guide link rides the same field row the picker's\n // pill occupies.\n jsxs(\"a\", {\n className: STYLES.docsLink,\n href: CONFIGURATION_URL,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n title: t(\"docsMessage\"),\n children: [\n jsx(\"svg\", {\n className: STYLES.docsIcon,\n width: 14,\n height: 14,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n \"aria-hidden\": \"true\",\n children: DOCS_PATHS.map((d: string, at: number) => jsx(\"path\", { d: d }, at))\n }),\n jsx(\"span\", { className: STYLES.docsLinkLabel, children: t(\"docsLinkLabel\") })\n ]\n })\n ]\n }),\n jsx(\"div\", { className: STYLES.fieldDesc, children: t(\"flagsHint\") })\n ]\n }),\n // One row per saved flag: the single field is the flag itself, and\n // the two append controls \u2014 Restore defaults and Flags WSL \u2014 ride\n // the list's action line.\n jsx(RowList, {\n values: rowsOf(flags),\n labels: [t(\"flagsValueLabel\")],\n placeholders: [t(\"flagsValuePlaceholder\")],\n writable: writable,\n save: save,\n renderAction: renderActions,\n emptyText: t(\"flagsEmpty\"),\n rowsLabel: t(\"flagsRows\"),\n addLabel: t(\"addFlag\"),\n removeLabel: t(\"removeFlag\"),\n rowClassName: STYLES.catalogRowSingle,\n inputClassName: STYLES.catalogInputMono,\n disclosure: true\n })\n ]\n });\n}\n", "/**\n * Browser half \u2014 identity and the services the shell must resolve.\n *\n * The identifiers are contracts with the host half: the profile entry id is the\n * key every read and write goes through (both the configuration form's entry and\n * the row the bundle's own patch declares), the locale namespace is the lookup\n * root for every string the card renders, and the npm id tags the DOM this half\n * owns. The browser half is emitted on its own, so it cannot import\n * ./host/constants.ts and they are mirrored here \u2014 `test/client.test.mjs` pins\n * the mirror against the host half's export so a drift fails loudly.\n */\n\n/** Profile entry id the host half serves; the configuration form's key. */\nexport const ENTRY_ID = \"mcp-chrome\";\n\n/** npm id of this package; tags the injected `style` element. */\nexport const PLUGIN_ID = \"@comecaramelos/dsh-chrome-mcp\";\n\n/**\n * npm id of the bundle the row's patch layer lives in. A component is not its\n * own bundle \u2014 the row arrives through the manager bundle's patch, so the page\n * this card registers into is keyed by that id, not by this package.\n */\nexport const BUNDLE_ID = \"@comecaramelos/dsh-mcp-manager-bundle\";\n\n/**\n * Key this card registers the row-configuration slot under. The Plugins page\n * composes it as `<bundle>#<row id>` \u2014 the bundle a person installs, not the\n * package the row runs \u2014 so it is a *derived* key rather than a separate\n * identity: `ENTRY_ID` is what every read and write actually goes through, and\n * the bundle id only scopes it. Two components in one bundle therefore cannot\n * alias, and the card never claims a row that is not its own.\n */\nexport const ROW_CONFIG_KEY = `${BUNDLE_ID}#${ENTRY_ID}`;\n\n/** Locale dictionary namespace this half registers and renders from. */\nexport const LOCALE_NAMESPACE = \"chromeMcp\";\n\n/** Upstream configuration docs link (must match host CONFIGURATION_DOCS_URL). */\nexport const CONFIGURATION_URL =\n \"https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/configuration.md\";\n\n/**\n * The wall-clock backstop for every Host run the card waits on (a fetch, a\n * pick, Prelaunch Windows Chrome): the run's own counter settles the wait, this\n * only answers a Host that never does. Generous, because a Windows Chrome\n * launch through the interop mount takes its time.\n */\nexport const RUN_SETTLE_TIMEOUT_MS = 90000;\n\n/**\n * The Host's live-mirror keys, which every card write clears so a save never\n * persists them. Mirrored from `liveMirrorKeys()` in host/values.ts (the\n * browser half cannot import the host) \u2014 `test/client.test.mjs` pins the two.\n */\nexport const LIVE_KEYS: readonly string[] = [\n \"lastError\",\n \"chromeMissing\",\n \"executableDiscoveryRevision\",\n \"chromeVersion\",\n \"executableStatus\",\n \"effectiveChromePath\",\n \"effectiveSource\",\n \"stderrEffective\",\n \"defaultExtraFlags\",\n \"wslExtraFlags\",\n \"wslWindowsExecutable\",\n \"windowsChromeStatus\",\n \"carriesConnectionMode\",\n \"runningFlags\",\n \"runningNote\"\n];\n", "/**\n * The card's icon paths \u2014 the shapes the stock primitives do not carry.\n *\n * Every card icon is copied from the matching shell primitive so the card\n * matches the rest of the UI pixel for pixel; a shell icon bump is the only\n * reason to touch these. The external-link mark is the exception: no shell\n * primitive carries it, so it is the stroke idiom the reference card uses for\n * the same purpose \u2014 stroke-only paths on a 24-unit viewBox, `currentColor`\n * carried by the stroke, rounded caps and joins.\n */\n\n/** Chevron matching the shell's IconChevronDownOutline14 primitive. */\nexport const CHEVRON_PATH =\n \"M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z\";\n\n/** Trash icon for a row's delete button (stock 16px stroke idiom). */\nexport const TRASH_PATH =\n \"M2.5 4h11M6.5 4V2.5h3V4M4 4l.7 9a1 1 0 001 .9h4.6a1 1 0 001-.9L12 4M6.5 6.8v4.4M9.5 6.8v4.4\";\n\n/** The two diagonals of the fetch dialog's close icon (stock 16px cross). */\nexport const CLOSE_PATHS = [\n \"M14.1168 13.197L13.197 14.1167L1.8833 2.80303L2.80309 1.88324L14.1168 13.197Z\",\n \"M13.197 1.88326L14.1168 2.80305L2.80309 14.1168L1.8833 13.197L13.197 1.88326Z\"\n];\n\n/** External-link mark, in the same stroke idiom. */\nexport const DOCS_PATHS = [\n \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\",\n \"M15 3h6v6\",\n \"M10 14 21 3\"\n];\n", "/**\n * The rows list both catalogs render \u2014 the reference card's catalog rows, held\n * in one module so the saved executables and the extra flags read as one widget\n * instead of two lookalikes.\n *\n * A row is a bordered box of text fields in column order, every box ending on\n * the row's delete control; the list opens on the empty line and closes on the\n * add control. The executable block hands it two fields (the path and the\n * display name) folded behind the reference card's \"Customized settings\"\n * disclosure, the flags block a single field (the flag itself). Both now fold\n * behind the same collapsed `<details>` disclosure \u2014 the two blocks read as one\n * widget shape, differing only in how many fields a row carries.\n *\n * Like the reference card's `editing` map, rows come from the served snapshot\n * with a local draft overlaying them only while an edit is pending: typing does\n * not persist, a blur/Enter commits the whole list, a delete persists\n * immediately, and \"add\" appends a local blank row that only becomes a saved row\n * once it is typed in. Once the field is idle, the next host push (a discovery\n * merge that added rows, or a defaults restore) becomes the view again.\n *\n * The list action belongs to the caller (`renderAction`) and is handed the rows\n * exactly as they are visible plus the write that persists them: the picker's\n * **Fetch executables** asks the host to re-scan the machine's list, and the\n * flags block lines its two append controls up in the one slot \u2014 **Restore\n * defaults** appends what the defaults list is missing to precisely what the\n * rows already carry, **Flags WSL** the missing recommended WSL \u2194 Windows\n * flags the same way.\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport * as react from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { TRASH_PATH } from \"./icons.js\";\n\n/** One row's field values, in column order (the path + the name, or the flag). */\nexport type RowValues = string[];\n\n/** Persist one whole row list; the write side re-normalizes what lands. */\nexport type SaveRows = (rows: RowValues[]) => unknown;\n\n/**\n * Render one catalog's row list \u2014 the empty line, the rows and the add control.\n * @param props - the served rows (`values`), the per-column copy (`labels`,\n * `placeholders`), the write (`save`) and the shape knobs: `disclosure` folds\n * the rows behind a `<details>` (the two-field executable list, which sits\n * under the pill), `rowClassName` / `inputClassName` carry the single-field\n * column variant a block needs when the two-column grid would not fit.\n */\nexport function RowList(props: any): any {\n var served: RowValues[] = Array.isArray(props.values) ? props.values : [];\n var writable = props.writable === true;\n var busy = props.busy === true;\n var labels: string[] = Array.isArray(props.labels) ? props.labels : [];\n var placeholders: string[] = Array.isArray(props.placeholders) ? props.placeholders : [];\n var columns = Math.max(1, labels.length);\n var blankRow: RowValues = [];\n for (var blank = 0; blank < columns; blank++) blankRow.push(\"\");\n var draftState = react.useState<RowValues[] | null>(null);\n var draft = draftState[0];\n var setDraft = draftState[1];\n var focusedState = react.useState(false);\n var focused = focusedState[0];\n var setFocused = focusedState[1];\n var servedKey = JSON.stringify(served);\n var syncState = react.useState(\"\");\n var servedSync = syncState[0];\n var setServedSync = syncState[1];\n // A host push replaces an idle draft \u2014 that is how a discovery merge that\n // added rows (or a defaults restore) becomes visible again.\n if (servedKey !== servedSync) {\n setServedSync(servedKey);\n if (!focused) setDraft(null);\n }\n var rows: RowValues[] = draft === null ? served : draft;\n\n /**\n * Persist one whole list, and hold the local view to exactly what was\n * written: every structural change (delete, the caller's own action) lands\n * this way, so the draft never disagrees with the write. Deciding whether a\n * write is worth doing belongs to the write side, which normalizes and\n * compares \u2014 the list only hands it rows.\n */\n var save = (next: RowValues[]) => {\n if (typeof props.save !== \"function\") return Promise.resolve();\n setDraft(next);\n return Promise.resolve(props.save(next)).catch(() => { });\n };\n\n var withDraft = (make: (current: RowValues[]) => RowValues[]) => make(draft === null ? served : draft);\n\n var patchRow = (index: number, column: number, value: string) => {\n setFocused(true);\n setDraft(\n withDraft((current: RowValues[]) =>\n current.map((row: RowValues, at: number) =>\n at === index ? row.map((cell: string, field: number) => (field === column ? value : cell)) : row\n )\n )\n );\n };\n\n var removeRow = (index: number) => {\n if (!writable || rows[index] === void 0) return;\n save(rows.filter((_row: RowValues, at: number) => at !== index));\n };\n\n var addRow = () => {\n if (!writable) return;\n // A blank row is local until it carries a value: a write that strips the\n // empty row is what turns it into a saved row \u2014 the draft keeps it\n // visible either way.\n setDraft(withDraft((current: RowValues[]) => current.concat([blankRow])));\n };\n\n /** Idle rows are the truth; only a pending edit has to be written. */\n var commit = () => {\n if (draft === null) return;\n save(rows);\n };\n\n var fieldNode = (row: RowValues, index: number, column: number) =>\n jsx(\"input\", {\n className: props.inputClassName ? STYLES.catalogInput + \" \" + props.inputClassName : STYLES.catalogInput,\n type: \"text\",\n value: row[column] === undefined ? \"\" : row[column],\n placeholder: placeholders[column],\n \"aria-label\": labels[column] + \" \" + (index + 1),\n title: column === 0 ? row[column] : void 0,\n disabled: !writable,\n spellCheck: false,\n autoComplete: \"off\",\n autocapitalize: \"off\",\n onChange: (event: any) => {\n patchRow(index, column, event && event.target ? String(event.target.value ?? \"\") : \"\");\n },\n onFocus: () => setFocused(true),\n onBlur: () => {\n setFocused(false);\n commit();\n },\n onKeyDown: (event: any) => {\n if (event && event.key === \"Enter\") {\n setFocused(false);\n commit();\n }\n }\n }, column);\n\n var entryNode = (row: RowValues, index: number) => {\n var cells: any[] = [];\n var width = row.length === 0 ? columns : row.length;\n for (var column = 0; column < width; column++) cells.push(fieldNode(row, index, column));\n cells.push(\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.iconButton + \" \" + STYLES.iconButtonDanger,\n \"aria-label\": props.removeLabel + \" \" + (index + 1),\n title: props.removeLabel,\n disabled: !writable,\n onClick: () => {\n removeRow(index);\n },\n children: jsx(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n children: jsx(\"path\", {\n d: TRASH_PATH,\n stroke: \"currentColor\",\n strokeWidth: 1.3,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n })\n })\n );\n return jsx(\"div\", {\n className: STYLES.catalogEntry,\n children: jsxs(\"div\", {\n className: props.rowClassName ? STYLES.catalogRow + \" \" + props.rowClassName : STYLES.catalogRow,\n children: cells\n })\n }, index);\n };\n\n // The body, in render order: the caller's action (the reference card's body\n // opens on its fetch link, the flags block opens on Restore defaults), one\n // box per row, then the add control.\n var body: any[] = [];\n if (typeof props.renderAction === \"function\") body.push(props.renderAction(rows, save));\n var visible: any[] = [];\n for (var index = 0; index < rows.length; index++) visible.push(entryNode(rows[index], index));\n body = body.concat(visible);\n body.push(\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.addButton,\n disabled: !writable || busy,\n onClick: addRow,\n children: props.addLabel\n })\n );\n var emptyLine = rows.length === 0 ? jsx(\"p\", { className: STYLES.empty, children: props.emptyText }) : null;\n\n if (props.disclosure !== true) {\n // No disclosure to fold behind: the single-field list reads straight\n // into the block, the same boxes at the same rhythm.\n return [emptyLine].concat(body);\n }\n return [\n emptyLine,\n jsxs(\"details\", {\n className: STYLES.disclosure,\n children: [\n jsxs(\"summary\", {\n className: STYLES.disclosureSummary,\n children: [\n jsx(\"span\", { className: STYLES.disclosureLabel, children: props.rowsLabel }),\n jsx(\"span\", { className: STYLES.disclosureCount, children: String(rows.length) })\n ]\n }),\n jsx(\"div\", { className: STYLES.disclosureBody, children: body })\n ]\n })\n ];\n}\n", "/**\n * The named picker \u2014 one Menu pill over the saved rows plus a catalog list you\n * can refresh, extend by hand and prune. It mirrors the reference card's picker\n * byte for byte in structure (field row \u2192 disclosure \u2192 rows) so the two cards\n * read as one component set; `statusLine` is the only extra slot, and the card\n * uses it for the probe result line the reference has no equivalent for.\n *\n * The row list itself is ./rows.ts \u2014 the same half the extra-flags block\n * renders, read here through two fields (the path and the display name) and\n * folded behind a collapsed `<details>` disclosure (the reference card's\n * \"Customized settings\" idiom), so only the field row and the dropdown are\n * visible until the user opens the row list.\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Menu } from \"@deepseek-ai/dsh-client-ui-primitives\";\nimport type { CatalogEntry } from \"../catalog.js\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { CHEVRON_PATH } from \"./icons.js\";\nimport { RowList } from \"./rows.js\";\n\nexport function CatalogPicker(props: any): any {\n var entries: CatalogEntry[] = props.entries;\n var options = props.options;\n var selectedId = props.selectedId;\n var writable = props.writable;\n var busy = props.busy === true;\n // The saved rows are what the list renders: `id` is the path that goes on\n // the wire, `name` the label the card shows (\"\" \u2192 render the path).\n var rows: string[][] = entries.map((entry: CatalogEntry) => [entry.id, entry.name]);\n\n /**\n * A whole-list write: the list owns the draft, the controller normalizes on\n * the way in and re-runs the scan the new ids imply.\n */\n var saveEntries = (next: string[][]) => {\n if (typeof props.saveEntries !== \"function\") return Promise.resolve();\n return Promise.resolve(props.saveEntries(next.map((row) => ({ id: row[0] ?? \"\", name: row[1] ?? \"\" }))));\n };\n\n // The fetch action belongs to this catalog's rows, so it lives inside the\n // body's head, not the field row. The Windows Chrome button rides the same\n // line (the two actions of the executable block, like the flags block\n // carries its two append actions).\n var fetchAction = () =>\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n disabled: !writable || busy,\n onClick: () => {\n props.refresh();\n },\n children: busy ? props.busyLabel : props.refreshLabel\n });\n var windowsAction = () =>\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n disabled: props.windowsDisabled === true,\n title: props.windowsTitle,\n onClick: () => {\n if (typeof props.windowsOnOpen === \"function\") props.windowsOnOpen();\n },\n children: props.windowsLabel\n });\n var renderActions = () =>\n jsxs(\"div\", {\n className: STYLES.linkButtonRow,\n children: [fetchAction(), windowsAction()]\n });\n\n return jsxs(\"div\", {\n className: STYLES.catalog,\n children: [\n jsxs(\"div\", {\n className: STYLES.field,\n children: [\n jsxs(\"div\", {\n className: STYLES.fieldRow,\n children: [\n jsx(\"span\", { className: STYLES.fieldTitle, children: props.selectorLabel }),\n jsx(\"span\", {\n className: STYLES.selectorWrap,\n children: jsx(Menu, {\n open: props.menuOpen,\n onClose: () => {\n props.setMenuOpen(false);\n },\n items: options,\n selectedId: options.some((option: { id: string }) => option.id === selectedId) ? selectedId : \"\",\n onSelect: (id: string) => {\n props.setMenuOpen(false);\n props.select(id);\n },\n align: \"end\",\n portal: true,\n anchor: jsxs(\"button\", {\n type: \"button\",\n className: STYLES.selector,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": props.menuOpen,\n disabled: !writable || busy,\n title: props.selectedTitle,\n onClick: () => {\n props.setMenuOpen(!props.menuOpen);\n },\n children: [\n // The reference card hands the pill a bare label;\n // the path needs its own truncating span.\n jsx(\"span\", { className: STYLES.selectorLabel, children: props.selectedLabel }),\n jsx(\"svg\", {\n width: 14,\n height: 14,\n className: STYLES.pillChevron,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: jsx(\"path\", { d: CHEVRON_PATH, fill: \"currentColor\" })\n })\n ]\n })\n })\n })\n ]\n }),\n jsx(\"div\", { className: STYLES.fieldDesc, children: props.hint })\n ]\n }),\n // The saved rows: two fields per row, folded behind the disclosure,\n // with the fetch action sitting inside the body.\n jsx(RowList, {\n values: rows,\n labels: [props.idLabel, props.nameLabel],\n placeholders: [props.idPlaceholder, props.namePlaceholder],\n writable: writable,\n busy: busy,\n save: saveEntries,\n renderAction: renderActions,\n emptyText: props.emptyText,\n rowsLabel: props.rowsLabel,\n addLabel: props.addLabel,\n removeLabel: props.removeLabel,\n disclosure: true\n }),\n props.statusLine === undefined || props.statusLine === null ? null : props.statusLine\n ]\n });\n}\n", "/**\n * The fetch dialog \u2014 the \"choose which executables to keep\" modal the fetch\n * action opens once the host's executable run settled.\n *\n * One checkbox row per detected candidate \u2014 each carrying the answer the run\n * gave for it (its version line, or why it is not runnable), the reference\n * card's note slot. Already-saved paths are carried pre-checked and disabled\n * (removal is the row list's delete button, never a dialog side effect), a\n * search field sifts long path lists, and the footer's \"Add selected\" merges\n * the checked paths into the saved rows. Nothing here persists on its own:\n * closing with Cancel or the header X leaves the catalog untouched.\n */\nimport * as react from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\nimport { CLOSE_PATHS } from \"./icons.js\";\n\n/**\n * Candidate rows arrive from the run that opened the dialog (the controller's\n * candidate list); the dialog itself keeps only its filter/selection draft, so\n * a re-render of the card cannot disturb the draft.\n */\nexport function CandidateDialog(props: any): any {\n var t = props.t;\n var candidates: { id: string; note: string; broken: boolean }[] = props.candidates;\n var savedIds: string[] = props.savedIds;\n var savedSet = new Set(savedIds);\n var initialChecked = candidates.filter((candidate) => savedSet.has(candidate.id)).map((candidate) => candidate.id);\n // The dialog mounts over a run that just landed; one keyed draft object\n // holds the filter + selection so a new candidate list resets the whole\n // draft (the row list's served-sync idiom, for a whole dialog session \u2014\n // nothing may bleed from a previous run).\n var servedKey = JSON.stringify(candidates) + \"|\" + JSON.stringify(savedIds);\n var draftState = react.useState({ key: \"\", query: \"\", checked: [] as string[] });\n var draft = draftState[0];\n var setDraft = draftState[1];\n var dirty = draft.key !== servedKey;\n var query = dirty ? \"\" : draft.query;\n var checked = dirty ? initialChecked : draft.checked;\n var checkedSet = new Set(checked);\n var setQuery = (value: string) => {\n setDraft({ key: servedKey, query: value, checked: Array.from(checkedSet) });\n };\n var setChecked = (make: (current: string[]) => string[]) => {\n setDraft({ key: servedKey, query: query, checked: make(checked) });\n };\n var needle = query.trim().toLowerCase();\n var shown = needle === \"\" ? candidates : candidates.filter((candidate) => candidate.id.toLowerCase().indexOf(needle) !== -1);\n var addable = shown.filter((candidate) => !savedSet.has(candidate.id)).map((candidate) => candidate.id);\n var allChecked = addable.length > 0 && addable.every((id: string) => checkedSet.has(id));\n\n var toggle = (id: string, value: boolean) => {\n setChecked((current: string[]) => (value ? current.concat([id]) : current.filter((entry: string) => entry !== id)));\n };\n\n return jsxs(\"div\", {\n className: STYLES.fetchDialog,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n \"aria-label\": props.title,\n children: [\n jsxs(\"div\", {\n className: STYLES.dialogContent,\n children: [\n jsxs(\"div\", {\n className: STYLES.dialogHeader,\n children: [\n jsx(\"h2\", { className: STYLES.dialogTitle, children: props.title }),\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.dialogClose,\n \"aria-label\": t(\"close\"),\n onClick: () => props.onClose(),\n children: jsx(\"svg\", {\n width: 14,\n height: 14,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n children: CLOSE_PATHS.map((d: string, at: number) => jsx(\"path\", { d: d, fill: \"currentColor\" }, at))\n })\n })\n ]\n }),\n jsx(\"p\", { className: STYLES.dialogDescription, children: props.description }),\n jsxs(\"div\", {\n className: STYLES.dialogBody,\n children: [\n jsxs(\"div\", {\n className: STYLES.candidateToolbar,\n children: [\n jsx(\"input\", {\n className: STYLES.candidateSearch,\n type: \"search\",\n placeholder: props.searchPlaceholder,\n \"aria-label\": props.searchPlaceholder,\n value: query,\n onChange: (event: any) => {\n setQuery(event && event.target ? String(event.target.value ?? \"\") : \"\");\n }\n }),\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.linkButton,\n onClick: () => {\n if (allChecked) setChecked(() => []);\n else setChecked((current: string[]) => Array.from(new Set(current.concat(addable))));\n },\n children: t(\"selectAll\")\n })\n ]\n }),\n shown.length === 0\n ? jsx(\"p\", { className: STYLES.empty, children: t(\"dialogEmpty\") })\n : jsx(\"ul\", {\n className: STYLES.candidateList,\n children: shown.map((candidate) => {\n var isSaved = savedSet.has(candidate.id);\n // A row already saved carries the tag that\n // says so; anything else carries the run's\n // own answer.\n // Whatever the run answered leads the row;\n // a saved path with nothing to report says\n // it is already saved.\n var note = candidate.note !== \"\" ? candidate.note : (isSaved ? t(\"candidateSaved\") : \"\");\n return jsx(\"li\", {\n className: STYLES.candidate,\n children: jsxs(\"label\", {\n className: STYLES.candidateLabel,\n children: [\n jsx(\"input\", {\n type: \"checkbox\",\n checked: isSaved ? true : checkedSet.has(candidate.id),\n disabled: isSaved,\n onChange: (event: any) => {\n toggle(candidate.id, !!(event && event.target && event.target.checked));\n }\n }),\n jsx(\"span\", { className: STYLES.candidateId, children: candidate.id }),\n note === \"\" ? null : jsx(\"span\", { className: STYLES.candidateNote, children: note })\n ]\n })\n }, candidate.id);\n })\n })\n ]\n }),\n jsxs(\"div\", {\n className: STYLES.dialogFooter,\n children: [\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.dialogButton,\n onClick: () => props.onClose(),\n children: t(\"cancel\")\n }),\n jsx(\"button\", {\n type: \"button\",\n className: STYLES.dialogButton + \" \" + STYLES.dialogButtonPrimary,\n onClick: () => props.onAdd(Array.from(checkedSet)),\n children: t(\"addSelected\")\n })\n ]\n })\n ]\n })\n ]\n });\n}\n", "/**\n * The card's imperative run logic.\n *\n * The two host actions the executable block drives \u2014 **Fetch executables** (run\n * the discovery, then open the choose-to-add dialog over what it answered for)\n * and **Prelaunch Windows Chrome** (drive the whole Windows path; the answer\n * lands in the served `windowsChromeStatus`, not the promise) \u2014 plus the one-run-\n * at-a-time busy overlays and the probe-freshness clock they own. It is a hook\n * so `./index.ts` stays the composition of the body while the imperative half\n * lives here; the widget owns none of this state by hand.\n */\n/// <reference path=\"../shell-modules.d.ts\" />\nimport * as react from \"react\";\n\nimport type { ChromeExecutableStatus } from \"../types.js\";\n\n/** How often the probe result line re-reads its clock to age the \"ago\" suffix. */\nexport const PROBED_AGE_TICK_MS = 10000;\n\n/** One row the fetch dialog offers: a path, what the run said about it, and\n * whether that answer is a failure (an empty version carrying an error). */\nexport type FetchCandidate = { id: string; note: string; broken: boolean };\n\n/** The shape `runFetch` opens the dialog over. */\nexport type FetchDialog = { candidates: FetchCandidate[] } | null;\n\n/** The run half `./index.ts` wires into the picker + the dialog. */\nexport type RunActions = {\n /** A fetch is in flight \u2014 the picker's pill reads busy. */\n running: boolean;\n /** A Windows run is in flight \u2014 the button reads busy. */\n windowsRunning: boolean;\n /** The open fetch dialog (null = closed). */\n dialog: FetchDialog;\n /** Fire the fetch action. */\n runFetch: () => void;\n /** Fire the Windows Chrome action. */\n runWindowsChrome: () => void;\n /** Merge the dialog's checked ids into the rows, then close. */\n addFromDialog: (ids: string[]) => void;\n /** Close the dialog. */\n closeDialog: () => void;\n /** When the last fetch settled, for the result line's age suffix. */\n lastProbedAt: number;\n /** The card's local clock, ticked while it is mounted so the age stays honest. */\n clock: number;\n};\n\n/**\n * Drive the two host runs, keeping the busy overlays, the fetch dialog, and the\n * probe-freshness clock in one place.\n */\nexport function useRunActions(deps: {\n /** The host executable run, answering with every candidate it looked at. */\n refreshExecutables: () => Promise<ChromeExecutableStatus[]>;\n /** The host Windows Chrome run. */\n openWindowsChrome: () => Promise<void>;\n /** Merge dialog ids into the saved rows. */\n addExecutables: (ids: string[]) => Promise<void>;\n}): RunActions {\n const runningState = react.useState(false);\n const isRunning = runningState[0];\n const setRunning = runningState[1];\n const windowsRunningState = react.useState(false);\n const isWindowsRunning = windowsRunningState[0];\n const setWindowsRunning = windowsRunningState[1];\n const dialogRef = react.useState<FetchDialog>(null);\n const dialog = dialogRef[0];\n const setDialog = dialogRef[1];\n // The probe's freshness clock: a run is only visible when the answer\n // differs, so the line ages the last run the card itself ran; the effect\n // keeps the age honest for as long as the block is mounted.\n const probedState = react.useState(0);\n const lastProbedAt = probedState[0];\n const setLastProbedAt = probedState[1];\n const clockState = react.useState(() => Date.now());\n const clock = clockState[0];\n const setClock = clockState[1];\n react.useEffect(() => {\n const tick = setInterval(() => setClock(Date.now()), PROBED_AGE_TICK_MS);\n return () => clearInterval(tick);\n }, []);\n\n /**\n * The fetch action: run the host's executable discovery, then open the\n * choose-to-add dialog over what it answered for. A run that found nothing\n * leaves the card exactly as it was \u2014 an empty list has nothing to select \u2014\n * so the dialog opens only when there are candidates.\n */\n const runFetch = () => {\n setRunning(true);\n let promise;\n try {\n promise = deps.refreshExecutables();\n } catch (caught) {\n promise = Promise.reject(caught);\n }\n Promise.resolve(promise).then(\n async (statuses) => {\n setRunning(false);\n const settled = Date.now();\n setLastProbedAt(settled);\n setClock(settled);\n if (!Array.isArray(statuses) || statuses.length === 0) return;\n // The dialog's rows: the whole run's answer list, so every path\n // the machine carries reads with its answer, not only the saved\n // ones. A path the run could not launch keeps its place carrying\n // the failure line; a path this host offers without probing it\n // carries the note that names the run that drives it.\n const candidates = statuses.map((status) => ({\n id: status.path,\n note: status.version !== \"\" ? status.version : (status.error !== \"\" ? status.error : status.note),\n broken: status.version === \"\" && status.error !== \"\"\n }));\n setDialog({ candidates });\n },\n () => {\n setRunning(false);\n }\n );\n };\n\n /**\n * The Windows Chrome action: it asks the host to run the whole Windows\n * path (locate, prereq, launch, connect). The run is not visible in the\n * promise it resolves with \u2014 everything it answers lands in the served\n * `windowsChromeStatus` \u2014 but, like every executable action, the click keeps\n * the button busy until the host's revision counter moves.\n */\n const runWindowsChrome = () => {\n setWindowsRunning(true);\n let promise;\n try {\n promise = deps.openWindowsChrome();\n } catch (caught) {\n promise = Promise.reject(caught);\n }\n Promise.resolve(promise).then(\n () => {\n setWindowsRunning(false);\n },\n () => {\n setWindowsRunning(false);\n }\n );\n };\n\n /** \"Add selected\": merge the dialog's checked ids into the rows, then close.\n * The controller owns the merge rules (and skips a no-op write). */\n const addFromDialog = (ids: string[]) => {\n setDialog(null);\n if (typeof deps.addExecutables === \"function\") Promise.resolve(deps.addExecutables(ids)).catch(() => { });\n };\n\n return {\n running: isRunning,\n windowsRunning: isWindowsRunning,\n dialog,\n runFetch,\n runWindowsChrome,\n addFromDialog,\n closeDialog: () => setDialog(null),\n lastProbedAt,\n clock\n };\n}\n", "/**\n * The \"Reduce log output\" toggle \u2014 a catalog block in its own right.\n *\n * It renders as a `.catalog` carrying the two-row field (title + switch inline,\n * hint below), so the section reads exactly like the picker block (and inherits\n * the same seam rule: only the block-to-block seam draws a hairline). The switch\n * mirrors what the host actually resolves \u2014 the explicit user-layer `stderrMode`\n * when set, else the row-config `rowStderr` fallback \u2014 never a phantom state.\n *\n * The Switch primitive renders only the control and names it through `label`,\n * which becomes the control's aria-label; the tooltip therefore lives on the\n * wrapper span the switch is rendered inside.\n */\n\n/// <reference path=\"../shell-modules.d.ts\" />\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Switch } from \"@deepseek-ai/dsh-client-ui-primitives\";\nimport STYLES from \"../styles/ChromeMcpCard.module.css\";\n\n/** The one catalog block that is a switch rather than a picker. */\nexport function LogOutputToggle(props: any): any {\n var t = props.t;\n return jsxs(\"div\", {\n className: STYLES.catalog,\n children: [\n jsxs(\"div\", {\n className: STYLES.field,\n children: [\n jsxs(\"div\", {\n className: STYLES.fieldRow,\n children: [\n jsx(\"span\", { className: STYLES.fieldTitle, children: t(\"reduceLabel\") }),\n jsx(\"span\", {\n className: STYLES.toggleLabel,\n title: t(\"reduceTitle\"),\n children: jsx(Switch, {\n checked: props.checked,\n label: t(\"reduceLabel\"),\n disabled: props.disabled,\n onChange: () => {\n if (typeof props.onToggle === \"function\") props.onToggle();\n }\n })\n })\n ]\n }),\n jsx(\"div\", { className: STYLES.fieldDesc, children: t(\"reduceHint\") })\n ]\n })\n ]\n });\n}\n", "/**\n * The card's derived view \u2014 what one served snapshot actually means.\n *\n * Everything the widget renders but does not own: the saved executable rows\n * (run through the same id rules the rows follow), the dropdown options the pill\n * lists, the ids the last run could not launch, the effective stderr mode\n * behind the toggle, and the error line's status dot. Pure derivation, no hooks \u2014\n * the widget owns its state, this section reads it.\n *\n * The reference card (`dsh-docker-desktop-mcp`) carries the same shape here; the\n * difference is `brokenIds`, which the host's per-path probe answer feeds.\n */\nimport { entryLabel, normalizeEntries, type CatalogEntry } from \"../catalog.js\";\nimport type { ChromeExecutableStatus, WindowsChromeStatus } from \"../types.js\";\n\n/** What the card renders, derived from the served snapshot. */\nexport type CardView = {\n /** The error the body's status line carries (\"\" = nothing to report). */\n error: string;\n /** Whether the \"Reduce log output\" switch reads as on. */\n reduceChecked: boolean;\n /** Saved executable rows, normalized \u2014 the rows list and the dropdown. */\n executableEntries: CatalogEntry[];\n /** The pill's options: the saved rows, plus the executable in use. */\n executableOptions: { id: string; label: string }[];\n /** Ids the last run could not launch \u2014 the pill tags those. */\n brokenIds: string[];\n /** What the bridge launches with (\"\" = nothing resolved yet). */\n effectivePath: string;\n /** What the selected executable answered with (\"\" = nothing answered). */\n version: string;\n /** Whether the known \"executable not found\" state is set. */\n missing: boolean;\n /** Whether the status dot reports an error (true) or a missing executable. */\n dotIsError: boolean;\n /** The host runs under WSL and the selection is a Windows executable. */\n wslWindowsExecutable: boolean;\n /** What the **Prelaunch Windows Chrome** run is doing \u2014 served by the host. */\n windowsChrome: WindowsChromeStatus;\n /** True while the bridge launches with a connect-mode flag; the pill then\n * reads \"connect mode\" and the local selection is muted. */\n connectMode: boolean;\n};\n\nfunction labelOf(entries: readonly CatalogEntry[], id: string): string {\n const row = entries.find((entry: CatalogEntry) => entry.id === id);\n return row === void 0 ? id : entryLabel(row);\n}\n\n/** Project one served snapshot onto everything the widget renders. */\nexport function describeCard(state: any): CardView {\n const error = state.lastError || state.actionError || \"\";\n // The \"Reduce log output\" switch mirrors what the host actually resolves:\n // the explicit `stderrMode` when set, else the row-config fallback\n // (`rowStderr`). Never a phantom state.\n const servedMode = typeof state.stderrMode === \"string\" ? state.stderrMode : \"\";\n const stderrEffective = servedMode !== \"\" ? servedMode : state.rowStderr === \"console\" ? \"console\" : \"log\";\n const executableEntries = normalizeEntries(state.executables);\n const statusList: ChromeExecutableStatus[] = Array.isArray(state.executableStatus) ? state.executableStatus : [];\n\n // The pill's options: the saved rows, plus what is actually running so a\n // picked path never disappears from the list.\n const optionIds = executableEntries.map((entry: CatalogEntry) => entry.id);\n const effectivePath = typeof state.effectiveChromePath === \"string\" ? state.effectiveChromePath : \"\";\n if (effectivePath !== \"\" && optionIds.indexOf(effectivePath) === -1) optionIds.push(effectivePath);\n const executableOptions = optionIds.map((id: string) => ({ id, label: labelOf(executableEntries, id) }));\n // Which ids the last run could not launch: the option list tags those, the\n // same way the reference card tags a broken row.\n const brokenIds = statusList.filter((status) => status.version === \"\" && status.error !== \"\").map((status) => status.path);\n\n return {\n error,\n reduceChecked: stderrEffective === \"log\",\n executableEntries,\n executableOptions,\n brokenIds,\n effectivePath,\n version: typeof state.chromeVersion === \"string\" ? state.chromeVersion : \"\",\n missing: state.chromeMissing === true && error === \"\",\n dotIsError: error !== \"\",\n wslWindowsExecutable: state.wslWindowsExecutable === true,\n windowsChrome: readWindowsChrome(state.windowsChromeStatus),\n // Connect mode reads two ways. The mirror's answer is what the Host says\n // the bridge launches with \u2014 authoritative when it has been answered. And\n // the same question answered off the **saved flags**, which is what the\n // bridge launches with by the same precedence the flags rows edit: a flag\n // entry is a real config field a write-back never clears, so it keeps the\n // answer standing through the reset window every write pass leaves behind\n // (the same rule the pill's saved-path fallback follows). Either half\n // answering is enough; neither can contradict what the other states,\n // because both are asked of the same launch.\n connectMode: state.carriesConnectionMode === true || flagsCarryConnectionMode(state.extraFlags)\n };\n}\n\n/** The Host's connect-flag shape, restated here because the client reads no host\n * module (`src/host/flags.ts`'s `carriesConnectionMode`, the same predicate the\n * probe skip keys on); `test/client.test.mjs` pins the two spellings against one\n * flag list. */\nconst CONNECT_FLAG_PATTERN = /^--(?:browserUrl|wsEndpoint)(?:=|(?=\\s)|$)/iu;\n\n/** A connect-mode entry among the saved extra flags. */\nfunction flagsCarryConnectionMode(flags: unknown): boolean {\n return Array.isArray(flags) && flags.some((flag) => typeof flag === \"string\" && CONNECT_FLAG_PATTERN.test(flag));\n}\n\n/** One row's menu label: its display name \u2014 the tag a broken row carries is\n * added by the picker, which owns the copy. */\nexport function executableLabel(view: CardView, id: string): string {\n return labelOf(view.executableEntries, id);\n}\n\n/** The served Windows-Chrome status, coerced to the shape this file renders. */\nfunction readWindowsChrome(value: unknown): WindowsChromeStatus {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return { state: \"off\", port: 0, error: \"\" };\n const record = value as Record<string, unknown>;\n const known = [\"off\", \"launching\", \"connected\", \"unreachable\", \"not-found\", \"launch-failed\", \"not-applicable\"];\n const state = typeof record.state === \"string\" && known.indexOf(record.state) !== -1 ? record.state as WindowsChromeStatus[\"state\"] : \"off\";\n const port = typeof record.port === \"number\" && Number.isFinite(record.port) ? Math.trunc(record.port) : 0;\n const error = typeof record.error === \"string\" ? record.error : \"\";\n return { state, port, error };\n}\n\n/** What the **Prelaunch Windows Chrome** button renders right now. The copy keys\n * carry the whole disabled reason (mirrored prereq, no Windows binary, off\n * WSL), so the button itself never re-derives what the host already answered. */\nexport type WindowsButton = {\n /** The action's copy key. */\n labelKey: string;\n /** The tooltip's copy key. */\n titleKey: string;\n /** Whether the click does nothing (disabled reason lives in `titleKey`). */\n disabled: boolean;\n /** Whether the run is in flight \u2014 the button reads as busy, not disabled. */\n busy: boolean;\n};\n\nexport function windowsChromeButton(view: CardView): WindowsButton {\n const status = view.windowsChrome;\n if (status.state === \"launching\") return { labelKey: \"openWindowsChromeBusy\", titleKey: \"openWindowsChromeTitle\", disabled: true, busy: true };\n if (status.state === \"not-applicable\") return { labelKey: \"openWindowsChrome\", titleKey: \"windowsChromeNotWsl\", disabled: true, busy: false };\n // `off`, `connected`, `launch-failed`, `not-found` and `unreachable` are all\n // idle answers: the button stays available so the run can be retried. A\n // `not-found` is an answer about *this* run \u2014 the executable the run looked\n // for may well be there next time (and, with the Windows executables folded\n // into the candidate list, the selection may change) \u2014 and `unreachable` is\n // the same question about the Windows side; a disabled button would be a\n // dead end the notice keeps pointing the user back to, and nothing else ever\n // puts the state back.\n if (status.state === \"not-found\") return { labelKey: \"openWindowsChrome\", titleKey: \"windowsChromeNotFound\", disabled: false, busy: false };\n if (status.state === \"unreachable\") return { labelKey: \"openWindowsChrome\", titleKey: \"windowsChromeUnreachable\", disabled: false, busy: false };\n // `off`, `connected` and `launch-failed` are all idle answers: the button\n // stays available so the run can be re-tried or re-adjusted.\n return { labelKey: \"openWindowsChrome\", titleKey: \"openWindowsChromeTitle\", disabled: false, busy: false };\n}\n\n/** Whether the run could not launch this id (the pill tags it, the dialog\n * renders its note as a failure). */\nexport function isBroken(view: CardView, id: string): boolean {\n return view.brokenIds.indexOf(id) !== -1;\n}\n\n/**\n * The result line's age suffix. A run whose answer equals what the line already\n * says is otherwise a no-op on screen, so the line states when the card last ran\n * one.\n */\nexport function probeAge(since: number, now: number, t: (key: string) => string): string {\n const seconds = Math.max(0, Math.floor((now - since) / 1000));\n if (seconds < 10) return t(\"probeJustNow\");\n if (seconds < 60) return String(seconds) + \" \" + t(\"probeSecondsAgo\");\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return String(minutes) + \" \" + t(\"probeMinutesAgo\");\n return String(Math.floor(minutes / 60)) + \" \" + t(\"probeHoursAgo\");\n}\n", "/**\n * Browser half \u2014 the safe reads that project a served value onto the\n * snapshot.\n *\n * The configuration form answers the resolved section as a bag of unknowns, and\n * a field the Host has not answered for yet is simply absent; the controller's\n * `publish` folds what is there into the snapshot through these small, total\n * readers so no field ever reads `undefined`. They are pure, so the class keeps\n * to just the store + actions.\n *\n * The `Served` projection and the two list comparisons ride here for the same\n * reason: they are pure foldings of what the Host answers, shared by the class\n * (`publish` recomputes the served projection on every push) and by the write\n * actions (every staged edit and every immediate trigger diffs against it).\n */\nimport type { CatalogEntry } from \"./catalog.js\";\nimport type { ChromeExecutableStatus, WindowsChromeStatus } from \"./types.js\";\n\n/** The served projection every write diffs against \u2014 staged fields overlay it,\n * immediate triggers are compared against it. */\nexport type Served = {\n extraFlags: string[];\n executables: CatalogEntry[];\n chromePath: string;\n effectiveChromePath: string;\n effectiveSource: string;\n /** The persisted \"Reduce log output\" mode (\"\" = follow the row config). */\n stderrMode: string;\n /** What the Host resolves that mode to \u2014 what the toggle reads as on. */\n stderrEffective: string;\n};\n\n/** An answer-less form leaves the card with: nothing editable, nothing running. */\nexport function nothingServed(): Served {\n return {\n extraFlags: [], executables: [], chromePath: \"\", effectiveChromePath: \"\", effectiveSource: \"\", stderrMode: \"\", stderrEffective: \"log\"\n };\n}\n\n/** Whether two flag lists carry the same strings in the same order. */\nexport function sameStrings(a: readonly string[], b: readonly string[]): boolean {\n if (a === b) return true;\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\n\n/** Whether two saved-row lists carry the same ids and labels. */\nexport function sameEntries(a: readonly CatalogEntry[], b: readonly CatalogEntry[]): boolean {\n if (a === b) return true;\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) if (a[i].id !== b[i].id || a[i].name !== b[i].name) return false;\n return true;\n}\n\n/** A list of flags read from any value; a non-list answers as nothing. */\nexport function readFlags(value: unknown): string[] {\n if (!Array.isArray(value)) return [];\n return value.filter((flag) => typeof flag === \"string\" && flag !== \"\") as string[];\n}\n\n/** Number read from any value, `fallback` when absent or not a number. */\nexport function readNumber(value: unknown, fallback: number): number {\n return typeof value === \"number\" ? value : fallback;\n}\n\n/** String read from any value, `fallback` when absent or not a string. */\nexport function readString(value: unknown, fallback: string): string {\n return typeof value === \"string\" ? value : fallback;\n}\n\n/** Coerce the served Windows-Chrome status into the shape the card renders. */\nexport function readWindowsChromeStatus(value: unknown): WindowsChromeStatus {\n const fallback: WindowsChromeStatus = { state: \"off\", port: 0, error: \"\" };\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return fallback;\n const status = (value as Record<string, unknown>).state;\n const states = [\"off\", \"launching\", \"connected\", \"unreachable\", \"not-found\", \"launch-failed\", \"not-applicable\"];\n const port = (value as Record<string, unknown>).port;\n const error = (value as Record<string, unknown>).error;\n return {\n state: typeof status === \"string\" && states.indexOf(status) !== -1 ? status as WindowsChromeStatus[\"state\"] : \"off\",\n port: typeof port === \"number\" && Number.isFinite(port) ? Math.trunc(port) : 0,\n error: typeof error === \"string\" ? error : \"\"\n };\n}\n\n/** Coerce the served per-row answers into the shape the card renders. */\nexport function readStatus(value: unknown): ChromeExecutableStatus[] {\n if (!Array.isArray(value)) return [];\n const statuses: ChromeExecutableStatus[] = [];\n for (const item of value) {\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) continue;\n const path = readString((item as { path?: unknown }).path, \"\");\n if (path === \"\") continue;\n statuses.push({\n path,\n version: readString((item as { version?: unknown }).version, \"\"),\n error: readString((item as { error?: unknown }).error, \"\"),\n note: readString((item as { note?: unknown }).note, \"\")\n });\n }\n return statuses;\n}\n", "/**\n * Browser half \u2014 what one served snapshot means for the card.\n *\n * ancestros' `CardController` answers the row as a bag of values (the served\n * document, the two staged fields overlaid by their drafts) plus the write\n * state. This module folds that into the state the card renders, through the\n * small total readers in ./read.ts, so no field ever reads `undefined`. Two\n * readings are this plugin's own and stay here: the effective executable while\n * the Host has not re-answered it, and the WSL notice that holds its last\n * answer across that same window.\n */\nimport { normalizeEntries } from \"./catalog.js\";\nimport { readFlags, readNumber, readStatus, readString, readWindowsChromeStatus } from \"./read.js\";\nimport type { ChromeMcpCardSnapshot } from \"./types.js\";\n\n/** The slice of ancestros' snapshot the projection reads. */\nexport interface ServedSnapshot {\n available: boolean;\n writable: boolean;\n values: Record<string, unknown>;\n dirty: boolean;\n saving: boolean;\n failed: boolean;\n actionError: string;\n}\n\n/** The card with nothing served: the form is still loading, or the Host does\n * not expose the entry. The card renders nothing. */\nexport function nothingProjected(): ChromeMcpCardSnapshot {\n return {\n available: false,\n writable: false,\n extraFlags: [],\n lastError: \"\",\n chromeMissing: false,\n executableDiscoveryRevision: 0,\n chromeVersion: \"\",\n executables: [],\n executableStatus: [],\n chromePath: \"\",\n effectiveChromePath: \"\",\n effectiveSource: \"\",\n stderrMode: \"\",\n rowStderr: \"log\",\n defaultExtraFlags: [],\n wslExtraFlags: [],\n wslWindowsExecutable: false,\n windowsChromeStatus: { state: \"off\", port: 0, error: \"\" },\n carriesConnectionMode: false,\n actionError: \"\",\n dirty: false,\n saving: false,\n failed: false\n };\n}\n\n/**\n * Project one snapshot onto the card state.\n * @param snapshot - what ancestros' controller answers.\n * @param heldWslNotice - the WSL notice's previous answer (see below).\n */\nexport function projectCard(snapshot: ServedSnapshot, heldWslNotice: boolean): ChromeMcpCardSnapshot {\n if (snapshot.available !== true) return nothingProjected();\n const value = snapshot.values ?? {};\n const chromePath = readString(value.chromePath, \"\");\n // What the bridge launches with: the Host's own answer. **Empty is \"has not\n // answered\", not \"nothing is selected\"** \u2014 a config write recomposes the live\n // answers back to their defaults (nothing in the row persists them), and a\n // card that read that as no executable would say a pick had reverted. The\n // one host answer that *is* an empty path is a selection the host must never\n // exec (WSL host + Windows executable), whose own mirror flag keeps that\n // reading.\n const answeredEffective = readString(value.effectiveChromePath, \"\");\n // A `false` read of the WSL notice is ambiguous the same way: it is either\n // \"no Windows executable stands selected\" or the moment the recomposition\n // resets the live answers. While the Host has not answered the selection\n // (its effective path reads empty with a saved path standing), the notice\n // holds its last answer instead of flickering off and back; a `true` read is\n // an answer, so only the ambiguous false is held.\n const wslNotice = value.wslWindowsExecutable === true\n ? true\n : answeredEffective === \"\" && chromePath !== \"\"\n ? heldWslNotice\n : false;\n // The hold stands the NOTICE up, never the path: an unanswered effective path\n // says nothing about what is selected, and a pill that blanks during the\n // write's own reset window is a selection the user never dropped (measured\n // live 2026-10-12).\n const effectiveChromePath = answeredEffective !== \"\"\n ? answeredEffective\n : (value.wslWindowsExecutable === true ? \"\" : chromePath);\n const effectiveSource: \"\" | \"selected\" | \"row-config\" =\n value.effectiveSource === \"selected\" || value.effectiveSource === \"row-config\" ? value.effectiveSource : \"\";\n const stderrMode = value.stderrMode === \"log\" || value.stderrMode === \"console\" ? value.stderrMode : \"\";\n return {\n available: true,\n writable: snapshot.writable === true,\n extraFlags: readFlags(value.extraFlags),\n lastError: readString(value.lastError, \"\"),\n chromeMissing: value.chromeMissing === true,\n executableDiscoveryRevision: readNumber(value.executableDiscoveryRevision, 0),\n chromeVersion: readString(value.chromeVersion, \"\"),\n executables: normalizeEntries(value.executables),\n executableStatus: readStatus(value.executableStatus),\n chromePath,\n effectiveChromePath,\n effectiveSource,\n stderrMode,\n // The mode the bridge actually routes console output through, as the\n // Host resolves it \u2014 what the field states wins, the live answer fills\n // the gap.\n rowStderr: value.stderrEffective === \"console\" ? \"console\" : \"log\",\n defaultExtraFlags: readFlags(value.defaultExtraFlags),\n wslExtraFlags: readFlags(value.wslExtraFlags),\n wslWindowsExecutable: wslNotice,\n windowsChromeStatus: readWindowsChromeStatus(value.windowsChromeStatus),\n carriesConnectionMode: value.carriesConnectionMode === true,\n actionError: snapshot.actionError ?? \"\",\n dirty: snapshot.dirty === true,\n saving: snapshot.saving === true,\n failed: snapshot.failed === true\n };\n}\n", "/**\n * Browser half \u2014 the one block this card declares.\n *\n * The card's body is still this plugin's own (`./card/`): the executable\n * picker, the flags rows, the \"Reduce log output\" toggle, the WSL notice, the\n * Apply/Discard footer. What it renders from, and every write it makes, now ride\n * ancestros' `CardController` \u2014 the store over the row's configuration form,\n * the staged/immediate/trigger writes, the fenced write door (with its unfenced\n * last pass and live-key clears) and the settle. This module is the seam: it\n * projects the controller's snapshot onto the card state (./project.ts) and\n * hands the card its actions, each one a controller call.\n */\nimport { normalizeEntries, type CatalogEntry } from \"./catalog.js\";\nimport { ChromeMcpCard } from \"./card/index.js\";\nimport { projectCard, type ServedSnapshot } from \"./project.js\";\nimport { readStatus, sameEntries } from \"./read.js\";\nimport type { ChromeExecutableStatus, ChromeMcpCardSnapshot } from \"./types.js\";\n\n/** The field every executable action settles on: the Host run's own counter. */\nconst RUN_COUNTER = \"executableDiscoveryRevision\";\n\n/** The slice of ancestros' `CardController` this seam calls. */\nexport interface CardControllerLike {\n getSnapshot(): ServedSnapshot;\n value(field: string): unknown;\n servedValue(field: string): unknown;\n stage(field: string, value: unknown): void;\n discard(): void;\n applyStaged(): Promise<boolean>;\n settleTrigger(triggerField: string, watchField?: string): Promise<void>;\n settleAndWrite(settled: (snapshot: ServedSnapshot) => boolean, field: string, value: unknown): Promise<void>;\n}\n\n/** The WSL notice's last answer, per controller (see ./project.ts: it holds\n * across the recomposition window). */\nconst heldWslNotice = new WeakMap<object, boolean>();\n\n/** What the run counter answers on one snapshot. */\nfunction runCounter(snapshot: ServedSnapshot): number {\n const value = snapshot.values?.[RUN_COUNTER];\n return typeof value === \"number\" ? value : 0;\n}\n\n/** Project the controller's snapshot onto the card state, keeping the notice's\n * hold per controller. */\nexport function cardState(controller: CardControllerLike): ChromeMcpCardSnapshot {\n const state = projectCard(controller.getSnapshot(), heldWslNotice.get(controller) === true);\n heldWslNotice.set(controller, state.wslWindowsExecutable);\n return state;\n}\n\n/** Every action the card calls, each one a controller call. */\nexport function cardActions(controller: CardControllerLike) {\n const current = () => cardState(controller);\n const saveExecutables = (entries: CatalogEntry[]): Promise<void> => {\n const next = normalizeEntries(entries);\n // The rows are what the Host's next run reads; a list equal to what is\n // served writes nothing.\n if (sameEntries(next, current().executables)) return Promise.resolve();\n const baseline = runCounter(controller.getSnapshot());\n return controller.settleAndWrite((snapshot) => runCounter(snapshot) > baseline, \"executables\", next);\n };\n return {\n /** Stage the extra-flags list; a list equal to what is served is not\n * dirty (the controller drops that draft). */\n saveFlags: (flags: string[]): Promise<void> => {\n controller.stage(\"extraFlags\", Array.isArray(flags) ? flags : []);\n return Promise.resolve();\n },\n /** Stage the flipped \"Reduce log output\" mode. A flip that lands back on\n * what is already effective drops the draft instead of staging a no-op:\n * it stages the served value itself, which the controller reads as clean. */\n toggleStderr: (): Promise<void> => {\n const state = current();\n const held = state.stderrMode;\n const effective = held === \"\" ? state.rowStderr : held;\n const next = effective === \"log\" ? \"console\" : \"log\";\n const servedRaw = controller.servedValue(\"stderrMode\");\n const served = servedRaw === \"log\" || servedRaw === \"console\" ? servedRaw : \"\";\n const servedEffective = served === \"\" ? state.rowStderr : served;\n controller.stage(\"stderrMode\", next === servedEffective ? served : next);\n return Promise.resolve();\n },\n /** Select the executable the bridge launches with: written on the spot,\n * settled by the Host's own re-run. Picking what already runs writes\n * nothing. */\n selectExecutable: (id: string): Promise<void> => {\n const target = typeof id === \"string\" ? id.trim() : \"\";\n if (target === \"\" || target === current().effectiveChromePath) return Promise.resolve();\n const baseline = runCounter(controller.getSnapshot());\n return controller.settleAndWrite((snapshot) => runCounter(snapshot) > baseline, \"chromePath\", target);\n },\n saveExecutables,\n /** Merge the ids picked in the dialog into the saved rows. */\n addExecutables: (ids: string[]): Promise<void> =>\n saveExecutables(current().executables.concat(\n (Array.isArray(ids) ? ids : [])\n .filter((id) => typeof id === \"string\" && id.trim() !== \"\")\n .map((id) => ({ id: id.trim(), name: \"\" }))\n )),\n /** Ask the Host to re-probe the saved rows; answers every path the run\n * answered for, read off the served mirror once it settles. */\n refreshExecutables: (): Promise<ChromeExecutableStatus[]> =>\n controller.settleTrigger(\"refreshExecutablesNonce\", RUN_COUNTER).then(() => readStatus(controller.value(\"executableStatus\"))),\n /** Ask the Host to drive a Windows-side Chrome in connect mode; what the\n * button reports is served through `windowsChromeStatus`. */\n openWindowsChrome: (): Promise<void> => controller.settleTrigger(\"openWindowsChromeNonce\", RUN_COUNTER),\n /** Persist every staged edit in one pass. */\n apply: async (): Promise<void> => {\n await controller.applyStaged();\n },\n /** Drop every staged edit. */\n discard: (): void => controller.discard()\n };\n}\n\n/**\n * The block: the plugin's own card body, over the shared controller.\n * @param props - what ancestros' body hands a block (`controller`, `t`).\n */\nexport function ChromeCardBlock(props: { controller: CardControllerLike; t: (key: string) => string }): unknown {\n const state = cardState(props.controller);\n return ChromeMcpCard({\n t: props.t,\n view: \"page\",\n useChromeMcpCard: <T>(selector: (snapshot: ChromeMcpCardSnapshot) => T): T => selector(state),\n ...cardActions(props.controller)\n });\n}\n", "/**\n * English copy \u2014 the dictionary every other tag falls back to.\n *\n * Every string the card renders lives here; the widget itself stays\n * copy-free. Add a locale by dropping a sibling file and registering it in\n * ./index.ts.\n *\n * No key describes an \"automatic\" state, because there is no auto mode: what\n * the saved-executable rows list is what can be picked, and the only automatic\n * step is the host seeding a never-configured host once.\n */\nexport const en = {\n executableLabel: \"Chrome executable\",\n executableHint: \"The executable every connection launched from this row launches with, unless the connection picked its own. Changing it answers the live connections again.\",\n executableNone: \"No Chrome executable detected\",\n executableRows: \"Saved executables\",\n executableIdLabel: \"Executable path\",\n executableIdPlaceholder: \"Path to a Chrome executable\",\n executableNameLabel: \"Display name\",\n namePlaceholder: \"Display name\",\n addExecutable: \"Add executable\",\n removeExecutable: \"Delete executable\",\n fetchExecutables: \"Fetch executables\",\n fetching: \"Fetching\u2026\",\n executableEmpty: \"No executables saved. Use \u201CFetch executables\u201D, or add the Chrome path by hand.\",\n dialogExecutablesTitle: \"Choose executables to add\",\n dialogExecutablesDescription: \"These are the Chrome executables this host's last run answered for. Choose the ones to add.\",\n dialogEmpty: \"Nothing matches your search.\",\n searchExecutables: \"Search executables\",\n selectAll: \"Select all\",\n addSelected: \"Add selected\",\n candidateSaved: \"Saved\",\n close: \"Close\",\n cancel: \"Cancel\",\n unavailableSuffix: \"not runnable\",\n wslWindowsTitle: \"Windows executable under WSL\",\n wslWindowsNote:\n \"This host runs inside Windows Subsystem for Linux and the selected executable is the Windows Chrome, which no connection here can launch: the debug pipes it opens do not survive the WSL interop boundary, and its debugging port stays bound to the Windows loopback. It answers --version correctly, so the pill looks healthy until the first tool call fails. Drive it instead with the \u201CWindows Chrome (WSL debug port)\u201D connection, or with its run \u2014 Prelaunch Windows Chrome, the action the executable block carries next to Fetch executables, or the prelaunch_windows_chrome tool \u2014 which starts the Windows browser on a free debugging port. The run only reads whether Windows loopback reaches this WSL host (networkingMode=mirrored in %USERPROFILE%\\\\.wslconfig, then wsl --shutdown \u2014 a manual Windows-side setting it never edits). Chrome installed inside the Linux distro needs none of this.\",\n probing: \"Checking the executables\u2026\",\n versionLabel: \"Probed version:\",\n probeJustNow: \"just now\",\n probeSecondsAgo: \"seconds ago\",\n probeMinutesAgo: \"minutes ago\",\n probeHoursAgo: \"hours ago\",\n flagsTitle: \"Extra flags\",\n flagsHint: \"The extra flags every connection launched from this row launches with, unless the connection carries its own. One flag per row \u2014 applying them answers the live connections again.\",\n flagsEmpty: \"No extra flags saved. Add one by hand, or use \u201CRestore defaults\u201D.\",\n flagsRows: \"Saved flags\",\n flagsValueLabel: \"Extra flag\",\n flagsValuePlaceholder: \"e.g. --headless\",\n addFlag: \"Add flag\",\n removeFlag: \"Delete flag\",\n flagsRestore: \"Restore defaults\",\n flagsRestoreTitle: \"Keep every flag the rows carry and append the defaults that are still missing\",\n flagsWsl: \"Flags WSL\",\n flagsWslTitle: \"Append the recommended WSL<->Windows flags\",\n openWindowsChrome: \"Prelaunch Windows Chrome\",\n openWindowsChromeTitle: \"Start the Windows-side Chrome with --remote-debugging-port and refresh whatever Windows Chrome connections stand live\",\n openWindowsChromeBusy: \"Starting Windows Chrome\u2026\",\n windowsChromeNotWsl: \"Windows Chrome does not apply outside WSL.\",\n windowsChromeNotFound: \"No Windows Chrome was found (Program Files / Program Files (x86)) \u2014 run it again once one is installed.\",\n windowsChromeUnreachable:\n \"Needs networkingMode=mirrored in %USERPROFILE%\\\\.wslconfig, with wsl --shutdown: right now this WSL host cannot reach the Windows loopback.\",\n connectModeLabel: \"Connect mode\",\n connectModeHint: \"Connect mode: the connection launches no local Chrome (it connects with --browserUrl / --wsEndpoint); the local selection stays put.\",\n reduceLabel: \"Reduce log output\",\n reduceTitle: \"Capture the connection's stderr into the plugin's log file\",\n reduceHint: \"Captures stderr into the plugin's log file. Turn it off to debug the raw output; switching answers the live connections again.\",\n // The staged form's own copy: nothing is written until **Apply** lands every\n // staged edit, so the card announces what a save would store and what it\n // could not land.\n apply: \"Apply\",\n discard: \"Discard\",\n saving: \"Applying\u2026\",\n unsaved: \"Unsaved\",\n saveFailed: \"The last save was not accepted.\",\n docsMessage: \"Find the complete list of server parameters (e.g., --headless, --isolated, --slim) and how to configure WebSocket connections in the Configuration Guide.\",\n docsLinkLabel: \"Configuration Guide\",\n statusError: \"Error\",\n statusOk: \"OK\",\n chromeMissing: \"Chrome executable not found\",\n // The body-mounted toast host's copy: it announces what the card's own error\n // line can only show while the row page is open. An error notice carries the\n // Host's captured line, so `toastError` only stands behind an empty one.\n toastStall: \"The Chrome host did not answer the action \u2014 try it again.\",\n toastError: \"The Chrome host reported a failure.\",\n readOnly: \"Settings are read-only in this deployment.\"\n};\n", "/**\n * Locale dictionaries registered on the shell locale service.\n *\n * One dictionary per tag; `en` is the fallback every other tag resolves\n * missing keys through, so it must always be present.\n */\nimport { en } from \"./en-US.js\";\n\n/** tag \u2192 dictionary. Registered wholesale under the plugin's locale namespace. */\nexport const DICTIONARIES: Record<string, Record<string, string>> = { en };\n\n/** Every tag this half registers; the first entry is the fallback. */\nexport const TAGS = [\"en\"];\n", "/**\n * Browser half \u2014 the card's stylesheet surface.\n *\n * The rules and the class names live in `ChromeMcpCard.module.css`; the\n * build's CSS-modules step (scripts/build-client.mjs) compiles it \u2014 minified,\n * class names scoped `hash_local` \u2014 and the card imports that map directly,\n * the same way every shipped `dsh-client-ui-*` card consumes its own\n * stylesheet. This module keeps only the one-shot injection.\n *\n * The injection idiom is what every other plugin card uses: a `style` element\n * tagged with the plugin id, so a re-materialized bundle never stacks a second\n * copy. It is called from `apply`, never from a module body, so importing a\n * module for its class names cannot have DOM side effects.\n */\nimport { PLUGIN_ID } from \"../plugin-meta.js\";\nimport { cssText } from \"./ChromeMcpCard.module.css\";\n\n/** The one-shot `style` element's identity: `<plugin id>/<card>.module.css`. */\nconst CARD_CSS_ID = PLUGIN_ID + \"/ChromeMcpCard.module.css\";\n\n/**\n * Append the card's stylesheet once.\n *\n * Idempotent by construction: the element is tagged with the plugin id plus\n * the card's stylesheet id, so a re-materialized bundle never stacks a second\n * copy.\n */\nexport function injectCardStyles(): void {\n if (typeof document === \"undefined\") return;\n if (document.querySelector('style[data-plugin-css=\"' + CARD_CSS_ID + '\"]') !== null) return;\n const styleTag = document.createElement(\"style\");\n styleTag.dataset.plugin = PLUGIN_ID;\n styleTag.dataset.pluginCss = CARD_CSS_ID;\n styleTag.textContent = cssText;\n document.head.appendChild(styleTag);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,+BAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,aAAwB;AACxB,yBAA4B;AAc5B,YAAuB;AACvB,IAAAC,sBAA0B;AAwJ1B,aAAwB;AACxB,IAAAA,sBAA2C;AAyI3C,IAAAA,sBAA2C;AAC3C,sCAAqB;AAsHrB,IAAAA,sBAA2C;AA4F3C,IAAAA,sBAA2C;AAC3C,IAAAC,mCAAuB;AA2CvB,IAAAD,sBAA2C;AAkB3C,aAAwB;AACxB,IAAAA,sBAA2C;AAC3C,IAAAC,mCAA8B;AA2N9B,IAAAD,sBAA2C;AAC3C,IAAAC,mCAA8B;AAiF9B,8BAAoC;AA92BpC,SAAS,aAAa,SAAS,SAAS;AACtC,MAAI,OAAO,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KAAK;AAIpB,SAAS,MAAM,KAA6C;AAC/D,EAAAC,kBAAiB;AACjB,OAAK,MAAM,GAAG;AAClB;",
|
|
6
|
+
"names": ["RUN_SETTLE_TIMEOUT_MS", "import_jsx_runtime", "import_dsh_client_ui_primitives", "jsxs2", "jsx2", "jsx3", "jsxs3", "jsxs4", "jsx4", "jsx5", "jsxs5", "jsxs6", "jsx6", "jsx7", "Menu2", "jsxs7", "jsx8", "Menu3", "jsxs8", "jsx9", "react", "import_jsx_runtime", "cssText", "import_jsx_runtime", "LOCALE_NAMESPACE", "RUN_SETTLE_TIMEOUT_MS", "CHEVRON_PATH", "TRASH_PATH", "CLOSE_PATHS", "DOCS_PATHS", "react", "import_jsx_runtime", "index", "field", "TRASH_PATH", "DOCS_PATHS", "import_jsx_runtime", "import_dsh_client_ui_primitives", "CHEVRON_PATH", "react", "import_jsx_runtime", "CLOSE_PATHS", "react", "import_jsx_runtime", "import_dsh_client_ui_primitives", "heldWslNotice", "DICTIONARIES", "injectCardStyles", "cssText", "LOCALE_NAMESPACE", "DICTIONARIES", "RUN_SETTLE_TIMEOUT_MS", "injectCardStyles"]
|
|
7
7
|
}
|