@elizaos/cli 1.6.4 → 1.6.5-alpha.10
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 +3 -3
- package/dist/commands/create/actions/setup.d.ts.map +1 -1
- package/dist/commands/create/utils/selection.d.ts.map +1 -1
- package/dist/commands/start/index.d.ts.map +1 -1
- package/dist/index.js +267 -156
- package/dist/index.js.map +30 -29
- package/dist/templates/plugin-quick-starter/package.json +3 -9
- package/dist/templates/plugin-starter/package.json +3 -9
- package/dist/templates/project-starter/package.json +6 -6
- package/dist/templates/project-starter/src/__tests__/utils/core-test-utils.ts +1 -0
- package/dist/templates/project-tee-starter/package.json +4 -4
- package/dist/templates/project-tee-starter/src/__tests__/utils/core-test-utils.ts +1 -0
- package/dist/utils/get-config.d.ts.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +2 -2
- package/package.json +7 -7
- package/templates/plugin-quick-starter/package.json +3 -9
- package/templates/plugin-starter/package.json +3 -9
- package/templates/project-starter/package.json +6 -6
- package/templates/project-starter/src/__tests__/utils/core-test-utils.ts +1 -0
- package/templates/project-tee-starter/package.json +4 -4
- package/templates/project-tee-starter/src/__tests__/utils/core-test-utils.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -4749,7 +4749,7 @@ __export(exports_version, {
|
|
|
4749
4749
|
BUILD_TIME: () => BUILD_TIME,
|
|
4750
4750
|
BUILD_ENV: () => BUILD_ENV
|
|
4751
4751
|
});
|
|
4752
|
-
var CLI_VERSION = "1.6.
|
|
4752
|
+
var CLI_VERSION = "1.6.5-alpha.10", CLI_NAME = "@elizaos/cli", CLI_DESCRIPTION = "elizaOS CLI - Manage your AI agents and plugins", BUILD_TIME = "2025-11-21T12:14:33.270Z", BUILD_ENV = "production", version_default;
|
|
4753
4753
|
var init_version = __esm(() => {
|
|
4754
4754
|
version_default = {
|
|
4755
4755
|
version: CLI_VERSION,
|
|
@@ -20532,6 +20532,10 @@ ANTHROPIC_API_KEY=
|
|
|
20532
20532
|
# OLLAMA_MEDIUM_MODEL=gemma3:latest
|
|
20533
20533
|
# OLLAMA_LARGE_MODEL=gemma3:latest
|
|
20534
20534
|
|
|
20535
|
+
# OpenRouter Configuration
|
|
20536
|
+
# OPENROUTER_API_KEY=
|
|
20537
|
+
# OPENROUTER_EMBEDDING_MODEL=openai/text-embedding-3-small
|
|
20538
|
+
# OPENROUTER_EMBEDDING_DIMENSIONS=1536
|
|
20535
20539
|
|
|
20536
20540
|
# Highly recommended to use nomic-embed-text for embeddings
|
|
20537
20541
|
# OLLAMA_EMBEDDING_MODEL=nomic-embed-text
|
|
@@ -30437,7 +30441,7 @@ function mergeUint8Arrays(items) {
|
|
|
30437
30441
|
}
|
|
30438
30442
|
|
|
30439
30443
|
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/util/version.js
|
|
30440
|
-
var packageVersion = "24.
|
|
30444
|
+
var packageVersion = "24.31.0";
|
|
30441
30445
|
|
|
30442
30446
|
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/common/Debug.js
|
|
30443
30447
|
async function importDebug() {
|
|
@@ -36271,12 +36275,14 @@ class ConsoleMessage {
|
|
|
36271
36275
|
#args;
|
|
36272
36276
|
#stackTraceLocations;
|
|
36273
36277
|
#frame;
|
|
36274
|
-
|
|
36278
|
+
#rawStackTrace;
|
|
36279
|
+
constructor(type, text, args, stackTraceLocations, frame, rawStackTrace) {
|
|
36275
36280
|
this.#type = type;
|
|
36276
36281
|
this.#text = text;
|
|
36277
36282
|
this.#args = args;
|
|
36278
36283
|
this.#stackTraceLocations = stackTraceLocations;
|
|
36279
36284
|
this.#frame = frame;
|
|
36285
|
+
this.#rawStackTrace = rawStackTrace;
|
|
36280
36286
|
}
|
|
36281
36287
|
type() {
|
|
36282
36288
|
return this.#type;
|
|
@@ -36293,6 +36299,9 @@ class ConsoleMessage {
|
|
|
36293
36299
|
stackTrace() {
|
|
36294
36300
|
return this.#stackTraceLocations;
|
|
36295
36301
|
}
|
|
36302
|
+
_rawStackTrace() {
|
|
36303
|
+
return this.#rawStackTrace;
|
|
36304
|
+
}
|
|
36296
36305
|
}
|
|
36297
36306
|
|
|
36298
36307
|
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/common/FileChooser.js
|
|
@@ -38382,6 +38391,10 @@ var require_BrowsingContextProcessor = __commonJS((exports) => {
|
|
|
38382
38391
|
return await context2.print(params);
|
|
38383
38392
|
}
|
|
38384
38393
|
async setViewport(params) {
|
|
38394
|
+
const maxDimensionSize = 1e7;
|
|
38395
|
+
if ((params.viewport?.height ?? 0) > maxDimensionSize || (params.viewport?.width ?? 0) > maxDimensionSize) {
|
|
38396
|
+
throw new protocol_js_1.UnsupportedOperationException(`Viewport dimension over ${maxDimensionSize} are not supported`);
|
|
38397
|
+
}
|
|
38385
38398
|
const config4 = {};
|
|
38386
38399
|
if (params.devicePixelRatio !== undefined) {
|
|
38387
38400
|
config4.devicePixelRatio = params.devicePixelRatio;
|
|
@@ -38396,7 +38409,10 @@ var require_BrowsingContextProcessor = __commonJS((exports) => {
|
|
|
38396
38409
|
if (params.context !== undefined) {
|
|
38397
38410
|
this.#contextConfigStorage.updateBrowsingContextConfig(params.context, config4);
|
|
38398
38411
|
}
|
|
38399
|
-
await Promise.all(impactedTopLevelContexts.map((context2) =>
|
|
38412
|
+
await Promise.all(impactedTopLevelContexts.map(async (context2) => {
|
|
38413
|
+
const config5 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38414
|
+
await context2.setViewport(config5.viewport ?? null, config5.devicePixelRatio ?? null, config5.screenOrientation ?? null);
|
|
38415
|
+
}));
|
|
38400
38416
|
return {};
|
|
38401
38417
|
}
|
|
38402
38418
|
async#getRelatedTopLevelBrowsingContexts(browsingContextId, userContextIds) {
|
|
@@ -38551,7 +38567,10 @@ var require_EmulationProcessor = __commonJS((exports) => {
|
|
|
38551
38567
|
geolocation
|
|
38552
38568
|
});
|
|
38553
38569
|
}
|
|
38554
|
-
await Promise.all(browsingContexts.map(async (context2) =>
|
|
38570
|
+
await Promise.all(browsingContexts.map(async (context2) => {
|
|
38571
|
+
const config4 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38572
|
+
await context2.setGeolocationOverride(config4.geolocation ?? null);
|
|
38573
|
+
}));
|
|
38555
38574
|
return {};
|
|
38556
38575
|
}
|
|
38557
38576
|
async setLocaleOverride(params) {
|
|
@@ -38570,7 +38589,13 @@ var require_EmulationProcessor = __commonJS((exports) => {
|
|
|
38570
38589
|
locale
|
|
38571
38590
|
});
|
|
38572
38591
|
}
|
|
38573
|
-
await Promise.all(browsingContexts.map(async (context2) =>
|
|
38592
|
+
await Promise.all(browsingContexts.map(async (context2) => {
|
|
38593
|
+
const config4 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38594
|
+
await Promise.all([
|
|
38595
|
+
context2.setLocaleOverride(config4.locale ?? null),
|
|
38596
|
+
context2.setUserAgentAndAcceptLanguage(config4.userAgent, config4.locale)
|
|
38597
|
+
]);
|
|
38598
|
+
}));
|
|
38574
38599
|
return {};
|
|
38575
38600
|
}
|
|
38576
38601
|
async setScriptingEnabled(params) {
|
|
@@ -38586,7 +38611,10 @@ var require_EmulationProcessor = __commonJS((exports) => {
|
|
|
38586
38611
|
scriptingEnabled
|
|
38587
38612
|
});
|
|
38588
38613
|
}
|
|
38589
|
-
await Promise.all(browsingContexts.map(async (context2) =>
|
|
38614
|
+
await Promise.all(browsingContexts.map(async (context2) => {
|
|
38615
|
+
const config4 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38616
|
+
await context2.setScriptingEnabled(config4.scriptingEnabled ?? null);
|
|
38617
|
+
}));
|
|
38590
38618
|
return {};
|
|
38591
38619
|
}
|
|
38592
38620
|
async setScreenOrientationOverride(params) {
|
|
@@ -38601,7 +38629,10 @@ var require_EmulationProcessor = __commonJS((exports) => {
|
|
|
38601
38629
|
screenOrientation: params.screenOrientation
|
|
38602
38630
|
});
|
|
38603
38631
|
}
|
|
38604
|
-
await Promise.all(browsingContexts.map(async (context2) =>
|
|
38632
|
+
await Promise.all(browsingContexts.map(async (context2) => {
|
|
38633
|
+
const config4 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38634
|
+
await context2.setViewport(config4.viewport ?? null, config4.devicePixelRatio ?? null, config4.screenOrientation ?? null);
|
|
38635
|
+
}));
|
|
38605
38636
|
return {};
|
|
38606
38637
|
}
|
|
38607
38638
|
async#getRelatedTopLevelBrowsingContexts(browsingContextIds, userContextIds, allowGlobal = false) {
|
|
@@ -38657,7 +38688,10 @@ var require_EmulationProcessor = __commonJS((exports) => {
|
|
|
38657
38688
|
timezone
|
|
38658
38689
|
});
|
|
38659
38690
|
}
|
|
38660
|
-
await Promise.all(browsingContexts.map(async (context2) =>
|
|
38691
|
+
await Promise.all(browsingContexts.map(async (context2) => {
|
|
38692
|
+
const config4 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38693
|
+
await context2.setTimezoneOverride(config4.timezone ?? null);
|
|
38694
|
+
}));
|
|
38661
38695
|
return {};
|
|
38662
38696
|
}
|
|
38663
38697
|
async setUserAgentOverrideParams(params) {
|
|
@@ -38680,7 +38714,10 @@ var require_EmulationProcessor = __commonJS((exports) => {
|
|
|
38680
38714
|
userAgent: params.userAgent
|
|
38681
38715
|
});
|
|
38682
38716
|
}
|
|
38683
|
-
await Promise.all(browsingContexts.map(async (context2) =>
|
|
38717
|
+
await Promise.all(browsingContexts.map(async (context2) => {
|
|
38718
|
+
const config4 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38719
|
+
await context2.setUserAgentAndAcceptLanguage(config4.userAgent, config4.locale);
|
|
38720
|
+
}));
|
|
38684
38721
|
return {};
|
|
38685
38722
|
}
|
|
38686
38723
|
async setNetworkConditions(params) {
|
|
@@ -38704,8 +38741,8 @@ var require_EmulationProcessor = __commonJS((exports) => {
|
|
|
38704
38741
|
throw new ErrorResponse_js_1.UnsupportedOperationException(`Unsupported network conditions ${params.networkConditions.type}`);
|
|
38705
38742
|
}
|
|
38706
38743
|
await Promise.all(browsingContexts.map(async (context2) => {
|
|
38707
|
-
const
|
|
38708
|
-
await context2.setEmulatedNetworkConditions(emulatedNetworkConditions);
|
|
38744
|
+
const config4 = this.#contextConfigStorage.getActiveConfig(context2.id, context2.userContext);
|
|
38745
|
+
await context2.setEmulatedNetworkConditions(config4.emulatedNetworkConditions ?? null);
|
|
38709
38746
|
}));
|
|
38710
38747
|
return {};
|
|
38711
38748
|
}
|
|
@@ -41326,11 +41363,7 @@ var require_NetworkProcessor = __commonJS((exports) => {
|
|
|
41326
41363
|
if (value.trim() !== value) {
|
|
41327
41364
|
throw new protocol_js_1.InvalidArgumentException(`Header value should not contain trailing or ending whitespaces`);
|
|
41328
41365
|
}
|
|
41329
|
-
|
|
41330
|
-
parsedHeaders[bidiHeader.name] = bidiHeader.value.value;
|
|
41331
|
-
} else {
|
|
41332
|
-
parsedHeaders[bidiHeader.name] = `${parsedHeaders[bidiHeader.name]}, ${bidiHeader.value.value}`;
|
|
41333
|
-
}
|
|
41366
|
+
parsedHeaders[bidiHeader.name] = bidiHeader.value.value;
|
|
41334
41367
|
} else {
|
|
41335
41368
|
throw new protocol_js_1.UnsupportedOperationException("Only string headers values are supported");
|
|
41336
41369
|
}
|
|
@@ -44357,8 +44390,8 @@ var require_BrowsingContextImpl = __commonJS((exports) => {
|
|
|
44357
44390
|
url: navigationState.url
|
|
44358
44391
|
};
|
|
44359
44392
|
}
|
|
44360
|
-
async setViewport(viewport, devicePixelRatio) {
|
|
44361
|
-
await this.cdpTarget.
|
|
44393
|
+
async setViewport(viewport, devicePixelRatio, screenOrientation) {
|
|
44394
|
+
await this.cdpTarget.setDeviceMetricsOverride(viewport, devicePixelRatio, screenOrientation);
|
|
44362
44395
|
}
|
|
44363
44396
|
async handleUserPrompt(accept, userText) {
|
|
44364
44397
|
await this.top.#cdpTarget.cdpClient.sendCommand("Page.handleJavaScriptDialog", {
|
|
@@ -44818,14 +44851,11 @@ var require_BrowsingContextImpl = __commonJS((exports) => {
|
|
|
44818
44851
|
async setGeolocationOverride(geolocation) {
|
|
44819
44852
|
await Promise.all(this.#getAllRelatedCdpTargets().map(async (cdpTarget) => await cdpTarget.setGeolocationOverride(geolocation)));
|
|
44820
44853
|
}
|
|
44821
|
-
async setScreenOrientationOverride(screenOrientation) {
|
|
44822
|
-
await this.#cdpTarget.setScreenOrientationOverride(screenOrientation);
|
|
44823
|
-
}
|
|
44824
44854
|
async setScriptingEnabled(scriptingEnabled) {
|
|
44825
44855
|
await Promise.all(this.#getAllRelatedCdpTargets().map(async (cdpTarget) => await cdpTarget.setScriptingEnabled(scriptingEnabled)));
|
|
44826
44856
|
}
|
|
44827
|
-
async
|
|
44828
|
-
await Promise.all(this.#getAllRelatedCdpTargets().map(async (cdpTarget) => await cdpTarget.
|
|
44857
|
+
async setUserAgentAndAcceptLanguage(userAgent, acceptLanguage) {
|
|
44858
|
+
await Promise.all(this.#getAllRelatedCdpTargets().map(async (cdpTarget) => await cdpTarget.setUserAgentAndAcceptLanguage(userAgent, acceptLanguage)));
|
|
44829
44859
|
}
|
|
44830
44860
|
async setEmulatedNetworkConditions(networkConditions) {
|
|
44831
44861
|
await Promise.all(this.#getAllRelatedCdpTargets().map(async (cdpTarget) => await cdpTarget.setEmulatedNetworkConditions(networkConditions)));
|
|
@@ -45963,7 +45993,7 @@ var require_NetworkRequest = __commonJS((exports) => {
|
|
|
45963
45993
|
case "Image":
|
|
45964
45994
|
return "image";
|
|
45965
45995
|
case "Document":
|
|
45966
|
-
return this.#request.info?.initiator.type === "parser" ? "iframe" : "";
|
|
45996
|
+
return this.#request.info?.initiator.type === "parser" ? "iframe" : "document";
|
|
45967
45997
|
default:
|
|
45968
45998
|
return "";
|
|
45969
45999
|
}
|
|
@@ -46408,13 +46438,6 @@ var require_CdpTarget = __commonJS((exports) => {
|
|
|
46408
46438
|
contextConfigStorage;
|
|
46409
46439
|
#unblocked = new Deferred_js_1.Deferred;
|
|
46410
46440
|
#logger;
|
|
46411
|
-
#previousDeviceMetricsOverride = {
|
|
46412
|
-
width: 0,
|
|
46413
|
-
height: 0,
|
|
46414
|
-
deviceScaleFactor: 0,
|
|
46415
|
-
mobile: false,
|
|
46416
|
-
dontSetVisibleSize: true
|
|
46417
|
-
};
|
|
46418
46441
|
#windowId;
|
|
46419
46442
|
#deviceAccessEnabled = false;
|
|
46420
46443
|
#cacheDisableState = false;
|
|
@@ -46712,44 +46735,27 @@ var require_CdpTarget = __commonJS((exports) => {
|
|
|
46712
46735
|
return script.initInTarget(this, true);
|
|
46713
46736
|
}));
|
|
46714
46737
|
}
|
|
46715
|
-
async
|
|
46716
|
-
if (viewport === null && devicePixelRatio === null) {
|
|
46738
|
+
async setDeviceMetricsOverride(viewport, devicePixelRatio, screenOrientation) {
|
|
46739
|
+
if (viewport === null && devicePixelRatio === null && screenOrientation === null) {
|
|
46717
46740
|
await this.cdpClient.sendCommand("Emulation.clearDeviceMetricsOverride");
|
|
46718
46741
|
return;
|
|
46719
46742
|
}
|
|
46720
|
-
const
|
|
46721
|
-
|
|
46722
|
-
|
|
46723
|
-
|
|
46724
|
-
|
|
46725
|
-
|
|
46726
|
-
|
|
46727
|
-
|
|
46728
|
-
if (devicePixelRatio === null) {
|
|
46729
|
-
newViewport.deviceScaleFactor = 0;
|
|
46730
|
-
} else if (devicePixelRatio !== undefined) {
|
|
46731
|
-
newViewport.deviceScaleFactor = devicePixelRatio;
|
|
46732
|
-
}
|
|
46733
|
-
try {
|
|
46734
|
-
await this.cdpClient.sendCommand("Emulation.setDeviceMetricsOverride", newViewport);
|
|
46735
|
-
this.#previousDeviceMetricsOverride = newViewport;
|
|
46736
|
-
} catch (err) {
|
|
46737
|
-
if (err.message.startsWith("Width and height values must be positive")) {
|
|
46738
|
-
throw new protocol_js_1.UnsupportedOperationException("Provided viewport dimensions are not supported");
|
|
46739
|
-
}
|
|
46740
|
-
throw err;
|
|
46741
|
-
}
|
|
46743
|
+
const metricsOverride = {
|
|
46744
|
+
width: viewport?.width ?? 0,
|
|
46745
|
+
height: viewport?.height ?? 0,
|
|
46746
|
+
deviceScaleFactor: devicePixelRatio ?? 0,
|
|
46747
|
+
screenOrientation: this.#toCdpScreenOrientationAngle(screenOrientation) ?? undefined,
|
|
46748
|
+
mobile: false
|
|
46749
|
+
};
|
|
46750
|
+
await this.cdpClient.sendCommand("Emulation.setDeviceMetricsOverride", metricsOverride);
|
|
46742
46751
|
}
|
|
46743
46752
|
async#setUserContextConfig(config4) {
|
|
46744
46753
|
const promises3 = [];
|
|
46745
46754
|
promises3.push(this.#cdpClient.sendCommand("Page.setPrerenderingAllowed", {
|
|
46746
46755
|
isAllowed: !config4.prerenderingDisabled
|
|
46747
46756
|
}).catch(() => {}));
|
|
46748
|
-
if (config4.viewport !== undefined || config4.devicePixelRatio !== undefined) {
|
|
46749
|
-
promises3.push(this.
|
|
46750
|
-
}
|
|
46751
|
-
if (config4.screenOrientation !== undefined && config4.screenOrientation !== null) {
|
|
46752
|
-
promises3.push(this.setScreenOrientationOverride(config4.screenOrientation).catch(() => {}));
|
|
46757
|
+
if (config4.viewport !== undefined || config4.devicePixelRatio !== undefined || config4.screenOrientation !== undefined) {
|
|
46758
|
+
promises3.push(this.setDeviceMetricsOverride(config4.viewport ?? null, config4.devicePixelRatio ?? null, config4.screenOrientation ?? null).catch(() => {}));
|
|
46753
46759
|
}
|
|
46754
46760
|
if (config4.geolocation !== undefined && config4.geolocation !== null) {
|
|
46755
46761
|
promises3.push(this.setGeolocationOverride(config4.geolocation));
|
|
@@ -46763,8 +46769,8 @@ var require_CdpTarget = __commonJS((exports) => {
|
|
|
46763
46769
|
if (config4.extraHeaders !== undefined) {
|
|
46764
46770
|
promises3.push(this.setExtraHeaders(config4.extraHeaders));
|
|
46765
46771
|
}
|
|
46766
|
-
if (config4.userAgent !== undefined) {
|
|
46767
|
-
promises3.push(this.
|
|
46772
|
+
if (config4.userAgent !== undefined || config4.locale !== undefined) {
|
|
46773
|
+
promises3.push(this.setUserAgentAndAcceptLanguage(config4.userAgent, config4.locale));
|
|
46768
46774
|
}
|
|
46769
46775
|
if (config4.scriptingEnabled !== undefined) {
|
|
46770
46776
|
promises3.push(this.setScriptingEnabled(config4.scriptingEnabled));
|
|
@@ -46811,17 +46817,10 @@ var require_CdpTarget = __commonJS((exports) => {
|
|
|
46811
46817
|
throw new protocol_js_1.UnknownErrorException("Unexpected geolocation coordinates value");
|
|
46812
46818
|
}
|
|
46813
46819
|
}
|
|
46814
|
-
async setScreenOrientationOverride(screenOrientation) {
|
|
46815
|
-
const newViewport = { ...this.#previousDeviceMetricsOverride };
|
|
46816
|
-
if (screenOrientation === null) {
|
|
46817
|
-
delete newViewport.screenOrientation;
|
|
46818
|
-
} else {
|
|
46819
|
-
newViewport.screenOrientation = this.#toCdpScreenOrientationAngle(screenOrientation);
|
|
46820
|
-
}
|
|
46821
|
-
await this.cdpClient.sendCommand("Emulation.setDeviceMetricsOverride", newViewport);
|
|
46822
|
-
this.#previousDeviceMetricsOverride = newViewport;
|
|
46823
|
-
}
|
|
46824
46820
|
#toCdpScreenOrientationAngle(orientation) {
|
|
46821
|
+
if (orientation === null) {
|
|
46822
|
+
return null;
|
|
46823
|
+
}
|
|
46825
46824
|
if (orientation.natural === "portrait") {
|
|
46826
46825
|
switch (orientation.type) {
|
|
46827
46826
|
case "portrait-primary":
|
|
@@ -46906,9 +46905,10 @@ var require_CdpTarget = __commonJS((exports) => {
|
|
|
46906
46905
|
headers
|
|
46907
46906
|
});
|
|
46908
46907
|
}
|
|
46909
|
-
async
|
|
46908
|
+
async setUserAgentAndAcceptLanguage(userAgent, acceptLanguage) {
|
|
46910
46909
|
await this.cdpClient.sendCommand("Emulation.setUserAgentOverride", {
|
|
46911
|
-
userAgent: userAgent ?? ""
|
|
46910
|
+
userAgent: userAgent ?? "",
|
|
46911
|
+
acceptLanguage: acceptLanguage ?? undefined
|
|
46912
46912
|
});
|
|
46913
46913
|
}
|
|
46914
46914
|
async setEmulatedNetworkConditions(networkConditions) {
|
|
@@ -49763,6 +49763,20 @@ var init_BrowsingContext = __esm(() => {
|
|
|
49763
49763
|
isJavaScriptEnabled() {
|
|
49764
49764
|
return this.#emulationState.javaScriptEnabled;
|
|
49765
49765
|
}
|
|
49766
|
+
async setUserAgent(userAgent) {
|
|
49767
|
+
await this.#session.send("emulation.setUserAgentOverride", {
|
|
49768
|
+
userAgent,
|
|
49769
|
+
contexts: [this.id]
|
|
49770
|
+
});
|
|
49771
|
+
}
|
|
49772
|
+
async setOfflineMode(enabled) {
|
|
49773
|
+
await this.#session.send("emulation.setNetworkConditions", {
|
|
49774
|
+
networkConditions: enabled ? {
|
|
49775
|
+
type: "offline"
|
|
49776
|
+
} : null,
|
|
49777
|
+
contexts: [this.id]
|
|
49778
|
+
});
|
|
49779
|
+
}
|
|
49766
49780
|
};
|
|
49767
49781
|
})();
|
|
49768
49782
|
});
|
|
@@ -50902,14 +50916,11 @@ var init_HTTPRequest2 = __esm(() => {
|
|
|
50902
50916
|
return await this.#request.fetchPostData();
|
|
50903
50917
|
}
|
|
50904
50918
|
get #hasInternalHeaderOverwrite() {
|
|
50905
|
-
return Boolean(Object.keys(this.#extraHTTPHeaders).length
|
|
50919
|
+
return Boolean(Object.keys(this.#extraHTTPHeaders).length);
|
|
50906
50920
|
}
|
|
50907
50921
|
get #extraHTTPHeaders() {
|
|
50908
50922
|
return this.#frame?.page()._extraHTTPHeaders ?? {};
|
|
50909
50923
|
}
|
|
50910
|
-
get #userAgentHeaders() {
|
|
50911
|
-
return this.#frame?.page()._userAgentHeaders ?? {};
|
|
50912
|
-
}
|
|
50913
50924
|
headers() {
|
|
50914
50925
|
const headers = {};
|
|
50915
50926
|
for (const header of this.#request.headers) {
|
|
@@ -50917,8 +50928,7 @@ var init_HTTPRequest2 = __esm(() => {
|
|
|
50917
50928
|
}
|
|
50918
50929
|
return {
|
|
50919
50930
|
...headers,
|
|
50920
|
-
...this.#extraHTTPHeaders
|
|
50921
|
-
...this.#userAgentHeaders
|
|
50931
|
+
...this.#extraHTTPHeaders
|
|
50922
50932
|
};
|
|
50923
50933
|
}
|
|
50924
50934
|
response() {
|
|
@@ -52924,9 +52934,7 @@ var init_Page2 = __esm(() => {
|
|
|
52924
52934
|
this.#workers.delete(worker);
|
|
52925
52935
|
});
|
|
52926
52936
|
}
|
|
52927
|
-
|
|
52928
|
-
#userAgentInterception;
|
|
52929
|
-
#userAgentPreloadScript;
|
|
52937
|
+
#overrideNavigatorPropertiesPreloadScript;
|
|
52930
52938
|
async setUserAgent(userAgentOrOptions, userAgentMetadata) {
|
|
52931
52939
|
let userAgent;
|
|
52932
52940
|
let metadata2;
|
|
@@ -52950,15 +52958,8 @@ var init_Page2 = __esm(() => {
|
|
|
52950
52958
|
}
|
|
52951
52959
|
const enable = userAgent !== "";
|
|
52952
52960
|
userAgent = userAgent ?? await this.#browserContext.browser().userAgent();
|
|
52953
|
-
this.
|
|
52954
|
-
|
|
52955
|
-
} : {};
|
|
52956
|
-
this.#userAgentInterception = await this.#toggleInterception(["beforeRequestSent"], this.#userAgentInterception, enable);
|
|
52957
|
-
const overrideNavigatorProperties = (userAgent2, platform3) => {
|
|
52958
|
-
Object.defineProperty(navigator, "userAgent", {
|
|
52959
|
-
value: userAgent2,
|
|
52960
|
-
configurable: true
|
|
52961
|
-
});
|
|
52961
|
+
await this.#frame.browsingContext.setUserAgent(enable ? userAgent : null);
|
|
52962
|
+
const overrideNavigatorProperties = (platform3) => {
|
|
52962
52963
|
if (platform3) {
|
|
52963
52964
|
Object.defineProperty(navigator, "platform", {
|
|
52964
52965
|
value: platform3,
|
|
@@ -52970,16 +52971,16 @@ var init_Page2 = __esm(() => {
|
|
|
52970
52971
|
for (const frame of frames) {
|
|
52971
52972
|
frames.push(...frame.childFrames());
|
|
52972
52973
|
}
|
|
52973
|
-
if (this.#
|
|
52974
|
-
await this.removeScriptToEvaluateOnNewDocument(this.#
|
|
52974
|
+
if (this.#overrideNavigatorPropertiesPreloadScript) {
|
|
52975
|
+
await this.removeScriptToEvaluateOnNewDocument(this.#overrideNavigatorPropertiesPreloadScript);
|
|
52975
52976
|
}
|
|
52976
52977
|
const [evaluateToken] = await Promise.all([
|
|
52977
|
-
enable ? this.evaluateOnNewDocument(overrideNavigatorProperties,
|
|
52978
|
+
enable ? this.evaluateOnNewDocument(overrideNavigatorProperties, platform2 || undefined) : undefined,
|
|
52978
52979
|
...frames.map((frame) => {
|
|
52979
|
-
return frame.evaluate(overrideNavigatorProperties,
|
|
52980
|
+
return frame.evaluate(overrideNavigatorProperties, platform2 || undefined);
|
|
52980
52981
|
})
|
|
52981
52982
|
]);
|
|
52982
|
-
this.#
|
|
52983
|
+
this.#overrideNavigatorPropertiesPreloadScript = evaluateToken?.identifier;
|
|
52983
52984
|
}
|
|
52984
52985
|
async setBypassCSP(enabled) {
|
|
52985
52986
|
await this._client().send("Page.setBypassCSP", { enabled });
|
|
@@ -53322,7 +53323,7 @@ var init_Page2 = __esm(() => {
|
|
|
53322
53323
|
return [...this.#workers];
|
|
53323
53324
|
}
|
|
53324
53325
|
get isNetworkInterceptionEnabled() {
|
|
53325
|
-
return Boolean(this.#requestInterception) || Boolean(this.#extraHeadersInterception) || Boolean(this.#authInterception)
|
|
53326
|
+
return Boolean(this.#requestInterception) || Boolean(this.#extraHeadersInterception) || Boolean(this.#authInterception);
|
|
53326
53327
|
}
|
|
53327
53328
|
#requestInterception;
|
|
53328
53329
|
async setRequestInterception(enable) {
|
|
@@ -53364,7 +53365,7 @@ var init_Page2 = __esm(() => {
|
|
|
53364
53365
|
}
|
|
53365
53366
|
async setOfflineMode(enabled) {
|
|
53366
53367
|
if (!this.#browserContext.browser().cdpSupported) {
|
|
53367
|
-
|
|
53368
|
+
return await this.#frame.browsingContext.setOfflineMode(enabled);
|
|
53368
53369
|
}
|
|
53369
53370
|
if (!this.#emulatedNetworkConditions) {
|
|
53370
53371
|
this.#emulatedNetworkConditions = {
|
|
@@ -53379,7 +53380,10 @@ var init_Page2 = __esm(() => {
|
|
|
53379
53380
|
}
|
|
53380
53381
|
async emulateNetworkConditions(networkConditions) {
|
|
53381
53382
|
if (!this.#browserContext.browser().cdpSupported) {
|
|
53382
|
-
|
|
53383
|
+
if (!networkConditions?.offline && ((networkConditions?.upload ?? -1) >= 0 || (networkConditions?.download ?? -1) >= 0 || (networkConditions?.latency ?? 0) > 0)) {
|
|
53384
|
+
throw new UnsupportedOperation;
|
|
53385
|
+
}
|
|
53386
|
+
return await this.#frame.browsingContext.setOfflineMode(networkConditions?.offline ?? false);
|
|
53383
53387
|
}
|
|
53384
53388
|
if (!this.#emulatedNetworkConditions) {
|
|
53385
53389
|
this.#emulatedNetworkConditions = {
|
|
@@ -90110,6 +90114,18 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
90110
90114
|
}
|
|
90111
90115
|
return String.fromCharCode((c3 - 65536 >> 10) + 55296, (c3 - 65536 & 1023) + 56320);
|
|
90112
90116
|
}
|
|
90117
|
+
function setProperty(object2, key, value) {
|
|
90118
|
+
if (key === "__proto__") {
|
|
90119
|
+
Object.defineProperty(object2, key, {
|
|
90120
|
+
configurable: true,
|
|
90121
|
+
enumerable: true,
|
|
90122
|
+
writable: true,
|
|
90123
|
+
value
|
|
90124
|
+
});
|
|
90125
|
+
} else {
|
|
90126
|
+
object2[key] = value;
|
|
90127
|
+
}
|
|
90128
|
+
}
|
|
90113
90129
|
var simpleEscapeCheck = new Array(256);
|
|
90114
90130
|
var simpleEscapeMap = new Array(256);
|
|
90115
90131
|
for (i2 = 0;i2 < 256; i2++) {
|
|
@@ -90228,7 +90244,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
90228
90244
|
for (index = 0, quantity = sourceKeys.length;index < quantity; index += 1) {
|
|
90229
90245
|
key = sourceKeys[index];
|
|
90230
90246
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
90231
|
-
destination
|
|
90247
|
+
setProperty(destination, key, source2[key]);
|
|
90232
90248
|
overridableKeys[key] = true;
|
|
90233
90249
|
}
|
|
90234
90250
|
}
|
|
@@ -90268,16 +90284,7 @@ var require_loader = __commonJS((exports, module) => {
|
|
|
90268
90284
|
state.position = startPos || state.position;
|
|
90269
90285
|
throwError(state, "duplicated mapping key");
|
|
90270
90286
|
}
|
|
90271
|
-
|
|
90272
|
-
Object.defineProperty(_result, keyNode, {
|
|
90273
|
-
configurable: true,
|
|
90274
|
-
enumerable: true,
|
|
90275
|
-
writable: true,
|
|
90276
|
-
value: valueNode
|
|
90277
|
-
});
|
|
90278
|
-
} else {
|
|
90279
|
-
_result[keyNode] = valueNode;
|
|
90280
|
-
}
|
|
90287
|
+
setProperty(_result, keyNode, valueNode);
|
|
90281
90288
|
delete overridableKeys[keyNode];
|
|
90282
90289
|
}
|
|
90283
90290
|
return _result;
|
|
@@ -263797,7 +263804,7 @@ __export(exports_js_yaml, {
|
|
|
263797
263804
|
loadAll: () => loadAll,
|
|
263798
263805
|
load: () => load3,
|
|
263799
263806
|
dump: () => dump,
|
|
263800
|
-
default: () =>
|
|
263807
|
+
default: () => jsYaml,
|
|
263801
263808
|
YAMLException: () => YAMLException,
|
|
263802
263809
|
Type: () => Type,
|
|
263803
263810
|
Schema: () => Schema,
|
|
@@ -264449,6 +264456,18 @@ function charFromCodepoint(c3) {
|
|
|
264449
264456
|
}
|
|
264450
264457
|
return String.fromCharCode((c3 - 65536 >> 10) + 55296, (c3 - 65536 & 1023) + 56320);
|
|
264451
264458
|
}
|
|
264459
|
+
function setProperty(object2, key, value) {
|
|
264460
|
+
if (key === "__proto__") {
|
|
264461
|
+
Object.defineProperty(object2, key, {
|
|
264462
|
+
configurable: true,
|
|
264463
|
+
enumerable: true,
|
|
264464
|
+
writable: true,
|
|
264465
|
+
value
|
|
264466
|
+
});
|
|
264467
|
+
} else {
|
|
264468
|
+
object2[key] = value;
|
|
264469
|
+
}
|
|
264470
|
+
}
|
|
264452
264471
|
function State$1(input3, options) {
|
|
264453
264472
|
this.input = input3;
|
|
264454
264473
|
this.filename = options["filename"] || null;
|
|
@@ -264512,7 +264531,7 @@ function mergeMappings(state, destination, source2, overridableKeys) {
|
|
|
264512
264531
|
for (index = 0, quantity = sourceKeys.length;index < quantity; index += 1) {
|
|
264513
264532
|
key = sourceKeys[index];
|
|
264514
264533
|
if (!_hasOwnProperty$1.call(destination, key)) {
|
|
264515
|
-
destination
|
|
264534
|
+
setProperty(destination, key, source2[key]);
|
|
264516
264535
|
overridableKeys[key] = true;
|
|
264517
264536
|
}
|
|
264518
264537
|
}
|
|
@@ -264552,16 +264571,7 @@ function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valu
|
|
|
264552
264571
|
state.position = startPos || state.position;
|
|
264553
264572
|
throwError(state, "duplicated mapping key");
|
|
264554
264573
|
}
|
|
264555
|
-
|
|
264556
|
-
Object.defineProperty(_result, keyNode, {
|
|
264557
|
-
configurable: true,
|
|
264558
|
-
enumerable: true,
|
|
264559
|
-
writable: true,
|
|
264560
|
-
value: valueNode
|
|
264561
|
-
});
|
|
264562
|
-
} else {
|
|
264563
|
-
_result[keyNode] = valueNode;
|
|
264564
|
-
}
|
|
264574
|
+
setProperty(_result, keyNode, valueNode);
|
|
264565
264575
|
delete overridableKeys[keyNode];
|
|
264566
264576
|
}
|
|
264567
264577
|
return _result;
|
|
@@ -266050,9 +266060,9 @@ function renamed(from2, to) {
|
|
|
266050
266060
|
};
|
|
266051
266061
|
}
|
|
266052
266062
|
var isNothing_1, isObject_1, toArray_1, repeat_1, isNegativeZero_1, extend_1, common3, exception, snippet, TYPE_CONSTRUCTOR_OPTIONS, YAML_NODE_KINDS, type, schema, str, seq, map3, failsafe, _null4, bool, int2, YAML_FLOAT_PATTERN, SCIENTIFIC_WITHOUT_DOT, float, json2, core2, YAML_DATE_REGEXP, YAML_TIMESTAMP_REGEXP, timestamp, merge3, BASE64_MAP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
266053
|
-
\r`, binary, _hasOwnProperty$3, _toString$2, omap, _toString$1, pairs, _hasOwnProperty$2, set2, _default3, _hasOwnProperty$1, CONTEXT_FLOW_IN = 1, CONTEXT_FLOW_OUT = 2, CONTEXT_BLOCK_IN = 3, CONTEXT_BLOCK_OUT = 4, CHOMPING_CLIP = 1, CHOMPING_STRIP = 2, CHOMPING_KEEP = 3, PATTERN_NON_PRINTABLE, PATTERN_NON_ASCII_LINE_BREAKS, PATTERN_FLOW_INDICATORS, PATTERN_TAG_HANDLE, PATTERN_TAG_URI, simpleEscapeCheck, simpleEscapeMap, i2, directiveHandlers, loadAll_1, load_1, loader, _toString, _hasOwnProperty, CHAR_BOM = 65279, CHAR_TAB = 9, CHAR_LINE_FEED = 10, CHAR_CARRIAGE_RETURN = 13, CHAR_SPACE = 32, CHAR_EXCLAMATION = 33, CHAR_DOUBLE_QUOTE = 34, CHAR_SHARP = 35, CHAR_PERCENT = 37, CHAR_AMPERSAND = 38, CHAR_SINGLE_QUOTE = 39, CHAR_ASTERISK = 42, CHAR_COMMA = 44, CHAR_MINUS = 45, CHAR_COLON = 58, CHAR_EQUALS = 61, CHAR_GREATER_THAN = 62, CHAR_QUESTION = 63, CHAR_COMMERCIAL_AT = 64, CHAR_LEFT_SQUARE_BRACKET = 91, CHAR_RIGHT_SQUARE_BRACKET = 93, CHAR_GRAVE_ACCENT = 96, CHAR_LEFT_CURLY_BRACKET = 123, CHAR_VERTICAL_LINE = 124, CHAR_RIGHT_CURLY_BRACKET = 125, ESCAPE_SEQUENCES, DEPRECATED_BOOLEANS_SYNTAX, DEPRECATED_BASE60_SYNTAX, QUOTING_TYPE_SINGLE = 1, QUOTING_TYPE_DOUBLE = 2, STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5, dump_1, dumper, Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load3, loadAll, dump, YAMLException, types14, safeLoad, safeLoadAll, safeDump, jsYaml
|
|
266063
|
+
\r`, binary, _hasOwnProperty$3, _toString$2, omap, _toString$1, pairs, _hasOwnProperty$2, set2, _default3, _hasOwnProperty$1, CONTEXT_FLOW_IN = 1, CONTEXT_FLOW_OUT = 2, CONTEXT_BLOCK_IN = 3, CONTEXT_BLOCK_OUT = 4, CHOMPING_CLIP = 1, CHOMPING_STRIP = 2, CHOMPING_KEEP = 3, PATTERN_NON_PRINTABLE, PATTERN_NON_ASCII_LINE_BREAKS, PATTERN_FLOW_INDICATORS, PATTERN_TAG_HANDLE, PATTERN_TAG_URI, simpleEscapeCheck, simpleEscapeMap, i2, directiveHandlers, loadAll_1, load_1, loader, _toString, _hasOwnProperty, CHAR_BOM = 65279, CHAR_TAB = 9, CHAR_LINE_FEED = 10, CHAR_CARRIAGE_RETURN = 13, CHAR_SPACE = 32, CHAR_EXCLAMATION = 33, CHAR_DOUBLE_QUOTE = 34, CHAR_SHARP = 35, CHAR_PERCENT = 37, CHAR_AMPERSAND = 38, CHAR_SINGLE_QUOTE = 39, CHAR_ASTERISK = 42, CHAR_COMMA = 44, CHAR_MINUS = 45, CHAR_COLON = 58, CHAR_EQUALS = 61, CHAR_GREATER_THAN = 62, CHAR_QUESTION = 63, CHAR_COMMERCIAL_AT = 64, CHAR_LEFT_SQUARE_BRACKET = 91, CHAR_RIGHT_SQUARE_BRACKET = 93, CHAR_GRAVE_ACCENT = 96, CHAR_LEFT_CURLY_BRACKET = 123, CHAR_VERTICAL_LINE = 124, CHAR_RIGHT_CURLY_BRACKET = 125, ESCAPE_SEQUENCES, DEPRECATED_BOOLEANS_SYNTAX, DEPRECATED_BASE60_SYNTAX, QUOTING_TYPE_SINGLE = 1, QUOTING_TYPE_DOUBLE = 2, STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5, dump_1, dumper, Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load3, loadAll, dump, YAMLException, types14, safeLoad, safeLoadAll, safeDump, jsYaml;
|
|
266054
266064
|
var init_js_yaml = __esm(() => {
|
|
266055
|
-
/*! js-yaml 4.1.
|
|
266065
|
+
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
266056
266066
|
isNothing_1 = isNothing;
|
|
266057
266067
|
isObject_1 = isObject3;
|
|
266058
266068
|
toArray_1 = toArray;
|
|
@@ -266447,7 +266457,6 @@ var init_js_yaml = __esm(() => {
|
|
|
266447
266457
|
safeLoadAll,
|
|
266448
266458
|
safeDump
|
|
266449
266459
|
};
|
|
266450
|
-
js_yaml_default = jsYaml;
|
|
266451
266460
|
});
|
|
266452
266461
|
|
|
266453
266462
|
// src/commands/scenario/src/process-manager.ts
|
|
@@ -276632,7 +276641,7 @@ function getAvailableAIModels() {
|
|
|
276632
276641
|
];
|
|
276633
276642
|
}
|
|
276634
276643
|
function hasEmbeddingSupport(aiModel) {
|
|
276635
|
-
const modelsWithEmbeddings = ["local", "openai", "google"];
|
|
276644
|
+
const modelsWithEmbeddings = ["local", "openai", "google", "openrouter"];
|
|
276636
276645
|
return modelsWithEmbeddings.includes(aiModel);
|
|
276637
276646
|
}
|
|
276638
276647
|
function getAvailableDatabases2() {
|
|
@@ -276699,6 +276708,11 @@ function getAvailableEmbeddingModels() {
|
|
|
276699
276708
|
title: "Google Generative AI",
|
|
276700
276709
|
value: "google",
|
|
276701
276710
|
description: "Google embedding models"
|
|
276711
|
+
},
|
|
276712
|
+
{
|
|
276713
|
+
title: "OpenRouter",
|
|
276714
|
+
value: "openrouter",
|
|
276715
|
+
description: "Access multiple embedding models"
|
|
276702
276716
|
}
|
|
276703
276717
|
];
|
|
276704
276718
|
}
|
|
@@ -277204,6 +277218,69 @@ async function setupEmbeddingModelConfig(embeddingModel, envFilePath, isNonInter
|
|
|
277204
277218
|
}
|
|
277205
277219
|
break;
|
|
277206
277220
|
}
|
|
277221
|
+
case "openrouter": {
|
|
277222
|
+
if (!hasValidApiKey(content, "OPENROUTER_API_KEY")) {
|
|
277223
|
+
if (isNonInteractive) {
|
|
277224
|
+
if (!content.includes("OPENROUTER_API_KEY=")) {
|
|
277225
|
+
content += `
|
|
277226
|
+
# Embedding Model Configuration (Fallback)
|
|
277227
|
+
`;
|
|
277228
|
+
content += `# OpenRouter Embeddings Configuration
|
|
277229
|
+
`;
|
|
277230
|
+
content += `OPENROUTER_API_KEY=your_openrouter_api_key_here
|
|
277231
|
+
`;
|
|
277232
|
+
content += `OPENROUTER_EMBEDDING_MODEL=openai/text-embedding-3-small
|
|
277233
|
+
`;
|
|
277234
|
+
content += `OPENROUTER_EMBEDDING_DIMENSIONS=1536
|
|
277235
|
+
`;
|
|
277236
|
+
content += `# Get your API key from: https://openrouter.ai/keys
|
|
277237
|
+
`;
|
|
277238
|
+
}
|
|
277239
|
+
await fs12.writeFile(envFilePath, content, "utf8");
|
|
277240
|
+
} else {
|
|
277241
|
+
await promptAndStoreOpenRouterKey(envFilePath);
|
|
277242
|
+
}
|
|
277243
|
+
} else {
|
|
277244
|
+
if (isNonInteractive) {
|
|
277245
|
+
content = await fs12.readFile(envFilePath, "utf8");
|
|
277246
|
+
const hasActiveEmbeddingModel = /^OPENROUTER_EMBEDDING_MODEL=.+$/m.test(content);
|
|
277247
|
+
const hasActiveEmbeddingDimensions = /^OPENROUTER_EMBEDDING_DIMENSIONS=.+$/m.test(content);
|
|
277248
|
+
if (!hasActiveEmbeddingModel) {
|
|
277249
|
+
content += `OPENROUTER_EMBEDDING_MODEL=openai/text-embedding-3-small
|
|
277250
|
+
`;
|
|
277251
|
+
}
|
|
277252
|
+
if (!hasActiveEmbeddingDimensions) {
|
|
277253
|
+
content += `OPENROUTER_EMBEDDING_DIMENSIONS=1536
|
|
277254
|
+
`;
|
|
277255
|
+
}
|
|
277256
|
+
await fs12.writeFile(envFilePath, content, "utf8");
|
|
277257
|
+
} else {
|
|
277258
|
+
content = await fs12.readFile(envFilePath, "utf8");
|
|
277259
|
+
const hasActiveEmbeddingModel = /^OPENROUTER_EMBEDDING_MODEL=.+$/m.test(content);
|
|
277260
|
+
const hasActiveEmbeddingDimensions = /^OPENROUTER_EMBEDDING_DIMENSIONS=.+$/m.test(content);
|
|
277261
|
+
if (!hasActiveEmbeddingModel) {
|
|
277262
|
+
if (content && !content.endsWith(`
|
|
277263
|
+
`)) {
|
|
277264
|
+
content += `
|
|
277265
|
+
`;
|
|
277266
|
+
}
|
|
277267
|
+
content += `OPENROUTER_EMBEDDING_MODEL=openai/text-embedding-3-small
|
|
277268
|
+
`;
|
|
277269
|
+
}
|
|
277270
|
+
if (!hasActiveEmbeddingDimensions) {
|
|
277271
|
+
if (content && !content.endsWith(`
|
|
277272
|
+
`)) {
|
|
277273
|
+
content += `
|
|
277274
|
+
`;
|
|
277275
|
+
}
|
|
277276
|
+
content += `OPENROUTER_EMBEDDING_DIMENSIONS=1536
|
|
277277
|
+
`;
|
|
277278
|
+
}
|
|
277279
|
+
await fs12.writeFile(envFilePath, content, "utf8");
|
|
277280
|
+
}
|
|
277281
|
+
}
|
|
277282
|
+
break;
|
|
277283
|
+
}
|
|
277207
277284
|
default:
|
|
277208
277285
|
console.warn(`Unknown embedding model: ${embeddingModel}, skipping configuration`);
|
|
277209
277286
|
return;
|
|
@@ -292890,7 +292967,7 @@ var ENOREALPATH = 512;
|
|
|
292890
292967
|
var ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
|
|
292891
292968
|
var TYPEMASK = 1023;
|
|
292892
292969
|
var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN;
|
|
292893
|
-
var normalizeCache = new
|
|
292970
|
+
var normalizeCache = new LRUCache({ max: 2 ** 12 });
|
|
292894
292971
|
var normalize = (s) => {
|
|
292895
292972
|
const c3 = normalizeCache.get(s);
|
|
292896
292973
|
if (c3)
|
|
@@ -292899,7 +292976,7 @@ var normalize = (s) => {
|
|
|
292899
292976
|
normalizeCache.set(s, n2);
|
|
292900
292977
|
return n2;
|
|
292901
292978
|
};
|
|
292902
|
-
var normalizeNocaseCache = new
|
|
292979
|
+
var normalizeNocaseCache = new LRUCache({ max: 2 ** 12 });
|
|
292903
292980
|
var normalizeNocase = (s) => {
|
|
292904
292981
|
const c3 = normalizeNocaseCache.get(s);
|
|
292905
292982
|
if (c3)
|
|
@@ -298968,6 +299045,21 @@ var ReportDataSchema = exports_external.object({
|
|
|
298968
299045
|
init_Browser();
|
|
298969
299046
|
init_BrowserContext();
|
|
298970
299047
|
init_CDPSession();
|
|
299048
|
+
|
|
299049
|
+
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/api/DeviceRequestPrompt.js
|
|
299050
|
+
class DeviceRequestPromptDevice {
|
|
299051
|
+
id;
|
|
299052
|
+
name;
|
|
299053
|
+
constructor(id, name) {
|
|
299054
|
+
this.id = id;
|
|
299055
|
+
this.name = name;
|
|
299056
|
+
}
|
|
299057
|
+
}
|
|
299058
|
+
|
|
299059
|
+
class DeviceRequestPrompt {
|
|
299060
|
+
}
|
|
299061
|
+
|
|
299062
|
+
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/api/api.js
|
|
298971
299063
|
init_Dialog();
|
|
298972
299064
|
init_ElementHandle();
|
|
298973
299065
|
init_Frame();
|
|
@@ -299486,16 +299578,7 @@ class CdpPreloadScript {
|
|
|
299486
299578
|
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js
|
|
299487
299579
|
init_Deferred();
|
|
299488
299580
|
|
|
299489
|
-
class
|
|
299490
|
-
id;
|
|
299491
|
-
name;
|
|
299492
|
-
constructor(id, name) {
|
|
299493
|
-
this.id = id;
|
|
299494
|
-
this.name = name;
|
|
299495
|
-
}
|
|
299496
|
-
}
|
|
299497
|
-
|
|
299498
|
-
class DeviceRequestPrompt {
|
|
299581
|
+
class CdpDeviceRequestPrompt extends DeviceRequestPrompt {
|
|
299499
299582
|
#client;
|
|
299500
299583
|
#timeoutSettings;
|
|
299501
299584
|
#id;
|
|
@@ -299504,6 +299587,7 @@ class DeviceRequestPrompt {
|
|
|
299504
299587
|
#waitForDevicePromises = new Set;
|
|
299505
299588
|
devices = [];
|
|
299506
299589
|
constructor(client, timeoutSettings, firstEvent) {
|
|
299590
|
+
super();
|
|
299507
299591
|
this.#client = client;
|
|
299508
299592
|
this.#timeoutSettings = timeoutSettings;
|
|
299509
299593
|
this.#id = firstEvent.id;
|
|
@@ -299623,7 +299707,7 @@ class DeviceRequestPromptManager {
|
|
|
299623
299707
|
return;
|
|
299624
299708
|
}
|
|
299625
299709
|
assert2(this.#client !== null);
|
|
299626
|
-
const devicePrompt = new
|
|
299710
|
+
const devicePrompt = new CdpDeviceRequestPrompt(this.#client, this.#timeoutSettings, event);
|
|
299627
299711
|
for (const promise2 of this.#deviceRequestPromptDeferreds) {
|
|
299628
299712
|
promise2.resolve(devicePrompt);
|
|
299629
299713
|
}
|
|
@@ -301152,7 +301236,10 @@ class CdpHTTPRequest extends HTTPRequest {
|
|
|
301152
301236
|
this._redirectChain = redirectChain;
|
|
301153
301237
|
this.#initiator = data.initiator;
|
|
301154
301238
|
this.interception.enabled = allowInterception;
|
|
301155
|
-
|
|
301239
|
+
this.updateHeaders(data.request.headers);
|
|
301240
|
+
}
|
|
301241
|
+
updateHeaders(headers) {
|
|
301242
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
301156
301243
|
this.#headers[key.toLowerCase()] = value;
|
|
301157
301244
|
}
|
|
301158
301245
|
}
|
|
@@ -301393,16 +301480,24 @@ class NetworkEventManager {
|
|
|
301393
301480
|
#requestWillBeSentMap = new Map;
|
|
301394
301481
|
#requestPausedMap = new Map;
|
|
301395
301482
|
#httpRequestsMap = new Map;
|
|
301483
|
+
#requestWillBeSentExtraInfoMap = new Map;
|
|
301396
301484
|
#responseReceivedExtraInfoMap = new Map;
|
|
301397
301485
|
#queuedRedirectInfoMap = new Map;
|
|
301398
301486
|
#queuedEventGroupMap = new Map;
|
|
301399
301487
|
forget(networkRequestId) {
|
|
301400
301488
|
this.#requestWillBeSentMap.delete(networkRequestId);
|
|
301401
301489
|
this.#requestPausedMap.delete(networkRequestId);
|
|
301490
|
+
this.#requestWillBeSentExtraInfoMap.delete(networkRequestId);
|
|
301402
301491
|
this.#queuedEventGroupMap.delete(networkRequestId);
|
|
301403
301492
|
this.#queuedRedirectInfoMap.delete(networkRequestId);
|
|
301404
301493
|
this.#responseReceivedExtraInfoMap.delete(networkRequestId);
|
|
301405
301494
|
}
|
|
301495
|
+
requestExtraInfo(networkRequestId) {
|
|
301496
|
+
if (!this.#requestWillBeSentExtraInfoMap.has(networkRequestId)) {
|
|
301497
|
+
this.#requestWillBeSentExtraInfoMap.set(networkRequestId, []);
|
|
301498
|
+
}
|
|
301499
|
+
return this.#requestWillBeSentExtraInfoMap.get(networkRequestId);
|
|
301500
|
+
}
|
|
301406
301501
|
responseExtraInfo(networkRequestId) {
|
|
301407
301502
|
if (!this.#responseReceivedExtraInfoMap.has(networkRequestId)) {
|
|
301408
301503
|
this.#responseReceivedExtraInfoMap.set(networkRequestId, []);
|
|
@@ -301508,6 +301603,7 @@ class NetworkManager extends EventEmitter4 {
|
|
|
301508
301603
|
["Fetch.requestPaused", this.#onRequestPaused],
|
|
301509
301604
|
["Fetch.authRequired", this.#onAuthRequired],
|
|
301510
301605
|
["Network.requestWillBeSent", this.#onRequestWillBeSent],
|
|
301606
|
+
["Network.requestWillBeSentExtraInfo", this.#onRequestWillBeSentExtraInfo],
|
|
301511
301607
|
["Network.requestServedFromCache", this.#onRequestServedFromCache],
|
|
301512
301608
|
["Network.responseReceived", this.#onResponseReceived],
|
|
301513
301609
|
["Network.loadingFinished", this.#onLoadingFinished],
|
|
@@ -301523,7 +301619,7 @@ class NetworkManager extends EventEmitter4 {
|
|
|
301523
301619
|
this.#networkEnabled = networkEnabled ?? true;
|
|
301524
301620
|
}
|
|
301525
301621
|
#canIgnoreError(error46) {
|
|
301526
|
-
return isErrorLike(error46) && (isTargetClosedError(error46) || error46.message.includes("Not supported"));
|
|
301622
|
+
return isErrorLike(error46) && (isTargetClosedError(error46) || error46.message.includes("Not supported") || error46.message.includes("wasn't found"));
|
|
301527
301623
|
}
|
|
301528
301624
|
async addClient(client) {
|
|
301529
301625
|
if (!this.#networkEnabled || this.#clients.has(client)) {
|
|
@@ -301814,15 +301910,31 @@ class NetworkManager extends EventEmitter4 {
|
|
|
301814
301910
|
if (request2) {
|
|
301815
301911
|
this.#handleRequestRedirect(client, request2, event.redirectResponse, redirectResponseExtraInfo);
|
|
301816
301912
|
redirectChain = request2._redirectChain;
|
|
301913
|
+
const extraInfo2 = this.#networkEventManager.requestExtraInfo(event.requestId).shift();
|
|
301914
|
+
if (extraInfo2) {
|
|
301915
|
+
request2.updateHeaders(extraInfo2.headers);
|
|
301916
|
+
}
|
|
301817
301917
|
}
|
|
301818
301918
|
}
|
|
301819
301919
|
const frame = event.frameId ? this.#frameManager.frame(event.frameId) : null;
|
|
301820
301920
|
const request = new CdpHTTPRequest(client, frame, fetchRequestId, this.#userRequestInterceptionEnabled, event, redirectChain);
|
|
301921
|
+
const extraInfo = this.#networkEventManager.requestExtraInfo(event.requestId).shift();
|
|
301922
|
+
if (extraInfo) {
|
|
301923
|
+
request.updateHeaders(extraInfo.headers);
|
|
301924
|
+
}
|
|
301821
301925
|
request._fromMemoryCache = fromMemoryCache;
|
|
301822
301926
|
this.#networkEventManager.storeRequest(event.requestId, request);
|
|
301823
301927
|
this.emit(NetworkManagerEvent.Request, request);
|
|
301824
301928
|
request.finalizeInterceptions();
|
|
301825
301929
|
}
|
|
301930
|
+
#onRequestWillBeSentExtraInfo(_client, event) {
|
|
301931
|
+
const request = this.#networkEventManager.getRequest(event.requestId);
|
|
301932
|
+
if (request) {
|
|
301933
|
+
request.updateHeaders(event.headers);
|
|
301934
|
+
} else {
|
|
301935
|
+
this.#networkEventManager.requestExtraInfo(event.requestId).push(event);
|
|
301936
|
+
}
|
|
301937
|
+
}
|
|
301826
301938
|
#onRequestServedFromCache(client, event) {
|
|
301827
301939
|
const requestWillBeSentEvent = this.#networkEventManager.getRequestWillBeSent(event.requestId);
|
|
301828
301940
|
let request = this.#networkEventManager.getRequest(event.requestId);
|
|
@@ -303618,14 +303730,14 @@ class CdpPage extends Page {
|
|
|
303618
303730
|
this.emit("error", new Error("Page crashed!"));
|
|
303619
303731
|
}
|
|
303620
303732
|
#onLogEntryAdded(event) {
|
|
303621
|
-
const { level, text, args, source: source2, url: url2, lineNumber } = event.entry;
|
|
303733
|
+
const { level, text, args, source: source2, url: url2, lineNumber, stackTrace } = event.entry;
|
|
303622
303734
|
if (args) {
|
|
303623
303735
|
args.map((arg) => {
|
|
303624
303736
|
releaseObject(this.#primaryTargetClient, arg);
|
|
303625
303737
|
});
|
|
303626
303738
|
}
|
|
303627
303739
|
if (source2 !== "worker") {
|
|
303628
|
-
this.emit("console", new ConsoleMessage(convertConsoleMessageLevel(level), text, [], [{ url: url2, lineNumber }]));
|
|
303740
|
+
this.emit("console", new ConsoleMessage(convertConsoleMessageLevel(level), text, [], [{ url: url2, lineNumber }], undefined, stackTrace));
|
|
303629
303741
|
}
|
|
303630
303742
|
}
|
|
303631
303743
|
mainFrame() {
|
|
@@ -303873,7 +303985,7 @@ class CdpPage extends Page {
|
|
|
303873
303985
|
});
|
|
303874
303986
|
}
|
|
303875
303987
|
}
|
|
303876
|
-
const message = new ConsoleMessage(convertConsoleMessageLevel(eventType), textTokens.join(" "), args, stackTraceLocations);
|
|
303988
|
+
const message = new ConsoleMessage(convertConsoleMessageLevel(eventType), textTokens.join(" "), args, stackTraceLocations, undefined, stackTrace);
|
|
303877
303989
|
this.emit("console", message);
|
|
303878
303990
|
}
|
|
303879
303991
|
#onDialog(event) {
|
|
@@ -306953,9 +307065,9 @@ init_WaitTask();
|
|
|
306953
307065
|
init_XPathQueryHandler();
|
|
306954
307066
|
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/revisions.js
|
|
306955
307067
|
var PUPPETEER_REVISIONS = Object.freeze({
|
|
306956
|
-
chrome: "142.0.7444.
|
|
306957
|
-
"chrome-headless-shell": "142.0.7444.
|
|
306958
|
-
firefox: "
|
|
307068
|
+
chrome: "142.0.7444.175",
|
|
307069
|
+
"chrome-headless-shell": "142.0.7444.175",
|
|
307070
|
+
firefox: "stable_145.0.1"
|
|
306959
307071
|
});
|
|
306960
307072
|
// ../../node_modules/puppeteer-core/lib/esm/puppeteer/util/util.js
|
|
306961
307073
|
init_Deferred();
|
|
@@ -310855,8 +310967,7 @@ init_build_project();
|
|
|
310855
310967
|
init_directory_detection();
|
|
310856
310968
|
init_esm();
|
|
310857
310969
|
init_user_environment();
|
|
310858
|
-
|
|
310859
|
-
import { logger as logger44 } from "@elizaos/core";
|
|
310970
|
+
import { logger as logger44, loadEnvFile } from "@elizaos/core";
|
|
310860
310971
|
import { AgentServer, loadCharacterTryPath } from "@elizaos/server";
|
|
310861
310972
|
import * as fs33 from "fs";
|
|
310862
310973
|
import * as path63 from "path";
|
|
@@ -310875,12 +310986,12 @@ var start = new Command().name("start").description("Build and start the Eliza a
|
|
|
310875
310986
|
const { envFilePath } = await userEnv.getPathInfo();
|
|
310876
310987
|
const candidateEnv = envFilePath || path63.join(process.cwd(), ".env");
|
|
310877
310988
|
if (fs33.existsSync(candidateEnv)) {
|
|
310878
|
-
|
|
310989
|
+
loadEnvFile(candidateEnv);
|
|
310879
310990
|
}
|
|
310880
310991
|
} catch {
|
|
310881
310992
|
const envPath = path63.join(process.cwd(), ".env");
|
|
310882
310993
|
if (fs33.existsSync(envPath)) {
|
|
310883
|
-
|
|
310994
|
+
loadEnvFile(envPath);
|
|
310884
310995
|
}
|
|
310885
310996
|
}
|
|
310886
310997
|
await ensureElizaOSCli();
|
|
@@ -311399,7 +311510,7 @@ async function runComponentTests(testPath, options, projectInfo) {
|
|
|
311399
311510
|
// src/commands/test/actions/e2e-tests.ts
|
|
311400
311511
|
init_utils();
|
|
311401
311512
|
import { logger as logger50 } from "@elizaos/core";
|
|
311402
|
-
var
|
|
311513
|
+
var dotenv5 = __toESM(require_main(), 1);
|
|
311403
311514
|
import { AgentServer as AgentServer2, jsonToCharacter, loadCharacterTryPath as loadCharacterTryPath2 } from "@elizaos/server";
|
|
311404
311515
|
import * as fs35 from "fs";
|
|
311405
311516
|
import path68 from "path";
|
|
@@ -311448,7 +311559,7 @@ async function runE2eTests(testPath, options, projectInfo) {
|
|
|
311448
311559
|
console.info(`Set PGLITE_DATA_DIR to: ${elizaDbDir}`);
|
|
311449
311560
|
if (fs35.existsSync(envFilePath)) {
|
|
311450
311561
|
logger50.info(`Loading environment variables from: ${envFilePath}`);
|
|
311451
|
-
|
|
311562
|
+
dotenv5.config({ path: envFilePath });
|
|
311452
311563
|
logger50.info("Environment variables loaded");
|
|
311453
311564
|
} else {
|
|
311454
311565
|
logger50.warn(`Environment file not found: ${envFilePath}`);
|
|
@@ -313358,5 +313469,5 @@ main().catch((error46) => {
|
|
|
313358
313469
|
process.exit(1);
|
|
313359
313470
|
});
|
|
313360
313471
|
|
|
313361
|
-
//# debugId=
|
|
313472
|
+
//# debugId=82DFDB431E2F10D464756E2164756E21
|
|
313362
313473
|
//# sourceMappingURL=index.js.map
|