@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.
@@ -42,19 +42,29 @@ export interface HubWebSocketServerOptions {
42
42
  */
43
43
  logger?: BasicLogger;
44
44
  /**
45
- * Called after an authorized HTTP shutdown request is accepted and before
46
- * server teardown begins. Detached daemon hosts use this to bind process
47
- * lifetime to the server and arm a forced-exit deadline.
45
+ * Notifies the owning process of an authenticated `/shutdown` request before
46
+ * the server begins its memoized close. The daemon uses this to route HTTP,
47
+ * signals, and fatal errors through one shutdown coordinator.
48
48
  */
49
- onShutdownRequested?: () => void;
49
+ onShutdownRequested?: () => void | Promise<void>;
50
50
  }
51
51
  export interface HubWebSocketServer {
52
52
  host: string;
53
53
  port: number;
54
54
  url: string;
55
55
  authToken: string;
56
+ /**
57
+ * Starts the memoized two-phase close. Runtime/session teardown is exposed
58
+ * separately so daemon telemetry can remain available until it completes,
59
+ * even when the listener close is stalled by the runtime.
60
+ */
61
+ beginClose(): HubWebSocketServerClose;
56
62
  close(): Promise<void>;
57
63
  }
64
+ export interface HubWebSocketServerClose {
65
+ transportStopped: Promise<void>;
66
+ closed: Promise<void>;
67
+ }
58
68
  export interface EnsureHubWebSocketServerOptions extends HubWebSocketServerOptions {
59
69
  allowPortFallback?: boolean;
60
70
  }
@@ -1,6 +1,6 @@
1
1
  import type { EnsuredHubWebSocketServerResult, EnsureHubWebSocketServerOptions, HubWebSocketServer, HubWebSocketServerOptions } from "./hub-server-options";
2
2
  export { truncateNotificationBody } from "./hub-notifications";
3
- export type { EnsuredHubWebSocketServerResult, EnsureHubWebSocketServerOptions, HubWebSocketServer, HubWebSocketServerOptions, } from "./hub-server-options";
3
+ export type { EnsuredHubWebSocketServerResult, EnsureHubWebSocketServerOptions, HubWebSocketServer, HubWebSocketServerClose, HubWebSocketServerOptions, } from "./hub-server-options";
4
4
  export { HubServerTransport } from "./hub-server-transport";
5
5
  export declare function readBearerToken(value: string | string[] | undefined): string | null;
6
6
  /** @internal Exported for websocket auth tests. */