@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
package/dist/cloud/types.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { AgentMode, HubEventEnvelope, MessageWithMetadata } from "@cline/shared";
|
|
2
2
|
import type { CloudSessionRecord, CreateCloudSessionInput } from "./api";
|
|
3
3
|
export type JsonRecord = Record<string, unknown>;
|
|
4
|
-
export type CloudCreationOptions = Pick<CreateCloudSessionInput, "autoApproveTools" | "thinking" | "reasoningEffort">;
|
|
4
|
+
export type CloudCreationOptions = Pick<CreateCloudSessionInput, "autoApproveTools" | "thinking" | "reasoningEffort" | "mode" | "workspaceRelativePath">;
|
|
5
|
+
export type CloudSendLifecycle = {
|
|
6
|
+
beforeDispatch?: () => void;
|
|
7
|
+
};
|
|
5
8
|
export type CloudHandoffSeed = {
|
|
6
9
|
sourceSessionId: string;
|
|
7
10
|
messages: MessageWithMetadata[];
|
|
@@ -43,6 +43,7 @@ export type EstimateMessageTokens = (message: MessageWithMetadata) => number;
|
|
|
43
43
|
*/
|
|
44
44
|
export declare function resolveEffectiveMaxInputTokens(input: Pick<ModelInfo, "maxInputTokens" | "contextWindow">): number | undefined;
|
|
45
45
|
export declare function truncateText(text: string, limit: number): string;
|
|
46
|
+
export declare function resolveProviderMaxInputTokens(providerConfig: ProviderConfig): number | undefined;
|
|
46
47
|
export declare function flattenToolResultContent(content: ToolResultContent["content"]): string;
|
|
47
48
|
export declare function truncateToolResultContentForCompaction(content: ToolResultContent["content"]): ToolResultContent["content"];
|
|
48
49
|
export declare function formatToolInput(input: Record<string, unknown>): string;
|
|
@@ -76,6 +76,13 @@ export declare function createImportedHistoryCompactionPrepareTurn(input: {
|
|
|
76
76
|
export declare function createCompactionStateAwarePrepareTurn(input: {
|
|
77
77
|
compact?: ContextPipelinePrepareTurn;
|
|
78
78
|
getState?: () => SessionCompactionState | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* The runtime's provider-request transform (extension message builders +
|
|
81
|
+
* `MessageBuilder.buildForApi`), i.e. what produced `context.apiMessages`
|
|
82
|
+
* from `context.messages`. Re-compaction swaps in a projected transcript
|
|
83
|
+
* and must estimate against its API-safe form, not the raw projection.
|
|
84
|
+
*/
|
|
85
|
+
prepareApiMessages: (messages: CoreCompactionContext["messages"]) => Promise<CoreCompactionContext["messages"]>;
|
|
79
86
|
/**
|
|
80
87
|
* Persist a freshly-computed compaction state. `sourceMessages` are the
|
|
81
88
|
* exact canonical messages the state's source-prefix hash was computed
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type MessageWithMetadata } from "@cline/shared";
|
|
2
|
+
import { type ConnectionConfig } from "../../services/llms/handler-factory";
|
|
3
|
+
export declare function summarizeConversation(options: {
|
|
4
|
+
messages: MessageWithMetadata[];
|
|
5
|
+
config: ConnectionConfig;
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ProviderConfig } from "../../types/provider-settings";
|
|
2
|
+
export declare function generateSummary(options: {
|
|
3
|
+
providerConfig: ProviderConfig;
|
|
4
|
+
systemPrompt: string;
|
|
5
|
+
request: string;
|
|
6
|
+
maxOutputChars?: number;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}): Promise<{
|
|
9
|
+
text: string;
|
|
10
|
+
reasoningChars: number;
|
|
11
|
+
failed: boolean;
|
|
12
|
+
usedTools: boolean;
|
|
13
|
+
incompleteReason: string | undefined;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { McpToolDescriptor } from "./types";
|
|
2
|
+
export declare const MCP_APPS_EXTENSION_ID = "io.modelcontextprotocol/ui";
|
|
3
|
+
export declare const MCP_APP_MIME_TYPE = "text/html;profile=mcp-app";
|
|
4
|
+
export declare const MCP_APP_RESOURCE_URI_SCHEME = "ui:";
|
|
5
|
+
export type McpAppToolVisibility = "model" | "app";
|
|
6
|
+
export interface McpAppToolMeta {
|
|
7
|
+
resourceUri?: string;
|
|
8
|
+
visibility: readonly McpAppToolVisibility[];
|
|
9
|
+
}
|
|
10
|
+
export declare function createMcpAppsClientCapabilities(): {
|
|
11
|
+
extensions: Record<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
export declare function isMcpAppResourceUri(uri: string): boolean;
|
|
14
|
+
export declare function getMcpAppToolMeta(tool: Pick<McpToolDescriptor, "_meta">): McpAppToolMeta | undefined;
|
|
15
|
+
export declare function isMcpToolVisibleToModel(tool: Pick<McpToolDescriptor, "_meta">): boolean;
|
|
16
|
+
export declare function isMcpToolVisibleToApp(tool: Pick<McpToolDescriptor, "_meta">): boolean;
|
|
@@ -9,6 +9,7 @@ export interface DefaultMcpServerClientFactoryOptions {
|
|
|
9
9
|
fetch?: FetchLike;
|
|
10
10
|
/** Keep literal configured headers on the declared MCP origin only. */
|
|
11
11
|
restrictConfiguredHeadersToOrigin?: boolean;
|
|
12
|
+
mcpApps?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export interface ProbeMcpServerConnectionOptions extends Omit<DefaultMcpServerClientFactoryOptions, "settingsPath"> {
|
|
14
15
|
serverName: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { McpAppToolMeta, McpAppToolVisibility } from "./apps";
|
|
2
|
+
export { createMcpAppsClientCapabilities, getMcpAppToolMeta, isMcpAppResourceUri, isMcpToolVisibleToApp, isMcpToolVisibleToModel, MCP_APP_MIME_TYPE, MCP_APPS_EXTENSION_ID, } from "./apps";
|
|
1
3
|
export type { DefaultMcpServerClientFactoryOptions, ProbeMcpServerConnectionOptions, ProbeMcpServerConnectionResult, } from "./client";
|
|
2
4
|
export { createDefaultMcpServerClientFactory, DEFAULT_MCP_CONNECT_TIMEOUT_MS, probeMcpServerConnection, } from "./client";
|
|
3
5
|
export type { LoadMcpSettingsOptions, McpSettingsFile, McpSettingsLockOptions, McpSettingsMutator, RegisterMcpServersFromSettingsOptions, SetMcpServerDisabledOptions, UpdateMcpServerOAuthStateOptions, } from "./config-loader";
|
|
@@ -9,6 +11,8 @@ export type { PluginMcpServerResolution } from "./plugin-server-registration";
|
|
|
9
11
|
export { normalizePluginMcpServerRegistration, resolvePluginMcpServerRegistrations, } from "./plugin-server-registration";
|
|
10
12
|
export type { CreateDisabledMcpToolPoliciesOptions, CreateDisabledMcpToolPolicyOptions, } from "./policies";
|
|
11
13
|
export { createDisabledMcpToolPolicies, createDisabledMcpToolPolicy, } from "./policies";
|
|
14
|
+
export type { CreateMcpAppsRuntimeOptions, McpAppResourceReadRequest, McpAppsRuntime, McpAppToolBinding, McpAppToolCallRequest, } from "./session-apps";
|
|
15
|
+
export { createMcpAppsRuntime } from "./session-apps";
|
|
12
16
|
export { augmentMcpTimeoutError } from "./timeout";
|
|
13
17
|
export { createMcpTools } from "./tools";
|
|
14
|
-
export type { CreateMcpToolsOptions, McpConnectionStatus, McpManager, McpManagerOptions, McpServerClient, McpServerClientFactory, McpServerOAuthClientConfig, McpServerOAuthState, McpServerOAuthStatus, McpServerRegistration, McpServerSnapshot, McpServerTransportConfig, McpSseTransportConfig, McpStdioTransportConfig, McpStreamableHttpTransportConfig, McpToolCallRequest, McpToolCallResult, McpToolDescriptor, McpToolNameTransform, McpToolProvider, } from "./types";
|
|
18
|
+
export type { CreateMcpToolsOptions, McpConnectionStatus, McpManager, McpManagerOptions, McpResourceContents, McpResourceReadRequest, McpResourceReadResult, McpServerClient, McpServerClientFactory, McpServerOAuthClientConfig, McpServerOAuthState, McpServerOAuthStatus, McpServerRegistration, McpServerSnapshot, McpServerTransportConfig, McpSseTransportConfig, McpStdioTransportConfig, McpStreamableHttpTransportConfig, McpToolCallRequest, McpToolCallResult, McpToolDescriptor, McpToolNameTransform, McpToolProvider, } from "./types";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { McpManager, McpManagerOptions, McpServerRegistration, McpServerSnapshot, McpToolCallRequest, McpToolCallResult, McpToolDescriptor } from "./types";
|
|
1
|
+
import type { McpManager, McpManagerOptions, McpResourceReadRequest, McpResourceReadResult, McpServerRegistration, McpServerSnapshot, McpToolCallRequest, McpToolCallResult, McpToolDescriptor } from "./types";
|
|
2
2
|
export declare class InMemoryMcpManager implements McpManager {
|
|
3
3
|
private readonly toolsCacheTtlMs;
|
|
4
4
|
private readonly clientFactory;
|
|
@@ -14,6 +14,7 @@ export declare class InMemoryMcpManager implements McpManager {
|
|
|
14
14
|
listTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
15
15
|
refreshTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
16
16
|
callTool(request: McpToolCallRequest): Promise<McpToolCallResult>;
|
|
17
|
+
readResource(request: McpResourceReadRequest): Promise<McpResourceReadResult>;
|
|
17
18
|
dispose(): Promise<void>;
|
|
18
19
|
private ensureConnectedClient;
|
|
19
20
|
private connectState;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { McpManager, McpResourceReadResult, McpToolCallResult, McpToolDescriptor, McpToolNameTransform } from "./types";
|
|
2
|
+
export interface McpAppToolBinding {
|
|
3
|
+
serverName: string;
|
|
4
|
+
toolName: string;
|
|
5
|
+
resourceUri: string;
|
|
6
|
+
}
|
|
7
|
+
export interface McpAppResourceReadRequest {
|
|
8
|
+
serverName: string;
|
|
9
|
+
uri: string;
|
|
10
|
+
}
|
|
11
|
+
export interface McpAppToolCallRequest {
|
|
12
|
+
serverName: string;
|
|
13
|
+
toolName: string;
|
|
14
|
+
arguments?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface McpAppsRuntime {
|
|
17
|
+
resolveTool(agentToolName: string): Promise<McpAppToolBinding | undefined>;
|
|
18
|
+
readResource(request: McpAppResourceReadRequest): Promise<McpResourceReadResult>;
|
|
19
|
+
callTool(request: McpAppToolCallRequest): Promise<McpToolCallResult>;
|
|
20
|
+
}
|
|
21
|
+
export interface CreateMcpAppsRuntimeOptions {
|
|
22
|
+
manager: Pick<McpManager, "listTools" | "callTool" | "readResource">;
|
|
23
|
+
serverNames: readonly string[];
|
|
24
|
+
agentTools: ReadonlyMap<string, readonly McpToolDescriptor[]>;
|
|
25
|
+
nameTransform?: McpToolNameTransform;
|
|
26
|
+
isToolEnabled?: (agentToolName: string) => boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function createMcpAppsRuntime(options: CreateMcpAppsRuntimeOptions): McpAppsRuntime;
|
|
@@ -3,6 +3,7 @@ export interface McpToolDescriptor {
|
|
|
3
3
|
name: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
inputSchema: Record<string, unknown>;
|
|
6
|
+
_meta?: Record<string, unknown>;
|
|
6
7
|
}
|
|
7
8
|
export interface McpToolCallRequest {
|
|
8
9
|
serverName: string;
|
|
@@ -11,6 +12,22 @@ export interface McpToolCallRequest {
|
|
|
11
12
|
context?: AgentToolContext;
|
|
12
13
|
}
|
|
13
14
|
export type McpToolCallResult = unknown;
|
|
15
|
+
export interface McpResourceReadRequest {
|
|
16
|
+
serverName: string;
|
|
17
|
+
uri: string;
|
|
18
|
+
context?: AgentToolContext;
|
|
19
|
+
}
|
|
20
|
+
export interface McpResourceContents {
|
|
21
|
+
uri: string;
|
|
22
|
+
mimeType?: string;
|
|
23
|
+
text?: string;
|
|
24
|
+
blob?: string;
|
|
25
|
+
_meta?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export interface McpResourceReadResult {
|
|
28
|
+
contents: McpResourceContents[];
|
|
29
|
+
_meta?: Record<string, unknown>;
|
|
30
|
+
}
|
|
14
31
|
export interface McpToolProvider {
|
|
15
32
|
listTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
16
33
|
callTool(request: McpToolCallRequest): Promise<McpToolCallResult>;
|
|
@@ -95,6 +112,10 @@ export interface McpServerClient {
|
|
|
95
112
|
arguments?: Record<string, unknown>;
|
|
96
113
|
context?: AgentToolContext;
|
|
97
114
|
}): Promise<McpToolCallResult>;
|
|
115
|
+
readResource?(request: {
|
|
116
|
+
uri: string;
|
|
117
|
+
context?: AgentToolContext;
|
|
118
|
+
}): Promise<McpResourceReadResult>;
|
|
98
119
|
}
|
|
99
120
|
export type McpServerClientFactory = (registration: McpServerRegistration) => Promise<McpServerClient> | McpServerClient;
|
|
100
121
|
export interface McpServerOAuthStatus {
|
|
@@ -123,5 +144,6 @@ export interface McpManager extends McpToolProvider {
|
|
|
123
144
|
listServers(): readonly McpServerSnapshot[];
|
|
124
145
|
refreshTools(serverName: string): Promise<readonly McpToolDescriptor[]>;
|
|
125
146
|
callTool(request: McpToolCallRequest): Promise<McpToolCallResult>;
|
|
147
|
+
readResource?(request: McpResourceReadRequest): Promise<McpResourceReadResult>;
|
|
126
148
|
dispose(): Promise<void>;
|
|
127
149
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AgentExtensionCommand } from "@cline/shared";
|
|
2
|
+
/** Record a command registered by a loaded plugin, from either execution mode. */
|
|
3
|
+
export declare function markPluginCommand(command: AgentExtensionCommand): AgentExtensionCommand;
|
|
4
|
+
/**
|
|
5
|
+
* Whether a registered command came from a loaded plugin. Session registries
|
|
6
|
+
* also hold built-in skill and workflow commands, which are not plugin commands.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isPluginCommand(command: AgentExtensionCommand): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentExtension, BasicLogger, PluginPolicies, PluginSetupContext, PluginStatusRecord, SessionPluginIssue } from "@cline/shared";
|
|
2
2
|
import type { PluginInitializationFailure, PluginInitializationWarning } from "./plugin-load-report";
|
|
3
|
+
export { isPluginCommand } from "./plugin-command-origin";
|
|
3
4
|
import type { PluginTargeting } from "./plugin-targeting";
|
|
4
5
|
export declare const DEFAULT_PLUGIN_IMPORT_TIMEOUT_MS = 4000;
|
|
5
6
|
export declare const DEFAULT_PLUGIN_SETUP_TIMEOUT_MS = 4000;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SubprocessSandboxLauncher } from "../../runtime/tools/subprocess-sandbox";
|
|
2
|
+
export declare const CLINE_PLUGIN_RUNTIME_DIR_ENV = "CLINE_PLUGIN_RUNTIME_DIR";
|
|
3
|
+
/** Core owns the bootstrap and SDK as one artifact for every host and transport. */
|
|
4
|
+
export declare function resolvePluginRuntimeDirectory(): string | undefined;
|
|
5
|
+
/** Let a compiled host launch plugin children with its embedded filesystem mounted. */
|
|
6
|
+
export declare function setPluginSandboxLauncher(launcher: SubprocessSandboxLauncher | undefined): void;
|
|
7
|
+
export declare function getPluginSandboxLauncher(): SubprocessSandboxLauncher | undefined;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type HubClientRegistration, type HubCommandEnvelope, type HubEventEnvelope, type HubReplyEnvelope } from "@cline/shared";
|
|
2
2
|
import { type HubOwnerContext } from "../discovery";
|
|
3
3
|
type HubCommandOptions = {
|
|
4
|
+
/** Whether transport recovery may resend a request after dispatch. */
|
|
5
|
+
retryAfterDispatch?: boolean;
|
|
4
6
|
timeoutMs?: number | null;
|
|
5
7
|
/** Synchronous local guard, checked after connection before each dispatch. */
|
|
6
8
|
beforeDispatch?: () => void;
|
|
@@ -121,6 +123,10 @@ export interface HubSessionActivity {
|
|
|
121
123
|
activeSessionCount: number;
|
|
122
124
|
/** Distinct client ids attached to those sessions. */
|
|
123
125
|
participantClientCount: number;
|
|
126
|
+
/** Plugin command requests executing even without an attached session. */
|
|
127
|
+
activePluginRequests: number;
|
|
128
|
+
/** Cloud session commands, such as provisioning, executing in the hub. */
|
|
129
|
+
activeCloudCommands: number;
|
|
124
130
|
}
|
|
125
131
|
/**
|
|
126
132
|
* Summarize live activity from a `session.list` payload. A session counts as
|
|
@@ -25,6 +25,8 @@ export interface ManagedHubBuildMismatchEvent {
|
|
|
25
25
|
activeSessionCount?: number;
|
|
26
26
|
/** Distinct clients attached to those sessions (best-effort, `outdated_hub` only). */
|
|
27
27
|
participantClientCount?: number;
|
|
28
|
+
/** Active plugin commands or catalog requests on the running Hub. */
|
|
29
|
+
activePluginRequests?: number;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* Probe the managed local Hub once and report whether a live Hub is running
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PluginCommandsApi } from "../../services/plugin-command-api";
|
|
2
|
+
import { type NodeHubClient } from "./index";
|
|
3
|
+
/** Uses the caller's existing connection. */
|
|
4
|
+
export declare function createHubPluginCommandsApi(client: Pick<NodeHubClient, "command">): PluginCommandsApi;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as LlmsProviders from "@cline/llms";
|
|
2
2
|
import type { AgendaAutomationPolicy, AgendaTaskListInput, AgendaTaskRecord, AgendaTaskRunRecord, ChatRunTurnRequest, ChatStartSessionRequest, ChatStartSessionResponse, ChatTurnResult, HubSessionSearchHit, HubTaskCreateInput, HubTaskUpdateInput, TeamProgressProjectionEvent } from "@cline/shared";
|
|
3
3
|
import type { CheckpointEntry } from "../../hooks/checkpoint-hooks";
|
|
4
|
+
import type { PluginCommandsApi } from "../../services/plugin-command-api";
|
|
4
5
|
type ScheduleClientRecord = Record<string, unknown> & {
|
|
5
6
|
metadata?: Record<string, unknown>;
|
|
6
7
|
};
|
|
@@ -57,6 +58,7 @@ export interface HubTeamProgressHandlers {
|
|
|
57
58
|
}
|
|
58
59
|
export declare class HubSessionClient {
|
|
59
60
|
private readonly client;
|
|
61
|
+
readonly pluginCommands: PluginCommandsApi;
|
|
60
62
|
constructor(options: HubSessionClientOptions);
|
|
61
63
|
connect(): Promise<void>;
|
|
62
64
|
private taskCommand;
|