@cline/llms 0.0.74 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog/catalog.generated.d.ts.map +1 -1
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -53
- package/dist/models.js +36 -36
- package/dist/providers/ai-sdk.d.ts +1 -0
- package/dist/providers/ai-sdk.d.ts.map +1 -1
- package/dist/providers/builtin-types.d.ts +3 -2
- 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 +2 -0
- package/dist/providers/builtins.d.ts.map +1 -1
- package/dist/providers/compat.d.ts.map +1 -1
- package/dist/providers/gateway.d.ts.map +1 -1
- package/dist/providers/model-tools.d.ts +15 -0
- package/dist/providers/model-tools.d.ts.map +1 -0
- 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/provider-options-types.d.ts +1 -1
- package/dist/providers/routing/provider-options-types.d.ts.map +1 -1
- package/dist/providers/routing/utils.d.ts +11 -2
- package/dist/providers/routing/utils.d.ts.map +1 -1
- package/dist/providers/vendors/anthropic.d.ts.map +1 -1
- package/dist/providers/vendors/cline.d.ts +37 -0
- package/dist/providers/vendors/cline.d.ts.map +1 -0
- package/dist/providers/vendors/google.d.ts.map +1 -1
- package/dist/providers/vendors/openai.d.ts.map +1 -1
- package/dist/providers/vendors/types.d.ts +6 -2
- package/dist/providers/vendors/types.d.ts.map +1 -1
- package/dist/providers/vendors/vertex.d.ts.map +1 -1
- package/dist/providers.browser.js +2 -2
- package/dist/providers.js +53 -53
- package/package.json +3 -2
|
@@ -61,6 +61,7 @@ export declare function normalizeUsage(usageValue: AiSdkStreamUsage | AiSdkStrea
|
|
|
61
61
|
*/
|
|
62
62
|
export declare function withEmptyResponseRetry(model: unknown, retryEmptyResponses: ProviderFactoryResult["retryEmptyResponses"], logger: GatewayProviderContext["logger"]): unknown;
|
|
63
63
|
export declare const createOpenAIProvider: GatewayProviderFactory;
|
|
64
|
+
export declare const createClineProvider: GatewayProviderFactory;
|
|
64
65
|
export declare const createOpenAICompatibleProvider: GatewayProviderFactory;
|
|
65
66
|
export declare const createAnthropicProvider: GatewayProviderFactory;
|
|
66
67
|
export declare const createGoogleProvider: GatewayProviderFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-sdk.d.ts","sourceRoot":"","sources":["../../src/providers/ai-sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIX,sBAAsB,EACtB,sBAAsB,EAEtB,oBAAoB,EAEpB,MAAM,eAAe,CAAC;AASvB,OAAO,EACN,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"ai-sdk.d.ts","sourceRoot":"","sources":["../../src/providers/ai-sdk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIX,sBAAsB,EACtB,sBAAsB,EAEtB,oBAAoB,EAEpB,MAAM,eAAe,CAAC;AASvB,OAAO,EACN,KAAK,YAAY,EAOjB,MAAM,IAAI,CAAC;AA4BZ,OAAO,KAAK,EAGX,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,UAAU,sBAAsB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,sBAAsB,GAC9B,OAAO,CAAC,YAAY,CAAC,CASvB;AAgYD,UAAU,kBAAkB;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAC3E,QAAQ,EACR,KAAK,GACL,EAAE;IACF,QAAQ,EAAE,CAAC,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;CACf,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAqBpB;AAkOD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC7B,UAAU,EACP,gBAAgB,GAChB,qBAAqB,GACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,SAAS,EACZ,gBAAgB,CAAC,EAAE,OAAO,EAC1B,YAAY,CAAC,EAAE,OAAO,GACpB,sBAAsB,CAsIxB;AAmcD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,OAAO,EACd,mBAAmB,EAAE,qBAAqB,CAAC,qBAAqB,CAAC,EACjE,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,GACtC,OAAO,CAWT;AA4KD,eAAO,MAAM,oBAAoB,wBAAgC,CAAC;AAClE,eAAO,MAAM,mBAAmB,wBAA+B,CAAC;AAChE,eAAO,MAAM,8BAA8B,wBACF,CAAC;AAC1C,eAAO,MAAM,uBAAuB,wBAAmC,CAAC;AACxE,eAAO,MAAM,oBAAoB,wBAAgC,CAAC;AAClE,eAAO,MAAM,oBAAoB,wBAAgC,CAAC;AAClE,eAAO,MAAM,qBAAqB,wBAAiC,CAAC;AACpE,eAAO,MAAM,qBAAqB,wBAAiC,CAAC;AACpE,eAAO,MAAM,wBAAwB,wBAAqC,CAAC;AAC3E,eAAO,MAAM,yBAAyB,wBAAsC,CAAC;AAC7E,eAAO,MAAM,sBAAsB,wBAAkC,CAAC;AACtE,eAAO,MAAM,kBAAkB,wBAA8B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,wBAAgC,CAAC;AAClE,eAAO,MAAM,uBAAuB,wBAAmC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { GatewayProviderMetadata, GatewayProviderSettings, ProviderCapability, ProviderConfigField } from "@cline/shared";
|
|
1
|
+
import type { GatewayModelToolCapability, GatewayProviderMetadata, GatewayProviderSettings, ProviderCapability, ProviderConfigField } from "@cline/shared";
|
|
2
2
|
import type { ModelInfo, ProviderClient, ProviderProtocol } from "../catalog/types";
|
|
3
|
-
export type ProviderFamily = "openai" | "openai-compatible" | "anthropic" | "google" | "vertex" | "bedrock" | "mistral" | "claude-code" | "openai-codex" | "opencode" | "dify" | "ollama" | "sap-ai-core";
|
|
3
|
+
export type ProviderFamily = "cline" | "openai" | "openai-compatible" | "anthropic" | "google" | "vertex" | "bedrock" | "mistral" | "claude-code" | "openai-codex" | "opencode" | "dify" | "ollama" | "sap-ai-core";
|
|
4
4
|
export type ProviderApiLine = "china" | "international";
|
|
5
5
|
export interface BuiltinSpec {
|
|
6
6
|
id: string;
|
|
@@ -9,6 +9,7 @@ export interface BuiltinSpec {
|
|
|
9
9
|
family: ProviderFamily;
|
|
10
10
|
protocol?: ProviderProtocol;
|
|
11
11
|
client?: ProviderClient;
|
|
12
|
+
modelToolCapabilities?: readonly GatewayModelToolCapability[];
|
|
12
13
|
capabilities?: ProviderCapability[];
|
|
13
14
|
popular?: number;
|
|
14
15
|
modelsProviderId?: string;
|
|
@@ -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,aAAa,GACb,cAAc,GACd,UAAU,GACV,MAAM,GACN,QAAQ,GACR,aAAa,CAAC;AAEjB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,eAAe,CAAC;AAExD,MAAM,WAAW,WAAW;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAChD,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACrE,YAAY,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE,uBAAuB,CAAC;CACnC"}
|
|
1
|
+
{"version":3,"file":"builtin-types.d.ts","sourceRoot":"","sources":["../../src/providers/builtin-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,0BAA0B,EAC1B,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,OAAO,GACP,QAAQ,GACR,mBAAmB,GACnB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,aAAa,GACb,cAAc,GACd,UAAU,GACV,MAAM,GACN,QAAQ,GACR,aAAa,CAAC;AAEjB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,eAAe,CAAC;AAExD,MAAM,WAAW,WAAW;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,qBAAqB,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC9D,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAChD,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACrE,YAAY,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE,uBAAuB,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAkGvB,eAAO,MAAM,8BAA8B,EAAE,2BAA2B,EAsBpE,CAAC"}
|
|
@@ -23,6 +23,8 @@ export declare function isProviderApiLine(value: unknown): value is ProviderApiL
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function resolveProviderApiLineBaseUrl(providerId: string, apiLine: unknown): string | undefined;
|
|
25
25
|
export declare function toManifest(spec: BuiltinSpec): GatewayProviderManifest;
|
|
26
|
+
/** Static manifests used for synchronous capability checks before providers load. */
|
|
27
|
+
export declare const BUILTIN_PROVIDER_MANIFESTS_BY_ID: Readonly<Record<string, GatewayProviderManifest>>;
|
|
26
28
|
export declare const BUILTIN_PROVIDER_COLLECTION_LIST: ModelCollection[];
|
|
27
29
|
export declare const BUILTIN_PROVIDER_COLLECTIONS_BY_ID: Record<string, ModelCollection>;
|
|
28
30
|
//# sourceMappingURL=builtins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/providers/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/providers/builtins.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,KAAK,uBAAuB,EAO5B,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EACX,eAAe,EAIf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EAEf,MAAM,iBAAiB,CAAC;AAuBzB,eAAO,MAAM,6BAA6B,0FAC8C,CAAC;AACzF,eAAO,MAAM,6BAA6B,iFACqC,CAAC;AAqBhF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,QAAQ,CAAC;AAEnD,YAAY,EACX,WAAW,EACX,eAAe,EACf,cAAc,GACd,MAAM,iBAAiB,CAAC;AAwkCzB,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,CAsCrE;AAED,qFAAqF;AACrF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CACtD,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAGvC,CAAC;AAEF,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;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;
|
|
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;AA+JD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAE1E;AAED,wBAAsB,4BAA4B,CACjD,MAAM,EAAE,cAAc,GACpB,OAAO,CAAC,UAAU,CAAC,CAqCrB;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;CAGpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAQvB,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;AAoED,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;CAkE1C;AAED,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,CAEpE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GatewayProviderManifest, ModelToolName } from "@cline/shared";
|
|
2
|
+
export interface ModelToolSupportInput {
|
|
3
|
+
providerId: string;
|
|
4
|
+
modelId?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Resolve a model-tool capability directly from a provider manifest. */
|
|
7
|
+
export declare function providerManifestSupportsModelTool(manifest: GatewayProviderManifest, modelId: string | undefined, toolName: ModelToolName): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Resolve stable native model-tool support for a configured Cline provider.
|
|
10
|
+
* This intentionally describes provider execution support, not ordinary
|
|
11
|
+
* function/tool calling support. Builtin specs are the source of truth; vendor
|
|
12
|
+
* modules only translate supported portable tools into AI SDK tool objects.
|
|
13
|
+
*/
|
|
14
|
+
export declare function supportsModelTool(input: ModelToolSupportInput, toolName: ModelToolName): boolean;
|
|
15
|
+
//# sourceMappingURL=model-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-tools.d.ts","sourceRoot":"","sources":["../../src/providers/model-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK5E,MAAM,WAAW,qBAAqB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAoBD,yEAAyE;AACzE,wBAAgB,iCAAiC,CAChD,QAAQ,EAAE,uBAAuB,EACjC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,aAAa,GACrB,OAAO,CAmBT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,qBAAqB,EAC5B,QAAQ,EAAE,aAAa,GACrB,OAAO,CAMT"}
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
*
|
|
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", "coralbricks", "cortecs", "crof", "crossmodel", "daoxe", "databricks", "deepseek", "digitalocean", "dinference", "drun", "ebcloud", "edenai", "empiriolabs", "evroc", "fastrouter", "fireworks", "freemodel", "friendli", "frogbot", "gemini", "github-copilot", "gmicloud", "greenpt", "groq", "helicone", "hetzner", "hpc-ai", "huggingface", "hyper", "iflowcn", "impossibl", "inception", "inceptron", "inference", "inferx", "infomaniak", "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", "modelis", "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", "scx", "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", "tensorx", "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", "coralbricks", "cortecs", "crof", "crossmodel", "crusoe", "daoxe", "databricks", "deepseek", "digitalocean", "dinference", "drun", "ebcloud", "edenai", "empiriolabs", "evroc", "fastrouter", "fireworks", "freemodel", "friendli", "frogbot", "gemini", "github-copilot", "gmicloud", "greenpt", "groq", "helicone", "hetzner", "hpc-ai", "huggingface", "hyper", "iflowcn", "impossibl", "inception", "inceptron", "inference", "inferx", "infomaniak", "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", "modelis", "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", "scx", "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", "tensorx", "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,wvEA6KzB,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,EAs2E1D,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;AAoHvB,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,6 +1,6 @@
|
|
|
1
1
|
import type { GatewayProviderContext, GatewayStreamRequest } from "@cline/shared";
|
|
2
2
|
import type { ProviderOptionsPatch } from "./utils";
|
|
3
|
-
export type AiSdkProviderOptionsTarget = "openai" | "openai-compatible" | "anthropic" | "google" | "vertex" | "bedrock" | "mistral" | "claude-code" | "openai-codex" | "opencode" | "dify" | "ollama" | "sapaicore";
|
|
3
|
+
export type AiSdkProviderOptionsTarget = "cline" | "openai" | "openai-compatible" | "anthropic" | "google" | "vertex" | "bedrock" | "mistral" | "claude-code" | "openai-codex" | "opencode" | "dify" | "ollama" | "sapaicore";
|
|
4
4
|
export type ProviderOptionSuppression = {
|
|
5
5
|
genericThinking?: boolean;
|
|
6
6
|
genericFanout?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-options-types.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/provider-options-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,MAAM,0BAA0B,GACnC,QAAQ,GACR,mBAAmB,GACnB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,aAAa,GACb,cAAc,GACd,UAAU,GACV,MAAM,GACN,QAAQ,GACR,WAAW,CAAC;AAEf,MAAM,MAAM,yBAAyB,GAAG;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,EAAE,sBAAsB,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,0BAA0B,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,GAAG;IACjE,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,YAAY,EAAE,yBAAyB,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EACF,SAAS,GACT,UAAU,GACV,iBAAiB,GACjB,oBAAoB,GACpB,cAAc,GACd,eAAe,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC;IAClD,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,KAAK,CAAC,KAAK,EAAE,wBAAwB,GAAG,oBAAoB,GAAG,SAAS,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,kBAAkB,CAAC;CACzB,CAAC;AAEF,wBAAgB,0BAA0B,CACzC,UAAU,EAAE,MAAM,GAChB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"provider-options-types.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/provider-options-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,MAAM,0BAA0B,GACnC,OAAO,GACP,QAAQ,GACR,mBAAmB,GACnB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,aAAa,GACb,cAAc,GACd,UAAU,GACV,MAAM,GACN,QAAQ,GACR,WAAW,CAAC;AAEf,MAAM,MAAM,yBAAyB,GAAG;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,oBAAoB,CAAC;IAC9B,OAAO,EAAE,sBAAsB,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,0BAA0B,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,GAAG;IACjE,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,YAAY,EAAE,yBAAyB,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EACF,SAAS,GACT,UAAU,GACV,iBAAiB,GACjB,oBAAoB,GACpB,cAAc,GACd,eAAe,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC;IAClD,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,KAAK,CAAC,KAAK,EAAE,wBAAwB,GAAG,oBAAoB,GAAG,SAAS,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE,kBAAkB,CAAC;CACzB,CAAC;AAEF,wBAAgB,0BAA0B,CACzC,UAAU,EAAE,MAAM,GAChB,0BAA0B,CAiC5B"}
|
|
@@ -6,8 +6,17 @@ export declare function createEphemeralCacheControl(): {
|
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* Target the
|
|
10
|
-
* bucket (e.g. `vercel-ai-gateway` +
|
|
9
|
+
* Target the AI SDK provider-name bucket for the provider id and, when
|
|
10
|
+
* distinct, its camelCase alias bucket (e.g. `vercel-ai-gateway` +
|
|
11
|
+
* `vercelAiGateway`).
|
|
12
|
+
*
|
|
13
|
+
* The bucket name must match the AI SDK provider `name`, because the
|
|
14
|
+
* openai-compatible model only applies request-body passthrough from
|
|
15
|
+
* `providerOptions[<name>]` (and its camelCase alias). For almost every
|
|
16
|
+
* provider the name is the gateway provider id, but both Cline gateway ids
|
|
17
|
+
* (`cline` and `cline-pass`) are served by the shared "cline" AI SDK provider
|
|
18
|
+
* (see `createClineProviderModule`) and hit the same Cline API, so their
|
|
19
|
+
* options key to the shared `cline` bucket.
|
|
11
20
|
*/
|
|
12
21
|
export declare function buildProviderAndAliasPatch(options: {
|
|
13
22
|
providerId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/routing/utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAE3E,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,wBAAgB,2BAA2B;;;;EAI1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GAAG,oBAAoB,CAcvB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC;CACrC,GAAG,oBAAoB,CAUvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/anthropic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AAOvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAsB,6BAA6B,CAClD,MAAM,EAAE,6BAA6B,EACrC,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/anthropic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AAOvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAsB,6BAA6B,CAClD,MAAM,EAAE,6BAA6B,EACrC,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAqChC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { LanguageModelV4 } from "@ai-sdk/provider";
|
|
2
|
+
import type { GatewayProviderContext, GatewayResolvedProviderConfig } from "@cline/shared";
|
|
3
|
+
import type { ProviderFactoryResult } from "./types";
|
|
4
|
+
export interface ClineWebSearchInput {
|
|
5
|
+
query: string;
|
|
6
|
+
allowed_domains?: string[];
|
|
7
|
+
blocked_domains?: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface ClineWebSearchResult {
|
|
10
|
+
results: Array<{
|
|
11
|
+
title?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export interface ClineWebSearchOptions {
|
|
16
|
+
allowedDomains?: string[];
|
|
17
|
+
blockedDomains?: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface ClineProviderOptions {
|
|
20
|
+
apiKey?: string;
|
|
21
|
+
baseURL: string;
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
fetch?: typeof fetch;
|
|
24
|
+
onResponseError?: (response: Response) => Promise<void> | void;
|
|
25
|
+
}
|
|
26
|
+
declare const webSearchFactory: import("@ai-sdk/provider-utils").ProviderDefinedToolFactory<ClineWebSearchInput, ClineWebSearchOptions, {}>;
|
|
27
|
+
export interface ClineProvider {
|
|
28
|
+
(modelId: string): LanguageModelV4;
|
|
29
|
+
tools: {
|
|
30
|
+
webSearch(options?: ClineWebSearchOptions): ReturnType<typeof webSearchFactory<ClineWebSearchResult>>;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** Create the Cline AI SDK provider, including Cline-native client tools. */
|
|
34
|
+
export declare function createCline(options: ClineProviderOptions): ClineProvider;
|
|
35
|
+
export declare function createClineProviderModule(config: GatewayResolvedProviderConfig, _context: GatewayProviderContext): Promise<ProviderFactoryResult>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=cline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cline.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/cline.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,eAAe,EAGf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AAMvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,qBAAqB;IACrC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC/D;AA+BD,QAAA,MAAM,gBAAgB,6GAMpB,CAAC;AA8FH,MAAM,WAAW,aAAa;IAC7B,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAAC;IACnC,KAAK,EAAE;QACN,SAAS,CACR,OAAO,CAAC,EAAE,qBAAqB,GAC7B,UAAU,CAAC,OAAO,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC;KAC7D,CAAC;CACF;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAgCxE;AAWD,wBAAsB,yBAAyB,CAC9C,MAAM,EAAE,6BAA6B,EACrC,QAAQ,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAwBhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/google.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/google.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAsB,0BAA0B,CAC/C,MAAM,EAAE,6BAA6B,EACrC,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAoBhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/openai.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/openai.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAcrD,wBAAsB,0BAA0B,CAC/C,MAAM,EAAE,6BAA6B,EACrC,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAoChC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type { GatewayProviderContext, GatewayStreamRequest } from "@cline/shared";
|
|
2
|
-
import type { CallSettings } from "ai";
|
|
1
|
+
import type { GatewayProviderContext, GatewayStreamRequest, ModelTool } from "@cline/shared";
|
|
2
|
+
import type { CallSettings, ToolSet } from "ai";
|
|
3
3
|
import type { RetryEmptyResponseOptions } from "../middleware/retry-empty-response";
|
|
4
4
|
export interface ProviderFactoryResult {
|
|
5
5
|
model: (modelId: string) => unknown;
|
|
6
|
+
/** Translate portable model-tool intent into provider-defined AI SDK tools. */
|
|
7
|
+
buildModelTools?: (tools: readonly ModelTool[]) => ToolSet;
|
|
8
|
+
/** AI SDK executes provider-defined client tools and continues model steps. */
|
|
9
|
+
executesModelTools?: boolean;
|
|
6
10
|
/**
|
|
7
11
|
* Policy for the gateway-level transient-failure retry. Every vendor
|
|
8
12
|
* model is wrapped with `createRetryEmptyResponseMiddleware` at the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,sBAAsB,EACtB,oBAAoB,EACpB,SAAS,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAEpF,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,+EAA+E;IAC/E,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,KAAK,OAAO,CAAC;IAC3D,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAC;IACxE,iBAAiB,CAAC,EAAE,CACnB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,sBAAsB,KAC3B,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,eAAe,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC9D,GAAG,CAAC,EAAE;QACL,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,2BAA2B,CAAC,EAAE,MAAM,CAAC;QACrC,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,cAAc,CAAC,EAAE;YAChB,yBAAyB,CAAC,EAAE,MAAM,CAAC;YACnC,yBAAyB,CAAC,EAAE,MAAM,CAAC;SACnC,CAAC;QACF,oBAAoB,CAAC,EAAE;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;SAC5B,CAAC;QACF,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,qBAAqB,CAAC,EAAE;YACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;SAC1B,CAAC;QACF,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,mBAAmB,CAAC,EAAE;YACrB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;SAC5B,CAAC;QACF,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,qBAAqB,CAAC,EAAE;YACvB,aAAa,CAAC,EAAE,MAAM,CAAC;YACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;SAC5B,CAAC;QACF,yBAAyB,CAAC,EAAE;YAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;SAC1B,CAAC;QACF,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,YAAY,CAAC,EAAE;YACd,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACxC,8BAA8B,CAAC,EAAE,MAAM,CAAC;YACxC,mCAAmC,CAAC,EAAE,MAAM,CAAC;SAC7C,CAAC;QACF,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7D;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IACjC,UAAU,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertex.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/vertex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"vertex.d.ts","sourceRoot":"","sources":["../../../src/providers/vendors/vertex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA8CrD,wBAAsB,0BAA0B,CAC/C,MAAM,EAAE,6BAA6B,EACrC,OAAO,EAAE,sBAAsB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAgDhC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{z as n}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 o}from"zod";import{z as Dt}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 jn}from"zod";var R=["none","minimal","low","medium","high","xhigh","max"],Y=d.enum(R),Z=Y.exclude(["none"]),K=d.enum([...R,"default"]).nullable(),X=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((r)=>r.min===void 0||r.max===void 0||r.min<=r.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),Q=l.enum(["default","openai-responses","r1"]);var V=l.enum(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),ee=l.enum(["active","preview","deprecated","legacy"]),te=l.object({input:l.number().optional(),output:l.number().optional(),cacheWrite:l.number().optional(),cacheRead:l.number().optional()}),ne=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(V).optional(),reasoningOptions:l.array(X).optional(),apiFormat:Q.optional(),systemRole:l.enum(["system","developer"]).optional(),temperature:l.number().optional(),pricing:te.optional(),thinkingConfig:ne.optional(),status:ee.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()}),ie=n.enum(["completed","max_iterations","aborted","mistake_limit","error"]),ae=n.object({inputTokens:n.number(),outputTokens:n.number(),cacheReadTokens:n.number().optional(),cacheWriteTokens:n.number().optional(),totalCost:n.number().optional()}),Tt=n.object({text:n.string(),usage:ae,messages:n.array(n.custom()),toolCalls:n.array(oe),iterations:n.number(),finishReason:ie,model:n.object({id:n.string(),provider:n.string(),info:j.optional()}),startedAt:n.date(),endedAt:n.date(),durationMs:n.number()}),wt=n.object({sessionId:n.string().optional(),providerId:n.string(),modelId:n.string(),apiKey:n.string().optional(),baseUrl:n.string().url().optional(),headers:n.record(n.string(),n.string()).optional(),knownModels:n.record(n.string(),j).optional(),providerConfig:n.unknown().optional(),initialMessages:n.array(n.custom()).optional(),systemPrompt:n.string(),tools:n.array(n.custom()),maxIterations:n.number().positive().optional(),maxParallelToolCalls:n.number().int().positive().default(8),maxTokensPerTurn:n.number().positive().optional(),temperature:n.number().nonnegative().optional(),apiTimeoutMs:n.number().positive().default(180000),userFileContentLoader:n.function().input([n.string()]).output(n.promise(n.string())).optional(),toolContextMetadata:n.record(n.string(),n.unknown()).optional(),execution:n.object({maxConsecutiveMistakes:n.number().int().positive().optional(),reminderAfterIterations:n.number().nonnegative().optional(),reminderText:n.string().optional(),loopDetection:n.union([n.literal(!1),n.object({softThreshold:n.number().int().positive().optional(),hardThreshold:n.number().int().positive().optional()})]).optional()}).optional(),reasoningEffort:Z.optional(),thinkingBudgetTokens:n.number().positive().optional(),thinking:n.boolean().optional(),onEvent:n.function().input([n.custom()]).output(n.void()).optional(),hooks:n.custom().optional(),parentAgentId:n.string().optional(),extensions:n.array(n.custom()).optional(),hookErrorMode:n.enum(["ignore","throw"]).default("ignore"),toolPolicies:n.record(n.string(),n.object({enabled:n.boolean().optional(),autoApprove:n.boolean().optional()})).optional(),requestToolApproval:n.function().input([n.object({sessionId:n.string(),agentId:n.string(),conversationId:n.string(),iteration:n.number(),toolCallId:n.string(),toolName:n.string(),input:n.unknown(),policy:n.object({enabled:n.boolean().optional(),autoApprove:n.boolean().optional()}).default({})})]).output(n.union([n.object({approved:n.boolean(),reason:n.string().optional()}),n.promise(n.object({approved:n.boolean(),reason:n.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:n.function().input([n.object({iteration:n.number().int().positive(),consecutiveMistakes:n.number().int().positive(),maxConsecutiveMistakes:n.number().int().positive(),reason:n.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:n.string().optional()})]).output(n.union([n.object({action:n.literal("continue"),guidance:n.string().optional()}),n.object({action:n.literal("stop"),reason:n.string().optional()}),n.promise(n.union([n.object({action:n.literal("continue"),guidance:n.string().optional()}),n.object({action:n.literal("stop"),reason:n.string().optional()})]))])).optional(),logger:n.custom().optional(),extensionContext:n.custom().optional(),abortSignal:n.custom().optional()}),se=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"]),le=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()}),ue=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()}),St=s.object({actor:le,context:ue,payload:s.record(s.string(),s.unknown()).optional()}),At=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()}),Ct=s.object({adapter:s.string(),botUserName:s.string().optional(),event:se,payload:s.record(s.string(),s.unknown()),ts:s.string()});var ce=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],_t=new Set(ce);var N={CLINE_PASS:"ext-cline-pass"},xt={[N.CLINE_PASS]:!1},It=Object.values(N),de=o.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),f=o.record(o.string(),o.string()),pe=o.object({toolName:o.string(),parameters:f}),me=o.object({toolName:o.string(),parameters:f,result:o.string(),success:o.boolean(),executionTimeMs:o.number()}),ge=o.object({prompt:o.string(),attachments:o.array(o.string())}),he=o.object({taskMetadata:f}),fe=o.object({taskMetadata:f,previousState:f}),be=o.object({taskMetadata:f}),ye=o.object({taskMetadata:f}),ve=o.object({taskId:o.string(),ulid:o.string(),contextSize:o.number(),compactionStrategy:o.string(),previousApiReqIndex:o.number(),tokensIn:o.number(),tokensOut:o.number(),tokensInCache:o.number(),tokensOutCache:o.number(),deletedRangeStart:o.number(),deletedRangeEnd:o.number(),contextJsonPath:o.string(),contextRawPath:o.string()}),Ot=o.object({clineVersion:o.string(),hookName:de,timestamp:o.string(),taskId:o.string(),sessionContext:o.object({rootSessionId:o.string().optional(),hookLogPath:o.string().optional()}).optional(),workspaceRoots:o.array(o.string()),workspaceInfo:o.custom().optional(),userId:o.string(),agent_id:o.string(),parent_agent_id:o.string().nullable(),iteration:o.number().optional(),reason:o.string().optional(),tool_call:o.object({id:o.string(),name:o.string(),input:o.unknown()}).optional(),tool_result:o.custom().optional(),turn:o.unknown().optional(),error:o.object({name:o.string(),message:o.string(),stack:o.string().optional()}).optional(),preToolUse:pe.optional(),postToolUse:me.optional(),userPromptSubmit:ge.optional(),taskStart:he.optional(),taskResume:fe.optional(),taskCancel:be.optional(),taskComplete:ye.optional(),preCompact:ve.optional()}).passthrough();var ke=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Rt=new Set(ke);var jt=["show","hide","subscription"];function Te(r){if(typeof globalThis.atob==="function")try{let a=globalThis.atob(r),c=Uint8Array.from(a,(h)=>h.charCodeAt(0));return new TextDecoder().decode(c)}catch{return null}if(typeof Buffer<"u")try{return Buffer.from(r,"base64").toString("utf8")}catch{return null}return null}function Nt(r){let a=r?.trim();if(!a)return null;try{let c=a.split(".");if(c.length!==3)return null;let h=c[1];if(!h)return null;let b=h.replace(/-/g,"+").replace(/_/g,"/"),J=b.padEnd(b.length+(4-b.length%4)%4,"="),x=Te(J);return x?JSON.parse(x):null}catch{return null}}var L=`# Plan Mode
|
|
1
|
+
import{z as n}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 o}from"zod";import{z as Dt}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 jn}from"zod";var R=["none","minimal","low","medium","high","xhigh","max"],Y=d.enum(R),Z=Y.exclude(["none"]),K=d.enum([...R,"default"]).nullable(),X=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((r)=>r.min===void 0||r.max===void 0||r.min<=r.max,{message:"Minimum reasoning budget cannot exceed maximum",path:["min"]})]),Q=l.enum(["default","openai-responses","r1"]);var V=l.enum(["images","video","tools","streaming","prompt-cache","reasoning","reasoning-effort","computer-use","global-endpoint","structured_output","temperature","files"]),ee=l.enum(["active","preview","deprecated","legacy"]),te=l.object({input:l.number().optional(),output:l.number().optional(),cacheWrite:l.number().optional(),cacheRead:l.number().optional()}),ne=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(V).optional(),reasoningOptions:l.array(X).optional(),apiFormat:Q.optional(),systemRole:l.enum(["system","developer"]).optional(),temperature:l.number().optional(),pricing:te.optional(),thinkingConfig:ne.optional(),status:ee.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(),execution:g.enum(["client","provider"]).optional(),input:g.unknown(),output:g.unknown(),error:g.string().optional(),durationMs:g.number(),startedAt:g.date(),endedAt:g.date()}),ie=n.enum(["completed","max_iterations","aborted","mistake_limit","error"]),ae=n.object({inputTokens:n.number(),outputTokens:n.number(),cacheReadTokens:n.number().optional(),cacheWriteTokens:n.number().optional(),totalCost:n.number().optional()}),Tt=n.object({text:n.string(),usage:ae,messages:n.array(n.custom()),toolCalls:n.array(oe),iterations:n.number(),finishReason:ie,model:n.object({id:n.string(),provider:n.string(),info:j.optional()}),startedAt:n.date(),endedAt:n.date(),durationMs:n.number()}),wt=n.object({sessionId:n.string().optional(),providerId:n.string(),modelId:n.string(),apiKey:n.string().optional(),baseUrl:n.string().url().optional(),headers:n.record(n.string(),n.string()).optional(),knownModels:n.record(n.string(),j).optional(),providerConfig:n.unknown().optional(),initialMessages:n.array(n.custom()).optional(),systemPrompt:n.string(),tools:n.array(n.custom()),modelTools:n.array(n.custom()).optional(),maxIterations:n.number().positive().optional(),maxParallelToolCalls:n.number().int().positive().default(8),maxTokensPerTurn:n.number().positive().optional(),temperature:n.number().nonnegative().optional(),apiTimeoutMs:n.number().positive().default(180000),userFileContentLoader:n.function().input([n.string()]).output(n.promise(n.string())).optional(),toolContextMetadata:n.record(n.string(),n.unknown()).optional(),execution:n.object({maxConsecutiveMistakes:n.number().int().positive().optional(),reminderAfterIterations:n.number().nonnegative().optional(),reminderText:n.string().optional(),loopDetection:n.union([n.literal(!1),n.object({softThreshold:n.number().int().positive().optional(),hardThreshold:n.number().int().positive().optional()})]).optional()}).optional(),reasoningEffort:Z.optional(),thinkingBudgetTokens:n.number().positive().optional(),thinking:n.boolean().optional(),onEvent:n.function().input([n.custom()]).output(n.void()).optional(),hooks:n.custom().optional(),parentAgentId:n.string().optional(),extensions:n.array(n.custom()).optional(),hookErrorMode:n.enum(["ignore","throw"]).default("ignore"),toolPolicies:n.record(n.string(),n.object({enabled:n.boolean().optional(),autoApprove:n.boolean().optional()})).optional(),requestToolApproval:n.function().input([n.object({sessionId:n.string(),agentId:n.string(),conversationId:n.string(),iteration:n.number(),toolCallId:n.string(),toolName:n.string(),input:n.unknown(),policy:n.object({enabled:n.boolean().optional(),autoApprove:n.boolean().optional()}).default({})})]).output(n.union([n.object({approved:n.boolean(),reason:n.string().optional()}),n.promise(n.object({approved:n.boolean(),reason:n.string().optional()}))])).optional(),onConsecutiveMistakeLimitReached:n.function().input([n.object({iteration:n.number().int().positive(),consecutiveMistakes:n.number().int().positive(),maxConsecutiveMistakes:n.number().int().positive(),reason:n.enum(["api_error","invalid_tool_call","tool_execution_failed"]),details:n.string().optional()})]).output(n.union([n.object({action:n.literal("continue"),guidance:n.string().optional()}),n.object({action:n.literal("stop"),reason:n.string().optional()}),n.promise(n.union([n.object({action:n.literal("continue"),guidance:n.string().optional()}),n.object({action:n.literal("stop"),reason:n.string().optional()})]))])).optional(),logger:n.custom().optional(),extensionContext:n.custom().optional(),abortSignal:n.custom().optional()}),se=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"]),le=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()}),ue=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()}),St=s.object({actor:le,context:ue,payload:s.record(s.string(),s.unknown()).optional()}),At=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()}),Ct=s.object({adapter:s.string(),botUserName:s.string().optional(),event:se,payload:s.record(s.string(),s.unknown()),ts:s.string()});var ce=["hooks","tools","commands","rules","skills","messageBuilders","providers","automationEvents","mcp"],_t=new Set(ce);var N={CLINE_PASS:"ext-cline-pass"},xt={[N.CLINE_PASS]:!1},It=Object.values(N),de=o.enum(["agent_start","agent_resume","agent_abort","agent_end","agent_error","tool_call","tool_result","prompt_submit","pre_compact","session_shutdown"]),f=o.record(o.string(),o.string()),pe=o.object({toolName:o.string(),parameters:f}),me=o.object({toolName:o.string(),parameters:f,result:o.string(),success:o.boolean(),executionTimeMs:o.number()}),ge=o.object({prompt:o.string(),attachments:o.array(o.string())}),he=o.object({taskMetadata:f}),fe=o.object({taskMetadata:f,previousState:f}),be=o.object({taskMetadata:f}),ye=o.object({taskMetadata:f}),ve=o.object({taskId:o.string(),ulid:o.string(),contextSize:o.number(),compactionStrategy:o.string(),previousApiReqIndex:o.number(),tokensIn:o.number(),tokensOut:o.number(),tokensInCache:o.number(),tokensOutCache:o.number(),deletedRangeStart:o.number(),deletedRangeEnd:o.number(),contextJsonPath:o.string(),contextRawPath:o.string()}),Ot=o.object({clineVersion:o.string(),hookName:de,timestamp:o.string(),taskId:o.string(),sessionContext:o.object({rootSessionId:o.string().optional(),hookLogPath:o.string().optional()}).optional(),workspaceRoots:o.array(o.string()),workspaceInfo:o.custom().optional(),userId:o.string(),agent_id:o.string(),parent_agent_id:o.string().nullable(),iteration:o.number().optional(),reason:o.string().optional(),tool_call:o.object({id:o.string(),name:o.string(),input:o.unknown()}).optional(),tool_result:o.custom().optional(),turn:o.unknown().optional(),error:o.object({name:o.string(),message:o.string(),stack:o.string().optional()}).optional(),preToolUse:pe.optional(),postToolUse:me.optional(),userPromptSubmit:ge.optional(),taskStart:he.optional(),taskResume:fe.optional(),taskCancel:be.optional(),taskComplete:ye.optional(),preCompact:ve.optional()}).passthrough();var ke=["readFile","search","bash","webFetch","editor","applyPatch","skills","askQuestion","submit"],Rt=new Set(ke);var jt=["show","hide","subscription"];function Te(r){if(typeof globalThis.atob==="function")try{let a=globalThis.atob(r),c=Uint8Array.from(a,(h)=>h.charCodeAt(0));return new TextDecoder().decode(c)}catch{return null}if(typeof Buffer<"u")try{return Buffer.from(r,"base64").toString("utf8")}catch{return null}return null}function Nt(r){let a=r?.trim();if(!a)return null;try{let c=a.split(".");if(c.length!==3)return null;let h=c[1];if(!h)return null;let b=h.replace(/-/g,"+").replace(/_/g,"/"),J=b.padEnd(b.length+(4-b.length%4)%4,"="),x=Te(J);return x?JSON.parse(x):null}catch{return null}}var L=`# Plan Mode
|
|
2
2
|
|
|
3
3
|
You are in Plan mode. Your role is to explore, analyze, and plan -- not to execute.
|
|
4
4
|
|
|
@@ -13,4 +13,4 @@ The run_commands tool remains available in plan mode strictly for read-only insp
|
|
|
13
13
|
|
|
14
14
|
Once the user has reviewed your plan and explicitly approved it in a follow-up message, use the switch_to_act_mode tool to switch to act mode and begin implementation. Calling switch_to_act_mode immediately starts execution, so never call it in the same turn you present a plan and never treat the original task request as approval -- end your turn after presenting the plan and wait for the user's response.`,Bt=`${L}
|
|
15
15
|
|
|
16
|
-
Once you have presented your plan, end your turn and wait for the user's response. You do NOT have the ability to switch to act mode yourself -- the user must do it manually with the Plan/Act toggle once they are satisfied with the plan. If the task requires tools that are only available in act mode, ask the user to "toggle to Act mode" (use those words).`;var $t="anthropic/claude-sonnet-5";var we=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()}),Ee=t.object({models:t.array(we).optional(),openAiBaseUrl:t.string().optional(),openAiHeaders:t.record(t.string(),t.string()).optional(),azureApiVersion:t.string().optional(),azureIdentity:t.boolean().optional()}),Se=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Ae=t.object({name:t.string(),baseModelId:t.string(),thinkingBudgetTokens:t.number().optional()}),Ce=t.object({models:t.array(Se).optional(),customModels:t.array(Ae).optional(),awsRegion:t.string().optional(),awsUseCrossRegionInference:t.boolean().optional(),awsUseGlobalInference:t.boolean().optional(),awsBedrockUsePromptCache:t.boolean().optional(),awsBedrockEndpoint:t.string().optional()}),_e=t.object({id:t.string()}),xe=t.object({models:t.array(_e).optional()}),Ie=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Me=t.object({models:t.array(Ie).optional(),vertexProjectId:t.string().optional(),vertexRegion:t.string().optional()}),Oe=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional(),promptCachingEnabled:t.boolean().optional()}),Re=t.object({models:t.array(Oe).optional(),baseUrl:t.string().optional()}),je=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Ne=t.object({models:t.array(je).optional(),baseUrl:t.string().optional()}),Le=t.object({OpenAiCompatible:Ee.optional(),AwsBedrock:Ce.optional(),Cline:xe.optional(),Vertex:Me.optional(),LiteLLM:Re.optional(),Anthropic:Ne.optional()}),De=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()}),I=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()}),Be=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()}),$e=t.object({promptUploading:Be.optional()}),Ut=t.object({version:t.string(),providerSettings:Le.optional(),telemetryEnabled:t.boolean().optional(),kanbanEnabled:t.boolean().optional(),mcpMarketplaceEnabled:t.boolean().optional(),allowedMCPServers:t.array(De).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:$e.optional(),globalRules:t.array(I).optional(),globalWorkflows:t.array(I).optional()}),qt=t.record(t.string(),t.string());var zt=w.enum(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),Wt=w.enum(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),Gt=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(r){let a=r?.trim().toLowerCase();if(a==="production"||a==="staging"||a==="local")return a;return}function D(){if(typeof process>"u"||!process?.env)return{};return process.env}function Fe(){let r=D();return O(r.CLINE_ENVIRONMENT_OVERRIDE)??O(r.CLINE_ENVIRONMENT)??"production"}function Ue(r){if(typeof r==="string")return M[r];return M[Fe()]}function qe(r,a){if(a.CLINE_API_BASE_URL)r={...r,apiBaseUrl:a.CLINE_API_BASE_URL,mcpBaseUrl:`${a.CLINE_API_BASE_URL}/v1/mcp`};return r}function P(r){let a=Ue(r);return qe(a,D())}var He=["rules","skills","workflows","plugins"];var Jt=new Set(He);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()}),Zt=p.object({currentWorkspacePath:p.string().min(1).optional(),workspaces:p.record(p.string().min(1),ze)});var We=["current_state","boundary_analysis","interface_proposal"];var m=e.preprocess((r)=>r instanceof Date?r.toISOString():r,e.string().datetime()),y=e.enum(["pending","in_progress","blocked","completed"]),B=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(r){return e.preprocess((a)=>a===null?void 0:a,r.optional())}var Qt=e.object({agentId:e.string().min(1).describe("Teammate identifier"),rolePrompt:e.string().min(1).describe("System prompt describing teammate role")}).strict(),Vt=e.object({agentId:e.string().min(1).describe("Teammate identifier"),reason:u(e.string().min(1)).describe("Optional shutdown reason")}),en=e.object({}),Je={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var tn=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((r,a)=>{for(let c of Je[r.action]){if(r[c]!==void 0)continue;a.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${r.action}`})}}),nn=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")}),rn=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)")}),on=e.object({runId:e.string().min(1).describe("Run ID"),reason:u(e.string().min(1)).describe("Optional cancellation reason")}),an=e.object({runId:u(e.string().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),sn=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")}),ln=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")}),un=e.object({unreadOnly:u(e.boolean()).describe("Only unread messages for read action (default true)")}),cn=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")}),dn=e.object({}),pn=e.object({title:e.string().describe("Outcome title"),requiredSections:e.array(e.string()).default(We).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),mn=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")}),gn=e.object({fragmentId:e.string().describe("Fragment ID"),approved:e.boolean().describe("Review decision")}),hn=e.object({outcomeId:e.string().describe("Outcome ID")}),fn=e.object({}),bn=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())}),yn=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})]),vn=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()})}),kn=e.object({id:e.string(),agentId:e.string(),taskId:e.string().optional(),status:B,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:Ze.optional()}),Tn=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()}),wn=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()}),En=e.object({outcomeId:e.string(),status:v,requiredSections:e.array(e.string())}),Sn=e.object({agentId:e.string(),status:e.string()}),An=e.object({runId:e.string(),status:B}),Cn=e.object({id:e.string(),toAgentId:e.string()}),_n=e.object({delivered:e.number()}),xn=e.object({id:e.string()}),In=e.object({status:e.string()}),Mn=e.object({fragmentId:e.string(),status:e.string()}),On=e.object({outcomeId:e.string(),status:v}),Ke;((r)=>{r.TaskStart="task_start",r.TaskEnd="task_end",r.AgentEvent="agent_event",r.TeammateSpawned="teammate_spawned",r.TeammateShutdown="teammate_shutdown",r.TeamTaskUpdated="team_task_updated",r.TeamMessage="team_message",r.TeamMissionLog="team_mission_log",r.TeamTaskCompleted="team_task_completed",r.RunStarted="run_started",r.RunQueued="run_queued",r.RunProgress="run_progress",r.RunCompleted="run_completed",r.RunFailed="run_failed",r.RunCancelled="run_cancelled",r.RunInterrupted="run_interrupted",r.OutcomeCreated="outcome_created",r.OutcomeFragmentAttached="outcome_fragment_attached",r.OutcomeFragmentReviewed="outcome_fragment_reviewed",r.OutcomeFinalized="outcome_finalized"})(Ke||={});var Xe="the user is not subscribed to required model plan",Qe="no access to clinepass subscription models yet. subscribe to clinepass",Ve="organization accounts cannot use individual model inference subscriptions",et="you have reached your",tt="clinepass limit",$="please try again later.",nt="free limit reached on model",F="try again in ",rt="model not found";function U(r){let a=r.toLowerCase(),c=a.indexOf(et);if(c===-1)return;let h=a.indexOf($,c);if(h===-1)return;let b=h+$.length;if(!a.slice(c,b).includes(tt))return;return{start:c,end:b}}function q(){return`${new URL("/dashboard/subscription?personal=true",P().appBaseUrl).toString()}`}function H(){return`No access to ClinePass subscription models yet. Subscribe to ClinePass, the low cost open weights model coding plan: ${q()}`}class E extends Error{providerId;constructor(r){super(H());this.name="ClineNotSubscribedError",this.providerId=r}}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(r){super(z());this.name="ClineOrgIndividualInferenceSubscriptionError",this.providerId=r}}class A extends Error{providerId;constructor(r,a){super(r);this.name="ClinePassLimitError",this.providerId=a}}class C extends Error{providerId;constructor(r,a){super(r);this.name="ClineFreeModelLimitError",this.providerId=a}}function ot(r){return r instanceof E}function it(r){return r instanceof S}function at(r){return r instanceof A}function st(r){return r instanceof C}function lt(r){let a=r.trim().toLowerCase();return a.includes(Xe)||a.includes(Qe)}function ut(r){return r.toLowerCase().includes(Ve)}function ct(r){return U(r)!==void 0}function dt(r){let a=U(r);return a?r.slice(a.start,a.end):void 0}function pt(r){return r.toLowerCase().includes(nt)}function mt(r){return r.toLowerCase().includes(rt)}function gt(r){let a=r.toLowerCase(),c=a.indexOf(F);if(c===-1)return;return a.slice(c+F.length).trim()||void 0}var W=["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","coralbricks","cortecs","crof","crossmodel","daoxe","databricks","deepseek","digitalocean","dinference","drun","ebcloud","edenai","empiriolabs","evroc","fastrouter","fireworks","freemodel","friendli","frogbot","gemini","github-copilot","gmicloud","greenpt","groq","helicone","hetzner","hpc-ai","huggingface","hyper","iflowcn","impossibl","inception","inceptron","inference","inferx","infomaniak","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","modelis","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","scx","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","tensorx","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;((i)=>{i.ANTHROPIC="anthropic";i.CLAUDE_CODE="claude-code";i.CLINE="cline";i.CLINE_PASS="cline-pass";i.OPENAI_COMPATIBLE="openai-compatible";i.OPENAI_NATIVE="openai-native";i.OPENAI_CODEX="openai-codex";i.OPENAI_CODEX_CLI="openai-codex-cli";i.OPENCODE="opencode";i.BEDROCK="bedrock";i.VERTEX="vertex";i.GEMINI="gemini";i.OLLAMA="ollama";i.LMSTUDIO="lmstudio";i.DEEPSEEK="deepseek";i.XAI="xai";i.TOGETHER="together";i.FIREWORKS="fireworks";i.GROQ="groq";i.POOLSIDE="poolside";i.CEREBRAS="cerebras";i.SAMBANOVA="sambanova";i.NEBIUS="nebius";i.BASETEN="baseten";i.REQUESTY="requesty";i.LITELLM="litellm";i.HUGGINGFACE="huggingface";i.VERCEL_AI_GATEWAY="vercel-ai-gateway";i.V0="v0";i.AIHUBMIX="aihubmix";i.HICAP="hicap";i.NOUS_RESEARCH="nousResearch";i.HUAWEI_CLOUD_MAAS="huawei-cloud-maas";i.WANDB="wandb";i.XIAOMI="xiaomi";i.TENCENT_TOKENHUB="tencent-tokenhub";i.KILO="kilo";i.ZAI="zai";i.ZAI_CODING_PLAN="zai-coding-plan";i.QWEN="qwen";i.QWEN_CODE="qwen-code";i.DOUBAO="doubao";i.MISTRAL="mistral";i.MOONSHOT="moonshot";i.ASKSAGE="asksage";i.MINIMAX="minimax";i.DIFY="dify";i.OCA="oca";i.SAPAICORE="sapaicore";i.OPENROUTER="openrouter"})(k||={});var ht={openai:"openai-compatible",togetherai:"together","sap-ai-core":"sapaicore"},G=[...new Set([...Object.values(k),...W])];function _(r){let a=r.trim();return ht[a]??a}export{_ as normalizeProviderId,ct as isClinePassLimitMessage,at as isClinePassLimitError,ut as isClineOrgIndividualInferenceSubscriptionMessage,it as isClineOrgIndividualInferenceSubscriptionError,lt as isClineNotSubscribedMessage,ot as isClineNotSubscribedError,mt as isClineModelNotFoundMessage,pt as isClineFreeModelLimitMessage,st as isClineFreeModelLimitError,q as getClinePassSubscriptionUrl,z as getClineOrgIndividualInferenceSubscriptionMessage,H as getClineNotSubscribedMessage,dt as extractClinePassLimitMessage,gt as extractClineFreeModelLimitResetTime,A as ClinePassLimitError,S as ClineOrgIndividualInferenceSubscriptionError,E as ClineNotSubscribedError,C as ClineFreeModelLimitError};
|
|
16
|
+
Once you have presented your plan, end your turn and wait for the user's response. You do NOT have the ability to switch to act mode yourself -- the user must do it manually with the Plan/Act toggle once they are satisfied with the plan. If the task requires tools that are only available in act mode, ask the user to "toggle to Act mode" (use those words).`;var $t="anthropic/claude-sonnet-5";var we=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()}),Ee=t.object({models:t.array(we).optional(),openAiBaseUrl:t.string().optional(),openAiHeaders:t.record(t.string(),t.string()).optional(),azureApiVersion:t.string().optional(),azureIdentity:t.boolean().optional()}),Se=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Ae=t.object({name:t.string(),baseModelId:t.string(),thinkingBudgetTokens:t.number().optional()}),Ce=t.object({models:t.array(Se).optional(),customModels:t.array(Ae).optional(),awsRegion:t.string().optional(),awsUseCrossRegionInference:t.boolean().optional(),awsUseGlobalInference:t.boolean().optional(),awsBedrockUsePromptCache:t.boolean().optional(),awsBedrockEndpoint:t.string().optional()}),_e=t.object({id:t.string()}),xe=t.object({models:t.array(_e).optional()}),Ie=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Me=t.object({models:t.array(Ie).optional(),vertexProjectId:t.string().optional(),vertexRegion:t.string().optional()}),Oe=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional(),promptCachingEnabled:t.boolean().optional()}),Re=t.object({models:t.array(Oe).optional(),baseUrl:t.string().optional()}),je=t.object({id:t.string(),thinkingBudgetTokens:t.number().optional()}),Ne=t.object({models:t.array(je).optional(),baseUrl:t.string().optional()}),Le=t.object({OpenAiCompatible:Ee.optional(),AwsBedrock:Ce.optional(),Cline:xe.optional(),Vertex:Me.optional(),LiteLLM:Re.optional(),Anthropic:Ne.optional()}),De=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()}),I=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()}),Be=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()}),$e=t.object({promptUploading:Be.optional()}),Ut=t.object({version:t.string(),providerSettings:Le.optional(),telemetryEnabled:t.boolean().optional(),kanbanEnabled:t.boolean().optional(),mcpMarketplaceEnabled:t.boolean().optional(),allowedMCPServers:t.array(De).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:$e.optional(),globalRules:t.array(I).optional(),globalWorkflows:t.array(I).optional()}),qt=t.record(t.string(),t.string());var zt=w.enum(["reasoning","prompt-cache","tools","provider-tools","oauth","temperature","files","streaming","vision","computer-use","local-auth","popular"]),Wt=w.enum(["anthropic","gemini","openai-chat","openai-responses","openai-r1","ai-sdk"]),Gt=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(r){let a=r?.trim().toLowerCase();if(a==="production"||a==="staging"||a==="local")return a;return}function D(){if(typeof process>"u"||!process?.env)return{};return process.env}function Fe(){let r=D();return O(r.CLINE_ENVIRONMENT_OVERRIDE)??O(r.CLINE_ENVIRONMENT)??"production"}function Ue(r){if(typeof r==="string")return M[r];return M[Fe()]}function qe(r,a){if(a.CLINE_API_BASE_URL)r={...r,apiBaseUrl:a.CLINE_API_BASE_URL,mcpBaseUrl:`${a.CLINE_API_BASE_URL}/v1/mcp`};return r}function P(r){let a=Ue(r);return qe(a,D())}var He=["rules","skills","workflows","plugins"];var Jt=new Set(He);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()}),Zt=p.object({currentWorkspacePath:p.string().min(1).optional(),workspaces:p.record(p.string().min(1),ze)});var We=["current_state","boundary_analysis","interface_proposal"];var m=e.preprocess((r)=>r instanceof Date?r.toISOString():r,e.string().datetime()),y=e.enum(["pending","in_progress","blocked","completed"]),B=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(r){return e.preprocess((a)=>a===null?void 0:a,r.optional())}var Qt=e.object({agentId:e.string().min(1).describe("Teammate identifier"),rolePrompt:e.string().min(1).describe("System prompt describing teammate role")}).strict(),Vt=e.object({agentId:e.string().min(1).describe("Teammate identifier"),reason:u(e.string().min(1)).describe("Optional shutdown reason")}),en=e.object({}),Je={create:["title","description"],list:[],claim:["taskId"],complete:["taskId","summary"],block:["taskId","reason"]};var tn=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((r,a)=>{for(let c of Je[r.action]){if(r[c]!==void 0)continue;a.addIssue({code:"custom",path:[c],message:`Field "${c}" is required when action=${r.action}`})}}),nn=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")}),rn=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)")}),on=e.object({runId:e.string().min(1).describe("Run ID"),reason:u(e.string().min(1)).describe("Optional cancellation reason")}),an=e.object({runId:u(e.string().min(1)).describe("Optional async run ID to await. Omit to wait for all active async runs.")}).strict(),sn=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")}),ln=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")}),un=e.object({unreadOnly:u(e.boolean()).describe("Only unread messages for read action (default true)")}),cn=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")}),dn=e.object({}),pn=e.object({title:e.string().describe("Outcome title"),requiredSections:e.array(e.string()).default(We).describe("Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)")}),mn=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")}),gn=e.object({fragmentId:e.string().describe("Fragment ID"),approved:e.boolean().describe("Review decision")}),hn=e.object({outcomeId:e.string().describe("Outcome ID")}),fn=e.object({}),bn=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())}),yn=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})]),vn=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()})}),kn=e.object({id:e.string(),agentId:e.string(),taskId:e.string().optional(),status:B,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:Ze.optional()}),Tn=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()}),wn=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()}),En=e.object({outcomeId:e.string(),status:v,requiredSections:e.array(e.string())}),Sn=e.object({agentId:e.string(),status:e.string()}),An=e.object({runId:e.string(),status:B}),Cn=e.object({id:e.string(),toAgentId:e.string()}),_n=e.object({delivered:e.number()}),xn=e.object({id:e.string()}),In=e.object({status:e.string()}),Mn=e.object({fragmentId:e.string(),status:e.string()}),On=e.object({outcomeId:e.string(),status:v}),Ke;((r)=>{r.TaskStart="task_start",r.TaskEnd="task_end",r.AgentEvent="agent_event",r.TeammateSpawned="teammate_spawned",r.TeammateShutdown="teammate_shutdown",r.TeamTaskUpdated="team_task_updated",r.TeamMessage="team_message",r.TeamMissionLog="team_mission_log",r.TeamTaskCompleted="team_task_completed",r.RunStarted="run_started",r.RunQueued="run_queued",r.RunProgress="run_progress",r.RunCompleted="run_completed",r.RunFailed="run_failed",r.RunCancelled="run_cancelled",r.RunInterrupted="run_interrupted",r.OutcomeCreated="outcome_created",r.OutcomeFragmentAttached="outcome_fragment_attached",r.OutcomeFragmentReviewed="outcome_fragment_reviewed",r.OutcomeFinalized="outcome_finalized"})(Ke||={});var Xe="the user is not subscribed to required model plan",Qe="no access to clinepass subscription models yet. subscribe to clinepass",Ve="organization accounts cannot use individual model inference subscriptions",et="you have reached your",tt="clinepass limit",$="please try again later.",nt="free limit reached on model",F="try again in ",rt="model not found";function U(r){let a=r.toLowerCase(),c=a.indexOf(et);if(c===-1)return;let h=a.indexOf($,c);if(h===-1)return;let b=h+$.length;if(!a.slice(c,b).includes(tt))return;return{start:c,end:b}}function q(){return`${new URL("/dashboard/subscription?personal=true",P().appBaseUrl).toString()}`}function H(){return`No access to ClinePass subscription models yet. Subscribe to ClinePass, the low cost open weights model coding plan: ${q()}`}class E extends Error{providerId;constructor(r){super(H());this.name="ClineNotSubscribedError",this.providerId=r}}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(r){super(z());this.name="ClineOrgIndividualInferenceSubscriptionError",this.providerId=r}}class A extends Error{providerId;constructor(r,a){super(r);this.name="ClinePassLimitError",this.providerId=a}}class C extends Error{providerId;constructor(r,a){super(r);this.name="ClineFreeModelLimitError",this.providerId=a}}function ot(r){return r instanceof E}function it(r){return r instanceof S}function at(r){return r instanceof A}function st(r){return r instanceof C}function lt(r){let a=r.trim().toLowerCase();return a.includes(Xe)||a.includes(Qe)}function ut(r){return r.toLowerCase().includes(Ve)}function ct(r){return U(r)!==void 0}function dt(r){let a=U(r);return a?r.slice(a.start,a.end):void 0}function pt(r){return r.toLowerCase().includes(nt)}function mt(r){return r.toLowerCase().includes(rt)}function gt(r){let a=r.toLowerCase(),c=a.indexOf(F);if(c===-1)return;return a.slice(c+F.length).trim()||void 0}var W=["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","coralbricks","cortecs","crof","crossmodel","crusoe","daoxe","databricks","deepseek","digitalocean","dinference","drun","ebcloud","edenai","empiriolabs","evroc","fastrouter","fireworks","freemodel","friendli","frogbot","gemini","github-copilot","gmicloud","greenpt","groq","helicone","hetzner","hpc-ai","huggingface","hyper","iflowcn","impossibl","inception","inceptron","inference","inferx","infomaniak","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","modelis","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","scx","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","tensorx","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;((i)=>{i.ANTHROPIC="anthropic";i.CLAUDE_CODE="claude-code";i.CLINE="cline";i.CLINE_PASS="cline-pass";i.OPENAI_COMPATIBLE="openai-compatible";i.OPENAI_NATIVE="openai-native";i.OPENAI_CODEX="openai-codex";i.OPENAI_CODEX_CLI="openai-codex-cli";i.OPENCODE="opencode";i.BEDROCK="bedrock";i.VERTEX="vertex";i.GEMINI="gemini";i.OLLAMA="ollama";i.LMSTUDIO="lmstudio";i.DEEPSEEK="deepseek";i.XAI="xai";i.TOGETHER="together";i.FIREWORKS="fireworks";i.GROQ="groq";i.POOLSIDE="poolside";i.CEREBRAS="cerebras";i.SAMBANOVA="sambanova";i.NEBIUS="nebius";i.BASETEN="baseten";i.REQUESTY="requesty";i.LITELLM="litellm";i.HUGGINGFACE="huggingface";i.VERCEL_AI_GATEWAY="vercel-ai-gateway";i.V0="v0";i.AIHUBMIX="aihubmix";i.HICAP="hicap";i.NOUS_RESEARCH="nousResearch";i.HUAWEI_CLOUD_MAAS="huawei-cloud-maas";i.WANDB="wandb";i.XIAOMI="xiaomi";i.TENCENT_TOKENHUB="tencent-tokenhub";i.KILO="kilo";i.ZAI="zai";i.ZAI_CODING_PLAN="zai-coding-plan";i.QWEN="qwen";i.QWEN_CODE="qwen-code";i.DOUBAO="doubao";i.MISTRAL="mistral";i.MOONSHOT="moonshot";i.ASKSAGE="asksage";i.MINIMAX="minimax";i.DIFY="dify";i.OCA="oca";i.SAPAICORE="sapaicore";i.OPENROUTER="openrouter"})(k||={});var ht={openai:"openai-compatible",togetherai:"together","sap-ai-core":"sapaicore"},G=[...new Set([...Object.values(k),...W])];function _(r){let a=r.trim();return ht[a]??a}export{_ as normalizeProviderId,ct as isClinePassLimitMessage,at as isClinePassLimitError,ut as isClineOrgIndividualInferenceSubscriptionMessage,it as isClineOrgIndividualInferenceSubscriptionError,lt as isClineNotSubscribedMessage,ot as isClineNotSubscribedError,mt as isClineModelNotFoundMessage,pt as isClineFreeModelLimitMessage,st as isClineFreeModelLimitError,q as getClinePassSubscriptionUrl,z as getClineOrgIndividualInferenceSubscriptionMessage,H as getClineNotSubscribedMessage,dt as extractClinePassLimitMessage,gt as extractClineFreeModelLimitResetTime,A as ClinePassLimitError,S as ClineOrgIndividualInferenceSubscriptionError,E as ClineNotSubscribedError,C as ClineFreeModelLimitError};
|