@cline/llms 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/catalog/catalog-cline-recommended.d.ts.map +1 -1
- package/dist/catalog/catalog-live.d.ts +1 -0
- package/dist/catalog/catalog-live.d.ts.map +1 -1
- package/dist/catalog/catalog.generated.d.ts.map +1 -1
- package/dist/catalog/types.d.ts +38 -0
- package/dist/catalog/types.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -50
- package/dist/models.js +59 -59
- package/dist/providers/builtin-types.d.ts +8 -0
- package/dist/providers/builtin-types.d.ts.map +1 -1
- package/dist/providers/builtins-runtime.d.ts.map +1 -1
- package/dist/providers/builtins.d.ts +11 -2
- package/dist/providers/builtins.d.ts.map +1 -1
- package/dist/providers/compat.d.ts.map +1 -1
- package/dist/providers/config.d.ts +2 -2
- package/dist/providers/config.d.ts.map +1 -1
- package/dist/providers/gateway.d.ts.map +1 -1
- package/dist/providers/model-facts.d.ts +19 -15
- package/dist/providers/model-facts.d.ts.map +1 -1
- package/dist/providers/provider-ids.generated.d.ts +1 -1
- package/dist/providers/provider-ids.generated.d.ts.map +1 -1
- package/dist/providers/providers.generated.d.ts.map +1 -1
- package/dist/providers/registry.d.ts.map +1 -1
- package/dist/providers/routing/anthropic-compatible.d.ts +2 -2
- package/dist/providers/routing/anthropic-compatible.d.ts.map +1 -1
- package/dist/providers/routing/generic-compatible.d.ts.map +1 -1
- package/dist/providers/routing/provider-option-rules.d.ts.map +1 -1
- package/dist/providers/routing/provider-options.d.ts.map +1 -1
- package/dist/providers/routing/reasoning-options.d.ts +8 -0
- package/dist/providers/routing/reasoning-options.d.ts.map +1 -0
- package/dist/providers.browser.js +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +50 -50
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GatewayProviderMetadata, GatewayProviderSettings, ProviderCapability, ProviderConfigField } from "@cline/shared";
|
|
2
2
|
import type { ModelInfo, ProviderClient, ProviderProtocol } from "../catalog/types";
|
|
3
3
|
export type ProviderFamily = "openai" | "openai-compatible" | "anthropic" | "google" | "vertex" | "bedrock" | "mistral" | "claude-code" | "openai-codex" | "opencode" | "dify" | "ollama" | "sap-ai-core";
|
|
4
|
+
export type ProviderApiLine = "china" | "international";
|
|
4
5
|
export interface BuiltinSpec {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
@@ -18,6 +19,13 @@ export interface BuiltinSpec {
|
|
|
18
19
|
modelsSourceUrl?: string;
|
|
19
20
|
docsUrl?: string;
|
|
20
21
|
defaults?: GatewayProviderSettings;
|
|
22
|
+
/**
|
|
23
|
+
* Regional endpoint routing facts: base URL per API line. Used when the
|
|
24
|
+
* caller selects an `apiLine` without an explicit base URL. The line that
|
|
25
|
+
* matches `defaults.baseUrl` is included so the mapping is exhaustive and
|
|
26
|
+
* self-documenting.
|
|
27
|
+
*/
|
|
28
|
+
apiLineBaseUrls?: Readonly<Partial<Record<ProviderApiLine, string>>>;
|
|
21
29
|
configFields?: readonly ProviderConfigField[];
|
|
22
30
|
metadata?: GatewayProviderMetadata;
|
|
23
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-types.d.ts","sourceRoot":"","sources":["../../src/providers/builtin-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACX,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,cAAc,GACvB,QAAQ,GACR,mBAAmB,GACnB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT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A2B,
|
|
1
|
+
{"version":3,"file":"builtins-runtime.d.ts","sourceRoot":"","sources":["../../src/providers/builtins-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,2BAA2B,EAC3B,MAAM,eAAe,CAAC;AA0FvB,eAAO,MAAM,8BAA8B,EAAE,2BAA2B,EAsBpE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type GatewayProviderManifest } from "@cline/shared";
|
|
2
2
|
import type { ModelCollection } from "../catalog/types";
|
|
3
|
-
import type { BuiltinSpec } from "./builtin-types";
|
|
3
|
+
import type { BuiltinSpec, ProviderApiLine } from "./builtin-types";
|
|
4
4
|
export declare const DEFAULT_INTERNAL_OCA_BASE_URL = "https://code-internal.aiservice.us-chicago-1.oci.oraclecloud.com/20250206/app/litellm";
|
|
5
5
|
export declare const DEFAULT_EXTERNAL_OCA_BASE_URL = "https://code.aiservice.us-chicago-1.oci.oraclecloud.com/20250206/app/litellm";
|
|
6
6
|
/**
|
|
@@ -11,8 +11,17 @@ export declare const DEFAULT_EXTERNAL_OCA_BASE_URL = "https://code.aiservice.us-
|
|
|
11
11
|
* vendor, the VS Code session factory, and the settings UI all import this.
|
|
12
12
|
*/
|
|
13
13
|
export declare const OLLAMA_DEFAULT_CONTEXT_WINDOW = 32768;
|
|
14
|
-
export type { BuiltinSpec, ProviderFamily } from "./builtin-types";
|
|
14
|
+
export type { BuiltinSpec, ProviderApiLine, ProviderFamily, } from "./builtin-types";
|
|
15
15
|
export declare const BUILTIN_SPECS: BuiltinSpec[];
|
|
16
|
+
export declare function isProviderApiLine(value: unknown): value is ProviderApiLine;
|
|
17
|
+
/**
|
|
18
|
+
* Resolve the regional base URL for a provider's selected API line (e.g.
|
|
19
|
+
* Qwen/Moonshot/Z.AI/MiniMax "china" vs "international" endpoints). Returns
|
|
20
|
+
* undefined when the provider has no regional endpoints or the api line is
|
|
21
|
+
* not a recognized value. Callers must let an explicit user-configured base
|
|
22
|
+
* URL win over this resolution.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveProviderApiLineBaseUrl(providerId: string, apiLine: unknown): string | undefined;
|
|
16
25
|
export declare function toManifest(spec: BuiltinSpec): GatewayProviderManifest;
|
|
17
26
|
export declare const BUILTIN_PROVIDER_COLLECTION_LIST: ModelCollection[];
|
|
18
27
|
export declare const BUILTIN_PROVIDER_COLLECTIONS_BY_ID: Record<string, ModelCollection>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/providers/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,uBAAuB,EAO5B,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EACX,eAAe,EAIf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/providers/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,uBAAuB,EAO5B,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EACX,eAAe,EAIf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAsBpE,eAAO,MAAM,6BAA6B,0FAC8C,CAAC;AACzF,eAAO,MAAM,6BAA6B,iFACqC,CAAC;AAWhF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,QAAQ,CAAC;AAEnD,YAAY,EACX,WAAW,EACX,eAAe,EACf,cAAc,GACd,MAAM,iBAAiB,CAAC;AA8hCzB,eAAO,MAAM,aAAa,EAAE,WAAW,EAGtC,CAAC;AAWF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC5C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,GACd,MAAM,GAAG,SAAS,CAOpB;AAiDD,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,uBAAuB,CAiCrE;AAED,eAAO,MAAM,gCAAgC,EAAE,eAAe,EACzB,CAAC;AAEtC,eAAO,MAAM,kCAAkC,EAAE,MAAM,CACtD,MAAM,EACN,eAAe,CAMf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../src/providers/compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,sBAAsB,EAGtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AA4BvB,OAAO,EACN,KAAK,UAAU,EAIf,KAAK,OAAO,EAEZ,KAAK,cAAc,EAGnB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../src/providers/compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,sBAAsB,EAGtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AA4BvB,OAAO,EACN,KAAK,UAAU,EAIf,KAAK,OAAO,EAEZ,KAAK,cAAc,EAGnB,MAAM,SAAS,CAAC;AAqQjB,wBAAgB,wBAAwB,CACvC,QAAQ,EAAE,OAAO,EAAE,GACjB,oBAAoB,CAAC,UAAU,CAAC,CA+FlC;AAwCD,iBAAS,kBAAkB,CAC1B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,cAAc,GACpB,IAAI,CAAC,sBAAsB,EAAE,YAAY,CAAC,EAAE,GAAG,SAAS,CAkE1D;AAED,iBAAS,kBAAkB,CAAC,MAAM,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCjD;AAgJD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAE1E;AAED,wBAAsB,4BAA4B,CACjD,MAAM,EAAE,cAAc,GACpB,OAAO,CAAC,UAAU,CAAC,CAkCrB;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;CAGpB,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Unified configuration interface for all providers.
|
|
5
5
|
* This replaces the per-provider config chaos with a single structure.
|
|
6
6
|
*/
|
|
7
|
-
import type { BasicLogger, ExtensionContext } from "@cline/shared";
|
|
7
|
+
import type { BasicLogger, ExtensionContext, ReasoningEffort } from "@cline/shared";
|
|
8
8
|
import type { ModelInfo, ProviderClient } from "../catalog/types";
|
|
9
9
|
import { BUILT_IN_PROVIDER, BUILT_IN_PROVIDER_IDS, type BuiltInProviderId, isBuiltInProviderId, normalizeProviderId } from "./ids";
|
|
10
10
|
export { BUILT_IN_PROVIDER, BUILT_IN_PROVIDER_IDS, type BuiltInProviderId, isBuiltInProviderId, normalizeProviderId, };
|
|
@@ -84,7 +84,7 @@ export interface TokenConfig {
|
|
|
84
84
|
*/
|
|
85
85
|
export interface ReasoningConfig {
|
|
86
86
|
/** Reasoning effort level */
|
|
87
|
-
reasoningEffort?:
|
|
87
|
+
reasoningEffort?: ReasoningEffort;
|
|
88
88
|
/** Extended thinking budget in tokens */
|
|
89
89
|
thinkingBudgetTokens?: number;
|
|
90
90
|
/** Enable thinking with provider/model defaults when supported */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/providers/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/providers/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,mBAAmB,EACnB,m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src/providers/gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,eAAe,EAGf,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../src/providers/gateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,eAAe,EAGf,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EAGpB,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,mBAAmB,eAAe,CAAC;AAEnC,eAAO,MAAM,iCAAiC,QAAS,CAAC;AAuExD,MAAM,WAAW,OAAO;IACvB,gBAAgB,CAAC,YAAY,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAClE,iBAAiB,CAChB,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,GAC3D,IAAI,CAAC;IACR,aAAa,IAAI,UAAU,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;IAC9D,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3E,gBAAgB,CACf,SAAS,EAAE,qBAAqB,EAChC,OAAO,CAAC,EAAE,yBAAyB,GACjC,UAAU,CAAC;IACd,MAAM,CACL,OAAO,EAAE,oBAAoB,GAC3B,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC;CAC3C;AAmED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE;IACrD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,eAAe,GAAG,iBAAiB,CAAC,CAAC;IACzE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE;QAC7B,aAAa,EAAE,MAAM,CAAC;QACtB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,aAAa,EAAE,MAAM,CAAC;KACtB,KAAK,IAAI,CAAC;CACX,GAAG,MAAM,GAAG,SAAS,CAiDrB;AAED,qBAAa,cAAe,YAAW,OAAO;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgC;gBAE9C,MAAM,GAAE,aAAkB;IA4BtC,gBAAgB,CAAC,YAAY,EAAE,2BAA2B,GAAG,IAAI;IAKjE,iBAAiB,CAChB,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,GAC3D,IAAI;IAKP,aAAa;IAIb,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM;IAI9B,gBAAgB,CACf,SAAS,EAAE,qBAAqB,EAChC,OAAO,CAAC,EAAE,yBAAyB,GACjC,UAAU;IAIP,MAAM,CACX,OAAO,EAAE,oBAAoB,GAC3B,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;CA+C1C;AAED,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,CAEpE"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import type { GatewayModelRoute, GatewayProviderContext, GatewayReasoningFormat, GatewayStreamRequest } from "@cline/shared";
|
|
1
|
+
import type { GatewayModelRoute, GatewayProviderContext, GatewayReasoningFormat, GatewayStreamRequest, ModelReasoningOption, ReasoningEffort } from "@cline/shared";
|
|
2
|
+
interface ModelReasoningControls {
|
|
3
|
+
effort?: Extract<ModelReasoningOption, {
|
|
4
|
+
type: "effort";
|
|
5
|
+
}>;
|
|
6
|
+
budget?: Extract<ModelReasoningOption, {
|
|
7
|
+
type: "budget_tokens";
|
|
8
|
+
}>;
|
|
9
|
+
toggle: boolean;
|
|
10
|
+
efforts: ReasoningEffort[];
|
|
11
|
+
supportsOff: boolean;
|
|
12
|
+
supportsDefault: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function getModelReasoningControls(options: readonly ModelReasoningOption[] | undefined): ModelReasoningControls | undefined;
|
|
15
|
+
export declare function normalizeReasoningEffort(effort: ReasoningEffort, supportedEfforts: readonly ReasoningEffort[]): ReasoningEffort | undefined;
|
|
2
16
|
export declare function resolveModelFamily(context: GatewayProviderContext): string | undefined;
|
|
3
17
|
export declare function normalizeRoutingValue(value: string | undefined): string | undefined;
|
|
4
18
|
export declare function isAnthropicCompatibleModel(options: {
|
|
@@ -7,26 +21,15 @@ export declare function isAnthropicCompatibleModel(options: {
|
|
|
7
21
|
}): boolean;
|
|
8
22
|
export declare function isAnthropicCompatibleModelId(modelId: string | undefined): boolean;
|
|
9
23
|
export declare function isClaudeModelId(modelId: string | undefined): boolean;
|
|
24
|
+
export declare function isClaudeFableModelId(modelId: string | undefined): boolean;
|
|
10
25
|
export declare function isQwenModel(options: {
|
|
11
26
|
modelId?: string;
|
|
12
27
|
family?: string;
|
|
13
28
|
}): boolean;
|
|
14
|
-
export declare function
|
|
29
|
+
export declare function resolveGeminiThinkingMode(input: {
|
|
15
30
|
request: Pick<GatewayStreamRequest, "modelId">;
|
|
16
31
|
context: GatewayProviderContext;
|
|
17
|
-
}):
|
|
18
|
-
export declare function isGeminiProModel(input: {
|
|
19
|
-
request: Pick<GatewayStreamRequest, "modelId">;
|
|
20
|
-
context: GatewayProviderContext;
|
|
21
|
-
}): boolean;
|
|
22
|
-
export declare function isGeminiFlashModel(input: {
|
|
23
|
-
request: Pick<GatewayStreamRequest, "modelId">;
|
|
24
|
-
context: GatewayProviderContext;
|
|
25
|
-
}): boolean;
|
|
26
|
-
export declare function supportsGeminiThinking(input: {
|
|
27
|
-
request: Pick<GatewayStreamRequest, "modelId">;
|
|
28
|
-
context: GatewayProviderContext;
|
|
29
|
-
}): boolean;
|
|
32
|
+
}): "level" | "budget" | undefined;
|
|
30
33
|
export declare function modelRouteMatches(route: GatewayModelRoute, options: {
|
|
31
34
|
modelId?: string;
|
|
32
35
|
family?: string;
|
|
@@ -45,4 +48,5 @@ export declare function modelReasoningDefaultsOn(options: {
|
|
|
45
48
|
request: Pick<GatewayStreamRequest, "providerId" | "modelId">;
|
|
46
49
|
context: GatewayProviderContext;
|
|
47
50
|
}): boolean;
|
|
51
|
+
export {};
|
|
48
52
|
//# sourceMappingURL=model-facts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-facts.d.ts","sourceRoot":"","sources":["../../src/providers/model-facts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"model-facts.d.ts","sourceRoot":"","sources":["../../src/providers/model-facts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,MAAM,eAAe,CAAC;AAOvB,UAAU,sBAAsB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE;QAAE,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC,CAAC;IAClE,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EA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10
10
|
* WARNING: DO NOT EDIT THIS FILE MANUALLY.
|
|
11
11
|
*/
|
|
12
|
-
export declare const GENERATED_PROVIDER_IDS: readonly ["302ai", "abacus", "abliteration-ai", "ai-router", "aiand", "aihubmix", "aki-io", "alibaba", "alibaba-cn", "alibaba-coding-plan", "alibaba-coding-plan-cn", "alibaba-token-plan", "alibaba-token-plan-cn", "ambient", "anthropic", "anyapi", "atomic-chat", "auriko", "bailing", "baseten", "bedrock", "berget", "blueclaw", "cerebras", "chutes", "clarifai", "claudinio", "cline-pass", "cloudferro-sherlock", "cloudflare-workers-ai", "cortecs", "crof", "crossmodel", "daoxe", "databricks", "deepseek", "digitalocean", "dinference", "drun", "ebcloud", "empiriolabs", "evroc", "fastrouter", "fireworks", "freemodel", "friendli", "frogbot", "gemini", "github-copilot", "github-models", "gmicloud", "groq", "helicone", "hetzner", "hpc-ai", "huggingface", "hyper", "iflowcn", "inception", "inceptron", "inference", "inferx", "io-net", "jiekou", "kenari", "kilo", "kimi-for-coding", "kuae-cloud-coding-plan", "lilac", "llama", "llmgateway", "llmtr", "lmstudio", "longcat", "lucidquery", "lynkr", "meganova", "meta", "minimax", "minimax-cn", "minimax-cn-coding-plan", "minimax-coding-plan", "mistral", "mixlayer", "moark", "modal", "model-oracle-ai", "modelscope", "moonshot", "moonshotai-cn", "morph", "nano-gpt", "nearai", "nebius", "neon", "neuralwatt", "nova", "novita-ai", "nvidia", "ofox", "ollama", "openai-native", "opencode", "opencode-go", "openrouter", "orcarouter", "ovhcloud", "perplexity-agent", "pioneer", "poe", "poolside", "privatemode-ai", "qihang-ai", "qiniu-ai", "regolo-ai", "requesty", "routing-run", "sakana", "sapaicore", "sarvam", "scaleway", "siliconflow", "siliconflow-cn", "snowflake-cortex", "stackit", "stepfun", "stepfun-ai", "stepfun-ai-step-plan", "stepfun-step-plan", "subconscious", "submodel", "synthetic", "tencent-coding-plan", "tencent-token-plan", "tencent-tokenhub", "the-grid-ai", "thinkingmachines", "tinfoil", "together", "trustedrouter", "umans-ai", "umans-ai-coding-plan", "unorouter", "upstage", "v0", "vercel-ai-gateway", "vertex", "vivgrid", "vultr", "wafer.ai", "wandb", "xai", "xiaomi", "xiaomi-token-plan-ams", "xiaomi-token-plan-cn", "xiaomi-token-plan-sgp", "xpersona", "zai", "zai-coding-plan", "zeldoc", "zenifra", "zenmux", "zhipuai", "zhipuai-coding-plan"];
|
|
12
|
+
export declare const GENERATED_PROVIDER_IDS: readonly ["302ai", "abacus", "abliteration-ai", "ai-router", "aiand", "aihubmix", "aki-io", "alibaba", "alibaba-cn", "alibaba-coding-plan", "alibaba-coding-plan-cn", "alibaba-token-plan", "alibaba-token-plan-cn", "ambient", "anthropic", "anyapi", "atomic-chat", "auriko", "bailing", "baseten", "bedrock", "berget", "blueclaw", "cerebras", "chutes", "clarifai", "claudinio", "cline-pass", "cloudferro-sherlock", "cloudflare-workers-ai", "cortecs", "crof", "crossmodel", "daoxe", "databricks", "deepseek", "digitalocean", "dinference", "drun", "ebcloud", "empiriolabs", "evroc", "fastrouter", "fireworks", "freemodel", "friendli", "frogbot", "gemini", "github-copilot", "github-models", "gmicloud", "greenpt", "groq", "helicone", "hetzner", "hpc-ai", "huggingface", "hyper", "iflowcn", "inception", "inceptron", "inference", "inferx", "io-net", "jiekou", "kenari", "kilo", "kimi-for-coding", "kuae-cloud-coding-plan", "lilac", "llama", "llmgateway", "llmtr", "lmstudio", "longcat", "lucidquery", "lynkr", "meganova", "meta", "minimax", "minimax-cn", "minimax-cn-coding-plan", "minimax-coding-plan", "mistral", "mixlayer", "moark", "modal", "model-oracle-ai", "modelscope", "moonshot", "moonshotai-cn", "morph", "nano-gpt", "nearai", "nebius", "neon", "neuralwatt", "nova", "novita-ai", "nvidia", "ofox", "ollama", "openai-native", "opencode", "opencode-go", "openrouter", "orcarouter", "ovhcloud", "perplexity-agent", "pioneer", "poe", "poolside", "privatemode-ai", "qihang-ai", "qiniu-ai", "regolo-ai", "requesty", "routing-run", "sakana", "sapaicore", "sarvam", "scaleway", "siliconflow", "siliconflow-cn", "snowflake-cortex", "stackit", "stepfun", "stepfun-ai", "stepfun-ai-step-plan", "stepfun-step-plan", "subconscious", "submodel", "synthetic", "tencent-coding-plan", "tencent-token-plan", "tencent-tokenhub", "the-grid-ai", "thinkingmachines", "tinfoil", "together", "trustedrouter", "umans-ai", "umans-ai-coding-plan", "unorouter", "upstage", "v0", "vercel-ai-gateway", "vertex", "vivgrid", "vultr", "wafer.ai", "wandb", "xai", "xiaomi", "xiaomi-token-plan-ams", "xiaomi-token-plan-cn", "xiaomi-token-plan-sgp", "xpersona", "zai", "zai-coding-plan", "zeldoc", "zenifra", "zenmux", "zhipuai", "zhipuai-coding-plan"];
|
|
13
13
|
//# sourceMappingURL=provider-ids.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-ids.generated.d.ts","sourceRoot":"","sources":["../../src/providers/provider-ids.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"provider-ids.generated.d.ts","sourceRoot":"","sources":["../../src/providers/provider-ids.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,8qEAsKzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.generated.d.ts","sourceRoot":"","sources":["../../src/providers/providers.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,eAAO,MAAM,wBAAwB,EAAE,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"providers.generated.d.ts","sourceRoot":"","sources":["../../src/providers/providers.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,eAAO,MAAM,wBAAwB,EAAE,SAAS,WAAW,EAkwE1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EAEvB,2BAA2B,EAC3B,oBAAoB,EACpB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/providers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EAEvB,2BAA2B,EAC3B,oBAAoB,EACpB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AA6GvB,qBAAa,eAAe;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA2C;IAC3E,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAe;gBAElC,SAAS,CAAC,EAAE,OAAO,KAAK;IAIpC,gBAAgB,CAAC,YAAY,EAAE,2BAA2B,GAAG,IAAI;IAkCjE,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI;IAkBtD,aAAa,IAAI,uBAAuB,EAAE;IAS1C,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,sBAAsB,EAAE;IAUzD,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IA8BpE,YAAY,CAAC,SAAS,EAAE,qBAAqB,GAAG,oBAAoB;IAmB9D,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;QACjD,QAAQ,EAAE,uBAAuB,CAAC;QAClC,MAAM,EAAE,6BAA6B,CAAC;QACtC,cAAc,EAAE,sBAAsB,CAAC;KACvC,CAAC;CAqDF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type GatewayModelRoute, type GatewayProviderContext, type GatewayProviderMetadata, type GatewayStreamRequest } from "@cline/shared";
|
|
2
2
|
export type AnthropicReasoningRequestPolicy = {
|
|
3
3
|
kind: "none";
|
|
4
4
|
} | {
|
|
@@ -21,7 +21,7 @@ export declare function buildAnthropicProviderOptions(request: GatewayStreamRequ
|
|
|
21
21
|
type: "ephemeral";
|
|
22
22
|
} | undefined;
|
|
23
23
|
thinking?: Record<string, unknown> | undefined;
|
|
24
|
-
effort?: "low" | "high" | "medium" | undefined;
|
|
24
|
+
effort?: "max" | "low" | "high" | "minimal" | "medium" | "xhigh" | undefined;
|
|
25
25
|
};
|
|
26
26
|
export declare function resolveAnthropicCompatibleReasoningBudget(options: {
|
|
27
27
|
modelId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic-compatible.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/anthropic-compatible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"anthropic-compatible.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/anthropic-compatible.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,iBAAiB,EAEtB,KAAK,sBAAsB,EAE3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAEzB,MAAM,eAAe,CAAC;AAavB,MAAM,MAAM,+BAA+B,GACxC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAoDlC,eAAO,MAAM,0BAA0B,yBAAmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B,yBAGtC,CAAC;AAEH,eAAO,MAAM,yCAAyC,yBAGnD,CAAC;AAEJ,wBAAgB,gCAAgC,CAC/C,UA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
1
|
-
{"version":3,"file":"generic-compatible.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/generic-compatible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"generic-compatible.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/generic-compatible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AAavB,OAAO,KAAK,EACX,0BAA0B,EAC1B,yBAAyB,EACzB,MAAM,0BAA0B,CAAC;AAGlC,wBAAgB,gCAAgC,CAC/C,OAAO,EAAE,oBAAoB,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAczB;AAqED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE;IACvD,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,EAAE,sBAAsB,CAAC;IAChC,MAAM,EAAE,0BAA0B,CAAC;IACnC,YAAY,EAAE,yBAAyB,CAAC;CACxC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0C1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-option-rules.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/provider-option-rules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider-option-rules.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/provider-option-rules.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,yBAAyB,EACzB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAGN,KAAK,oBAAoB,EACzB,MAAM,SAAS,CAAC;AAijBjB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,kBAAkB,CAsBnE,CAAC;AAEF,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,aAAa,CAAC,kBAAkB,CAAC,EACxC,KAAK,EAAE,wBAAwB,GAC7B,KAAK,CAAC,yBAAyB,CAAC,CAQlC;AAED,wBAAgB,iCAAiC,CAChD,YAAY,EAAE,aAAa,CAAC,yBAAyB,CAAC,GACpD,yBAAyB,CAc3B;AAED,wBAAgB,8BAA8B,CAC7C,YAAY,EAAE,aAAa,CAAC,yBAAyB,CAAC,EACtD,KAAK,EAAE,wBAAwB,GAC7B,KAAK,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAEzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-options.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/provider-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AAavB,OAAO,EACN,KAAK,0BAA0B,EAG/B,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"provider-options.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/provider-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AAavB,OAAO,EACN,KAAK,0BAA0B,EAG/B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,KAAK,oBAAoB,EAAwB,MAAM,SAAS,CAAC;AAE1E,YAAY,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,0BAA0B,CACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,GAAG,SAAS,CAAC,GACtD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB;AAYD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,sBAAsB,EAC/B,MAAM,GAAE,0BAEP,GACC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA6CzB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type GatewayProviderContext, type GatewayStreamRequest } from "@cline/shared";
|
|
2
|
+
/**
|
|
3
|
+
* Normalize abstract reasoning intent against the provider/model controls
|
|
4
|
+
* advertised by models.dev. Provider adapters remain responsible only for
|
|
5
|
+
* translating the normalized request into their wire shape.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeReasoningRequest(request: GatewayStreamRequest, context: GatewayProviderContext): GatewayStreamRequest;
|
|
8
|
+
//# sourceMappingURL=reasoning-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-options.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/reasoning-options.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAIzB,MAAM,eAAe,CAAC;AAyBvB;;;;GAIG;AACH,wBAAgB,yBAAyB,CACxC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,sBAAsB,GAC7B,oBAAoB,CAmJtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as r}from"zod";import{z as l}from"zod";import{z as m}from"zod";import{z as s}from"zod";import{z as n}from"zod";import{z as It}from"zod";import{z as t}from"zod";import w from"zod";import{z as d}from"zod";import{z as e}from"zod";import{z as Tr}from"zod";var W=l.enum(["default","openai-responses","r1"]);var G=l.enum(["images","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),Y=l.enum(["active","preview","deprecated","legacy"]),X=l.object({input:l.number().optional(),output:l.number().optional(),cacheWrite:l.number().optional(),cacheRead:l.number().optional()}),K=l.object({maxBudget:l.number().optional(),outputPrice:l.number().optional(),thinkingLevel:l.enum(["low","high"]).optional()}),J=l.object({reasoningDefaultOn:l.boolean().optional()}).catchall(l.unknown()),O=l.object({id:l.string(),name:l.string().optional(),description:l.string().optional(),maxTokens:l.number().optional(),contextWindow:l.number().optional(),maxInputTokens:l.number().optional(),capabilities:l.array(G).optional(),apiFormat:W.optional(),systemRole:l.enum(["system","developer"]).optional(),temperature:l.number().optional(),pricing:X.optional(),thinkingConfig:K.optional(),status:Y.optional(),deprecationNotice:l.string().optional(),replacedBy:l.string().optional(),releaseDate:l.string().optional(),deprecationDate:l.string().optional(),family:l.string().optional(),metadata:J.optional()}),Z=m.object({id:m.string(),name:m.string(),input:m.unknown(),output:m.unknown(),error:m.string().optional(),durationMs:m.number(),startedAt:m.date(),endedAt:m.date()}),Q=r.enum(["completed","max_iterations","aborted","mistake_limit","error"]),V=r.object({inputTokens:r.number(),outputTokens:r.number(),cacheReadTokens:r.number().optional(),cacheWriteTokens:r.number().optional(),totalCost:r.number().optional()}),gt=r.object({text:r.string(),usage:V,messages:r.array(r.custom()),toolCalls:r.array(Z),iterations:r.number(),finishReason:Q,model:r.object({id:r.string(),provider:r.string(),info:O.optional()}),startedAt:r.date(),endedAt:r.date(),durationMs:r.number()}),ee=r.enum(["low","medium","high","xhigh"]),ft=r.object({sessionId:r.string().optional(),providerId:r.string(),modelId:r.string(),apiKey:r.string().optional(),baseUrl:r.string().url().optional(),headers:r.record(r.string(),r.string()).optional(),knownModels:r.record(r.string(),O).optional(),providerConfig:r.unknown().optional(),initialMessages:r.array(r.custom()).optional(),systemPrompt:r.string(),tools:r.array(r.custom()),maxIterations:r.number().positive().optional(),maxParallelToolCalls:r.number().int().positive().default(8),maxTokensPerTurn:r.number().positive().optional(),temperature:r.number().nonnegative().optional(),apiTimeoutMs:r.number().positive().default(180000),userFileContentLoader:r.function().input([r.string()]).output(r.promise(r.string())).optional(),toolContextMetadata:r.record(r.string(),r.unknown()).optional(),execution:r.object({maxConsecutiveMistakes:r.number().int().positive().optional(),reminderAfterIterations:r.number().nonnegative().optional(),reminderText:r.string().optional(),loopDetection:r.union([r.literal(!1),r.object({softThreshold:r.number().int().positive().optional(),hardThreshold:r.number().int().positive().optional()})]).optional()}).optional(),reasoningEffort:ee.optional(),thinkingBudgetTokens:r.number().positive().optional(),thinking:r.boolean().optional(),onEvent:r.function().input([r.custom()]).output(r.void()).optional(),hooks:r.custom().optional(),parentAgentId:r.string().optional(),extensions:r.array(r.custom()).optional(),hookErrorMode:r.enum(["ignore","throw"]).default("ignore"),toolPolicies:r.record(r.string(),r.object({enabled:r.boolean().optional(),autoApprove:r.boolean().optional()})).optional(),requestToolApproval:r.function().input([r.object({sessionId:r.string(),agentId:r.string(),conversationId:r.string(),iteration:r.number(),toolCallId:r.string(),toolName:r.string(),input:r.unknown(),policy:r.object({enabled:r.boolean().optional(),autoApprove:r.boolean().optional()}).default({})})]).output(r.union([r.object({approved:r.boolean(),reason:r.string().optional()}),r.promise(r.object({approved:r.boolean(),reason:r.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:r.function().input([r.object({iteration:r.number().int().positive(),consecutiveMistakes:r.number().int().positive(),maxConsecutiveMistakes:r.number().int().positive(),reason:r.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:r.string().optional()})]).output(r.union([r.object({action:r.literal("continue"),guidance:r.string().optional()}),r.object({action:r.literal("stop"),reason:r.string().optional()}),r.promise(r.union([r.object({action:r.literal("continue"),guidance:r.string().optional()}),r.object({action:r.literal("stop"),reason:r.string().optional()})]))])).optional(),logger:r.custom().optional(),extensionContext:r.custom().optional(),abortSignal:r.custom().optional()}),te=s.enum(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),re=s.object({id:s.string().optional(),label:s.string().optional(),role:s.string().optional(),participantKey:s.string().optional(),participantLabel:s.string().optional(),platformUserId:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),oe=s.object({source:s.string(),sourceEvent:s.string(),threadId:s.string(),channelId:s.string(),isDM:s.boolean(),sessionId:s.string().optional(),workspaceRoot:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),bt=s.object({actor:re,context:oe,payload:s.record(s.string(),s.unknown()).optional()}),yt=s.object({action:s.enum(["allow","deny"]).default("allow"),message:s.string().optional(),reason:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),vt=s.object({adapter:s.string(),botUserName:s.string().optional(),event:te,payload:s.record(s.string(),s.unknown()),ts:s.string()});var ne=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],kt=new Set(ne);var R={CLINE_PASS:"ext-cline-pass"},wt={[R.CLINE_PASS]:!1},Et=Object.values(R),ae=n.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),f=n.record(n.string(),n.string()),ie=n.object({toolName:n.string(),parameters:f}),se=n.object({toolName:n.string(),parameters:f,result:n.string(),success:n.boolean(),executionTimeMs:n.number()}),le=n.object({prompt:n.string(),attachments:n.array(n.string())}),ue=n.object({taskMetadata:f}),ce=n.object({taskMetadata:f,previousState:f}),de=n.object({taskMetadata:f}),pe=n.object({taskMetadata:f}),me=n.object({taskId:n.string(),ulid:n.string(),contextSize:n.number(),compactionStrategy:n.string(),previousApiReqIndex:n.number(),tokensIn:n.number(),tokensOut:n.number(),tokensInCache:n.number(),tokensOutCache:n.number(),deletedRangeStart:n.number(),deletedRangeEnd:n.number(),contextJsonPath:n.string(),contextRawPath:n.string()}),St=n.object({clineVersion:n.string(),hookName:ae,timestamp:n.string(),taskId:n.string(),sessionContext:n.object({rootSessionId:n.string().optional(),hookLogPath:n.string().optional()}).optional(),workspaceRoots:n.array(n.string()),workspaceInfo:n.custom().optional(),userId:n.string(),agent_id:n.string(),parent_agent_id:n.string().nullable(),iteration:n.number().optional(),reason:n.string().optional(),tool_call:n.object({id:n.string(),name:n.string(),input:n.unknown()}).optional(),tool_result:n.custom().optional(),turn:n.unknown().optional(),error:n.object({name:n.string(),message:n.string(),stack:n.string().optional()}).optional(),preToolUse:ie.optional(),postToolUse:se.optional(),userPromptSubmit:le.optional(),taskStart:ue.optional(),taskResume:ce.optional(),taskCancel:de.optional(),taskComplete:pe.optional(),preCompact:me.optional()}).passthrough();var ge=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],_t=new Set(ge);var At=["show","hide","subscription"];function fe(o){if(typeof globalThis.atob==="function")try{let i=globalThis.atob(o),c=Uint8Array.from(i,(g)=>g.charCodeAt(0));return new TextDecoder().decode(c)}catch{return null}if(typeof Buffer<"u")try{return Buffer.from(o,"base64").toString("utf8")}catch{return null}return null}function Ct(o){let i=o?.trim();if(!i)return null;try{let c=i.split(".");if(c.length!==3)return null;let g=c[1];if(!g)return null;let h=g.replace(/-/g,"+").replace(/_/g,"/"),H=h.padEnd(h.length+(4-h.length%4)%4,"="),C=fe(H);return C?JSON.parse(C):null}catch{return null}}var Mt="anthropic/claude-sonnet-5";var he=t.object({id:t.string(),temperature:t.number().optional(),isR1FormatRequired:t.boolean().optional(),maxTokens:t.number().optional(),contextWindow:t.number().optional(),inputPrice:t.number().optional(),outputPrice:t.number().optional(),supportsImages:t.boolean().optional()}),be=t.object({models:t.array(he).optional(),openAiBaseUrl:t.string().optional(),openAiHeaders:t.record(t.string(),t.string()).optional(),azureApiVersion:t.string().optional(),azureIdentity:t.boolean().optional()}),ye=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),ve=t.object({name:t.string(),baseModelId:t.string(),thinkingBudgetTokens:t.number().optional()}),ke=t.object({models:t.array(ye).optional(),customModels:t.array(ve).optional(),awsRegion:t.string().optional(),awsUseCrossRegionInference:t.boolean().optional(),awsUseGlobalInference:t.boolean().optional(),awsBedrockUsePromptCache:t.boolean().optional(),awsBedrockEndpoint:t.string().optional()}),we=t.object({id:t.string()}),Ee=t.object({models:t.array(we).optional()}),Te=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Se=t.object({models:t.array(Te).optional(),vertexProjectId:t.string().optional(),vertexRegion:t.string().optional()}),_e=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional(),promptCachingEnabled:t.boolean().optional()}),Ae=t.object({models:t.array(_e).optional(),baseUrl:t.string().optional()}),Ce=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),xe=t.object({models:t.array(Ce).optional(),baseUrl:t.string().optional()}),Ie=t.object({OpenAiCompatible:be.optional(),AwsBedrock:ke.optional(),Cline:Ee.optional(),Vertex:Se.optional(),LiteLLM:Ae.optional(),Anthropic:xe.optional()}),Me=t.object({id:t.string()}),Oe=t.object({name:t.string(),url:t.string(),alwaysEnabled:t.boolean().optional(),headers:t.record(t.string(),t.string()).optional()}),x=t.object({alwaysEnabled:t.boolean(),name:t.string(),contents:t.string()}),k=t.object({bucket:t.string(),accessKeyId:t.string(),secretAccessKey:t.string(),region:t.string().optional(),endpoint:t.string().optional(),accountId:t.string().optional()}),Re=t.object({enabled:t.boolean().optional(),type:t.union([t.literal("s3_access_keys"),t.literal("r2_access_keys"),t.literal("azure_access_keys")]).optional(),s3AccessSettings:k.optional(),r2AccessSettings:k.optional(),azureAccessSettings:k.optional()}),je=t.object({promptUploading:Re.optional()}),Rt=t.object({version:t.string(),providerSettings:Ie.optional(),telemetryEnabled:t.boolean().optional(),kanbanEnabled:t.boolean().optional(),mcpMarketplaceEnabled:t.boolean().optional(),allowedMCPServers:t.array(Me).optional(),remoteMCPServers:t.array(Oe).optional(),blockPersonalRemoteMCPServers:t.boolean().optional(),yoloModeAllowed:t.boolean().optional(),openTelemetryEnabled:t.boolean().optional(),openTelemetryMetricsExporter:t.string().optional(),openTelemetryLogsExporter:t.string().optional(),openTelemetryOtlpProtocol:t.string().optional(),openTelemetryOtlpEndpoint:t.string().optional(),openTelemetryOtlpHeaders:t.record(t.string(),t.string()).optional(),openTelemetryOtlpMetricsProtocol:t.string().optional(),openTelemetryOtlpMetricsEndpoint:t.string().optional(),openTelemetryOtlpMetricsHeaders:t.record(t.string(),t.string()).optional(),openTelemetryOtlpLogsProtocol:t.string().optional(),openTelemetryOtlpLogsEndpoint:t.string().optional(),openTelemetryOtlpLogsHeaders:t.record(t.string(),t.string()).optional(),openTelemetryMetricExportInterval:t.number().optional(),openTelemetryOtlpInsecure:t.boolean().optional(),openTelemetryLogBatchSize:t.number().optional(),openTelemetryLogBatchTimeout:t.number().optional(),openTelemetryLogMaxQueueSize:t.number().optional(),enterpriseTelemetry:je.optional(),globalRules:t.array(x).optional(),globalWorkflows:t.array(x).optional()}),jt=t.record(t.string(),t.string());var Lt=w.enum(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),Pt=w.enum(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),Bt=w.enum(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]);var I={production:{environment:"production",appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",mcpBaseUrl:"https://api.cline.bot/v1/mcp",workOsClientId:"client_01K3A541FN8TA3EPPHTD2325AR"},staging:{environment:"staging",appBaseUrl:"https://staging-app.cline.bot",apiBaseUrl:"https://core-api.staging.int.cline.bot",mcpBaseUrl:"https://core-api.staging.int.cline.bot/v1/mcp",workOsClientId:"client_01K3A5415VF6QBQBG3XYCW91G6"},local:{environment:"local",appBaseUrl:"http://localhost:3000",apiBaseUrl:"http://localhost:7777",mcpBaseUrl:"http://localhost:7777/v1/mcp",workOsClientId:"client_01K6XQAY7JK6T5HXVSZW2S5VYK"}};function M(o){let i=o?.trim().toLowerCase();if(i==="production"||i==="staging"||i==="local")return i;return}function j(){if(typeof process>"u"||!process?.env)return{};return process.env}function Ne(){let o=j();return M(o.CLINE_ENVIRONMENT_OVERRIDE)??M(o.CLINE_ENVIRONMENT)??"production"}function Le(o){if(typeof o==="string")return I[o];return I[Ne()]}function Pe(o,i){if(i.CLINE_API_BASE_URL)o={...o,apiBaseUrl:i.CLINE_API_BASE_URL,mcpBaseUrl:`${i.CLINE_API_BASE_URL}/v1/mcp`};return o}function N(o){let i=Le(o);return Pe(i,j())}var Be=["rules","skills","workflows","plugins"];var Dt=new Set(Be);var De=d.object({rootPath:d.string().min(1),hint:d.string().min(1).optional(),associatedRemoteUrls:d.array(d.string().min(1)).optional(),latestGitCommitHash:d.string().min(1).optional(),latestGitBranchName:d.string().min(1).optional()}),Ft=d.object({currentWorkspacePath:d.string().min(1).optional(),workspaces:d.record(d.string().min(1),De)});var $e=["current_state","boundary_analysis","interface_proposal"];var p=e.preprocess((o)=>o instanceof Date?o.toISOString():o,e.string().datetime()),b=e.enum(["pending","in_progress","blocked","completed"]),L=e.enum(["queued","running","completed","failed","cancelled","interrupted"]),y=e.enum(["draft","in_review","finalized"]),Fe=e.object({agentId:e.string(),role:e.enum(["lead","teammate"]),description:e.string().optional(),status:e.enum(["idle","running","stopped"])}),qt=e.object({agentId:e.string(),rolePrompt:e.string(),modelId:e.string().optional(),maxIterations:e.number().optional()});function u(o){return e.preprocess((i)=>i===null?void 0:i,o.optional())}var zt=e.object({agentId:e.string().min(1).describe("Teammate identifier"),rolePrompt:e.string().min(1).describe("System prompt describing teammate role")}).strict(),Ht=e.object({agentId:e.string().min(1).describe("Teammate identifier"),reason:u(e.string().min(1)).describe("Optional shutdown reason")}),Wt=e.object({}),Ue={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var Gt=e.object({action:e.enum(["create","list","claim","complete","block"]),title:u(e.string().min(1)).describe("Task title"),description:u(e.string().min(1)).describe("Task details"),dependsOn:u(e.array(e.string().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:u(e.string().min(1)).describe("Optional assignee"),status:u(e.enum(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:u(e.string()).describe("Task ID"),summary:u(e.string().min(1)).describe("Completion summary"),reason:u(e.string().min(1)).describe("Blocking reason")}).superRefine((o,i)=>{for(let c of Ue[o.action]){if(o[c]!==void 0)continue;i.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${o.action}`})}}),Yt=e.object({agentId:e.string().describe("Teammate agent ID"),task:e.string().min(1).describe("Task instructions for the teammate"),taskId:u(e.string()).describe("Optional shared task list ID"),runMode:u(e.enum(["sync","async"])).describe("Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later."),continueConversation:u(e.boolean()).describe("If true, continue the teammate conversation; otherwise start fresh")}),Xt=e.object({status:u(e.enum(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:u(e.string().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:u(e.boolean()).describe("Include completed/failed runs (default true)")}),Kt=e.object({runId:e.string().min(1).describe("Run ID"),reason:u(e.string().min(1)).describe("Optional cancellation reason")}),Jt=e.object({runId:u(e.string().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),Zt=e.object({toAgentId:e.string().min(1).describe("Recipient agent ID"),subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),Qt=e.object({subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),Vt=e.object({unreadOnly:u(e.boolean()).describe("Only unread messages for read action (default true)")}),er=e.object({kind:e.enum(["progress","handoff","blocked","decision","done","error"]),summary:e.string().min(1).describe("Update summary"),taskId:u(e.string().min(1)).describe("Optional task ID context"),evidence:u(e.array(e.string().min(1))).describe("Optional evidence links/snippets"),nextAction:u(e.string().min(1)).describe("Planned next step")}),tr=e.object({}),rr=e.object({title:e.string().describe("Outcome title"),requiredSections:e.array(e.string()).default($e).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),or=e.object({outcomeId:e.string().describe("Outcome ID"),section:e.string().describe("Section name"),sourceRunId:u(e.string()).describe("Optional source run ID"),content:e.string().describe("Section fragment content")}),nr=e.object({fragmentId:e.string().describe("Fragment ID"),approved:e.boolean().describe("Review decision")}),ar=e.object({outcomeId:e.string().describe("Outcome ID")}),ir=e.object({}),sr=e.object({teamId:e.string(),teamName:e.string(),members:e.array(Fe),taskCounts:e.record(b,e.number()),unreadMessages:e.number(),missionLogEntries:e.number(),activeRuns:e.number(),queuedRuns:e.number(),outcomeCounts:e.record(y,e.number())}),qe=e.object({id:e.string(),title:e.string(),description:e.string(),status:b,createdAt:p,updatedAt:p,createdBy:e.string(),assignee:e.string().optional(),dependsOn:e.array(e.string()),summary:e.string().optional(),isReady:e.boolean(),blockedBy:e.array(e.string())}),lr=e.discriminatedUnion("action",[e.object({action:e.literal("create"),taskId:e.string(),status:b,ignoredFields:e.array(e.string()).optional(),note:e.string().optional()}),e.object({action:e.literal("list"),tasks:e.array(qe)}),e.object({action:e.literal("claim"),taskId:e.string(),status:b,nextStep:e.string()}),e.object({action:e.literal("complete"),taskId:e.string(),status:b}),e.object({action:e.literal("block"),taskId:e.string(),status:b})]),ur=e.object({agentId:e.string(),mode:e.enum(["sync","async"]),status:e.enum(["dispatched","running","queued","joined"]),dispatched:e.boolean(),message:e.string(),deduped:e.boolean().optional(),runId:e.string().optional(),text:e.string().optional(),iterations:e.number().optional()}),ze=e.object({textPreview:e.string(),iterations:e.number(),finishReason:e.string(),durationMs:e.number(),usage:e.object({inputTokens:e.number(),outputTokens:e.number(),cacheReadTokens:e.number().optional(),cacheWriteTokens:e.number().optional(),totalCost:e.number().optional()})}),cr=e.object({id:e.string(),agentId:e.string(),taskId:e.string().optional(),status:L,messagePreview:e.string(),priority:e.number(),retryCount:e.number(),maxRetries:e.number(),nextAttemptAt:p.optional(),continueConversation:e.boolean().optional(),startedAt:p,endedAt:p.optional(),leaseOwner:e.string().optional(),heartbeatAt:p.optional(),lastProgressAt:p.optional(),lastProgressMessage:e.string().optional(),currentActivity:e.string().optional(),error:e.string().optional(),resultSummary:ze.optional()}),dr=e.object({id:e.string(),teamId:e.string(),fromAgentId:e.string(),toAgentId:e.string(),subject:e.string(),body:e.string(),taskId:e.string().optional(),sentAt:p,readAt:p.optional()}),pr=e.object({id:e.string(),teamId:e.string(),title:e.string(),status:y,requiredSections:e.array(e.string()),createdBy:e.string(),createdAt:p,finalizedAt:p.optional()}),mr=e.object({outcomeId:e.string(),status:y,requiredSections:e.array(e.string())}),gr=e.object({agentId:e.string(),status:e.string()}),fr=e.object({runId:e.string(),status:L}),hr=e.object({id:e.string(),toAgentId:e.string()}),br=e.object({delivered:e.number()}),yr=e.object({id:e.string()}),vr=e.object({status:e.string()}),kr=e.object({fragmentId:e.string(),status:e.string()}),wr=e.object({outcomeId:e.string(),status:y}),He;((o)=>{o.TaskStart="task_start",o.TaskEnd="task_end",o.AgentEvent="agent_event",o.TeammateSpawned="teammate_spawned",o.TeammateShutdown="teammate_shutdown",o.TeamTaskUpdated="team_task_updated",o.TeamMessage="team_message",o.TeamMissionLog="team_mission_log",o.TeamTaskCompleted="team_task_completed",o.RunStarted="run_started",o.RunQueued="run_queued",o.RunProgress="run_progress",o.RunCompleted="run_completed",o.RunFailed="run_failed",o.RunCancelled="run_cancelled",o.RunInterrupted="run_interrupted",o.OutcomeCreated="outcome_created",o.OutcomeFragmentAttached="outcome_fragment_attached",o.OutcomeFragmentReviewed="outcome_fragment_reviewed",o.OutcomeFinalized="outcome_finalized"})(He||={});var We="the user is not subscribed to required model plan",Ge="no access to clinepass subscription models yet. subscribe to clinepass",Ye="organization accounts cannot use individual model inference subscriptions",Xe="you have reached your",Ke="clinepass limit",P="please try again later.",Je="free limit reached on model",B="try again in ",Ze="model not found";function D(o){let i=o.toLowerCase(),c=i.indexOf(Xe);if(c===-1)return;let g=i.indexOf(P,c);if(g===-1)return;let h=g+P.length;if(!i.slice(c,h).includes(Ke))return;return{start:c,end:h}}function $(){return`${new URL("/dashboard/subscription?personal=true",N().appBaseUrl).toString()}`}function F(){return`No access to ClinePass subscription models yet. Subscribe to ClinePass, the low cost open weights model coding plan: ${$()}`}class E extends Error{providerId;constructor(o){super(F());this.name="ClineNotSubscribedError",this.providerId=o}}function U(){return"Organization accounts cannot use ClinePass subscriptions. Go to /account -> change account to switch to your personal account for ClinePass"}class T extends Error{providerId;constructor(o){super(U());this.name="ClineOrgIndividualInferenceSubscriptionError",this.providerId=o}}class S extends Error{providerId;constructor(o,i){super(o);this.name="ClinePassLimitError",this.providerId=i}}class _ extends Error{providerId;constructor(o,i){super(o);this.name="ClineFreeModelLimitError",this.providerId=i}}function Qe(o){return o instanceof E}function Ve(o){return o instanceof T}function et(o){return o instanceof S}function tt(o){return o instanceof _}function rt(o){let i=o.trim().toLowerCase();return i.includes(We)||i.includes(Ge)}function ot(o){return o.toLowerCase().includes(Ye)}function nt(o){return D(o)!==void 0}function at(o){let i=D(o);return i?o.slice(i.start,i.end):void 0}function it(o){return o.toLowerCase().includes(Je)}function st(o){return o.toLowerCase().includes(Ze)}function lt(o){let i=o.toLowerCase(),c=i.indexOf(B);if(c===-1)return;return i.slice(c+B.length).trim()||void 0}var q=["302ai","abacus","abliteration-ai","ai-router","aiand","aihubmix","aki-io","alibaba","alibaba-cn","alibaba-coding-plan","alibaba-coding-plan-cn","alibaba-token-plan","alibaba-token-plan-cn","ambient","anthropic","anyapi","atomic-chat","auriko","bailing","baseten","bedrock","berget","blueclaw","cerebras","chutes","clarifai","claudinio","cline-pass","cloudferro-sherlock","cloudflare-workers-ai","cortecs","crof","crossmodel","daoxe","databricks","deepseek","digitalocean","dinference","drun","ebcloud","empiriolabs","evroc","fastrouter","fireworks","freemodel","friendli","frogbot","gemini","github-copilot","github-models","gmicloud","groq","helicone","hetzner","hpc-ai","huggingface","hyper","iflowcn","inception","inceptron","inference","inferx","io-net","jiekou","kenari","kilo","kimi-for-coding","kuae-cloud-coding-plan","lilac","llama","llmgateway","llmtr","lmstudio","longcat","lucidquery","lynkr","meganova","meta","minimax","minimax-cn","minimax-cn-coding-plan","minimax-coding-plan","mistral","mixlayer","moark","modal","model-oracle-ai","modelscope","moonshot","moonshotai-cn","morph","nano-gpt","nearai","nebius","neon","neuralwatt","nova","novita-ai","nvidia","ofox","ollama","openai-native","opencode","opencode-go","openrouter","orcarouter","ovhcloud","perplexity-agent","pioneer","poe","poolside","privatemode-ai","qihang-ai","qiniu-ai","regolo-ai","requesty","routing-run","sakana","sapaicore","sarvam","scaleway","siliconflow","siliconflow-cn","snowflake-cortex","stackit","stepfun","stepfun-ai","stepfun-ai-step-plan","stepfun-step-plan","subconscious","submodel","synthetic","tencent-coding-plan","tencent-token-plan","tencent-tokenhub","the-grid-ai","thinkingmachines","tinfoil","together","trustedrouter","umans-ai","umans-ai-coding-plan","unorouter","upstage","v0","vercel-ai-gateway","vertex","vivgrid","vultr","wafer.ai","wandb","xai","xiaomi","xiaomi-token-plan-ams","xiaomi-token-plan-cn","xiaomi-token-plan-sgp","xpersona","zai","zai-coding-plan","zeldoc","zenifra","zenmux","zhipuai","zhipuai-coding-plan"];var v;((a)=>{a.ANTHROPIC="anthropic";a.CLAUDE_CODE="claude-code";a.CLINE="cline";a.CLINE_PASS="cline-pass";a.OPENAI_COMPATIBLE="openai-compatible";a.OPENAI_NATIVE="openai-native";a.OPENAI_CODEX="openai-codex";a.OPENAI_CODEX_CLI="openai-codex-cli";a.OPENCODE="opencode";a.BEDROCK="bedrock";a.VERTEX="vertex";a.GEMINI="gemini";a.OLLAMA="ollama";a.LMSTUDIO="lmstudio";a.DEEPSEEK="deepseek";a.XAI="xai";a.TOGETHER="together";a.FIREWORKS="fireworks";a.GROQ="groq";a.POOLSIDE="poolside";a.CEREBRAS="cerebras";a.SAMBANOVA="sambanova";a.NEBIUS="nebius";a.BASETEN="baseten";a.REQUESTY="requesty";a.LITELLM="litellm";a.HUGGINGFACE="huggingface";a.VERCEL_AI_GATEWAY="vercel-ai-gateway";a.V0="v0";a.AIHUBMIX="aihubmix";a.HICAP="hicap";a.NOUS_RESEARCH="nousResearch";a.HUAWEI_CLOUD_MAAS="huawei-cloud-maas";a.WANDB="wandb";a.XIAOMI="xiaomi";a.TENCENT_TOKENHUB="tencent-tokenhub";a.KILO="kilo";a.ZAI="zai";a.ZAI_CODING_PLAN="zai-coding-plan";a.QWEN="qwen";a.QWEN_CODE="qwen-code";a.DOUBAO="doubao";a.MISTRAL="mistral";a.MOONSHOT="moonshot";a.ASKSAGE="asksage";a.MINIMAX="minimax";a.DIFY="dify";a.OCA="oca";a.SAPAICORE="sapaicore";a.OPENROUTER="openrouter"})(v||={});var ut={openai:"openai-compatible",togetherai:"together","sap-ai-core":"sapaicore"},z=[...new Set([...Object.values(v),...q])];function A(o){let i=o.trim();return ut[i]??i}export{A as normalizeProviderId,nt as isClinePassLimitMessage,et as isClinePassLimitError,ot as isClineOrgIndividualInferenceSubscriptionMessage,Ve as isClineOrgIndividualInferenceSubscriptionError,rt as isClineNotSubscribedMessage,Qe as isClineNotSubscribedError,st as isClineModelNotFoundMessage,it as isClineFreeModelLimitMessage,tt as isClineFreeModelLimitError,$ as getClinePassSubscriptionUrl,U as getClineOrgIndividualInferenceSubscriptionMessage,F as getClineNotSubscribedMessage,at as extractClinePassLimitMessage,lt as extractClineFreeModelLimitResetTime,S as ClinePassLimitError,T as ClineOrgIndividualInferenceSubscriptionError,E as ClineNotSubscribedError,_ as ClineFreeModelLimitError};
|
|
1
|
+
import{z as r}from"zod";import{z as l}from"zod";import{z as d}from"zod";import{z as g}from"zod";import{z as s}from"zod";import{z as n}from"zod";import{z as Bt}from"zod";import{z as t}from"zod";import w from"zod";import{z as p}from"zod";import{z as e}from"zod";import{z as xr}from"zod";var R=["none","minimal","low","medium","high","xhigh","max"],Y=d.enum(R),X=Y.exclude(["none"]),K=d.enum([...R,"default"]).nullable(),J=d.discriminatedUnion("type",[d.object({type:d.literal("toggle")}).strict(),d.object({type:d.literal("effort"),values:d.array(K)}).strict(),d.object({type:d.literal("budget_tokens"),min:d.number().min(-1).optional(),max:d.number().min(0).optional()}).strict().refine((o)=>o.min===void 0||o.max===void 0||o.min<=o.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),Z=l.enum(["default","openai-responses","r1"]);var Q=l.enum(["images","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),V=l.enum(["active","preview","deprecated","legacy"]),ee=l.object({input:l.number().optional(),output:l.number().optional(),cacheWrite:l.number().optional(),cacheRead:l.number().optional()}),te=l.object({maxBudget:l.number().optional(),outputPrice:l.number().optional(),thinkingLevel:l.enum(["low","high"]).optional()}),re=l.object({reasoningDefaultOn:l.boolean().optional()}).catchall(l.unknown()),j=l.object({id:l.string(),name:l.string().optional(),description:l.string().optional(),maxTokens:l.number().optional(),contextWindow:l.number().optional(),maxInputTokens:l.number().optional(),capabilities:l.array(Q).optional(),reasoningOptions:l.array(J).optional(),apiFormat:Z.optional(),systemRole:l.enum(["system","developer"]).optional(),temperature:l.number().optional(),pricing:ee.optional(),thinkingConfig:te.optional(),status:V.optional(),deprecationNotice:l.string().optional(),replacedBy:l.string().optional(),releaseDate:l.string().optional(),deprecationDate:l.string().optional(),family:l.string().optional(),metadata:re.optional()}),oe=g.object({id:g.string(),name:g.string(),input:g.unknown(),output:g.unknown(),error:g.string().optional(),durationMs:g.number(),startedAt:g.date(),endedAt:g.date()}),ne=r.enum(["completed","max_iterations","aborted","mistake_limit","error"]),ae=r.object({inputTokens:r.number(),outputTokens:r.number(),cacheReadTokens:r.number().optional(),cacheWriteTokens:r.number().optional(),totalCost:r.number().optional()}),kt=r.object({text:r.string(),usage:ae,messages:r.array(r.custom()),toolCalls:r.array(oe),iterations:r.number(),finishReason:ne,model:r.object({id:r.string(),provider:r.string(),info:j.optional()}),startedAt:r.date(),endedAt:r.date(),durationMs:r.number()}),Tt=r.object({sessionId:r.string().optional(),providerId:r.string(),modelId:r.string(),apiKey:r.string().optional(),baseUrl:r.string().url().optional(),headers:r.record(r.string(),r.string()).optional(),knownModels:r.record(r.string(),j).optional(),providerConfig:r.unknown().optional(),initialMessages:r.array(r.custom()).optional(),systemPrompt:r.string(),tools:r.array(r.custom()),maxIterations:r.number().positive().optional(),maxParallelToolCalls:r.number().int().positive().default(8),maxTokensPerTurn:r.number().positive().optional(),temperature:r.number().nonnegative().optional(),apiTimeoutMs:r.number().positive().default(180000),userFileContentLoader:r.function().input([r.string()]).output(r.promise(r.string())).optional(),toolContextMetadata:r.record(r.string(),r.unknown()).optional(),execution:r.object({maxConsecutiveMistakes:r.number().int().positive().optional(),reminderAfterIterations:r.number().nonnegative().optional(),reminderText:r.string().optional(),loopDetection:r.union([r.literal(!1),r.object({softThreshold:r.number().int().positive().optional(),hardThreshold:r.number().int().positive().optional()})]).optional()}).optional(),reasoningEffort:X.optional(),thinkingBudgetTokens:r.number().positive().optional(),thinking:r.boolean().optional(),onEvent:r.function().input([r.custom()]).output(r.void()).optional(),hooks:r.custom().optional(),parentAgentId:r.string().optional(),extensions:r.array(r.custom()).optional(),hookErrorMode:r.enum(["ignore","throw"]).default("ignore"),toolPolicies:r.record(r.string(),r.object({enabled:r.boolean().optional(),autoApprove:r.boolean().optional()})).optional(),requestToolApproval:r.function().input([r.object({sessionId:r.string(),agentId:r.string(),conversationId:r.string(),iteration:r.number(),toolCallId:r.string(),toolName:r.string(),input:r.unknown(),policy:r.object({enabled:r.boolean().optional(),autoApprove:r.boolean().optional()}).default({})})]).output(r.union([r.object({approved:r.boolean(),reason:r.string().optional()}),r.promise(r.object({approved:r.boolean(),reason:r.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:r.function().input([r.object({iteration:r.number().int().positive(),consecutiveMistakes:r.number().int().positive(),maxConsecutiveMistakes:r.number().int().positive(),reason:r.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:r.string().optional()})]).output(r.union([r.object({action:r.literal("continue"),guidance:r.string().optional()}),r.object({action:r.literal("stop"),reason:r.string().optional()}),r.promise(r.union([r.object({action:r.literal("continue"),guidance:r.string().optional()}),r.object({action:r.literal("stop"),reason:r.string().optional()})]))])).optional(),logger:r.custom().optional(),extensionContext:r.custom().optional(),abortSignal:r.custom().optional()}),ie=s.enum(["connector.started","connector.stopping","session.authorize","message.received","message.denied","message.completed","message.failed","session.started","session.reused","session.reset","schedule.delivery.started","schedule.delivery.sent","schedule.delivery.failed"]),se=s.object({id:s.string().optional(),label:s.string().optional(),role:s.string().optional(),participantKey:s.string().optional(),participantLabel:s.string().optional(),platformUserId:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),le=s.object({source:s.string(),sourceEvent:s.string(),threadId:s.string(),channelId:s.string(),isDM:s.boolean(),sessionId:s.string().optional(),workspaceRoot:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),Et=s.object({actor:se,context:le,payload:s.record(s.string(),s.unknown()).optional()}),St=s.object({action:s.enum(["allow","deny"]).default("allow"),message:s.string().optional(),reason:s.string().optional(),metadata:s.record(s.string(),s.unknown()).optional()}),_t=s.object({adapter:s.string(),botUserName:s.string().optional(),event:ie,payload:s.record(s.string(),s.unknown()),ts:s.string()});var ue=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],At=new Set(ue);var N={CLINE_PASS:"ext-cline-pass"},Ct={[N.CLINE_PASS]:!1},It=Object.values(N),ce=n.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),h=n.record(n.string(),n.string()),de=n.object({toolName:n.string(),parameters:h}),pe=n.object({toolName:n.string(),parameters:h,result:n.string(),success:n.boolean(),executionTimeMs:n.number()}),me=n.object({prompt:n.string(),attachments:n.array(n.string())}),ge=n.object({taskMetadata:h}),fe=n.object({taskMetadata:h,previousState:h}),he=n.object({taskMetadata:h}),be=n.object({taskMetadata:h}),ye=n.object({taskId:n.string(),ulid:n.string(),contextSize:n.number(),compactionStrategy:n.string(),previousApiReqIndex:n.number(),tokensIn:n.number(),tokensOut:n.number(),tokensInCache:n.number(),tokensOutCache:n.number(),deletedRangeStart:n.number(),deletedRangeEnd:n.number(),contextJsonPath:n.string(),contextRawPath:n.string()}),Mt=n.object({clineVersion:n.string(),hookName:ce,timestamp:n.string(),taskId:n.string(),sessionContext:n.object({rootSessionId:n.string().optional(),hookLogPath:n.string().optional()}).optional(),workspaceRoots:n.array(n.string()),workspaceInfo:n.custom().optional(),userId:n.string(),agent_id:n.string(),parent_agent_id:n.string().nullable(),iteration:n.number().optional(),reason:n.string().optional(),tool_call:n.object({id:n.string(),name:n.string(),input:n.unknown()}).optional(),tool_result:n.custom().optional(),turn:n.unknown().optional(),error:n.object({name:n.string(),message:n.string(),stack:n.string().optional()}).optional(),preToolUse:de.optional(),postToolUse:pe.optional(),userPromptSubmit:me.optional(),taskStart:ge.optional(),taskResume:fe.optional(),taskCancel:he.optional(),taskComplete:be.optional(),preCompact:ye.optional()}).passthrough();var ve=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Ot=new Set(ve);var Rt=["show","hide","subscription"];function ke(o){if(typeof globalThis.atob==="function")try{let i=globalThis.atob(o),c=Uint8Array.from(i,(f)=>f.charCodeAt(0));return new TextDecoder().decode(c)}catch{return null}if(typeof Buffer<"u")try{return Buffer.from(o,"base64").toString("utf8")}catch{return null}return null}function jt(o){let i=o?.trim();if(!i)return null;try{let c=i.split(".");if(c.length!==3)return null;let f=c[1];if(!f)return null;let b=f.replace(/-/g,"+").replace(/_/g,"/"),W=b.padEnd(b.length+(4-b.length%4)%4,"="),I=ke(W);return I?JSON.parse(I):null}catch{return null}}var Pt="anthropic/claude-sonnet-5";var Te=t.object({id:t.string(),temperature:t.number().optional(),maxTokens:t.number().optional(),contextWindow:t.number().optional(),inputPrice:t.number().optional(),outputPrice:t.number().optional(),supportsImages:t.boolean().optional()}),we=t.object({models:t.array(Te).optional(),openAiBaseUrl:t.string().optional(),openAiHeaders:t.record(t.string(),t.string()).optional(),azureApiVersion:t.string().optional(),azureIdentity:t.boolean().optional()}),Ee=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Se=t.object({name:t.string(),baseModelId:t.string(),thinkingBudgetTokens:t.number().optional()}),_e=t.object({models:t.array(Ee).optional(),customModels:t.array(Se).optional(),awsRegion:t.string().optional(),awsUseCrossRegionInference:t.boolean().optional(),awsUseGlobalInference:t.boolean().optional(),awsBedrockUsePromptCache:t.boolean().optional(),awsBedrockEndpoint:t.string().optional()}),Ae=t.object({id:t.string()}),Ce=t.object({models:t.array(Ae).optional()}),Ie=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),xe=t.object({models:t.array(Ie).optional(),vertexProjectId:t.string().optional(),vertexRegion:t.string().optional()}),Me=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional(),promptCachingEnabled:t.boolean().optional()}),Oe=t.object({models:t.array(Me).optional(),baseUrl:t.string().optional()}),Re=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),je=t.object({models:t.array(Re).optional(),baseUrl:t.string().optional()}),Ne=t.object({OpenAiCompatible:we.optional(),AwsBedrock:_e.optional(),Cline:Ce.optional(),Vertex:xe.optional(),LiteLLM:Oe.optional(),Anthropic:je.optional()}),Be=t.object({id:t.string()}),Pe=t.object({name:t.string(),url:t.string(),alwaysEnabled:t.boolean().optional(),headers:t.record(t.string(),t.string()).optional()}),x=t.object({alwaysEnabled:t.boolean(),name:t.string(),contents:t.string()}),T=t.object({bucket:t.string(),accessKeyId:t.string(),secretAccessKey:t.string(),region:t.string().optional(),endpoint:t.string().optional(),accountId:t.string().optional()}),De=t.object({enabled:t.boolean().optional(),type:t.union([t.literal("s3_access_keys"),t.literal("r2_access_keys"),t.literal("azure_access_keys")]).optional(),s3AccessSettings:T.optional(),r2AccessSettings:T.optional(),azureAccessSettings:T.optional()}),Le=t.object({promptUploading:De.optional()}),Lt=t.object({version:t.string(),providerSettings:Ne.optional(),telemetryEnabled:t.boolean().optional(),kanbanEnabled:t.boolean().optional(),mcpMarketplaceEnabled:t.boolean().optional(),allowedMCPServers:t.array(Be).optional(),remoteMCPServers:t.array(Pe).optional(),blockPersonalRemoteMCPServers:t.boolean().optional(),yoloModeAllowed:t.boolean().optional(),openTelemetryEnabled:t.boolean().optional(),openTelemetryMetricsExporter:t.string().optional(),openTelemetryLogsExporter:t.string().optional(),openTelemetryOtlpProtocol:t.string().optional(),openTelemetryOtlpEndpoint:t.string().optional(),openTelemetryOtlpHeaders:t.record(t.string(),t.string()).optional(),openTelemetryOtlpMetricsProtocol:t.string().optional(),openTelemetryOtlpMetricsEndpoint:t.string().optional(),openTelemetryOtlpMetricsHeaders:t.record(t.string(),t.string()).optional(),openTelemetryOtlpLogsProtocol:t.string().optional(),openTelemetryOtlpLogsEndpoint:t.string().optional(),openTelemetryOtlpLogsHeaders:t.record(t.string(),t.string()).optional(),openTelemetryMetricExportInterval:t.number().optional(),openTelemetryOtlpInsecure:t.boolean().optional(),openTelemetryLogBatchSize:t.number().optional(),openTelemetryLogBatchTimeout:t.number().optional(),openTelemetryLogMaxQueueSize:t.number().optional(),enterpriseTelemetry:Le.optional(),globalRules:t.array(x).optional(),globalWorkflows:t.array(x).optional()}),$t=t.record(t.string(),t.string());var Ut=w.enum(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),qt=w.enum(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),zt=w.enum(["anthropic","ai-sdk","ai-sdk-community","openai","openai-compatible","openai-r1","gemini","bedrock","custom","fetch","vertex"]);var M={production:{environment:"production",appBaseUrl:"https://app.cline.bot",apiBaseUrl:"https://api.cline.bot",mcpBaseUrl:"https://api.cline.bot/v1/mcp",workOsClientId:"client_01K3A541FN8TA3EPPHTD2325AR"},staging:{environment:"staging",appBaseUrl:"https://staging-app.cline.bot",apiBaseUrl:"https://core-api.staging.int.cline.bot",mcpBaseUrl:"https://core-api.staging.int.cline.bot/v1/mcp",workOsClientId:"client_01K3A5415VF6QBQBG3XYCW91G6"},local:{environment:"local",appBaseUrl:"http://localhost:3000",apiBaseUrl:"http://localhost:7777",mcpBaseUrl:"http://localhost:7777/v1/mcp",workOsClientId:"client_01K6XQAY7JK6T5HXVSZW2S5VYK"}};function O(o){let i=o?.trim().toLowerCase();if(i==="production"||i==="staging"||i==="local")return i;return}function B(){if(typeof process>"u"||!process?.env)return{};return process.env}function $e(){let o=B();return O(o.CLINE_ENVIRONMENT_OVERRIDE)??O(o.CLINE_ENVIRONMENT)??"production"}function Fe(o){if(typeof o==="string")return M[o];return M[$e()]}function Ue(o,i){if(i.CLINE_API_BASE_URL)o={...o,apiBaseUrl:i.CLINE_API_BASE_URL,mcpBaseUrl:`${i.CLINE_API_BASE_URL}/v1/mcp`};return o}function P(o){let i=Fe(o);return Ue(i,B())}var qe=["rules","skills","workflows","plugins"];var Ht=new Set(qe);var ze=p.object({rootPath:p.string().min(1),hint:p.string().min(1).optional(),associatedRemoteUrls:p.array(p.string().min(1)).optional(),latestGitCommitHash:p.string().min(1).optional(),latestGitBranchName:p.string().min(1).optional()}),Wt=p.object({currentWorkspacePath:p.string().min(1).optional(),workspaces:p.record(p.string().min(1),ze)});var He=["current_state","boundary_analysis","interface_proposal"];var m=e.preprocess((o)=>o instanceof Date?o.toISOString():o,e.string().datetime()),y=e.enum(["pending","in_progress","blocked","completed"]),D=e.enum(["queued","running","completed","failed","cancelled","interrupted"]),v=e.enum(["draft","in_review","finalized"]),Ge=e.object({agentId:e.string(),role:e.enum(["lead","teammate"]),description:e.string().optional(),status:e.enum(["idle","running","stopped"])}),Xt=e.object({agentId:e.string(),rolePrompt:e.string(),modelId:e.string().optional(),maxIterations:e.number().optional()});function u(o){return e.preprocess((i)=>i===null?void 0:i,o.optional())}var Kt=e.object({agentId:e.string().min(1).describe("Teammate identifier"),rolePrompt:e.string().min(1).describe("System prompt describing teammate role")}).strict(),Jt=e.object({agentId:e.string().min(1).describe("Teammate identifier"),reason:u(e.string().min(1)).describe("Optional shutdown reason")}),Zt=e.object({}),We={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var Qt=e.object({action:e.enum(["create","list","claim","complete","block"]),title:u(e.string().min(1)).describe("Task title"),description:u(e.string().min(1)).describe("Task details"),dependsOn:u(e.array(e.string().describe("Dependency task ID"))).describe("Array of dependency task IDs"),assignee:u(e.string().min(1)).describe("Optional assignee"),status:u(e.enum(["pending","in_progress","blocked","completed"])).describe("Optional task status filter"),taskId:u(e.string()).describe("Task ID"),summary:u(e.string().min(1)).describe("Completion summary"),reason:u(e.string().min(1)).describe("Blocking reason")}).superRefine((o,i)=>{for(let c of We[o.action]){if(o[c]!==void 0)continue;i.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${o.action}`})}}),Vt=e.object({agentId:e.string().describe("Teammate agent ID"),task:e.string().min(1).describe("Task instructions for the teammate"),taskId:u(e.string()).describe("Optional shared task list ID"),runMode:u(e.enum(["sync","async"])).describe("Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later."),continueConversation:u(e.boolean()).describe("If true, continue the teammate conversation; otherwise start fresh")}),er=e.object({status:u(e.enum(["queued","running","completed","failed","cancelled","interrupted"])).describe("Optional run status filter. Omit to include all statuses."),agentId:u(e.string().min(1)).describe("Optional teammate ID filter. Omit to include all teammates."),includeCompleted:u(e.boolean()).describe("Include completed/failed runs (default true)")}),tr=e.object({runId:e.string().min(1).describe("Run ID"),reason:u(e.string().min(1)).describe("Optional cancellation reason")}),rr=e.object({runId:u(e.string().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),or=e.object({toAgentId:e.string().min(1).describe("Recipient agent ID"),subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),nr=e.object({subject:e.string().min(1).describe("Message subject"),body:e.string().min(1).describe("Message body"),taskId:u(e.string().min(1)).describe("Optional task ID context")}),ar=e.object({unreadOnly:u(e.boolean()).describe("Only unread messages for read action (default true)")}),ir=e.object({kind:e.enum(["progress","handoff","blocked","decision","done","error"]),summary:e.string().min(1).describe("Update summary"),taskId:u(e.string().min(1)).describe("Optional task ID context"),evidence:u(e.array(e.string().min(1))).describe("Optional evidence links/snippets"),nextAction:u(e.string().min(1)).describe("Planned next step")}),sr=e.object({}),lr=e.object({title:e.string().describe("Outcome title"),requiredSections:e.array(e.string()).default(He).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),ur=e.object({outcomeId:e.string().describe("Outcome ID"),section:e.string().describe("Section name"),sourceRunId:u(e.string()).describe("Optional source run ID"),content:e.string().describe("Section fragment content")}),cr=e.object({fragmentId:e.string().describe("Fragment ID"),approved:e.boolean().describe("Review decision")}),dr=e.object({outcomeId:e.string().describe("Outcome ID")}),pr=e.object({}),mr=e.object({teamId:e.string(),teamName:e.string(),members:e.array(Ge),taskCounts:e.record(y,e.number()),unreadMessages:e.number(),missionLogEntries:e.number(),activeRuns:e.number(),queuedRuns:e.number(),outcomeCounts:e.record(v,e.number())}),Ye=e.object({id:e.string(),title:e.string(),description:e.string(),status:y,createdAt:m,updatedAt:m,createdBy:e.string(),assignee:e.string().optional(),dependsOn:e.array(e.string()),summary:e.string().optional(),isReady:e.boolean(),blockedBy:e.array(e.string())}),gr=e.discriminatedUnion("action",[e.object({action:e.literal("create"),taskId:e.string(),status:y,ignoredFields:e.array(e.string()).optional(),note:e.string().optional()}),e.object({action:e.literal("list"),tasks:e.array(Ye)}),e.object({action:e.literal("claim"),taskId:e.string(),status:y,nextStep:e.string()}),e.object({action:e.literal("complete"),taskId:e.string(),status:y}),e.object({action:e.literal("block"),taskId:e.string(),status:y})]),fr=e.object({agentId:e.string(),mode:e.enum(["sync","async"]),status:e.enum(["dispatched","running","queued","joined"]),dispatched:e.boolean(),message:e.string(),deduped:e.boolean().optional(),runId:e.string().optional(),text:e.string().optional(),iterations:e.number().optional()}),Xe=e.object({textPreview:e.string(),iterations:e.number(),finishReason:e.string(),durationMs:e.number(),usage:e.object({inputTokens:e.number(),outputTokens:e.number(),cacheReadTokens:e.number().optional(),cacheWriteTokens:e.number().optional(),totalCost:e.number().optional()})}),hr=e.object({id:e.string(),agentId:e.string(),taskId:e.string().optional(),status:D,messagePreview:e.string(),priority:e.number(),retryCount:e.number(),maxRetries:e.number(),nextAttemptAt:m.optional(),continueConversation:e.boolean().optional(),startedAt:m,endedAt:m.optional(),leaseOwner:e.string().optional(),heartbeatAt:m.optional(),lastProgressAt:m.optional(),lastProgressMessage:e.string().optional(),currentActivity:e.string().optional(),error:e.string().optional(),resultSummary:Xe.optional()}),br=e.object({id:e.string(),teamId:e.string(),fromAgentId:e.string(),toAgentId:e.string(),subject:e.string(),body:e.string(),taskId:e.string().optional(),sentAt:m,readAt:m.optional()}),yr=e.object({id:e.string(),teamId:e.string(),title:e.string(),status:v,requiredSections:e.array(e.string()),createdBy:e.string(),createdAt:m,finalizedAt:m.optional()}),vr=e.object({outcomeId:e.string(),status:v,requiredSections:e.array(e.string())}),kr=e.object({agentId:e.string(),status:e.string()}),Tr=e.object({runId:e.string(),status:D}),wr=e.object({id:e.string(),toAgentId:e.string()}),Er=e.object({delivered:e.number()}),Sr=e.object({id:e.string()}),_r=e.object({status:e.string()}),Ar=e.object({fragmentId:e.string(),status:e.string()}),Cr=e.object({outcomeId:e.string(),status:v}),Ke;((o)=>{o.TaskStart="task_start",o.TaskEnd="task_end",o.AgentEvent="agent_event",o.TeammateSpawned="teammate_spawned",o.TeammateShutdown="teammate_shutdown",o.TeamTaskUpdated="team_task_updated",o.TeamMessage="team_message",o.TeamMissionLog="team_mission_log",o.TeamTaskCompleted="team_task_completed",o.RunStarted="run_started",o.RunQueued="run_queued",o.RunProgress="run_progress",o.RunCompleted="run_completed",o.RunFailed="run_failed",o.RunCancelled="run_cancelled",o.RunInterrupted="run_interrupted",o.OutcomeCreated="outcome_created",o.OutcomeFragmentAttached="outcome_fragment_attached",o.OutcomeFragmentReviewed="outcome_fragment_reviewed",o.OutcomeFinalized="outcome_finalized"})(Ke||={});var Je="the user is not subscribed to required model plan",Ze="no access to clinepass subscription models yet. subscribe to clinepass",Qe="organization accounts cannot use individual model inference subscriptions",Ve="you have reached your",et="clinepass limit",L="please try again later.",tt="free limit reached on model",$="try again in ",rt="model not found";function F(o){let i=o.toLowerCase(),c=i.indexOf(Ve);if(c===-1)return;let f=i.indexOf(L,c);if(f===-1)return;let b=f+L.length;if(!i.slice(c,b).includes(et))return;return{start:c,end:b}}function U(){return`${new URL("/dashboard/subscription?personal=true",P().appBaseUrl).toString()}`}function q(){return`No access to ClinePass subscription models yet. Subscribe to ClinePass, the low cost open weights model coding plan: ${U()}`}class E extends Error{providerId;constructor(o){super(q());this.name="ClineNotSubscribedError",this.providerId=o}}function z(){return"Organization accounts cannot use ClinePass subscriptions. Go to /account -> change account to switch to your personal account for ClinePass"}class S extends Error{providerId;constructor(o){super(z());this.name="ClineOrgIndividualInferenceSubscriptionError",this.providerId=o}}class _ extends Error{providerId;constructor(o,i){super(o);this.name="ClinePassLimitError",this.providerId=i}}class A extends Error{providerId;constructor(o,i){super(o);this.name="ClineFreeModelLimitError",this.providerId=i}}function ot(o){return o instanceof E}function nt(o){return o instanceof S}function at(o){return o instanceof _}function it(o){return o instanceof A}function st(o){let i=o.trim().toLowerCase();return i.includes(Je)||i.includes(Ze)}function lt(o){return o.toLowerCase().includes(Qe)}function ut(o){return F(o)!==void 0}function ct(o){let i=F(o);return i?o.slice(i.start,i.end):void 0}function dt(o){return o.toLowerCase().includes(tt)}function pt(o){return o.toLowerCase().includes(rt)}function mt(o){let i=o.toLowerCase(),c=i.indexOf($);if(c===-1)return;return i.slice(c+$.length).trim()||void 0}var H=["302ai","abacus","abliteration-ai","ai-router","aiand","aihubmix","aki-io","alibaba","alibaba-cn","alibaba-coding-plan","alibaba-coding-plan-cn","alibaba-token-plan","alibaba-token-plan-cn","ambient","anthropic","anyapi","atomic-chat","auriko","bailing","baseten","bedrock","berget","blueclaw","cerebras","chutes","clarifai","claudinio","cline-pass","cloudferro-sherlock","cloudflare-workers-ai","cortecs","crof","crossmodel","daoxe","databricks","deepseek","digitalocean","dinference","drun","ebcloud","empiriolabs","evroc","fastrouter","fireworks","freemodel","friendli","frogbot","gemini","github-copilot","github-models","gmicloud","greenpt","groq","helicone","hetzner","hpc-ai","huggingface","hyper","iflowcn","inception","inceptron","inference","inferx","io-net","jiekou","kenari","kilo","kimi-for-coding","kuae-cloud-coding-plan","lilac","llama","llmgateway","llmtr","lmstudio","longcat","lucidquery","lynkr","meganova","meta","minimax","minimax-cn","minimax-cn-coding-plan","minimax-coding-plan","mistral","mixlayer","moark","modal","model-oracle-ai","modelscope","moonshot","moonshotai-cn","morph","nano-gpt","nearai","nebius","neon","neuralwatt","nova","novita-ai","nvidia","ofox","ollama","openai-native","opencode","opencode-go","openrouter","orcarouter","ovhcloud","perplexity-agent","pioneer","poe","poolside","privatemode-ai","qihang-ai","qiniu-ai","regolo-ai","requesty","routing-run","sakana","sapaicore","sarvam","scaleway","siliconflow","siliconflow-cn","snowflake-cortex","stackit","stepfun","stepfun-ai","stepfun-ai-step-plan","stepfun-step-plan","subconscious","submodel","synthetic","tencent-coding-plan","tencent-token-plan","tencent-tokenhub","the-grid-ai","thinkingmachines","tinfoil","together","trustedrouter","umans-ai","umans-ai-coding-plan","unorouter","upstage","v0","vercel-ai-gateway","vertex","vivgrid","vultr","wafer.ai","wandb","xai","xiaomi","xiaomi-token-plan-ams","xiaomi-token-plan-cn","xiaomi-token-plan-sgp","xpersona","zai","zai-coding-plan","zeldoc","zenifra","zenmux","zhipuai","zhipuai-coding-plan"];var k;((a)=>{a.ANTHROPIC="anthropic";a.CLAUDE_CODE="claude-code";a.CLINE="cline";a.CLINE_PASS="cline-pass";a.OPENAI_COMPATIBLE="openai-compatible";a.OPENAI_NATIVE="openai-native";a.OPENAI_CODEX="openai-codex";a.OPENAI_CODEX_CLI="openai-codex-cli";a.OPENCODE="opencode";a.BEDROCK="bedrock";a.VERTEX="vertex";a.GEMINI="gemini";a.OLLAMA="ollama";a.LMSTUDIO="lmstudio";a.DEEPSEEK="deepseek";a.XAI="xai";a.TOGETHER="together";a.FIREWORKS="fireworks";a.GROQ="groq";a.POOLSIDE="poolside";a.CEREBRAS="cerebras";a.SAMBANOVA="sambanova";a.NEBIUS="nebius";a.BASETEN="baseten";a.REQUESTY="requesty";a.LITELLM="litellm";a.HUGGINGFACE="huggingface";a.VERCEL_AI_GATEWAY="vercel-ai-gateway";a.V0="v0";a.AIHUBMIX="aihubmix";a.HICAP="hicap";a.NOUS_RESEARCH="nousResearch";a.HUAWEI_CLOUD_MAAS="huawei-cloud-maas";a.WANDB="wandb";a.XIAOMI="xiaomi";a.TENCENT_TOKENHUB="tencent-tokenhub";a.KILO="kilo";a.ZAI="zai";a.ZAI_CODING_PLAN="zai-coding-plan";a.QWEN="qwen";a.QWEN_CODE="qwen-code";a.DOUBAO="doubao";a.MISTRAL="mistral";a.MOONSHOT="moonshot";a.ASKSAGE="asksage";a.MINIMAX="minimax";a.DIFY="dify";a.OCA="oca";a.SAPAICORE="sapaicore";a.OPENROUTER="openrouter"})(k||={});var gt={openai:"openai-compatible",togetherai:"together","sap-ai-core":"sapaicore"},G=[...new Set([...Object.values(k),...H])];function C(o){let i=o.trim();return gt[i]??i}export{C as normalizeProviderId,ut as isClinePassLimitMessage,at as isClinePassLimitError,lt as isClineOrgIndividualInferenceSubscriptionMessage,nt as isClineOrgIndividualInferenceSubscriptionError,st as isClineNotSubscribedMessage,ot as isClineNotSubscribedError,pt as isClineModelNotFoundMessage,dt as isClineFreeModelLimitMessage,it as isClineFreeModelLimitError,U as getClinePassSubscriptionUrl,z as getClineOrgIndividualInferenceSubscriptionMessage,q as getClineNotSubscribedMessage,ct as extractClinePassLimitMessage,mt as extractClineFreeModelLimitResetTime,_ as ClinePassLimitError,S as ClineOrgIndividualInferenceSubscriptionError,E as ClineNotSubscribedError,A as ClineFreeModelLimitError};
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { OLLAMA_DEFAULT_CONTEXT_WINDOW } from "./providers/builtins";
|
|
1
|
+
export { isProviderApiLine, OLLAMA_DEFAULT_CONTEXT_WINDOW, type ProviderApiLine, resolveProviderApiLineBaseUrl, } from "./providers/builtins";
|
|
2
2
|
export { type ApiHandler, BUILT_IN_PROVIDER, BUILT_IN_PROVIDER_IDS, type BuiltInProviderId, type HandlerFactory, isBuiltInProviderId, type LazyHandlerFactory, normalizeProviderId, type ProviderCapability, type ProviderConfig, type ProviderId, } from "./providers/types";
|
|
3
3
|
import { type ApiHandler, type ProviderConfig } from "./providers/types";
|
|
4
4
|
export { ClineFreeModelLimitError, ClineNotSubscribedError, ClineOrgIndividualInferenceSubscriptionError, ClinePassLimitError, extractClineFreeModelLimitResetTime, extractClinePassLimitMessage, getClineNotSubscribedMessage, getClineOrgIndividualInferenceSubscriptionMessage, getClinePassSubscriptionUrl, isClineFreeModelLimitError, isClineFreeModelLimitMessage, isClineModelNotFoundMessage, isClineNotSubscribedError, isClineNotSubscribedMessage, isClineOrgIndividualInferenceSubscriptionError, isClineOrgIndividualInferenceSubscriptionMessage, isClinePassLimitError, isClinePassLimitMessage, } from "./providers/errors";
|
package/dist/providers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,6BAA6B,EAC7B,KAAK,eAAe,EACpB,6BAA6B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,UAAU,EACf,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,UAAU,GACf,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EACN,KAAK,UAAU,EAEf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