linkque-cli-v2 1.6.5 → 1.6.7
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/dev/worker.js +16 -3
- package/linkquejs.js +1018 -634
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/anthropic-messages-GSYNBLMR.js +17 -0
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{azure-openai-responses-HVAVRLTK.js → azure-openai-responses-NPKMM3LF.js} +7 -9
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-IATVK6CO.js → chunk-C2TN5LPS.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-Q2Y6LMNC.js → chunk-J4JCPZDI.js} +5 -7
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-4XAZNSEQ.js → chunk-JMBJJF7P.js} +18 -5
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{anthropic-messages-5DOLTIGP.js → chunk-KDHBKVSL.js} +14 -15
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-DNTEEBEH.js → chunk-SICWMO5Y.js} +1 -0
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-Y3G4J3TB.js → chunk-XOLFZ4XS.js} +316 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-UTJ7DVT7.js → chunk-Y2STWI2J.js} +437 -68
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-YZLXAZFT.js → chunk-Z2A5GMVJ.js} +60 -10
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{dist-ZPLSQEAM.js → dist-TGBYXSBU.js} +27 -42
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-bsd-JGCLGHFY.js → getMachineId-bsd-NYGVHXGN.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-darwin-COHLFNXH.js → getMachineId-darwin-OPTJOAYC.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-linux-XV3Z5FQG.js → getMachineId-linux-5SQRYTUJ.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-unsupported-FCRKLIZL.js → getMachineId-unsupported-OJE7WPEH.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{getMachineId-win-A4WRNVV6.js → getMachineId-win-SLTTCNXU.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-generative-ai-OLT56CSV.js → google-generative-ai-KD7MXONK.js} +8 -10
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-4DBBJ7SR.js → google-vertex-TREYA472.js} +9 -11
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-OEBGEDLQ.js → mistral-conversations-C43A6QIS.js} +8 -10
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-codex-responses-3KOC6KHN.js → openai-codex-responses-GEFKSNVN.js} +10 -12
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-completions-HG6OJRL5.js → openai-completions-TAACO6T5.js} +13 -15
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-responses-F6V2PG3Y.js → openai-responses-4DDTXIGI.js} +12 -14
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{otel-WGS5CC2J.js → otel-RUUFBBFE.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +217 -78
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +3 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +3 -3
- package/worker.js +380 -97
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-RYONFGPP.js +0 -317
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{pi-messages-DC4DVRAJ.js → pi-messages-7JN3W3BC.js} +4 -4
package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-YZLXAZFT.js → chunk-Z2A5GMVJ.js}
RENAMED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
RUNTIME_CONFIG_DEFAULTS,
|
|
23
23
|
RuntimeConfigProvider,
|
|
24
24
|
isDebugLoggingEnabled
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-Y2STWI2J.js";
|
|
26
26
|
import {
|
|
27
27
|
__commonJS,
|
|
28
28
|
__require,
|
|
@@ -15310,7 +15310,7 @@ var LINKQUE_AUTHORIZATION_HEADER = "x-linkque-authorization";
|
|
|
15310
15310
|
var LinkqueGatewayAuthError = class extends Error {
|
|
15311
15311
|
code = "invalid_linkque_authorization";
|
|
15312
15312
|
status = 401;
|
|
15313
|
-
constructor(message = "X-Linkque-Authorization \u5FC5\u987B\u662F\u5355\u4E2A Bearer \u51ED\u636E") {
|
|
15313
|
+
constructor(message = "X-Linkque-Authorization \u5FC5\u987B\u662F\u5355\u4E2A Bearer \u6216 Scenario \u51ED\u636E") {
|
|
15314
15314
|
super(message);
|
|
15315
15315
|
this.name = "LinkqueGatewayAuthError";
|
|
15316
15316
|
}
|
|
@@ -15323,6 +15323,25 @@ var LinkqueGatewayAuthUnconfiguredError = class extends Error {
|
|
|
15323
15323
|
this.name = "LinkqueGatewayAuthUnconfiguredError";
|
|
15324
15324
|
}
|
|
15325
15325
|
};
|
|
15326
|
+
function resolveLinkqueGatewayRequestAuth(headers, env = process.env, logCtx) {
|
|
15327
|
+
const users = Object.entries(headers ?? {}).filter(([key]) => key.toLowerCase() === "x-appwrite-user-id");
|
|
15328
|
+
if (users.length > 1 || users.length === 1 && typeof users[0]?.[1] !== "string") {
|
|
15329
|
+
throw new LinkqueGatewayAuthError("Appwrite\u7528\u6237\u8EAB\u4EFD\u65E0\u6548");
|
|
15330
|
+
}
|
|
15331
|
+
const userId = users[0]?.[1]?.trim();
|
|
15332
|
+
const hasToken = Object.keys(headers ?? {}).some((key) => key.toLowerCase() === LINKQUE_AUTHORIZATION_HEADER);
|
|
15333
|
+
if (userId?.startsWith("lqs_") && !hasToken) {
|
|
15334
|
+
logCtx?.error?.("[auth-resolve] stage=failed, reason=scenario-user-token-required");
|
|
15335
|
+
throw new LinkqueGatewayAuthError("\u573A\u666F\u7528\u6237\u51ED\u8BC1\u7F3A\u5931\uFF0C\u8BF7\u4ECE\u90E8\u7F72\u5165\u53E3\u91CD\u65B0\u767B\u5F55");
|
|
15336
|
+
}
|
|
15337
|
+
const resolved = resolveLinkqueGatewayAuth(headers, env, logCtx);
|
|
15338
|
+
const isScenarioUser = /^lqs_[a-f0-9]{32}$/u.test(userId ?? "");
|
|
15339
|
+
if (isScenarioUser && resolved.mode !== "scenario-token" || !isScenarioUser && resolved.mode === "scenario-token") {
|
|
15340
|
+
logCtx?.error?.("[auth-resolve] stage=failed, reason=scenario-identity-mismatch");
|
|
15341
|
+
throw new LinkqueGatewayAuthError("\u573A\u666F\u7528\u6237\u8EAB\u4EFD\u4E0E\u51ED\u8BC1\u7C7B\u578B\u4E0D\u5339\u914D");
|
|
15342
|
+
}
|
|
15343
|
+
return resolved;
|
|
15344
|
+
}
|
|
15326
15345
|
function resolveLinkqueGatewayAuth(headers, env = process.env, logCtx) {
|
|
15327
15346
|
const config = new AppbaseRuntimeConfigProvider({ ...env });
|
|
15328
15347
|
const log = (...a2) => logCtx?.log?.("[auth-resolve]", ...a2);
|
|
@@ -15331,7 +15350,7 @@ function resolveLinkqueGatewayAuth(headers, env = process.env, logCtx) {
|
|
|
15331
15350
|
const matches = Object.entries(headers ?? {}).filter(([key]) => key.toLowerCase() === LINKQUE_AUTHORIZATION_HEADER);
|
|
15332
15351
|
if (matches.length > 0) {
|
|
15333
15352
|
log(`stage=header-inspection, state=present, count=${matches.length}`);
|
|
15334
|
-
log("stage=
|
|
15353
|
+
log("stage=credential-validation, state=start");
|
|
15335
15354
|
if (matches.length !== 1) {
|
|
15336
15355
|
logError("stage=failed, reason=duplicate-header");
|
|
15337
15356
|
throw new LinkqueGatewayAuthError();
|
|
@@ -15345,19 +15364,25 @@ function resolveLinkqueGatewayAuth(headers, env = process.env, logCtx) {
|
|
|
15345
15364
|
logError("stage=failed, reason=joined-header");
|
|
15346
15365
|
throw new LinkqueGatewayAuthError();
|
|
15347
15366
|
}
|
|
15348
|
-
const match = /^Bearer[\t ]+([^\s,]+)$/iu.exec(value.trim());
|
|
15349
|
-
const
|
|
15367
|
+
const match = /^(Bearer|Scenario)[\t ]+([^\s,]+)$/iu.exec(value.trim());
|
|
15368
|
+
const scheme = match?.[1]?.toLowerCase();
|
|
15369
|
+
const token = match?.[2];
|
|
15350
15370
|
if (!token) {
|
|
15351
|
-
logError("stage=failed, reason=invalid-
|
|
15371
|
+
logError("stage=failed, reason=invalid-authorization-format");
|
|
15372
|
+
throw new LinkqueGatewayAuthError();
|
|
15373
|
+
}
|
|
15374
|
+
const scenario = scheme === "scenario";
|
|
15375
|
+
if (scenario ? !/^lqs_[A-Za-z0-9_-]{43}$/u.test(token) : token.startsWith("lqs_")) {
|
|
15376
|
+
logError("stage=failed, reason=credential-scheme-mismatch");
|
|
15352
15377
|
throw new LinkqueGatewayAuthError();
|
|
15353
15378
|
}
|
|
15354
|
-
log(
|
|
15379
|
+
log(`stage=credential-validation, state=success, scheme=${scenario ? "Scenario" : "Bearer"}`);
|
|
15355
15380
|
const provider2 = resolveProvider(config.get("LINKQUE_MODEL_PROVIDER"), log, logError);
|
|
15356
|
-
log(
|
|
15381
|
+
log(`stage=complete, mode=${scenario ? "scenario-token" : "user-token"}, source=request-header`);
|
|
15357
15382
|
return {
|
|
15358
|
-
mode: "user-token",
|
|
15383
|
+
mode: scenario ? "scenario-token" : "user-token",
|
|
15359
15384
|
modelCredential: token,
|
|
15360
|
-
authorizationHeader:
|
|
15385
|
+
authorizationHeader: `${scenario ? "Scenario" : "Bearer"} ${token}`,
|
|
15361
15386
|
auth: { provider: provider2, apiKey: token }
|
|
15362
15387
|
};
|
|
15363
15388
|
}
|
|
@@ -15638,6 +15663,7 @@ var API_KEY_HEADER = "x-appwrite-key";
|
|
|
15638
15663
|
var TRIGGER_HEADER = "x-appwrite-trigger";
|
|
15639
15664
|
var ENV_SELECTOR_HEADER = "x-linkque-env";
|
|
15640
15665
|
var TRACE_ID_HEADER = "x-trace-id";
|
|
15666
|
+
var OTEL_TRACE_ID_HEADER = "x-linkque-otel-trace-id";
|
|
15641
15667
|
var TEMPORARY_FRONTEND_APP_ID_HEADER = "x-linkque-alipay-app-id";
|
|
15642
15668
|
var ALIPAY_AUTH_CODE_HEADER = "x-alipay-authcode";
|
|
15643
15669
|
var AUTH_UNAVAILABLE_HEADER = "x-linkque-phone-auth-unavailable";
|
|
@@ -15717,6 +15743,28 @@ function readTraceId(headers) {
|
|
|
15717
15743
|
}
|
|
15718
15744
|
return void 0;
|
|
15719
15745
|
}
|
|
15746
|
+
function readOtelTraceId(headers) {
|
|
15747
|
+
if (!headers)
|
|
15748
|
+
return { kind: "missing" };
|
|
15749
|
+
let found = Object.prototype.hasOwnProperty.call(headers, OTEL_TRACE_ID_HEADER);
|
|
15750
|
+
let value = found ? headers[OTEL_TRACE_ID_HEADER] : void 0;
|
|
15751
|
+
if (!found) {
|
|
15752
|
+
for (const [key, candidate] of Object.entries(headers)) {
|
|
15753
|
+
if (key.toLowerCase() === OTEL_TRACE_ID_HEADER) {
|
|
15754
|
+
found = true;
|
|
15755
|
+
value = candidate;
|
|
15756
|
+
break;
|
|
15757
|
+
}
|
|
15758
|
+
}
|
|
15759
|
+
}
|
|
15760
|
+
if (!found)
|
|
15761
|
+
return { kind: "missing" };
|
|
15762
|
+
const raw = headValue(value);
|
|
15763
|
+
if (!raw)
|
|
15764
|
+
return { kind: "invalid" };
|
|
15765
|
+
const traceId = raw.toLowerCase();
|
|
15766
|
+
return /^[0-9a-f]{32}$/u.test(traceId) && traceId !== "00000000000000000000000000000000" ? { kind: "valid", traceId } : { kind: "invalid" };
|
|
15767
|
+
}
|
|
15720
15768
|
function readTemporaryFrontendAppId(headers) {
|
|
15721
15769
|
if (!headers)
|
|
15722
15770
|
return void 0;
|
|
@@ -15882,6 +15930,7 @@ export {
|
|
|
15882
15930
|
describeRuntimeEnv,
|
|
15883
15931
|
LinkqueGatewayAuthError,
|
|
15884
15932
|
LinkqueGatewayAuthUnconfiguredError,
|
|
15933
|
+
resolveLinkqueGatewayRequestAuth,
|
|
15885
15934
|
resolveLinkqueGatewayAuth,
|
|
15886
15935
|
resolveGatewayAuthContext,
|
|
15887
15936
|
resolveBodyJSON,
|
|
@@ -15891,6 +15940,7 @@ export {
|
|
|
15891
15940
|
mcpPhoneAuthorizationChallenge,
|
|
15892
15941
|
readEnvSelector,
|
|
15893
15942
|
readTraceId,
|
|
15943
|
+
readOtelTraceId,
|
|
15894
15944
|
readTemporaryFrontendAppId,
|
|
15895
15945
|
readAuthenticatedUserId,
|
|
15896
15946
|
readAppwriteApiKey,
|
package/vendor/linkque-agent-appwrite-integrate/dist/esm/{dist-ZPLSQEAM.js → dist-TGBYXSBU.js}
RENAMED
|
@@ -222,64 +222,50 @@ var require_common = __commonJS({
|
|
|
222
222
|
createDebug.namespaces = namespaces;
|
|
223
223
|
createDebug.names = [];
|
|
224
224
|
createDebug.skips = [];
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
let i;
|
|
226
|
+
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
227
|
+
const len = split.length;
|
|
228
|
+
for (i = 0; i < len; i++) {
|
|
229
|
+
if (!split[i]) {
|
|
230
|
+
continue;
|
|
231
231
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
let searchIndex = 0;
|
|
236
|
-
let templateIndex = 0;
|
|
237
|
-
let starIndex = -1;
|
|
238
|
-
let matchIndex = 0;
|
|
239
|
-
while (searchIndex < search.length) {
|
|
240
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
241
|
-
if (template[templateIndex] === "*") {
|
|
242
|
-
starIndex = templateIndex;
|
|
243
|
-
matchIndex = searchIndex;
|
|
244
|
-
templateIndex++;
|
|
245
|
-
} else {
|
|
246
|
-
searchIndex++;
|
|
247
|
-
templateIndex++;
|
|
248
|
-
}
|
|
249
|
-
} else if (starIndex !== -1) {
|
|
250
|
-
templateIndex = starIndex + 1;
|
|
251
|
-
matchIndex++;
|
|
252
|
-
searchIndex = matchIndex;
|
|
232
|
+
namespaces = split[i].replace(/\*/g, ".*?");
|
|
233
|
+
if (namespaces[0] === "-") {
|
|
234
|
+
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
|
|
253
235
|
} else {
|
|
254
|
-
|
|
236
|
+
createDebug.names.push(new RegExp("^" + namespaces + "$"));
|
|
255
237
|
}
|
|
256
238
|
}
|
|
257
|
-
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
258
|
-
templateIndex++;
|
|
259
|
-
}
|
|
260
|
-
return templateIndex === template.length;
|
|
261
239
|
}
|
|
262
240
|
function disable() {
|
|
263
241
|
const namespaces = [
|
|
264
|
-
...createDebug.names,
|
|
265
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
242
|
+
...createDebug.names.map(toNamespace),
|
|
243
|
+
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
|
|
266
244
|
].join(",");
|
|
267
245
|
createDebug.enable("");
|
|
268
246
|
return namespaces;
|
|
269
247
|
}
|
|
270
248
|
function enabled(name) {
|
|
271
|
-
|
|
272
|
-
|
|
249
|
+
if (name[name.length - 1] === "*") {
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
252
|
+
let i;
|
|
253
|
+
let len;
|
|
254
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
255
|
+
if (createDebug.skips[i].test(name)) {
|
|
273
256
|
return false;
|
|
274
257
|
}
|
|
275
258
|
}
|
|
276
|
-
for (
|
|
277
|
-
if (
|
|
259
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
260
|
+
if (createDebug.names[i].test(name)) {
|
|
278
261
|
return true;
|
|
279
262
|
}
|
|
280
263
|
}
|
|
281
264
|
return false;
|
|
282
265
|
}
|
|
266
|
+
function toNamespace(regexp) {
|
|
267
|
+
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
268
|
+
}
|
|
283
269
|
function coerce(val) {
|
|
284
270
|
if (val instanceof Error) {
|
|
285
271
|
return val.stack || val.message;
|
|
@@ -398,11 +384,10 @@ var require_browser = __commonJS({
|
|
|
398
384
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
399
385
|
return false;
|
|
400
386
|
}
|
|
401
|
-
let m;
|
|
402
387
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
403
388
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
404
389
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
405
|
-
typeof navigator !== "undefined" && navigator.userAgent &&
|
|
390
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
406
391
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
407
392
|
}
|
|
408
393
|
function formatArgs(args) {
|
|
@@ -440,7 +425,7 @@ var require_browser = __commonJS({
|
|
|
440
425
|
function load() {
|
|
441
426
|
let r;
|
|
442
427
|
try {
|
|
443
|
-
r = exports.storage.getItem("debug")
|
|
428
|
+
r = exports.storage.getItem("debug");
|
|
444
429
|
} catch (error) {
|
|
445
430
|
}
|
|
446
431
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -723,7 +708,7 @@ var require_node = __commonJS({
|
|
|
723
708
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
724
709
|
}
|
|
725
710
|
function log(...args) {
|
|
726
|
-
return process.stderr.write(util.
|
|
711
|
+
return process.stderr.write(util.format(...args) + "\n");
|
|
727
712
|
}
|
|
728
713
|
function save(namespaces) {
|
|
729
714
|
if (namespaces) {
|
|
@@ -6,27 +6,25 @@ import {
|
|
|
6
6
|
mapStopReason,
|
|
7
7
|
mapToolChoice,
|
|
8
8
|
retainThoughtSignature
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JMBJJF7P.js";
|
|
10
10
|
import {
|
|
11
11
|
formatProviderError,
|
|
12
12
|
normalizeProviderError
|
|
13
13
|
} from "./chunk-NKEOCGYU.js";
|
|
14
14
|
import {
|
|
15
|
-
buildBaseOptions
|
|
16
|
-
|
|
15
|
+
buildBaseOptions,
|
|
16
|
+
calculateCost,
|
|
17
|
+
clampThinkingLevel
|
|
18
|
+
} from "./chunk-XOLFZ4XS.js";
|
|
19
|
+
import {
|
|
20
|
+
AssistantMessageEventStream
|
|
21
|
+
} from "./chunk-46SEH6ER.js";
|
|
17
22
|
import {
|
|
18
23
|
sanitizeSurrogates
|
|
19
24
|
} from "./chunk-CT4G24PS.js";
|
|
20
25
|
import {
|
|
21
26
|
providerHeadersToRecord
|
|
22
27
|
} from "./chunk-Y6UTJIT4.js";
|
|
23
|
-
import {
|
|
24
|
-
calculateCost,
|
|
25
|
-
clampThinkingLevel
|
|
26
|
-
} from "./chunk-Y3G4J3TB.js";
|
|
27
|
-
import {
|
|
28
|
-
AssistantMessageEventStream
|
|
29
|
-
} from "./chunk-46SEH6ER.js";
|
|
30
28
|
import "./chunk-ETG6PNHQ.js";
|
|
31
29
|
import "./chunk-2ESYSVXG.js";
|
|
32
30
|
|
|
@@ -8,30 +8,28 @@ import {
|
|
|
8
8
|
mapStopReason,
|
|
9
9
|
mapToolChoice,
|
|
10
10
|
retainThoughtSignature
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JMBJJF7P.js";
|
|
12
12
|
import {
|
|
13
13
|
formatProviderError,
|
|
14
14
|
normalizeProviderError
|
|
15
15
|
} from "./chunk-NKEOCGYU.js";
|
|
16
|
-
import {
|
|
17
|
-
buildBaseOptions
|
|
18
|
-
} from "./chunk-RYONFGPP.js";
|
|
19
|
-
import {
|
|
20
|
-
sanitizeSurrogates
|
|
21
|
-
} from "./chunk-CT4G24PS.js";
|
|
22
|
-
import {
|
|
23
|
-
providerHeadersToRecord
|
|
24
|
-
} from "./chunk-Y6UTJIT4.js";
|
|
25
16
|
import {
|
|
26
17
|
getProviderEnvValue
|
|
27
18
|
} from "./chunk-B5XRGKYX.js";
|
|
28
19
|
import {
|
|
20
|
+
buildBaseOptions,
|
|
29
21
|
calculateCost,
|
|
30
22
|
clampThinkingLevel
|
|
31
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XOLFZ4XS.js";
|
|
32
24
|
import {
|
|
33
25
|
AssistantMessageEventStream
|
|
34
26
|
} from "./chunk-46SEH6ER.js";
|
|
27
|
+
import {
|
|
28
|
+
sanitizeSurrogates
|
|
29
|
+
} from "./chunk-CT4G24PS.js";
|
|
30
|
+
import {
|
|
31
|
+
providerHeadersToRecord
|
|
32
|
+
} from "./chunk-Y6UTJIT4.js";
|
|
35
33
|
import "./chunk-ETG6PNHQ.js";
|
|
36
34
|
import "./chunk-2ESYSVXG.js";
|
|
37
35
|
|
|
@@ -37,23 +37,21 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
shortHash
|
|
39
39
|
} from "./chunk-UFVAKOTZ.js";
|
|
40
|
-
import {
|
|
41
|
-
buildBaseOptions,
|
|
42
|
-
transformMessages
|
|
43
|
-
} from "./chunk-RYONFGPP.js";
|
|
44
|
-
import {
|
|
45
|
-
sanitizeSurrogates
|
|
46
|
-
} from "./chunk-CT4G24PS.js";
|
|
47
40
|
import {
|
|
48
41
|
parseStreamingJson
|
|
49
42
|
} from "./chunk-WJHOHUET.js";
|
|
50
43
|
import {
|
|
44
|
+
buildBaseOptions,
|
|
51
45
|
calculateCost,
|
|
52
|
-
clampThinkingLevel
|
|
53
|
-
|
|
46
|
+
clampThinkingLevel,
|
|
47
|
+
transformMessages
|
|
48
|
+
} from "./chunk-XOLFZ4XS.js";
|
|
54
49
|
import {
|
|
55
50
|
AssistantMessageEventStream
|
|
56
51
|
} from "./chunk-46SEH6ER.js";
|
|
52
|
+
import {
|
|
53
|
+
sanitizeSurrogates
|
|
54
|
+
} from "./chunk-CT4G24PS.js";
|
|
57
55
|
import {
|
|
58
56
|
zodToJsonSchema
|
|
59
57
|
} from "./chunk-XUFLSZM4.js";
|
|
@@ -390,7 +388,7 @@ async function getObservabilityModule() {
|
|
|
390
388
|
return observabilityModule;
|
|
391
389
|
}
|
|
392
390
|
try {
|
|
393
|
-
observabilityModule = await import("./otel-
|
|
391
|
+
observabilityModule = await import("./otel-RUUFBBFE.js");
|
|
394
392
|
} catch {
|
|
395
393
|
observabilityModule = null;
|
|
396
394
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
splitDeferredTools
|
|
3
|
-
} from "./chunk-HTG7JBF2.js";
|
|
4
1
|
import {
|
|
5
2
|
convertResponsesMessages,
|
|
6
3
|
convertResponsesTools,
|
|
7
4
|
processResponsesStream
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J4JCPZDI.js";
|
|
9
6
|
import "./chunk-UFVAKOTZ.js";
|
|
10
7
|
import {
|
|
11
8
|
clampOpenAIPromptCacheKey
|
|
@@ -14,13 +11,6 @@ import {
|
|
|
14
11
|
formatProviderError,
|
|
15
12
|
normalizeProviderError
|
|
16
13
|
} from "./chunk-NKEOCGYU.js";
|
|
17
|
-
import {
|
|
18
|
-
buildBaseOptions
|
|
19
|
-
} from "./chunk-RYONFGPP.js";
|
|
20
|
-
import "./chunk-CT4G24PS.js";
|
|
21
|
-
import {
|
|
22
|
-
headersToRecord
|
|
23
|
-
} from "./chunk-Y6UTJIT4.js";
|
|
24
14
|
import {
|
|
25
15
|
registerSessionResourceCleanup
|
|
26
16
|
} from "./chunk-6MHDOBWO.js";
|
|
@@ -29,16 +19,24 @@ import {
|
|
|
29
19
|
createAssistantMessageDiagnostic,
|
|
30
20
|
formatThrownValue
|
|
31
21
|
} from "./chunk-E2P6TIFG.js";
|
|
22
|
+
import {
|
|
23
|
+
splitDeferredTools
|
|
24
|
+
} from "./chunk-HTG7JBF2.js";
|
|
32
25
|
import {
|
|
33
26
|
getProviderEnvValue
|
|
34
27
|
} from "./chunk-B5XRGKYX.js";
|
|
35
28
|
import "./chunk-WJHOHUET.js";
|
|
36
29
|
import {
|
|
30
|
+
buildBaseOptions,
|
|
37
31
|
clampThinkingLevel
|
|
38
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XOLFZ4XS.js";
|
|
39
33
|
import {
|
|
40
34
|
AssistantMessageEventStream
|
|
41
35
|
} from "./chunk-46SEH6ER.js";
|
|
36
|
+
import "./chunk-CT4G24PS.js";
|
|
37
|
+
import {
|
|
38
|
+
headersToRecord
|
|
39
|
+
} from "./chunk-Y6UTJIT4.js";
|
|
42
40
|
import "./chunk-2ESYSVXG.js";
|
|
43
41
|
|
|
44
42
|
// ../../node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildCopilotDynamicHeaders,
|
|
3
|
-
hasCopilotVisionInput
|
|
4
|
-
} from "./chunk-XMVFOHGJ.js";
|
|
5
1
|
import {
|
|
6
2
|
clampOpenAIPromptCacheKey
|
|
7
3
|
} from "./chunk-FHNQ6DPF.js";
|
|
@@ -13,15 +9,9 @@ import {
|
|
|
13
9
|
normalizeProviderError
|
|
14
10
|
} from "./chunk-NKEOCGYU.js";
|
|
15
11
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
sanitizeSurrogates
|
|
21
|
-
} from "./chunk-CT4G24PS.js";
|
|
22
|
-
import {
|
|
23
|
-
headersToRecord
|
|
24
|
-
} from "./chunk-Y6UTJIT4.js";
|
|
12
|
+
buildCopilotDynamicHeaders,
|
|
13
|
+
hasCopilotVisionInput
|
|
14
|
+
} from "./chunk-XMVFOHGJ.js";
|
|
25
15
|
import {
|
|
26
16
|
getProviderEnvValue
|
|
27
17
|
} from "./chunk-B5XRGKYX.js";
|
|
@@ -29,12 +19,20 @@ import {
|
|
|
29
19
|
parseStreamingJson
|
|
30
20
|
} from "./chunk-WJHOHUET.js";
|
|
31
21
|
import {
|
|
22
|
+
buildBaseOptions,
|
|
32
23
|
calculateCost,
|
|
33
|
-
clampThinkingLevel
|
|
34
|
-
|
|
24
|
+
clampThinkingLevel,
|
|
25
|
+
transformMessages
|
|
26
|
+
} from "./chunk-XOLFZ4XS.js";
|
|
35
27
|
import {
|
|
36
28
|
AssistantMessageEventStream
|
|
37
29
|
} from "./chunk-46SEH6ER.js";
|
|
30
|
+
import {
|
|
31
|
+
sanitizeSurrogates
|
|
32
|
+
} from "./chunk-CT4G24PS.js";
|
|
33
|
+
import {
|
|
34
|
+
headersToRecord
|
|
35
|
+
} from "./chunk-Y6UTJIT4.js";
|
|
38
36
|
import "./chunk-2ESYSVXG.js";
|
|
39
37
|
|
|
40
38
|
// ../../node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
splitDeferredTools
|
|
3
|
-
} from "./chunk-HTG7JBF2.js";
|
|
4
|
-
import {
|
|
5
|
-
buildCopilotDynamicHeaders,
|
|
6
|
-
hasCopilotVisionInput
|
|
7
|
-
} from "./chunk-XMVFOHGJ.js";
|
|
8
1
|
import {
|
|
9
2
|
convertResponsesMessages,
|
|
10
3
|
convertResponsesTools,
|
|
11
4
|
processResponsesStream
|
|
12
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J4JCPZDI.js";
|
|
13
6
|
import "./chunk-UFVAKOTZ.js";
|
|
14
7
|
import {
|
|
15
8
|
clampOpenAIPromptCacheKey
|
|
@@ -22,22 +15,27 @@ import {
|
|
|
22
15
|
normalizeProviderError
|
|
23
16
|
} from "./chunk-NKEOCGYU.js";
|
|
24
17
|
import {
|
|
25
|
-
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-CT4G24PS.js";
|
|
18
|
+
splitDeferredTools
|
|
19
|
+
} from "./chunk-HTG7JBF2.js";
|
|
28
20
|
import {
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
buildCopilotDynamicHeaders,
|
|
22
|
+
hasCopilotVisionInput
|
|
23
|
+
} from "./chunk-XMVFOHGJ.js";
|
|
31
24
|
import {
|
|
32
25
|
getProviderEnvValue
|
|
33
26
|
} from "./chunk-B5XRGKYX.js";
|
|
34
27
|
import "./chunk-WJHOHUET.js";
|
|
35
28
|
import {
|
|
29
|
+
buildBaseOptions,
|
|
36
30
|
clampThinkingLevel
|
|
37
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XOLFZ4XS.js";
|
|
38
32
|
import {
|
|
39
33
|
AssistantMessageEventStream
|
|
40
34
|
} from "./chunk-46SEH6ER.js";
|
|
35
|
+
import "./chunk-CT4G24PS.js";
|
|
36
|
+
import {
|
|
37
|
+
headersToRecord
|
|
38
|
+
} from "./chunk-Y6UTJIT4.js";
|
|
41
39
|
import "./chunk-2ESYSVXG.js";
|
|
42
40
|
|
|
43
41
|
// ../../node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js
|