@cline/core 0.0.81 → 0.0.82

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 (43) hide show
  1. package/dist/cron/runner/cron-runner.d.ts +14 -1
  2. package/dist/cron/service/schedule-service.d.ts +9 -1
  3. package/dist/cron/specs/cron-reconciler.d.ts +1 -1
  4. package/dist/cron/store/sqlite-cron-store.d.ts +17 -0
  5. package/dist/extensions/mcp/client.d.ts +1 -0
  6. package/dist/extensions/tools/executors/line-endings.d.ts +14 -2
  7. package/dist/extensions/tools/team/multi-agent.d.ts +7 -0
  8. package/dist/hub/client/index.d.ts +20 -3
  9. package/dist/hub/client/managed-hub-build-watcher.d.ts +8 -0
  10. package/dist/hub/client/session-client.d.ts +6 -1
  11. package/dist/hub/client/ui-client.d.ts +6 -1
  12. package/dist/hub/daemon/entry.js +297 -223
  13. package/dist/hub/daemon/index.d.ts +72 -0
  14. package/dist/hub/index.js +286 -212
  15. package/dist/hub/server/command-transport.d.ts +6 -0
  16. package/dist/hub/server/handlers/context.d.ts +2 -0
  17. package/dist/hub/server/handlers/session-handlers.d.ts +1 -0
  18. package/dist/hub/server/hub-server-options.d.ts +3 -0
  19. package/dist/hub/server/hub-server-transport.d.ts +1 -0
  20. package/dist/index.d.ts +3 -0
  21. package/dist/index.js +289 -215
  22. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +1 -0
  23. package/dist/services/global-settings.d.ts +2 -2
  24. package/dist/services/providers/local-provider-service.d.ts +1 -1
  25. package/dist/services/providers/provider-readiness.d.ts +10 -0
  26. package/dist/services/session-import/claude-code.d.ts +16 -0
  27. package/dist/services/session-import/codex.d.ts +34 -0
  28. package/dist/services/session-import/index.d.ts +6 -0
  29. package/dist/services/session-import/opencode.d.ts +25 -0
  30. package/dist/services/session-import/sanitize.d.ts +16 -0
  31. package/dist/services/session-import/service.d.ts +31 -0
  32. package/dist/services/session-import/types.d.ts +87 -0
  33. package/dist/services/workspace/agent-schedules-workspace.d.ts +8 -0
  34. package/dist/services/workspace/index.d.ts +1 -0
  35. package/dist/session/models/session-manifest.d.ts +1 -1
  36. package/dist/session/models/session-row.d.ts +10 -0
  37. package/dist/session/search/index.d.ts +1 -0
  38. package/dist/session/search/session-history-search.d.ts +51 -0
  39. package/dist/session/services/persistence-service.d.ts +10 -0
  40. package/dist/tasks/agenda-task-tool.d.ts +1 -1
  41. package/dist/tasks/task-tool.d.ts +3 -3
  42. package/dist/types/chat-schema.d.ts +2 -2
  43. package/package.json +4 -4
@@ -51,3 +51,75 @@ export interface DetachedHubResolution {
51
51
  export declare function ensureDetachedHubServer(workspaceRoot: string, endpointOverrides?: HubEndpointOverrides & {
52
52
  allowPortFallback?: boolean;
53
53
  }): Promise<DetachedHubResolution>;
54
+ export interface UpgradeManagedHubOptions {
55
+ workspaceRoot?: string;
56
+ /**
57
+ * How long to wait, after draining, for the hub's live sessions to finish
58
+ * before replacing it (`force`) or giving up (`still_busy`).
59
+ */
60
+ waitForIdleMs?: number;
61
+ /**
62
+ * Replace the hub even if sessions are still live once the wait expires.
63
+ * Only set this on a user-consented path: those sessions die mid-turn.
64
+ * Honored only once the hub has accepted the drain - a busy hub that
65
+ * refused the drain is never replaced, because the drain is what protects
66
+ * work started during the wait window.
67
+ */
68
+ force?: boolean;
69
+ /** Recorded as the hub's drain reason, visible in `hub.status`. */
70
+ reason?: string;
71
+ }
72
+ export type UpgradeManagedHubOutcome =
73
+ /** The running older hub was retired and a current-build hub is up. */
74
+ "replaced"
75
+ /** No live hub was found; a current-build hub was started. */
76
+ | "started"
77
+ /** The running hub already matches this build; nothing to do. */
78
+ | "already_current"
79
+ /**
80
+ * The running hub is newer than (or unorderable against) this build.
81
+ * Replacing it would downgrade another install's hub and reopen the
82
+ * mutual-retire loop (#13145), so it is refused; updating this client is
83
+ * the fix.
84
+ */
85
+ | "hub_not_older"
86
+ /** `force` was not set and sessions never finished - or the hub's
87
+ * activity could never be confirmed, which counts as busy here; the hub
88
+ * was un-drained and left running. */
89
+ | "still_busy";
90
+ export interface UpgradeManagedHubResult {
91
+ outcome: UpgradeManagedHubOutcome;
92
+ url?: string;
93
+ authToken?: string;
94
+ /**
95
+ * Live sessions observed on the old hub at decision time: the sessions
96
+ * that were interrupted (`replaced`) or that kept it running
97
+ * (`still_busy`). Omitted when the hub never answered the activity query.
98
+ */
99
+ activeSessionCount?: number;
100
+ }
101
+ /**
102
+ * Replace the managed local hub with one running this build, on the user's
103
+ * explicit say-so. This is the deliberate counterpart to the automatic
104
+ * replacement in `ensureDetachedHubServer`, which defers while the older hub
105
+ * is serving sessions: drain first (the hub refuses new work while in-flight
106
+ * turns get `waitForIdleMs` to finish), then the shared graceful retire
107
+ * ladder, then a fresh daemon. Drain-first is a guarantee, not a courtesy:
108
+ * this function retires a hub only under an accepted drain, because the
109
+ * drain is the admission barrier that keeps any busy or idle reading true
110
+ * through the retire. A hub that refuses the drain fails the upgrade
111
+ * outright - `force` does not override that, and neither does an idle
112
+ * reading, which without the drain is only a snapshot that a newly admitted
113
+ * session could invalidate before the retire lands. (Such a hub is still
114
+ * replaced by the automatic ensure path once idle at the next client
115
+ * startup, the pre-existing recovery route for hubs too old to serve
116
+ * /drain.) Activity readings that fail are treated as unknown, not idle:
117
+ * they never shorten the wait window, and without `force` an unconfirmed
118
+ * hub is handed back un-drained rather than retired.
119
+ *
120
+ * Never replaces a hub this build is not strictly newer than - the build
121
+ * total order guarantees at most one side of any install pair can reach the
122
+ * retire step, which is what keeps two mixed installs from taking turns
123
+ * "upgrading" the hub to their own build.
124
+ */
125
+ export declare function upgradeManagedHub(options?: UpgradeManagedHubOptions): Promise<UpgradeManagedHubResult>;