@cline/core 0.0.73 → 0.0.74-nightly.1786676845

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 (38) hide show
  1. package/dist/ClineCore.d.ts +13 -3
  2. package/dist/cline-core/types.d.ts +2 -2
  3. package/dist/extensions/tools/runtime.d.ts +1 -0
  4. package/dist/hub/client/index.d.ts +15 -0
  5. package/dist/hub/client/managed-hub-build-watcher.d.ts +54 -0
  6. package/dist/hub/client/session-client.d.ts +2 -2
  7. package/dist/hub/daemon/entry.js +191 -187
  8. package/dist/hub/daemon/index.d.ts +19 -0
  9. package/dist/hub/daemon/shutdown-coordinator.d.ts +31 -0
  10. package/dist/hub/discovery/index.d.ts +57 -0
  11. package/dist/hub/discovery/workspace.d.ts +9 -0
  12. package/dist/hub/index.d.ts +1 -0
  13. package/dist/hub/index.js +178 -174
  14. package/dist/hub/runtime-host/hub-runtime-host.d.ts +1 -1
  15. package/dist/hub/server/hub-server-options.d.ts +14 -4
  16. package/dist/hub/server/hub-websocket-server.d.ts +1 -1
  17. package/dist/index.d.ts +2 -1
  18. package/dist/index.js +172 -168
  19. package/dist/runtime/host/local-runtime-host.d.ts +2 -2
  20. package/dist/runtime/host/runtime-host-support.d.ts +1 -1
  21. package/dist/runtime/host/runtime-host.d.ts +4 -4
  22. package/dist/runtime/orchestration/runtime-event-adapter.d.ts +1 -1
  23. package/dist/runtime/orchestration/session-runtime.d.ts +2 -1
  24. package/dist/services/agent-events.d.ts +25 -0
  25. package/dist/services/global-settings.d.ts +13 -1
  26. package/dist/services/telemetry/core-events.d.ts +3 -0
  27. package/dist/services/telemetry/index.js +1 -1
  28. package/dist/session/checkpoint-restore.d.ts +4 -4
  29. package/dist/session/display-messages.d.ts +28 -0
  30. package/dist/session/persisted-tool-result-content.d.ts +8 -0
  31. package/dist/session/services/persistence-service.d.ts +2 -2
  32. package/dist/session/session-snapshot.d.ts +2 -2
  33. package/dist/session/session-versioning-service.d.ts +4 -4
  34. package/dist/session/stores/session-manifest-store.d.ts +1 -1
  35. package/dist/session/team/team-child-session-manager.d.ts +2 -2
  36. package/dist/types.d.ts +2 -3
  37. package/package.json +4 -4
  38. package/dist/hub/daemon/shutdown-watchdog.d.ts +0 -13
@@ -66,7 +66,7 @@ export declare class HubRuntimeHost implements RuntimeHost {
66
66
  updated: boolean;
67
67
  }>;
68
68
  readSessionCompactionState(sessionId: string): Promise<SessionCompactionState | undefined>;
69
- readSessionMessages(sessionId: string): Promise<import("@cline/llms").Message[]>;
69
+ readSessionMessages(sessionId: string): Promise<import("@cline/llms").MessageWithMetadata[]>;
70
70
  dispatchHookEvent(_payload: HookEventPayload): Promise<void>;
71
71
  subscribe(listener: (event: CoreSessionEvent) => void, options?: RuntimeHostSubscribeOptions): () => void;
72
72
  private ensureSessionSubscription;
@@ -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. */
package/dist/index.d.ts CHANGED
@@ -56,7 +56,7 @@ export { cleanupConnectorInstanceViaCli } from "./services/connectors/connector-
56
56
  export { ADOPTED_POLL_INTERVAL_MS, ConnectorSupervisor, type ConnectorSupervisorDeps, getActiveConnectorSupervisor, RESTART_BASE_DELAY_MS, RESTART_COUNTER_RESET_MS, RESTART_GIVE_UP_AFTER, RESTART_MAX_DELAY_MS, STOP_SIGKILL_TIMEOUT_MS, STOP_SIGTERM_TIMEOUT_MS, setActiveConnectorSupervisor, } from "./services/connectors/connector-supervisor";
