@cline/core 0.0.95 → 0.2.0
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 +6 -1
- package/dist/account/rpc.d.ts +3 -1
- package/dist/cline-core/runtime-services.d.ts +4 -2
- package/dist/cloud/controller.d.ts +5 -2
- package/dist/cloud/hub-client.d.ts +51 -0
- package/dist/cloud/hub-protocol.d.ts +18 -0
- package/dist/cloud/index.d.ts +2 -0
- package/dist/cloud/index.js +16 -16
- package/dist/cloud/types.d.ts +4 -1
- package/dist/extensions/context/compaction-shared.d.ts +1 -0
- package/dist/extensions/context/compaction.d.ts +7 -0
- package/dist/extensions/context/summarize-conversation.d.ts +7 -0
- package/dist/extensions/context/summary-generation.d.ts +14 -0
- package/dist/extensions/mcp/apps.d.ts +16 -0
- package/dist/extensions/mcp/client.d.ts +1 -0
- package/dist/extensions/mcp/index.d.ts +5 -1
- package/dist/extensions/mcp/manager.d.ts +2 -1
- package/dist/extensions/mcp/session-apps.d.ts +28 -0
- package/dist/extensions/mcp/types.d.ts +22 -0
- package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
- package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
- package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
- package/dist/hub/client/index.d.ts +6 -0
- package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
- package/dist/hub/client/plugin-commands.d.ts +4 -0
- package/dist/hub/client/session-client.d.ts +2 -0
- package/dist/hub/daemon/entry.js +241 -228
- package/dist/hub/index.d.ts +1 -0
- package/dist/hub/index.js +231 -218
- package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
- package/dist/hub/server/cloud-session-service.d.ts +50 -0
- package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
- package/dist/hub/server/handlers/context.d.ts +13 -2
- package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
- package/dist/hub/server/hub-server-options.d.ts +3 -0
- package/dist/hub/server/hub-server-transport.d.ts +2 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.js +278 -258
- package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
- package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-b1d8eb67.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-33qvrctr.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-paabhz8w.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-yhsfqcy1.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +21 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/community-gqgs7446.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-822304b0.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-hky2m2yx.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-sqf1kd37.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-tx1kp6xn.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-6cpgjxme.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-fxchqbze.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-m3bzwmzc.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-pr9sb5fr.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-nckraycx.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-w91yq3tm.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-xdyxc2tf.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-yxsvs11a.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/google-pgdk2dm9.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1160 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1147 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-02jpyn9y.js +85 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0cb4390m.js +137 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0f8xrhgt.js +209 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1f8vb421.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-28c7m0fv.js +16 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-2em3jg4q.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4n1zpzbe.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-54eea0ex.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5j92dtg5.js +16 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6akf3a5d.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6k6ep10s.js +136 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-71ym4q6s.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-91p1ghfk.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9qkpjy7x.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9swk4nej.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-aa2s5myc.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ae0ajw38.js +13 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bxvyzjhc.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bzy863k0.js +6 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d96n0s70.js +20 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-dsd6vt8c.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-e2q4azd9.js +119 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-egd18jj2.js +4 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-eh83hr16.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ev9r2dy3.js +1204 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f2mvvryf.js +190 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7gn5v3f.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7s1a560.js +12 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkhq3jtz.js +21 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-j8r18nfg.js +15 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-jhny555h.js +6 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m1gpa2eg.js +146 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m2ad6tgj.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m7mks2jq.js +4 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-mcnngj50.js +62 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-n2srkkh0.js +39 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nbs1tsny.js +142 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nqjnz7m4.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rmhzyxr8.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rtzf3vvk.js +6 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sw74pcm3.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t3eanyjj.js +3 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-tseksj1v.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v0ctpcdr.js +12 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-dx8bd4wq.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v695918t.js +14 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v96yy1pw.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vfm7r9wk.js +65 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xecthgrg.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xn1xhp06.js +9 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yfdscfdx.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yrnwqsdt.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-3mgy2y9y.js +473 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-w1xrs0vd.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-9tppg77c.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-y658kpzy.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-cmhqd91b.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-qkjjf8mm.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-8z6y9d1h.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-cfmja1ez.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-1t7n5sxj.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-k6yqgnyd.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-6rdyebbq.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/token-1h068py9.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-7jchft51.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-qfxfsrn4.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
- package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
- package/dist/plugin-runtime/package.json +1 -0
- package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
- package/dist/remote/remote-environments.d.ts +1 -0
- package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
- package/dist/runtime/host/local-runtime-host.d.ts +10 -0
- package/dist/runtime/host/runtime-host.d.ts +6 -0
- package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
- package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
- package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
- package/dist/services/llms/cline-recommended-models.d.ts +2 -0
- package/dist/services/local-runtime-bootstrap.d.ts +1 -0
- package/dist/services/plugin-command-api.d.ts +47 -0
- package/dist/services/plugin-commands.d.ts +25 -27
- package/dist/services/skills-cli.d.ts +2 -0
- package/dist/services/telemetry/core-events.d.ts +26 -0
- package/dist/services/telemetry/index.js +1 -1
- package/dist/services/telemetry/run-health.d.ts +40 -0
- package/dist/services/telemetry/stall-signals.d.ts +12 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/session.d.ts +7 -0
- package/package.json +6 -5
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { AgentResult, ITelemetryService } from "@cline/shared";
|
|
2
|
+
import type { McpAppResourceReadRequest, McpAppToolBinding, McpAppToolCallRequest, McpResourceReadResult, McpToolCallResult } from "../../extensions/mcp";
|
|
2
3
|
import type { HookEventPayload } from "../../hooks";
|
|
3
4
|
import type { RuntimeCapabilities } from "../../runtime/capabilities";
|
|
4
5
|
import type { ListSessionsOptions, PendingPromptsServiceApi, RestoreSessionInput, RestoreSessionResult, RuntimeHost, RuntimeHostSubscribeOptions, SendSessionInput, SessionConnectionUpdate, SessionUsageSummary, StartSessionInput, StartSessionResult } from "../../runtime/host/runtime-host";
|
|
6
|
+
import type { PluginCommandsApi } from "../../services/plugin-command-api";
|
|
5
7
|
import { type SessionCompactionState } from "../../session/models/session-compaction";
|
|
6
8
|
import type { CoreSettingsListInput, CoreSettingsMutationResult, CoreSettingsSnapshot, CoreSettingsToggleInput } from "../../settings";
|
|
7
9
|
import type { CoreSessionEvent } from "../../types/events";
|
|
@@ -20,6 +22,7 @@ export interface HubRuntimeHostOptions {
|
|
|
20
22
|
export declare class HubRuntimeHost implements RuntimeHost {
|
|
21
23
|
runtimeAddress: string;
|
|
22
24
|
readonly pendingPrompts: PendingPromptsServiceApi;
|
|
25
|
+
readonly pluginCommands: PluginCommandsApi;
|
|
23
26
|
private client;
|
|
24
27
|
private readonly clientOptions;
|
|
25
28
|
private readonly clientContext?;
|
|
@@ -51,6 +54,9 @@ export declare class HubRuntimeHost implements RuntimeHost {
|
|
|
51
54
|
private requestPendingPromptDelete;
|
|
52
55
|
getAccumulatedUsage(sessionId: string): Promise<SessionUsageSummary | undefined>;
|
|
53
56
|
abort(sessionId: string, reason?: unknown): Promise<void>;
|
|
57
|
+
resolveMcpAppTool(sessionId: string, toolName: string): Promise<McpAppToolBinding | undefined>;
|
|
58
|
+
readMcpAppResource(sessionId: string, request: McpAppResourceReadRequest): Promise<McpResourceReadResult>;
|
|
59
|
+
callMcpAppTool(sessionId: string, request: McpAppToolCallRequest): Promise<McpToolCallResult>;
|
|
54
60
|
proceedWhileRunning(sessionId: string, toolCallId?: string): Promise<number>;
|
|
55
61
|
stopSession(sessionId: string): Promise<void>;
|
|
56
62
|
dispose(): Promise<void>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BasicLogger, ITelemetryService } from "@cline/shared";
|
|
2
|
+
import { CloudSessionController } from "../../cloud/controller";
|
|
3
|
+
import type { CloudSessionEvent, CloudSessionSnapshot } from "../../cloud/types";
|
|
4
|
+
export interface HubCloudSessionServiceOptions {
|
|
5
|
+
publish: (event: CloudSessionEvent | undefined, version: {
|
|
6
|
+
serviceId: string;
|
|
7
|
+
revision: number;
|
|
8
|
+
scopeGeneration: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
logger?: BasicLogger;
|
|
11
|
+
telemetry?: ITelemetryService;
|
|
12
|
+
/** Test/embedding seams; the daemon uses persisted account credentials. */
|
|
13
|
+
getScope?: () => string | undefined;
|
|
14
|
+
createController?: () => CloudSessionController;
|
|
15
|
+
}
|
|
16
|
+
/** One account-scoped controller per hub, independent of connected viewers. */
|
|
17
|
+
export declare class HubCloudSessionService {
|
|
18
|
+
private readonly options;
|
|
19
|
+
private readonly serviceId;
|
|
20
|
+
private scopeGeneration;
|
|
21
|
+
private revision;
|
|
22
|
+
private organization?;
|
|
23
|
+
private organizationGeneration;
|
|
24
|
+
private controller?;
|
|
25
|
+
private scope?;
|
|
26
|
+
private closed;
|
|
27
|
+
private readonly snapshots;
|
|
28
|
+
private readonly tokenManager;
|
|
29
|
+
private readonly settings;
|
|
30
|
+
private readonly scopeTimer;
|
|
31
|
+
private readonly retiring;
|
|
32
|
+
activeCommands: number;
|
|
33
|
+
constructor(options: HubCloudSessionServiceOptions);
|
|
34
|
+
private currentScope;
|
|
35
|
+
private isCurrentScope;
|
|
36
|
+
private checkScope;
|
|
37
|
+
private getController;
|
|
38
|
+
private createController;
|
|
39
|
+
private publish;
|
|
40
|
+
snapshot(): {
|
|
41
|
+
serviceId: string;
|
|
42
|
+
revision: number;
|
|
43
|
+
scopeGeneration: number;
|
|
44
|
+
snapshots: CloudSessionSnapshot[];
|
|
45
|
+
};
|
|
46
|
+
private invalidateOrganization;
|
|
47
|
+
watch(): ReturnType<HubCloudSessionService["snapshot"]>;
|
|
48
|
+
command(operation: string, rawArgs: unknown, expectedScope: unknown): Promise<Record<string, unknown>>;
|
|
49
|
+
dispose(): Promise<void>;
|
|
50
|
+
}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import type { HubCommandEnvelope, HubReplyEnvelope } from "@cline/shared";
|
|
1
|
+
import type { HubCommandEnvelope, HubEventEnvelope, HubReplyEnvelope } from "@cline/shared";
|
|
2
2
|
import { type HubTransportContext } from "./context";
|
|
3
|
+
/**
|
|
4
|
+
* Shown to the user when a run fails because the client that owned one of its
|
|
5
|
+
* capabilities (hooks, client tools) went away mid-request. Client ids stay in
|
|
6
|
+
* the hub log (targetClientId), not in this text.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CAPABILITY_OWNER_GONE_MESSAGE = "The app running this task disconnected before it could respond. Reopen the task to continue.";
|
|
9
|
+
/**
|
|
10
|
+
* How long a request waits for its owner to reconnect under the same client
|
|
11
|
+
* id before failing: a little over the client's 5s reconnect backoff, so a
|
|
12
|
+
* brief socket drop doesn't end the run.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CAPABILITY_OWNER_RECONNECT_GRACE_MS = 7000;
|
|
15
|
+
/**
|
|
16
|
+
* Requests that waited for their owner to reconnect, to deliver to that owner
|
|
17
|
+
* now that it is subscribed again. Each is returned once.
|
|
18
|
+
*/
|
|
19
|
+
export declare function takeUndeliveredCapabilityEvents(ctx: HubTransportContext, clientId: string, sessionId?: string): HubEventEnvelope[];
|
|
3
20
|
export declare function requestCapability(ctx: HubTransportContext, sessionId: string, capabilityName: string, payload: Record<string, unknown>, targetClientId: string, onProgress?: (payload: Record<string, unknown>) => void): Promise<Record<string, unknown> | undefined>;
|
|
4
21
|
export declare function handleCapabilityProgress(ctx: HubTransportContext, envelope: HubCommandEnvelope): HubReplyEnvelope;
|
|
5
22
|
export declare function cancelPendingCapabilityRequests(ctx: HubTransportContext, filter: (request: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentExtension, AgentTool, HubClientRecord, HubCommandEnvelope, HubEventEnvelope, HubReplyEnvelope, SessionRecord as HubSessionRecord, ITelemetryService, JsonValue, SessionParticipant } from "@cline/shared";
|
|
2
|
-
import type { CommandExecutionRuntimeService, PendingPromptsRuntimeService, RuntimeHost, SessionConnectionRuntimeService, SessionUsageRuntimeService } from "../../../runtime/host/runtime-host";
|
|
2
|
+
import type { CommandExecutionRuntimeService, McpAppsRuntimeService, PendingPromptsRuntimeService, RuntimeHost, SessionConnectionRuntimeService, SessionUsageRuntimeService } from "../../../runtime/host/runtime-host";
|
|
3
3
|
import type { SessionHistorySearchService } from "../../../session/search";
|
|
4
4
|
import { type CoreSessionSnapshot } from "../../../session/session-snapshot";
|
|
5
5
|
import { type HubSessionState } from "../hub-session-records";
|
|
@@ -21,6 +21,11 @@ export type PendingCapabilityRequest = {
|
|
|
21
21
|
targetClientId: string;
|
|
22
22
|
capabilityName: string;
|
|
23
23
|
onProgress?: (payload: Record<string, unknown>) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Set while the owner is disconnected and the request has not reached it
|
|
26
|
+
* yet; delivered once when the owner subscribes again.
|
|
27
|
+
*/
|
|
28
|
+
undeliveredEvent?: HubEventEnvelope;
|
|
24
29
|
resolve: (result: {
|
|
25
30
|
ok: boolean;
|
|
26
31
|
payload?: Record<string, unknown>;
|
|
@@ -37,6 +42,12 @@ export interface HubTransportContext {
|
|
|
37
42
|
readonly sessionState: Map<string, HubSessionState>;
|
|
38
43
|
readonly pendingApprovals: Map<string, PendingApproval>;
|
|
39
44
|
readonly pendingCapabilityRequests: Map<string, PendingCapabilityRequest>;
|
|
45
|
+
/**
|
|
46
|
+
* Clients that explicitly detached from a session while staying connected.
|
|
47
|
+
* Capability requests aimed at them fail fast instead of waiting; attaching
|
|
48
|
+
* again clears the entry.
|
|
49
|
+
*/
|
|
50
|
+
readonly detachedClientsBySession?: Map<string, Set<string>>;
|
|
40
51
|
readonly suppressNextTerminalEventBySession: Map<string, string>;
|
|
41
52
|
/**
|
|
42
53
|
* Count of RPC-driven turns (`run.start` / session input commands)
|
|
@@ -53,7 +64,7 @@ export interface HubTransportContext {
|
|
|
53
64
|
readonly sessionTools?: readonly AgentTool[];
|
|
54
65
|
/** Hub-owned extensions injected into every local session runtime. */
|
|
55
66
|
readonly sessionExtensions?: readonly AgentExtension[];
|
|
56
|
-
readonly sessionHost: RuntimeHost & Partial<CommandExecutionRuntimeService & PendingPromptsRuntimeService & SessionUsageRuntimeService & SessionConnectionRuntimeService>;
|
|
67
|
+
readonly sessionHost: RuntimeHost & Partial<CommandExecutionRuntimeService & PendingPromptsRuntimeService & SessionUsageRuntimeService & SessionConnectionRuntimeService & McpAppsRuntimeService>;
|
|
57
68
|
/**
|
|
58
69
|
* While draining, new mutating work (session.create, run.*) is refused
|
|
59
70
|
* with the retryable `hub_draining` error so the Hub can be replaced at a
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HubCommandEnvelope, HubReplyEnvelope } from "@cline/shared";
|
|
2
|
+
import { type HubTransportContext } from "./context";
|
|
3
|
+
export declare function handleSessionMcpAppsResolveTool(ctx: HubTransportContext, envelope: HubCommandEnvelope): Promise<HubReplyEnvelope>;
|
|
4
|
+
export declare function handleSessionMcpAppsReadResource(ctx: HubTransportContext, envelope: HubCommandEnvelope): Promise<HubReplyEnvelope>;
|
|
5
|
+
export declare function handleSessionMcpAppsCallTool(ctx: HubTransportContext, envelope: HubCommandEnvelope): Promise<HubReplyEnvelope>;
|
|
@@ -6,9 +6,12 @@ import type { SessionHistorySearchOptions } from "../../session/search";
|
|
|
6
6
|
import type { CoreSettingsService } from "../../settings";
|
|
7
7
|
import type { AgendaTaskManagerOptions } from "../../tasks";
|
|
8
8
|
import type { HubOwnerContext } from "../discovery";
|
|
9
|
+
import type { HubCloudSessionServiceOptions } from "./cloud-session-service";
|
|
9
10
|
import type { HubEventLogOptions } from "./hub-event-log";
|
|
10
11
|
import type { HubRunQueueOptions } from "./hub-run-queue";
|
|
11
12
|
export interface HubWebSocketServerOptions {
|
|
13
|
+
/** Override cloud credentials/controller construction for embedded hubs. */
|
|
14
|
+
cloudSessionOptions?: Omit<HubCloudSessionServiceOptions, "publish">;
|
|
12
15
|
/** Hub-owned full-text session history index configuration. */
|
|
13
16
|
sessionSearchOptions?: SessionHistorySearchOptions;
|
|
14
17
|
/** Workspace authority assigned by the Hub to authenticated clients. */
|
|
@@ -32,8 +32,10 @@ export declare class HubServerTransport implements NativeHubTransport {
|
|
|
32
32
|
private runQueue?;
|
|
33
33
|
private runExecutor?;
|
|
34
34
|
private draining;
|
|
35
|
+
private readonly pendingPluginCommands;
|
|
35
36
|
private readonly plugins;
|
|
36
37
|
private unsubscribePluginStatus?;
|
|
38
|
+
private readonly cloud;
|
|
37
39
|
constructor(options: HubWebSocketServerOptions);
|
|
38
40
|
private startAgendaTaskSession;
|
|
39
41
|
private runAgendaTaskSession;
|
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export type { AgentPluginPackageDiagnostic, AgentPluginPackageDiagnosticScope, A
|
|
|
25
25
|
export { AGENT_PLUGINS_V1_MANIFEST_SCHEMA, AGENT_PLUGINS_V1_MCP_SCHEMA, CLINE_PLUGIN_BOOTSTRAP_PATH_ENV, discoverPluginModulePaths, formatSessionPluginIssue, getPluginDisplayName, getProcessPluginRegistry, loadAgentPluginFromPath, loadAgentPluginPackages, loadAgentPluginsFromPaths, loadAgentPluginsFromPathsWithDiagnostics, PluginCallTimeoutError, PluginRegistry, parseAgentSkillMarkdown, resolveAgentPluginPaths, resolveAgentPluginPathsWithDiagnostics, resolveAndLoadAgentPlugins, resolvePluginConfigSearchPaths, resolvePluginSkillDirectoriesFromPaths, } from "./extensions";
|
|
26
26
|
export type { AvailableRuntimeCommand, CreateInstructionWatcherOptions, CreateRulesConfigDefinitionOptions, CreateSkillsConfigDefinitionOptions, CreateUserInstructionConfigServiceOptions, CreateWorkflowsConfigDefinitionOptions, ParseMarkdownFrontmatterResult, ResolveRuntimeSlashCommandOptions, RuleConfig, SkillConfig, UnifiedConfigDefinition, UnifiedConfigFileCandidate, UnifiedConfigFileContext, UnifiedConfigRecord, UnifiedConfigWatcherEvent, UnifiedConfigWatcherOptions, UserInstructionConfig, UserInstructionConfigRecord, UserInstructionConfigService, UserInstructionConfigType, WorkflowConfig, } from "./extensions/config";
|
|
27
27
|
export { combineUserInstructionConfigServices, createRulesConfigDefinition, createSkillsConfigDefinition, createUserInstructionConfigService, createWorkflowsConfigDefinition, parseRuleConfigFromMarkdown, parseSkillConfigFromMarkdown, parseWorkflowConfigFromMarkdown, RULES_CONFIG_DIRECTORY_NAME, resolveRulesConfigSearchPaths, resolveSkillsConfigSearchPaths, resolveWorkflowsConfigSearchPaths, SKILLS_CONFIG_DIRECTORY_NAME, UnifiedConfigFileWatcher, WORKFLOWS_CONFIG_DIRECTORY_NAME, } from "./extensions/config";
|
|
28
|
-
export { type AuthorizeMcpServerOAuthOptions, type AuthorizeMcpServerOAuthResult, augmentMcpTimeoutError, authorizeMcpServerOAuth, type CreateDisabledMcpToolPoliciesOptions, type CreateDisabledMcpToolPolicyOptions, type CreateMcpToolsOptions, createDefaultMcpServerClientFactory, createDisabledMcpToolPolicies, createDisabledMcpToolPolicy, createMcpTools, DEFAULT_MCP_CONNECT_TIMEOUT_MS, type DefaultMcpServerClientFactoryOptions, getMcpServerOAuthState, getMcpServerOAuthStatus, hasMcpSettingsFile, InMemoryMcpManager, type LoadMcpSettingsOptions, listMcpServerOAuthStatuses, loadMcpSettingsFile, type McpConnectionStatus, type McpManager, type McpManagerOptions, McpOAuthClientChangedError, type McpServerClient, type McpServerClientFactory, type McpServerOAuthClientConfig, type McpServerOAuthState, type McpServerOAuthStatus, type McpServerRegistration, type McpServerSnapshot, type McpServerTransportConfig, type McpSettingsFile, type McpSettingsLockOptions, McpSettingsLockTimeoutError, type McpSettingsMutator, McpSettingsMutatorPurityError, McpSettingsUpdateSkippedError, type McpSseTransportConfig, type McpStdioTransportConfig, type McpStreamableHttpTransportConfig, type McpToolCallRequest, type McpToolCallResult, type McpToolDescriptor, type McpToolNameTransform, type McpToolProvider, type ProbeMcpServerConnectionOptions, type ProbeMcpServerConnectionResult, parseMcpServerRegistration, probeMcpServerConnection, type RegisterMcpServersFromSettingsOptions, registerMcpServersFromSettingsFile, resolveDefaultMcpSettingsPath, resolveMcpServerRegistration, resolveMcpServerRegistrations, type SetMcpServerDisabledOptions, setMcpServerDisabled, type UpdateMcpServerOAuthStateOptions, updateMcpServerOAuthState, updateMcpServerOAuthStateAsync, updateMcpSettingsFile, updateMcpSettingsFileSync, } from "./extensions/mcp";
|
|
28
|
+
export { type AuthorizeMcpServerOAuthOptions, type AuthorizeMcpServerOAuthResult, augmentMcpTimeoutError, authorizeMcpServerOAuth, type CreateDisabledMcpToolPoliciesOptions, type CreateDisabledMcpToolPolicyOptions, type CreateMcpAppsRuntimeOptions, type CreateMcpToolsOptions, createDefaultMcpServerClientFactory, createDisabledMcpToolPolicies, createDisabledMcpToolPolicy, createMcpAppsClientCapabilities, createMcpAppsRuntime, createMcpTools, DEFAULT_MCP_CONNECT_TIMEOUT_MS, type DefaultMcpServerClientFactoryOptions, getMcpAppToolMeta, getMcpServerOAuthState, getMcpServerOAuthStatus, hasMcpSettingsFile, InMemoryMcpManager, isMcpAppResourceUri, isMcpToolVisibleToApp, isMcpToolVisibleToModel, type LoadMcpSettingsOptions, listMcpServerOAuthStatuses, loadMcpSettingsFile, MCP_APP_MIME_TYPE, MCP_APPS_EXTENSION_ID, type McpAppResourceReadRequest, type McpAppsRuntime, type McpAppToolBinding, type McpAppToolCallRequest, type McpAppToolMeta, type McpAppToolVisibility, type McpConnectionStatus, type McpManager, type McpManagerOptions, McpOAuthClientChangedError, type McpResourceContents, type McpResourceReadRequest, type McpResourceReadResult, type McpServerClient, type McpServerClientFactory, type McpServerOAuthClientConfig, type McpServerOAuthState, type McpServerOAuthStatus, type McpServerRegistration, type McpServerSnapshot, type McpServerTransportConfig, type McpSettingsFile, type McpSettingsLockOptions, McpSettingsLockTimeoutError, type McpSettingsMutator, McpSettingsMutatorPurityError, McpSettingsUpdateSkippedError, type McpSseTransportConfig, type McpStdioTransportConfig, type McpStreamableHttpTransportConfig, type McpToolCallRequest, type McpToolCallResult, type McpToolDescriptor, type McpToolNameTransform, type McpToolProvider, type ProbeMcpServerConnectionOptions, type ProbeMcpServerConnectionResult, parseMcpServerRegistration, probeMcpServerConnection, type RegisterMcpServersFromSettingsOptions, registerMcpServersFromSettingsFile, resolveDefaultMcpSettingsPath, resolveMcpServerRegistration, resolveMcpServerRegistrations, type SetMcpServerDisabledOptions, setMcpServerDisabled, type UpdateMcpServerOAuthStateOptions, updateMcpServerOAuthState, updateMcpServerOAuthStateAsync, updateMcpSettingsFile, updateMcpSettingsFileSync, } from "./extensions/mcp";
|
|
29
29
|
export { type AgentTask, AgentTeam, AgentTeamsRuntime, type AgentTeamsRuntimeOptions, type BootstrapAgentTeamsOptions, type BootstrapAgentTeamsResult, bootstrapAgentTeams, buildConfiguredAgentToolDescriptors, buildConfiguredAgentToolName, buildDelegatedAgentConfig, buildTeamProgressSummary, type ConfiguredAgentConfig, type ConfiguredAgentInput, type ConfiguredAgentLoadResult, type ConfiguredAgentReadError, type ConfiguredAgentToolConfig, type ConfiguredAgentToolDescriptor, type CreateAgentTeamsToolsOptions, createAgentTeamsTools, createConfiguredAgentTools, createDelegatedAgent, createDelegatedAgentConfigProvider, createSpawnAgentTool, type DelegatedAgentConfigProvider, type DelegatedAgentConnectionConfig, type DelegatedAgentKind, type DelegatedAgentRuntimeConfig, loadConfiguredAgentConfigs, parseConfiguredAgentConfig, reviveTeamStateDates, type SpawnTeammateOptions, type SubAgentEndContext, type SubAgentStartContext, type TaskResult, type TeamEvent, type TeamMemberConfig, type TeamTeammateRuntimeConfig, toTeamProgressLifecycleEvent, } from "./extensions/tools/team";
|
|
30
30
|
export { createAgentHooksExtension, createHookAuditHooks, createHookConfigFileExtension, createHookConfigFileHooks, createSubprocessHooks, HOOK_CONFIG_FILE_EVENT_MAP, HOOKS_CONFIG_DIRECTORY_NAME, type HookConfigFileEntry, HookConfigFileName, type HookEventName, HookEventNameSchema, type HookEventPayload, HookEventPayloadSchema, listHookConfigFiles, mergeAgentHooks, parseHookEventPayload, type RunHookOptions, type RunHookResult, type RunSubprocessEventOptions, type RunSubprocessEventResult, resolveHooksConfigSearchPaths, runHook, runSubprocessEvent, type SubprocessHookControl, type SubprocessHooksOptions, toHookConfigFileName, } from "./hooks";
|
|
31
31
|
export type { CheckpointEntry, CheckpointMetadata, } from "./hooks/checkpoint-hooks";
|
|
@@ -65,8 +65,8 @@ export type { MarketplaceActionResult, MarketplaceEntryInput, MarketplacePrimiti
|
|
|
65
65
|
export { findInstalledGlobalMarketplaceSkillName, getGlobalMarketplaceSkillPaths, getMarketplaceSkillCandidates, isMarketplaceSkillInstalled, marketplaceEntryKey, resolveMarketplaceMcpServerName, uninstallMarketplaceEntry, uninstallMarketplaceMcpServerFromSettings, uninstallMarketplacePlugin, uninstallMarketplaceSkill, } from "./services/marketplace";
|
|
66
66
|
export type { McpInstallOptions, McpInstallResult, McpUninstallOptions, McpUninstallResult, } from "./services/mcp-install";
|
|
67
67
|
export { buildMcpInstallTransport, installMcpServer, parseMcpHeaders, parseMcpInstallArgs, uninstallMcpServer, } from "./services/mcp-install";
|
|
68
|
-
export type { PluginCommandResult,
|
|
69
|
-
export {
|
|
68
|
+
export type { PluginCommandCatalog, PluginCommandResult, PluginCommandsApi, PluginCommandTarget, PluginSlashCommand, } from "./services/plugin-command-api";
|
|
69
|
+
export { normalizePluginCommandName, parsePluginCommand, } from "./services/plugin-command-api";
|
|
70
70
|
export type { ParsedPluginSource, PluginInstallOptions, PluginInstallResult, PluginInstallSourceType, PluginMcpOAuthCandidate, } from "./services/plugin-install";
|
|
71
71
|
export { collectPluginMcpOAuthCandidates, installPlugin, isOfficialPluginSlug, parsePluginSource, } from "./services/plugin-install";
|
|
72
72
|
export type { PluginMcpSettingsMutation, PluginMcpSettingsSyncResult, RemovePluginMcpServersFromSettingsOptions, SyncPluginMcpServersToSettingsOptions, } from "./services/plugin-mcp-settings";
|
|
@@ -125,17 +125,21 @@ export { Agent, createAgentRuntime } from "@cline/agents";
|
|
|
125
125
|
export type { ConnectorsRequest } from "./extensions/composio/composio-meta-tools";
|
|
126
126
|
export { resolveComposioConnectionStatePath } from "./extensions/composio/composio-tools-extension";
|
|
127
127
|
export { createCompactionStateAwarePrepareTurn, createContextCompactionPrepareTurn, } from "./extensions/context/compaction";
|
|
128
|
+
export { summarizeConversation } from "./extensions/context/summarize-conversation";
|
|
129
|
+
export { CLINE_PLUGIN_RUNTIME_DIR_ENV, resolvePluginRuntimeDirectory, setPluginSandboxLauncher, } from "./extensions/plugin/plugin-runtime";
|
|
128
130
|
export { ALL_DEFAULT_TOOL_NAMES, type ApplyPatchExecutor, type ApplyPatchInput, type AskQuestionExecutor, type BuiltinToolAvailabilityContext, CommandExitError, CommandSpawnError, CommandTerminationError, type CreateBuiltinToolsOptions, type CreateDefaultToolsOptions, computePatchChanges, createApplyPatchExecutor, createBuiltinTools, createDefaultExecutors, createDefaultShellExecutor, createDefaultTools, createDefaultToolsWithPreset, createEditorExecutor, createShellExecutor, createShellTool, createToolPoliciesWithPreset, type DefaultExecutorsOptions, type DefaultToolName, DefaultToolNames, type DefaultToolsConfig, type EditFileInput, type EditorExecutor, type EditorExecutorOptions, getCoreAcpToolNames, getCoreBuiltinToolCatalog, getCoreDefaultEnabledToolIds, getCoreHeadlessToolNames, isCoreBuiltinToolAvailable, isSkillsToolAvailable, MAX_COMMAND_OUTPUT_CHARS, PATCH_MARKERS, PatchActionType, type PatchFileChange, resolveCoreSelectedToolIds, resolveToolClientType, type ShellExecutor, type ShellExecutorOptions, type StructuredCommandInput, StructuredCommandInputSchema, TEAM_TOOL_NAMES, type ToolCatalogEntry, type ToolClientType, type ToolExecutors, type ToolPolicyPresetName, type ToolPresetName, ToolPresets, truncateCommandOutput, } from "./extensions/tools";
|
|
131
|
+
export { createHubPluginCommandsApi } from "./hub/client/plugin-commands";
|
|
129
132
|
export * from "./remote/remote-environments";
|
|
130
133
|
export { ensureLoginShellPath } from "./remote/shell-path";
|
|
131
134
|
export { isClineAccountFeatureEnabled } from "./services/feature-flags/cline-account-feature-flags";
|
|
132
135
|
export { applyClineFeaturedModels, type ClineRecommendedModel, type ClineRecommendedModelsData, FALLBACK_CLINE_RECOMMENDED_MODELS, type FetchClineRecommendedModelsOptions, fetchClineRecommendedModels, getCachedClineRecommendedModels, peekClineRecommendedModels, resetClineRecommendedModelsCacheForTests, } from "./services/llms/cline-recommended-models";
|
|
133
|
-
export { clearLiveModelsCatalogCache, clearPrivateModelsCatalogCache, DEFAULT_MODELS_CATALOG_URL, getLiveModelsCatalog, getProviderConfig, isPrivateModelCatalogProvider, OPENAI_COMPATIBLE_PROVIDERS, resolveProviderConfig, } from "./services/llms/provider-defaults";
|
|
136
|
+
export { clearLiveModelsCatalogCache, clearPrivateModelsCatalogCache, clearPublicModelsCatalogCache, DEFAULT_MODELS_CATALOG_URL, getLiveModelsCatalog, getProviderConfig, isPrivateModelCatalogProvider, OPENAI_COMPATIBLE_PROVIDERS, resolveProviderConfig, } from "./services/llms/provider-defaults";
|
|
134
137
|
export type { AuthSettings, AwsSettings, AzureSettings, BuiltInProviderId, GcpSettings, ModelCatalogConfig, ModelCatalogSettings, OcaSettings, ProviderCapability, ProviderClient, ProviderConfig, ProviderDefaultsConfig, ProviderId, ProviderProtocol, ProviderSettings, ReasoningSettings, SapSettings, ToProviderConfigOptions, } from "./services/llms/provider-settings";
|
|
135
138
|
export { AuthSettingsSchema, AwsSettingsSchema, AzureSettingsSchema, BUILT_IN_PROVIDER, BUILT_IN_PROVIDER_IDS, createProviderConfig, GcpSettingsSchema, isBuiltInProviderId, ModelCatalogSettingsSchema, normalizeProviderId, OcaSettingsSchema, ProviderClientSchema, ProviderIdSchema, ProviderProtocolSchema, ProviderSettingsSchema, parseSettings, ReasoningSettingsSchema, SapSettingsSchema, safeCreateProviderConfig, safeParseSettings, toProviderConfig, } from "./services/llms/provider-settings";
|
|
136
139
|
export { defineLlmsConfig, loadLlmsConfigFromFile, } from "./services/llms/runtime-config";
|
|
137
140
|
export { createLlmsSdk, DefaultLlmsSdk, } from "./services/llms/runtime-registry";
|
|
138
141
|
export type { BuiltInProviderSummary, CreateHandlerInput, LlmsConfig, LlmsSdk, ProviderConfigDefaults, ProviderSelectionConfig, RegisterBuiltinProviderInput, RegisteredProviderSummary, RegisterModelInput, RegisterProviderInput, } from "./services/llms/runtime-types";
|
|
142
|
+
export { SKILLS_CLI_PACKAGE, SKILLS_CLI_VERSION } from "./services/skills-cli";
|
|
139
143
|
export { TelemetryService, type TelemetryServiceOptions, } from "./services/telemetry/TelemetryService";
|
|
140
144
|
export { createSessionCompactionState, parseSessionCompactionState, projectSessionCompactionState, type SessionCompactionState, } from "./session/models/session-compaction";
|
|
141
145
|
export type { RuntimeEnvironment } from "./types";
|