opensteer 0.9.2 → 0.9.4
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 +158 -165
- package/dist/{chunk-HD6KVZ42.js → chunk-GEUHKPC2.js} +46 -16
- package/dist/chunk-GEUHKPC2.js.map +1 -0
- package/dist/{chunk-2TIVULZY.js → chunk-GSCQQKZZ.js} +53 -9
- package/dist/chunk-GSCQQKZZ.js.map +1 -0
- package/dist/{chunk-KPYLS2KQ.js → chunk-HQCMXRBE.js} +5 -4
- package/dist/chunk-HQCMXRBE.js.map +1 -0
- package/dist/{chunk-BMPUL66S.js → chunk-T5P2QGZ3.js} +58 -53
- package/dist/chunk-T5P2QGZ3.js.map +1 -0
- package/dist/{chunk-FIMNKEG5.js → chunk-ZRF7WMS3.js} +4 -4
- package/dist/{chunk-FIMNKEG5.js.map → chunk-ZRF7WMS3.js.map} +1 -1
- package/dist/cli/bin.cjs +160 -72
- package/dist/cli/bin.cjs.map +1 -1
- package/dist/cli/bin.js +17 -7
- package/dist/cli/bin.js.map +1 -1
- package/dist/index.cjs +149 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +4 -4
- package/dist/local-view/public/assets/app.css +219 -55
- package/dist/local-view/public/assets/app.js +58 -2
- package/dist/local-view/public/index.html +101 -26
- package/dist/local-view/serve-entry.cjs +106 -57
- package/dist/local-view/serve-entry.cjs.map +1 -1
- package/dist/local-view/serve-entry.js +2 -2
- package/dist/opensteer-PJI7VUIT.js +6 -0
- package/dist/{opensteer-MIQ43CY4.js.map → opensteer-PJI7VUIT.js.map} +1 -1
- package/dist/{session-control-IFE3IPS3.js → session-control-M3JD7ZKA.js} +4 -4
- package/dist/{session-control-IFE3IPS3.js.map → session-control-M3JD7ZKA.js.map} +1 -1
- package/package.json +5 -5
- package/skills/opensteer/SKILL.md +7 -8
- package/skills/recorder/SKILL.md +43 -48
- package/dist/chunk-2TIVULZY.js.map +0 -1
- package/dist/chunk-BMPUL66S.js.map +0 -1
- package/dist/chunk-HD6KVZ42.js.map +0 -1
- package/dist/chunk-KPYLS2KQ.js.map +0 -1
- package/dist/opensteer-MIQ43CY4.js +0 -6
- package/skills/recorder/references/recorder-reference.md +0 -71
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { filePathToUri, resolveStoragePath, encodePathSegment, ensureDirectory, pathExists, readJsonFile, writeJsonFileAtomic, normalizeTimestamp, withFilesystemLock, resolveLocalViewPreferencesPath, resolveLocalViewServiceLockDir, readLocalViewServiceState, isLocalViewServiceStateLive, clearLocalViewServiceState, getLocalViewServiceStateLiveness, clearPersistedSessionRecord, writePersistedSessionRecord, isProcessRunning, readPersistedLocalBrowserSessionRecord, buildLocalViewSessionId, selectAttachBrowserCandidate, resolveChromeExecutablePath, readDevToolsActivePort, inspectCdpEndpoint, normalizeNonEmptyString, toCanonicalJsonValue, canonicalJsonString, sha256Hex, joinStoragePath, writeBufferIfMissing, writeJsonFileExclusive, isAlreadyExistsError, readBinaryFile, listJsonFiles, expandHome, createLocalViewSessionManifest, writeLocalViewSessionManifest, deleteLocalViewSessionManifest, CURRENT_PROCESS_OWNER, getProcessLiveness, processOwnersEqual, parseProcessOwner } from './chunk-
|
|
1
|
+
import { filePathToUri, resolveStoragePath, encodePathSegment, ensureDirectory, pathExists, readJsonFile, writeJsonFileAtomic, normalizeTimestamp, withFilesystemLock, resolveLocalViewPreferencesPath, resolveLocalViewServiceLockDir, readLocalViewServiceState, isLocalViewServiceStateLive, clearLocalViewServiceState, getLocalViewServiceStateLiveness, clearPersistedSessionRecord, writePersistedSessionRecord, isProcessRunning, readPersistedLocalBrowserSessionRecord, buildLocalViewSessionId, selectAttachBrowserCandidate, resolveChromeExecutablePath, readDevToolsActivePort, inspectCdpEndpoint, normalizeNonEmptyString, toCanonicalJsonValue, canonicalJsonString, sha256Hex, joinStoragePath, writeBufferIfMissing, writeJsonFileExclusive, isAlreadyExistsError, readBinaryFile, listJsonFiles, expandHome, createLocalViewSessionManifest, writeLocalViewSessionManifest, deleteLocalViewSessionManifest, CURRENT_PROCESS_OWNER, getProcessLiveness, processOwnersEqual, parseProcessOwner } from './chunk-T5P2QGZ3.js';
|
|
2
2
|
import path7, { join, resolve, dirname, relative } from 'path';
|
|
3
3
|
import { randomBytes, randomUUID } from 'crypto';
|
|
4
4
|
import { spawn } from 'child_process';
|
|
@@ -2289,10 +2289,11 @@ async function copyRootLevelEntries(input) {
|
|
|
2289
2289
|
if (!entryStat.isDirectory()) {
|
|
2290
2290
|
continue;
|
|
2291
2291
|
}
|
|
2292
|
-
if (SKIPPED_ROOT_DIRECTORIES.has(entry)
|
|
2292
|
+
if (SKIPPED_ROOT_DIRECTORIES.has(entry)) {
|
|
2293
2293
|
continue;
|
|
2294
2294
|
}
|
|
2295
|
-
|
|
2295
|
+
const profileDirectory = isProfileDirectory(input.sourceUserDataDir, entry);
|
|
2296
|
+
if (input.copyMode === "session" && !profileDirectory) {
|
|
2296
2297
|
continue;
|
|
2297
2298
|
}
|
|
2298
2299
|
await cp(sourcePath, targetPath, {
|
|
@@ -3210,9 +3211,13 @@ var OpensteerBrowserManager = class {
|
|
|
3210
3211
|
this.workspace = normalizeWorkspace(options.workspace);
|
|
3211
3212
|
this.mode = resolveBrowserMode(this.workspace, options.browser);
|
|
3212
3213
|
this.browserOptions = isAttachBrowserOptions(options.browser) ? options.browser : void 0;
|
|
3213
|
-
this.launchOptions = options.launch;
|
|
3214
|
-
this.contextOptions = normalizeBrowserContextOptions(options.context);
|
|
3214
|
+
this.launchOptions = resolveLaunchOptions(options.launch, options.environment ?? process.env);
|
|
3215
3215
|
this.engineName = options.engineName ?? DEFAULT_OPENSTEER_ENGINE;
|
|
3216
|
+
this.contextOptions = normalizeBrowserContextOptions(
|
|
3217
|
+
options.context,
|
|
3218
|
+
options.environment ?? process.env,
|
|
3219
|
+
this.engineName
|
|
3220
|
+
);
|
|
3216
3221
|
assertSupportedEngineOptions({
|
|
3217
3222
|
engineName: this.engineName,
|
|
3218
3223
|
...options.browser === void 0 ? {} : { browser: options.browser },
|
|
@@ -3724,6 +3729,26 @@ function normalizeWorkspace(workspace) {
|
|
|
3724
3729
|
const normalized = workspace?.trim();
|
|
3725
3730
|
return normalized === void 0 || normalized.length === 0 ? void 0 : normalized;
|
|
3726
3731
|
}
|
|
3732
|
+
function resolveLaunchOptions(launch, environment) {
|
|
3733
|
+
if (launch?.executablePath !== void 0) {
|
|
3734
|
+
return launch;
|
|
3735
|
+
}
|
|
3736
|
+
const executablePath = normalizeConfiguredExecutablePath(environment.OPENSTEER_EXECUTABLE_PATH);
|
|
3737
|
+
if (executablePath === void 0) {
|
|
3738
|
+
return launch;
|
|
3739
|
+
}
|
|
3740
|
+
return {
|
|
3741
|
+
...launch ?? {},
|
|
3742
|
+
executablePath
|
|
3743
|
+
};
|
|
3744
|
+
}
|
|
3745
|
+
function normalizeConfiguredExecutablePath(value) {
|
|
3746
|
+
if (value === void 0) {
|
|
3747
|
+
return void 0;
|
|
3748
|
+
}
|
|
3749
|
+
const trimmed = value.trim();
|
|
3750
|
+
return trimmed.length === 0 ? void 0 : trimmed;
|
|
3751
|
+
}
|
|
3727
3752
|
function toPersistedLocalBrowserSessionRecord(workspace, live) {
|
|
3728
3753
|
return {
|
|
3729
3754
|
layout: "opensteer-session",
|
|
@@ -3819,7 +3844,7 @@ async function launchOwnedBrowser(input) {
|
|
|
3819
3844
|
}
|
|
3820
3845
|
function buildChromeArgs(userDataDir, launch, viewport, requestedRemoteDebuggingPort) {
|
|
3821
3846
|
const isHeadless = launch?.headless ?? true;
|
|
3822
|
-
const args = [
|
|
3847
|
+
const args = isHeadless ? [
|
|
3823
3848
|
...requestedRemoteDebuggingPort === void 0 ? ["--remote-debugging-port=0"] : [],
|
|
3824
3849
|
"--no-first-run",
|
|
3825
3850
|
"--no-default-browser-check",
|
|
@@ -3838,6 +3863,12 @@ function buildChromeArgs(userDataDir, launch, viewport, requestedRemoteDebugging
|
|
|
3838
3863
|
"--password-store=basic",
|
|
3839
3864
|
"--use-mock-keychain",
|
|
3840
3865
|
`--user-data-dir=${userDataDir}`
|
|
3866
|
+
] : [
|
|
3867
|
+
...requestedRemoteDebuggingPort === void 0 ? ["--remote-debugging-port=0"] : [],
|
|
3868
|
+
"--no-first-run",
|
|
3869
|
+
"--no-default-browser-check",
|
|
3870
|
+
"--disable-blink-features=AutomationControlled",
|
|
3871
|
+
`--user-data-dir=${userDataDir}`
|
|
3841
3872
|
];
|
|
3842
3873
|
if (isHeadless) {
|
|
3843
3874
|
args.push("--headless=new");
|
|
@@ -4061,23 +4092,36 @@ function isMissingPackageError(error, packageName) {
|
|
|
4061
4092
|
}
|
|
4062
4093
|
return error.message.includes(`Cannot find package '${packageName}'`) || error.message.includes(`Cannot find module '${packageName}'`) || error.message.includes(`Cannot find module "${packageName}"`);
|
|
4063
4094
|
}
|
|
4064
|
-
function normalizeBrowserContextOptions(context) {
|
|
4095
|
+
function normalizeBrowserContextOptions(context, environment, engineName = DEFAULT_OPENSTEER_ENGINE) {
|
|
4065
4096
|
const stealthProfile = resolveStealthProfile(context?.stealthProfile);
|
|
4066
4097
|
const locale = context?.locale ?? stealthProfile?.locale;
|
|
4067
4098
|
const timezoneId = context?.timezoneId ?? stealthProfile?.timezoneId;
|
|
4068
4099
|
const userAgent = context?.userAgent ?? stealthProfile?.userAgent;
|
|
4100
|
+
const humanize = engineName === "abp" && context?.humanize === void 0 ? void 0 : resolveHumanizeOption(context?.humanize, environment);
|
|
4069
4101
|
return {
|
|
4070
4102
|
...context ?? {},
|
|
4071
4103
|
...stealthProfile === void 0 ? {} : { stealthProfile },
|
|
4072
4104
|
...locale === void 0 ? {} : { locale },
|
|
4073
4105
|
...timezoneId === void 0 ? {} : { timezoneId },
|
|
4074
4106
|
...userAgent === void 0 ? {} : { userAgent },
|
|
4107
|
+
...humanize === void 0 ? {} : { humanize },
|
|
4075
4108
|
viewport: context?.viewport ?? stealthProfile?.viewport ?? {
|
|
4076
4109
|
width: 1440,
|
|
4077
4110
|
height: 900
|
|
4078
4111
|
}
|
|
4079
4112
|
};
|
|
4080
4113
|
}
|
|
4114
|
+
function resolveHumanizeOption(explicit, environment) {
|
|
4115
|
+
if (explicit !== void 0) {
|
|
4116
|
+
return explicit;
|
|
4117
|
+
}
|
|
4118
|
+
const envValue = environment?.OPENSTEER_HUMANIZE;
|
|
4119
|
+
if (envValue !== void 0) {
|
|
4120
|
+
const normalized = envValue.trim().toLowerCase();
|
|
4121
|
+
return normalized !== "false" && normalized !== "0";
|
|
4122
|
+
}
|
|
4123
|
+
return void 0;
|
|
4124
|
+
}
|
|
4081
4125
|
function toEngineBrowserContextOptions(context) {
|
|
4082
4126
|
const { stealthProfile: _stealthProfile, ...engineContext } = context;
|
|
4083
4127
|
return engineContext;
|
|
@@ -4099,5 +4143,5 @@ async function sleep2(ms) {
|
|
|
4099
4143
|
}
|
|
4100
4144
|
|
|
4101
4145
|
export { DEFAULT_OPENSTEER_ENGINE, OPENSTEER_ENGINE_NAMES, OPENSTEER_FILESYSTEM_WORKSPACE_LAYOUT, OPENSTEER_FILESYSTEM_WORKSPACE_VERSION, OpensteerBrowserManager, assertSupportedEngineOptions, buildLocalViewSessionUrl, createArtifactStore, createFilesystemOpensteerWorkspace, createObservationStore, ensureLocalViewServiceRunning, manifestToExternalBinaryLocation, normalizeObservabilityConfig, normalizeObservationContext, normalizeOpensteerEngineName, normalizeWorkspaceId, resolveFilesystemWorkspacePath, resolveOpensteerEngineName, setLocalViewMode, stopLocalViewService };
|
|
4102
|
-
//# sourceMappingURL=chunk-
|
|
4103
|
-
//# sourceMappingURL=chunk-
|
|
4146
|
+
//# sourceMappingURL=chunk-GSCQQKZZ.js.map
|
|
4147
|
+
//# sourceMappingURL=chunk-GSCQQKZZ.js.map
|