57
57
  export { FeatureFlagsService, type FeatureFlagsServiceOptions, NoOpFeatureFlagsProvider, } from "./services/feature-flags";
58
58
  export type { GlobalCompactionMode, GlobalCompactionStrategy, GlobalPlanActMode, GlobalSettings, } from "./services/global-settings";
59
- export { filterDisabledPluginPaths, filterDisabledTools, filterExtensionToolRegistrations, GlobalSettingsSchema, isAutoUpdateEnabledGlobally, isPluginDisabledGlobally, isTelemetryOptedOutGlobally, isToolDisabledGlobally, readCompactionModeGlobally, readCompactionStrategyGlobally, readGlobalSettings, readPlanActModeGlobally, readToolAutoApproveGlobally, readTuiThemeGlobally, resolveDisabledPluginPaths, resolveDisabledToolNames, setAutoUpdateEnabledGlobally, setCompactionModeGlobally, setCompactionStrategyGlobally, setDisabledPlugin, setDisabledTools, setPlanActModeGlobally, setTelemetryOptOutGlobally, setToolAutoApproveGlobally, setTuiThemeGlobally, toggleDisabledTool, writeGlobalSettings, } from "./services/global-settings";
59
+ export { filterDisabledPluginPaths, filterDisabledTools, filterExtensionToolRegistrations, GlobalSettingsSchema, isAutoUpdateEnabledGlobally, isModelToolEnabledGlobally, isPluginDisabledGlobally, isTelemetryOptedOutGlobally, isToolDisabledGlobally, readCompactionModeGlobally, readCompactionStrategyGlobally, readGlobalSettings, readPlanActModeGlobally, readToolAutoApproveGlobally, readTuiThemeGlobally, resolveDisabledPluginPaths, resolveDisabledToolNames, resolveModelToolSettings, setAutoUpdateEnabledGlobally, setCompactionModeGlobally, setCompactionStrategyGlobally, setDisabledPlugin, setDisabledTools, setModelToolEnabledGlobally, setPlanActModeGlobally, setTelemetryOptOutGlobally, setToolAutoApproveGlobally, setTuiThemeGlobally, toggleDisabledTool, writeGlobalSettings, } from "./services/global-settings";
60
60
  export type { MarketplaceActionResult, MarketplaceEntryInput, MarketplacePrimitiveType, MarketplaceSpawnCommand, MarketplaceSpawnResult, UninstallMarketplaceEntryOptions, } from "./services/marketplace";
61
61
  export { findInstalledGlobalMarketplaceSkillName, getGlobalMarketplaceSkillPaths, getMarketplaceSkillCandidates, isMarketplaceSkillInstalled, marketplaceEntryKey, resolveMarketplaceMcpServerName, uninstallMarketplaceEntry, uninstallMarketplaceMcpServerFromSettings, uninstallMarketplacePlugin, uninstallMarketplaceSkill, } from "./services/marketplace";
62
62
  export type { McpInstallOptions, McpInstallResult, McpUninstallOptions, McpUninstallResult, } from "./services/mcp-install";
@@ -90,6 +90,7 @@ export { InMemoryWorkspaceManager } from "./services/workspace/workspace-manager
90
90
  export { buildWorkspaceMetadata, generateWorkspaceInfo, generateWorkspaceInfoWithDiagnostics, normalizeWorkspacePath, } from "./services/workspace/workspace-manifest";
91
91
  export { buildCheckpointWorkspaceDiff, type CheckpointComparePlan, type CheckpointContentDiff, type CheckpointWorkspaceCompareResult, compareCheckpointToWorkspace, createCheckpointComparePlan, } from "./session/checkpoint-diff";
92
92
  export { createRestoredCheckpointMetadata, findCheckpointForRun, readSessionCheckpointHistory, trimMessagesBeforeUserRun, } from "./session/checkpoint-restore";
93
+ export { projectSessionMessagesForDisplay, type SessionDisplayMessage, } from "./session/display-messages";
93
94
  export { deriveSubsessionStatus, makeSubSessionId, makeTeamTaskSubSessionId, sanitizeSessionToken, } from "./session/models/session-graph";
94
95
  export type { SessionManifest } from "./session/models/session-manifest";
95
96
  export type { SessionRow } from "./session/models/session-row";