dsh-lcx-codex 0.4.2 → 0.4.3-pre.2
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 +116 -202
- package/cordis.patch.yml +3 -20
- package/lib/client.js +273 -146
- package/lib/compact-v2.js +218 -199
- package/lib/dsh-compat.js +227 -100
- package/lib/dsh-responses.js +445 -277
- package/lib/index.js +851 -757
- package/lib/json-store.js +50 -31
- package/lib/native-checkpoint.js +520 -194
- package/lib/responses-request.js +106 -121
- package/lib/responses-stream.js +972 -443
- package/lib/route.js +229 -355
- package/lib/service-mutex.js +73 -64
- package/lib/token-budget.js +176 -108
- package/lib/transport.js +277 -67
- package/lib/types/client/index.d.ts +6 -0
- package/lib/types/compact-v2.d.ts +104 -0
- package/lib/types/dsh-compat.d.ts +78 -0
- package/lib/types/dsh-responses.d.ts +82 -0
- package/lib/types/index.d.ts +83 -0
- package/lib/types/json-store.d.ts +10 -0
- package/lib/types/native-checkpoint.d.ts +213 -0
- package/lib/types/responses-request.d.ts +58 -0
- package/lib/types/responses-stream.d.ts +51 -0
- package/lib/types/route.d.ts +132 -0
- package/lib/types/service-mutex.d.ts +14 -0
- package/lib/types/token-budget.d.ts +50 -0
- package/lib/types/transport.d.ts +20 -0
- package/lib/types/web-run-output.d.ts +29 -0
- package/lib/types/web-search-alpha.d.ts +286 -0
- package/lib/types/web-search-capability.d.ts +26 -0
- package/lib/types/web-search-hosted.d.ts +246 -0
- package/lib/types/web-search-ref-store.d.ts +22 -0
- package/lib/web-run-output.js +167 -18
- package/lib/web-search-alpha.js +865 -163
- package/lib/web-search-capability.js +55 -65
- package/lib/web-search-hosted.js +210 -32
- package/lib/web-search-ref-store.js +63 -59
- package/package.json +79 -27
- package/ARCHITECTURE.md +0 -117
- package/CHANGELOG.md +0 -224
- package/README_EN.md +0 -277
- package/assets/dsh-lcx-codex-banner.jpg +0 -0
- package/lib/legacy-v3.js +0 -20
- package/lib/responses-replay.js +0 -68
- package/scripts/probe-alpha.mjs +0 -43
- package/scripts/validate-dsh-schema.mjs +0 -31
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import type { ContentBlock } from "@deepseek-ai/dsh-llm";
|
|
2
|
+
export declare const ALPHA_ACTIONS: string[];
|
|
3
|
+
export declare const ALPHA_SEARCH_PARAMETERS: {
|
|
4
|
+
type: "object";
|
|
5
|
+
properties: {
|
|
6
|
+
action: {
|
|
7
|
+
type: "string";
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
query: {
|
|
11
|
+
type: "string";
|
|
12
|
+
};
|
|
13
|
+
domains: {
|
|
14
|
+
type: "array";
|
|
15
|
+
items: {
|
|
16
|
+
type: "string";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
recency: {
|
|
20
|
+
type: "integer";
|
|
21
|
+
};
|
|
22
|
+
refId: {
|
|
23
|
+
type: "string";
|
|
24
|
+
};
|
|
25
|
+
lineNumber: {
|
|
26
|
+
type: "integer";
|
|
27
|
+
};
|
|
28
|
+
linkId: {
|
|
29
|
+
type: "integer";
|
|
30
|
+
};
|
|
31
|
+
pattern: {
|
|
32
|
+
type: "string";
|
|
33
|
+
};
|
|
34
|
+
pageNumber: {
|
|
35
|
+
type: "integer";
|
|
36
|
+
};
|
|
37
|
+
ticker: {
|
|
38
|
+
type: "string";
|
|
39
|
+
};
|
|
40
|
+
assetType: {
|
|
41
|
+
type: "string";
|
|
42
|
+
enum: string[];
|
|
43
|
+
};
|
|
44
|
+
market: {
|
|
45
|
+
type: "string";
|
|
46
|
+
};
|
|
47
|
+
location: {
|
|
48
|
+
type: "string";
|
|
49
|
+
};
|
|
50
|
+
start: {
|
|
51
|
+
type: "string";
|
|
52
|
+
};
|
|
53
|
+
duration: {
|
|
54
|
+
type: "integer";
|
|
55
|
+
};
|
|
56
|
+
fn: {
|
|
57
|
+
type: "string";
|
|
58
|
+
enum: string[];
|
|
59
|
+
};
|
|
60
|
+
league: {
|
|
61
|
+
type: "string";
|
|
62
|
+
enum: string[];
|
|
63
|
+
};
|
|
64
|
+
team: {
|
|
65
|
+
type: "string";
|
|
66
|
+
};
|
|
67
|
+
opponent: {
|
|
68
|
+
type: "string";
|
|
69
|
+
};
|
|
70
|
+
dateFrom: {
|
|
71
|
+
type: "string";
|
|
72
|
+
};
|
|
73
|
+
dateTo: {
|
|
74
|
+
type: "string";
|
|
75
|
+
};
|
|
76
|
+
numberOfGames: {
|
|
77
|
+
type: "integer";
|
|
78
|
+
};
|
|
79
|
+
locale: {
|
|
80
|
+
type: "string";
|
|
81
|
+
};
|
|
82
|
+
utcOffset: {
|
|
83
|
+
type: "string";
|
|
84
|
+
};
|
|
85
|
+
responseLength: {
|
|
86
|
+
type: "string";
|
|
87
|
+
enum: string[];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
required: string[];
|
|
91
|
+
additionalProperties: false;
|
|
92
|
+
};
|
|
93
|
+
export declare const ALPHA_SEARCH_OUTPUT: {
|
|
94
|
+
type: "object";
|
|
95
|
+
properties: {
|
|
96
|
+
mode: {
|
|
97
|
+
type: "string";
|
|
98
|
+
};
|
|
99
|
+
action: {
|
|
100
|
+
type: "string";
|
|
101
|
+
};
|
|
102
|
+
capability: {
|
|
103
|
+
type: "string";
|
|
104
|
+
};
|
|
105
|
+
emulation: {
|
|
106
|
+
type: "string";
|
|
107
|
+
};
|
|
108
|
+
content: {
|
|
109
|
+
type: "string";
|
|
110
|
+
};
|
|
111
|
+
results: {
|
|
112
|
+
type: "array";
|
|
113
|
+
items: {
|
|
114
|
+
type: "object";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
refs: {
|
|
118
|
+
type: "array";
|
|
119
|
+
items: {
|
|
120
|
+
type: "string";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
sources: {
|
|
124
|
+
type: "array";
|
|
125
|
+
items: {
|
|
126
|
+
type: "object";
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
citations: {
|
|
130
|
+
type: "array";
|
|
131
|
+
items: {
|
|
132
|
+
type: "object";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
outputBlocks: {
|
|
136
|
+
type: "array";
|
|
137
|
+
items: {
|
|
138
|
+
type: "object";
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
links: {
|
|
142
|
+
type: "array";
|
|
143
|
+
items: {
|
|
144
|
+
type: "object";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
pdfRefs: {
|
|
148
|
+
type: "array";
|
|
149
|
+
items: {
|
|
150
|
+
type: "string";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
domains: {
|
|
154
|
+
type: "array";
|
|
155
|
+
items: {
|
|
156
|
+
type: "string";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
lineRange: {
|
|
160
|
+
type: "object";
|
|
161
|
+
};
|
|
162
|
+
requestId: {
|
|
163
|
+
type: "string";
|
|
164
|
+
};
|
|
165
|
+
responseId: {
|
|
166
|
+
type: "string";
|
|
167
|
+
};
|
|
168
|
+
retrievedAt: {
|
|
169
|
+
type: "string";
|
|
170
|
+
};
|
|
171
|
+
warnings: {
|
|
172
|
+
type: "array";
|
|
173
|
+
items: {
|
|
174
|
+
type: "string";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
required: string[];
|
|
179
|
+
additionalProperties: false;
|
|
180
|
+
};
|
|
181
|
+
export declare const ALPHA_SCHEMA_FINGERPRINT: string;
|
|
182
|
+
export declare const ALPHA_PROBE_VERSION = 12;
|
|
183
|
+
type RecordValue = Record<string, unknown>;
|
|
184
|
+
type AlphaAction = (typeof ALPHA_ACTIONS)[number];
|
|
185
|
+
type NormalizedAlphaArgs = RecordValue & {
|
|
186
|
+
action: AlphaAction;
|
|
187
|
+
};
|
|
188
|
+
type AlphaResponse = {
|
|
189
|
+
output: string;
|
|
190
|
+
results?: unknown[];
|
|
191
|
+
id?: unknown;
|
|
192
|
+
};
|
|
193
|
+
type AlphaProbeValue = RecordValue & {
|
|
194
|
+
content?: unknown;
|
|
195
|
+
results?: unknown;
|
|
196
|
+
refs?: unknown;
|
|
197
|
+
links?: unknown;
|
|
198
|
+
pdfRefs?: unknown;
|
|
199
|
+
outputBlocks?: unknown;
|
|
200
|
+
sources?: unknown;
|
|
201
|
+
};
|
|
202
|
+
type AlphaInvoke = (args: RecordValue) => Promise<AlphaProbeValue>;
|
|
203
|
+
export declare function normalizeAlphaSearchArgs(args: unknown): NormalizedAlphaArgs;
|
|
204
|
+
export declare function alphaActionCommand(args: NormalizedAlphaArgs): Record<string, unknown>;
|
|
205
|
+
export declare function buildAlphaSearchBody(args: NormalizedAlphaArgs, model: unknown, sessionId: string, externalWebAccess?: boolean, maxOutputTokens?: number): {
|
|
206
|
+
id: string;
|
|
207
|
+
model: unknown;
|
|
208
|
+
input: {
|
|
209
|
+
role: string;
|
|
210
|
+
content: {
|
|
211
|
+
type: string;
|
|
212
|
+
text: string;
|
|
213
|
+
}[];
|
|
214
|
+
}[];
|
|
215
|
+
commands: Record<string, unknown>;
|
|
216
|
+
settings: {
|
|
217
|
+
allowed_callers: string[];
|
|
218
|
+
external_web_access: boolean;
|
|
219
|
+
};
|
|
220
|
+
max_output_tokens: number;
|
|
221
|
+
};
|
|
222
|
+
export declare function isPublicAlphaTarget(url: URL): boolean;
|
|
223
|
+
export declare function isAlphaHttpUrl(value: unknown): value is string;
|
|
224
|
+
export declare function isAlphaContinuationUrl(value: unknown): value is string;
|
|
225
|
+
export declare function alphaRefRequiresStore(action: string, refId: unknown): boolean;
|
|
226
|
+
export declare function parseAlphaSearchResponse(response: AlphaResponse, options: {
|
|
227
|
+
action: unknown;
|
|
228
|
+
capability: unknown;
|
|
229
|
+
requestId: unknown;
|
|
230
|
+
retrievedAt?: unknown;
|
|
231
|
+
}): {
|
|
232
|
+
mode: string;
|
|
233
|
+
action: unknown;
|
|
234
|
+
capability: unknown;
|
|
235
|
+
emulation: string;
|
|
236
|
+
content: string;
|
|
237
|
+
results: unknown;
|
|
238
|
+
refs: string[];
|
|
239
|
+
sources: {
|
|
240
|
+
refId?: string;
|
|
241
|
+
snippet?: string;
|
|
242
|
+
title?: string;
|
|
243
|
+
url: string;
|
|
244
|
+
}[];
|
|
245
|
+
citations: {
|
|
246
|
+
refId?: string;
|
|
247
|
+
snippet?: string;
|
|
248
|
+
title?: string;
|
|
249
|
+
url: string;
|
|
250
|
+
}[];
|
|
251
|
+
outputBlocks: import("./web-run-output.js").WebRunBlock[];
|
|
252
|
+
links: import("./web-run-output.js").WebRunLink[];
|
|
253
|
+
pdfRefs: string[];
|
|
254
|
+
domains: string[];
|
|
255
|
+
lineRange?: {
|
|
256
|
+
first: number;
|
|
257
|
+
last: number;
|
|
258
|
+
} | undefined;
|
|
259
|
+
requestId: unknown;
|
|
260
|
+
responseId?: string | undefined;
|
|
261
|
+
retrievedAt: {};
|
|
262
|
+
warnings: string[];
|
|
263
|
+
refRecords: {
|
|
264
|
+
url?: string;
|
|
265
|
+
refId: string;
|
|
266
|
+
}[];
|
|
267
|
+
};
|
|
268
|
+
export declare function renderAlphaSearchResult(value: unknown): ContentBlock[];
|
|
269
|
+
export declare function probeAlphaCapabilities({ invoke, schemaFingerprint, trustedNativeProvenance, actionProbes, clickProbeRef, screenshotProbeRef, }: {
|
|
270
|
+
invoke: AlphaInvoke;
|
|
271
|
+
schemaFingerprint: unknown;
|
|
272
|
+
trustedNativeProvenance?: boolean;
|
|
273
|
+
actionProbes?: Record<string, RecordValue>;
|
|
274
|
+
clickProbeRef?: unknown;
|
|
275
|
+
screenshotProbeRef?: unknown;
|
|
276
|
+
}): Promise<{
|
|
277
|
+
classification: string;
|
|
278
|
+
actions: {
|
|
279
|
+
[k: string]: string;
|
|
280
|
+
};
|
|
281
|
+
probedAt: string;
|
|
282
|
+
schemaFingerprint: unknown;
|
|
283
|
+
probeVersion: number;
|
|
284
|
+
provenance: string;
|
|
285
|
+
}>;
|
|
286
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { JsonStore } from "./json-store.js";
|
|
2
|
+
declare const VERSION = 1;
|
|
3
|
+
type Classification = "native" | "command-capable" | "emulated-search-only" | "unsupported" | "unknown";
|
|
4
|
+
type ActionState = "supported" | "unsupported" | "unknown";
|
|
5
|
+
type Provenance = "trusted-native" | "unavailable";
|
|
6
|
+
export interface AlphaCapabilityRecord {
|
|
7
|
+
classification: Classification;
|
|
8
|
+
actions: Record<string, ActionState>;
|
|
9
|
+
probedAt: string;
|
|
10
|
+
schemaFingerprint: string;
|
|
11
|
+
probeVersion?: number;
|
|
12
|
+
provenance?: Provenance;
|
|
13
|
+
}
|
|
14
|
+
interface CapabilityData {
|
|
15
|
+
version: typeof VERSION;
|
|
16
|
+
capabilities: Record<string, AlphaCapabilityRecord>;
|
|
17
|
+
}
|
|
18
|
+
export declare function alphaCapabilityFingerprint(config: Record<string, unknown>): string;
|
|
19
|
+
export declare function alphaCapabilityUsable(record: unknown): boolean;
|
|
20
|
+
export declare class AlphaCapabilityStore {
|
|
21
|
+
readonly store: JsonStore<CapabilityData>;
|
|
22
|
+
constructor(file: string);
|
|
23
|
+
get(fingerprint: string): AlphaCapabilityRecord | undefined;
|
|
24
|
+
put(fingerprint: unknown, record: unknown): void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import type { ContentBlock } from "@deepseek-ai/dsh-llm";
|
|
2
|
+
type SearchContextSize = "low" | "medium" | "high";
|
|
3
|
+
type ReturnTokenBudget = "default" | "unlimited";
|
|
4
|
+
type SearchContentType = "text" | "image";
|
|
5
|
+
interface UserLocation {
|
|
6
|
+
country?: string;
|
|
7
|
+
city?: string;
|
|
8
|
+
region?: string;
|
|
9
|
+
timezone?: string;
|
|
10
|
+
}
|
|
11
|
+
interface ImageSettings {
|
|
12
|
+
maxResults?: number;
|
|
13
|
+
caption?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface HostedSearchArgs {
|
|
16
|
+
query: string;
|
|
17
|
+
searchContextSize?: SearchContextSize;
|
|
18
|
+
allowedDomains?: string[];
|
|
19
|
+
blockedDomains?: string[];
|
|
20
|
+
userLocation?: UserLocation;
|
|
21
|
+
externalWebAccess?: boolean;
|
|
22
|
+
returnTokenBudget?: ReturnTokenBudget;
|
|
23
|
+
searchContentTypes?: SearchContentType[];
|
|
24
|
+
imageSettings?: ImageSettings;
|
|
25
|
+
}
|
|
26
|
+
interface Source {
|
|
27
|
+
url: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
snippet?: string;
|
|
30
|
+
publishedAt?: string;
|
|
31
|
+
refId?: string;
|
|
32
|
+
}
|
|
33
|
+
interface ImageResult {
|
|
34
|
+
imageUrl: string;
|
|
35
|
+
thumbnailUrl?: string;
|
|
36
|
+
sourceWebsiteUrl?: string;
|
|
37
|
+
caption?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare const HOSTED_SEARCH_PARAMETERS: {
|
|
40
|
+
type: "object";
|
|
41
|
+
properties: {
|
|
42
|
+
query: {
|
|
43
|
+
type: "string";
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
searchContextSize: {
|
|
47
|
+
type: "string";
|
|
48
|
+
enum: string[];
|
|
49
|
+
};
|
|
50
|
+
allowedDomains: {
|
|
51
|
+
type: "array";
|
|
52
|
+
items: {
|
|
53
|
+
type: "string";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
blockedDomains: {
|
|
57
|
+
type: "array";
|
|
58
|
+
items: {
|
|
59
|
+
type: "string";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
userLocation: {
|
|
63
|
+
type: "object";
|
|
64
|
+
properties: {
|
|
65
|
+
country: {
|
|
66
|
+
type: "string";
|
|
67
|
+
};
|
|
68
|
+
city: {
|
|
69
|
+
type: "string";
|
|
70
|
+
};
|
|
71
|
+
region: {
|
|
72
|
+
type: "string";
|
|
73
|
+
};
|
|
74
|
+
timezone: {
|
|
75
|
+
type: "string";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
additionalProperties: false;
|
|
79
|
+
};
|
|
80
|
+
externalWebAccess: {
|
|
81
|
+
type: "boolean";
|
|
82
|
+
};
|
|
83
|
+
returnTokenBudget: {
|
|
84
|
+
type: "string";
|
|
85
|
+
enum: string[];
|
|
86
|
+
};
|
|
87
|
+
searchContentTypes: {
|
|
88
|
+
type: "array";
|
|
89
|
+
items: {
|
|
90
|
+
type: "string";
|
|
91
|
+
enum: string[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
imageSettings: {
|
|
95
|
+
type: "object";
|
|
96
|
+
properties: {
|
|
97
|
+
maxResults: {
|
|
98
|
+
type: "integer";
|
|
99
|
+
};
|
|
100
|
+
caption: {
|
|
101
|
+
type: "boolean";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
additionalProperties: false;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
required: string[];
|
|
108
|
+
additionalProperties: false;
|
|
109
|
+
};
|
|
110
|
+
export declare const HOSTED_SEARCH_OUTPUT: {
|
|
111
|
+
type: "object";
|
|
112
|
+
properties: {
|
|
113
|
+
mode: {
|
|
114
|
+
type: "string";
|
|
115
|
+
enum: string[];
|
|
116
|
+
};
|
|
117
|
+
action: {
|
|
118
|
+
type: "string";
|
|
119
|
+
};
|
|
120
|
+
emulation: {
|
|
121
|
+
type: "string";
|
|
122
|
+
enum: string[];
|
|
123
|
+
};
|
|
124
|
+
content: {
|
|
125
|
+
type: "string";
|
|
126
|
+
};
|
|
127
|
+
sources: {
|
|
128
|
+
type: "array";
|
|
129
|
+
items: {
|
|
130
|
+
type: "object";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
citations: {
|
|
134
|
+
type: "array";
|
|
135
|
+
items: {
|
|
136
|
+
type: "object";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
images: {
|
|
140
|
+
type: "array";
|
|
141
|
+
items: {
|
|
142
|
+
type: "object";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
warnings: {
|
|
146
|
+
type: "array";
|
|
147
|
+
items: {
|
|
148
|
+
type: "string";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
outputBlocks: {
|
|
152
|
+
type: "array";
|
|
153
|
+
items: {
|
|
154
|
+
type: "object";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
domains: {
|
|
158
|
+
type: "array";
|
|
159
|
+
items: {
|
|
160
|
+
type: "string";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
lineRange: {
|
|
164
|
+
type: "object";
|
|
165
|
+
};
|
|
166
|
+
requestId: {
|
|
167
|
+
type: "string";
|
|
168
|
+
};
|
|
169
|
+
responseId: {
|
|
170
|
+
type: "string";
|
|
171
|
+
};
|
|
172
|
+
retrievedAt: {
|
|
173
|
+
type: "string";
|
|
174
|
+
};
|
|
175
|
+
truncated: {
|
|
176
|
+
type: "boolean";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
required: string[];
|
|
180
|
+
additionalProperties: false;
|
|
181
|
+
};
|
|
182
|
+
export declare function normalizeHostedSearchArgs(args: unknown): HostedSearchArgs;
|
|
183
|
+
export declare function buildHostedSearchBody(args: HostedSearchArgs, model: unknown, options?: {
|
|
184
|
+
promptCacheKey?: string;
|
|
185
|
+
}): {
|
|
186
|
+
model: unknown;
|
|
187
|
+
input: {
|
|
188
|
+
role: string;
|
|
189
|
+
content: {
|
|
190
|
+
type: string;
|
|
191
|
+
text: string;
|
|
192
|
+
}[];
|
|
193
|
+
}[];
|
|
194
|
+
tools: {
|
|
195
|
+
type: string;
|
|
196
|
+
search_context_size?: SearchContextSize | undefined;
|
|
197
|
+
filters?: {
|
|
198
|
+
allowed_domains?: string[] | undefined;
|
|
199
|
+
blocked_domains?: string[] | undefined;
|
|
200
|
+
} | undefined;
|
|
201
|
+
user_location?: {
|
|
202
|
+
country?: string;
|
|
203
|
+
city?: string;
|
|
204
|
+
region?: string;
|
|
205
|
+
timezone?: string;
|
|
206
|
+
type: string;
|
|
207
|
+
} | undefined;
|
|
208
|
+
external_web_access?: boolean | undefined;
|
|
209
|
+
return_token_budget?: ReturnTokenBudget | undefined;
|
|
210
|
+
search_content_types?: SearchContentType[] | undefined;
|
|
211
|
+
image_settings?: {
|
|
212
|
+
max_results?: number | undefined;
|
|
213
|
+
caption?: boolean | undefined;
|
|
214
|
+
} | undefined;
|
|
215
|
+
}[];
|
|
216
|
+
tool_choice: string;
|
|
217
|
+
include: string[];
|
|
218
|
+
stream: boolean;
|
|
219
|
+
store: boolean;
|
|
220
|
+
prompt_cache_key?: string | undefined;
|
|
221
|
+
};
|
|
222
|
+
export declare function parseHostedSearchResponse(response: unknown, requestId: string, maxResults?: number, retrievedAt?: string): {
|
|
223
|
+
mode: string;
|
|
224
|
+
action: string;
|
|
225
|
+
emulation: string;
|
|
226
|
+
content: string;
|
|
227
|
+
sources: {
|
|
228
|
+
url: string;
|
|
229
|
+
title?: string | undefined;
|
|
230
|
+
}[];
|
|
231
|
+
citations: Source[];
|
|
232
|
+
images: ImageResult[];
|
|
233
|
+
warnings: string[];
|
|
234
|
+
outputBlocks: import("./web-run-output.js").WebRunBlock[];
|
|
235
|
+
domains: string[];
|
|
236
|
+
lineRange?: {
|
|
237
|
+
first: number;
|
|
238
|
+
last: number;
|
|
239
|
+
} | undefined;
|
|
240
|
+
requestId: string;
|
|
241
|
+
responseId?: string | undefined;
|
|
242
|
+
retrievedAt: string;
|
|
243
|
+
truncated: boolean;
|
|
244
|
+
};
|
|
245
|
+
export declare function renderHostedSearchResult(value: unknown): ContentBlock[];
|
|
246
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JsonStore } from "./json-store.js";
|
|
2
|
+
declare const VERSION = 1;
|
|
3
|
+
interface RefRecord {
|
|
4
|
+
refId: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
}
|
|
7
|
+
interface SessionRecord {
|
|
8
|
+
routeFingerprint: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
refs: Record<string, RefRecord>;
|
|
11
|
+
}
|
|
12
|
+
interface RefStoreData {
|
|
13
|
+
version: typeof VERSION;
|
|
14
|
+
sessions: Record<string, SessionRecord>;
|
|
15
|
+
}
|
|
16
|
+
export declare class AlphaRefStore {
|
|
17
|
+
readonly store: JsonStore<RefStoreData>;
|
|
18
|
+
constructor(file: string);
|
|
19
|
+
record(sessionId: unknown, routeFingerprint: unknown, refs: unknown): void;
|
|
20
|
+
assertUsable(sessionId: unknown, routeFingerprint: unknown, refId: unknown): RefRecord;
|
|
21
|
+
}
|
|
22
|
+
export {};
|