@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.
Files changed (172) hide show
  1. package/README.md +44 -39
  2. package/lib/client.js +2186 -614
  3. package/lib/client.js.map +4 -4
  4. package/lib/host/apply.d.ts +38 -1
  5. package/lib/host/apply.d.ts.map +1 -1
  6. package/lib/host/apply.js +43 -17
  7. package/lib/host/apply.js.map +1 -1
  8. package/lib/host/bridge.d.ts +28 -19
  9. package/lib/host/bridge.d.ts.map +1 -1
  10. package/lib/host/bridge.js +71 -79
  11. package/lib/host/bridge.js.map +1 -1
  12. package/lib/host/catalog.d.ts +2 -2
  13. package/lib/host/catalog.js +2 -2
  14. package/lib/host/commands/chrome-path.d.ts +4 -0
  15. package/lib/host/commands/chrome-path.d.ts.map +1 -0
  16. package/lib/host/commands/chrome-path.js +65 -0
  17. package/lib/host/commands/chrome-path.js.map +1 -0
  18. package/lib/host/commands/chrome-refresh.d.ts +17 -0
  19. package/lib/host/commands/chrome-refresh.d.ts.map +1 -0
  20. package/lib/host/commands/chrome-refresh.js +37 -0
  21. package/lib/host/commands/chrome-refresh.js.map +1 -0
  22. package/lib/host/commands/index.d.ts +26 -0
  23. package/lib/host/commands/index.d.ts.map +1 -0
  24. package/lib/host/commands/index.js +41 -0
  25. package/lib/host/commands/index.js.map +1 -0
  26. package/lib/host/constants.d.ts +107 -30
  27. package/lib/host/constants.d.ts.map +1 -1
  28. package/lib/host/constants.js +107 -30
  29. package/lib/host/constants.js.map +1 -1
  30. package/lib/host/controller/_trace.d.ts +3 -0
  31. package/lib/host/controller/_trace.d.ts.map +1 -0
  32. package/lib/host/controller/_trace.js +14 -0
  33. package/lib/host/controller/_trace.js.map +1 -0
  34. package/lib/host/controller/bridge-run.d.ts +4 -2
  35. package/lib/host/controller/bridge-run.d.ts.map +1 -1
  36. package/lib/host/controller/bridge-run.js +24 -8
  37. package/lib/host/controller/bridge-run.js.map +1 -1
  38. package/lib/host/controller/captures.d.ts +9 -16
  39. package/lib/host/controller/captures.d.ts.map +1 -1
  40. package/lib/host/controller/captures.js +73 -48
  41. package/lib/host/controller/captures.js.map +1 -1
  42. package/lib/host/controller/commits.d.ts +2 -2
  43. package/lib/host/controller/commits.d.ts.map +1 -1
  44. package/lib/host/controller/commits.js +97 -41
  45. package/lib/host/controller/commits.js.map +1 -1
  46. package/lib/host/controller/connections.d.ts +38 -0
  47. package/lib/host/controller/connections.d.ts.map +1 -0
  48. package/lib/host/controller/connections.js +71 -0
  49. package/lib/host/controller/connections.js.map +1 -0
  50. package/lib/host/controller/controller.d.ts +19 -24
  51. package/lib/host/controller/controller.d.ts.map +1 -1
  52. package/lib/host/controller/controller.js +181 -114
  53. package/lib/host/controller/controller.js.map +1 -1
  54. package/lib/host/controller/index.d.ts +18 -14
  55. package/lib/host/controller/index.d.ts.map +1 -1
  56. package/lib/host/controller/index.js +16 -14
  57. package/lib/host/controller/index.js.map +1 -1
  58. package/lib/host/controller/notes.d.ts +9 -9
  59. package/lib/host/controller/notes.d.ts.map +1 -1
  60. package/lib/host/controller/notes.js +16 -21
  61. package/lib/host/controller/notes.js.map +1 -1
  62. package/lib/host/controller/persist.d.ts +10 -3
  63. package/lib/host/controller/persist.d.ts.map +1 -1
  64. package/lib/host/controller/persist.js +89 -42
  65. package/lib/host/controller/persist.js.map +1 -1
  66. package/lib/host/controller/publish.d.ts +4 -0
  67. package/lib/host/controller/publish.d.ts.map +1 -0
  68. package/lib/host/controller/publish.js +56 -0
  69. package/lib/host/controller/publish.js.map +1 -0
  70. package/lib/host/controller/runs.d.ts +34 -10
  71. package/lib/host/controller/runs.d.ts.map +1 -1
  72. package/lib/host/controller/runs.js +241 -58
  73. package/lib/host/controller/runs.js.map +1 -1
  74. package/lib/host/controller/state.d.ts +122 -20
  75. package/lib/host/controller/state.d.ts.map +1 -1
  76. package/lib/host/controller/windows-run.d.ts +10 -2
  77. package/lib/host/controller/windows-run.d.ts.map +1 -1
  78. package/lib/host/controller/windows-run.js +66 -35
  79. package/lib/host/controller/windows-run.js.map +1 -1
  80. package/lib/host/discovery/candidates.d.ts +23 -13
  81. package/lib/host/discovery/candidates.d.ts.map +1 -1
  82. package/lib/host/discovery/candidates.js +20 -8
  83. package/lib/host/discovery/candidates.js.map +1 -1
  84. package/lib/host/discovery/index.d.ts +1 -0
  85. package/lib/host/discovery/index.d.ts.map +1 -1
  86. package/lib/host/discovery/index.js +1 -0
  87. package/lib/host/discovery/index.js.map +1 -1
  88. package/lib/host/discovery/probe.d.ts +16 -5
  89. package/lib/host/discovery/probe.d.ts.map +1 -1
  90. package/lib/host/discovery/probe.js +68 -10
  91. package/lib/host/discovery/probe.js.map +1 -1
  92. package/lib/host/discovery/scan.d.ts +14 -9
  93. package/lib/host/discovery/scan.d.ts.map +1 -1
  94. package/lib/host/discovery/scan.js +56 -30
  95. package/lib/host/discovery/scan.js.map +1 -1
  96. package/lib/host/flags.d.ts +28 -5
  97. package/lib/host/flags.d.ts.map +1 -1
  98. package/lib/host/flags.js +75 -7
  99. package/lib/host/flags.js.map +1 -1
  100. package/lib/host/kind.d.ts +45 -0
  101. package/lib/host/kind.d.ts.map +1 -0
  102. package/lib/host/kind.js +251 -0
  103. package/lib/host/kind.js.map +1 -0
  104. package/lib/host/manager.d.ts +21 -0
  105. package/lib/host/manager.d.ts.map +1 -0
  106. package/lib/host/manager.js +113 -0
  107. package/lib/host/manager.js.map +1 -0
  108. package/lib/host/migration.d.ts +26 -0
  109. package/lib/host/migration.d.ts.map +1 -0
  110. package/lib/host/migration.js +127 -0
  111. package/lib/host/migration.js.map +1 -0
  112. package/lib/host/plugin-meta.d.ts +12 -3
  113. package/lib/host/plugin-meta.d.ts.map +1 -1
  114. package/lib/host/plugin-meta.js +13 -4
  115. package/lib/host/plugin-meta.js.map +1 -1
  116. package/lib/host/schema.d.ts +301 -247
  117. package/lib/host/schema.d.ts.map +1 -1
  118. package/lib/host/schema.js +145 -120
  119. package/lib/host/schema.js.map +1 -1
  120. package/lib/host/settings.d.ts +22 -3
  121. package/lib/host/settings.d.ts.map +1 -1
  122. package/lib/host/settings.js +81 -60
  123. package/lib/host/settings.js.map +1 -1
  124. package/lib/host/status.d.ts +7 -10
  125. package/lib/host/status.d.ts.map +1 -1
  126. package/lib/host/status.js +8 -23
  127. package/lib/host/status.js.map +1 -1
  128. package/lib/host/tool.d.ts +13 -7
  129. package/lib/host/tool.d.ts.map +1 -1
  130. package/lib/host/tool.js +4 -3
  131. package/lib/host/tool.js.map +1 -1
  132. package/lib/host/types/config.d.ts +66 -12
  133. package/lib/host/types/config.d.ts.map +1 -1
  134. package/lib/host/types/executable.d.ts +8 -3
  135. package/lib/host/types/executable.d.ts.map +1 -1
  136. package/lib/host/types/index.d.ts +5 -4
  137. package/lib/host/types/index.d.ts.map +1 -1
  138. package/lib/host/types/services.d.ts +26 -0
  139. package/lib/host/types/services.d.ts.map +1 -0
  140. package/lib/host/types/services.js +9 -0
  141. package/lib/host/types/services.js.map +1 -0
  142. package/lib/host/types/settings.d.ts +118 -65
  143. package/lib/host/types/settings.d.ts.map +1 -1
  144. package/lib/host/types/stderr.d.ts +3 -5
  145. package/lib/host/types/stderr.d.ts.map +1 -1
  146. package/lib/host/values.d.ts +152 -37
  147. package/lib/host/values.d.ts.map +1 -1
  148. package/lib/host/values.js +304 -112
  149. package/lib/host/values.js.map +1 -1
  150. package/lib/host/windows/connect-flags.d.ts +19 -8
  151. package/lib/host/windows/connect-flags.d.ts.map +1 -1
  152. package/lib/host/windows/connect-flags.js +50 -20
  153. package/lib/host/windows/connect-flags.js.map +1 -1
  154. package/lib/host/windows/index.d.ts +1 -1
  155. package/lib/host/windows/index.d.ts.map +1 -1
  156. package/lib/host/windows/index.js +1 -1
  157. package/lib/host/windows/index.js.map +1 -1
  158. package/lib/host/windows/paths.d.ts +27 -6
  159. package/lib/host/windows/paths.d.ts.map +1 -1
  160. package/lib/host/windows/paths.js +40 -13
  161. package/lib/host/windows/paths.js.map +1 -1
  162. package/lib/host/windows/run.d.ts.map +1 -1
  163. package/lib/host/windows/run.js +3 -2
  164. package/lib/host/windows/run.js.map +1 -1
  165. package/lib/index.d.ts +72 -56
  166. package/lib/index.d.ts.map +1 -1
  167. package/lib/index.js +74 -55
  168. package/lib/index.js.map +1 -1
  169. package/locale/en.json +6 -0
  170. package/locale/zh.json +6 -0
  171. package/package.json +35 -14
  172. package/cordis.patch.yml +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/host/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAqBzC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;IAYf;;;;6CAIyC;;IAEzC;4DACwD;;;;;;;;;;;;;;;;;;;;;;;;IAPxD;;;;6CAIyC;;IAEzC;4DACwD;;GAE1D,CAAC;AA2BH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc;IACvB;8EAC0E;;IAE1E;6EACyE;;IAEzE;;;8EAG0E;;IAE1E;;;;OAIG;;IAEH;;6EAEyE;;;;;;;;IAEzE;;;;;OAKG;;IAEH;;;;OAIG;;IAEH,yEAAyE;;IAEzE,yEAAyE;;IAEzE;8CAC0C;;IAE1C;uEACmE;;IAEnE;;;gBAGY;;;;;;;;;;IAEZ;sCACkC;;IAElC;4EACwE;;IAExE;4DACwD;;IAExD;;iEAE6D;;IAE7D;;;4BAGwB;;IAExB;;wCAEoC;;IAEpC;;;;+EAI2E;;;;;;;;;;IAE3E;;+EAE2E;;;IA/E3E;8EAC0E;;IAE1E;6EACyE;;IAEzE;;;8EAG0E;;IAE1E;;;;OAIG;;IAEH;;6EAEyE;;;;;;;;IAEzE;;;;;OAKG;;IAEH;;;;OAIG;;IAEH,yEAAyE;;IAEzE,yEAAyE;;IAEzE;8CAC0C;;IAE1C;uEACmE;;IAEnE;;;gBAGY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nE;kFAC8E;;;;;;;;;;;;IAE9E,6EAA6E;;IAE7E;+CAC2C;;IAE3C;;0EAEsE;;IAEtE;;sEAEkE;;IAElE;oFACgF;;IAEhF;;;;6BAIyB;;;;;;;;;;IAEzB;;gCAE4B;;IAE5B;;;mDAG+C;;IAE/C;;iBAEa;;aAEf,CAAC;AAEH;;;;;;4DAM4D;AAC5D,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -1,14 +1,27 @@
