dsh-lcx-codex 0.6.0-pre.1 → 0.6.0
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/README.md +45 -26
- package/THIRD_PARTY_NOTICES.md +3 -2
- package/lib/abort-error.js +12 -1
- package/lib/client.js +73 -39
- package/lib/compact-v2.js +16 -56
- package/lib/defaults.js +15 -0
- package/lib/dsh-compat.js +15 -76
- package/lib/dsh-responses.js +178 -120
- package/lib/grok-native-search.js +1 -3
- package/lib/index.js +219 -149
- package/lib/model-catalog.js +46 -0
- package/lib/native-checkpoint.js +23 -185
- package/lib/pi-responses-runtime.js +749 -165
- package/lib/provider-headers.js +31 -0
- package/lib/responses-request.js +30 -15
- package/lib/responses-stream.js +120 -215
- package/lib/route.js +206 -88
- package/lib/search-accounting.js +1 -16
- package/lib/search-usage.js +8 -2
- package/lib/token-budget.js +6 -41
- package/lib/tool-surface.js +14 -18
- package/lib/transport.js +89 -107
- package/lib/types/client/search-media.d.ts +0 -2
- package/lib/util.js +21 -0
- package/lib/web-run-output.js +0 -3
- package/lib/web-search-alpha.js +22 -27
- package/lib/web-search-capability.js +1 -3
- package/lib/web-search-hosted.js +2 -2
- package/lib/web-search-ref-store.js +1 -3
- package/package.json +36 -32
- package/lib/pi086-responses-allowlist.js +0 -131
package/lib/web-search-alpha.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { isIP } from "node:net";
|
|
3
3
|
import { ServiceMutex } from "./service-mutex.js";
|
|
4
|
-
import { fetchJsonWithRetry } from "./transport.js";
|
|
5
4
|
import { mergeWebRunLinks, outputDomains, outputLineRange, outputLinks, outputPdfRefs, parseWebRunOutput, } from "./web-run-output.js";
|
|
5
|
+
import { isRecord, codedError } from "./util.js";
|
|
6
|
+
import { DEFAULTS } from "./defaults.js";
|
|
6
7
|
export const ALPHA_ACTIONS = [
|
|
7
8
|
"search_query",
|
|
8
9
|
"image_query",
|
|
@@ -113,10 +114,7 @@ export const ALPHA_PROBE_VERSION = 15;
|
|
|
113
114
|
export const ALPHA_PROBE_QUERY = "Python official documentation docs.python.org/3/";
|
|
114
115
|
export const ALPHA_PROBE_MAX_OPEN_CANDIDATES = 3;
|
|
115
116
|
function failure(message, code = "WEB_INVALID_REQUEST") {
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
function isObject(v) {
|
|
119
|
-
return v !== null && typeof v === "object" && !Array.isArray(v);
|
|
117
|
+
return codedError(message, code);
|
|
120
118
|
}
|
|
121
119
|
function text(value, field, max = 1000) {
|
|
122
120
|
if (typeof value !== "string" || !value.trim() || value.trim().length > max)
|
|
@@ -159,7 +157,7 @@ function isAlphaAction(value) {
|
|
|
159
157
|
return typeof value === "string" && ALPHA_ACTIONS.includes(value);
|
|
160
158
|
}
|
|
161
159
|
export function normalizeAlphaSearchArgs(args) {
|
|
162
|
-
if (!
|
|
160
|
+
if (!isRecord(args) || !isAlphaAction(args.action))
|
|
163
161
|
throw failure("websearch_alpha.action is invalid");
|
|
164
162
|
// The advertised flat schema permits every declared field for every action.
|
|
165
163
|
// Ignore fields owned by another action; never forward them to Alpha.
|
|
@@ -313,7 +311,7 @@ export function alphaActionCommand(args) {
|
|
|
313
311
|
...(args.responseLength ? { response_length: args.responseLength } : {}),
|
|
314
312
|
};
|
|
315
313
|
}
|
|
316
|
-
export function buildAlphaSearchBody(args, model, sessionId, externalWebAccess = true, maxOutputTokens =
|
|
314
|
+
export function buildAlphaSearchBody(args, model, sessionId, externalWebAccess = true, maxOutputTokens = DEFAULTS.alphaMaxOutputTokens, input) {
|
|
317
315
|
if (typeof sessionId !== "string" || !sessionId)
|
|
318
316
|
throw failure("websearch_alpha requires a DSH session", "LCX_ALPHA_SESSION_REQUIRED");
|
|
319
317
|
return {
|
|
@@ -572,7 +570,7 @@ function artifacts(results, provenance) {
|
|
|
572
570
|
const result = { refs: [], refRecords: [], sources: [], observations: new Map() };
|
|
573
571
|
const seenSources = new Set();
|
|
574
572
|
const visit = (value, inheritedArtifact) => {
|
|
575
|
-
if (!
|
|
573
|
+
if (!isRecord(value) && !Array.isArray(value))
|
|
576
574
|
return;
|
|
577
575
|
if (Array.isArray(value)) {
|
|
578
576
|
value.forEach(item => visit(item, inheritedArtifact));
|
|
@@ -617,11 +615,11 @@ function structuredLinks(results) {
|
|
|
617
615
|
value.forEach(visit);
|
|
618
616
|
return;
|
|
619
617
|
}
|
|
620
|
-
if (!
|
|
618
|
+
if (!isRecord(value))
|
|
621
619
|
return;
|
|
622
620
|
if (Array.isArray(value.links)) {
|
|
623
621
|
for (const item of value.links) {
|
|
624
|
-
if (!
|
|
622
|
+
if (!isRecord(item))
|
|
625
623
|
continue;
|
|
626
624
|
const id = item.id ?? item.link_id ?? item.linkId;
|
|
627
625
|
if (typeof id !== "number" || !Number.isSafeInteger(id))
|
|
@@ -688,7 +686,7 @@ function alphaCommandErrorEnvelope(output, action) {
|
|
|
688
686
|
/\b(?:invalid|unavailable|not available|unresolved)\b/iu.test(reference[2]));
|
|
689
687
|
}
|
|
690
688
|
export function parseAlphaSearchResponse(response, options) {
|
|
691
|
-
if (!
|
|
689
|
+
if (!isRecord(response) ||
|
|
692
690
|
typeof response.output !== "string" ||
|
|
693
691
|
(response.results !== undefined && !Array.isArray(response.results)))
|
|
694
692
|
throw failure("LCX Alpha Web Search returned an invalid response", "LCX_ALPHA_INVALID_RESPONSE");
|
|
@@ -771,11 +769,11 @@ function sourceUrlForRef(sources, refId) {
|
|
|
771
769
|
return typeof match?.url === "string" ? match.url : undefined;
|
|
772
770
|
}
|
|
773
771
|
export function renderAlphaSearchResult(value) {
|
|
774
|
-
const data =
|
|
772
|
+
const data = isRecord(value) ? value : {};
|
|
775
773
|
const parts = [];
|
|
776
774
|
if (typeof data.content === "string")
|
|
777
775
|
parts.push(data.content);
|
|
778
|
-
const sources = Array.isArray(data.sources) ? data.sources.filter(
|
|
776
|
+
const sources = Array.isArray(data.sources) ? data.sources.filter(isRecord) : [];
|
|
779
777
|
const refs = opaqueRefList(data.refs);
|
|
780
778
|
if (refs.length) {
|
|
781
779
|
parts.push(`可继续操作的引用:\n${refs.map((ref) => {
|
|
@@ -784,7 +782,7 @@ export function renderAlphaSearchResult(value) {
|
|
|
784
782
|
}).join("\n")}`);
|
|
785
783
|
}
|
|
786
784
|
const links = Array.isArray(data.links)
|
|
787
|
-
? data.links.filter((link) =>
|
|
785
|
+
? data.links.filter((link) => isRecord(link) && Number.isSafeInteger(link.id))
|
|
788
786
|
: [];
|
|
789
787
|
if (links.length) {
|
|
790
788
|
parts.push(`可点击链接:\n${links.map((link) => {
|
|
@@ -824,7 +822,7 @@ export function remapAlphaResultRefs(value, handles) {
|
|
|
824
822
|
}
|
|
825
823
|
if (Array.isArray(input))
|
|
826
824
|
return input.map((item) => replace(item));
|
|
827
|
-
if (
|
|
825
|
+
if (isRecord(input))
|
|
828
826
|
return Object.fromEntries(Object.entries(input).map(([field, item]) => [field, replace(item, field)]));
|
|
829
827
|
return input;
|
|
830
828
|
};
|
|
@@ -856,11 +854,8 @@ export async function runWithAlphaSessionLock(sessionId, signal, task) {
|
|
|
856
854
|
alphaSessionLocks.delete(sessionId);
|
|
857
855
|
}
|
|
858
856
|
}
|
|
859
|
-
export async function fetchAlphaSearchJson(options) {
|
|
860
|
-
return runWithAlphaSessionLock(options.sessionId, options.signal, () => fetchJsonWithRetry(options.url, options.body, options.headers, options.signal, options.timeoutMs, alphaSearchRetryOptions(options.maxResponseBytes)));
|
|
861
|
-
}
|
|
862
857
|
function probeFailureState(error) {
|
|
863
|
-
const detail =
|
|
858
|
+
const detail = isRecord(error) ? error : {};
|
|
864
859
|
if ([404, 405].includes(detail.status) ||
|
|
865
860
|
["LCX_ALPHA_ACTION_UNAVAILABLE", "LCX_ALPHA_ACTION_FAILED"].includes(String(detail.code ?? "")) ||
|
|
866
861
|
/channel does not support|unsupported action|not implemented/iu.test(String(detail.message ?? "")))
|
|
@@ -873,7 +868,7 @@ function alphaProbeStructuredResult(value, seen = new Set()) {
|
|
|
873
868
|
seen.add(value);
|
|
874
869
|
if (Array.isArray(value))
|
|
875
870
|
return value.some((item) => alphaProbeStructuredResult(item, seen));
|
|
876
|
-
if (!
|
|
871
|
+
if (!isRecord(value))
|
|
877
872
|
return false;
|
|
878
873
|
const refId = typeof value.ref_id === "string" && value.ref_id
|
|
879
874
|
? value.ref_id
|
|
@@ -887,7 +882,7 @@ function alphaProbeStructuredResult(value, seen = new Set()) {
|
|
|
887
882
|
return Object.values(value).some((item) => alphaProbeStructuredResult(item, seen));
|
|
888
883
|
}
|
|
889
884
|
function alphaProbeStructuredBlock(block) {
|
|
890
|
-
if (!
|
|
885
|
+
if (!isRecord(block))
|
|
891
886
|
return false;
|
|
892
887
|
const references = Array.isArray(block.references) ? block.references : [];
|
|
893
888
|
const links = Array.isArray(block.links) ? block.links : [];
|
|
@@ -895,15 +890,15 @@ function alphaProbeStructuredBlock(block) {
|
|
|
895
890
|
const lines = Array.isArray(block.lines) ? block.lines : [];
|
|
896
891
|
if (references.some((ref) => typeof ref === "string" && ref && !isAlphaHttpUrl(ref)))
|
|
897
892
|
return true;
|
|
898
|
-
if (links.some((link) =>
|
|
893
|
+
if (links.some((link) => isRecord(link) && Number.isSafeInteger(link.id)))
|
|
899
894
|
return true;
|
|
900
895
|
if (metadata.some((item) => item === "HTML" || item === "PDF" || /^\d+ (?:lines|pages)$/u.test(String(item))))
|
|
901
896
|
return true;
|
|
902
|
-
return lines.some((line) =>
|
|
897
|
+
return lines.some((line) => isRecord(line) && (Number.isSafeInteger(line.line) || Number.isSafeInteger(line.page)));
|
|
903
898
|
}
|
|
904
899
|
const ALPHA_PROBE_SEMANTIC_FAILURE = /\breference(?: id)?\s+(?:is\s+)?(?:invalid|unavailable)\b/iu;
|
|
905
900
|
function alphaProbeResultHasEvidence(action, value) {
|
|
906
|
-
const data =
|
|
901
|
+
const data = isRecord(value) ? value : {};
|
|
907
902
|
if (alphaPageFetchFailed(data.content, action))
|
|
908
903
|
return false;
|
|
909
904
|
if (alphaCommandErrorEnvelope(data.content, action))
|
|
@@ -914,7 +909,7 @@ function alphaProbeResultHasEvidence(action, value) {
|
|
|
914
909
|
const refs = Array.isArray(data.refs) &&
|
|
915
910
|
data.refs.some((ref) => typeof ref === "string" && ref && !isAlphaHttpUrl(ref));
|
|
916
911
|
const links = Array.isArray(data.links) &&
|
|
917
|
-
data.links.some((link) =>
|
|
912
|
+
data.links.some((link) => isRecord(link) && Number.isSafeInteger(link.id));
|
|
918
913
|
const pdfRefs = Array.isArray(data.pdfRefs) &&
|
|
919
914
|
data.pdfRefs.some((ref) => typeof ref === "string" && ref && !isAlphaHttpUrl(ref));
|
|
920
915
|
const structuredResults = Array.isArray(data.results) &&
|
|
@@ -992,7 +987,7 @@ export async function probeAlphaCapabilities({ invoke, startChain, schemaFingerp
|
|
|
992
987
|
break;
|
|
993
988
|
}
|
|
994
989
|
catch (error) {
|
|
995
|
-
if (
|
|
990
|
+
if (isRecord(error) && error.code === "LCX_ALPHA_PAGE_FETCH_FAILED")
|
|
996
991
|
continue;
|
|
997
992
|
actions.open = probeFailureState(error);
|
|
998
993
|
result.classification = chain === 0 && actions.open === "unsupported" ? "emulated-search-only" : "unknown";
|
|
@@ -1034,7 +1029,7 @@ export async function probeAlphaCapabilities({ invoke, startChain, schemaFingerp
|
|
|
1034
1029
|
const clickRefs = clickPage && Array.isArray(clickPage.refs) ? clickPage.refs : [];
|
|
1035
1030
|
const clickLinks = clickPage && Array.isArray(clickPage.links) ? clickPage.links : [];
|
|
1036
1031
|
const clickRef = clickRefs[0];
|
|
1037
|
-
const linkId =
|
|
1032
|
+
const linkId = isRecord(clickLinks[0]) ? clickLinks[0].id : undefined;
|
|
1038
1033
|
if (clickRef && Number.isSafeInteger(linkId)) {
|
|
1039
1034
|
try {
|
|
1040
1035
|
const clicked = await invoke({
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { ALPHA_ACTIONS, ALPHA_PROBE_VERSION, ALPHA_SEARCH_PARAMETERS } from "./web-search-alpha.js";
|
|
3
3
|
import { JsonStore } from "./json-store.js";
|
|
4
|
+
import { isRecord } from "./util.js";
|
|
4
5
|
const VERSION = 1;
|
|
5
6
|
const CLASSIFICATIONS = new Set(["native", "command-capable", "emulated-search-only", "unsupported", "unknown"]);
|
|
6
7
|
const ACTION_STATES = new Set(["supported", "unsupported", "unknown"]);
|
|
7
|
-
function isRecord(value) {
|
|
8
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
9
|
-
}
|
|
10
8
|
function isClassification(value) { return typeof value === "string" && CLASSIFICATIONS.has(value); }
|
|
11
9
|
function isActionState(value) { return typeof value === "string" && ACTION_STATES.has(value); }
|
|
12
10
|
function isProvenance(value) { return value === "trusted-native" || value === "unavailable"; }
|
package/lib/web-search-hosted.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { outputDomains, outputLineRange, parseWebRunOutput } from "./web-run-output.js";
|
|
2
|
+
import { isRecord, codedError } from "./util.js";
|
|
2
3
|
export const HOSTED_SEARCH_PARAMETERS = { type: "object", properties: { query: { type: "string", description: "Advanced Responses Hosted Web Search query. Use DSH web_search for ordinary searches." }, searchContextSize: { type: "string", enum: ["low", "medium", "high"] }, allowedDomains: { type: "array", items: { type: "string" }, description: "Optional allow filter. Omit or use [] for no filter; only nonempty lists are sent." }, blockedDomains: { type: "array", items: { type: "string" }, description: "Optional block filter. Omit or use [] for no filter; only nonempty lists are sent." }, userLocation: { type: "object", properties: { country: { type: "string" }, city: { type: "string" }, region: { type: "string" }, timezone: { type: "string" } }, additionalProperties: false }, externalWebAccess: { type: "boolean" }, returnTokenBudget: { type: "string", enum: ["default", "unlimited"] }, searchContentTypes: { type: "array", items: { type: "string", enum: ["text", "image"] }, description: "Optional content types. Omit unless image results are needed; [] means no explicit content-type override." }, imageSettings: { type: "object", description: "Optional image settings. Omit unless searchContentTypes includes image; ignored (after validation) without image search.", properties: { maxResults: { type: "integer" }, caption: { type: "boolean" } }, additionalProperties: false } }, required: ["query"], additionalProperties: false };
|
|
3
4
|
export const HOSTED_SEARCH_OUTPUT = { type: "object", properties: { mode: { type: "string", enum: ["hosted"] }, action: { type: "string" }, emulation: { type: "string", enum: ["native"] }, content: { type: "string" }, sources: { type: "array", items: { type: "object" } }, citations: { type: "array", items: { type: "object" } }, images: { type: "array", items: { type: "object" } }, warnings: { type: "array", items: { type: "string" } }, outputBlocks: { type: "array", items: { type: "object" } }, domains: { type: "array", items: { type: "string" } }, lineRange: { type: "object" }, requestId: { type: "string" }, responseId: { type: "string" }, retrievedAt: { type: "string" }, truncated: { type: "boolean" }, usage: { type: "object", properties: { inputTokens: { type: "number" }, outputTokens: { type: "number" }, totalTokens: { type: "number" }, cachedInputTokens: { type: "number" }, actionCount: { type: "number" }, serverWebSearchCalls: { type: "number" } }, additionalProperties: false } }, required: ["mode", "action", "emulation", "content", "sources", "citations", "images", "warnings", "requestId", "retrievedAt", "truncated"], additionalProperties: false };
|
|
4
|
-
function failure(message, code = "WEB_INVALID_REQUEST") { return
|
|
5
|
-
function isRecord(value) { return value !== null && typeof value === "object" && !Array.isArray(value); }
|
|
5
|
+
function failure(message, code = "WEB_INVALID_REQUEST") { return codedError(message, code); }
|
|
6
6
|
function isStringArray(value) { return Array.isArray(value) && value.every((item) => typeof item === "string"); }
|
|
7
7
|
function isInteger(value) { return typeof value === "number" && Number.isInteger(value); }
|
|
8
8
|
function httpUrl(value) { if (typeof value !== "string")
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { JsonStore } from "./json-store.js";
|
|
3
|
+
import { isRecord } from "./util.js";
|
|
3
4
|
const VERSION = 2;
|
|
4
|
-
function isRecord(value) {
|
|
5
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
6
|
-
}
|
|
7
5
|
function validHttpUrl(value) {
|
|
8
6
|
if (value === undefined)
|
|
9
7
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-lcx-codex",
|
|
3
|
-
"version": "0.6.0
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Model-scoped DSH plugin: GPT Responses lifecycle, Native V2 compaction and Hosted/Alpha Search; Grok native Web/X Search",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"keywords": [
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@deepseek-ai/dsh": "0.2.1-
|
|
70
|
-
"@earendil-works/pi-ai": "
|
|
71
|
-
"@deepseek-ai/schemastery": "~3.18.5-alpha.
|
|
69
|
+
"@deepseek-ai/dsh": "0.2.1-rc.5",
|
|
70
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
71
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.2",
|
|
72
72
|
"@types/node": "^22.20.0",
|
|
73
73
|
"@types/react": "~18.3.1",
|
|
74
74
|
"esbuild": "^0.28.2",
|
|
@@ -76,31 +76,32 @@
|
|
|
76
76
|
"typescript": "7.0.2"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@deepseek-ai/cordis": ">=4.0.5
|
|
80
|
-
"@deepseek-ai/cordis-plugin-loader": ">=1.0.6
|
|
81
|
-
"@deepseek-ai/dsh-agent": ">=0.2.1-
|
|
82
|
-
"@deepseek-ai/dsh-
|
|
83
|
-
"@deepseek-ai/dsh-
|
|
84
|
-
"@deepseek-ai/dsh-client-
|
|
85
|
-
"@deepseek-ai/dsh-client-
|
|
86
|
-
"@deepseek-ai/dsh-client-
|
|
87
|
-
"@deepseek-ai/dsh-client-ui-
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-
|
|
89
|
-
"@deepseek-ai/dsh-client-ui-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/dsh-session
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-
|
|
99
|
-
"@deepseek-ai/dsh-
|
|
100
|
-
"@deepseek-ai/
|
|
79
|
+
"@deepseek-ai/cordis": ">=4.0.5",
|
|
80
|
+
"@deepseek-ai/cordis-plugin-loader": ">=1.0.6",
|
|
81
|
+
"@deepseek-ai/dsh-agent": ">=0.2.1-rc.5 <0.2.2-0",
|
|
82
|
+
"@deepseek-ai/dsh-api-session-controller": ">=0.2.1-rc.5 <0.2.2-0",
|
|
83
|
+
"@deepseek-ai/dsh-attachment": ">=0.2.1-rc.5 <0.2.2-0",
|
|
84
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.5 <0.2.2-0",
|
|
85
|
+
"@deepseek-ai/dsh-client-modules": ">=0.2.1-rc.5 <0.2.2-0",
|
|
86
|
+
"@deepseek-ai/dsh-client-store": ">=0.2.1-rc.5 <0.2.2-0",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-chat": ">=0.2.1-rc.5 <0.2.2-0",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-conversation": ">=0.2.1-rc.5 <0.2.2-0",
|
|
89
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.1-rc.5 <0.2.2-0",
|
|
90
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.1-rc.5 <0.2.2-0",
|
|
91
|
+
"@deepseek-ai/dsh-compaction": ">=0.2.1-rc.5 <0.2.2-0",
|
|
92
|
+
"@deepseek-ai/dsh-credentials": ">=0.2.1-rc.5 <0.2.2-0",
|
|
93
|
+
"@deepseek-ai/dsh-fs": ">=0.2.1-rc.5 <0.2.2-0",
|
|
94
|
+
"@deepseek-ai/dsh-llm": ">=0.2.1-rc.5 <0.2.2-0",
|
|
95
|
+
"@deepseek-ai/dsh-session": ">=0.2.1-rc.5 <0.2.2-0",
|
|
96
|
+
"@deepseek-ai/dsh-session-query": ">=0.2.1-rc.5 <0.2.2-0",
|
|
97
|
+
"@deepseek-ai/dsh-settings": ">=0.2.1-rc.5 <0.2.2-0",
|
|
98
|
+
"@deepseek-ai/dsh-tool-web": ">=0.2.1-rc.5 <0.2.2-0",
|
|
99
|
+
"@deepseek-ai/dsh-tools": ">=0.2.1-rc.5 <0.2.2-0",
|
|
100
|
+
"@deepseek-ai/dsh-web": ">=0.2.1-rc.5 <0.2.2-0",
|
|
101
|
+
"@deepseek-ai/schemastery": ">=3.18.5",
|
|
101
102
|
"react": "^18.2.0",
|
|
102
|
-
"@deepseek-ai/dsh-token-meter": ">=0.2.1-
|
|
103
|
-
"@deepseek-ai/dsh-session-projection": ">=0.2.1-
|
|
103
|
+
"@deepseek-ai/dsh-token-meter": ">=0.2.1-rc.5 <0.2.2-0",
|
|
104
|
+
"@deepseek-ai/dsh-session-projection": ">=0.2.1-rc.5 <0.2.2-0",
|
|
104
105
|
"zod": "^4.5.4"
|
|
105
106
|
},
|
|
106
107
|
"peerDependenciesMeta": {
|
|
@@ -110,6 +111,9 @@
|
|
|
110
111
|
"@deepseek-ai/dsh-client-locale": {
|
|
111
112
|
"optional": true
|
|
112
113
|
},
|
|
114
|
+
"@deepseek-ai/dsh-api-session-controller": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
113
117
|
"@deepseek-ai/dsh-agent": {
|
|
114
118
|
"optional": true
|
|
115
119
|
},
|
|
@@ -184,9 +188,9 @@
|
|
|
184
188
|
},
|
|
185
189
|
"license": "MIT",
|
|
186
190
|
"lcxCompatibility": {
|
|
187
|
-
"dshInstallRange": ">=0.2.1-
|
|
188
|
-
"verifiedDsh": "0.2.1-
|
|
189
|
-
"verifiedHostPi": "1.
|
|
190
|
-
"verifiedPluginPi": "
|
|
191
|
+
"dshInstallRange": ">=0.2.1-rc.5 <0.2.2-0",
|
|
192
|
+
"verifiedDsh": "0.2.1-rc.5",
|
|
193
|
+
"verifiedHostPi": "1.5.0",
|
|
194
|
+
"verifiedPluginPi": "1.5.0"
|
|
191
195
|
}
|
|
192
196
|
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
// Generated by scripts/generate-pi086-allowlist.mjs from the Pi 0.86.0
|
|
2
|
-
// openai-responses catalog snapshot in data/pi086-responses-models.json.
|
|
3
|
-
// Source: Issue #90 Step 0(c) probe/dump.mjs, runtime/pi-catalog/catalog-v0.86.0.json.
|
|
4
|
-
// Keep provider and model paired: an id on another provider has separate authority.
|
|
5
|
-
const responsesModels = {
|
|
6
|
-
"cloudflare-ai-gateway": [
|
|
7
|
-
"gpt-4.1",
|
|
8
|
-
"gpt-4.1-mini",
|
|
9
|
-
"gpt-4.1-nano",
|
|
10
|
-
"gpt-4o",
|
|
11
|
-
"gpt-4o-mini",
|
|
12
|
-
"gpt-5",
|
|
13
|
-
"gpt-5-mini",
|
|
14
|
-
"gpt-5-nano",
|
|
15
|
-
"gpt-5.1",
|
|
16
|
-
"gpt-5.4",
|
|
17
|
-
"gpt-5.4-mini",
|
|
18
|
-
"gpt-5.4-nano",
|
|
19
|
-
"gpt-5.4-pro",
|
|
20
|
-
"gpt-5.5",
|
|
21
|
-
"gpt-5.5-pro",
|
|
22
|
-
"gpt-5.6-luna",
|
|
23
|
-
"gpt-5.6-sol",
|
|
24
|
-
"gpt-5.6-terra",
|
|
25
|
-
"gpt-6-astra",
|
|
26
|
-
"o3",
|
|
27
|
-
"o3-mini",
|
|
28
|
-
"o4-mini"
|
|
29
|
-
],
|
|
30
|
-
"github-copilot": [
|
|
31
|
-
"gpt-5-mini",
|
|
32
|
-
"gpt-5.3-codex",
|
|
33
|
-
"gpt-5.4",
|
|
34
|
-
"gpt-5.4-mini",
|
|
35
|
-
"gpt-5.4-nano",
|
|
36
|
-
"gpt-5.5",
|
|
37
|
-
"gpt-5.6-luna",
|
|
38
|
-
"gpt-5.6-sol",
|
|
39
|
-
"gpt-5.6-terra",
|
|
40
|
-
"gpt-6-astra",
|
|
41
|
-
"grok-4.5",
|
|
42
|
-
"grok-4.6",
|
|
43
|
-
"mai-code-1-flash-picker",
|
|
44
|
-
"mai-code-1.1-flash"
|
|
45
|
-
],
|
|
46
|
-
"openai": [
|
|
47
|
-
"gpt-4",
|
|
48
|
-
"gpt-4-turbo",
|
|
49
|
-
"gpt-4.1",
|
|
50
|
-
"gpt-4.1-mini",
|
|
51
|
-
"gpt-4.1-nano",
|
|
52
|
-
"gpt-4o",
|
|
53
|
-
"gpt-4o-2024-05-13",
|
|
54
|
-
"gpt-4o-2024-08-06",
|
|
55
|
-
"gpt-4o-2024-11-20",
|
|
56
|
-
"gpt-4o-mini",
|
|
57
|
-
"gpt-5",
|
|
58
|
-
"gpt-5-chat-latest",
|
|
59
|
-
"gpt-5-mini",
|
|
60
|
-
"gpt-5-nano",
|
|
61
|
-
"gpt-5-pro",
|
|
62
|
-
"gpt-5.1",
|
|
63
|
-
"gpt-5.2",
|
|
64
|
-
"gpt-5.2-chat-latest",
|
|
65
|
-
"gpt-5.2-pro",
|
|
66
|
-
"gpt-5.3-chat-latest",
|
|
67
|
-
"gpt-5.3-codex",
|
|
68
|
-
"gpt-5.3-codex-spark",
|
|
69
|
-
"gpt-5.4",
|
|
70
|
-
"gpt-5.4-mini",
|
|
71
|
-
"gpt-5.4-nano",
|
|
72
|
-
"gpt-5.4-pro",
|
|
73
|
-
"gpt-5.5",
|
|
74
|
-
"gpt-5.5-pro",
|
|
75
|
-
"gpt-5.6-luna",
|
|
76
|
-
"gpt-5.6-sol",
|
|
77
|
-
"gpt-5.6-terra",
|
|
78
|
-
"gpt-6-astra",
|
|
79
|
-
"gpt-realtime-2.1",
|
|
80
|
-
"o1",
|
|
81
|
-
"o1-pro",
|
|
82
|
-
"o3",
|
|
83
|
-
"o3-mini",
|
|
84
|
-
"o3-pro",
|
|
85
|
-
"o4-mini"
|
|
86
|
-
],
|
|
87
|
-
"opencode": [
|
|
88
|
-
"gpt-5",
|
|
89
|
-
"gpt-5-codex",
|
|
90
|
-
"gpt-5-nano",
|
|
91
|
-
"gpt-5.1",
|
|
92
|
-
"gpt-5.1-codex",
|
|
93
|
-
"gpt-5.1-codex-max",
|
|
94
|
-
"gpt-5.1-codex-mini",
|
|
95
|
-
"gpt-5.2",
|
|
96
|
-
"gpt-5.2-codex",
|
|
97
|
-
"gpt-5.3-codex",
|
|
98
|
-
"gpt-5.4",
|
|
99
|
-
"gpt-5.4-mini",
|
|
100
|
-
"gpt-5.4-nano",
|
|
101
|
-
"gpt-5.4-pro",
|
|
102
|
-
"gpt-5.5",
|
|
103
|
-
"gpt-5.5-pro",
|
|
104
|
-
"gpt-5.6-luna",
|
|
105
|
-
"gpt-5.6-sol",
|
|
106
|
-
"gpt-5.6-terra",
|
|
107
|
-
"gpt-6-astra",
|
|
108
|
-
"grok-4.5",
|
|
109
|
-
"grok-4.6",
|
|
110
|
-
"grok-build-0.1",
|
|
111
|
-
"muse-spark-1.2",
|
|
112
|
-
"muse-spark-1.2-contributor-free",
|
|
113
|
-
"muse-spark-1.3",
|
|
114
|
-
"muse-spark-1.3-contributor-free"
|
|
115
|
-
],
|
|
116
|
-
"opencode-go": [
|
|
117
|
-
"gpt-5.6-luna",
|
|
118
|
-
"grok-4.6",
|
|
119
|
-
"muse-spark-1.2-contributor",
|
|
120
|
-
"muse-spark-1.3-contributor"
|
|
121
|
-
],
|
|
122
|
-
"xai": [
|
|
123
|
-
"grok-4.3",
|
|
124
|
-
"grok-4.5",
|
|
125
|
-
"grok-4.6"
|
|
126
|
-
]
|
|
127
|
-
};
|
|
128
|
-
export function wasPi086ResponsesModel(provider, model) {
|
|
129
|
-
const ids = responsesModels[provider];
|
|
130
|
-
return ids?.includes(model) ?? false;
|
|
131
|
-
}
|