@cline/shared 0.0.66 → 0.0.67
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/agents/types.d.ts +43 -11
- package/dist/extensions/contribution-registry.d.ts +12 -4
- package/dist/hub.d.ts +1 -1
- package/dist/index.browser.d.ts +2 -0
- package/dist/index.browser.js +18 -18
- package/dist/index.d.ts +2 -0
- package/dist/index.js +63 -63
- package/dist/llms/gateway.d.ts +4 -2
- package/dist/llms/model-info.d.ts +19 -0
- package/dist/llms/reasoning-effort.d.ts +3 -1
- package/dist/llms/reasoning-options.d.ts +41 -0
- package/dist/mcp.d.ts +24 -0
- package/dist/remote-config/index.js +1 -1
- package/dist/remote-config/schema.d.ts +0 -4
- package/dist/rpc/runtime.d.ts +2 -1
- package/package.json +1 -1
package/dist/llms/gateway.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AgentMessage, AgentModelEvent, AgentToolDefinition } from "../agen
|
|
|
2
2
|
import type { BasicLogger } from "../logging/logger";
|
|
3
3
|
import type { ProviderCapability, ProviderConfigField } from "../rpc/runtime";
|
|
4
4
|
import type { ITelemetryService } from "../services/telemetry";
|
|
5
|
+
import type { ModelReasoningOption, ReasoningEffort } from "./reasoning-options";
|
|
5
6
|
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
6
7
|
[key: string]: JsonValue | undefined;
|
|
7
8
|
};
|
|
@@ -60,6 +61,7 @@ export interface GatewayModelDefinition {
|
|
|
60
61
|
maxInputTokens?: number;
|
|
61
62
|
maxOutputTokens?: number;
|
|
62
63
|
capabilities?: readonly GatewayModelCapability[];
|
|
64
|
+
reasoningOptions?: readonly ModelReasoningOption[];
|
|
63
65
|
metadata?: Record<string, JsonValue | undefined>;
|
|
64
66
|
}
|
|
65
67
|
export interface GatewayProviderManifest {
|
|
@@ -130,7 +132,7 @@ export interface GatewayStreamRequest {
|
|
|
130
132
|
metadata?: Record<string, unknown>;
|
|
131
133
|
reasoning?: {
|
|
132
134
|
enabled?: boolean;
|
|
133
|
-
effort?:
|
|
135
|
+
effort?: ReasoningEffort;
|
|
134
136
|
budgetTokens?: number;
|
|
135
137
|
};
|
|
136
138
|
signal?: AbortSignal;
|
|
@@ -152,7 +154,7 @@ export interface GatewayModelHandleOptions {
|
|
|
152
154
|
metadata?: Record<string, unknown>;
|
|
153
155
|
reasoning?: {
|
|
154
156
|
enabled?: boolean;
|
|
155
|
-
effort?:
|
|
157
|
+
effort?: ReasoningEffort;
|
|
156
158
|
budgetTokens?: number;
|
|
157
159
|
};
|
|
158
160
|
signal?: AbortSignal;
|
|
@@ -78,6 +78,25 @@ export declare const ModelInfoSchema: z.ZodObject<{
|
|
|
78
78
|
temperature: "temperature";
|
|
79
79
|
files: "files";
|
|
80
80
|
}>>>;
|
|
81
|
+
reasoningOptions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
82
|
+
type: z.ZodLiteral<"toggle">;
|
|
83
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<"effort">;
|
|
85
|
+
values: z.ZodArray<z.ZodNullable<z.ZodEnum<{
|
|
86
|
+
none: "none";
|
|
87
|
+
minimal: "minimal";
|
|
88
|
+
low: "low";
|
|
89
|
+
medium: "medium";
|
|
90
|
+
high: "high";
|
|
91
|
+
xhigh: "xhigh";
|
|
92
|
+
max: "max";
|
|
93
|
+
default: "default";
|
|
94
|
+
}>>>;
|
|
95
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<"budget_tokens">;
|
|
97
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
}, z.core.$strict>], "type">>>;
|
|
81
100
|
apiFormat: z.ZodOptional<z.ZodEnum<{
|
|
82
101
|
default: "default";
|
|
83
102
|
"openai-responses": "openai-responses";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { ReasoningLevel } from "./reasoning-options";
|
|
1
2
|
export declare const REASONING_EFFORT_RATIOS: {
|
|
3
|
+
readonly max: 1;
|
|
2
4
|
readonly xhigh: 0.95;
|
|
3
5
|
readonly high: 0.8;
|
|
4
6
|
readonly medium: 0.5;
|
|
@@ -6,7 +8,7 @@ export declare const REASONING_EFFORT_RATIOS: {
|
|
|
6
8
|
readonly minimal: 0.1;
|
|
7
9
|
readonly none: 0;
|
|
8
10
|
};
|
|
9
|
-
export type ReasoningEffortValue =
|
|
11
|
+
export type ReasoningEffortValue = ReasoningLevel;
|
|
10
12
|
export declare const DEFAULT_REASONING_EFFORT: ReasoningEffortValue | undefined;
|
|
11
13
|
export declare function resolveEffectiveReasoningEffort(reasoningEffort?: string, thinking?: boolean): ReasoningEffortValue | undefined;
|
|
12
14
|
export declare function resolveReasoningEffortRatio(effort?: string, options?: {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const REASONING_LEVELS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
3
|
+
export declare const ReasoningLevelSchema: z.ZodEnum<{
|
|
4
|
+
none: "none";
|
|
5
|
+
minimal: "minimal";
|
|
6
|
+
low: "low";
|
|
7
|
+
medium: "medium";
|
|
8
|
+
high: "high";
|
|
9
|
+
xhigh: "xhigh";
|
|
10
|
+
max: "max";
|
|
11
|
+
}>;
|
|
12
|
+
export type ReasoningLevel = z.infer<typeof ReasoningLevelSchema>;
|
|
13
|
+
export declare const ReasoningEffortSchema: z.ZodEnum<{
|
|
14
|
+
minimal: "minimal";
|
|
15
|
+
low: "low";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
high: "high";
|
|
18
|
+
xhigh: "xhigh";
|
|
19
|
+
max: "max";
|
|
20
|
+
}>;
|
|
21
|
+
export type ReasoningEffort = z.infer<typeof ReasoningEffortSchema>;
|
|
22
|
+
export declare const ModelReasoningOptionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"toggle">;
|
|
24
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"effort">;
|
|
26
|
+
values: z.ZodArray<z.ZodNullable<z.ZodEnum<{
|
|
27
|
+
none: "none";
|
|
28
|
+
minimal: "minimal";
|
|
29
|
+
low: "low";
|
|
30
|
+
medium: "medium";
|
|
31
|
+
high: "high";
|
|
32
|
+
xhigh: "xhigh";
|
|
33
|
+
max: "max";
|
|
34
|
+
default: "default";
|
|
35
|
+
}>>>;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"budget_tokens">;
|
|
38
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
}, z.core.$strict>], "type">;
|
|
41
|
+
export type ModelReasoningOption = z.infer<typeof ModelReasoningOptionSchema>;
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-server MCP request timeout contract, in seconds.
|
|
3
|
+
*
|
|
4
|
+
* The `timeout` field in cline_mcp_settings.json is in SECONDS. Every client
|
|
5
|
+
* (VSCode extension, CLI, JetBrains) resolves it through this module so all
|
|
6
|
+
* apply the same default and bounds. Values above MAX are almost always a
|
|
7
|
+
* milliseconds/seconds mix-up (e.g. `timeout: 60000` meaning 60s), so they
|
|
8
|
+
* clamp instead of silently becoming hours.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DEFAULT_MCP_TIMEOUT_SECONDS = 60;
|
|
11
|
+
export declare const MIN_MCP_TIMEOUT_SECONDS = 1;
|
|
12
|
+
export declare const MAX_MCP_TIMEOUT_SECONDS = 3600;
|
|
13
|
+
export declare function isMcpTimeoutConfigured(value: unknown): value is number;
|
|
14
|
+
/**
|
|
15
|
+
* Clamp a timeout in seconds into [MIN_MCP_TIMEOUT_SECONDS, MAX_MCP_TIMEOUT_SECONDS].
|
|
16
|
+
*/
|
|
17
|
+
export declare function clampMcpTimeoutSeconds(value: number): number;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve a raw `timeout` value from MCP settings to seconds. Never throws:
|
|
20
|
+
* missing or non-numeric values fall back to the default, so one malformed
|
|
21
|
+
* field cannot take down a whole settings file.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveMcpTimeoutSeconds(value: unknown): number;
|
|
24
|
+
export declare function formatMcpTimeoutErrorMessage(serverName: string, timeoutMs: number, method?: string): string;
|