@cline/core 0.0.46 → 0.0.47

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.
@@ -1,9 +1,13 @@
1
1
  import { type HubEndpointOverrides } from "../discovery/defaults";
2
2
  export declare function spawnDetachedHubServer(workspaceRoot: string, endpoint?: HubEndpointOverrides): void;
3
3
  export declare function spawnDetachedHubServerWithRetry(workspaceRoot: string, endpoint?: HubEndpointOverrides): Promise<void>;
4
- export declare function prewarmDetachedHubServer(workspaceRoot: string, endpoint?: HubEndpointOverrides): void;
4
+ export declare function prewarmDetachedHubServer(workspaceRoot: string, endpoint?: HubEndpointOverrides & {
5
+ allowPortFallback?: boolean;
6
+ }): void;
5
7
  export interface DetachedHubResolution {
6
8
  url: string;
7
9
  authToken: string;
8
10
  }
9
- export declare function ensureDetachedHubServer(workspaceRoot: string, endpointOverrides?: HubEndpointOverrides): Promise<DetachedHubResolution>;
11
+ export declare function ensureDetachedHubServer(workspaceRoot: string, endpointOverrides?: HubEndpointOverrides & {
12
+ allowPortFallback?: boolean;
13
+ }): Promise<DetachedHubResolution>;
@@ -6,13 +6,13 @@ export interface StartHubServerOptions extends Omit<HubWebSocketServerOptions, "
6
6
  export interface EnsureHubServerOptions extends Omit<EnsureHubWebSocketServerOptions, "owner"> {
7
7
  }
8
8
  /**
9
- * Start a hub WebSocket server bound to the process-local shared owner
10
- * context. Callers that need a custom owner should invoke
9
+ * Start a hub WebSocket server bound to the default owner context for the
10
+ * current build environment. Callers that need a custom owner should invoke
11
11
  * {@link startHubWebSocketServer} directly.
12
12
  */
13
13
  export declare function startHubServer(options: StartHubServerOptions): Promise<HubServer>;
14
14
  /**
15
- * Ensure a hub WebSocket server is running in the process-local shared owner
16
- * context, reusing a compatible in-process instance when available.
15
+ * Ensure a hub WebSocket server is running in the default owner context for the
16
+ * current build environment, reusing a compatible in-process instance when available.
17
17
  */
18
18
  export declare function ensureHubServer(options: EnsureHubServerOptions): Promise<EnsureHubServerResult>;
@@ -2,6 +2,9 @@ import { resolveClineDataDir, resolveClineDir } from "@cline/shared/storage";
2
2
  export interface HubServerDiscoveryRecord {
3
3
  hubId: string;
4
4
  protocolVersion: string;
5
+ minClientProtocolVersion?: string;
6
+ maxClientProtocolVersion?: string;
7
+ capabilities?: readonly string[];
5
8
  coreVersion?: string;
6
9
  buildId?: string;
7
10
  authToken: string;
@@ -12,6 +15,22 @@ export interface HubServerDiscoveryRecord {
12
15
  startedAt: string;
13
16
  updatedAt: string;
14
17
  }
18
+ export type HubServerProbeRecord = {
19
+ protocolVersion: string;
20
+ minClientProtocolVersion?: string;
21
+ maxClientProtocolVersion?: string;
22
+ capabilities?: readonly string[];
23
+ coreVersion?: string;
24
+ buildId?: string;
25
+ host: string;
26
+ port: number;
27
+ url: string;
28
+ hubId?: string;
29
+ authToken?: string;
30
+ pid?: number;
31
+ startedAt?: string;
32
+ updatedAt?: string;
33
+ };
15
34
  export interface HubOwnerContext {
16
35
  ownerId: string;
17
36
  discoveryPath: string;
@@ -24,8 +43,11 @@ export declare function readHubDiscovery(discoveryPath: string): Promise<HubServ
24
43
  export declare function writeHubDiscovery(discoveryPath: string, record: HubServerDiscoveryRecord): Promise<void>;
25
44
  export declare function clearHubDiscovery(discoveryPath: string): Promise<void>;
26
45
  export declare function withHubStartupLock<T>(discoveryPath: string, callback: () => Promise<T>): Promise<T>;
27
- export declare function probeHubServer(url: string): Promise<HubServerDiscoveryRecord | undefined>;
46
+ export declare function probeHubServer(url: string, options?: {
47
+ authToken?: string;
48
+ }): Promise<HubServerProbeRecord | undefined>;
28
49
  export declare function createHubServerUrl(host: string, port: number, pathname?: string): string;
29
50
  export declare function toHubHealthUrl(wsUrl: string): string;
51
+ export declare function toHubStatusUrl(wsUrl: string): string;
30
52
  export declare function isDiscoveryFilePresent(pathname: string): boolean;
31
53
  export { resolveClineDataDir, resolveClineDir };
@@ -1,3 +1,4 @@
1
1
  import { type HubOwnerContext } from ".";
2
2
  export declare function resolveWorkspaceHubOwnerContext(workspaceRoot: string): HubOwnerContext;
3
3
  export declare function resolveSharedHubOwnerContext(label?: string): HubOwnerContext;
4
+ export declare function resolveProductionHubOwnerContext(): HubOwnerContext;