@comecaramelos/dsh-chrome-mcp 0.0.1 → 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 (214) hide show
  1. package/README.md +44 -95
  2. package/assets/dsh-chrome-mcp-social.png +0 -0
  3. package/assets/icon.svg +71 -0
  4. package/assets/prelaunch-windows-chrome.html +277 -0
  5. package/lib/client.js +3005 -568
  6. package/lib/client.js.map +7 -0
  7. package/lib/host/apply.d.ts +40 -0
  8. package/lib/host/apply.d.ts.map +1 -0
  9. package/lib/host/apply.js +57 -0
  10. package/lib/host/apply.js.map +1 -0
  11. package/lib/host/bridge.d.ts +74 -0
  12. package/lib/host/bridge.d.ts.map +1 -0
  13. package/lib/host/bridge.js +168 -0
  14. package/lib/host/bridge.js.map +1 -0
  15. package/lib/host/catalog.d.ts +31 -0
  16. package/lib/host/catalog.d.ts.map +1 -0
  17. package/lib/host/catalog.js +92 -0
  18. package/lib/host/catalog.js.map +1 -0
  19. package/lib/host/commands/chrome-path.d.ts +4 -0
  20. package/lib/host/commands/chrome-path.d.ts.map +1 -0
  21. package/lib/host/commands/chrome-path.js +65 -0
  22. package/lib/host/commands/chrome-path.js.map +1 -0
  23. package/lib/host/commands/chrome-refresh.d.ts +17 -0
  24. package/lib/host/commands/chrome-refresh.d.ts.map +1 -0
  25. package/lib/host/commands/chrome-refresh.js +37 -0
  26. package/lib/host/commands/chrome-refresh.js.map +1 -0
  27. package/lib/host/commands/index.d.ts +26 -0
  28. package/lib/host/commands/index.d.ts.map +1 -0
  29. package/lib/host/commands/index.js +41 -0
  30. package/lib/host/commands/index.js.map +1 -0
  31. package/lib/host/constants.d.ts +306 -0
  32. package/lib/host/constants.d.ts.map +1 -0
  33. package/lib/host/constants.js +319 -0
  34. package/lib/host/constants.js.map +1 -0
  35. package/lib/host/controller/_trace.d.ts +3 -0
  36. package/lib/host/controller/_trace.d.ts.map +1 -0
  37. package/lib/host/controller/_trace.js +14 -0
  38. package/lib/host/controller/_trace.js.map +1 -0
  39. package/lib/host/controller/bridge-run.d.ts +40 -0
  40. package/lib/host/controller/bridge-run.d.ts.map +1 -0
  41. package/lib/host/controller/bridge-run.js +85 -0
  42. package/lib/host/controller/bridge-run.js.map +1 -0
  43. package/lib/host/controller/captures.d.ts +15 -0
  44. package/lib/host/controller/captures.d.ts.map +1 -0
  45. package/lib/host/controller/captures.js +85 -0
  46. package/lib/host/controller/captures.js.map +1 -0
  47. package/lib/host/controller/commits.d.ts +4 -0
  48. package/lib/host/controller/commits.d.ts.map +1 -0
  49. package/lib/host/controller/commits.js +131 -0
  50. package/lib/host/controller/commits.js.map +1 -0
  51. package/lib/host/controller/connections.d.ts +38 -0
  52. package/lib/host/controller/connections.d.ts.map +1 -0
  53. package/lib/host/controller/connections.js +71 -0
  54. package/lib/host/controller/connections.js.map +1 -0
  55. package/lib/host/controller/controller.d.ts +35 -0
  56. package/lib/host/controller/controller.d.ts.map +1 -0
  57. package/lib/host/controller/controller.js +234 -0
  58. package/lib/host/controller/controller.js.map +1 -0
  59. package/lib/host/controller/index.d.ts +30 -0
  60. package/lib/host/controller/index.d.ts.map +1 -0
  61. package/lib/host/controller/index.js +27 -0
  62. package/lib/host/controller/index.js.map +1 -0
  63. package/lib/host/controller/notes.d.ts +26 -0
  64. package/lib/host/controller/notes.d.ts.map +1 -0
  65. package/lib/host/controller/notes.js +44 -0
  66. package/lib/host/controller/notes.js.map +1 -0
  67. package/lib/host/controller/persist.d.ts +16 -0
  68. package/lib/host/controller/persist.d.ts.map +1 -0
  69. package/lib/host/controller/persist.js +98 -0
  70. package/lib/host/controller/persist.js.map +1 -0
  71. package/lib/host/controller/publish.d.ts +4 -0
  72. package/lib/host/controller/publish.d.ts.map +1 -0
  73. package/lib/host/controller/publish.js +56 -0
  74. package/lib/host/controller/publish.js.map +1 -0
  75. package/lib/host/controller/runs.d.ts +80 -0
  76. package/lib/host/controller/runs.d.ts.map +1 -0
  77. package/lib/host/controller/runs.js +394 -0
  78. package/lib/host/controller/runs.js.map +1 -0
  79. package/lib/host/controller/state.d.ts +172 -0
  80. package/lib/host/controller/state.d.ts.map +1 -0
  81. package/lib/host/controller/state.js +2 -0
  82. package/lib/host/controller/state.js.map +1 -0
  83. package/lib/host/controller/windows-run.d.ts +17 -0
  84. package/lib/host/controller/windows-run.d.ts.map +1 -0
  85. package/lib/host/controller/windows-run.js +109 -0
  86. package/lib/host/controller/windows-run.js.map +1 -0
  87. package/lib/host/discovery/candidates.d.ts +47 -0
  88. package/lib/host/discovery/candidates.d.ts.map +1 -0
  89. package/lib/host/discovery/candidates.js +68 -0
  90. package/lib/host/discovery/candidates.js.map +1 -0
  91. package/lib/host/discovery/index.d.ts +19 -0
  92. package/lib/host/discovery/index.d.ts.map +1 -0
  93. package/lib/host/discovery/index.js +19 -0
  94. package/lib/host/discovery/index.js.map +1 -0
  95. package/lib/host/discovery/probe.d.ts +29 -0
  96. package/lib/host/discovery/probe.d.ts.map +1 -0
  97. package/lib/host/discovery/probe.js +155 -0
  98. package/lib/host/discovery/probe.js.map +1 -0
  99. package/lib/host/discovery/scan.d.ts +72 -0
  100. package/lib/host/discovery/scan.d.ts.map +1 -0
  101. package/lib/host/discovery/scan.js +195 -0
  102. package/lib/host/discovery/scan.js.map +1 -0
  103. package/lib/host/flags.d.ts +65 -0
  104. package/lib/host/flags.d.ts.map +1 -0
  105. package/lib/host/flags.js +186 -0
  106. package/lib/host/flags.js.map +1 -0
  107. package/lib/host/kind.d.ts +45 -0
  108. package/lib/host/kind.d.ts.map +1 -0
  109. package/lib/host/kind.js +251 -0
  110. package/lib/host/kind.js.map +1 -0
  111. package/lib/host/manager.d.ts +21 -0
  112. package/lib/host/manager.d.ts.map +1 -0
  113. package/lib/host/manager.js +113 -0
  114. package/lib/host/manager.js.map +1 -0
  115. package/lib/host/migration.d.ts +26 -0
  116. package/lib/host/migration.d.ts.map +1 -0
  117. package/lib/host/migration.js +127 -0
  118. package/lib/host/migration.js.map +1 -0
  119. package/lib/host/platform.d.ts +38 -0
  120. package/lib/host/platform.d.ts.map +1 -0
  121. package/lib/host/platform.js +64 -0
  122. package/lib/host/platform.js.map +1 -0
  123. package/lib/host/plugin-meta.d.ts +21 -0
  124. package/lib/host/plugin-meta.d.ts.map +1 -0
  125. package/lib/host/plugin-meta.js +21 -0
  126. package/lib/host/plugin-meta.js.map +1 -0
  127. package/lib/host/schema.d.ts +361 -0
  128. package/lib/host/schema.d.ts.map +1 -0
  129. package/lib/host/schema.js +196 -0
  130. package/lib/host/schema.js.map +1 -0
  131. package/lib/host/settings.d.ts +28 -0
  132. package/lib/host/settings.d.ts.map +1 -0
  133. package/lib/host/settings.js +91 -0
  134. package/lib/host/settings.js.map +1 -0
  135. package/lib/host/status.d.ts +25 -0
  136. package/lib/host/status.d.ts.map +1 -0
  137. package/lib/host/status.js +45 -0
  138. package/lib/host/status.js.map +1 -0
  139. package/lib/host/tool.d.ts +65 -0
  140. package/lib/host/tool.d.ts.map +1 -0
  141. package/lib/host/tool.js +52 -0
  142. package/lib/host/tool.js.map +1 -0
  143. package/lib/host/types/config.d.ts +101 -0
  144. package/lib/host/types/config.d.ts.map +1 -0
  145. package/lib/host/types/config.js +2 -0
  146. package/lib/host/types/config.js.map +1 -0
  147. package/lib/host/types/executable.d.ts +35 -0
  148. package/lib/host/types/executable.d.ts.map +1 -0
  149. package/lib/host/types/executable.js +9 -0
  150. package/lib/host/types/executable.js.map +1 -0
  151. package/lib/host/types/index.d.ts +24 -0
  152. package/lib/host/types/index.d.ts.map +1 -0
  153. package/lib/host/types/index.js +2 -0
  154. package/lib/host/types/index.js.map +1 -0
  155. package/lib/host/types/plugin.d.ts +38 -0
  156. package/lib/host/types/plugin.d.ts.map +1 -0
  157. package/lib/host/types/plugin.js +10 -0
  158. package/lib/host/types/plugin.js.map +1 -0
  159. package/lib/host/types/services.d.ts +26 -0
  160. package/lib/host/types/services.d.ts.map +1 -0
  161. package/lib/host/types/services.js +9 -0
  162. package/lib/host/types/services.js.map +1 -0
  163. package/lib/host/types/settings.d.ts +180 -0
  164. package/lib/host/types/settings.d.ts.map +1 -0
  165. package/lib/host/types/settings.js +2 -0
  166. package/lib/host/types/settings.js.map +1 -0
  167. package/lib/host/types/stderr.d.ts +51 -0
  168. package/lib/host/types/stderr.d.ts.map +1 -0
  169. package/lib/host/types/stderr.js +9 -0
  170. package/lib/host/types/stderr.js.map +1 -0
  171. package/lib/host/types/windows.d.ts +39 -0
  172. package/lib/host/types/windows.d.ts.map +1 -0
  173. package/lib/host/types/windows.js +9 -0
  174. package/lib/host/types/windows.js.map +1 -0
  175. package/lib/host/values.d.ts +204 -0
  176. package/lib/host/values.d.ts.map +1 -0
  177. package/lib/host/values.js +404 -0
  178. package/lib/host/values.js.map +1 -0
  179. package/lib/host/windows/connect-flags.d.ts +27 -0
  180. package/lib/host/windows/connect-flags.d.ts.map +1 -0
  181. package/lib/host/windows/connect-flags.js +97 -0
  182. package/lib/host/windows/connect-flags.js.map +1 -0
  183. package/lib/host/windows/index.d.ts +31 -0
  184. package/lib/host/windows/index.d.ts.map +1 -0
  185. package/lib/host/windows/index.js +30 -0
  186. package/lib/host/windows/index.js.map +1 -0
  187. package/lib/host/windows/landing.d.ts +47 -0
  188. package/lib/host/windows/landing.d.ts.map +1 -0
  189. package/lib/host/windows/landing.js +174 -0
  190. package/lib/host/windows/landing.js.map +1 -0
  191. package/lib/host/windows/link.d.ts +11 -0
  192. package/lib/host/windows/link.d.ts.map +1 -0
  193. package/lib/host/windows/link.js +52 -0
  194. package/lib/host/windows/link.js.map +1 -0
  195. package/lib/host/windows/paths.d.ts +64 -0
  196. package/lib/host/windows/paths.d.ts.map +1 -0
  197. package/lib/host/windows/paths.js +148 -0
  198. package/lib/host/windows/paths.js.map +1 -0
  199. package/lib/host/windows/run.d.ts +74 -0
  200. package/lib/host/windows/run.d.ts.map +1 -0
  201. package/lib/host/windows/run.js +211 -0
  202. package/lib/host/windows/run.js.map +1 -0
  203. package/lib/host/windows/spawn.d.ts +22 -0
  204. package/lib/host/windows/spawn.d.ts.map +1 -0
  205. package/lib/host/windows/spawn.js +73 -0
  206. package/lib/host/windows/spawn.js.map +1 -0
  207. package/lib/index.d.ts +102 -0
  208. package/lib/index.d.ts.map +1 -0
  209. package/lib/index.js +102 -636
  210. package/lib/index.js.map +1 -0
  211. package/locale/en.json +6 -0
  212. package/locale/zh.json +6 -0
  213. package/package.json +57 -14
  214. package/cordis.patch.yml +0 -5
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Types — the config `apply` receives, and the plugin context.
3
+ *
4
+ * One `Config` (./../schema.ts) carries everything: the ordinary row-config
5
+ * fields the card only reads, the user-authored fields the card edits, and the
6
+ * live answers the Host publishes. What matters to every consumer here is the
7
+ * *shape at runtime*: dsh 0.2.0 hands `apply` a reference for every
8
+ * `.volatile()` field and a plain value for every ordinary one, so reading a
9
+ * volatile field's type is not reading what it holds (see ./values.ts
10
+ * `readConfigField`). The two halves are typed apart for exactly that reason.
11
+ */
12
+ import type { Context } from "@deepseek-ai/cordis";
13
+ import type { BridgeStderrMode } from "./stderr.js";
14
+ import type { ChromeExecutableEntry, ChromeExecutableStatus, EffectiveChromeSource } from "./executable.js";
15
+ import type { WindowsChromeStatus } from "./windows.js";
16
+ /** A `.volatile()` field as `apply` hands it: a stable reference the fiber
17
+ * resolves live, or — the shape a hand-built config (or a test) hands — the plain
18
+ * value itself. Read it through `readConfigField` (./values.ts). */
19
+ export type ConfigField<T> = T | {
20
+ get(): T;
21
+ };
22
+ /**
23
+ * The validated row config as `apply` sees it: every ordinary field resolved to
24
+ * its final shape (the card reads them, it never edits them), every `.volatile()`
25
+ * field as a reference. This is the one config type the host half passes around —
26
+ * `buildServerArgs`, `checkChrome` and the bridge config all read ordinary
27
+ * fields directly and take the volatile ones through `readConfigField` or an
28
+ * explicit argument.
29
+ */
30
+ export type ChromeMcpConfig = {
31
+ serverName: string;
32
+ command: string;
33
+ package: string;
34
+ chromePaths: string[];
35
+ env: Record<string, string>;
36
+ cwd: string;
37
+ toolCallTimeoutMs: number;
38
+ /** Ceiling for the bridge's server instructions, in UTF-8 bytes (attribution
39
+ * included). A verbatim passthrough to the nested `dsh-mcp-client` row; a
40
+ * server whose instructions exceed it never connects. */
41
+ maxInstructionBytes: number;
42
+ failOnStartupError: boolean;
43
+ reconnect: ReconnectConfig;
44
+ /** Bridge console-output routing: "log" (default) redirects the child's
45
+ * stderr into a log file; "console" echoes it. The card's "Reduce log
46
+ * output" toggle (`stderrMode`) overrides this. */
47
+ bridgeStderr: BridgeStderrMode;
48
+ /** Optional absolute path for the stderr log ("" → the private per-process
49
+ * directory created by `mkdtemp`, holding `<serverName>-bridge.log`). */
50
+ bridgeStderrLog: string;
51
+ extraFlags: ConfigField<string[]>;
52
+ /** The executable the bridge launches with: a saved row's path the picker
53
+ * wrote, or one the Host seeded once. "" = nothing resolved yet. */
54
+ chromePath: ConfigField<string>;
55
+ /** The picker's saved rows, `{ id: path, name: label }`. */
56
+ executables: ConfigField<ChromeExecutableEntry[]>;
57
+ /** The ids of saved rows the user dropped — Host-authored, consulted by
58
+ * every merge step so a deleted row never comes back. */
59
+ droppedExecutables: ConfigField<string[]>;
60
+ /** **Legacy** MRU of hand-typed executables — read once, never written. */
61
+ chromeCustomPaths: ConfigField<string[]>;
62
+ /** The card's stderr toggle: "log"/"console"/"" (follow `bridgeStderr`). */
63
+ stderrMode: ConfigField<"" | BridgeStderrMode>;
64
+ /** The card's **Fetch executables** trigger. */
65
+ refreshExecutablesNonce: ConfigField<number>;
66
+ /** The card's **Prelaunch Windows Chrome** trigger. */
67
+ openWindowsChromeNonce: ConfigField<number>;
68
+ lastError: ConfigField<string>;
69
+ chromeMissing: ConfigField<boolean>;
70
+ executableDiscoveryRevision: ConfigField<number>;
71
+ chromeVersion: ConfigField<string>;
72
+ executableStatus: ConfigField<ChromeExecutableStatus[]>;
73
+ effectiveChromePath: ConfigField<string>;
74
+ effectiveSource: ConfigField<EffectiveChromeSource>;
75
+ stderrEffective: ConfigField<BridgeStderrMode>;
76
+ defaultExtraFlags: ConfigField<string[]>;
77
+ wslExtraFlags: ConfigField<string[]>;
78
+ wslWindowsExecutable: ConfigField<boolean>;
79
+ windowsChromeStatus: ConfigField<WindowsChromeStatus>;
80
+ carriesConnectionMode: ConfigField<boolean>;
81
+ /** The flags the live connection actually launches with (mirrored from the
82
+ * last resolve). */
83
+ runningFlags: ConfigField<string[]>;
84
+ /** The note the live connection answered with. */
85
+ runningNote: ConfigField<string>;
86
+ /** Whether the standalone-config translation was turned down (D4). */
87
+ migrationDismissed: ConfigField<boolean>;
88
+ };
89
+ /** Reconnect policy, mirroring the `dsh-mcp-client` bridge config. */
90
+ export type ReconnectConfig = {
91
+ enabled: boolean;
92
+ initialDelayMs: number;
93
+ maxDelayMs: number;
94
+ maxAttempts: number;
95
+ };
96
+ /**
97
+ * Plugin context as consumed by this host half. `ctx.effect`, `ctx.inject`,
98
+ * `ctx.plugin`, and `ctx.get` all come from cordis `Context` itself.
99
+ */
100
+ export type PluginContext = Context;
101
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/host/types/config.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/host/types/config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Types — the saved-executable rows and where the effective selection came from.
3
+ *
4
+ * The picker's catalog shape (the rows the card edits and a merged run extends)
5
+ * plus the per-path probe answer and the source tag, split out of the single
6
+ * `types.ts`.
7
+ */
8
+ /**
9
+ * One saved-executable catalog row: `id` is the path the bridge launches with,
10
+ * `name` the label the user chose for the UI ("" = render the path). Persisted —
11
+ * the reference plugin's executables catalog, same split.
12
+ */
13
+ export type ChromeExecutableEntry = {
14
+ id: string;
15
+ name: string;
16
+ };
17
+ /**
18
+ * What one saved row answered with, keyed by its id: the `--version` line
19
+ * (`""` when the probe answered nothing), the failure that makes the row not
20
+ * runnable (`""` when it runs), and the **note** that explains an executable
21
+ * this host offers without probing it. A note is not a failure: the path is
22
+ * there and usable, only not launchable *as a local executable* from here — the
23
+ * one case is a Windows `chrome.exe` on a WSL host, which the **Prelaunch
24
+ * Windows Chrome** run drives in connect mode. Base-layer status, never
25
+ * persisted — the rows themselves live in the user layer.
26
+ */
27
+ export type ChromeExecutableStatus = {
28
+ path: string;
29
+ version: string;
30
+ error: string;
31
+ note: string;
32
+ };
33
+ /** Where the effective executable came from (`effectiveSource`). */
34
+ export type EffectiveChromeSource = "selected" | "row-config" | "";
35
+ //# sourceMappingURL=executable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executable.d.ts","sourceRoot":"","sources":["../../../src/host/types/executable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oEAAoE;AACpE,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,GAAG,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types — the saved-executable rows and where the effective selection came from.
3
+ *
4
+ * The picker's catalog shape (the rows the card edits and a merged run extends)
5
+ * plus the per-path probe answer and the source tag, split out of the single
6
+ * `types.ts`.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=executable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executable.js","sourceRoot":"","sources":["../../../src/host/types/executable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Host-half shared types — the whole surface.
3
+ *
4
+ * Everything a module needs without importing its implementation, split into
5
+ * sections by concern and re-exported here so `from "./types/index.js"` still
6
+ * names all of it:
7
+ *
8
+ * ./stderr.ts where the bridge console goes + the stderr-wrapper shapes
9
+ * ./config.ts the config `apply` receives + reconnect + PluginContext
10
+ * ./executable.ts the saved-executable rows + source tag
11
+ * ./windows.ts the Prelaunch Windows Chrome run's states + outcome
12
+ * ./settings.ts the configuration form's layers, the live mirror, the service
13
+ * ./plugin.ts the bridge fiber + the tool-call captures
14
+ *
15
+ * Structural views stay narrow: only what the host half actually calls.
16
+ */
17
+ export type { BridgeStderrMode, BridgeStderrNotice, BridgeSpawnTarget, BridgeSpawnOptions, BridgeSpawnResult, BridgeStderrLogPathOptions } from "./stderr.js";
18
+ export type { ChromeMcpConfig, ConfigField, ReconnectConfig, PluginContext } from "./config.js";
19
+ export type { ChromeExecutableEntry, ChromeExecutableStatus, EffectiveChromeSource } from "./executable.js";
20
+ export type { WindowsChromeState, WindowsChromeStatus, WindowsChromeLinkAnswer, WindowsChromeRun } from "./windows.js";
21
+ export type { ConfigUserFields, ConfigLiveFields, ConfigLayerFields, ConfigLayers, SettingsForms, SettingsFormRow, SettingsPathOp, ChromeMcpForm } from "./settings.js";
22
+ export type { McpBridge, ToolCallExecution, ToolCallResult } from "./plugin.js";
23
+ export type { CommandDefinition, CommandInvocation, CommandResult } from "./services.js";
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/host/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9J,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAChG,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC5G,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACvH,YAAY,EACR,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,aAAa,EAChB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChF,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/host/types/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Types — the nested bridge fiber and the tool-call captures.
3
+ *
4
+ * The narrow structural views over the two things this host half listens on but
5
+ * does not own: the `dsh-mcp-client` bridge fiber its flag/executable changes
6
+ * drive, and the tool-call result/execution the post-execute listener sees. Split
7
+ * out of the single `types.ts`.
8
+ */
9
+ /**
10
+ * Nested `dsh-mcp-client` bridge fiber. `update` is the only method the host
11
+ * calls, but it is consumed through the fiber's own readiness: cordis restarts
12
+ * a fiber only while it is ACTIVE, so an update is chained on the settle.
13
+ */
14
+ export interface McpBridge {
15
+ update(config: unknown): unknown;
16
+ /** Cordis `Fiber & PromiseLike<Fiber>`: settles once the fiber does. */
17
+ then(onFulfilled?: (value: unknown) => unknown, onRejected?: (reason: unknown) => unknown): PromiseLike<unknown>;
18
+ }
19
+ /**
20
+ * Tool-call result as returned by the MCP tools-service (settled promise).
21
+ */
22
+ export interface ToolCallResult {
23
+ isError?: boolean;
24
+ content?: Array<{
25
+ type?: string;
26
+ text?: string;
27
+ }>;
28
+ error?: {
29
+ message?: string;
30
+ };
31
+ }
32
+ /**
33
+ * Tool call execution context as received by the post-execute listener.
34
+ */
35
+ export interface ToolCallExecution {
36
+ name: string;
37
+ }
38
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/host/types/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACtB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,wEAAwE;IACxE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CACpH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Types — the nested bridge fiber and the tool-call captures.
3
+ *
4
+ * The narrow structural views over the two things this host half listens on but
5
+ * does not own: the `dsh-mcp-client` bridge fiber its flag/executable changes
6
+ * drive, and the tool-call result/execution the post-execute listener sees. Split
7
+ * out of the single `types.ts`.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/host/types/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Structural views of the host services this half registers onto but does not
3
+ * own. The slash-command shapes come from the `commands` service — the headless
4
+ * mirror surface the card's two executable actions get; the service may be
5
+ * mounted after `apply` returns (hence the lazy injection) and may not be
6
+ * mounted at all on a host with no commands plane.
7
+ */
8
+ /** One slash-command invocation: the raw text after the command name. */
9
+ export type CommandInvocation = {
10
+ rawInput: string;
11
+ };
12
+ /** What a slash-command handler answers with — never thrown, always shown. */
13
+ export type CommandResult = {
14
+ kind: "success" | "error";
15
+ text: string;
16
+ };
17
+ /** The `commands` service definition shape, registered by name. */
18
+ export type CommandDefinition = {
19
+ name: string;
20
+ description: string;
21
+ input?: {
22
+ hint?: string;
23
+ };
24
+ handler: (invocation: CommandInvocation) => CommandResult | Promise<CommandResult>;
25
+ };
26
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/host/types/services.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yEAAyE;AACzE,MAAM,MAAM,iBAAiB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,mEAAmE;AACnE,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,OAAO,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACtF,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Structural views of the host services this half registers onto but does not
3
+ * own. The slash-command shapes come from the `commands` service — the headless
4
+ * mirror surface the card's two executable actions get; the service may be
5
+ * mounted after `apply` returns (hence the lazy injection) and may not be
6
+ * mounted at all on a host with no commands plane.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/host/types/services.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Types — the configuration form's layers, the live mirror, and the settings
3
+ * service surface the Host reads and writes through.
4
+ *
5
+ * Since dsh 0.2.0 there is one `Config` (./../schema.ts) and one form per profile
6
+ * row: the card edits the row's volatile fields, and every live answer the Host
7
+ * has to serve rides the very same references. So there is no separate persisted
8
+ * section and no base layer to publish over — what the Host reads for the fields
9
+ * it edits is one read of the row's two layers, and what it serves is one
10
+ * volatile commit of the mirror.
11
+ */
12
+ import type { BridgeStderrMode } from "./stderr.js";
13
+ import type { ChromeExecutableEntry, ChromeExecutableStatus, EffectiveChromeSource } from "./executable.js";
14
+ import type { WindowsChromeStatus } from "./windows.js";
15
+ /**
16
+ * The fields the card edits — the fields the Host persists, and the only ones
17
+ * whose commits the Host routes (a commit touching nothing here changes nothing
18
+ * the bridge runs with).
19
+ */
20
+ export type ConfigUserFields = {
21
+ extraFlags: string[];
22
+ /** Written by the card's **Fetch executables** action: one host run that
23
+ * re-probes the saved rows and folds what it finds back into them. */
24
+ refreshExecutablesNonce: number;
25
+ /** Written by the card's **Prelaunch Windows Chrome** button: one host run that
26
+ * locates the Windows Chrome, proves the mirrored-loopback prereq, launches
27
+ * it with a debugging port and leaves the bridge in connect mode. Same
28
+ * trigger idiom as `refreshExecutablesNonce` — an action travels as one write
29
+ * the Host reacts to, never a push channel. */
30
+ openWindowsChromeNonce: number;
31
+ /** The executable the bridge launches with: picked in the picker (a saved
32
+ * row's path), or seeded once by the host; "" = nothing resolved yet. There
33
+ * is no "auto" state to fall back to. */
34
+ chromePath: string;
35
+ /** The saved-executables rows: `{ id: path, name: label }`, the dropdown's
36
+ * catalog (see ./catalog.ts). User-authored; a scan merges what it finds
37
+ * into them without dropping a name the user chose. */
38
+ executables: ChromeExecutableEntry[];
39
+ /** The ids of saved rows the user dropped — Host-authored, never edited by
40
+ * the card, and read by every merge step so a deleted row is never folded
41
+ * back in (see ../controller/runs.ts). */
42
+ droppedExecutables: string[];
43
+ /** **Legacy** MRU of hand-typed executables (oldest drops off past
44
+ * `CUSTOM_PATHS_CAP`). Nothing writes it any more: the saved rows replace it,
45
+ * and a host whose profile still carries it folds its paths into the rows on
46
+ * the first run (see ./catalog.ts). */
47
+ chromeCustomPaths: string[];
48
+ /** The card's "Reduce log output" toggle: "log" captures the bridge's
49
+ * stderr into the log file, "console" echoes it. "" follows the row
50
+ * config `bridgeStderr`. */
51
+ stderrMode: "" | BridgeStderrMode;
52
+ };
53
+ /**
54
+ * The live mirror: what the Host answers through the same volatile references
55
+ * the card edits, and never persists. Every field here is a volatile field of the
56
+ * single `Config`, published by one commit per change batch.
57
+ */
58
+ export type ConfigLiveFields = {
59
+ /** Last check/connection failure, human-readable; "" when healthy. */
60
+ lastError: string;
61
+ /** The last failure was "no Chrome executable detected". */
62
+ chromeMissing: boolean;
63
+ /** Completion signal of one executable run (a merged scan, and the probe of
64
+ * what is selected that follows it). The one counter every executable action
65
+ * waits on. */
66
+ executableDiscoveryRevision: number;
67
+ /** The `--version` line the selected executable answered with; "" when
68
+ * nothing answered (nothing selected, a connect mode, a blocked path). */
69
+ chromeVersion: string;
70
+ /** Per-row probe status, keyed by path. Never persisted — the *rows*
71
+ * themselves are user-authored. */
72
+ executableStatus: ChromeExecutableStatus[];
73
+ /** Executable the bridge actually launches with; "" when nothing is fixed. */
74
+ effectiveChromePath: string;
75
+ /** Where `effectiveChromePath` came from. */
76
+ effectiveSource: EffectiveChromeSource;
77
+ /** The mode the bridge actually routes console output through — what the
78
+ * card's toggle is checked against, so it never reads a phantom state. */
79
+ stderrEffective: BridgeStderrMode;
80
+ /** The canonical default extra-flags list — what the card's Restore defaults
81
+ * action appends, keeping whatever the rows already carry. */
82
+ defaultExtraFlags: string[];
83
+ /** The recommended WSL ↔ Windows extra-flags list — what the card's **Flags
84
+ * WSL** action appends, missing entries only. */
85
+ wslExtraFlags: string[];
86
+ /** True while this Host runs under WSL **and** the effective executable is a
87
+ * Windows binary (see ./platform.ts) — the state the card's notice explains. */
88
+ wslWindowsExecutable: boolean;
89
+ /** What the **Prelaunch Windows Chrome** run is doing right now. The whole
90
+ * Windows path lives host-side, so the card renders this one field and
91
+ * carries no list of Windows paths or reachability rules. */
92
+ windowsChromeStatus: WindowsChromeStatus;
93
+ /** True while the bridge launches with a connect-mode flag
94
+ * (`--browserUrl` / `--wsEndpoint`): there is then no local executable to
95
+ * launch or probe, so the card mutes the picker instead of claiming a local
96
+ * selection the bridge is not running. */
97
+ carriesConnectionMode: boolean;
98
+ /** The flags the live connection actually launches with (mirrored from the
99
+ * last resolve) — what the machine page states as running, not what the
100
+ * layers were last configured with. Empty while nothing resolves. */
101
+ runningFlags: string[];
102
+ /** The note the live connection answered with — where its console output
103
+ * goes, or the debugging URL the Windows run connected to. */
104
+ runningNote: string;
105
+ };
106
+ /** One layer's answers: a field is absent when that layer said nothing. */
107
+ export type ConfigLayerFields = {
108
+ [K in keyof ConfigUserFields]?: ConfigUserFields[K];
109
+ };
110
+ /**
111
+ * One read of the form: what runs now (the references resolve the user layer over
112
+ * the row config, which is exactly what the bridge launches with) plus the two
113
+ * layers the distinction "did the user edit this, or does the row config say it"
114
+ * reads. Before the form is attached the references answer for both layers, so
115
+ * the first commit settles the distinction.
116
+ */
117
+ export type ConfigLayers = {
118
+ value: ConfigUserFields;
119
+ user: ConfigLayerFields;
120
+ base: ConfigLayerFields;
121
+ };
122
+ /**
123
+ * Surface of the `settings` service (`SettingsForms`) as consumed here. Typed
124
+ * structurally the way `tool.ts` types the tools service: the service lives in
125
+ * the loader's module table, and the Host only reads a described row, writes a
126
+ * patch and turns the generated page off. The patch row is keyed by the
127
+ * **profile entry id**, never by a namespace of the Host's own.
128
+ */
129
+ /**
130
+ * One ordered edit a write carries through `mutate`: a `set` names a field with
131
+ * a value; an `unset` returns the field to whatever the row config answers (an
132
+ * unset of a path no layer answers drops out of the stored row entirely — this
133
+ * is exactly how the Host clears its live-only fields back to their row-config
134
+ * answers; see ./values.ts `liveMirrorKeys`).
135
+ */
136
+ export type SettingsPathOp = {
137
+ op: "set";
138
+ path: readonly string[];
139
+ value: unknown;
140
+ } | {
141
+ op: "unset";
142
+ path: readonly string[];
143
+ };
144
+ export interface SettingsForms {
145
+ describe(options?: unknown): SettingsFormRow[];
146
+ /** Write one user-authored field into the row's own patch layer (the store
147
+ * dsh 0.2.0 uses instead of `settings.yaml`). Never called with a live field. */
148
+ update(entryId: string, patch: Record<string, unknown>, expectedRevision?: number): Promise<unknown> | unknown;
149
+ /** One ordered field edit; every edit addresses a volatile field, and an
150
+ * `unset` falls back to the row-config answer. The Host's write-backs go
151
+ * through this channel, carrying the live-only fields' clear alongside the
152
+ * one user field they write, so a live answer can never ride a write back
153
+ * into the stored layer (see ./values.ts). */
154
+ mutate(entryId: string, ops: readonly SettingsPathOp[], expectedRevision?: number): Promise<unknown> | unknown;
155
+ /** `auto: false` keeps the generated page off while the card owns the row's
156
+ * page. Disposable, and calling it twice for one fiber throws. */
157
+ configure(presentation: {
158
+ auto?: boolean;
159
+ }, owner?: unknown): () => void;
160
+ }
161
+ /** One described settings row (dsh-ancesters `readFormRow`), narrowed to what the Host consults. */
162
+ export interface SettingsFormRow {
163
+ /** The profile entry id this row is keyed by. */
164
+ ns: string;
165
+ /** Live effective value, Host live commits included. */
166
+ value?: unknown;
167
+ /** Composition base — what the row config carries under the user layer. */
168
+ base?: unknown;
169
+ /** What the profile patch carries (`{}` when it carries nothing). */
170
+ user?: unknown;
171
+ }
172
+ /** Everything the Host keeps about the form once it attaches. */
173
+ export interface ChromeMcpForm {
174
+ /** The row's profile entry id — the key every read and write goes through. */
175
+ entryId: string;
176
+ /** The form service itself (undefined on the cold path, where only the
177
+ * references answer). */
178
+ settings?: SettingsForms;
179
+ }
180
+ //# sourceMappingURL=settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/host/types/settings.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/host/types/settings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Types — bridge console-output routing and the per-spawn stderr wrapper.
3
+ *
4
+ * These types describe where the spawned bridge's console output goes and the
5
+ * shapes the wrapper is built from; the runtime lives in ./bridge.ts. Split out
6
+ * of the single `types.ts` so the stderr plumbing reads as one section.
7
+ */
8
+ /**
9
+ * Where the spawned bridge's console output goes. "log" (default) captures the
10
+ * child's inherited stderr into a per-spawn log file so the dsh console stays
11
+ * clean while stdout keeps flowing as the MCP protocol stream; "console"
12
+ * inherits it (debug). Mirrors the reference plugin's gateway stderr modes.
13
+ */
14
+ export type BridgeStderrMode = "log" | "console";
15
+ /** The spawn-diagnostics subset {@link noteStderr} reads. */
16
+ export type BridgeStderrNotice = {
17
+ redirect: string;
18
+ };
19
+ /** Spawn target consumed by {@link buildBridgeSpawn}. */
20
+ export type BridgeSpawnTarget = {
21
+ /** Executable the bridge runs (default `npx`). */
22
+ command: string;
23
+ /** Argv tail: `-y <package> [extraFlags]`, plus any appended path pin. */
24
+ args: string[];
25
+ /** Effective stderr routing; defaults to "log" when omitted. */
26
+ stderr?: BridgeStderrMode;
27
+ /** Explicit log path (""/undefined → the per-spawn default). */
28
+ logPath?: string;
29
+ /** Bridge server namespace (sanitized into the default log name). */
30
+ serverName?: string;
31
+ };
32
+ /** Options for {@link buildBridgeSpawn}. */
33
+ export type BridgeSpawnOptions = {
34
+ /** The Node that runs the wrapper; defaults to `process.execPath`. */
35
+ execPath?: string;
36
+ tmpdir?: string;
37
+ pid?: number;
38
+ };
39
+ /** One built bridge spawn: the (possibly wrapped) command/args plus where the
40
+ * stderr lands (`redirect`, "" when echoed). */
41
+ export type BridgeSpawnResult = {
42
+ command: string;
43
+ args: string[];
44
+ redirect: string;
45
+ };
46
+ /** Options for {@link bridgeStderrLogPath}. */
47
+ export type BridgeStderrLogPathOptions = {
48
+ tmpdir?: string;
49
+ pid?: number;
50
+ };
51
+ //# sourceMappingURL=stderr.d.ts.map
@@ -0,0 +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,CAAA;CAAE,CAAC;AAEtD,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,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;gDACgD;AAChD,MAAM,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"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types — bridge console-output routing and the per-spawn stderr wrapper.
3
+ *
4
+ * These types describe where the spawned bridge's console output goes and the
5
+ * shapes the wrapper is built from; the runtime lives in ./bridge.ts. Split out
6
+ * of the single `types.ts` so the stderr plumbing reads as one section.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=stderr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stderr.js","sourceRoot":"","sources":["../../../src/host/types/stderr.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Types — the **Prelaunch Windows Chrome** run's state machine and outcome.
3
+ *
4
+ * Everything the card derives the Windows button's state from: the single
5
+ * `windowsChromeStatus` base-layer field plus the run's own richer answer. Split
6
+ * out of the single `types.ts`; the run itself lives in ../windows/.
7
+ */
8
+ /**
9
+ * What the **Prelaunch Windows Chrome** run is currently doing — the single field
10
+ * the card derives the button's enabled state, its disabled reason and the
11
+ * pill's connect-mode muting from. Base-layer mirror (host state, never
12
+ * persisted).
13
+ *
14
+ * `not-applicable` is the non-WSL answer (nothing to drive off this host);
15
+ * `not-found`, `unreachable` and `launch-failed` are the run's failure states;
16
+ * `launching` covers both the launch and the wait for the port to bind.
17
+ */
18
+ export type WindowsChromeState = "off" | "launching" | "connected" | "unreachable" | "not-found" | "launch-failed" | "not-applicable";
19
+ /** The served Windows-Chrome status: the state machine, the debugging port it
20
+ * settled on (0 = none), and the failure line when the last answer failed. */
21
+ export type WindowsChromeStatus = {
22
+ state: WindowsChromeState;
23
+ port: number;
24
+ error: string;
25
+ };
26
+ /** One workspace-view link answer: created, moved, left alone (a real
27
+ * directory is already there), or unusable. */
28
+ export type WindowsChromeLinkAnswer = "linked" | "updated" | "kept" | "failed";
29
+ /** The outcome of one {@link runWindowsChromeConnect}: the same shape the base
30
+ * layer carries, plus the connect address the bridge has to run with for the
31
+ * state to be true ("" when there is nothing to connect to), and the
32
+ * Windows-side profile directory a successful run settled on ("" when the run
33
+ * never got that far) with the workspace-view link it refreshed. */
34
+ export type WindowsChromeRun = WindowsChromeStatus & {
35
+ url: string;
36
+ profileDir: string;
37
+ profileLink?: WindowsChromeLinkAnswer;
38
+ };
39
+ //# sourceMappingURL=windows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows.d.ts","sourceRoot":"","sources":["../../../src/host/types/windows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GACxB,KAAK,GACL,WAAW,GACX,WAAW,GACX,aAAa,GACb,WAAW,GACX,eAAe,GACf,gBAAgB,CAAC;AAEvB;8EAC8E;AAC9E,MAAM,MAAM,mBAAmB,GAAG;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7F;+CAC+C;AAC/C,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE/E;;;;oEAIoE;AACpE,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types — the **Prelaunch Windows Chrome** run's state machine and outcome.
3
+ *
4
+ * Everything the card derives the Windows button's state from: the single
5
+ * `windowsChromeStatus` base-layer field plus the run's own richer answer. Split
6
+ * out of the single `types.ts`; the run itself lives in ../windows/.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=windows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows.js","sourceRoot":"","sources":["../../../src/host/types/windows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}