@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,307 +1,361 @@
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
- export declare const Config: z<Schemastery.ObjectS<{
12
- serverName: z<string, string>;
13
- command: z<string, string>;
14
- package: z<string, string>;
15
- extraFlags: z<string[], string[]>;
16
- chromePath: z<string, string>;
17
- chromePaths: z<string[], string[]>;
18
- env: z<import("@deepseek-ai/cosmokit").Dict<string, string>, import("@deepseek-ai/cosmokit").Dict<string, string>>;
19
- cwd: z<string, string>;
20
- toolCallTimeoutMs: z<number, number>;
21
- failOnStartupError: z<boolean, boolean>;
22
- reconnect: z<Schemastery.ObjectS<{
23
- enabled: z<boolean, boolean>;
24
- initialDelayMs: z<number, number>;
25
- maxDelayMs: z<number, number>;
26
- maxAttempts: z<number, number>;
27
- }>, Schemastery.ObjectT<{
28
- enabled: z<boolean, boolean>;
29
- initialDelayMs: z<number, number>;
30
- maxDelayMs: z<number, number>;
31
- maxAttempts: z<number, number>;
32
- }>>;
33
- /** Bridge console-output routing: "log" (default) redirects the spawned
34
- * npx child's inherited stderr into a per-spawn log file so its progress
35
- * / startup lines stay out of the dsh console; "console" inherits it
36
- * (debug). The card's "Reduce log output" toggle (`stderrMode`) overrides
37
- * this. See {@link buildBridgeSpawn}. */
38
- bridgeStderr: z<"log" | "console", "log" | "console">;
39
- /** Log path override for "log" mode; "" = auto (see
40
- * {@link bridgeStderrLogPath}). Absolute paths only. */
41
- bridgeStderrLog: z<string, string>;
42
- }>, Schemastery.ObjectT<{
43
- serverName: z<string, string>;
44
- command: z<string, string>;
45
- package: z<string, string>;
46
- extraFlags: z<string[], string[]>;
47
- chromePath: z<string, string>;
48
- chromePaths: z<string[], string[]>;
49
- env: z<import("@deepseek-ai/cosmokit").Dict<string, string>, import("@deepseek-ai/cosmokit").Dict<string, string>>;
50
- cwd: z<string, string>;
51
- toolCallTimeoutMs: z<number, number>;
52
- failOnStartupError: z<boolean, boolean>;
53
- reconnect: z<Schemastery.ObjectS<{
54
- enabled: z<boolean, boolean>;
55
- initialDelayMs: z<number, number>;
56
- maxDelayMs: z<number, number>;
57
- maxAttempts: z<number, number>;
58
- }>, Schemastery.ObjectT<{
59
- enabled: z<boolean, boolean>;
60
- initialDelayMs: z<number, number>;
61
- maxDelayMs: z<number, number>;
62
- maxAttempts: z<number, number>;
63
- }>>;
24
+ /**
25
+ * The plugin row's configuration, and the configuration form the Web GUI card
26
+ * edits. Every `.volatile()` field below is live: a user edit lands in the
27
+ * profile patch and commits without a remount, and the Host's own live answers
28
+ * ride the same references without ever being persisted.
29
+ */
30
+ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
31
+ serverName: z<string, string, "defined">;
32
+ command: z<string, string, "defined">;
33
+ package: z<string, string, "defined">;
34
+ /** Flags appended after `npx -y <package>`; the card's last UI edit. The
35
+ * field's own pattern is what refuses them (an entry that carries a control
36
+ * character never resolves, so a write is refused Host-side rather than
37
+ * landing in argv); an executable-pinning flag is rejected by the Host fold
38
+ * because the executable is picked below. */
39
+ extraFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
40
+ chromePaths: z<string[], string[], "defined">;
41
+ env: z<import("@deepseek-ai/cosmokit").Dict<string, string>, import("@deepseek-ai/cosmokit").Dict<string, string>, "defined">;
42
+ cwd: z<string, string, "defined">;
43
+ toolCallTimeoutMs: z<number, number, "defined">;
44
+ /** Ceiling for the bridge's server instructions (UTF-8 bytes, attribution
45
+ * included); an oversized description rejects the connection. Mirrors
46
+ * `dsh-mcp-client`'s own field and default (32768) — a passthrough for a
47
+ * server whose instructions run longer than the cap. */
48
+ maxInstructionBytes: z<number, number, "defined">;
49
+ failOnStartupError: z<boolean, boolean, "defined">;
50
+ reconnect: z<Schemastery.ObjectS<NoInfer<{
51
+ enabled: z<boolean, boolean, "defined">;
52
+ initialDelayMs: z<number, number, "defined">;
53
+ maxDelayMs: z<number, number, "defined">;
54
+ maxAttempts: z<number, number, "defined">;
55
+ }>>, Schemastery.ObjectT<NoInfer<{
56
+ enabled: z<boolean, boolean, "defined">;
57
+ initialDelayMs: z<number, number, "defined">;
58
+ maxDelayMs: z<number, number, "defined">;
59
+ maxAttempts: z<number, number, "defined">;
60
+ }>>, "plain">;
64
61
  /** Bridge console-output routing: "log" (default) redirects the spawned
65
62
  * npx child's inherited stderr into a per-spawn log file so its progress
66
63
  * / startup lines stay out of the dsh console; "console" inherits it
67
64
  * (debug). The card's "Reduce log output" toggle (`stderrMode`) overrides
68
65
  * this. See {@link buildBridgeSpawn}. */
69
- bridgeStderr: z<"log" | "console", "log" | "console">;
66
+ bridgeStderr: z<"log" | "console", "log" | "console", "defined">;
70
67
  /** Log path override for "log" mode; "" = auto (see
71
68
  * {@link bridgeStderrLogPath}). Absolute paths only. */
72
- bridgeStderrLog: z<string, string>;
73
- }>>;
74
- /**
75
- * User-settings section served to the Web GUI card.
76
- *
77
- * Persisted (user layer in `$DSH_HOME/settings.yaml`): `extraFlags`,
78
- * `chromePath` (the executable the picker selected — or that the host seeded
79
- * once), `executables` (the saved-executables rows: `id` = path, `name` = UI
80
- * label), `refreshExecutablesNonce` (the card's **Search executables**
81
- * trigger), `openWindowsChromeNonce` (the card's **Prelaunch Windows Chrome**
82
- * trigger), `chromeCustomPaths` (the **legacy** hand-typed MRU: folded into the
83
- * rows once by the first scan, never written again) and `stderrMode` (the
84
- * "Reduce log output" toggle: "log" captures the bridge's stderr into a
85
- * per-spawn log file, "console" echoes it, "" follows the row-config
86
- * `bridgeStderr`).
87
- * Served but never persisted (composition base layer held in memory by the
88
- * host): `lastError`, `executableDiscoveryRevision`, `chromeVersion`,
89
- * `executableStatus`, `chromeMissing`, `effectiveChromePath`,
90
- * `effectiveSource`, `wslWindowsExecutable`, `windowsChromeStatus`,
91
- * `carriesConnectionMode`, the static `rowStderr` mirror, the static
92
- * `defaultExtraFlags` mirror (the canonical defaults list the card's
93
- * **Restore defaults** control appends) and the static `wslExtraFlags` mirror
94
- * (the recommended WSL ↔ Windows flags the card's **Flags WSL** control
95
- * appends) — the client's polls stop when the served revision advances past its
96
- * action-time value.
97
- */
98
- export declare const SettingsSchema: z<Schemastery.ObjectS<{
99
- /** Flags appended after `npx -y <package>`; persisted last UI edit. An
100
- * executable-pinning flag is rejected: the executable is picked below. */
101
- extraFlags: z<string[], string[]>;
102
- /** Written by the UI **Search executables** button; the host reacts to it by
103
- * re-probing the saved rows and merging what it finds back into them. */
104
- refreshExecutablesNonce: z<number, number>;
105
- /** Written by the UI **Prelaunch Windows Chrome** button; the host reacts to it
106
- * by running the Windows launch: locate the Windows Chrome, prove the
107
- * mirrored-loopback prereq, launch it with a debugging port, and write the
108
- * `--browserUrl` connect entry that leaves the bridge in connect mode. */
109
- openWindowsChromeNonce: z<number, number>;
69
+ bridgeStderrLog: z<string, string, "defined">;
110
70
  /**
111
71
  * The executable the bridge launches with: picked in the picker (a saved
112
- * row's `id`) or seeded once by the host's first scan. "" = nothing resolved
113
- * yet — there is no auto state to fall back to.
72
+ * row's `id`) or seeded once by the Host's first scan. "" = nothing
73
+ * resolved yet — there is no auto state to fall back to.
114
74
  */
115
- chromePath: z<string, string>;
75
+ chromePath: z<string, string, "volatile-defined">;
116
76
  /** The picker's saved rows — `{ id: path, name: label }`, user-authored. The
117
- * host re-normalizes (trim, dedupe, caps) on every read, and a scan merges
77
+ * Host re-normalizes (trim, dedupe, caps) on every read, and a scan merges
118
78
  * what it discovers into them without dropping a name the user chose. */
119
- executables: z<({
79
+ executables: z<NoInfer<({
120
80
  id?: string | null | undefined;
121
81
  name?: string | null | undefined;
122
- } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
123
- id: z<string, string>;
124
- name: z<string, string>;
125
- }>[]>;
82
+ } & import("@deepseek-ai/cosmokit").Dict)[]>, NoInfer<Schemastery.ObjectT<NoInfer<{
83
+ id: z<string, string, "defined">;
84
+ name: z<string, string, "defined">;
85
+ }>>[]>, "volatile-defined">;
86
+ /** The ids of saved rows the user dropped. Every run folds what it found
87
+ * back into the rows, and the found list keeps answering a path the user
88
+ * just deleted, so without this record a dropped row stood back up on the
89
+ * very run the deletion queued (measured live 2026-10-12: the (x86)
90
+ * Windows-executable row read as a delete that never landed). Merge steps
91
+ * skip every id standing here; a list write carrying the id again clears
92
+ * it. Host-authored: the card never edits this field. */
93
+ droppedExecutables: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
126
94
  /**
127
95
  * **Legacy** MRU of hand-typed executables, newest first. The saved rows
128
- * replace it: a host whose settings still carry it folds its paths into the
129
- * rows during the first scan (see ./catalog.ts `mergeEntries`), so the field
130
- * is read once and never written again.
96
+ * replace it: a Host whose profile still carries it folds its paths into
97
+ * the rows during the first scan (see ./catalog.ts `mergeEntries`), so the
98
+ * field is read once and never written again.
131
99
  */
132
- chromeCustomPaths: z<string[], string[]>;
100
+ chromeCustomPaths: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
133
101
  /**
134
- * Persisted UI "Reduce log output" toggle: "log" captures the bridge's
102
+ * The card's "Reduce log output" toggle: "log" captures the bridge's
135
103
  * stderr into the log file, "console" echoes it (debug). "" follows the
136
- * row-config `bridgeStderr` (mirrored into `rowStderr`).
104
+ * row-config `bridgeStderr`.
137
105
  */
138
- stderrMode: z<string, string>;
106
+ stderrMode: z<string, string, "volatile-defined">;
107
+ /** The mode the bridge actually routes console output through — the UI
108
+ * toggle when it states one, else the row config. Mirrored live so the
109
+ * toggle never reads a phantom state (see `resolveStderrMode`). */
110
+ stderrEffective: z<"log" | "console", "log" | "console", "volatile-defined">;
111
+ /** Written by the card's **Fetch executables** button; the Host reacts by
112
+ * re-probing the saved rows and merging what it finds back into them. */
113
+ refreshExecutablesNonce: z<number, number, "volatile-defined">;
114
+ /** Written by the card's **Prelaunch Windows Chrome** button; the Host
115
+ * reacts by running the Windows launch: locate the Windows Chrome, prove
116
+ * the mirrored-loopback prereq, launch it with a debugging port, and write
117
+ * the `--browserUrl` connect entry that leaves the bridge in connect mode. */
118
+ openWindowsChromeNonce: z<number, number, "volatile-defined">;
119
+ /**
120
+ * Whether the translation of this row's **standalone** configuration was
121
+ * offered and turned down. Host-authored:
122
+ * the card never edits it — only the proposal's dismiss action does.
123
+ */
124
+ migrationDismissed: z<boolean, boolean, "volatile-defined">;
139
125
  /** Last check/connection failure, human-readable; empty when healthy. */
140
- lastError: z<string, string>;
126
+ lastError: z<string, string, "volatile-defined">;
141
127
  /** Known error: the last failure was "no Chrome executable detected". */
142
- chromeMissing: z<boolean, boolean>;
128
+ chromeMissing: z<boolean, boolean, "volatile-defined">;
143
129
  /** Executable-run counter (success or failure); completion signal for every
144
130
  * executable action the card can take. */
145
- executableDiscoveryRevision: z<number, number>;
131
+ executableDiscoveryRevision: z<number, number, "volatile-defined">;
146
132
  /** The version the **selected** executable answered with; "" when nothing
147
133
  * answered — nothing picked, a connect mode, or a blocked path. */
148
- chromeVersion: z<string, string>;
134
+ chromeVersion: z<string, string, "volatile-defined">;
149
135
  /** Per-row probe status keyed by path: the version the row answered with,
150
- * and the failure for a row that is present but not runnable (or blocked).
151
- * Base layer, never persisted — the rows themselves live in the user
152
- * layer. */
153
- executableStatus: z<({
136
+ * and the failure for a row that is present but not runnable (or blocked). */
137
+ executableStatus: z<NoInfer<({
154
138
  path?: string | null | undefined;
155
139
  version?: string | null | undefined;
156
140
  error?: string | null | undefined;
157
- } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
158
- path: z<string, string>;
159
- version: z<string, string>;
160
- error: z<string, string>;
161
- }>[]>;
162
- /** The path the bridge actually launches with ("" when nothing is fixed).
163
- * Base layer, never persisted. */
164
- effectiveChromePath: z<string, string>;
141
+ note?: string | null | undefined;
142
+ } & import("@deepseek-ai/cosmokit").Dict)[]>, NoInfer<Schemastery.ObjectT<NoInfer<{
143
+ path: z<string, string, "defined">;
144
+ version: z<string, string, "defined">;
145
+ error: z<string, string, "defined">;
146
+ note: z<string, string, "defined">;
147
+ }>>[]>, "volatile-defined">;
148
+ /** The path the bridge actually launches with ("" when nothing is fixed). */
149
+ effectiveChromePath: z<string, string, "volatile-defined">;
165
150
  /** Where `effectiveChromePath` came from — picked (`"selected"`), row config
166
- * (`"row-config"`) or nothing yet (""). Base layer, never persisted. */
167
- effectiveSource: z<string, string>;
168
- /** Row-config `bridgeStderr` in effect (static base layer; never
169
- * persisted) — the fallback when `stderrMode` is "". */
170
- rowStderr: z<"log" | "console", "log" | "console">;
171
- /** The canonical default extra-flags list (static base layer; never
172
- * persisted) — the list the card's **Restore defaults** control appends to
173
- * what the editor holds. Mirror of `DEFAULT_EXTRA_FLAGS`. */
174
- defaultExtraFlags: z<string[], string[]>;
175
- /** The recommended WSL ↔ Windows extra-flags list (static base layer;
176
- * never persisted) — the list the card's **Flags WSL** control appends to
177
- * what the editor holds, missing entries only. Mirror of
178
- * `WSL_EXTRA_FLAGS`. */
179
- wslExtraFlags: z<string[], string[]>;
180
- /** True while this host runs under WSL and the selected executable is a
181
- * Windows binary — the state the card's notice explains. Base layer, never
182
- * persisted (see ./platform.ts). */
183
- wslWindowsExecutable: z<boolean, boolean>;
184
- /** What the **Prelaunch Windows Chrome** run is doing (base layer; never
185
- * persisted) — the single field the card derives the button's state, its
186
- * disabled reason and the pill's connect-mode muting from. The locate,
187
- * prereq, launch and port answers all live host-side (./windows/), so
188
- * the card never carries a list of Windows paths or reachability rules. */
189
- windowsChromeStatus: z<Schemastery.ObjectS<{
190
- state: z<string, string>;
191
- port: z<number, number>;
192
- error: z<string, string>;
193
- }>, Schemastery.ObjectT<{
194
- state: z<string, string>;
195
- port: z<number, number>;
196
- error: z<string, string>;
197
- }>>;
198
- /** True while the bridge launches with a connect-mode flag
199
- * (`--browserUrl` / `--wsEndpoint`): no local executable is then launched
200
- * or probed, so the card mutes the picker. Base layer, never persisted. */
201
- carriesConnectionMode: z<boolean, boolean>;
202
- }>, Schemastery.ObjectT<{
203
- /** Flags appended after `npx -y <package>`; persisted last UI edit. An
204
- * executable-pinning flag is rejected: the executable is picked below. */
205
- extraFlags: z<string[], string[]>;
206
- /** Written by the UI **Search executables** button; the host reacts to it by
207
- * re-probing the saved rows and merging what it finds back into them. */
208
- refreshExecutablesNonce: z<number, number>;
209
- /** Written by the UI **Prelaunch Windows Chrome** button; the host reacts to it
210
- * by running the Windows launch: locate the Windows Chrome, prove the
211
- * mirrored-loopback prereq, launch it with a debugging port, and write the
212
- * `--browserUrl` connect entry that leaves the bridge in connect mode. */
213
- openWindowsChromeNonce: z<number, number>;
151
+ * (`"row-config"`) or nothing yet (""). */
152
+ effectiveSource: z<string, string, "volatile-defined">;
153
+ /** The canonical default extra-flags list — the list the card's **Restore
154
+ * defaults** control appends to what the editor holds. Mirror of
155
+ * `DEFAULT_EXTRA_FLAGS`, served so the card carries no copy of it. */
156
+ defaultExtraFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
157
+ /** The recommended WSL ↔ Windows extra-flags list — the list the card's
158
+ * **Flags WSL** control appends, missing entries only. Mirror of
159
+ * `WSL_EXTRA_FLAGS`, served so the card carries no copy of it. */
160
+ wslExtraFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
161
+ /** True while this Host runs under WSL and the selected executable is a
162
+ * Windows binary — the state the card's notice explains (see ./platform.ts). */
163
+ wslWindowsExecutable: z<boolean, boolean, "volatile-defined">;
164
+ /** What the **Prelaunch Windows Chrome** run is doing — the single field
165
+ * the card derives the button's state, its disabled reason and the pill's
166
+ * connect-mode muting from. Every half (locate, prereq, launch, port) lives
167
+ * Host-side (./windows/), so the card carries no list of Windows paths or
168
+ * reachability rules. */
169
+ windowsChromeStatus: z<NoInfer<Schemastery.ObjectS<NoInfer<{
170
+ state: z<string, string, "defined">;
171
+ port: z<number, number, "defined">;
172
+ error: z<string, string, "defined">;
173
+ }>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
174
+ state: z<string, string, "defined">;
175
+ port: z<number, number, "defined">;
176
+ error: z<string, string, "defined">;
177
+ }>>>, "volatile-defined">;
178
+ /** True while the bridge launches with a connect-mode flag (`--browserUrl`
179
+ * / `--wsEndpoint`): no local executable is then launched or probed, so the
180
+ * card mutes the picker. */
181
+ carriesConnectionMode: z<boolean, boolean, "volatile-defined">;
182
+ /** The flags a live connection of this component's own kinds actually
183
+ * launches with — mirrored from the last `resolve`, not from any layer, so
184
+ * the machine page states what is running rather than what was last
185
+ * configured. Empty while nothing resolves. */
186
+ runningFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
187
+ /** The note the last live connection answered with — where its console
188
+ * output goes, or the Windows URL it connected to. "" when the answer was
189
+ * silent. */
190
+ runningNote: z<string, string, "volatile-defined">;
191
+ }>>, Schemastery.ObjectT<NoInfer<{
192
+ serverName: z<string, string, "defined">;
193
+ command: z<string, string, "defined">;
194
+ package: z<string, string, "defined">;
195
+ /** Flags appended after `npx -y <package>`; the card's last UI edit. The
196
+ * field's own pattern is what refuses them (an entry that carries a control
197
+ * character never resolves, so a write is refused Host-side rather than
198
+ * landing in argv); an executable-pinning flag is rejected by the Host fold
199
+ * because the executable is picked below. */
200
+ extraFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
201
+ chromePaths: z<string[], string[], "defined">;
202
+ env: z<import("@deepseek-ai/cosmokit").Dict<string, string>, import("@deepseek-ai/cosmokit").Dict<string, string>, "defined">;
203
+ cwd: z<string, string, "defined">;
204
+ toolCallTimeoutMs: z<number, number, "defined">;
205
+ /** Ceiling for the bridge's server instructions (UTF-8 bytes, attribution
206
+ * included); an oversized description rejects the connection. Mirrors
207
+ * `dsh-mcp-client`'s own field and default (32768) — a passthrough for a
208
+ * server whose instructions run longer than the cap. */
209
+ maxInstructionBytes: z<number, number, "defined">;
210
+ failOnStartupError: z<boolean, boolean, "defined">;
211
+ reconnect: z<Schemastery.ObjectS<NoInfer<{
212
+ enabled: z<boolean, boolean, "defined">;
213
+ initialDelayMs: z<number, number, "defined">;
214
+ maxDelayMs: z<number, number, "defined">;
215
+ maxAttempts: z<number, number, "defined">;
216
+ }>>, Schemastery.ObjectT<NoInfer<{
217
+ enabled: z<boolean, boolean, "defined">;
218
+ initialDelayMs: z<number, number, "defined">;
219
+ maxDelayMs: z<number, number, "defined">;
220
+ maxAttempts: z<number, number, "defined">;
221
+ }>>, "plain">;
222
+ /** Bridge console-output routing: "log" (default) redirects the spawned
223
+ * npx child's inherited stderr into a per-spawn log file so its progress
224
+ * / startup lines stay out of the dsh console; "console" inherits it
225
+ * (debug). The card's "Reduce log output" toggle (`stderrMode`) overrides
226
+ * this. See {@link buildBridgeSpawn}. */
227
+ bridgeStderr: z<"log" | "console", "log" | "console", "defined">;
228
+ /** Log path override for "log" mode; "" = auto (see
229
+ * {@link bridgeStderrLogPath}). Absolute paths only. */
230
+ bridgeStderrLog: z<string, string, "defined">;
214
231
  /**
215
232
  * The executable the bridge launches with: picked in the picker (a saved
216
- * row's `id`) or seeded once by the host's first scan. "" = nothing resolved
217
- * yet — there is no auto state to fall back to.
233
+ * row's `id`) or seeded once by the Host's first scan. "" = nothing
234
+ * resolved yet — there is no auto state to fall back to.
218
235
  */
219
- chromePath: z<string, string>;
236
+ chromePath: z<string, string, "volatile-defined">;
220
237
  /** The picker's saved rows — `{ id: path, name: label }`, user-authored. The
221
- * host re-normalizes (trim, dedupe, caps) on every read, and a scan merges
238
+ * Host re-normalizes (trim, dedupe, caps) on every read, and a scan merges
222
239
  * what it discovers into them without dropping a name the user chose. */
223
- executables: z<({
240
+ executables: z<NoInfer<({
224
241
  id?: string | null | undefined;
225
242
  name?: string | null | undefined;
226
- } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
227
- id: z<string, string>;
228
- name: z<string, string>;
229
- }>[]>;
243
+ } & import("@deepseek-ai/cosmokit").Dict)[]>, NoInfer<Schemastery.ObjectT<NoInfer<{
244
+ id: z<string, string, "defined">;
245
+ name: z<string, string, "defined">;
246
+ }>>[]>, "volatile-defined">;
247
+ /** The ids of saved rows the user dropped. Every run folds what it found
248
+ * back into the rows, and the found list keeps answering a path the user
249
+ * just deleted, so without this record a dropped row stood back up on the
250
+ * very run the deletion queued (measured live 2026-10-12: the (x86)
251
+ * Windows-executable row read as a delete that never landed). Merge steps
252
+ * skip every id standing here; a list write carrying the id again clears
253
+ * it. Host-authored: the card never edits this field. */
254
+ droppedExecutables: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
230
255
  /**
231
256
  * **Legacy** MRU of hand-typed executables, newest first. The saved rows
232
- * replace it: a host whose settings still carry it folds its paths into the
233
- * rows during the first scan (see ./catalog.ts `mergeEntries`), so the field
234
- * is read once and never written again.
257
+ * replace it: a Host whose profile still carries it folds its paths into
258
+ * the rows during the first scan (see ./catalog.ts `mergeEntries`), so the
259
+ * field is read once and never written again.
235
260
  */
236
- chromeCustomPaths: z<string[], string[]>;
261
+ chromeCustomPaths: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
237
262
  /**
238
- * Persisted UI "Reduce log output" toggle: "log" captures the bridge's
263
+ * The card's "Reduce log output" toggle: "log" captures the bridge's
239
264
  * stderr into the log file, "console" echoes it (debug). "" follows the
240
- * row-config `bridgeStderr` (mirrored into `rowStderr`).
265
+ * row-config `bridgeStderr`.
266
+ */
267
+ stderrMode: z<string, string, "volatile-defined">;
268
+ /** The mode the bridge actually routes console output through — the UI
269
+ * toggle when it states one, else the row config. Mirrored live so the
270
+ * toggle never reads a phantom state (see `resolveStderrMode`). */
271
+ stderrEffective: z<"log" | "console", "log" | "console", "volatile-defined">;
272
+ /** Written by the card's **Fetch executables** button; the Host reacts by
273
+ * re-probing the saved rows and merging what it finds back into them. */
274
+ refreshExecutablesNonce: z<number, number, "volatile-defined">;
275
+ /** Written by the card's **Prelaunch Windows Chrome** button; the Host
276
+ * reacts by running the Windows launch: locate the Windows Chrome, prove
277
+ * the mirrored-loopback prereq, launch it with a debugging port, and write
278
+ * the `--browserUrl` connect entry that leaves the bridge in connect mode. */
279
+ openWindowsChromeNonce: z<number, number, "volatile-defined">;
280
+ /**
281
+ * Whether the translation of this row's **standalone** configuration was
282
+ * offered and turned down. Host-authored:
283
+ * the card never edits it — only the proposal's dismiss action does.
241
284
  */
242
- stderrMode: z<string, string>;
285
+ migrationDismissed: z<boolean, boolean, "volatile-defined">;
243
286
  /** Last check/connection failure, human-readable; empty when healthy. */
244
- lastError: z<string, string>;
287
+ lastError: z<string, string, "volatile-defined">;
245
288
  /** Known error: the last failure was "no Chrome executable detected". */
246
- chromeMissing: z<boolean, boolean>;
289
+ chromeMissing: z<boolean, boolean, "volatile-defined">;
247
290
  /** Executable-run counter (success or failure); completion signal for every
248
291
  * executable action the card can take. */
249
- executableDiscoveryRevision: z<number, number>;
292
+ executableDiscoveryRevision: z<number, number, "volatile-defined">;
250
293
  /** The version the **selected** executable answered with; "" when nothing
251
294
  * answered — nothing picked, a connect mode, or a blocked path. */
252
- chromeVersion: z<string, string>;
295
+ chromeVersion: z<string, string, "volatile-defined">;
253
296
  /** Per-row probe status keyed by path: the version the row answered with,
254
- * and the failure for a row that is present but not runnable (or blocked).
255
- * Base layer, never persisted — the rows themselves live in the user
256
- * layer. */
257
- executableStatus: z<({
297
+ * and the failure for a row that is present but not runnable (or blocked). */
298
+ executableStatus: z<NoInfer<({
258
299
  path?: string | null | undefined;
259
300
  version?: string | null | undefined;
260
301
  error?: string | null | undefined;
261
- } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<{
262
- path: z<string, string>;
263
- version: z<string, string>;
264
- error: z<string, string>;
265
- }>[]>;
266
- /** The path the bridge actually launches with ("" when nothing is fixed).
267
- * Base layer, never persisted. */
268
- effectiveChromePath: z<string, string>;
302
+ note?: string | null | undefined;
303
+ } & import("@deepseek-ai/cosmokit").Dict)[]>, NoInfer<Schemastery.ObjectT<NoInfer<{
304
+ path: z<string, string, "defined">;
305
+ version: z<string, string, "defined">;
306
+ error: z<string, string, "defined">;
307
+ note: z<string, string, "defined">;
308
+ }>>[]>, "volatile-defined">;
309
+ /** The path the bridge actually launches with ("" when nothing is fixed). */
310
+ effectiveChromePath: z<string, string, "volatile-defined">;
269
311
  /** Where `effectiveChromePath` came from — picked (`"selected"`), row config
270
- * (`"row-config"`) or nothing yet (""). Base layer, never persisted. */
271
- effectiveSource: z<string, string>;
272
- /** Row-config `bridgeStderr` in effect (static base layer; never
273
- * persisted) — the fallback when `stderrMode` is "". */
274
- rowStderr: z<"log" | "console", "log" | "console">;
275
- /** The canonical default extra-flags list (static base layer; never
276
- * persisted) — the list the card's **Restore defaults** control appends to
277
- * what the editor holds. Mirror of `DEFAULT_EXTRA_FLAGS`. */
278
- defaultExtraFlags: z<string[], string[]>;
279
- /** The recommended WSL ↔ Windows extra-flags list (static base layer;
280
- * never persisted) — the list the card's **Flags WSL** control appends to
281
- * what the editor holds, missing entries only. Mirror of
282
- * `WSL_EXTRA_FLAGS`. */
283
- wslExtraFlags: z<string[], string[]>;
284
- /** True while this host runs under WSL and the selected executable is a
285
- * Windows binary — the state the card's notice explains. Base layer, never
286
- * persisted (see ./platform.ts). */
287
- wslWindowsExecutable: z<boolean, boolean>;
288
- /** What the **Prelaunch Windows Chrome** run is doing (base layer; never
289
- * persisted) — the single field the card derives the button's state, its
290
- * disabled reason and the pill's connect-mode muting from. The locate,
291
- * prereq, launch and port answers all live host-side (./windows/), so
292
- * the card never carries a list of Windows paths or reachability rules. */
293
- windowsChromeStatus: z<Schemastery.ObjectS<{
294
- state: z<string, string>;
295
- port: z<number, number>;
296
- error: z<string, string>;
297
- }>, Schemastery.ObjectT<{
298
- state: z<string, string>;
299
- port: z<number, number>;
300
- error: z<string, string>;
301
- }>>;
302
- /** True while the bridge launches with a connect-mode flag
303
- * (`--browserUrl` / `--wsEndpoint`): no local executable is then launched
304
- * or probed, so the card mutes the picker. Base layer, never persisted. */
305
- carriesConnectionMode: z<boolean, boolean>;
306
- }>>;
312
+ * (`"row-config"`) or nothing yet (""). */
313
+ effectiveSource: z<string, string, "volatile-defined">;
314
+ /** The canonical default extra-flags list — the list the card's **Restore
315
+ * defaults** control appends to what the editor holds. Mirror of
316
+ * `DEFAULT_EXTRA_FLAGS`, served so the card carries no copy of it. */
317
+ defaultExtraFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
318
+ /** The recommended WSL ↔ Windows extra-flags list — the list the card's
319
+ * **Flags WSL** control appends, missing entries only. Mirror of
320
+ * `WSL_EXTRA_FLAGS`, served so the card carries no copy of it. */
321
+ wslExtraFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
322
+ /** True while this Host runs under WSL and the selected executable is a
323
+ * Windows binary — the state the card's notice explains (see ./platform.ts). */
324
+ wslWindowsExecutable: z<boolean, boolean, "volatile-defined">;
325
+ /** What the **Prelaunch Windows Chrome** run is doing — the single field
326
+ * the card derives the button's state, its disabled reason and the pill's
327
+ * connect-mode muting from. Every half (locate, prereq, launch, port) lives
328
+ * Host-side (./windows/), so the card carries no list of Windows paths or
329
+ * reachability rules. */
330
+ windowsChromeStatus: z<NoInfer<Schemastery.ObjectS<NoInfer<{
331
+ state: z<string, string, "defined">;
332
+ port: z<number, number, "defined">;
333
+ error: z<string, string, "defined">;
334
+ }>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
335
+ state: z<string, string, "defined">;
336
+ port: z<number, number, "defined">;
337
+ error: z<string, string, "defined">;
338
+ }>>>, "volatile-defined">;
339
+ /** True while the bridge launches with a connect-mode flag (`--browserUrl`
340
+ * / `--wsEndpoint`): no local executable is then launched or probed, so the
341
+ * card mutes the picker. */
342
+ carriesConnectionMode: z<boolean, boolean, "volatile-defined">;
343
+ /** The flags a live connection of this component's own kinds actually
344
+ * launches with — mirrored from the last `resolve`, not from any layer, so
345
+ * the machine page states what is running rather than what was last
346
+ * configured. Empty while nothing resolves. */
347
+ runningFlags: z<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
348
+ /** The note the last live connection answered with — where its console
349
+ * output goes, or the Windows URL it connected to. "" when the answer was
350
+ * silent. */
351
+ runningNote: z<string, string, "volatile-defined">;
352
+ }>>, "plain">;
353
+ /** What one row's configuration **form** answers with — every field resolved to a
354
+ * plain, nullable value (`TypeS`, not `TypeT`: the volatile fields stay plain here,
355
+ * they are not wrapped references). This is the stored/described shape: what a
356
+ * described settings row carries, and what the card reads out of its snapshot.
357
+ * What `apply` receives is **not** this shape — every `.volatile()` field of it
358
+ * arrives as a reference instead, which is why the host half carries its own
359
+ * runtime view in ./types/config.ts (`ChromeMcpConfig`). */
360
+ export type ConfigFormValues = Schemastery.TypeS<typeof Config>;
307
361
  //# sourceMappingURL=schema.d.ts.map