@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":"settings.d.ts","sourceRoot":"","sources":["../../../src/host/types/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC5G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;0EACsE;IACtE,uBAAuB,EAAE,MAAM,CAAC;IAChC;;;;iEAI6D;IAC7D,sBAAsB,EAAE,MAAM,CAAC;IAC/B;;6CAEyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB;;iEAE6D;IAC7D,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC;;;2CAGuC;IACvC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B;;gCAE4B;IAC5B,UAAU,EAAE,EAAE,GAAG,gBAAgB,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB;;;yDAGqD;IACrD,2BAA2B,EAAE,MAAM,CAAC;IACpC;8EAC0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB;;;iCAG6B;IAC7B,gBA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S,MAAM,EAAE,CAAA;CAAE,CAAC;AAE/H,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,EAAE,CAAC;IAC/C;qFACiF;IACjF,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC/G;;;;kDAI8C;IAC9C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,cAAc,EAAE,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC/G;sEACkE;IAClE,SAAS,CAAC,YAAY,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,IAAI,CAAC;CAC5E;AAED,oGAAoG;AACpG,MAAM,WAAW,eAAe;IAC5B,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC1B,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAC;IAChB;6BACyB;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC5B"}
@@ -15,7 +15,6 @@ export type BridgeStderrMode = "log" | "console";
15
15
  /** The spawn-diagnostics subset {@link noteStderr} reads. */
16
16
  export type BridgeStderrNotice = {
17
17
  redirect: string;
18
- fallback: string;
19
18
  };
20
19
  /** Spawn target consumed by {@link buildBridgeSpawn}. */
