@cline/core 0.0.72 → 0.0.73

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,13 @@
1
+ /**
2
+ * Kept below the daemon retirement wait. A normal graceful shutdown should
3
+ * finish first; if Bun leaves node:http's close callback pending after a
4
+ * WebSocket upgrade, the daemon must still release its process promptly.
5
+ */
6
+ export declare const HUB_DAEMON_SHUTDOWN_DEADLINE_MS = 2000;
7
+ export interface HubDaemonShutdownWatchdogOptions {
8
+ deadlineMs: number;
9
+ exitCode: number;
10
+ onTimeout?: () => void;
11
+ exit?: (code: number) => void;
12
+ }
13
+ export declare function armHubDaemonShutdownWatchdog(options: HubDaemonShutdownWatchdogOptions): void;
@@ -1,3 +1,4 @@
1
+ import { type HubCompatibilityResult, type HubProtocolMetadata } from "@cline/shared";
1
2
  import { resolveClineDataDir, resolveClineDir } from "@cline/shared/storage";
2
3
  export interface HubServerDiscoveryRecord {
3
4
  hubId: string;
@@ -37,6 +38,24 @@ export interface HubOwnerContext {
37
38
  }
38
39
  export declare function createHubAuthToken(): string;
39
40
  export declare function resolveHubBuildId(): string;
41
+ export type ManagedHubCompatibilityResult = {
42
+ compatible: true;
43
+ } | {
44
+ compatible: false;
45
+ reason: Exclude<HubCompatibilityResult, {
46
+ compatible: true;
47
+ }>["reason"] | "missing_build" | "build_mismatch";
48
+ };
49
+ /**
50
+ * Compatibility for a managed local Hub discovered through Cline's owner
51
+ * record. Unlike explicit endpoints, a managed Hub is code that this client
52
+ * is responsible for keeping current, so wire compatibility alone is not
53
+ * enough: reusing a daemon from another build would keep executing stale
54
+ * runtime, scheduler, connector, and command-handler code after an upgrade.
55
+ */
56
+ export declare function getManagedHubCompatibility(record: HubProtocolMetadata & {
57
+ buildId?: string;
58
+ }, expectedBuildId?: string): ManagedHubCompatibilityResult;
40
59
  export declare function resolveHubOwnerContext(ownerBasis?: string): HubOwnerContext;
41
60
  export declare function createInMemoryHubOwnerContext(label?: string): HubOwnerContext;
42
61
  export declare function readHubDiscovery(discoveryPath: string): Promise<HubServerDiscoveryRecord | undefined>;