1
1
  /**
2
- * The two zod schemas: the cordis row config and the settings section.
2
+ * The single zod `Config` of the plugin row.
3
3
  *
4
- * The row config validates what lives in the profile (one row per plugin
5
- * instance); the settings schema describes the namespace the Web GUI card
6
- * edits — the persisted user layer (flags, the executable selection, the saved
7
- * executable rows, the stderr toggle and the one action trigger) plus the
8
- * base-layer status fields served alongside it.
4
+ * Since dsh 0.2.0 the Web GUI card edits the **row configuration** through the
5
+ * profile's configuration form — there is no separate `settings.yaml` namespace
6
+ * and no base layer to publish state over. So one schema carries everything the
7
+ * card reads and writes, and every field the card touches is declared
8
+ * `.volatile()`: a volatile field is editable through the form without
9
+ * remounting the plugin, its user layer rides the profile patch instead of
10
+ * `settings.yaml`, and a live value the Host commits never reaches the patch
11
+ * (the form write strips the volatile fields out of the stored layer before
12
+ * merging).
13
+ *
14
+ * Ordinary fields (`serverName`, `command`, `package`, `chromePaths`, `env`,
15
+ * `cwd`, `toolCallTimeoutMs`, `maxInstructionBytes`, `failOnStartupError`,
16
+ * `reconnect`, `bridgeStderrLog`) are composition-only: the card reads them, it
17
+ * never edits them, and a form write naming one of them is refused by
18
+ * dsh-settings.
19
+ *
20
+ * Host-resolved fields carry the live value in the reference, so the Host
21
+ * publishes them through the live mirror (dsh-ancesters `createLiveMirror`) — never with the form.
9
22
  */
