@code-yeongyu/senpi-ai 2026.9.27 → 2026.9.28
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/api/anthropic-messages.d.ts.map +1 -1
- package/dist/api/anthropic-messages.js +10 -7
- package/dist/api/anthropic-messages.js.map +1 -1
- package/dist/api/openai-completions.d.ts.map +1 -1
- package/dist/api/openai-completions.js +13 -2
- package/dist/api/openai-completions.js.map +1 -1
- package/dist/endpoint-reasoning-efforts.d.ts +26 -0
- package/dist/endpoint-reasoning-efforts.d.ts.map +1 -0
- package/dist/endpoint-reasoning-efforts.js +58 -0
- package/dist/endpoint-reasoning-efforts.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/model.d.ts +5 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/provider-diagnostic.d.ts +33 -0
- package/dist/provider-diagnostic.d.ts.map +1 -0
- package/dist/provider-diagnostic.js +56 -0
- package/dist/provider-diagnostic.js.map +1 -0
- package/dist/providers/data/.manifest.json +1 -1
- package/dist/providers/data/openrouter.json +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/error-body.d.ts +6 -0
- package/dist/utils/error-body.d.ts.map +1 -1
- package/dist/utils/error-body.js +36 -0
- package/dist/utils/error-body.js.map +1 -1
- package/dist/utils/provider-diagnostic-carrier.d.ts +5 -0
- package/dist/utils/provider-diagnostic-carrier.d.ts.map +1 -0
- package/dist/utils/provider-diagnostic-carrier.js +18 -0
- package/dist/utils/provider-diagnostic-carrier.js.map +1 -0
- package/dist/utils/provider-diagnostic-sources.d.ts +26 -0
- package/dist/utils/provider-diagnostic-sources.d.ts.map +1 -0
- package/dist/utils/provider-diagnostic-sources.js +103 -0
- package/dist/utils/provider-diagnostic-sources.js.map +1 -0
- package/dist/utils/provider-diagnostic-vocabulary.d.ts +36 -0
- package/dist/utils/provider-diagnostic-vocabulary.d.ts.map +1 -0
- package/dist/utils/provider-diagnostic-vocabulary.js +129 -0
- package/dist/utils/provider-diagnostic-vocabulary.js.map +1 -0
- package/dist/utils/provider-retry.d.ts.map +1 -1
- package/dist/utils/provider-retry.js +5 -4
- package/dist/utils/provider-retry.js.map +1 -1
- package/dist/utils/retry.d.ts +1 -0
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +14 -1
- package/dist/utils/retry.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ModelThinkingLevel, ThinkingLevelMap } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Reasoning levels an OpenAI-compatible endpoint advertises for one model through the
|
|
4
|
+
* `reasoning_efforts` field of its `/models` listing (senpi#2196).
|
|
5
|
+
*/
|
|
6
|
+
export interface EndpointReasoningEfforts {
|
|
7
|
+
/**
|
|
8
|
+
* senpi level -> the endpoint's own spelling, sent on the wire as-is. Every level the endpoint
|
|
9
|
+
* did not advertise is `null`, so the map is authoritative and no level is inferred from the id.
|
|
10
|
+
* Absent when the endpoint advertised a ladder but no value in it names a senpi level: the model's
|
|
11
|
+
* reasoning controls cannot be represented, which is different from advertising nothing at all.
|
|
12
|
+
*/
|
|
13
|
+
thinkingLevelMap?: ThinkingLevelMap;
|
|
14
|
+
/** Level of the entry the endpoint marks `default: true`, when that entry maps. */
|
|
15
|
+
defaultThinkingLevel?: ModelThinkingLevel;
|
|
16
|
+
/** Advertised values that name no senpi level; reported, never sent. */
|
|
17
|
+
unmapped: string[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Map a `reasoning_efforts` listing (`[{ "value": "low" }, { "value": "high", "default": true }]`,
|
|
21
|
+
* or plain strings) onto senpi's levels. Matching is case-insensitive; the first spelling of a
|
|
22
|
+
* level wins. Returns undefined only when nothing was advertised (the value is not an array); an
|
|
23
|
+
* advertised ladder with no representable value yields no map.
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseEndpointReasoningEfforts(value: unknown): EndpointReasoningEfforts | undefined;
|
|
26
|
+
//# sourceMappingURL=endpoint-reasoning-efforts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoint-reasoning-efforts.d.ts","sourceRoot":"","sources":["../src/endpoint-reasoning-efforts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEvE;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,kBAAkB,CAAC;IAC1C,wEAAwE;IACxE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAuBD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB,GAAG,SAAS,CAsBlG"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
2
|
+
// A Map, not an object literal: an advertised "__proto__" or "constructor" must not resolve.
|
|
3
|
+
const LEVEL_BY_NAME = new Map([
|
|
4
|
+
["none", "off"],
|
|
5
|
+
["off", "off"],
|
|
6
|
+
["minimal", "minimal"],
|
|
7
|
+
["low", "low"],
|
|
8
|
+
["medium", "medium"],
|
|
9
|
+
["high", "high"],
|
|
10
|
+
["xhigh", "xhigh"],
|
|
11
|
+
["max", "max"],
|
|
12
|
+
]);
|
|
13
|
+
function readEntry(entry) {
|
|
14
|
+
if (typeof entry === "string")
|
|
15
|
+
return entry.trim() ? { value: entry, isDefault: false } : undefined;
|
|
16
|
+
if (typeof entry !== "object" || entry === null || !("value" in entry))
|
|
17
|
+
return undefined;
|
|
18
|
+
const { value } = entry;
|
|
19
|
+
const isDefault = "default" in entry && entry.default === true;
|
|
20
|
+
return typeof value === "string" && value.trim() ? { value, isDefault } : undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Map a `reasoning_efforts` listing (`[{ "value": "low" }, { "value": "high", "default": true }]`,
|
|
24
|
+
* or plain strings) onto senpi's levels. Matching is case-insensitive; the first spelling of a
|
|
25
|
+
* level wins. Returns undefined only when nothing was advertised (the value is not an array); an
|
|
26
|
+
* advertised ladder with no representable value yields no map.
|
|
27
|
+
*/
|
|
28
|
+
export function parseEndpointReasoningEfforts(value) {
|
|
29
|
+
if (!Array.isArray(value))
|
|
30
|
+
return undefined;
|
|
31
|
+
const advertised = new Map();
|
|
32
|
+
const unmapped = [];
|
|
33
|
+
let defaultThinkingLevel;
|
|
34
|
+
for (const raw of value) {
|
|
35
|
+
const entry = readEntry(raw);
|
|
36
|
+
if (!entry)
|
|
37
|
+
continue;
|
|
38
|
+
const level = LEVEL_BY_NAME.get(entry.value.trim().toLowerCase());
|
|
39
|
+
if (!level) {
|
|
40
|
+
if (!unmapped.includes(entry.value))
|
|
41
|
+
unmapped.push(entry.value);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (!advertised.has(level))
|
|
45
|
+
advertised.set(level, entry.value);
|
|
46
|
+
if (entry.isDefault && defaultThinkingLevel === undefined)
|
|
47
|
+
defaultThinkingLevel = level;
|
|
48
|
+
}
|
|
49
|
+
if (advertised.size === 0)
|
|
50
|
+
return { unmapped };
|
|
51
|
+
const thinkingLevelMap = {};
|
|
52
|
+
for (const level of THINKING_LEVELS)
|
|
53
|
+
thinkingLevelMap[level] = advertised.get(level) ?? null;
|
|
54
|
+
return defaultThinkingLevel === undefined
|
|
55
|
+
? { thinkingLevelMap, unmapped }
|
|
56
|
+
: { thinkingLevelMap, defaultThinkingLevel, unmapped };
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=endpoint-reasoning-efforts.js.map
|
|
@@ -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QAAQ,EAAE;QAChC,CAAC,CAAC,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,QAAQ,EAAE,CAAC;AACzD,CAAC","sourcesContent":["import type { ModelThinkingLevel, ThinkingLevelMap } from \"./types.ts\";\n\n/**\n * Reasoning levels an OpenAI-compatible endpoint advertises for one model through the\n * `reasoning_efforts` field of its `/models` listing (senpi#2196).\n */\nexport interface EndpointReasoningEfforts {\n\t/**\n\t * senpi level -> the endpoint's own spelling, sent on the wire as-is. Every level the endpoint\n\t * did not advertise is `null`, so the map is authoritative and no level is inferred from the id.\n\t * Absent when the endpoint advertised a ladder but no value in it names a senpi level: the model's\n\t * reasoning controls cannot be represented, which is different from advertising nothing at all.\n\t */\n\tthinkingLevelMap?: ThinkingLevelMap;\n\t/** Level of the entry the endpoint marks `default: true`, when that entry maps. */\n\tdefaultThinkingLevel?: ModelThinkingLevel;\n\t/** Advertised values that name no senpi level; reported, never sent. */\n\tunmapped: string[];\n}\n\nconst THINKING_LEVELS: readonly ModelThinkingLevel[] = [\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"];\n// A Map, not an object literal: an advertised \"__proto__\" or \"constructor\" must not resolve.\nconst LEVEL_BY_NAME: ReadonlyMap<string, ModelThinkingLevel> = new Map([\n\t[\"none\", \"off\"],\n\t[\"off\", \"off\"],\n\t[\"minimal\", \"minimal\"],\n\t[\"low\", \"low\"],\n\t[\"medium\", \"medium\"],\n\t[\"high\", \"high\"],\n\t[\"xhigh\", \"xhigh\"],\n\t[\"max\", \"max\"],\n]);\n\nfunction readEntry(entry: unknown): { value: string; isDefault: boolean } | undefined {\n\tif (typeof entry === \"string\") return entry.trim() ? { value: entry, isDefault: false } : undefined;\n\tif (typeof entry !== \"object\" || entry === null || !(\"value\" in entry)) return undefined;\n\tconst { value } = entry;\n\tconst isDefault = \"default\" in entry && entry.default === true;\n\treturn typeof value === \"string\" && value.trim() ? { value, isDefault } : undefined;\n}\n\n/**\n * Map a `reasoning_efforts` listing (`[{ \"value\": \"low\" }, { \"value\": \"high\", \"default\": true }]`,\n * or plain strings) onto senpi's levels. Matching is case-insensitive; the first spelling of a\n * level wins. Returns undefined only when nothing was advertised (the value is not an array); an\n * advertised ladder with no representable value yields no map.\n */\nexport function parseEndpointReasoningEfforts(value: unknown): EndpointReasoningEfforts | undefined {\n\tif (!Array.isArray(value)) return undefined;\n\tconst advertised = new Map<ModelThinkingLevel, string>();\n\tconst unmapped: string[] = [];\n\tlet defaultThinkingLevel: ModelThinkingLevel | undefined;\n\tfor (const raw of value) {\n\t\tconst entry = readEntry(raw);\n\t\tif (!entry) continue;\n\t\tconst level = LEVEL_BY_NAME.get(entry.value.trim().toLowerCase());\n\t\tif (!level) {\n\t\t\tif (!unmapped.includes(entry.value)) unmapped.push(entry.value);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!advertised.has(level)) advertised.set(level, entry.value);\n\t\tif (entry.isDefault && defaultThinkingLevel === undefined) defaultThinkingLevel = level;\n\t}\n\tif (advertised.size === 0) return { unmapped };\n\tconst thinkingLevelMap: ThinkingLevelMap = {};\n\tfor (const level of THINKING_LEVELS) thinkingLevelMap[level] = advertised.get(level) ?? null;\n\treturn defaultThinkingLevel === undefined\n\t\t? { thinkingLevelMap, unmapped }\n\t\t: { thinkingLevelMap, defaultThinkingLevel, unmapped };\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,12 +30,14 @@ export { CONTEXT_PROVENANCE_FIELD, type ContextProvenance, contextProvenanceFing
|
|
|
30
30
|
export * from "./cursor/catalog-grouping.ts";
|
|
31
31
|
export { CURSOR_MODEL_CAPABILITIES, type CursorCapabilityEvidence, type CursorLevelEncoding, type CursorLevelSpec, type CursorModelCapability, type CursorParameterId, type CursorVariantAlias, type CursorVariantParse, getCursorBaseIdForVariant, getCursorCapabilityForBase, getCursorVariantAlias, } from "./cursor/model-capabilities.ts";
|
|
32
32
|
export { type CursorResolvedSelection, renderCursorCliModelString, resolveCursorSelectionDescriptor, } from "./cursor/selection-descriptor.ts";
|
|
33
|
+
export * from "./endpoint-reasoning-efforts.ts";
|
|
33
34
|
export * from "./env-api-keys.ts";
|
|
34
35
|
export * from "./images-models.ts";
|
|
35
36
|
export * from "./legacy-provider-ids.ts";
|
|
36
37
|
export * from "./models.ts";
|
|
37
38
|
export * from "./models-store.ts";
|
|
38
39
|
export { supportsAllowedToolChoice } from "./openai-responses-compat.ts";
|
|
40
|
+
export * from "./provider-diagnostic.ts";
|
|
39
41
|
export * from "./providers/faux.ts";
|
|
40
42
|
export * from "./session-resources.ts";
|
|
41
43
|
export { getProtocol, getToolCallFormat, hasKimiTextToolCallRecovery, shouldRecoverTextToolCalls, transformContext, wrapStreamWithModelRecovery, wrapStreamWithToolCallMiddleware, } from "./tool-call-middleware/index.ts";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAM/B,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC/G,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACnF,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/F,OAAO,EACN,mCAAmC,EACnC,sCAAsC,GACtC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,mBAAmB,IAAI,yBAAyB,EAChD,iBAAiB,IAAI,uBAAuB,EAC5C,OAAO,IAAI,aAAa,EACxB,QAAQ,IAAI,cAAc,EAC1B,UAAU,IAAI,gBAAgB,EAC9B,SAAS,IAAI,eAAe,GAC5B,MAAM,+BAA+B,CAA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CAAC;AAClC,OAAO,EAAE,mCAAmC,EAAE,MAAM,sCAAsC,CAAC;AAC3F,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACN,qBAAqB,EACrB,6BAA6B,EAC7B,wCAAwC,EACxC,8BAA8B,EAC9B,KAAK,mBAAmB,EACxB,0BAA0B,EAC1B,4BAA4B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,cAAc,yCAAyC,CAAC;AACxD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,12 +16,14 @@ export { CONTEXT_PROVENANCE_FIELD, contextProvenanceFingerprint, copyContextProv
|
|
|
16
16
|
export * from "./cursor/catalog-grouping.js";
|
|
17
17
|
export { CURSOR_MODEL_CAPABILITIES, getCursorBaseIdForVariant, getCursorCapabilityForBase, getCursorVariantAlias, } from "./cursor/model-capabilities.js";
|
|
18
18
|
export { renderCursorCliModelString, resolveCursorSelectionDescriptor, } from "./cursor/selection-descriptor.js";
|
|
19
|
+
export * from "./endpoint-reasoning-efforts.js";
|
|
19
20
|
export * from "./env-api-keys.js";
|
|
20
21
|
export * from "./images-models.js";
|
|
21
22
|
export * from "./legacy-provider-ids.js";
|
|
22
23
|
export * from "./models.js";
|
|
23
24
|
export * from "./models-store.js";
|
|
24
25
|
export { supportsAllowedToolChoice } from "./openai-responses-compat.js";
|
|
26
|
+
export * from "./provider-diagnostic.js";
|
|
25
27
|
export * from "./providers/faux.js";
|
|
26
28
|
export * from "./session-resources.js";
|
|
27
29
|
export { getProtocol, getToolCallFormat, hasKimiTextToolCallRecovery, shouldRecoverTextToolCalls, transformContext, wrapStreamWithModelRecovery, wrapStreamWithToolCallMiddleware, } from "./tool-call-middleware/index.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAO/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,EACN,mCAAmC,EACnC,sCAAsC,GACtC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,mBAAmB,IAAI,yBAAyB,EAChD,iBAAiB,IAAI,uBAAuB,EAC5C,OAAO,IAAI,aAAa,EACxB,QAAQ,IAAI,cAAc,EAC1B,UAAU,IAAI,gBAAgB,EAC9B,SAAS,IAAI,eAAe,GAC5B,MAAM,+BAA+B,CAAC;AAcvC,cAAc,eAAe,CAAC;AAQ9B,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,EAIN,eAAe,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAUhC,OAAO,EACN,wBAAwB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EACxC,8BAA8B,EAE9B,0BAA0B,EAC1B,4BAA4B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,cAAc,yCAAyC,CAAC;AACxD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n// Core only, side-effect free: no generated catalogs, no provider factories,\n// no api-registry, no OAuth implementations, no compat. Provider factories\n// live under \"@earendil-works/pi-ai/providers/*\", API implementations under\n// \"@earendil-works/pi-ai/api/*\", the old global API under\n// \"@earendil-works/pi-ai/compat\".\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./api/anthropic-messages.ts\";\nexport { sanitizeAnthropicToolPairs } from \"./api/anthropic-tool-pairs.ts\";\nexport type { AzureOpenAIResponsesOptions } from \"./api/azure-openai-responses.ts\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./api/bedrock-converse-stream.ts\";\nexport {\n\tmeasureCursorHistorySerializedBytes,\n\tmeasureCursorModelInputSerializedBytes,\n} from \"./api/cursor-agent/measure.ts\";\nexport {\n\tcomposeShellCommand as composeCursorShellCommand,\n\tomitUndefinedArgs as omitUndefinedCursorArgs,\n\tpiLimit as cursorPiLimit,\n\tpiLsPath as cursorPiLsPath,\n\tpiReadArgs as cursorPiReadArgs,\n\tpiTimeout as cursorPiTimeout,\n} from \"./api/cursor-agent/pi-args.ts\";\nexport type {\n\tCursorAgentOptions,\n\tCursorExecHandlerResult,\n\tCursorExecHandlers,\n\tCursorExecPairing,\n\tCursorMcpCall,\n\tCursorPiCall,\n\tCursorShellStreamCallbacks,\n\tCursorToolResultHandler,\n} from \"./api/cursor-agent/types.ts\";\nexport type { GoogleOptions } from \"./api/google-generative-ai.ts\";\nexport type { GoogleApiThinkingLevel, ResolvedGoogleThinkingLevel } from \"./api/google-shared.ts\";\nexport type { GoogleVertexOptions } from \"./api/google-vertex.ts\";\nexport * from \"./api/lazy.ts\";\nexport type { MistralOptions } from \"./api/mistral-conversations.ts\";\nexport type {\n\tChatGptSubscriptionWebSocketDebugStats,\n\tOpenAICodexResponsesOptions,\n} from \"./api/openai-codex-responses.ts\";\nexport type { OpenAICompletionsOptions } from \"./api/openai-completions.ts\";\nexport type { OpenAIResponsesOptions } from \"./api/openai-responses.ts\";\nexport { isOpenAIResponsesPromptCacheModel } from \"./api/openai-responses-prompt-cache.ts\";\nexport { convertResponsesMessages } from \"./api/openai-responses-shared.ts\";\nexport type { PiMessagesEvent, PiMessagesOptions, PiMessagesRewriteImpact } from \"./api/pi-messages.ts\";\nexport {\n\ttype WarmPromptCacheOptions,\n\ttype WarmPromptCacheResult,\n\ttype WarmPromptCacheUsage,\n\twarmPromptCache,\n} from \"./api/warm-prompt-cache.ts\";\nexport { getApiProvider } from \"./api-registry.ts\";\nexport * from \"./auth/context.ts\";\nexport * from \"./auth/credential-store.ts\";\nexport * from \"./auth/headers.ts\";\nexport * from \"./auth/helpers.ts\";\nexport * from \"./auth/types.ts\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthDeviceCodeInfo,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProviderId,\n\tOAuthSelectOption,\n\tOAuthSelectPrompt,\n} from \"./compat/extension-oauth-types.ts\";\nexport {\n\tCONTEXT_PROVENANCE_FIELD,\n\ttype ContextProvenance,\n\tcontextProvenanceFingerprint,\n\tcopyContextProvenance,\n\tgetContextProvenance,\n} from \"./context-provenance.ts\";\nexport * from \"./cursor/catalog-grouping.ts\";\nexport {\n\tCURSOR_MODEL_CAPABILITIES,\n\ttype CursorCapabilityEvidence,\n\ttype CursorLevelEncoding,\n\ttype CursorLevelSpec,\n\ttype CursorModelCapability,\n\ttype CursorParameterId,\n\ttype CursorVariantAlias,\n\ttype CursorVariantParse,\n\tgetCursorBaseIdForVariant,\n\tgetCursorCapabilityForBase,\n\tgetCursorVariantAlias,\n} from \"./cursor/model-capabilities.ts\";\nexport {\n\ttype CursorResolvedSelection,\n\trenderCursorCliModelString,\n\tresolveCursorSelectionDescriptor,\n} from \"./cursor/selection-descriptor.ts\";\nexport * from \"./env-api-keys.ts\";\nexport * from \"./images-models.ts\";\nexport * from \"./legacy-provider-ids.ts\";\nexport * from \"./models.ts\";\nexport * from \"./models-store.ts\";\nexport { supportsAllowedToolChoice } from \"./openai-responses-compat.ts\";\nexport * from \"./providers/faux.ts\";\nexport * from \"./session-resources.ts\";\nexport {\n\tgetProtocol,\n\tgetToolCallFormat,\n\thasKimiTextToolCallRecovery,\n\tshouldRecoverTextToolCalls,\n\ttransformContext,\n\twrapStreamWithModelRecovery,\n\twrapStreamWithToolCallMiddleware,\n} from \"./tool-call-middleware/index.ts\";\nexport { createXtmlRecoveryStreamParser } from \"./tool-call-middleware/protocols/kimi-xtml/recovery-stream.ts\";\nexport { wrapStreamWithInvokeRecovery } from \"./tool-call-middleware/recovery-stream-wrapper.ts\";\nexport * from \"./types.ts\";\nexport * from \"./utils/assistant-message-frame.ts\";\nexport {\n\ttype CursorExecResolvedCarrier,\n\tcopyCursorExecResolved,\n\tisCursorExecResolved,\n\tkCursorExecResolved,\n} from \"./utils/block-symbols.ts\";\nexport { extractChatGptSubscriptionAccountId } from \"./utils/chatgpt-subscription-auth.ts\";\nexport * from \"./utils/diagnostics.ts\";\nexport { dropFailedAssistantTurns } from \"./utils/drop-failed-assistant-turns.ts\";\nexport * from \"./utils/empty-response-errors.ts\";\nexport { estimateContextTokens } from \"./utils/estimate.ts\";\nexport * from \"./utils/event-stream.ts\";\nexport * from \"./utils/json-parse.ts\";\nexport * from \"./utils/overflow.ts\";\nexport {\n\tisAnthropicApiBaseUrl,\n\tPROMPT_CACHE_TTL_LONG_SECONDS,\n\tPROMPT_CACHE_TTL_OPENAI_EXTENDED_SECONDS,\n\tPROMPT_CACHE_TTL_SHORT_SECONDS,\n\ttype PromptCacheLifetime,\n\tresolvePromptCacheLifetime,\n\tresolvePromptCacheTtlSeconds,\n} from \"./utils/prompt-cache-ttl.ts\";\nexport * from \"./utils/provider-failure-description.ts\";\nexport * from \"./utils/retry.ts\";\nexport * from \"./utils/server-fallback-receipt.ts\";\nexport * from \"./utils/stop-details.ts\";\nexport { contentText } from \"./utils/text.ts\";\nexport * from \"./utils/tool-pair-repair.ts\";\nexport * from \"./utils/typebox-helpers.ts\";\nexport { uuidv7 } from \"./utils/uuid.ts\";\nexport * from \"./utils/validation.ts\";\nexport * from \"./utils/visible-text.ts\";\nexport { getWireIdentity, setWireIdentity } from \"./wire-identity.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAO/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAG3E,OAAO,EACN,mCAAmC,EACnC,sCAAsC,GACtC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,mBAAmB,IAAI,yBAAyB,EAChD,iBAAiB,IAAI,uBAAuB,EAC5C,OAAO,IAAI,aAAa,EACxB,QAAQ,IAAI,cAAc,EAC1B,UAAU,IAAI,gBAAgB,EAC9B,SAAS,IAAI,eAAe,GAC5B,MAAM,+BAA+B,CAAC;AAcvC,cAAc,eAAe,CAAC;AAQ9B,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,EAIN,eAAe,GACf,MAAM,4BAA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AC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACN,qBAAqB,EACrB,6BAA6B,EAC7B,wCAAwC,EACxC,8BAA8B,EAE9B,0BAA0B,EAC1B,4BAA4B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,cAAc,yCAAyC,CAAC;AACxD,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n// Core only, side-effect free: no generated catalogs, no provider factories,\n// no api-registry, no OAuth implementations, no compat. Provider factories\n// live under \"@earendil-works/pi-ai/providers/*\", API implementations under\n// \"@earendil-works/pi-ai/api/*\", the old global API under\n// \"@earendil-works/pi-ai/compat\".\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./api/anthropic-messages.ts\";\nexport { sanitizeAnthropicToolPairs } from \"./api/anthropic-tool-pairs.ts\";\nexport type { AzureOpenAIResponsesOptions } from \"./api/azure-openai-responses.ts\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./api/bedrock-converse-stream.ts\";\nexport {\n\tmeasureCursorHistorySerializedBytes,\n\tmeasureCursorModelInputSerializedBytes,\n} from \"./api/cursor-agent/measure.ts\";\nexport {\n\tcomposeShellCommand as composeCursorShellCommand,\n\tomitUndefinedArgs as omitUndefinedCursorArgs,\n\tpiLimit as cursorPiLimit,\n\tpiLsPath as cursorPiLsPath,\n\tpiReadArgs as cursorPiReadArgs,\n\tpiTimeout as cursorPiTimeout,\n} from \"./api/cursor-agent/pi-args.ts\";\nexport type {\n\tCursorAgentOptions,\n\tCursorExecHandlerResult,\n\tCursorExecHandlers,\n\tCursorExecPairing,\n\tCursorMcpCall,\n\tCursorPiCall,\n\tCursorShellStreamCallbacks,\n\tCursorToolResultHandler,\n} from \"./api/cursor-agent/types.ts\";\nexport type { GoogleOptions } from \"./api/google-generative-ai.ts\";\nexport type { GoogleApiThinkingLevel, ResolvedGoogleThinkingLevel } from \"./api/google-shared.ts\";\nexport type { GoogleVertexOptions } from \"./api/google-vertex.ts\";\nexport * from \"./api/lazy.ts\";\nexport type { MistralOptions } from \"./api/mistral-conversations.ts\";\nexport type {\n\tChatGptSubscriptionWebSocketDebugStats,\n\tOpenAICodexResponsesOptions,\n} from \"./api/openai-codex-responses.ts\";\nexport type { OpenAICompletionsOptions } from \"./api/openai-completions.ts\";\nexport type { OpenAIResponsesOptions } from \"./api/openai-responses.ts\";\nexport { isOpenAIResponsesPromptCacheModel } from \"./api/openai-responses-prompt-cache.ts\";\nexport { convertResponsesMessages } from \"./api/openai-responses-shared.ts\";\nexport type { PiMessagesEvent, PiMessagesOptions, PiMessagesRewriteImpact } from \"./api/pi-messages.ts\";\nexport {\n\ttype WarmPromptCacheOptions,\n\ttype WarmPromptCacheResult,\n\ttype WarmPromptCacheUsage,\n\twarmPromptCache,\n} from \"./api/warm-prompt-cache.ts\";\nexport { getApiProvider } from \"./api-registry.ts\";\nexport * from \"./auth/context.ts\";\nexport * from \"./auth/credential-store.ts\";\nexport * from \"./auth/headers.ts\";\nexport * from \"./auth/helpers.ts\";\nexport * from \"./auth/types.ts\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthDeviceCodeInfo,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProviderId,\n\tOAuthSelectOption,\n\tOAuthSelectPrompt,\n} from \"./compat/extension-oauth-types.ts\";\nexport {\n\tCONTEXT_PROVENANCE_FIELD,\n\ttype ContextProvenance,\n\tcontextProvenanceFingerprint,\n\tcopyContextProvenance,\n\tgetContextProvenance,\n} from \"./context-provenance.ts\";\nexport * from \"./cursor/catalog-grouping.ts\";\nexport {\n\tCURSOR_MODEL_CAPABILITIES,\n\ttype CursorCapabilityEvidence,\n\ttype CursorLevelEncoding,\n\ttype CursorLevelSpec,\n\ttype CursorModelCapability,\n\ttype CursorParameterId,\n\ttype CursorVariantAlias,\n\ttype CursorVariantParse,\n\tgetCursorBaseIdForVariant,\n\tgetCursorCapabilityForBase,\n\tgetCursorVariantAlias,\n} from \"./cursor/model-capabilities.ts\";\nexport {\n\ttype CursorResolvedSelection,\n\trenderCursorCliModelString,\n\tresolveCursorSelectionDescriptor,\n} from \"./cursor/selection-descriptor.ts\";\nexport * from \"./endpoint-reasoning-efforts.ts\";\nexport * from \"./env-api-keys.ts\";\nexport * from \"./images-models.ts\";\nexport * from \"./legacy-provider-ids.ts\";\nexport * from \"./models.ts\";\nexport * from \"./models-store.ts\";\nexport { supportsAllowedToolChoice } from \"./openai-responses-compat.ts\";\nexport * from \"./provider-diagnostic.ts\";\nexport * from \"./providers/faux.ts\";\nexport * from \"./session-resources.ts\";\nexport {\n\tgetProtocol,\n\tgetToolCallFormat,\n\thasKimiTextToolCallRecovery,\n\tshouldRecoverTextToolCalls,\n\ttransformContext,\n\twrapStreamWithModelRecovery,\n\twrapStreamWithToolCallMiddleware,\n} from \"./tool-call-middleware/index.ts\";\nexport { createXtmlRecoveryStreamParser } from \"./tool-call-middleware/protocols/kimi-xtml/recovery-stream.ts\";\nexport { wrapStreamWithInvokeRecovery } from \"./tool-call-middleware/recovery-stream-wrapper.ts\";\nexport * from \"./types.ts\";\nexport * from \"./utils/assistant-message-frame.ts\";\nexport {\n\ttype CursorExecResolvedCarrier,\n\tcopyCursorExecResolved,\n\tisCursorExecResolved,\n\tkCursorExecResolved,\n} from \"./utils/block-symbols.ts\";\nexport { extractChatGptSubscriptionAccountId } from \"./utils/chatgpt-subscription-auth.ts\";\nexport * from \"./utils/diagnostics.ts\";\nexport { dropFailedAssistantTurns } from \"./utils/drop-failed-assistant-turns.ts\";\nexport * from \"./utils/empty-response-errors.ts\";\nexport { estimateContextTokens } from \"./utils/estimate.ts\";\nexport * from \"./utils/event-stream.ts\";\nexport * from \"./utils/json-parse.ts\";\nexport * from \"./utils/overflow.ts\";\nexport {\n\tisAnthropicApiBaseUrl,\n\tPROMPT_CACHE_TTL_LONG_SECONDS,\n\tPROMPT_CACHE_TTL_OPENAI_EXTENDED_SECONDS,\n\tPROMPT_CACHE_TTL_SHORT_SECONDS,\n\ttype PromptCacheLifetime,\n\tresolvePromptCacheLifetime,\n\tresolvePromptCacheTtlSeconds,\n} from \"./utils/prompt-cache-ttl.ts\";\nexport * from \"./utils/provider-failure-description.ts\";\nexport * from \"./utils/retry.ts\";\nexport * from \"./utils/server-fallback-receipt.ts\";\nexport * from \"./utils/stop-details.ts\";\nexport { contentText } from \"./utils/text.ts\";\nexport * from \"./utils/tool-pair-repair.ts\";\nexport * from \"./utils/typebox-helpers.ts\";\nexport { uuidv7 } from \"./utils/uuid.ts\";\nexport * from \"./utils/validation.ts\";\nexport * from \"./utils/visible-text.ts\";\nexport { getWireIdentity, setWireIdentity } from \"./wire-identity.ts\";\n"]}
|
package/dist/model.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export interface Model<TApi extends Api> {
|
|
|
13
13
|
* use provider defaults. null marks any level as unsupported.
|
|
14
14
|
*/
|
|
15
15
|
thinkingLevelMap?: ThinkingLevelMap;
|
|
16
|
+
/**
|
|
17
|
+
* Level to start at when the user has not chosen one for this model, for example the default an
|
|
18
|
+
* OpenAI-compatible endpoint advertises. Clamped to the supported levels like any other request.
|
|
19
|
+
*/
|
|
20
|
+
defaultThinkingLevel?: ModelThinkingLevel;
|
|
16
21
|
input: ("text" | "image" | "video")[];
|
|
17
22
|
cost: ModelCost;
|
|
18
23
|
contextWindow: number;
|
package/dist/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,GAAG,EACH,aAAa,EACb,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EACV,gBAAgB,EAChB,MAAM,YAAY,CAAC;AAEpB,oDAAoD;AACpD,MAAM,WAAW,KAAK,CAAC,IAAI,SAAS,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,IAAI,CAAC;IACV,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,KAAK,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC;IACtC,IAAI,EAAE,SAAS,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;IAC3C,gFAAgF;IAChF,oBAAoB,CAAC,EAA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,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,4CAA4C;AAC5C,MAAM,WAAW,iBAAiB;IACjC,mEAAmE;IACnE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,eAAe,CAAC,EAAE;QACjB,uDAAuD;QACvD,YAAY,EAAE,MAAM,CAAC;QACrB,kEAAkE;QAClE,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,oEAAoE;QACpE,uBAAuB,EAAE,MAAM,CAAC;QAChC;;;;;;WAMG;QACH,UAAU,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;KACnE,CAAC;CACF"}
|
package/dist/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n\tAnthropicMessagesCompat,\n\tApi,\n\tBedrockCompat,\n\tCacheRetention,\n\tModelCost,\n\tModelThinkingLevel,\n\tOpenAICompletionsCompat,\n\tOpenAIResponsesCompat,\n\tProviderId,\n\tThinkingLevelMap,\n} from \"./types.ts\";\n\n/** Model interface for the unified model system. */\nexport interface Model<TApi extends Api> {\n\tid: string;\n\tname: string;\n\tapi: TApi;\n\tprovider: ProviderId;\n\tbaseUrl: string;\n\treasoning: boolean;\n\t/**\n\t * Maps pi thinking levels to provider/model-specific values.\n\t * In a present map, omitting `xhigh` or `max` disables that extended tier; ordinary missing levels\n\t * use provider defaults. null marks any level as unsupported.\n\t */\n\tthinkingLevelMap?: ThinkingLevelMap;\n\tinput: (\"text\" | \"image\" | \"video\")[];\n\tcost: ModelCost;\n\tcontextWindow: number;\n\tmaxTokens: number;\n\t/** Default sampling parameters; per-request values override these by key. */\n\tsamplingParams?: Record<string, unknown>;\n\theaders?: Record<string, string>;\n\t/** Default prompt-cache retention preference when the request omits one. */\n\tcacheRetention?: CacheRetention;\n\t/**\n\t * Upstream model id sent on the wire when it differs from the catalog id\n\t * (for example `-fast` priority-tier variants aliasing their base model).\n\t */\n\tupstreamModelId?: string;\n\t/** Service tier requested by default for this model (for example `-fast` variants). */\n\tserviceTier?: \"auto\" | \"flex\" | \"priority\";\n\t/** Whether to recover supported text-encoded tool calls from assistant text. */\n\trecoverTextToolCalls?: boolean;\n\t/** Compatibility overrides for OpenAI-compatible APIs. If not set, auto-detected from baseUrl. */\n\tcompat?: TApi extends \"openai-completions\"\n\t\t? OpenAICompletionsCompat\n\t\t: TApi extends \"openai-responses\" | \"openai-codex-responses\" | \"azure-openai-responses\"\n\t\t\t? OpenAIResponsesCompat\n\t\t\t: TApi extends \"anthropic-messages\"\n\t\t\t\t? AnthropicMessagesCompat\n\t\t\t\t: TApi extends \"bedrock-converse-stream\"\n\t\t\t\t\t? BedrockCompat\n\t\t\t\t\t: TApi extends \"cursor-agent\"\n\t\t\t\t\t\t? CursorAgentCompat\n\t\t\t\t\t\t: TApi extends \"devin-agent\"\n\t\t\t\t\t\t\t? DevinAgentCompat\n\t\t\t\t\t\t\t: never;\n}\n\n/** Devin (Cascade) model metadata the transport branches on. */\nexport interface DevinAgentCompat {\n\t/**\n\t * Server-side router (`adaptive`): its uid is never a legal chat model uid, so\n\t * the transport resolves it through `AssignModel` before every turn.\n\t */\n\tmodelRouter?: boolean;\n\t/** The lane accepts several tool calls per turn; absent means one at a time. */\n\tsupportsParallelToolCalls?: boolean;\n}\n\n/** Cursor agent protocol model metadata. */\nexport interface CursorAgentCompat {\n\t/** Request Cursor's max-mode (1M-context) variant of the model. */\n\tcursorMaxMode?: boolean;\n\t/**\n\t * Wire-reasoning capability for grouped Cursor catalog identities.\n\t * Presence is the capability gate: models without it never emit reasoning\n\t * parameters on the wire.\n\t */\n\tcursorReasoning?: {\n\t\t/** Base id into the static cursor capability table. */\n\t\tcapabilityId: string;\n\t\t/** Fixed Claude thinking boolean for this selectable identity. */\n\t\tthinkingMode?: boolean;\n\t\t/** Exact catalog variant sent when no explicit selection exists. */\n\t\trepresentativeVariantId: string;\n\t\t/**\n\t\t * Derived-group variant ids: normalized thinking level -> the exact\n\t\t * server-listed variant id observed in the live catalog. Present only on\n\t\t * identities derived at runtime from ids the static alias table does not\n\t\t * list; explicit selections resolve through it before any capability\n\t\t * lookup (senpi#2038).\n\t\t */\n\t\tvariantIds?: Readonly<Partial<Record<ModelThinkingLevel, string>>>;\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n\tAnthropicMessagesCompat,\n\tApi,\n\tBedrockCompat,\n\tCacheRetention,\n\tModelCost,\n\tModelThinkingLevel,\n\tOpenAICompletionsCompat,\n\tOpenAIResponsesCompat,\n\tProviderId,\n\tThinkingLevelMap,\n} from \"./types.ts\";\n\n/** Model interface for the unified model system. */\nexport interface Model<TApi extends Api> {\n\tid: string;\n\tname: string;\n\tapi: TApi;\n\tprovider: ProviderId;\n\tbaseUrl: string;\n\treasoning: boolean;\n\t/**\n\t * Maps pi thinking levels to provider/model-specific values.\n\t * In a present map, omitting `xhigh` or `max` disables that extended tier; ordinary missing levels\n\t * use provider defaults. null marks any level as unsupported.\n\t */\n\tthinkingLevelMap?: ThinkingLevelMap;\n\t/**\n\t * Level to start at when the user has not chosen one for this model, for example the default an\n\t * OpenAI-compatible endpoint advertises. Clamped to the supported levels like any other request.\n\t */\n\tdefaultThinkingLevel?: ModelThinkingLevel;\n\tinput: (\"text\" | \"image\" | \"video\")[];\n\tcost: ModelCost;\n\tcontextWindow: number;\n\tmaxTokens: number;\n\t/** Default sampling parameters; per-request values override these by key. */\n\tsamplingParams?: Record<string, unknown>;\n\theaders?: Record<string, string>;\n\t/** Default prompt-cache retention preference when the request omits one. */\n\tcacheRetention?: CacheRetention;\n\t/**\n\t * Upstream model id sent on the wire when it differs from the catalog id\n\t * (for example `-fast` priority-tier variants aliasing their base model).\n\t */\n\tupstreamModelId?: string;\n\t/** Service tier requested by default for this model (for example `-fast` variants). */\n\tserviceTier?: \"auto\" | \"flex\" | \"priority\";\n\t/** Whether to recover supported text-encoded tool calls from assistant text. */\n\trecoverTextToolCalls?: boolean;\n\t/** Compatibility overrides for OpenAI-compatible APIs. If not set, auto-detected from baseUrl. */\n\tcompat?: TApi extends \"openai-completions\"\n\t\t? OpenAICompletionsCompat\n\t\t: TApi extends \"openai-responses\" | \"openai-codex-responses\" | \"azure-openai-responses\"\n\t\t\t? OpenAIResponsesCompat\n\t\t\t: TApi extends \"anthropic-messages\"\n\t\t\t\t? AnthropicMessagesCompat\n\t\t\t\t: TApi extends \"bedrock-converse-stream\"\n\t\t\t\t\t? BedrockCompat\n\t\t\t\t\t: TApi extends \"cursor-agent\"\n\t\t\t\t\t\t? CursorAgentCompat\n\t\t\t\t\t\t: TApi extends \"devin-agent\"\n\t\t\t\t\t\t\t? DevinAgentCompat\n\t\t\t\t\t\t\t: never;\n}\n\n/** Devin (Cascade) model metadata the transport branches on. */\nexport interface DevinAgentCompat {\n\t/**\n\t * Server-side router (`adaptive`): its uid is never a legal chat model uid, so\n\t * the transport resolves it through `AssignModel` before every turn.\n\t */\n\tmodelRouter?: boolean;\n\t/** The lane accepts several tool calls per turn; absent means one at a time. */\n\tsupportsParallelToolCalls?: boolean;\n}\n\n/** Cursor agent protocol model metadata. */\nexport interface CursorAgentCompat {\n\t/** Request Cursor's max-mode (1M-context) variant of the model. */\n\tcursorMaxMode?: boolean;\n\t/**\n\t * Wire-reasoning capability for grouped Cursor catalog identities.\n\t * Presence is the capability gate: models without it never emit reasoning\n\t * parameters on the wire.\n\t */\n\tcursorReasoning?: {\n\t\t/** Base id into the static cursor capability table. */\n\t\tcapabilityId: string;\n\t\t/** Fixed Claude thinking boolean for this selectable identity. */\n\t\tthinkingMode?: boolean;\n\t\t/** Exact catalog variant sent when no explicit selection exists. */\n\t\trepresentativeVariantId: string;\n\t\t/**\n\t\t * Derived-group variant ids: normalized thinking level -> the exact\n\t\t * server-listed variant id observed in the live catalog. Present only on\n\t\t * identities derived at runtime from ids the static alias table does not\n\t\t * list; explicit selections resolve through it before any capability\n\t\t * lookup (senpi#2038).\n\t\t */\n\t\tvariantIds?: Readonly<Partial<Record<ModelThinkingLevel, string>>>;\n\t};\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PROVIDER_DIAGNOSTIC_MAX_BYTES } from "./utils/provider-diagnostic-vocabulary.ts";
|
|
2
|
+
/** Closed failure families. `unknown` is kept rather than guessed. */
|
|
3
|
+
export type ProviderDiagnosticCategory = "auth" | "rate_limit" | "quota" | "context_limit" | "invalid_request" | "provider_unavailable" | "unknown";
|
|
4
|
+
/** Which structured provider field decided the category. */
|
|
5
|
+
export type ProviderDiagnosticEvidence = "structured_status" | "structured_code";
|
|
6
|
+
/**
|
|
7
|
+
* Bounded, redaction-safe classification of a provider rejection, minted only by
|
|
8
|
+
* a provider adapter from structured metadata (the SDK HTTP error its own
|
|
9
|
+
* transport call raised, or an explicit SSE error envelope). It is additive: it
|
|
10
|
+
* never changes `errorMessage`, retries, fallback, or exit codes.
|
|
11
|
+
*/
|
|
12
|
+
export interface ProviderDiagnostic {
|
|
13
|
+
category: ProviderDiagnosticCategory;
|
|
14
|
+
/** Integer 400..599. Absent for an error delivered inside an HTTP 200 stream. */
|
|
15
|
+
httpStatus?: number;
|
|
16
|
+
/** Provider token from the closed allowlist, never raw provider text. */
|
|
17
|
+
code?: string;
|
|
18
|
+
evidence: ProviderDiagnosticEvidence;
|
|
19
|
+
}
|
|
20
|
+
export { PROVIDER_DIAGNOSTIC_MAX_BYTES };
|
|
21
|
+
/**
|
|
22
|
+
* Revalidate a diagnostic that crossed a boundary (wire, persisted record,
|
|
23
|
+
* agent state) and return a fresh canonical copy. The fields must describe the
|
|
24
|
+
* one classification the fixed mapping implies; anything else is dropped whole.
|
|
25
|
+
*/
|
|
26
|
+
export declare function sanitizeProviderDiagnostic(value: unknown): ProviderDiagnostic | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Read the diagnostic a provider adapter attached to a thrown error, as a fresh
|
|
29
|
+
* validated copy. A `providerDiagnostic` property an error declares on itself
|
|
30
|
+
* reads as absent.
|
|
31
|
+
*/
|
|
32
|
+
export declare function readProviderDiagnostic(error: unknown): ProviderDiagnostic | undefined;
|
|
33
|
+
//# sourceMappingURL=provider-diagnostic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-diagnostic.d.ts","sourceRoot":"","sources":["../src/provider-diagnostic.ts"],"names":[],"mappings":"AACA,OAAO,EAON,6BAA6B,EAC7B,MAAM,2CAA2C,CAAC;AAEnD,sEAAsE;AACtE,MAAM,MAAM,0BAA0B,GACnC,MAAM,GACN,YAAY,GACZ,OAAO,GACP,eAAe,GACf,iBAAiB,GACjB,sBAAsB,GACtB,SAAS,CAAC;AAEb,4DAA4D;AAC5D,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,0BAA0B,CAAC;IACrC,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,0BAA0B,CAAC;CACrC;AAED,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAMzC;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CA0BzF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAErF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { peekProviderDiagnostic } from "./utils/provider-diagnostic-carrier.js";
|
|
2
|
+
import { buildProviderDiagnostic, categoryForProviderCode, categoryForProviderStatus, isProviderCodeStatusCompatible, isProviderDiagnosticCategory, isProviderDiagnosticStatus, PROVIDER_DIAGNOSTIC_MAX_BYTES, } from "./utils/provider-diagnostic-vocabulary.js";
|
|
3
|
+
export { PROVIDER_DIAGNOSTIC_MAX_BYTES };
|
|
4
|
+
function readField(value, key) {
|
|
5
|
+
return Reflect.get(value, key);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Revalidate a diagnostic that crossed a boundary (wire, persisted record,
|
|
9
|
+
* agent state) and return a fresh canonical copy. The fields must describe the
|
|
10
|
+
* one classification the fixed mapping implies; anything else is dropped whole.
|
|
11
|
+
*/
|
|
12
|
+
export function sanitizeProviderDiagnostic(value) {
|
|
13
|
+
try {
|
|
14
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
15
|
+
return undefined;
|
|
16
|
+
const category = readField(value, "category");
|
|
17
|
+
const evidence = readField(value, "evidence");
|
|
18
|
+
const httpStatus = readField(value, "httpStatus");
|
|
19
|
+
const code = readField(value, "code");
|
|
20
|
+
if (!isProviderDiagnosticCategory(category))
|
|
21
|
+
return undefined;
|
|
22
|
+
if (httpStatus !== undefined && !isProviderDiagnosticStatus(httpStatus))
|
|
23
|
+
return undefined;
|
|
24
|
+
if (evidence === "structured_status") {
|
|
25
|
+
if (code !== undefined || !isProviderDiagnosticStatus(httpStatus))
|
|
26
|
+
return undefined;
|
|
27
|
+
if (category !== categoryForProviderStatus(httpStatus))
|
|
28
|
+
return undefined;
|
|
29
|
+
return buildProviderDiagnostic({ category, httpStatus, evidence });
|
|
30
|
+
}
|
|
31
|
+
if (evidence !== "structured_code" || typeof code !== "string")
|
|
32
|
+
return undefined;
|
|
33
|
+
if (categoryForProviderCode(code) !== category)
|
|
34
|
+
return undefined;
|
|
35
|
+
if (httpStatus !== undefined && !isProviderCodeStatusCompatible(code, httpStatus))
|
|
36
|
+
return undefined;
|
|
37
|
+
return buildProviderDiagnostic({
|
|
38
|
+
category,
|
|
39
|
+
...(httpStatus === undefined ? {} : { httpStatus }),
|
|
40
|
+
code,
|
|
41
|
+
evidence,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Read the diagnostic a provider adapter attached to a thrown error, as a fresh
|
|
50
|
+
* validated copy. A `providerDiagnostic` property an error declares on itself
|
|
51
|
+
* reads as absent.
|
|
52
|
+
*/
|
|
53
|
+
export function readProviderDiagnostic(error) {
|
|
54
|
+
return sanitizeProviderDiagnostic(peekProviderDiagnostic(error));
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=provider-diagnostic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-diagnostic.js","sourceRoot":"","sources":["../src/provider-diagnostic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EACN,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,GAC7B,MAAM,2CAA2C,CAAC;AA8BnD,OAAO,EAAE,6BAA6B,EAAE,CAAC;AAEzC,SAAS,SAAS,CAAC,KAAa,EAAE,GAAoD;IACrF,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACxD,IAAI,CAAC;QACJ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAAE,OAAO,SAAS,CAAC;QAC1F,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC9C,MAAM,UAAU,GAAG,SAAS,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AC","sourcesContent":["import { peekProviderDiagnostic } from \"./utils/provider-diagnostic-carrier.ts\";\nimport {\n\tbuildProviderDiagnostic,\n\tcategoryForProviderCode,\n\tcategoryForProviderStatus,\n\tisProviderCodeStatusCompatible,\n\tisProviderDiagnosticCategory,\n\tisProviderDiagnosticStatus,\n\tPROVIDER_DIAGNOSTIC_MAX_BYTES,\n} from \"./utils/provider-diagnostic-vocabulary.ts\";\n\n/** Closed failure families. `unknown` is kept rather than guessed. */\nexport type ProviderDiagnosticCategory =\n\t| \"auth\"\n\t| \"rate_limit\"\n\t| \"quota\"\n\t| \"context_limit\"\n\t| \"invalid_request\"\n\t| \"provider_unavailable\"\n\t| \"unknown\";\n\n/** Which structured provider field decided the category. */\nexport type ProviderDiagnosticEvidence = \"structured_status\" | \"structured_code\";\n\n/**\n * Bounded, redaction-safe classification of a provider rejection, minted only by\n * a provider adapter from structured metadata (the SDK HTTP error its own\n * transport call raised, or an explicit SSE error envelope). It is additive: it\n * never changes `errorMessage`, retries, fallback, or exit codes.\n */\nexport interface ProviderDiagnostic {\n\tcategory: ProviderDiagnosticCategory;\n\t/** Integer 400..599. Absent for an error delivered inside an HTTP 200 stream. */\n\thttpStatus?: number;\n\t/** Provider token from the closed allowlist, never raw provider text. */\n\tcode?: string;\n\tevidence: ProviderDiagnosticEvidence;\n}\n\nexport { PROVIDER_DIAGNOSTIC_MAX_BYTES };\n\nfunction readField(value: object, key: \"category\" | \"evidence\" | \"httpStatus\" | \"code\"): unknown {\n\treturn Reflect.get(value, key);\n}\n\n/**\n * Revalidate a diagnostic that crossed a boundary (wire, persisted record,\n * agent state) and return a fresh canonical copy. The fields must describe the\n * one classification the fixed mapping implies; anything else is dropped whole.\n */\nexport function sanitizeProviderDiagnostic(value: unknown): ProviderDiagnostic | undefined {\n\ttry {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return undefined;\n\t\tconst category = readField(value, \"category\");\n\t\tconst evidence = readField(value, \"evidence\");\n\t\tconst httpStatus = readField(value, \"httpStatus\");\n\t\tconst code = readField(value, \"code\");\n\t\tif (!isProviderDiagnosticCategory(category)) return undefined;\n\t\tif (httpStatus !== undefined && !isProviderDiagnosticStatus(httpStatus)) return undefined;\n\t\tif (evidence === \"structured_status\") {\n\t\t\tif (code !== undefined || !isProviderDiagnosticStatus(httpStatus)) return undefined;\n\t\t\tif (category !== categoryForProviderStatus(httpStatus)) return undefined;\n\t\t\treturn buildProviderDiagnostic({ category, httpStatus, evidence });\n\t\t}\n\t\tif (evidence !== \"structured_code\" || typeof code !== \"string\") return undefined;\n\t\tif (categoryForProviderCode(code) !== category) return undefined;\n\t\tif (httpStatus !== undefined && !isProviderCodeStatusCompatible(code, httpStatus)) return undefined;\n\t\treturn buildProviderDiagnostic({\n\t\t\tcategory,\n\t\t\t...(httpStatus === undefined ? {} : { httpStatus }),\n\t\t\tcode,\n\t\t\tevidence,\n\t\t});\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Read the diagnostic a provider adapter attached to a thrown error, as a fresh\n * validated copy. A `providerDiagnostic` property an error declares on itself\n * reads as absent.\n */\nexport function readProviderDiagnostic(error: unknown): ProviderDiagnostic | undefined {\n\treturn sanitizeProviderDiagnostic(peekProviderDiagnostic(error));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":3,"generatedAt":"2026-09-
|
|
1
|
+
{"schemaVersion":3,"generatedAt":"2026-09-28T01:49:01.161Z","structureHash":"de13fd32a0f46b302e3edd0d4d50c72e20019642cf25e876b706b4edc97089e5","files":{"alibaba-token-plan.json":"3a9c1be76d47459371e9fa2feeffc31e7edbbfec65fa9cc41236988efc4cf6d9","amazon-bedrock.json":"848e38fd1ade9c6e94c3037c1c6104ac515809a6f190d264eafd9f48ab0ae1ae","ant-ling.json":"4979fe79d99ed97382d7ce40170c6132e932e77906de1eb54464c042e7d63633","anthropic.json":"f9db437d92449fb860a2d457a6019cdfd51c11180c08df2b5f14d75ade773953","azure-openai-responses.json":"d70ff10410e6dd8eacb4a53b9fe887be836562cbb4b74eaee4f28bdbc4ac0732","bai.json":"2b12b15bd43462e60711944dd7283db8676611d9d76c82c2a01f64913e16a67e","baseten.json":"d155c434294b5167244cffb6dea6793f9669e91e8ab65b564f9510d81b330e37","cerebras.json":"3be228c613905c215c9da3d0b3535e10cc594ff2351b05390744c7c34de89b6c","chatgpt-subscription.json":"421c6ad932de4259c8f0c08589da278bed99ec80c042f2490d8ffd2a86f4da99","cloudflare-ai-gateway.json":"b64cc5c7c0df4bfce0c3c2b14fe5290636553914b09718634668ad98276a9bc5","cloudflare-workers-ai.json":"8ee15540a01cf79d0e4063c493ae3c436af2fc1d456f9faf1b066418247183e9","deepseek.json":"b5f9693ec641e9a957dc5f7a22042b3bb928bac3d7268406619b6f18e21c4b83","fireworks.json":"bbb8149854a2658f221afa47ae8e2617e6b58a8e2784aa822faaf54f0c0f18c3","github-copilot.json":"5c9fc5b1b553a26aa7bc843a3e36fa14cf220d528ecd89528c601c5090c88a2d","google-vertex.json":"97d80ac909d256cc1bf19ac54d9d8131c492e7c0c102ad89f68ade528544e0ad","google.json":"68f6cf6283cc0d69b77b0fa79e9c94774e96524f61ebba616319f05d5c9db56c","groq.json":"e4728fd72e358cd8f25e9a518e9b49a521ef44523d3debe38a7db9e0663c4077","huggingface.json":"2f93082144a7b2a1cbf79148244ce7559e0428d6310c5eb0648bca89b15a8b4b","minimax-cn.json":"4f636b47b28a507ad33b5eaba33fc4889e5956504d10f2a0d9c61167ae01ff1d","minimax.json":"9fd1764ffeefebded8579039cf0c48854a43e4c5b724f62361fc2ac54f705aa1","mistral.json":"be522597b22bceeb0bb9a0ba1781647649ffd19637d0c8e67b056d7b0ec33d52","moonshotai-cn.json":"326de79b46f6fdbf0879f005b3040d1b14049e81fa678de407b73ed1bd3bce9c","moonshotai.json":"4b917a375e9c880b903927cf5fe1ae1052c74b64d5027a007bb1e67ad0410755","nvidia.json":"6493e09b5db8b8fe9c8fae5bc15dc287645f37f83a4ed3a1ad1181e5830b5ff7","openai.json":"4c18b28b168f56d621670866a62d2d435da3a8eee55a204bdbabe02c48e6513e","opencode-go.json":"00b2c0154285829e8db1e7b9ad492771b098cb88a61b036e51a6861b2f2f6dc1","opencode.json":"1655e248e76f919fd14ca4b8a6201d1dd89b2190b295028c5d7a4a2a03809946","opengateway.json":"121f544154757cfbccd3bc3d7344986a5822886c12e1c00b39ebf20ef609f239","openrouter.json":"ac1c0d449b1fbaa6cd36c55408789ac6e91a861af525045ab0168214f18c8164","qwen-token-plan-cn.json":"4bf520ed38e5c3045680d2ec2816fa8a69079dbe97f7b929767a63172288da6b","qwen-token-plan-individual.json":"eb040e78595853e980011308b1bf9caacae6dc8a91abbac5ffebd402515dd2a6","qwen-token-plan.json":"a5c67213745329ec3ba79f712f31c1c32a781d7ffb8c04f9819f36c27672531f","together.json":"200fa2cc0b4666e3818c260e41b9925b925180e2d0931d7c900e16494b2314b4","venice.json":"d34b566ee6e7a2ed31abd9099a1c0448f1d521fc696382d03d86c90634270cf1","vercel-ai-gateway.json":"95a697cd6f9eba46972dbfa301e80f18f45c701e6068c0326d2f36da10b7ce7e","xai.json":"9b23faa5218e966a17108c05d2498a617ade1eae9b0d0684284c77d67949a3f1","xiaomi-token-plan-ams.json":"7df74a255259fc1d5be8e682c3ffb0908eaaf0af711f6433dedcf345ce3e8393","xiaomi-token-plan-cn.json":"7dc672723d5b37e5b92605752f74f46f44eba10be2b0cb959790260b9e0c2a4e","xiaomi-token-plan-sgp.json":"69b333b158be038459a511a673f4536a5b03d4931c3119339f1ac741bc03d502","xiaomi.json":"333299657f211ad9edac0f3d4298b7e5776626914c9c80e22305a87533f23966","zai-coding-cn.json":"69c572aa75104f16ccbddbaace60c267f4bcc74f86d34891ca43110d312fb1ad","zai.json":"15c8182a88e58bdc1b1c3eb0603c690475342c8a826ceddfe9af1b36b28345ee"}}
|