@eddyskywalker/dsh-chatgpt-subscription 0.67.0 → 0.68.1
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/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/lib/client.js +75 -632
- package/lib/client.js.map +1 -1
- package/lib/index.js +183 -1872
- package/lib/types/client/cline-pass/ClinePassSection.d.ts +1 -1
- package/lib/types/client/cline-pass/ClinePassSection.d.ts.map +1 -1
- package/lib/types/client/cline-pass/api.d.ts +2 -36
- package/lib/types/client/cline-pass/api.d.ts.map +1 -1
- package/lib/types/client/cline-pass/locales.d.ts +30 -264
- package/lib/types/client/cline-pass/locales.d.ts.map +1 -1
- package/lib/types/client/cline-pass/styles.d.ts +2 -2
- package/lib/types/client/cline-pass/styles.d.ts.map +1 -1
- package/lib/types/client/locales-ru/cline-pass.d.ts.map +1 -1
- package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/antigravity/adapter.d.ts.map +1 -1
- package/lib/types/host/antigravity/client-version.d.ts.map +1 -1
- package/lib/types/host/antigravity/types.d.ts +5 -5
- package/lib/types/host/antigravity/types.d.ts.map +1 -1
- package/lib/types/host/cline-pass/adapter.d.ts +3 -4
- package/lib/types/host/cline-pass/adapter.d.ts.map +1 -1
- package/lib/types/host/cline-pass/client.d.ts +0 -22
- package/lib/types/host/cline-pass/client.d.ts.map +1 -1
- package/lib/types/host/cline-pass/engine.d.ts +9 -147
- package/lib/types/host/cline-pass/engine.d.ts.map +1 -1
- package/lib/types/host/cline-pass/line.d.ts.map +1 -1
- package/lib/types/host/cline-pass/mapper.d.ts +1 -3
- package/lib/types/host/cline-pass/mapper.d.ts.map +1 -1
- package/lib/types/host/cline-pass/protocol.d.ts +1 -161
- package/lib/types/host/cline-pass/protocol.d.ts.map +1 -1
- package/lib/types/host/cline-pass/routes.d.ts +2 -7
- package/lib/types/host/cline-pass/routes.d.ts.map +1 -1
- package/lib/types/host/cline-pass/store.d.ts +11 -35
- package/lib/types/host/cline-pass/store.d.ts.map +1 -1
- package/lib/types/host/cline-pass/token-store.d.ts +1 -10
- package/lib/types/host/cline-pass/token-store.d.ts.map +1 -1
- package/lib/types/host/cline-pass/tools.d.ts.map +1 -1
- package/lib/types/host/cline-pass/types.d.ts +7 -76
- package/lib/types/host/cline-pass/types.d.ts.map +1 -1
- package/lib/types/host/opendesign/adapter.d.ts.map +1 -1
- package/lib/types/host/opendesign/mapper.d.ts +13 -1
- package/lib/types/host/opendesign/mapper.d.ts.map +1 -1
- package/lib/types/host/opendesign/routes.d.ts.map +1 -1
- package/lib/types/index.d.ts +4 -4
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/cline-pass-contracts.d.ts +6 -92
- package/lib/types/shared/cline-pass-contracts.d.ts.map +1 -1
- package/lib/types/shared/opendesign-contracts.d.ts +1 -1
- package/lib/types/shared/opendesign-contracts.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-version.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/client-version.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,wGAC0E,CAAA;AAQvG;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"client-version.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/client-version.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,wGAC0E,CAAA;AAQvG;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKpE,CAAA;AAYD;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,MAA4B,GAAG,MAAM,GAAG,SAAS,CAGvF;AAED,iFAAiF;AACjF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,OAAO,KAAa,EAAE,GAAG,SAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBhG;AAED,sFAAsF;AACtF,wBAAgB,oBAAoB,IAAI,IAAI,CAI3C"}
|
|
@@ -37,8 +37,8 @@ export declare const ONBOARD_POLL_INTERVAL_MS = 1000;
|
|
|
37
37
|
* above the reference implementations' minimum, and refresh it together with
|
|
38
38
|
* `HUB_RELEASE_CHANGELISTS` (see `client-version.ts`).
|
|
39
39
|
*/
|
|
40
|
-
export declare const DEFAULT_ANTIGRAVITY_VERSION = "2.
|
|
41
|
-
export declare const DEFAULT_ANTIGRAVITY_CL = "
|
|
40
|
+
export declare const DEFAULT_ANTIGRAVITY_VERSION = "2.31.0";
|
|
41
|
+
export declare const DEFAULT_ANTIGRAVITY_CL = "1017595969";
|
|
42
42
|
/**
|
|
43
43
|
* The two identity fields the Hub adds on `onboardUser` control-plane calls.
|
|
44
44
|
*
|
|
@@ -96,9 +96,9 @@ export declare const TOOL_CALLING_MODE: {
|
|
|
96
96
|
* did not pick without telling them, which the official client never does. A
|
|
97
97
|
* runtime id the service rejects now surfaces as that rejection.
|
|
98
98
|
*
|
|
99
|
-
* The runtime ids are the ones `fetchAvailableModels` lists (
|
|
100
|
-
* 2026-
|
|
101
|
-
* quoted where the mapping is not obvious.
|
|
99
|
+
* The runtime ids are the ones `fetchAvailableModels` lists (verified through
|
|
100
|
+
* 2026-11-11, clients 2.29.0 / 2.31.0); the display names it publishes beside
|
|
101
|
+
* them are quoted where the mapping is not obvious.
|
|
102
102
|
*/
|
|
103
103
|
export interface AntigravityRoutingEntry {
|
|
104
104
|
off: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,gBAAgB,CAAA;AAC1C,eAAO,MAAM,WAAW,gBAAgB,CAAA;AAExC;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,SAAU,CAAA;AAC7C,eAAO,MAAM,wBAAwB,4BAA4B,CAAA;AACjE,eAAO,MAAM,oBAAoB,OAAQ,CAAA;AACzC,eAAO,MAAM,oBAAoB,QAAiB,CAAA;AAClD,eAAO,MAAM,kBAAkB,QAAiB,CAAA;AAChD,eAAO,MAAM,yBAAyB,QAAgB,CAAA;AAEtD,eAAO,MAAM,gBAAgB,wCAAwC,CAAA;AAErE,eAAO,MAAM,cAAc,8CAA8C,CAAA;AACzE,eAAO,MAAM,kBAAkB,UAG9B,CAAA;AAED,eAAO,MAAM,YAAY,cAAc,CAAA;AAEvC;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,sBAAsB,CAAA;AAEtD,eAAO,MAAM,kBAAkB,QAAS,CAAA;AACxC,eAAO,MAAM,wBAAwB,OAAQ,CAAA;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,WAAW,CAAA;AACnD,eAAO,MAAM,sBAAsB,eAAe,CAAA;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,oCAAoC,CAAA;AACtE,eAAO,MAAM,sBAAsB,oBAAoB,CAAA;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,gDAAiD,CAAA;AAExF,eAAO,MAAM,aAAa,oBAAoB,CAAA;AAC9C,eAAO,MAAM,QAAQ,iDAAiD,CAAA;AACtE,eAAO,MAAM,SAAS,wCAAwC,CAAA;AAC9D,eAAO,MAAM,MAAM,UAOlB,CAAA;AAED,eAAO,MAAM,iBAAiB,Q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
/**
|
|
2
2
|
* The Cline Pass LLM adapter: an OpenAI-compatible `chat/completions` stream
|
|
3
|
-
* with
|
|
3
|
+
* with per-account rotation and pre-first-token failover.
|
|
4
4
|
*
|
|
5
|
-
* Transport and mapping live in `client.ts` / `mapper.ts`; account selection
|
|
6
|
-
*
|
|
7
|
-
* which channel, and when an attempt is abandoned.
|
|
5
|
+
* Transport and mapping live in `client.ts` / `mapper.ts`; account selection
|
|
6
|
+
* lives in `engine.ts`. Cline always chooses the upstream automatically.
|
|
8
7
|
*
|
|
9
8
|
* @module dsh-chatgpt-subscription/cline-pass-adapter
|
|
10
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAEL,UAAU,EAIV,KAAK,eAAe,IAAI,sBAAsB,EAC9C,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAA;AAqB7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAA6D,KAAK,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAC9H,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAQ7D,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AAgDpC,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,0EAA0E;IAC1E,e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@@
|
|
|
8
8
|
* - `GET api.cline.bot/…/recommended-models` — official subscription list
|
|
9
9
|
* - `GET models.dev/api.json` — community registry, a metadata backstop
|
|
10
10
|
* - `GET ai-gateway.vercel.sh/v1/models` — the upstream's own catalog
|
|
11
|
-
* - `GET openrouter.ai/api/v1/…` — endpoint detail for direct-pipeline models
|
|
12
11
|
*
|
|
13
12
|
* @module dsh-chatgpt-subscription/cline-pass-client
|
|
14
13
|
*/
|
|
@@ -107,25 +106,4 @@ export declare function fetchOfficialModels({ fetchFn, signal, timeoutMs, }: {
|
|
|
107
106
|
signal?: AbortSignal;
|
|
108
107
|
timeoutMs?: number;
|
|
109
108
|
}): Promise<ClinePassCatalogScan>;
|
|
110
|
-
/** Resolve a canonical slug against OpenRouter's public catalog. */
|
|
111
|
-
export declare function resolveOpenRouterSlug(fetchFn: typeof fetch, slug: string, { signal, timeoutMs }?: {
|
|
112
|
-
signal?: AbortSignal;
|
|
113
|
-
timeoutMs?: number;
|
|
114
|
-
}): Promise<string | null>;
|
|
115
|
-
/** One upstream endpoint detail, as OpenRouter reports it. */
|
|
116
|
-
export interface ClinePassEndpointDetail {
|
|
117
|
-
slug: string;
|
|
118
|
-
name: string;
|
|
119
|
-
endpoints: number;
|
|
120
|
-
context: number;
|
|
121
|
-
uptime: number;
|
|
122
|
-
}
|
|
123
|
-
/** Per-upstream endpoint detail (context length, recent uptime) for one model. */
|
|
124
|
-
export declare function openRouterEndpoints(fetchFn: typeof fetch, slug: string, { signal, timeoutMs }?: {
|
|
125
|
-
signal?: AbortSignal;
|
|
126
|
-
timeoutMs?: number;
|
|
127
|
-
}): Promise<{
|
|
128
|
-
slug: string;
|
|
129
|
-
endpoints: ClinePassEndpointDetail[];
|
|
130
|
-
}>;
|
|
131
109
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAML,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,qDAAqD;AACrD,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAMnH;AAED,iEAAiE;AACjE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,oEAAoE;AACpE,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,0FAA0F;AAC1F,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,OAAO,KAAK,EACrB,GAAG,EAAE,MAAM,EACX,EACE,MAAc,EACd,MAAW,EACX,IAAI,EACJ,MAAM,EACN,SAAkB,EAClB,OAAY,GACb,GAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC5B,GACL,OAAO,CAAC,mBAAmB,CAAC,CAuB9B;AAED,+CAA+C;AAC/C,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,MAAM,EACN,SAAmB,GACpB,EAAE;IACD,OAAO,EAAE,OAA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;AACH,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAkB,GACnB,EAAE;IACD,OAAO,EAAE,OAAO,KAAK,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,sBAAsB,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAsB5E;AAWD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,OAAO,EACP,MAAM,EACN,SAAkB,GACnB,EAAE;IACD,OAAO,EAAE,OAAO,KAAK,CAAA;IACrB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAoFhC"}
|
|
@@ -1,63 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The Cline Pass engine:
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* identical pinning semantics.
|
|
6
|
-
*
|
|
7
|
-
* Failover contract: a candidate is abandoned only while nothing has been
|
|
8
|
-
* delivered yet. A non-2xx, a transport failure, or an error payload before the
|
|
9
|
-
* first content delta moves to the next candidate; once a chunk has been
|
|
10
|
-
* produced the stream is the answer, and a later failure is reported as such.
|
|
2
|
+
* The Cline Pass engine: ordinary model checks, account verification, catalog
|
|
3
|
+
* reads and streaming transport. Cline owns model routing; no client-supplied
|
|
4
|
+
* upstream pin or provider-options field is added to a request.
|
|
11
5
|
*
|
|
12
6
|
* @module dsh-chatgpt-subscription/cline-pass-engine
|
|
13
7
|
*/
|
|
14
8
|
import { LlmError } from '@deepseek-ai/dsh-llm';
|
|
15
9
|
import { type ClinePassGatewayCatalog } from './client.ts';
|
|
16
|
-
import {
|
|
17
|
-
import { type ClinePassCatalogScan, type ClinePassPinSettings } from './types.ts';
|
|
10
|
+
import { type ClinePassCatalogScan } from './types.ts';
|
|
18
11
|
import type { ClinePassStore } from './store.ts';
|
|
19
12
|
import type { ClinePassAccountPool } from './account-pool.ts';
|
|
20
|
-
/** One resolved account, as the engine hands it to a request
|
|
13
|
+
/** One resolved account, as the engine hands it to a request. */
|
|
21
14
|
export interface ClinePassAccount {
|
|
22
15
|
id: string;
|
|
23
16
|
name: string;
|
|
24
17
|
key: string;
|
|
25
18
|
baseURL: string;
|
|
26
19
|
}
|
|
27
|
-
/** One pinned request's outcome. */
|
|
28
|
-
export interface ClinePassAttemptOutcome {
|
|
29
|
-
attempt: PinAttempt;
|
|
30
|
-
account: ClinePassAccount;
|
|
31
|
-
status: number;
|
|
32
|
-
ok: boolean;
|
|
33
|
-
json: Record<string, unknown>;
|
|
34
|
-
text: string;
|
|
35
|
-
ms: number;
|
|
36
|
-
routing: ReturnType<typeof parseRouting>;
|
|
37
|
-
adherence: ReturnType<typeof pinAdherence> | null;
|
|
38
|
-
warnings: string[];
|
|
39
|
-
error: string;
|
|
40
|
-
}
|
|
41
20
|
export interface ClinePassEngineOptions {
|
|
42
21
|
fetchFn: typeof fetch;
|
|
43
22
|
/** Controlled/diagnostic fetch used only for live chat streams; defaults to fetchFn. */
|
|
44
23
|
streamFetchFn?: typeof fetch;
|
|
45
24
|
accountPool: ClinePassAccountPool;
|
|
46
25
|
store: ClinePassStore;
|
|
47
|
-
/** The stored pin plus the route-wide spelling policy. */
|
|
48
|
-
pinFor(model: string): PinConfig;
|
|
49
26
|
/** The route's default gateway, used when an account names none. */
|
|
50
27
|
baseURL(): string;
|
|
51
28
|
logger?: {
|
|
52
29
|
warn(message: string, ...args: unknown[]): void;
|
|
53
30
|
};
|
|
54
|
-
attemptTimeoutMs?: number;
|
|
55
|
-
probeTimeoutMs?: number;
|
|
56
31
|
}
|
|
57
|
-
/**
|
|
58
|
-
* The engine. All methods are safe to call while the pool is serving live
|
|
59
|
-
* traffic; probes take an account through the same rotation as a request.
|
|
60
|
-
*/
|
|
32
|
+
/** All methods are safe to call while the pool is serving live traffic. */
|
|
61
33
|
export declare class ClinePassEngine {
|
|
62
34
|
private readonly options;
|
|
63
35
|
constructor(options: ClinePassEngineOptions);
|
|
@@ -65,133 +37,23 @@ export declare class ClinePassEngine {
|
|
|
65
37
|
private get store();
|
|
66
38
|
/** The account a request would use right now, without consuming a rotation slot. */
|
|
67
39
|
resolveAccount(exclude?: ReadonlySet<string>): Promise<ClinePassAccount>;
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
/** The configured pin for one model, read through the live settings file. */
|
|
71
|
-
pinOf(model: string): ClinePassPinSettings;
|
|
72
|
-
/**
|
|
73
|
-
* One pinned request, non-streaming.
|
|
74
|
-
* @returns the decoded payload plus the facts the pin was judged on.
|
|
75
|
-
*/
|
|
76
|
-
attemptChat(model: string, body: Record<string, unknown>, attempt: PinAttempt, { signal, timeoutMs }?: {
|
|
77
|
-
signal?: AbortSignal;
|
|
78
|
-
timeoutMs?: number;
|
|
79
|
-
}): Promise<ClinePassAttemptOutcome>;
|
|
80
|
-
/**
|
|
81
|
-
* Run one model's ordered candidate chain until an attempt is both answered
|
|
82
|
-
* and served by the channel the pin asked for.
|
|
83
|
-
*
|
|
84
|
-
* This is the diagnostic path (`cline_pass_test`), so it keeps looking past a
|
|
85
|
-
* candidate the router quietly ignored: the point of the call is to find out
|
|
86
|
-
* whether the pin works.
|
|
87
|
-
*/
|
|
88
|
-
runChain(model: string, body: Record<string, unknown>, pinConfig: PinConfig, { signal, timeoutMs }?: {
|
|
89
|
-
signal?: AbortSignal;
|
|
90
|
-
timeoutMs?: number;
|
|
91
|
-
}): Promise<{
|
|
92
|
-
ok: boolean;
|
|
93
|
-
result: ClinePassAttemptOutcome | null;
|
|
94
|
-
trace: Array<{
|
|
95
|
-
upstream: string;
|
|
96
|
-
status: number;
|
|
97
|
-
ms: number;
|
|
98
|
-
note: string;
|
|
99
|
-
}>;
|
|
100
|
-
error: string;
|
|
101
|
-
warnings: string[];
|
|
102
|
-
}>;
|
|
103
|
-
/** Merge a gateway error's own provider list into the model's channel list. */
|
|
104
|
-
learnFromError(model: string, message: string): void;
|
|
105
|
-
/**
|
|
106
|
-
* Probe one model: detect its pipeline, read back the upstream it used, and
|
|
107
|
-
* harvest the channel list each pipeline publishes. Costs two tiny requests.
|
|
108
|
-
*/
|
|
109
|
-
probe(model: string, { signal, timeoutMs }?: {
|
|
110
|
-
signal?: AbortSignal;
|
|
111
|
-
timeoutMs?: number;
|
|
112
|
-
}): Promise<{
|
|
113
|
-
ok: boolean;
|
|
114
|
-
ms: number;
|
|
115
|
-
model: string;
|
|
116
|
-
error: string;
|
|
117
|
-
pipeline: string;
|
|
118
|
-
pinnable: boolean;
|
|
119
|
-
canonicalSlug: string;
|
|
120
|
-
lastProvider: string;
|
|
121
|
-
upstreams: string[];
|
|
122
|
-
availableProviders: string[];
|
|
123
|
-
tier0: string[];
|
|
124
|
-
fingerprint: string;
|
|
125
|
-
anonymous: boolean;
|
|
126
|
-
}>;
|
|
127
|
-
/**
|
|
128
|
-
* Harvest the exact channel list for one pipeline by pinning a channel that
|
|
129
|
-
* cannot exist: the router fails before spending a token and names every
|
|
130
|
-
* provider it could have used.
|
|
131
|
-
*/
|
|
132
|
-
private harvest;
|
|
133
|
-
/**
|
|
134
|
-
* Test every known channel of a model once and record the verdicts.
|
|
135
|
-
*
|
|
136
|
-
* A channel counts as usable only when the response names it as the one that
|
|
137
|
-
* served the request; a payload carrying `choices` alone is not evidence the
|
|
138
|
-
* pin was honored.
|
|
139
|
-
*/
|
|
140
|
-
validate(model: string, { signal, timeoutMs }?: {
|
|
141
|
-
signal?: AbortSignal;
|
|
142
|
-
timeoutMs?: number;
|
|
143
|
-
}): Promise<{
|
|
144
|
-
results: Array<{
|
|
145
|
-
upstream: string;
|
|
146
|
-
status: string;
|
|
147
|
-
ms: number;
|
|
148
|
-
note: string;
|
|
149
|
-
}>;
|
|
150
|
-
summary: {
|
|
151
|
-
ok: number;
|
|
152
|
-
limited: number;
|
|
153
|
-
bad: number;
|
|
154
|
-
auth: number;
|
|
155
|
-
unknown: number;
|
|
156
|
-
};
|
|
157
|
-
cancelled: boolean;
|
|
158
|
-
}>;
|
|
159
|
-
/**
|
|
160
|
-
* Send one small chat through a (possibly temporary) pin configuration and
|
|
161
|
-
* report what served it. Nothing is persisted.
|
|
162
|
-
*/
|
|
163
|
-
test(model: string, { upstreams, exclude, has, signal }?: {
|
|
164
|
-
upstreams?: string[];
|
|
165
|
-
exclude?: string[];
|
|
166
|
-
has?: string[];
|
|
40
|
+
/** Send one small, automatically routed request and report what served it. */
|
|
41
|
+
test(model: string, { signal }?: {
|
|
167
42
|
signal?: AbortSignal;
|
|
168
43
|
}): Promise<{
|
|
169
44
|
ok: boolean;
|
|
170
45
|
ms: number;
|
|
171
46
|
model: string;
|
|
172
47
|
error: string;
|
|
173
|
-
targets: string[];
|
|
174
|
-
excluded: string[];
|
|
175
|
-
trace: Array<{
|
|
176
|
-
upstream: string;
|
|
177
|
-
status: number;
|
|
178
|
-
ms: number;
|
|
179
|
-
note: string;
|
|
180
|
-
}>;
|
|
181
48
|
actual: string;
|
|
182
49
|
actualName: string;
|
|
183
50
|
pipeline: string;
|
|
184
|
-
pinnable: boolean;
|
|
185
51
|
canonicalSlug: string;
|
|
186
52
|
account: string;
|
|
187
53
|
content: string;
|
|
188
|
-
adopted: boolean;
|
|
189
|
-
adherence: string;
|
|
190
54
|
plan: string;
|
|
191
55
|
fingerprint: string;
|
|
192
56
|
anonymous: boolean;
|
|
193
|
-
/** The capability filter this test actually sent. */
|
|
194
|
-
has: string[];
|
|
195
57
|
warnings: string[];
|
|
196
58
|
}>;
|
|
197
59
|
/**
|
|
@@ -225,7 +87,7 @@ export declare class ClinePassEngine {
|
|
|
225
87
|
}): Promise<ClinePassCatalogScan>;
|
|
226
88
|
/** Open one chat stream for the adapter; transport only. */
|
|
227
89
|
openStream(account: ClinePassAccount, body: Record<string, unknown>, signal?: AbortSignal): Promise<Response>;
|
|
228
|
-
/** Raise the engine's own error for a request that
|
|
90
|
+
/** Raise the engine's own error for a request that has no usable account. */
|
|
229
91
|
noAccountError(error: unknown): LlmError;
|
|
230
92
|
}
|
|
231
93
|
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/engine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/engine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAKL,KAAK,uBAAuB,EAC7B,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAG7D,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,KAAK,CAAA;IACrB,wFAAwF;IACxF,aAAa,CAAC,EAAE,OAAO,KAAK,CAAA;IAC5B,WAAW,EAAE,oBAAoB,CAAA;IACjC,KAAK,EAAE,cAAc,CAAA;IACrB,oEAAoE;IACpE,OAAO,IAAI,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG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,QAAQ,EAAE,sBAAsB,EAAE,WAAW,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,EAAE,CAItH;AAED,8CAA8C;AAC9C,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAIlH;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,GAAG,aAAa,CA4H9F;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -28,7 +28,7 @@ export interface ClinePassWireMessage {
|
|
|
28
28
|
}>;
|
|
29
29
|
tool_call_id?: string;
|
|
30
30
|
}
|
|
31
|
-
/** One request body
|
|
31
|
+
/** One automatically routed request body. */
|
|
32
32
|
export interface ClinePassWireBody {
|
|
33
33
|
model: string;
|
|
34
34
|
messages: ClinePassWireMessage[];
|
|
@@ -54,8 +54,6 @@ export interface ClinePassWireBody {
|
|
|
54
54
|
thinking?: {
|
|
55
55
|
type: 'disabled';
|
|
56
56
|
};
|
|
57
|
-
provider?: Record<string, unknown>;
|
|
58
|
-
providerOptions?: Record<string, unknown>;
|
|
59
57
|
}
|
|
60
58
|
/**
|
|
61
59
|
* Whether one model id names an OpenAI reasoning-era family that refuses the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAsC,eAAe,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAC3G,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AAqBpC,+BAA+B;AAC/B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ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,EAAE,QAAQ,CAAA;CAAE,CAchF;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,CAiBtF;AAOD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAY9E;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAmBxE;AAED;;;;GAIG;AACH,wBAAuB,qBAAqB,CAAC,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,OAAO,GAAG,QAAQ,CAAC,CA2CjH;AA+CD;;;;;;;;;;;;;GAaG;AACH,wBAAuB,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,cAAc,CAAC,WAAW,CAAC,CAqIzG"}
|
|
@@ -1,31 +1,5 @@
|
|
|
1
|
-
/** Which pipeline the gateway routed one
|
|
1
|
+
/** Which pipeline the gateway routed one response through. */
|
|
2
2
|
export type ClinePipeline = 'direct' | 'planner';
|
|
3
|
-
/** One candidate request, after a pin has been expanded into try order. */
|
|
4
|
-
export interface PinAttempt {
|
|
5
|
-
/** The channel to pin, or null for automatic routing. */
|
|
6
|
-
upstream: string | null;
|
|
7
|
-
/** The remaining ordered candidates; used in `preferred` mode. */
|
|
8
|
-
orderRest: string[];
|
|
9
|
-
/** Channels that must never serve this request. */
|
|
10
|
-
excludeList: string[];
|
|
11
|
-
/** Strict writes `only`; preferred writes `order` as well. */
|
|
12
|
-
strict: boolean;
|
|
13
|
-
/** Normalized sort metric, or null for none. */
|
|
14
|
-
sort: string | null;
|
|
15
|
-
/** Required model capabilities, written only to the Vercel gateway spelling. */
|
|
16
|
-
has?: readonly string[];
|
|
17
|
-
/** `detected` restores the old single-spelling behavior. */
|
|
18
|
-
spelling?: string;
|
|
19
|
-
}
|
|
20
|
-
/** One model's stored pin configuration. */
|
|
21
|
-
export interface PinConfig {
|
|
22
|
-
upstreams?: readonly string[];
|
|
23
|
-
exclude?: readonly string[];
|
|
24
|
-
pinMode?: string;
|
|
25
|
-
sort?: string;
|
|
26
|
-
has?: readonly string[];
|
|
27
|
-
spelling?: string;
|
|
28
|
-
}
|
|
29
3
|
/** What one response says about how the gateway routed it. */
|
|
30
4
|
export interface RoutingFacts {
|
|
31
5
|
content: string | null;
|
|
@@ -49,25 +23,6 @@ export interface RoutingFacts {
|
|
|
49
23
|
/** Whether the serving channel is the gateway's anonymous contributor route. */
|
|
50
24
|
anonymous: boolean;
|
|
51
25
|
}
|
|
52
|
-
/** Written into the model observation store, so probe results are kept apart by pipeline. */
|
|
53
|
-
export interface PinModelMeta {
|
|
54
|
-
upstreams?: string[];
|
|
55
|
-
channels?: Partial<Record<ClinePipeline, string[]>>;
|
|
56
|
-
pipeline?: ClinePipeline | null;
|
|
57
|
-
/** The channel the last observed answer actually came from, when known. */
|
|
58
|
-
lastProvider?: string | null;
|
|
59
|
-
/** The last answer's first-party DeepSeek fingerprint, when it carried one. */
|
|
60
|
-
lastFingerprint?: string | null;
|
|
61
|
-
}
|
|
62
|
-
/** One attempt's replayed identity. */
|
|
63
|
-
export interface PinAttemptOutcome {
|
|
64
|
-
attempt: PinAttempt;
|
|
65
|
-
routing: {
|
|
66
|
-
finalProvider: string | null;
|
|
67
|
-
} | null;
|
|
68
|
-
}
|
|
69
|
-
/** Whether a pin was honored, or could not be judged. */
|
|
70
|
-
export type PinAdherence = 'adopted' | 'fallback' | 'not-adopted' | 'violated' | 'unresolved';
|
|
71
26
|
/**
|
|
72
27
|
* The gateway wraps some answers in a `{ data: … }` envelope; unwrap it.
|
|
73
28
|
* @param json - raw decoded response body.
|
|
@@ -84,121 +39,6 @@ export declare function isAuthenticationError(message: unknown, status?: number)
|
|
|
84
39
|
* @returns pipeline, canonical slug, chosen upstream and fallback list.
|
|
85
40
|
*/
|
|
86
41
|
export declare function parseRouting(json: unknown): RoutingFacts;
|
|
87
|
-
/** Lowercase a display name into an upstream slug. */
|
|
88
|
-
export declare function slugify(value: unknown): string;
|
|
89
|
-
/** OpenRouter's names for the three sort metrics. */
|
|
90
|
-
export declare const OPENROUTER_SORT: Readonly<Record<string, string>>;
|
|
91
|
-
/**
|
|
92
|
-
* Channels the two routers spell differently, as `[planner, direct]` pairs.
|
|
93
|
-
*
|
|
94
|
-
* Z.AI is `zai` to the Vercel gateway and `z-ai` to OpenRouter. Writing one name
|
|
95
|
-
* into both spellings matters: a request that lands on the direct pipeline
|
|
96
|
-
* carries `provider.only` to OpenRouter, where an unknown provider is refused
|
|
97
|
-
* rather than ignored.
|
|
98
|
-
*/
|
|
99
|
-
export declare const CHANNEL_ALIASES: ReadonlyArray<readonly [string, string]>;
|
|
100
|
-
/**
|
|
101
|
-
* Translate a channel name into the spelling one pipeline uses.
|
|
102
|
-
* @param name - the configured channel name, in either spelling.
|
|
103
|
-
* @param pipeline - `'planner'` or `'direct'`.
|
|
104
|
-
* @returns the name that pipeline expects; unknown names pass through.
|
|
105
|
-
*/
|
|
106
|
-
export declare function channelNameFor(name: string, pipeline: ClinePipeline): string;
|
|
107
|
-
/**
|
|
108
|
-
* Normalize a configured sort into a wire value or null.
|
|
109
|
-
*
|
|
110
|
-
* Two spellings mean "no sort" and both must be dropped before the request is
|
|
111
|
-
* built: the settings schema stores an empty string, and `none` is the
|
|
112
|
-
* documented "clear it" value. Neither is a metric, and the gateway rejects them
|
|
113
|
-
* with HTTP 400.
|
|
114
|
-
*/
|
|
115
|
-
export declare function normalizeSort(value: unknown): string | null;
|
|
116
|
-
/**
|
|
117
|
-
* Normalize a configured pin mode to the one value the router compares against.
|
|
118
|
-
* @param value - the configured pin mode, as stored.
|
|
119
|
-
* @returns `'strict'` or `'preferred'`.
|
|
120
|
-
*/
|
|
121
|
-
export declare function normalizePinMode(value: unknown): 'strict' | 'preferred';
|
|
122
|
-
/** A request body, before and after pin injection. */
|
|
123
|
-
type WireBody = Record<string, unknown>;
|
|
124
|
-
/**
|
|
125
|
-
* Write one attempt's upstream preference into a request body.
|
|
126
|
-
*
|
|
127
|
-
* Excludes are compiled into an `only` allow-list because the gateway ignores
|
|
128
|
-
* the exclude/ignore fields.
|
|
129
|
-
*
|
|
130
|
-
* Both spellings are written by default. A pin is honored only by the pipeline
|
|
131
|
-
* that owns the spelling, and the pipeline a model runs on is decided by the
|
|
132
|
-
* gateway and can differ between calls, so writing just the spelling the last
|
|
133
|
-
* probe observed means the pin silently evaporates the moment that changes. Each
|
|
134
|
-
* pipeline ignores the other's field, which is what makes writing both safe.
|
|
135
|
-
* `spelling: 'detected'` restores the old single-spelling behavior.
|
|
136
|
-
*
|
|
137
|
-
* @returns a new body with the pin applied.
|
|
138
|
-
*/
|
|
139
|
-
export declare function injectPrefs(body: WireBody, meta: PinModelMeta | undefined, attempt: PinAttempt | undefined): WireBody;
|
|
140
|
-
/**
|
|
141
|
-
* Read back whether the router honored one attempt's pin.
|
|
142
|
-
*
|
|
143
|
-
* A 200 is not evidence that the pin was applied: an unknown or unavailable
|
|
144
|
-
* `only` value is dropped by the router, which then serves the request from
|
|
145
|
-
* another channel. The only honest test is the channel the response reports.
|
|
146
|
-
*/
|
|
147
|
-
export declare function pinAdherence(attempt: PinAttempt, routing: {
|
|
148
|
-
finalProvider: string | null;
|
|
149
|
-
} | null | undefined): PinAdherence;
|
|
150
|
-
/** Whether an adherence reading means the pin was honored, or cannot be judged. */
|
|
151
|
-
export declare function isAdherenceOk(adherence: PinAdherence): boolean;
|
|
152
|
-
/**
|
|
153
|
-
* Name the configuration problems that make a pin impossible to honor.
|
|
154
|
-
*
|
|
155
|
-
* Both cases used to produce a request with no pin fields at all — that is,
|
|
156
|
-
* "excluded" channels still in play, silently.
|
|
157
|
-
*
|
|
158
|
-
* @returns human-readable warnings, empty when the pin is expressible.
|
|
159
|
-
*/
|
|
160
|
-
export declare function pinWarnings(attempt: Pick<PinAttempt, 'upstream'> & {
|
|
161
|
-
excludeList?: string[];
|
|
162
|
-
}, meta: PinModelMeta | undefined): string[];
|
|
163
|
-
/**
|
|
164
|
-
* Expand one model's pin configuration into the ordered failover candidates.
|
|
165
|
-
*
|
|
166
|
-
* A model with a non-empty (post-exclusion) pin list is tried upstream by
|
|
167
|
-
* upstream; a model without one is a single automatic candidate whose excludes
|
|
168
|
-
* become an allow-list.
|
|
169
|
-
*/
|
|
170
|
-
export declare function buildAttempts(config: PinConfig): PinAttempt[];
|
|
171
|
-
/**
|
|
172
|
-
* Classify a pinned-request failure into one upstream availability verdict.
|
|
173
|
-
* @returns `ok` (the channel answered), `limited`, `bad`, `auth`, or `unknown`.
|
|
174
|
-
*/
|
|
175
|
-
export declare function classifyUpstreamError(message: unknown): 'ok' | 'limited' | 'bad' | 'auth' | 'unknown';
|
|
176
|
-
/**
|
|
177
|
-
* Recover the gateway's own upstream list from a routing-layer error.
|
|
178
|
-
*
|
|
179
|
-
* The probe channels an impossible `only` value, so the router fails before
|
|
180
|
-
* spending a token and names every provider it could have used.
|
|
181
|
-
*/
|
|
182
|
-
export declare function extractAvailableProviders(message: unknown, pipeline: ClinePipeline | null): string[] | null;
|
|
183
|
-
/**
|
|
184
|
-
* Read the tier-0 channel hint out of a planner's reasoning sentence.
|
|
185
|
-
* @param plan - `provider_metadata.gateway.routing.planningReasoning`.
|
|
186
|
-
*/
|
|
187
|
-
export declare function parseTier0(plan: unknown): string[];
|
|
188
|
-
/**
|
|
189
|
-
* Merge the upstream channels discovered by several means, keeping order and
|
|
190
|
-
* dropping duplicates.
|
|
191
|
-
* @param lists - candidate lists, highest confidence first.
|
|
192
|
-
* @returns the merged, de-duplicated upstream slugs (capped at MAX_UPSTREAMS).
|
|
193
|
-
*/
|
|
194
|
-
export declare function mergeUpstreams(...lists: ReadonlyArray<readonly string[] | null | undefined>): string[];
|
|
195
|
-
/**
|
|
196
|
-
* Normalize a model id for fuzzy OpenRouter catalog matching.
|
|
197
|
-
* @param value - either id.
|
|
198
|
-
* @returns the comparable form.
|
|
199
|
-
*/
|
|
200
|
-
export declare function normalizeSlug(value: unknown): string;
|
|
201
42
|
/** Whether a value is a non-null object. */
|
|
202
43
|
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
203
|
-
export {};
|
|
204
44
|
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/protocol.ts"],"names":[],"mappings":"AASA,8DAA8D;AAC9D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEhD,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAA;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;OAOG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,gFAAgF;IAChF,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKrE;AAED,qDAAqD;AACrD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAShD;AAED,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAGhF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAuCxD;AAiED,4CAA4C;AAC5C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* The Cline Pass settings API.
|
|
3
3
|
*
|
|
4
4
|
* The surface is the same one every sibling line exposes — status, accounts,
|
|
5
|
-
* models — plus
|
|
6
|
-
*
|
|
7
|
-
* in-process request history.
|
|
5
|
+
* models — plus an ordinary model test, the official quota reading and the
|
|
6
|
+
* in-process request history. Upstream routing is owned by Cline.
|
|
8
7
|
*
|
|
9
8
|
* A status read never waits on Cline: it answers the cached quota snapshot and,
|
|
10
9
|
* when that snapshot is missing or older than the line's TTL, schedules one
|
|
@@ -72,10 +71,6 @@ export declare const CLINE_PASS_ROUTES: {
|
|
|
72
71
|
readonly 'login/status': "GET";
|
|
73
72
|
readonly 'login/cancel': "POST";
|
|
74
73
|
readonly models: "GET|POST";
|
|
75
|
-
readonly 'models/pin': "POST";
|
|
76
|
-
readonly 'models/reset': "POST";
|
|
77
|
-
readonly 'models/probe': "POST";
|
|
78
|
-
readonly 'models/validate': "POST";
|
|
79
74
|
readonly 'models/test': "POST";
|
|
80
75
|
readonly 'models/visibility': "POST";
|
|
81
76
|
readonly 'models/visibility-all': "POST";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/routes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/cline-pass/routes.ts"],"names":[],"mappings":"AAAA;;;;;;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