21
20
  export type BridgeSpawnTarget = {
@@ -32,18 +31,17 @@ export type BridgeSpawnTarget = {
32
31
  };
33
32
  /** Options for {@link buildBridgeSpawn}. */
34
33
  export type BridgeSpawnOptions = {
35
- platform?: NodeJS.Platform;
36
- exists?: (candidate: string) => boolean;
34
+ /** The Node that runs the wrapper; defaults to `process.execPath`. */
35
+ execPath?: string;
37
36
  tmpdir?: string;
38
37
  pid?: number;
39
38
  };
40
39
  /** One built bridge spawn: the (possibly wrapped) command/args plus where the
41
- * stderr lands (`redirect`, "" when echoed) and why not (`fallback`). */
40
+ * stderr lands (`redirect`, "" when echoed). */
42
41
  export type BridgeSpawnResult = {
43
42
  command: string;
44
43
  args: string[];
45
44
  redirect: string;
46
- fallback: string;
47
45
  };
48
46
  /** Options for {@link bridgeStderrLogPath}. */
49
47
  export type BridgeStderrLogPathOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"stderr.d.ts","sourceRoot":"","sources":["../../../src/host/types/stderr.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,SAAS,CAAC;AAEjD,6DAA6D;AAC7D,MAAM,MAAM,kBAAkB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,yDAAyD;AACzD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,gEAAgE;IAChE,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,4CAA4C;AAC5C,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC3B,MAAM,CAAC,E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M,MAAM,iBAAiB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtF,+CAA+C;AAC/C,MAAM,MAAM,0BAA0B,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1,40 +1,108 @@
1
- import type { BridgeStderrMode, PluginContext } from "./types/index.js";
1
+ import type { BridgeStderrMode, ChromeExecutableEntry, ChromeMcpConfig, ConfigField, ConfigLayers, ConfigLiveFields, SettingsFormRow, SettingsForms } from "./types/index.js";
2
+ /**
3
+ * Environment variable that seeds the launch flags for one dsh run: a
4
+ * whitespace-separated extraFlags list, e.g.
5
+ * `DSH_CHROME_MCP_FLAGS="--headless --isolated"`.
6
+ */
7
+ export { FLAGS_ENV_VAR } from "./constants.js";
8
+ /**
9
+ * Read one config field. A `.volatile()` field arrives as a reference the fiber
10
+ * resolves live (dsh 0.2.0: `apply` hands references, ordinary fields plain
11
+ * values), so reading the field's type is not enough — this is the one way every
12
+ * volatile read answers, whether what it holds is a reference or, on the cold
13
+ * path of a hand-built config, the plain value itself.
14
+ *
15
+ * A reference hands a snapshot, so arrays come back copied: the running state
16
+ * holds values, never the reference's own object.
17
+ * @param field - what the config carries for that field.
18
+ * @param fallback - what to answer when it holds nothing.
19
+ */
20
+ export declare function readConfigField<T>(field: ConfigField<T> | undefined, fallback: T): T;
21
+ /**
22
+ * The canonical default extra-flags list — the live mirror's answer for the
23
+ * card's **Restore defaults** control (the card carries no copy of it).
24
+ */
25
+ export declare function readDefaultExtraFlags(): string[];
26
+ /**
27
+ * The recommended WSL ↔ Windows extra-flags list — the live mirror's answer for
28
+ * the card's **Flags WSL** control (a fixed recommendation, never persisted).
29
+ */
30
+ export declare function readWslExtraFlags(): string[];
2
31
  /**
3
32
  * Parse a whitespace-separated flags list from the environment.
4
- * @param configured - the row config `extraFlags` value.
33
+ * @param configured - what the row config answers.
5
34
  * @param envValue - `DSH_CHROME_MCP_FLAGS` as seen in the launch env.
6
35
  * @returns the env flags when the value is a non-empty string whose every
7
36
  * entry is valid, else `configured` (the caller decides on warnings).
8
37
  */
9
38
  export declare function resolveEnvFlags(configured: string[], envValue: unknown): string[];
10
39
  /**
11
- * Read the last UI-selected extraFlags list from the persisted user layer
12
- * when the settings service is already up and the stored value is valid.
13
- * The host consults this before the first bridge spawn so the very first
14
- * connection launches with the persisted flags — and every in-process
15
- * reconnect, which reuses the bridge config, comes back on them as well.
16
- * @param ctx - plugin context.
17
- * @returns the persisted flags array, or undefined when absent, invalid, or
18
- * the settings service is not available yet (the installSection initial
19
- * onChange then applies the persisted selection in place).
40
+ * One read of the configuration form's layers. `value` answers what runs now —
41
+ * the references resolve the user layer over the row config, which is exactly
42
+ * what the bridge launches with. `user` answers "did the user edit this?" (the
43
+ * selection source, and where the launch environment sits in the flags
44
+ * precedence), `base` "what does the row config say?", and both stay undefined
45
+ * until the form answers.
46
+ *
47
+ * The live-only volatile fields are not consulted here: they are Host answers,
48
+ * held in the controller's mirror and published, not read.
49
+ * @param config - the config `apply` received (references included).
50
+ * @param row - the described form row, when the service is already up.
20
51
  */
21
- export declare function readPersistedFlags(ctx: PluginContext): string[] | undefined;
52
+ export declare function readConfigLayers(config: ChromeMcpConfig, row?: SettingsFormRow): ConfigLayers;
22
53
  /**
23
- * Environment variable that seeds the launch flags for one dsh run: a
24
- * whitespace-separated extraFlags list, e.g.
25
- * `DSH_CHROME_MCP_FLAGS="--headless --isolated"`.
54
+ * The effective launch flags for one read of the layers (highest first: the
55
+ * user layer, `DSH_CHROME_MCP_FLAGS`, the row config, the schema default).
56
+ * Before the layers answer the references stand in, exactly the way the old cold
57
+ * path did. The executable-pinning flag never reaches argv — the picker owns
58
+ * that flag, so a layer that still carries one is answered as the selection
59
+ * source instead (see ./flags.ts), never as a second source of truth.
60
+ * @param layers - the last read of the form's layers.
61
+ * @param envValue - the launch environment's `DSH_CHROME_MCP_FLAGS` value.
26
62
  */
27
- export { FLAGS_ENV_VAR } from "./constants.js";
63
+ export declare function resolveLaunchFlags(layers: ConfigLayers, envValue: unknown): string[];
28
64
  /**
29
- * Resolve the effective bridge stderr mode. The persisted UI toggle
30
- * (`stderrMode`) wins when set; otherwise the row-config `bridgeStderr`
31
- * (mirrored into the base layer as `rowStderr`). An invalid/empty override
32
- * falls back to the row config.
33
- * @param override - persisted `stderrMode` value, or "".
65
+ * The effective executable selection for one read of the layers: the user layer
66
+ * (the card's pick, or the host's one seed) wins, then the row config — its
67
+ * legacy `--executablePath` folded in — and, before either answers, nothing.
68
+ * There is no auto source and nothing is re-resolved here: a path that breaks
69
+ * keeps breaking so what the pill claims keeps being what the bridge runs.
70
+ */
71
+ export declare function resolveSelection(layers: ConfigLayers): {
72
+ path: string;
73
+ source: "" | "selected" | "row-config";
74
+ pinned: boolean;
75
+ };
76
+ /**
77
+ * Resolve the effective bridge stderr mode. The user layer's toggle
78
+ * (`stderrMode`) wins when it states one; otherwise the row config's
79
+ * `bridgeStderr`. An invalid/empty override falls back to the row config.
80
+ * @param override - the persisted `stderrMode` value, or "".
34
81
  * @param rowDefault - the validated row-config `bridgeStderr` ("log"/"console").
35
82
  * @returns "log" | "console".
36
83
  */
37
84
  export declare function resolveStderrMode(override: unknown, rowDefault: unknown): BridgeStderrMode;
85
+ /**
86
+ * The effective bridge stderr mode from one read of the form's layers, in the
87
+ * precedence every other layer-resolved field follows: what the user layer says
88
+ * wins, the **row config** answers under it, and what the references resolved at
89
+ * boot sits under that again (the references answer both layers before the form
90
+ * attaches, so the cold path keeps answering).
91
+ *
92
+ * The `base` step is what keeps the answer single. The references can resolve an
93
+ * empty `stderrMode` for a row that states one — no user layer ever wrote it —
94
+ * while the described row still serves it, and then the card states one mode
95
+ * while the bridge runs the other. A control that diffs its own flip against
96
+ * what is *effective* drops every flip as "already served" against a stale
97
+ * mirror, which is exactly the dead toggle: the profile that configures the
98
+ * switch in its own row is the profile that can never switch it. Reading the
99
+ * row-config layer here makes the Host state the same mode the card states, and
100
+ * the mirror it publishes then stays honest on its own.
101
+ * @param layers - the last read of the form's layers.
102
+ * @param rowDefault - the validated row-config `bridgeStderr` ("log"/"console").
103
+ * @returns "log" | "console".
104
+ */
105
+ export declare function resolveStderrModeFromLayers(layers: ConfigLayers, rowDefault: unknown): BridgeStderrMode;
38
106
  /**
39
107
  * The effective Chrome executable path (highest first):
40
108
  *
@@ -48,34 +116,39 @@ export declare function resolveStderrMode(override: unknown, rowDefault: unknown
48
116
  * Nothing here consults the scan list: a fixed path stays fixed even when it
49
117
  * breaks, because re-resolving would be an auto mode in disguise.
50
118
  *
51
- * @param userLayer - persisted `chromePath` value ("" or absent when unset).
119
+ * @param userLayer - the persisted `chromePath` value ("" when unset).
52
120
  * @param rowConfig - validated row-config `chromePath` value.
53
121
  * @returns the trimmed effective path, possibly "".
54
122
  */
55
123
  export declare function resolveEffectiveChromePath(userLayer: unknown, rowConfig: unknown): string;
56
124
  /**
57
- * Read the last UI-seeded (or host-seeded) `chromePath` from the persisted user
58
- * layer when the settings service is already up. ""/absent/invalid means
59
- * "nothing picked yet".
60
- * @param ctx - plugin context.
125
+ * The persisted user-layer `extraFlags` list (undefined = the user never said
126
+ * anything, so the launch environment answers instead).
127
+ * @param layers - the last read of the form's layers.
128
+ */
129
+ export declare function readPersistedFlags(layers: ConfigLayers): string[] | undefined;
130
+ /**
131
+ * The last UI-seeded (or host-seeded) `chromePath` from the user layer ("" means
132
+ * "nothing picked yet" → fall back to the row config).
133
+ * @param layers - the last read of the form's layers.
61
134
  */
62
- export declare function readPersistedChromePath(ctx: PluginContext): string;
135
+ export declare function readPersistedChromePath(layers: ConfigLayers): string;
63
136
  /**
64
- * Read the last persisted "Reduce log output" mode from the persisted user
65
- * layer when the settings service is already up. Empty/absent/invalid means
66
- * "follow the row config".
67
- * @param ctx - plugin context.
137
+ * The last persisted "Reduce log output" mode from the user layer.
138
+ * Empty/absent/invalid means "follow the row config".
139
+ * @param layers - the last read of the form's layers.
68
140
  * @returns "log" | "console" when explicitly set, "" otherwise.
69
141
  */
70
- export declare function readPersistedStderrMode(ctx: PluginContext): "" | BridgeStderrMode;
142
+ export declare function readPersistedStderrMode(layers: ConfigLayers): "" | BridgeStderrMode;
71
143
  /**
72
- * Read the persisted custom-executable MRU from the user layer when the
73
- * settings service is already up. Invalid entries (non-string, empty, control
74
- * characters) are dropped rather than poisoning the candidate list.
75
- * @param ctx - plugin context.
144
+ * The persisted custom-executable MRU from the user layer — a **legacy** field
145
+ * nothing writes any more, read once to fold the older hand-typed paths into
146
+ * the rows. Invalid entries (non-string, empty, control characters) are dropped
147
+ * rather than poisoning the candidate list.
148
+ * @param layers - the last read of the form's layers.
76
149
  * @returns the stored paths, trimmed and deduplicated ("" list when absent).
77
150
  */
78
- export declare function readPersistedCustomPaths(ctx: PluginContext): string[];
151
+ export declare function readPersistedCustomPaths(layers: ConfigLayers): string[];
79
152
  /**
80
153
  * Normalized form of a **legacy** custom-path list: trimmed, empty entries
81
154
  * dropped, control characters dropped, duplicates folded (first spelling wins),
@@ -86,4 +159,46 @@ export declare function readPersistedCustomPaths(ctx: PluginContext): string[];
86
159
  * @param cap - entry cap (default `CUSTOM_PATHS_CAP`).
87
160
  */
88
161
  export declare function normalizeCustomPaths(value: unknown, cap?: number): string[];
162
+ /**
163
+ * The saved executable rows the picker shows: re-normalized on every read, since
164
+ * what a form write hands may carry any shape.
165
+ * @param layers - the last read of the form's layers.
166
+ */
167
+ export declare function readSavedExecutables(layers: ConfigLayers): ChromeExecutableEntry[];
168
+ /**
169
+ * The ids of rows the user has dropped — the ids every merge step must skip so a
170
+ * deletion outlives the run behind the write that made it (see ./schema.ts
171
+ * `droppedExecutables`). Deduped; a malformed entry drops out exactly like a
172
+ * malformed row id.
173
+ * @param layers - the last read of the form's layers.
174
+ */
175
+ export declare function readDroppedExecutables(layers: ConfigLayers): string[];
176
+ /**
177
+ * The live mirror's field names — the fields the Host answers through the
178
+ * volatile references and never authors by hand. Every write that lands in the
179
+ * stored row carries this list as **unset** ops: each unset returns the field to
180
+ * the answer beneath its own patch layer — what the row config says — so what
181
+ * only the live references stand drops out of what the write lands instead of
182
+ * riding the write into the file. This is what keeps the persistence boundary
183
+ * from the inside: a live commit answers, a persisted write clears (measured
184
+ * live 2026-10-12: booting the plugin with no user write at all filled the row
185
+ * with the whole live mirror; with the clear riding the write the row stays
186
+ * clean, and a row that already carries leaked live keys is healed by its first
187
+ * write).
188
+ */
189
+ export declare function liveMirrorKeys(): readonly string[];
190
+ /**
191
+ * The mirror the Host publishes: what every live field answers when nothing has
192
+ * run yet. The whole point of starting from the defaults is that a card reads
193
+ * exactly what a Host with no answers would serve, never a hole.
194
+ */
195
+ export declare function createLiveMirror(): ConfigLiveFields;
196
+ /**
197
+ * Read the row's two layers through the settings service. Undefined when the
198
+ * service (or this entry) is not described yet — the cold path, where only the
199
+ * references answer.
200
+ * @param settings - the settings service (`SettingsForms`), when resolved.
201
+ * @param entryId - the profile entry id this row is keyed by.
202
+ */
203
+ export declare function readConfigForm(settings: SettingsForms | undefined, entryId: string): SettingsFormRow | undefined;
89
204
  //# sourceMappingURL=values.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/host/values.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAExE;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,EAAE,CASjF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,GAAG,SAAS,CAa3E;AAED;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;GAQG;AACH,wBAA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