@cline/core 0.0.73 → 0.0.74

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.
@@ -0,0 +1,47 @@
1
+ export interface ManagedHubBuildMismatchEvent {
2
+ /** WebSocket URL of the live managed Hub that does not match this build. */
3
+ url: string;
4
+ /** Why this client should update: the running Hub is a newer build this
5
+ * client stays attached to, or it speaks an unsupported protocol. */
6
+ reason: "unsupported_protocol" | "build_mismatch";
7
+ /** Build identity reported by the running Hub, when it reports one. */
8
+ hubBuildId?: string;
9
+ /** Core package version reported by the running Hub. */
10
+ hubCoreVersion?: string;
11
+ /** Build identity this client expects a managed Hub to match. */
12
+ expectedBuildId: string;
13
+ }
14
+ /**
15
+ * Probe the managed local Hub once and report whether a live Hub is running
16
+ * a build this client cannot manage. Returns `undefined` when there is no
17
+ * discovery record, the recorded Hub is unreachable, a Hub startup
18
+ * transaction is in flight (another client may be mid-replacement), or the
19
+ * running Hub matches this build.
20
+ *
21
+ * A mismatch means another Cline installation replaced the shared Hub with a
22
+ * different build (for example, the CLI was updated while the desktop app
23
+ * kept running). This client can keep talking to it over the compatible wire
24
+ * protocol, but it should prompt the user to update and restart so client
25
+ * and Hub run the same code again.
26
+ */
27
+ export declare function checkManagedHubBuildMismatch(): Promise<ManagedHubBuildMismatchEvent | undefined>;
28
+ export interface WatchManagedHubBuildOptions {
29
+ onMismatch: (event: ManagedHubBuildMismatchEvent) => void;
30
+ intervalMs?: number;
31
+ }
32
+ /**
33
+ * Periodically watch the managed local Hub for a build-identity mismatch and
34
+ * invoke `onMismatch` when another Cline installation has replaced the Hub
35
+ * with a different build. Fires once per observed Hub build (it will fire
36
+ * again only if the Hub changes to yet another mismatched build after a
37
+ * compatible one was seen, or a different mismatch reason appears).
38
+ *
39
+ * Start this only for managed Hub usage. Hosts configured with an explicit
40
+ * Hub endpoint keep protocol-only compatibility and must not show update
41
+ * prompts, so the watcher refuses to start when `CLINE_HUB_PORT` is set.
42
+ * The first check runs after one interval so app startup (which may itself
43
+ * be replacing a stale Hub) has settled.
44
+ *
45
+ * Returns a stop function.
46
+ */
47
+ export declare function watchManagedHubBuildMismatch(options: WatchManagedHubBuildOptions): () => void;