10
23
  import z from "@deepseek-ai/schemastery";
11
- import { CHROME_PATH_PATTERN, DEFAULT_EXTRA_FLAGS, EFFECTIVE_SOURCE_PATTERN, OPTIONAL_PATH_PATTERN, STDERR_MODE_FIELD_PATTERN, WINDOWS_CHROME_STATE_PATTERN, WSL_EXTRA_FLAGS } from "./constants.js";
24
+ import { CHROME_PATH_PATTERN, DEFAULT_EXTRA_FLAGS, EFFECTIVE_SOURCE_PATTERN, EXTRA_FLAG_PATTERN, OPTIONAL_PATH_PATTERN, STDERR_MODE_FIELD_PATTERN, WINDOWS_CHROME_STATE_PATTERN, WSL_EXTRA_FLAGS } from "./constants.js";
12
25
  import { defaultChromePaths } from "./discovery/index.js";
13
26
  /** Reconnect policy passthrough; mirrors dsh-mcp-client's schema. */
14
27
  const Reconnect = z.object({
@@ -17,16 +30,58 @@ const Reconnect = z.object({
17
30
  maxDelayMs: z.number().min(1).max(600000).default(30000),
18
31
  maxAttempts: z.number().step(1).min(1).max(Number.MAX_SAFE_INTEGER).default(10)
19
32
  });
33
+ /**
34
+ * One saved-executable catalog row: `id` is the path that goes on the wire
35
+ * (`--executablePath=<id>`), `name` the label the user chose for the UI
36
+ * ("" = render the path). User layer.
37
+ */
38
+ const ExecutableEntry = z.object({
39
+ id: z.string().default("").pattern(CHROME_PATH_PATTERN),
40
+ name: z.string().default("")
41
+ });
42
+ /** What one saved row's probe answered with, keyed by its id (`path`): the
43
+ * `--version` line, the failure that makes it not runnable, and the note that
44
+ * explains an executable this host offers without probing (`note` is never a
45
+ * failure — the one case is a Windows executable under WSL, driven by the
46
+ * **Prelaunch Windows Chrome** run). */
47
+ const ExecutableStatus = z.object({
48
+ path: z.string().default("").pattern(CHROME_PATH_PATTERN),
49
+ version: z.string().default(""),
50
+ error: z.string().default(""),
51
+ note: z.string().default("")
52
+ });
53
+ /** The served Windows-Chrome state: what the **Prelaunch Windows Chrome** run is
54
+ * doing, the debugging port it settled on (0 = none) and the failure line. */
55
+ const WindowsChromeStatus = z.object({
56
+ state: z.string().pattern(WINDOWS_CHROME_STATE_PATTERN).default("off"),
57
+ port: z.number().default(0),
58
+ error: z.string().default("")
59
+ });
60
+ /**
61
+ * The plugin row's configuration, and the configuration form the Web GUI card
62
+ * edits. Every `.volatile()` field below is live: a user edit lands in the
63
+ * profile patch and commits without a remount, and the Host's own live answers
64
+ * ride the same references without ever being persisted.
65
+ */
20
66
  export const Config = z.object({
21
67
  serverName: z.string().pattern(/^[A-Za-z0-9_-]{1,32}$/).default("chrome"),
22
68
  command: z.string().default("npx"),
23
69
  package: z.string().min(1).default("chrome-devtools-mcp@latest"),
24
- extraFlags: z.array(String).default(DEFAULT_EXTRA_FLAGS),
25
- chromePath: z.string().default(""),
70
+ /** Flags appended after `npx -y <package>`; the card's last UI edit. The
71
+ * field's own pattern is what refuses them (an entry that carries a control
72
+ * character never resolves, so a write is refused Host-side rather than
73
+ * landing in argv); an executable-pinning flag is rejected by the Host fold
74
+ * because the executable is picked below. */
75
+ extraFlags: z.array(z.string().pattern(EXTRA_FLAG_PATTERN)).default(DEFAULT_EXTRA_FLAGS).volatile(),
26
76
  chromePaths: z.array(String).default(defaultChromePaths()),
27
77
  env: z.dict(String).default({}),
28
78
  cwd: z.string().default(""),
29
79
  toolCallTimeoutMs: z.number().default(60000),
80
+ /** Ceiling for the bridge's server instructions (UTF-8 bytes, attribution
81
+ * included); an oversized description rejects the connection. Mirrors
82
+ * `dsh-mcp-client`'s own field and default (32768) — a passthrough for a
83
+ * server whose instructions run longer than the cap. */
84
+ maxInstructionBytes: z.number().step(1).min(1).default(32768),
30
85
  failOnStartupError: z.boolean().default(false),
31
86
  reconnect: Reconnect,
32
87
  /** Bridge console-output routing: "log" (default) redirects the spawned
@@ -37,135 +92,105 @@ export const Config = z.object({
37
92
  bridgeStderr: z.union([z.const("log"), z.const("console")]).default("log"),
38
93
  /** Log path override for "log" mode; "" = auto (see
39
94
  * {@link bridgeStderrLogPath}). Absolute paths only. */
40
- bridgeStderrLog: z.string().default("").pattern(OPTIONAL_PATH_PATTERN)
41
- });
42
- /** One saved-executable catalog row: `id` is the path that goes on the wire
43
- * (`--executablePath=<id>`), `name` the label the user chose for the UI
44
- * ("" = render the path). Persisted. */
45
- const ExecutableEntrySchema = z.object({
46
- id: z.string().default("").pattern(CHROME_PATH_PATTERN),
47
- name: z.string().default("")
48
- });
49
- /** What one saved row's probe answered with, keyed by its id (`path`): the
50
- * `--version` line, and the failure that makes it not runnable. Base layer. */
51
- const ExecutableStatusSchema = z.object({
52
- path: z.string().default("").pattern(CHROME_PATH_PATTERN),
53
- version: z.string().default(""),
54
- error: z.string().default("")
55
- });
56
- /** The served Windows-Chrome state: what the **Prelaunch Windows Chrome** run is
57
- * doing, the debugging port it settled on (0 = none) and the failure line.
58
- * Base layer. */
59
- const WindowsChromeStatusSchema = z.object({
60
- state: z.string().pattern(WINDOWS_CHROME_STATE_PATTERN).default("off"),
61
- port: z.number().default(0),
62
- error: z.string().default("")
63
- });
64
- /**
65
- * User-settings section served to the Web GUI card.
66
- *
67
- * Persisted (user layer in `$DSH_HOME/settings.yaml`): `extraFlags`,
68
- * `chromePath` (the executable the picker selected — or that the host seeded
69
- * once), `executables` (the saved-executables rows: `id` = path, `name` = UI
70
- * label), `refreshExecutablesNonce` (the card's **Search executables**
71
- * trigger), `openWindowsChromeNonce` (the card's **Prelaunch Windows Chrome**
72
- * trigger), `chromeCustomPaths` (the **legacy** hand-typed MRU: folded into the
73
- * rows once by the first scan, never written again) and `stderrMode` (the
74
- * "Reduce log output" toggle: "log" captures the bridge's stderr into a
75
- * per-spawn log file, "console" echoes it, "" follows the row-config
76
- * `bridgeStderr`).
77
- * Served but never persisted (composition base layer held in memory by the
78
- * host): `lastError`, `executableDiscoveryRevision`, `chromeVersion`,
79
- * `executableStatus`, `chromeMissing`, `effectiveChromePath`,
80
- * `effectiveSource`, `wslWindowsExecutable`, `windowsChromeStatus`,
81
- * `carriesConnectionMode`, the static `rowStderr` mirror, the static
82
- * `defaultExtraFlags` mirror (the canonical defaults list the card's
83
- * **Restore defaults** control appends) and the static `wslExtraFlags` mirror
84
- * (the recommended WSL ↔ Windows flags the card's **Flags WSL** control
85
- * appends) — the client's polls stop when the served revision advances past its
86
- * action-time value.
87
- */
88
- export const SettingsSchema = z.object({
89
- /** Flags appended after `npx -y <package>`; persisted last UI edit. An
90
- * executable-pinning flag is rejected: the executable is picked below. */
91
- extraFlags: z.array(String).default(DEFAULT_EXTRA_FLAGS),
92
- /** Written by the UI **Search executables** button; the host reacts to it by
93
- * re-probing the saved rows and merging what it finds back into them. */
94
- refreshExecutablesNonce: z.number().default(0),
95
- /** Written by the UI **Prelaunch Windows Chrome** button; the host reacts to it
96
- * by running the Windows launch: locate the Windows Chrome, prove the
97
- * mirrored-loopback prereq, launch it with a debugging port, and write the
98
- * `--browserUrl` connect entry that leaves the bridge in connect mode. */
99
- openWindowsChromeNonce: z.number().default(0),
95
+ bridgeStderrLog: z.string().default("").pattern(OPTIONAL_PATH_PATTERN),
96
+ // ---- user-authored, form-editable -------------------------------------
100
97
  /**
101
98
  * The executable the bridge launches with: picked in the picker (a saved
102
- * row's `id`) or seeded once by the host's first scan. "" = nothing resolved
103
- * yet — there is no auto state to fall back to.
99
+ * row's `id`) or seeded once by the Host's first scan. "" = nothing
100
+ * resolved yet — there is no auto state to fall back to.
104
101
  */
105
- chromePath: z.string().default("").pattern(CHROME_PATH_PATTERN),
102
+ chromePath: z.string().default("").pattern(CHROME_PATH_PATTERN).volatile(),
106
103
  /** The picker's saved rows — `{ id: path, name: label }`, user-authored. The
107
- * host re-normalizes (trim, dedupe, caps) on every read, and a scan merges
104
+ * Host re-normalizes (trim, dedupe, caps) on every read, and a scan merges
108
105
  * what it discovers into them without dropping a name the user chose. */
109
- executables: z.array(ExecutableEntrySchema).default([]),
106
+ executables: z.array(ExecutableEntry).default([]).volatile(),
107
+ /** The ids of saved rows the user dropped. Every run folds what it found
108
+ * back into the rows, and the found list keeps answering a path the user
109
+ * just deleted, so without this record a dropped row stood back up on the
110
+ * very run the deletion queued (measured live 2026-10-12: the (x86)
111
+ * Windows-executable row read as a delete that never landed). Merge steps
112
+ * skip every id standing here; a list write carrying the id again clears
113
+ * it. Host-authored: the card never edits this field. */
114
+ droppedExecutables: z.array(z.string().default("").pattern(CHROME_PATH_PATTERN)).default([]).volatile(),
110
115
  /**
111
116
  * **Legacy** MRU of hand-typed executables, newest first. The saved rows
112
- * replace it: a host whose settings still carry it folds its paths into the
113
- * rows during the first scan (see ./catalog.ts `mergeEntries`), so the field
114
- * is read once and never written again.
117
+ * replace it: a Host whose profile still carries it folds its paths into
118
+ * the rows during the first scan (see ./catalog.ts `mergeEntries`), so the
119
+ * field is read once and never written again.
115
120
  */
116
- chromeCustomPaths: z.array(z.string().default("").pattern(CHROME_PATH_PATTERN)).default([]),
121
+ chromeCustomPaths: z.array(z.string().default("").pattern(CHROME_PATH_PATTERN)).default([]).volatile(),
117
122
  /**
118
- * Persisted UI "Reduce log output" toggle: "log" captures the bridge's
123
+ * The card's "Reduce log output" toggle: "log" captures the bridge's
119
124
  * stderr into the log file, "console" echoes it (debug). "" follows the
120
- * row-config `bridgeStderr` (mirrored into `rowStderr`).
125
+ * row-config `bridgeStderr`.
126
+ */
127
+ stderrMode: z.string().default("").pattern(STDERR_MODE_FIELD_PATTERN).volatile(),
128
+ /** The mode the bridge actually routes console output through — the UI
129
+ * toggle when it states one, else the row config. Mirrored live so the
130
+ * toggle never reads a phantom state (see `resolveStderrMode`). */
131
+ stderrEffective: z.union([z.const("log"), z.const("console")]).default("log").volatile(),
132
+ /** Written by the card's **Fetch executables** button; the Host reacts by
133
+ * re-probing the saved rows and merging what it finds back into them. */
134
+ refreshExecutablesNonce: z.number().default(0).volatile(),
135
+ /** Written by the card's **Prelaunch Windows Chrome** button; the Host
136
+ * reacts by running the Windows launch: locate the Windows Chrome, prove
137
+ * the mirrored-loopback prereq, launch it with a debugging port, and write
138
+ * the `--browserUrl` connect entry that leaves the bridge in connect mode. */
139
+ openWindowsChromeNonce: z.number().default(0).volatile(),
140
+ /**
141
+ * Whether the translation of this row's **standalone** configuration was
142
+ * offered and turned down. Host-authored:
143
+ * the card never edits it — only the proposal's dismiss action does.
121
144
  */
122
- stderrMode: z.string().default("").pattern(STDERR_MODE_FIELD_PATTERN),
145
+ migrationDismissed: z.boolean().default(false).volatile(),
146
+ // ---- Host-published live state ----------------------------------------
123
147
  /** Last check/connection failure, human-readable; empty when healthy. */
124
- lastError: z.string().default(""),
148
+ lastError: z.string().default("").volatile(),
125
149
  /** Known error: the last failure was "no Chrome executable detected". */
126
- chromeMissing: z.boolean().default(false),
150
+ chromeMissing: z.boolean().default(false).volatile(),
127
151
  /** Executable-run counter (success or failure); completion signal for every
128
152
  * executable action the card can take. */
129
- executableDiscoveryRevision: z.number().default(0),
153
+ executableDiscoveryRevision: z.number().default(0).volatile(),
130
154
  /** The version the **selected** executable answered with; "" when nothing
131
155
  * answered — nothing picked, a connect mode, or a blocked path. */
132
- chromeVersion: z.string().default(""),
156
+ chromeVersion: z.string().default("").volatile(),
133
157
  /** Per-row probe status keyed by path: the version the row answered with,
134
- * and the failure for a row that is present but not runnable (or blocked).
135
- * Base layer, never persisted — the rows themselves live in the user
136
- * layer. */
137
- executableStatus: z.array(ExecutableStatusSchema).default([]),
138
- /** The path the bridge actually launches with ("" when nothing is fixed).
139
- * Base layer, never persisted. */
140
- effectiveChromePath: z.string().default("").pattern(CHROME_PATH_PATTERN),
158
+ * and the failure for a row that is present but not runnable (or blocked). */
159
+ executableStatus: z.array(ExecutableStatus).default([]).volatile(),
160
+ /** The path the bridge actually launches with ("" when nothing is fixed). */
161
+ effectiveChromePath: z.string().default("").pattern(CHROME_PATH_PATTERN).volatile(),
141
162
  /** Where `effectiveChromePath` came from — picked (`"selected"`), row config
142
- * (`"row-config"`) or nothing yet (""). Base layer, never persisted. */
143
- effectiveSource: z.string().default("").pattern(EFFECTIVE_SOURCE_PATTERN),
144
- /** Row-config `bridgeStderr` in effect (static base layer; never
145
- * persisted) — the fallback when `stderrMode` is "". */
146
- rowStderr: z.union([z.const("log"), z.const("console")]).default("log"),
147
- /** The canonical default extra-flags list (static base layer; never
148
- * persisted) — the list the card's **Restore defaults** control appends to
149
- * what the editor holds. Mirror of `DEFAULT_EXTRA_FLAGS`. */
150
- defaultExtraFlags: z.array(String).default(DEFAULT_EXTRA_FLAGS),
151
- /** The recommended WSL ↔ Windows extra-flags list (static base layer;
152
- * never persisted) — the list the card's **Flags WSL** control appends to
153
- * what the editor holds, missing entries only. Mirror of
154
- * `WSL_EXTRA_FLAGS`. */
155
- wslExtraFlags: z.array(String).default(WSL_EXTRA_FLAGS),
156
- /** True while this host runs under WSL and the selected executable is a
157
- * Windows binary — the state the card's notice explains. Base layer, never
158
- * persisted (see ./platform.ts). */
159
- wslWindowsExecutable: z.boolean().default(false),
160
- /** What the **Prelaunch Windows Chrome** run is doing (base layer; never
161
- * persisted) — the single field the card derives the button's state, its
162
- * disabled reason and the pill's connect-mode muting from. The locate,
163
- * prereq, launch and port answers all live host-side (./windows/), so
164
- * the card never carries a list of Windows paths or reachability rules. */
165
- windowsChromeStatus: WindowsChromeStatusSchema.default({ state: "off", port: 0, error: "" }),
166
- /** True while the bridge launches with a connect-mode flag
167
- * (`--browserUrl` / `--wsEndpoint`): no local executable is then launched
168
- * or probed, so the card mutes the picker. Base layer, never persisted. */
169
- carriesConnectionMode: z.boolean().default(false)
163
+ * (`"row-config"`) or nothing yet (""). */
164
+ effectiveSource: z.string().default("").pattern(EFFECTIVE_SOURCE_PATTERN).volatile(),
165
+ /** The canonical default extra-flags list — the list the card's **Restore
166
+ * defaults** control appends to what the editor holds. Mirror of
167
+ * `DEFAULT_EXTRA_FLAGS`, served so the card carries no copy of it. */
168
+ defaultExtraFlags: z.array(String).default(DEFAULT_EXTRA_FLAGS).volatile(),
169
+ /** The recommended WSL ↔ Windows extra-flags list — the list the card's
170
+ * **Flags WSL** control appends, missing entries only. Mirror of
171
+ * `WSL_EXTRA_FLAGS`, served so the card carries no copy of it. */
172
+ wslExtraFlags: z.array(String).default(WSL_EXTRA_FLAGS).volatile(),
173
+ /** True while this Host runs under WSL and the selected executable is a
174
+ * Windows binary — the state the card's notice explains (see ./platform.ts). */
175
+ wslWindowsExecutable: z.boolean().default(false).volatile(),
176
+ /** What the **Prelaunch Windows Chrome** run is doing — the single field
177
+ * the card derives the button's state, its disabled reason and the pill's
178
+ * connect-mode muting from. Every half (locate, prereq, launch, port) lives
179
+ * Host-side (./windows/), so the card carries no list of Windows paths or
180
+ * reachability rules. */
181
+ windowsChromeStatus: WindowsChromeStatus.default({ state: "off", port: 0, error: "" }).volatile(),
182
+ /** True while the bridge launches with a connect-mode flag (`--browserUrl`
183
+ * / `--wsEndpoint`): no local executable is then launched or probed, so the
184
+ * card mutes the picker. */
185
+ carriesConnectionMode: z.boolean().default(false).volatile(),
186
+ /** The flags a live connection of this component's own kinds actually
187
+ * launches with — mirrored from the last `resolve`, not from any layer, so
188
+ * the machine page states what is running rather than what was last
189
+ * configured. Empty while nothing resolves. */
190
+ runningFlags: z.array(String).default([]).volatile(),
191
+ /** The note the last live connection answered with — where its console
192
+ * output goes, or the Windows URL it connected to. "" when the answer was
193
+ * silent. */
194
+ runningNote: z.string().default("").volatile()
170
195
  });
171
196
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/host/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAEzC,OAAO,EACH,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,4BAA4B,EAC5B,eAAe,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qEAAqE;AACrE,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CA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AE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;IAC5D;;;mDAG+C;IAC/C,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD;;iBAEa;IACb,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC"}
@@ -1,9 +1,28 @@
1
1
  import type { ChromeMcpController } from "./controller/index.js";
2
2
  import type { PluginContext } from "./types/index.js";
3
3
  /**
4
- * Install the settings namespace and wire its hooks into the controller.
4
+ * The profile entry id this instance is keyed by, read off its own loader entry.
5
+ * Throws when the plugin was not started as a profile entry: the id is the key
6
+ * every read and write goes through, so inventing one would alias (or silently
7
+ * address nothing) instead of failing loud.
5
8
  * @param ctx - plugin context.
6
- * @param controller - the live state created by `apply`.
7
9
  */
8
- export declare function installChromeMcpSection(ctx: PluginContext, controller: ChromeMcpController): void;
10
+ export declare function chromeMcpEntryId(ctx: PluginContext): string;
11
+ /**
12
+ * Attach the row's configuration form to one controller: resolve the entry id,
13
+ * keep the auto page off, and route the commits the form produces.
14
+ *
15
+ * Registration rides one fiber effect for the same reason `tool.ts` registers
16
+ * lazily: the disposer has to leave with the instance, and an HMR reload must not
17
+ * leave a prior instance still configuring (the second `configure` for one fiber
18
+ * throws). A host that is not a profile entry gets a loud error and no form; its
19
+ * row config keeps driving the bridge exactly as a row-only config always did.
20
+ * @param ctx - plugin context.
21
+ * @param controller - the live state the form drives.
22
+ */
23
+ export declare function installChromeMcpForm(ctx: PluginContext, controller: ChromeMcpController): void;
24
+ /** Every live-only key a Host write-back clears from the stored row (exported
25
+ * here for the tests and for the write paths that carry the `unset` ops — the
26
+ * same shape the reference's `settings.ts` keeps). */
27
+ export declare const LIVE_MIRROR_KEYS: readonly string[];
9
28
  //# sourceMappingURL=settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/host/settings.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAqC,MAAM,kBAAkB,CAAC;AAEzF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAuCjG"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/host/settings.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAoBrE;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAU3D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,mBAAmB,GAAG,IAAI,CAiB9F;AAED;;sDAEsD;AACtD,eAAO,MAAM,gBAAgB,mBAAmB,CAAC"}
@@ -1,70 +1,91 @@
1
1
  /**
2
- * Host half — the `chrome-mcp` settings section.
2
+ * Host half — the configuration form.
3
3
  *
4
- * Installs the namespace the Web GUI card edits and routes every commit into
5
- * the controller. Two contract details decide the shape of this module:
4
+ * Since dsh 0.2.0 the card edits the **row configuration** through the profile's
5
+ * configuration form: one `Config` (./schema.ts), keyed by the row's profile
6
+ * entry id. So this module no longer installs a namespace — it attaches the row
7
+ * to the form and routes what the form answers into the controller. Three things
8
+ * it owns:
6
9
  *
7
- * - `installSection` runs `hooks.onChange()` synchronously at registration,
8
- * which is how a persisted `extraFlags` selection lands on the FIRST
9
- * connection when the settings service is already up (the cold path is
10
- * `readPersistedFlags` in ./values.ts).
11
- * - The `validate` hook is the UI write gate: an invalid flags list throws
12
- * inside `installSection` (surfaced on the card), it never reaches the
13
- * running bridge. The executable fields are gated the same way — a path
14
- * carrying control characters can never become a selection nor a saved-row
15
- * id — and `--executablePath` in the flags list is rejected outright,
16
- * because the picker owns that one flag (see ./flags.ts).
10
+ * - **Identity.** Everything reads and writes by the profile **entry id** read
11
+ * off this fiber's own loader entry (`chromeMcpEntryId`). It is not a namespace
12
+ * and never derived from `serverName`: two instances would collide on the same
13
+ * row, so an instance that is not a profile entry says so loudly rather than
14
+ * inventing a key of its own.
15
+ * - **The auto page stays off.** `settings.configure({ auto: false }, fiber)`
16
+ * keeps the Host from standing up a generated page while the card owns the
17
+ * row's page — and it is a *disposable* call that throws the second time for
18
+ * one fiber, so it rides one fiber effect and disposes with it (verified live,
19
+ * .probe/MIGRATION-CONTRACT.md §2e: `auto` only decides the generated page, and
20
+ * the entry stays fully described either way).
21
+ * - **Commit routing.** A form commit lands as a volatile commit on this fiber,
22
+ * which the loader reports as `loader/volatile-update` carrying the paths it
23
+ * touched. Only the *user-authored* paths mean anything to the running bridge,
24
+ * so those are what route — and that same filter is what keeps a live publish
25
+ * (which only ever commits live fields) from re-entering the router.
17
26
  */
18
- import { CHROME_PATH_PATTERN, CUSTOM_PATHS_CAP, SETTINGS_NAMESPACE } from "./constants.js";
19
- import { isValidEntryId } from "./catalog.js";
20
- import { SettingsSchema } from "./schema.js";
21
- import { validateExtraFlags } from "./flags.js";
22
- import { normalizeCustomPaths } from "./values.js";
27
+ import { attachSettingsForm } from "@comecaramelos/dsh-ancesters/host";
28
+ import { ENTRY_ID } from "./constants.js";
29
+ import { liveMirrorKeys } from "./values.js";
30
+ /** The fields the card edits. A commit that touches nothing here changes nothing
31
+ * the running bridge does, which is what keeps a live publish out of the router. */
32
+ const USER_FIELDS = new Set([
33
+ "extraFlags",
34
+ "chromePath",
35
+ "executables",
36
+ "chromeCustomPaths",
37
+ "stderrMode",
38
+ "refreshExecutablesNonce",
39
+ "openWindowsChromeNonce"
40
+ ]);
23
41
  /**
24
- * Install the settings namespace and wire its hooks into the controller.
42
+ * The profile entry id this instance is keyed by, read off its own loader entry.
43
+ * Throws when the plugin was not started as a profile entry: the id is the key
44
+ * every read and write goes through, so inventing one would alias (or silently
45
+ * address nothing) instead of failing loud.
25
46
  * @param ctx - plugin context.
26
- * @param controller - the live state created by `apply`.
27
47
  */
28
- export function installChromeMcpSection(ctx, controller) {
29
- ctx.inject(["settings"], (inner) => {
30
- const settings = inner.settings;
31
- if (!settings)
32
- return;
33
- settings.installSection(inner, SETTINGS_NAMESPACE, SettingsSchema, controller.entry, {
34
- setSource: (next) => {
35
- controller.setSource(next);
36
- },
37
- validate: (value) => {
38
- try {
39
- validateExtraFlags(value.extraFlags);
40
- }
41
- catch (error) {
42
- const msg = error instanceof Error ? String(error.message ?? error) : String(error);
43
- throw new Error(`settings "${SETTINGS_NAMESPACE}": ${msg}`);
44
- }
45
- if (value.stderrMode !== "" && value.stderrMode !== "log" && value.stderrMode !== "console") {
46
- throw new Error(`settings "${SETTINGS_NAMESPACE}": stderrMode must be "log", "console" or empty (row-config default)`);
47
- }
48
- for (const path of [value.chromePath, ...normalizeCustomPaths(value.chromeCustomPaths, CUSTOM_PATHS_CAP)]) {
49
- if (typeof path !== "string" || path === "" || CHROME_PATH_PATTERN.test(path))
50
- continue;
51
- throw new Error(`settings "${SETTINGS_NAMESPACE}": chromePath "${path}" must be a path without control characters`);
52
- }
53
- // The saved rows go on the wire the same way the selection does,
54
- // so the gate that rejects a control-character path rejects a
55
- // control-character row id — a bad row never reaches a scan, and
56
- // never reaches argv as `--executablePath=<id>`.
57
- for (const row of Array.isArray(value.executables) ? value.executables : []) {
58
- const id = row === null || typeof row !== "object" ? "" : row.id;
59
- if (isValidEntryId(id))
60
- continue;
61
- throw new Error(`settings "${SETTINGS_NAMESPACE}": executable row "${String(id ?? "")}" must carry a path without control characters`);
62
- }
63
- },
64
- onChange: () => {
65
- controller.onSettingsChange();
66
- }
67
- });
48
+ export function chromeMcpEntryId(ctx) {
49
+ const fiber = ctx.fiber;
50
+ const id = fiber?.entry?.options?.id;
51
+ if (typeof id !== "string" || id === "") {
52
+ throw new Error(`dsh-chrome-mcp: this instance is not a profile entry, so the configuration form has no entry id to address it by ` +
53
+ `(the bundle patch inserts \`id: "${ENTRY_ID}"\` — a bare ctx.plugin() mount has no form)`);
54
+ }
55
+ return id;
56
+ }
57
+ /**
58
+ * Attach the row's configuration form to one controller: resolve the entry id,
59
+ * keep the auto page off, and route the commits the form produces.
60
+ *
61
+ * Registration rides one fiber effect for the same reason `tool.ts` registers
62
+ * lazily: the disposer has to leave with the instance, and an HMR reload must not
63
+ * leave a prior instance still configuring (the second `configure` for one fiber
64
+ * throws). A host that is not a profile entry gets a loud error and no form; its
65
+ * row config keeps driving the bridge exactly as a row-only config always did.
66
+ * @param ctx - plugin context.
67
+ * @param controller - the live state the form drives.
68
+ */
69
+ export function installChromeMcpForm(ctx, controller) {
70
+ // The mechanics — the entry id read off this fiber (loud when it is not a
71
+ // profile entry), the generated page kept off once per fiber and disposed
72
+ // with it, and the commit filter on `loader/volatile-update` — are
73
+ // ancestros' `attachSettingsForm`. A commit naming a **user** field routes
74
+ // (flags, the executable, the saved rows, the toggle, the two triggers); a
75
+ // commit naming only **live** fields routes nothing. The mirror's own
76
+ // re-assert after a reset is the live mirror's business (./controller/
77
+ // publish.ts), not this router's.
78
+ attachSettingsForm(ctx, {
79
+ name: `dsh-chrome-mcp(${controller.config.serverName})`,
80
+ userFields: [...USER_FIELDS],
81
+ liveKeys: liveMirrorKeys(),
82
+ onAttach: (form) => controller.attachForm(form),
83
+ onDetach: () => controller.detachForm(),
84
+ onCommit: () => controller.onFormCommit()
68
85
  });
69
86
  }
87
+ /** Every live-only key a Host write-back clears from the stored row (exported
88
+ * here for the tests and for the write paths that carry the `unset` ops — the
89
+ * same shape the reference's `settings.ts` keeps). */
90
+ export const LIVE_MIRROR_KEYS = liveMirrorKeys();
70
91
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,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AgC,CAAC;QAC3E,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE;QACvC,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE;KAC5C,CAAC,CAAC;AACP,CAAC;AAED;;sDAEsD;AACtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,EAAE,CAAC"}
@@ -1,4 +1,3 @@
1
- import type { ToolCallResult } from "./types/index.js";
2
1
  /** First non-empty line of a text block, capped. */
3
2
  export declare function firstLine(text: unknown, cap?: number): string;
4
3
  /**
@@ -15,14 +14,12 @@ export declare function firstLine(text: unknown, cap?: number): string;
15
14
  */
16
15
  export declare function isChromeMissing(text: unknown): boolean;
17
16
  /**
18
- * Summarize one chrome-tool call result for the card's status line. Failed
19
- * calls return "<tool> failed: <first text line>" — tool-level errors
20
- * (browser unreachable, "Target closed", …) are returned to the calling
21
- * agent and never route through the bridge logger, so this is the only
22
- * capture point. Successes return null: the caller clears the stored error.
23
- * @param toolName - fully qualified registered name (`mcp__<server>__<tool>`).
24
- * @param result - settled tools-service execution result.
25
- * @returns the note, or null when the call did not fail.
17
+ * Summarize one chrome-tool call result for the card's status line — the rule
18
+ * is ancestros' (`host/status.toolResultNote`): failed calls answer
19
+ * "<tool> failed: <first text line>", successes `null` (the caller clears the
20
+ * stored error). Tool-level errors (browser unreachable, "Target closed", …)
21
+ * are returned to the calling agent and never reach a bridge line, so the
22
+ * tool-call capture is the only place they surface.
26
23
  */
27
- export declare function toolResultNote(toolName: string, result: ToolCallResult | null | undefined): string | null;
24
+ export { toolResultNote } from "@comecaramelos/dsh-ancesters/host";
28
25
  //# sourceMappingURL=status.d.ts.map