@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":"notes.d.ts","sourceRoot":"","sources":["../../../src/host/controller/notes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAc1D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAclF"}
1
+ {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../../src/host/controller/notes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAM5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAe1D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAUlF"}
@@ -1,49 +1,44 @@
1
1
  import { flagsSkipCheck } from "../flags.js";
2
2
  import { isWindowsExecutablePath } from "../platform.js";
3
+ import { publishLive } from "./publish.js";
3
4
  /**
4
- * Publish the resolved selection into the base layer — with the one state the
5
- * client can only learn from here, and with the static notice that goes with it.
6
- * The Windows-executable state is keyed on the *selection*, not on any probe: a
5
+ * Publish the resolved selection into the mirror — with the one state the card
6
+ * can only learn from here, and with the static notice that goes with it. The
7
+ * Windows-executable state is keyed on the *selection*, not on any probe: a
7
8
  * Windows binary answers `--version` just fine across the interop boundary, so a
8
9
  * healthy-looking pill is exactly what a broken Windows selection looks like
9
10
  * until the first tool call fails.
10
11
  */
11
12
  export function noteSelection(controller) {
12
13
  const { state } = controller;
13
- state.entry.effectiveChromePath = state.runningChromePath;
14
- state.entry.effectiveSource = state.runningChromeSource;
14
+ state.live.effectiveChromePath = state.runningChromePath;
15
+ state.live.effectiveSource = state.runningChromeSource;
15
16
  const windowsUnderWsl = !flagsSkipCheck(state.runningFlags) && controller.wslHost && isWindowsExecutablePath(state.runningChromePath);
16
- state.entry.wslWindowsExecutable = windowsUnderWsl;
17
- // The card has the full recipe; the log only needs the pointer, since a
18
- // headless host never sees the notice.
17
+ state.live.wslWindowsExecutable = windowsUnderWsl;
18
+ // The log's pointer is the run, named: a headless host sees no notice, and
19
+ // "connect mode" on its own is not an action.
19
20
  if (windowsUnderWsl && !state.wslNoticeShown) {
20
21
  state.wslNoticeShown = true;
21
- controller.ctx.logger.warn(`chrome-devtools-mcp(${controller.config.serverName}): running under WSL with a Windows executable selected ("${state.runningChromePath}") — that binary cannot be launched from here; drive the Windows browser in connect mode instead (see the card's Windows executable notice)`);
22
+ controller.ctx.logger.warn(`dsh-chrome-mcp(${controller.config.serverName}): running under WSL with a Windows executable selected ("${state.runningChromePath}") — that binary cannot be launched from here; run Prelaunch Windows Chrome (the card's action, or the prelaunch_windows_chrome tool) to drive it in connect mode`);
22
23
  }
24
+ publishLive(controller);
23
25
  }
24
26
  /**
25
27
  * Announce where the bridge's console output goes — one line per change of
26
28
  * state, keyed on what actually happened, so neither the "log" capture nor
27
- * a switch to console echo is silent. An unavailable redirect (no POSIX shell)
28
- * warns with the reason so the fallback is not mysterious.
29
+ * a switch to console echo is silent.
29
30
  */
30
31
  export function noteStderr(controller, built) {
31
32
  const { state } = controller;
32
- const key = built.redirect !== "" ? `file:${built.redirect}` : built.fallback !== "" ? `fallback:${built.fallback}` : "console";
33
+ const key = built.redirect !== "" ? `file:${built.redirect}` : "console";
33
34
  if (state.stderrNotice === key)
34
35
  return;
35
36
  state.stderrNotice = key;
36
- if (built.fallback === "platform") {
37
- controller.ctx.logger.warn(`chrome-devtools-mcp(${controller.config.serverName}): bridgeStderr="log" is unavailable on this platform (no POSIX shell wrapper) — bridge logs keep going to the console`);
38
- }
39
- else if (built.fallback === "shell") {
40
- controller.ctx.logger.warn(`chrome-devtools-mcp(${controller.config.serverName}): bridgeStderr="log" is unavailable (no /bin/sh was found) — bridge logs keep going to the console`);
41
- }
42
- else if (built.redirect !== "") {
43
- controller.ctx.logger.info(`chrome-devtools-mcp(${controller.config.serverName}): bridge stderr → ${built.redirect}`);
37
+ if (built.redirect !== "") {
38
+ controller.ctx.logger.info(`dsh-chrome-mcp(${controller.config.serverName}): bridge stderr → ${built.redirect}`);
44
39
  }
45
40
  else {
46
- controller.ctx.logger.info(`chrome-devtools-mcp(${controller.config.serverName}): bridge stderr → console (echo)`);
41
+ controller.ctx.logger.info(`dsh-chrome-mcp(${controller.config.serverName}): bridge stderr → console (echo)`);
47
42
  }
48
43
  }
49
44
  //# sourceMappingURL=notes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../../src/host/controller/notes.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAIzD;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,UAAsB;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;IAC7B,KAAK,CAAC,KAAK,CAAC,mBAAmB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC1D,K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C,cAAc,EAAE,CAAC;QAC3C,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;QAC5B,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CACtB,kBAAkB,UAAU,CAAC,MAAM,CAAC,UAAU,6DAA6D,KAAK,CAAC,iBAAiB,mKAAmK,CACxS,CAAC;IACN,CAAC;IACD,WAAW,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,UAAsB,EAAE,KAAyB;IACxE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;IAC7B,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACzE,IAAI,KAAK,CAAC,YAAY,KAAK,GAAG;QAAE,OAAO;IACvC,KAAK,CAAC,YAAY,GAAG,GAAG,CAAC;IACzB,IAAI,KAAK,CAAC,QAAQ,KAAK,EAAE,EAAE,CAAC;QACxB,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,UAAU,CAAC,MAAM,CAAC,UAAU,sBAAsB,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrH,CAAC;SAAM,CAAC;QACJ,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,UAAU,CAAC,MAAM,CAAC,UAAU,mCAAmC,CAAC,CAAC;IAClH,CAAC;AACL,CAAC"}
@@ -1,9 +1,16 @@
1
1
  import type { ChromeExecutableEntry } from "../types/index.js";
2
2
  import type { Controller } from "./state.js";
3
- /** Persist one seeded/executable write through the settings service. */
3
+ /** Persist one seeded/executable selection — the row-config fallback disappears
4
+ * the moment a path is picked, so a run that seeded one writes it exactly once. */
4
5
  export declare function persistChromePath(controller: Controller, path: string): Promise<void>;
5
6
  /** Persist the saved-executables rows a run merged into. */
6
7
  export declare function persistExecutables(controller: Controller, entries: ChromeExecutableEntry[]): Promise<void>;
7
- /** Persist the saved flags list a Windows connect run composed. */
8
- export declare function persistExtraFlags(controller: Controller, flags: string[]): Promise<void>;
8
+ /** Persist the ids of rows the user dropped, so no later merge step folds them
9
+ * back in (see ../schema.ts `droppedExecutables`). */
10
+ export declare function persistDroppedExecutables(controller: Controller, ids: readonly string[]): Promise<void>;
11
+ /** Remember that this row's standalone-config translation was turned down
12
+ * (./../migration.ts D4). This is the only Host write the proposal path makes:
13
+ * the config itself is read, never rewritten, and nothing lands in the manager's
14
+ * `servers` without a click. */
15
+ export declare function dismissMigration(controller: Controller): void;
9
16
  //# sourceMappingURL=persist.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/host/controller/persist.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAO7C,wEAAwE;AACxE,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ3F;AAED,4DAA4D;AAC5D,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQhH;AAED,mEAAmE;AACnE,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ9F"}
1
+ {"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/host/controller/persist.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,qBAAqB,EAAiB,MAAM,mBAAmB,CAAC;AAG9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAwC7C;mFACmF;AACnF,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErF;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1G;AAED;sDACsD;AACtD,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvG;AAED;;;gCAGgC;AAChC,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAE7D"}
@@ -1,51 +1,98 @@
1
1
  /**
2
- * Controller — settings persistence.
2
+ * Controller — persisting what the Host itself writes.
3
3
  *
4
- * The three writes a run may need to make back into the persisted settings
5
- * section: the seeded executable, the saved rows a merged scan folded in, and
6
- * the connect-mode flag a Windows run composed. All three follow the same rule —
7
- * never throw out of a run, because the base layer is what the card reads and a
8
- * failed write must not break an otherwise successful run.
4
+ * Four writes may land back in the profile patch: the seeded executable, the
5
+ * saved rows a merged scan folded in, the ids of dropped rows, and the dismissed
6
+ * translation flag (./../migration.ts D4). Since dsh 0.2.0 the store is the
7
+ * profile's **own patch layer** (there is no `settings.yaml` any more) and the
8
+ * write goes through the `settings` service keyed by the row's profile **entry
9
+ * id** — the same key the card addresses by.
10
+ *
11
+ * What gets written is only ever a user-authored field — one field per write, so
12
+ * an unrelated edit the user made in the same layer keeps standing — and it goes
13
+ * through `settings.mutate(entryId, ops)` with the write's own `set` op first and
14
+ * then one `unset` op for **every live-mirror field** (see ../values.ts
15
+ * `liveMirrorKeys`). Why the unset ops belong to the write itself: a persisted
16
+ * write re-persists the volatile fields it answers, and whatever the live publish
17
+ * stands in the running references is answered through them, so a live answer can
18
+ * ride a save back into the patch file (measured live 2026-10-12: booting the
19
+ * plugin with no user write filled the profile's own `cordis.patch.yml` row with
20
+ * every live key). An `unset` returns the field to whatever the **row config**
21
+ * answers — the row's own patch layer is excluded underneath it — so what stands
22
+ * is the row's answer and a live-only answer drops out: the live boundary holds
23
+ * from the write channel, not from a check. And it heals: the first write to a
24
+ * row that already carries leaked live keys clears them.
25
+ *
26
+ * Every write still lands on the same follow-up rule (see ./commits.ts for the
27
+ * card's copy of it): a stored-layer write resets the live-only volatile fields
28
+ * back to their row-config answers, so the mirror goes straight back out with it.
29
+ *
30
+ * All three follow the same rules: the write is answered from the run's neutral
31
+ * async context (see ./runs.ts — a write still sitting inside the write
32
+ * transaction its own form commit opened is a *nested* transaction, which the
33
+ * platform refuses instead of queueing), and it never throws out of the run. The
34
+ * mirror is what the card reads, and a failed write must not break an otherwise
35
+ * successful run.
9
36
  */
10
- import { SETTINGS_NAMESPACE } from "../constants.js";
11
- /** Read the `settings` service surface as consumed here (`mutate` only). */
12
- function settingsService(controller) {
13
- return controller.ctx.get("settings");
14
- }
15
- /** Persist one seeded/executable write through the settings service. */
16
- export async function persistChromePath(controller, path) {
17
- try {
18
- const settings = settingsService(controller);
19
- if (!settings || typeof settings.mutate !== "function")
20
- return;
21
- await Promise.resolve(settings.mutate(SETTINGS_NAMESPACE, [{ op: "set", path: ["chromePath"], value: path }]));
22
- }
23
- catch (error) {
24
- controller.ctx.logger.warn(`chrome-devtools-mcp(${controller.config.serverName}): failed to persist the seeded chromePath: ${String(error)}`);
37
+ import { createPersister } from "@comecaramelos/dsh-ancesters/host";
38
+ import { liveMirrorKeys } from "../values.js";
39
+ import { MIGRATION_DISMISSED_FIELD } from "../constants.js";
40
+ import { publishLive } from "./publish.js";
41
+ /** One persister per controller (ancestros' `createPersister`): the write's own
42
+ * field first, then one `unset` per live-mirror field, no revision fence (the
43
+ * Host putting its own answer into the row, not an editor saving a view — a
44
+ * stale view must not lose the seed / the merged rows / the connect flag the
45
+ * run just produced), and the mirror re-asserted after the write **and** after
46
+ * a refused one (measured live 2026-10-13: a refused rows merge on a read-only
47
+ * row otherwise left the references answering no `lastError` ever again). */
48
+ const persisters = new WeakMap();
49
+ function persisterOf(controller) {
50
+ let persister = persisters.get(controller);
51
+ if (persister === void 0) {
52
+ persister = createPersister(controller.ctx, {
53
+ form: {
54
+ current: () => {
55
+ const form = controller.state.form;
56
+ if (form === void 0)
57
+ return void 0;
58
+ const settings = form.settings ?? controller.ctx.get("settings");
59
+ return { entryId: form.entryId, settings: settings };
60
+ },
61
+ liveKeys: () => liveMirrorKeys(),
62
+ attached: () => controller.state.form !== void 0
63
+ },
64
+ liveKeys: liveMirrorKeys(),
65
+ publishLive: () => publishLive(controller),
66
+ name: `dsh-chrome-mcp(${controller.config.serverName})`
67
+ });
68
+ persisters.set(controller, persister);
25
69
  }
70
+ return persister;
71
+ }
72
+ /** Write one user-authored field into the row's own patch layer, clearing every
73
+ * live-mirror field back to its row-config answer (see the module header). */
74
+ function persist(controller, field, value, note) {
75
+ return persisterOf(controller)({ [field]: value }, `dsh-chrome-mcp(${controller.config.serverName}): ${note}`);
76
+ }
77
+ /** Persist one seeded/executable selection — the row-config fallback disappears
78
+ * the moment a path is picked, so a run that seeded one writes it exactly once. */
79
+ export function persistChromePath(controller, path) {
80
+ return persist(controller, "chromePath", path, "failed to persist the seeded chromePath");
26
81
  }
27
82
  /** Persist the saved-executables rows a run merged into. */
28
- export async function persistExecutables(controller, entries) {
29
- try {
30
- const settings = settingsService(controller);
31
- if (!settings || typeof settings.mutate !== "function")
32
- return;
33
- await Promise.resolve(settings.mutate(SETTINGS_NAMESPACE, [{ op: "set", path: ["executables"], value: entries }]));
34
- }
35
- catch (error) {
36
- controller.ctx.logger.warn(`chrome-devtools-mcp(${controller.config.serverName}): failed to persist the executable rows: ${String(error)}`);
37
- }
83
+ export function persistExecutables(controller, entries) {
84
+ return persist(controller, "executables", entries, "failed to persist the executable rows");
38
85
  }
39
- /** Persist the saved flags list a Windows connect run composed. */
40
- export async function persistExtraFlags(controller, flags) {
41
- try {
42
- const settings = settingsService(controller);
43
- if (!settings || typeof settings.mutate !== "function")
44
- return;
45
- await Promise.resolve(settings.mutate(SETTINGS_NAMESPACE, [{ op: "set", path: ["extraFlags"], value: flags }]));
46
- }
47
- catch (error) {
48
- controller.ctx.logger.warn(`chrome-devtools-mcp(${controller.config.serverName}): failed to persist the connect-mode flag: ${String(error)}`);
49
- }
86
+ /** Persist the ids of rows the user dropped, so no later merge step folds them
87
+ * back in (see ../schema.ts `droppedExecutables`). */
88
+ export function persistDroppedExecutables(controller, ids) {
89
+ return persist(controller, "droppedExecutables", [...ids], "failed to persist the dropped executable ids");
90
+ }
91
+ /** Remember that this row's standalone-config translation was turned down
92
+ * (./../migration.ts D4). This is the only Host write the proposal path makes:
93
+ * the config itself is read, never rewritten, and nothing lands in the manager's
94
+ * `servers` without a click. */
95
+ export function dismissMigration(controller) {
96
+ void persist(controller, MIGRATION_DISMISSED_FIELD, true, "failed to persist the dismissed translation");
50
97
  }
51
98
  //# sourceMappingURL=persist.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"persist.js","sourceRoot":"","sources":["../../../src/host/controller/persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKrD,4EAA4E;AAC5E,SAAS,eAAe,CAAC,UAAsB;IAC3C,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAqE,CAAC;AAC9G,CAAC;AAED,wEAAwE;AACxE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,UAAsB,EAAE,IAAY;IACxE,IAAI,CAAC;QACD,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,CAAC,MAAM,KAAK,UAAU;YAAE,OAAO;QAC/D,MAAM,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,EAAE,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AAG,CAAC,EAAE,8CAA8C,CAAC,CAAC;AAC/G,CAAC;AAED;;;gCAGgC;AAChC,MAAM,UAAU,gBAAgB,CAAC,UAAsB;IACnD,KAAK,OAAO,CAAC,UAAU,EAAE,yBAAyB,EAAE,IAAI,EAAE,6CAA6C,CAAC,CAAC;AAC7G,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Controller } from "./state.js";
2
+ /** Queue one coalesced publish. */
3
+ export declare function publishLive(controller: Controller): void;
4
+ //# sourceMappingURL=publish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../src/host/controller/publish.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,mCAAmC;AACnC,wBAAgB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAiCxD"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Controller — publishing the live mirror.
3
+ *
4
+ * Every answer the card reads (`lastError`, the per-path probe list, the resolved
5
+ * selection, the Windows run state, …) is a `.volatile()` field of the same
6
+ * `Config` the card edits, so publishing is one **volatile commit** — and that
7
+ * channel is `createLiveMirror` from `@comecaramelos/dsh-ancesters/host`: the
8
+ * coalescing, the wait for the fiber to settle, the loader-entry merge that
9
+ * persists nothing and never remounts, the `describe()` that turns the new
10
+ * revision into the event the card settles on, and the re-assert when a settings
11
+ * write anywhere in the profile resets the live keys (dsh 0.2.1).
12
+ *
13
+ * What stays here is what the mirror *means* for this row: the connect-mode
14
+ * answer, derived on every publish, and telling the manager that what a picker
15
+ * would answer just moved.
16
+ */
17
+ import { createLiveMirror } from "@comecaramelos/dsh-ancesters/host";
18
+ import { flagsSkipCheck } from "../flags.js";
19
+ /** Queue one coalesced publish. */
20
+ export function publishLive(controller) {
21
+ const { state } = controller;
22
+ // The connect-mode answer is re-derived here, off what answers connect
23
+ // mode right now: a connection whose running flags carry the debug URL, or
24
+ // a live **Prelaunch Windows Chrome** run that stands connected against its
25
+ // port. Connect mode is a property of the running argv, not of a flags
26
+ // *change* — answering only where a flags list was applied left a row that
27
+ // already runs in connect mode serving the pill as the local selection
28
+ // (measured live 2026-10-13: a host booted with
29
+ // `--browserUrl=http://127.0.0.1:9223` in its row config never read Connect
30
+ // mode; the pill read the executable name and only turned over when the
31
+ // run applied the flags itself). Deriving on every publish means the answer
32
+ // can never be quieter than what is running.
33
+ state.live.carriesConnectionMode = flagsSkipCheck(state.runningFlags) || (state.live.windowsChromeStatus.state === "connected" && state.live.windowsChromeStatus.port > 0);
34
+ if (state.mirror === void 0) {
35
+ state.mirror = createLiveMirror(controller.ctx, {
36
+ name: `dsh-chrome-mcp(${controller.config.serverName})`,
37
+ read: () => ({ ...state.live }),
38
+ settings: () => (controller.state.form?.settings ?? controller.ctx.get("settings"))
39
+ });
40
+ }
41
+ state.mirror.publish();
42
+ // The connection fields' `select` choices are Host-served answers read off
43
+ // this very state (the catalog, the scan answers, what a live connection
44
+ // runs with), so every publish says "what a picker would answer just
45
+ // moved" — once per turn, like the publish itself (see ../manager.ts:
46
+ // "every publish re-notifies").
47
+ if (state.kindsNotifyQueued)
48
+ return;
49
+ state.kindsNotifyQueued = true;
50
+ queueMicrotask(() => {
51
+ state.kindsNotifyQueued = false;
52
+ if (!state.disposed)
53
+ state.notifyKindsChanged();
54
+ });
55
+ }
56
+ //# sourceMappingURL=publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/host/controller/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C,mCAAmC;AACnC,MAAM,UAAU,WAAW,CAAC,UAAsB;IAC9C,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;IAC7B,uEAAuE;IACvE,2EAA2E;IA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@ export declare function sameEntries(a: readonly ChromeExecutableEntry[], b: read
11
11
  * missing, and the result lands in the persisted rows instead of staying
12
12
  * readable forever as a second source.
13
13
  */
14
- export declare function mergeLegacyPaths(controller: Controller): ChromeExecutableEntry[];
14
+ export declare function mergeLegacyPaths(controller: Controller, skip?: ReadonlySet<string>): ChromeExecutableEntry[];
15
15
  /**
16
16
  * One executable run. Probe every candidate the row config and the saved rows
17
17
  * carry (plus the selection — the same path may appear as a row), publish what
@@ -32,25 +32,49 @@ export declare function runExecutableDiscovery(controller: Controller): Promise<
32
32
  */
33
33
  export declare function probeSelection(controller: Controller): Promise<string>;
34
34
  /**
35
- * Restart the bridge connection with a different executable selected — the argv
36
- * tail carries `--executablePath=<path>`, so unlike a flag change this one is
37
- * what the card's pill claims is running. `rerun` schedules the scan+probe that
38
- * follows a selection change; a caller that is already inside that run (the
39
- * seeding branch above) passes `false`.
35
+ * Write one executable selection through the Host write-back channel — the same
36
+ * persisted `chromePath` field every other surface reads — and re-fire the run
37
+ * behind it, the way the card's own selection commit does: a changed selection
38
+ * shifts the default answers (connections follow, the run re-runs), an
39
+ * unchanged write just re-probes. This is the command-side mirror of the
40
+ * picker — pill, command and catalog read and write one field — so a headless
41
+ * selection lands exactly where a GUI pick would.
42
+ */
43
+ export declare function selectChromePath(controller: Controller, path: string): Promise<void>;
44
+ /**
45
+ * Carry a different executable into the live answers — the argv tail carries
46
+ * `--executablePath=<path>`, so unlike a flags edit this one is what the card's
47
+ * pill claims is running. What lives stands on is not restarted here: a
48
+ * connection that follows the row's default is handed back to the pool for a
49
+ * re-resolve, and one that picked its own executable was never following it.
50
+ * `rerun` schedules the scan+probe that follows a selection change; a caller
51
+ * that is already inside that run (the seeding branch above) passes `false`.
40
52
  */
41
53
  export declare function applyChromePath(controller: Controller, path: string, nextSource: EffectiveChromeSource, rerun?: boolean): void;
54
+ /** Cancel the pending bounded retry — what the instance's dispose calls. */
55
+ export declare function cancelDiscoveryRetry(controller: Controller): void;
42
56
  /**
43
57
  * Serialize one unit of work: a rows-only refresh, a run that also re-probes
44
58
  * what is selected, or the Windows Chrome launch. Windows runs share this chain
45
59
  * because the invariant is "one run at a time" — nothing about it interacts with
46
- * the local probe.
60
+ * the local probe. The body answers from a neutral async context (see
61
+ * `runContext`): a run scheduled from a form commit must not carry that
62
+ * commit's write transaction, or every write the run answers would be refused
63
+ * as a nested transaction.
47
64
  */
48
65
  export declare function queue(controller: Controller, kind: RunKind): Promise<unknown>;
49
66
  /**
50
67
  * One Windows Chrome run on demand: queued on the same chain as the button (one
51
- * run at a time), resolved once it settled. The answer is the base-layer mirror
52
- * read after the run — the tool surface says what `windowsChromeStatus` says,
53
- * never more than the run answered.
68
+ * run at a time), resolved once it settled. The answer is the live mirror read
69
+ * after the run — the tool surface says what `windowsChromeStatus` says, never
70
+ * more than the run answered.
71
+ *
72
+ * With the manager mounted this is also the surface that keeps the live
73
+ * `chrome-windows` connections honest: a run that connected while such a
74
+ * connection stands is a reason to answer that connection again (the run is
75
+ * idempotent — the live port rides into `currentFlags` — so re-answering is not
76
+ * a second browser), and a run that connected without one is said to be worth
77
+ * one.
54
78
  */
55
79
  export declare function prelaunchWindowsChrome(controller: Controller): Promise<string>;
56
80
  //# sourceMappingURL=runs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../../src/host/controller/runs.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAO9G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,qDAAqD;AACrD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtD,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,qBAAqB,EAAE,EAAE,CAAC,EAAE,SAAS,qBAAqB,EAAE,GAAG,OAAO,CAG7G;AAED;;;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