@cline/shared 0.0.39-nightly.1778555246 → 0.0.40

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.
@@ -5,13 +5,37 @@ import type { ITelemetryService } from "../services/telemetry";
5
5
  export type JsonValue = string | number | boolean | null | JsonValue[] | {
6
6
  [key: string]: JsonValue | undefined;
7
7
  };
8
- export type GatewayModelCapability = "text" | "tools" | "reasoning" | "images" | "audio" | "structured-output";
8
+ export type GatewayModelCapability = "text" | "tools" | "reasoning" | "prompt-cache" | "images" | "audio" | "structured-output";
9
9
  export type GatewayPromptCacheStrategy = "anthropic-automatic";
10
10
  export type GatewayUsageCostDisplay = "show" | "hide";
11
+ export type GatewayPromptCacheFormat = "anthropic-cache-control";
12
+ export type GatewayReasoningFormat = "anthropic-thinking";
13
+ export type GatewayModelRoute = {
14
+ matcher: "anthropic-compatible";
15
+ } | {
16
+ matcher: "model-family";
17
+ family: string;
18
+ requiredCapability?: GatewayModelCapability;
19
+ } | {
20
+ matcher: "model-id";
21
+ modelId: string;
22
+ requiredCapability?: GatewayModelCapability;
23
+ };
24
+ export interface GatewayProviderRouting {
25
+ promptCache?: {
26
+ format: GatewayPromptCacheFormat;
27
+ routes: GatewayModelRoute[];
28
+ };
29
+ reasoning?: {
30
+ format: GatewayReasoningFormat;
31
+ routes: GatewayModelRoute[];
32
+ };
33
+ }
11
34
  export interface GatewayProviderMetadata {
12
35
  promptCacheStrategy?: GatewayPromptCacheStrategy;
13
36
  usageCostDisplay?: GatewayUsageCostDisplay;
14
- [key: string]: JsonValue | undefined;
37
+ routing?: GatewayProviderRouting;
38
+ [key: string]: JsonValue | GatewayProviderRouting | undefined;
15
39
  }
16
40
  export interface GatewayModelDefinition {
17
41
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cline/shared",
3
- "version": "0.0.39-nightly.1778555246",
3
+ "version": "0.0.40",
4
4
  "description": "Shared utilities, types, and schemas for Cline packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -47,7 +47,6 @@
47
47
  ],
48
48
  "scripts": {
49
49
  "build": "BUILD_MODE=package bun bun.mts",
50
- "clean": "rm -rf dist node_modules",
51
50
  "typecheck": "bun tsc --noEmit",
52
51
  "test": "bun run test:unit",
53
52
  "test:unit": "vitest run --config vitest.config.ts"