@cline/core 0.0.74 → 0.0.75
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.
- package/dist/ClineCore.d.ts +13 -3
- package/dist/cline-core/types.d.ts +2 -2
- package/dist/extensions/plugin/plugin-sandbox.d.ts +8 -0
- package/dist/extensions/plugin-sandbox-bootstrap.js +1 -1
- package/dist/extensions/tools/runtime.d.ts +1 -0
- package/dist/hub/client/index.d.ts +15 -0
- package/dist/hub/client/managed-hub-build-watcher.d.ts +10 -3
- package/dist/hub/client/session-client.d.ts +2 -2
- package/dist/hub/daemon/entry.js +189 -189
- package/dist/hub/daemon/index.d.ts +19 -0
- package/dist/hub/discovery/index.d.ts +42 -13
- package/dist/hub/discovery/workspace.d.ts +9 -0
- package/dist/hub/index.js +176 -176
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +177 -177
- package/dist/runtime/host/local-runtime-host.d.ts +2 -2
- package/dist/runtime/host/runtime-host-support.d.ts +1 -1
- package/dist/runtime/host/runtime-host.d.ts +4 -4
- package/dist/runtime/orchestration/runtime-event-adapter.d.ts +1 -1
- package/dist/runtime/orchestration/session-runtime.d.ts +2 -1
- package/dist/runtime/tools/subprocess-sandbox-lifecycle.d.ts +9 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +19 -0
- package/dist/services/global-settings.d.ts +13 -1
- package/dist/services/telemetry/index.js +1 -1
- package/dist/session/checkpoint-restore.d.ts +4 -4
- package/dist/session/display-messages.d.ts +28 -0
- package/dist/session/persisted-tool-result-content.d.ts +8 -0
- package/dist/session/services/persistence-service.d.ts +2 -2
- package/dist/session/session-snapshot.d.ts +2 -2
- package/dist/session/session-versioning-service.d.ts +4 -4
- package/dist/session/stores/session-manifest-store.d.ts +1 -1
- package/dist/session/team/team-child-session-manager.d.ts +2 -2
- package/dist/types.d.ts +2 -3
- package/package.json +4 -4
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { type HubEndpointOverrides } from "../discovery/defaults";
|
|
2
|
+
export declare const __test__: {
|
|
3
|
+
/** Retire attempts are module state keyed by URL; clear between cases. */
|
|
4
|
+
resetRetireAttempts(): void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Reads the discovery record the npm postinstall set aside (see
|
|
8
|
+
* apps/cli/script/postinstall.mjs). Deliberately bypasses readHubDiscovery —
|
|
9
|
+
* the file is best-effort recovery metadata, not a live record — and stays
|
|
10
|
+
* synchronous so it adds no async boundary to the ensure flow.
|
|
11
|
+
*
|
|
12
|
+
* Exported for `cline doctor`, which must not mistake a shielded live hub for
|
|
13
|
+
* a stale daemon just because its record is set aside.
|
|
14
|
+
*/
|
|
15
|
+
export declare function readSupersededHubDiscovery(discoveryPath: string): {
|
|
16
|
+
url?: string;
|
|
17
|
+
authToken?: string;
|
|
18
|
+
pid?: number;
|
|
19
|
+
} | undefined;
|
|
20
|
+
export type HubRetirementOutcome = "reusable" | "retired" | "deferred_busy" | "failed";
|
|
2
21
|
export declare function spawnDetachedHubServer(workspaceRoot: string, endpoint?: HubEndpointOverrides): void;
|
|
3
22
|
export declare function spawnDetachedHubServerWithRetry(workspaceRoot: string, endpoint?: HubEndpointOverrides): Promise<void>;
|
|
4
23
|
export declare function prewarmDetachedHubServer(workspaceRoot: string, endpoint?: HubEndpointOverrides & {
|
|
@@ -65,23 +65,52 @@ export type ManagedHubCompatibilityResult = {
|
|
|
65
65
|
export declare function getManagedHubCompatibility(record: HubProtocolMetadata & {
|
|
66
66
|
buildId?: string;
|
|
67
67
|
}, expectedBuildId?: string): ManagedHubCompatibilityResult;
|
|
68
|
+
export interface HubBuildIdentity {
|
|
69
|
+
buildId?: string;
|
|
70
|
+
buildEpochMs?: number;
|
|
71
|
+
coreVersion?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Total order over Hub builds: negative when `a` is older than `b`, positive
|
|
75
|
+
* when newer, zero when the two are indistinguishable.
|
|
76
|
+
*
|
|
77
|
+
* The ordering is what keeps concurrent installations from replacing each
|
|
78
|
+
* other's daemons. A one-sided "may I reuse this?" predicate lets both sides
|
|
79
|
+
* answer no, and two clients then retire each other's Hub forever; a total
|
|
80
|
+
* order is antisymmetric by construction, so at most one side can ever decide
|
|
81
|
+
* to retire. Every tier below preserves that: a field decides only when both
|
|
82
|
+
* records carry it, and the final fallback is "equal", which means reuse.
|
|
83
|
+
*
|
|
84
|
+
* Tiers, in order: identical build, embedded build epoch, core release
|
|
85
|
+
* version, then build id as a deterministic tiebreak.
|
|
86
|
+
*/
|
|
87
|
+
export declare function compareHubBuilds(a: HubBuildIdentity, b: HubBuildIdentity): number;
|
|
88
|
+
/**
|
|
89
|
+
* This build's own identity, in the same shape a daemon publishes into its
|
|
90
|
+
* discovery record.
|
|
91
|
+
*
|
|
92
|
+
* Self and peer identities must be built from the same fields. Enriching only
|
|
93
|
+
* the local side - filling in a `coreVersion` the wire record can omit, say -
|
|
94
|
+
* makes a build's identity depend on which role it is playing, and two
|
|
95
|
+
* installations then decide the comparison on different tiers and each
|
|
96
|
+
* conclude that it is the newer one. Callers that need a synthetic identity
|
|
97
|
+
* pass it verbatim rather than layering overrides onto this.
|
|
98
|
+
*/
|
|
99
|
+
export declare function resolveHubBuildIdentity(): HubBuildIdentity;
|
|
68
100
|
/**
|
|
69
101
|
* Whether a client may keep using a managed local Hub instead of retiring it.
|
|
70
102
|
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
103
|
+
* A Hub is retired only when this client's build is *strictly newer* by
|
|
104
|
+
* {@link compareHubBuilds}. Same build, newer Hub, and indistinguishable
|
|
105
|
+
* builds all attach over the compatible wire protocol and let the
|
|
106
|
+
* build-mismatch watcher prompt the user to update. Because the decision is
|
|
107
|
+
* derived from a total order, two installations can never retire each other.
|
|
108
|
+
*
|
|
109
|
+
* Genuine protocol incompatibility is unaffected: those Hubs cannot be spoken
|
|
110
|
+
* to at all and are still replaced.
|
|
78
111
|
*/
|
|
79
|
-
export declare function isManagedHubReusable(record: HubProtocolMetadata & {
|
|
80
|
-
|
|
81
|
-
buildEpochMs?: number;
|
|
82
|
-
}, options?: {
|
|
83
|
-
expectedBuildId?: string;
|
|
84
|
-
expectedBuildEpochMs?: number;
|
|
112
|
+
export declare function isManagedHubReusable(record: HubProtocolMetadata & HubBuildIdentity, options?: {
|
|
113
|
+
self?: HubBuildIdentity;
|
|
85
114
|
}): boolean;
|
|
86
115
|
export declare function resolveHubOwnerContext(ownerBasis?: string): HubOwnerContext;
|
|
87
116
|
export declare function createInMemoryHubOwnerContext(label?: string): HubOwnerContext;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { type HubOwnerContext } from ".";
|
|
2
2
|
export declare function resolveWorkspaceHubOwnerContext(workspaceRoot: string): HubOwnerContext;
|
|
3
|
+
/**
|
|
4
|
+
* Development builds change on every compile, so a single shared owner record
|
|
5
|
+
* puts every checkout and every rebuild in contention for one daemon - and the
|
|
6
|
+
* loser of that contention gets shut down mid-session. Scoping the owner by
|
|
7
|
+
* build id lets differing dev builds run their own Hub side by side instead of
|
|
8
|
+
* arbitrating over one. Production keeps a single owner (see
|
|
9
|
+
* {@link resolveProductionHubOwnerContext}), where the singleton matters and
|
|
10
|
+
* builds are ordered.
|
|
11
|
+
*/
|
|
3
12
|
export declare function resolveSharedHubOwnerContext(label?: string): HubOwnerContext;
|
|
4
13
|
export declare function resolveProductionHubOwnerContext(): HubOwnerContext;
|