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.
Files changed (39) hide show
  1. package/README.md +158 -165
  2. package/dist/{chunk-HD6KVZ42.js → chunk-GEUHKPC2.js} +46 -16
  3. package/dist/chunk-GEUHKPC2.js.map +1 -0
  4. package/dist/{chunk-2TIVULZY.js → chunk-GSCQQKZZ.js} +53 -9
  5. package/dist/chunk-GSCQQKZZ.js.map +1 -0
  6. package/dist/{chunk-KPYLS2KQ.js → chunk-HQCMXRBE.js} +5 -4
  7. package/dist/chunk-HQCMXRBE.js.map +1 -0
  8. package/dist/{chunk-BMPUL66S.js → chunk-T5P2QGZ3.js} +58 -53
  9. package/dist/chunk-T5P2QGZ3.js.map +1 -0
  10. package/dist/{chunk-FIMNKEG5.js → chunk-ZRF7WMS3.js} +4 -4
  11. package/dist/{chunk-FIMNKEG5.js.map → chunk-ZRF7WMS3.js.map} +1 -1
  12. package/dist/cli/bin.cjs +160 -72
  13. package/dist/cli/bin.cjs.map +1 -1
  14. package/dist/cli/bin.js +17 -7
  15. package/dist/cli/bin.js.map +1 -1
  16. package/dist/index.cjs +149 -69
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +19 -2
  19. package/dist/index.d.ts +19 -2
  20. package/dist/index.js +4 -4
  21. package/dist/local-view/public/assets/app.css +219 -55
  22. package/dist/local-view/public/assets/app.js +58 -2
  23. package/dist/local-view/public/index.html +101 -26
  24. package/dist/local-view/serve-entry.cjs +106 -57
  25. package/dist/local-view/serve-entry.cjs.map +1 -1
  26. package/dist/local-view/serve-entry.js +2 -2
  27. package/dist/opensteer-PJI7VUIT.js +6 -0
  28. package/dist/{opensteer-MIQ43CY4.js.map → opensteer-PJI7VUIT.js.map} +1 -1
  29. package/dist/{session-control-IFE3IPS3.js → session-control-M3JD7ZKA.js} +4 -4
  30. package/dist/{session-control-IFE3IPS3.js.map → session-control-M3JD7ZKA.js.map} +1 -1
  31. package/package.json +5 -5
  32. package/skills/opensteer/SKILL.md +7 -8
  33. package/skills/recorder/SKILL.md +43 -48
  34. package/dist/chunk-2TIVULZY.js.map +0 -1
  35. package/dist/chunk-BMPUL66S.js.map +0 -1
  36. package/dist/chunk-HD6KVZ42.js.map +0 -1
  37. package/dist/chunk-KPYLS2KQ.js.map +0 -1
  38. package/dist/opensteer-MIQ43CY4.js +0 -6
  39. package/skills/recorder/references/recorder-reference.md +0 -71
package/dist/cli/bin.cjs CHANGED
@@ -398,32 +398,33 @@ var init_browser_brands = __esm({
398
398
  }
399
399
  },
400
400
  {
401
- id: "chromium",
402
- displayName: "Chromium",
401
+ id: "edge",
402
+ displayName: "Microsoft Edge",
403
403
  darwin: {
404
- executableCandidates: ["/Applications/Chromium.app/Contents/MacOS/Chromium"],
405
- userDataDir: "~/Library/Application Support/Chromium",
406
- bundleId: "org.chromium.Chromium",
407
- processNames: ["/Applications/Chromium.app/Contents/MacOS/Chromium"]
404
+ executableCandidates: ["/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"],
405
+ userDataDir: "~/Library/Application Support/Microsoft Edge",
406
+ bundleId: "com.microsoft.edgemac",
407
+ processNames: ["/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"]
408
408
  },
409
409
  win32: {
410
410
  executableCandidates: [
411
- path10.join(WINDOWS_PROGRAM_FILES, "Chromium", "Application", "chrome.exe"),
412
- path10.join(WINDOWS_PROGRAM_FILES_X86, "Chromium", "Application", "chrome.exe"),
413
- path10.join("~", "AppData", "Local", "Chromium", "Application", "chrome.exe")
411
+ path10.join(WINDOWS_PROGRAM_FILES, "Microsoft", "Edge", "Application", "msedge.exe"),
412
+ path10.join(WINDOWS_PROGRAM_FILES_X86, "Microsoft", "Edge", "Application", "msedge.exe"),
413
+ path10.join("~", "AppData", "Local", "Microsoft", "Edge", "Application", "msedge.exe")
414
414
  ],
415
- userDataDir: "~/AppData/Local/Chromium/User Data",
416
- processNames: ["/chromium/application/chrome.exe"]
415
+ userDataDir: "~/AppData/Local/Microsoft/Edge/User Data",
416
+ processNames: ["/microsoft/edge/application/msedge.exe"]
417
417
  },
418
418
  linux: {
419
419
  executableCandidates: [
420
- "/usr/bin/chromium",
421
- "/usr/bin/chromium-browser",
422
- resolveBinaryFromPath("chromium"),
423
- resolveBinaryFromPath("chromium-browser")
420
+ "/usr/bin/microsoft-edge",
421
+ "/usr/bin/microsoft-edge-stable",
422
+ "/opt/microsoft/msedge/msedge",
423
+ resolveBinaryFromPath("microsoft-edge"),
424
+ resolveBinaryFromPath("microsoft-edge-stable")
424
425
  ],
425
- userDataDir: "~/.config/chromium",
426
- processNames: ["/chromium", "/chromium-browser"]
426
+ userDataDir: "~/.config/microsoft-edge",
427
+ processNames: ["/microsoft-edge", "/microsoft-edge-stable", "/opt/microsoft/msedge/msedge"]
427
428
  }
428
429
  },
429
430
  {
@@ -460,36 +461,6 @@ var init_browser_brands = __esm({
460
461
  processNames: ["/brave-browser", "/opt/brave.com/brave/brave-browser"]
461
462
  }
462
463
  },
463
- {
464
- id: "edge",
465
- displayName: "Microsoft Edge",
466
- darwin: {
467
- executableCandidates: ["/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"],
468
- userDataDir: "~/Library/Application Support/Microsoft Edge",
469
- bundleId: "com.microsoft.edgemac",
470
- processNames: ["/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"]
471
- },
472
- win32: {
473
- executableCandidates: [
474
- path10.join(WINDOWS_PROGRAM_FILES, "Microsoft", "Edge", "Application", "msedge.exe"),
475
- path10.join(WINDOWS_PROGRAM_FILES_X86, "Microsoft", "Edge", "Application", "msedge.exe"),
476
- path10.join("~", "AppData", "Local", "Microsoft", "Edge", "Application", "msedge.exe")
477
- ],
478
- userDataDir: "~/AppData/Local/Microsoft/Edge/User Data",
479
- processNames: ["/microsoft/edge/application/msedge.exe"]
480
- },
481
- linux: {
482
- executableCandidates: [
483
- "/usr/bin/microsoft-edge",
484
- "/usr/bin/microsoft-edge-stable",
485
- "/opt/microsoft/msedge/msedge",
486
- resolveBinaryFromPath("microsoft-edge"),
487
- resolveBinaryFromPath("microsoft-edge-stable")
488
- ],
489
- userDataDir: "~/.config/microsoft-edge",
490
- processNames: ["/microsoft-edge", "/microsoft-edge-stable", "/opt/microsoft/msedge/msedge"]
491
- }
492
- },
493
464
  {
494
465
  id: "vivaldi",
495
466
  displayName: "Vivaldi",
@@ -528,6 +499,35 @@ var init_browser_brands = __esm({
528
499
  userDataDir: "~/Library/Application Support/net.imput.helium",
529
500
  processNames: ["/Applications/Helium.app/Contents/MacOS/Helium"]
530
501
  }
502
+ },
503
+ {
504
+ id: "chromium",
505
+ displayName: "Chromium",
506
+ darwin: {
507
+ executableCandidates: ["/Applications/Chromium.app/Contents/MacOS/Chromium"],
508
+ userDataDir: "~/Library/Application Support/Chromium",
509
+ bundleId: "org.chromium.Chromium",
510
+ processNames: ["/Applications/Chromium.app/Contents/MacOS/Chromium"]
511
+ },
512
+ win32: {
513
+ executableCandidates: [
514
+ path10.join(WINDOWS_PROGRAM_FILES, "Chromium", "Application", "chrome.exe"),
515
+ path10.join(WINDOWS_PROGRAM_FILES_X86, "Chromium", "Application", "chrome.exe"),
516
+ path10.join("~", "AppData", "Local", "Chromium", "Application", "chrome.exe")
517
+ ],
518
+ userDataDir: "~/AppData/Local/Chromium/User Data",
519
+ processNames: ["/chromium/application/chrome.exe"]
520
+ },
521
+ linux: {
522
+ executableCandidates: [
523
+ "/usr/bin/chromium",
524
+ "/usr/bin/chromium-browser",
525
+ resolveBinaryFromPath("chromium"),
526
+ resolveBinaryFromPath("chromium-browser")
527
+ ],
528
+ userDataDir: "~/.config/chromium",
529
+ processNames: ["/chromium", "/chromium-browser"]
530
+ }
531
531
  }
532
532
  ];
533
533
  }
@@ -546,10 +546,15 @@ function resolveChromeExecutablePath(executablePath) {
546
546
  }
547
547
  return resolvedPath;
548
548
  }
549
- for (const installation of detectLocalChromeInstallations()) {
550
- if (installation.executablePath) {
551
- return installation.executablePath;
552
- }
549
+ const chromeInstallation = detectLocalChromeInstallations().find(
550
+ (installation) => installation.brand === "chrome" && installation.executablePath !== null
551
+ );
552
+ if (chromeInstallation?.executablePath) {
553
+ return chromeInstallation.executablePath;
554
+ }
555
+ const brandedInstallation = detectInstalledBrowserBrands()[0];
556
+ if (brandedInstallation) {
557
+ return brandedInstallation.executablePath;
553
558
  }
554
559
  throw new Error(
555
560
  "Could not find a Chrome or Chromium executable. Pass browser.executablePath or --executable-path."
@@ -945,10 +950,11 @@ async function copyRootLevelEntries(input) {
945
950
  if (!entryStat.isDirectory()) {
946
951
  continue;
947
952
  }
948
- if (SKIPPED_ROOT_DIRECTORIES.has(entry) || isProfileDirectory(input.sourceUserDataDir, entry)) {
953
+ if (SKIPPED_ROOT_DIRECTORIES.has(entry)) {
949
954
  continue;
950
955
  }
951
- if (input.copyMode === "session") {
956
+ const profileDirectory = isProfileDirectory(input.sourceUserDataDir, entry);
957
+ if (input.copyMode === "session" && !profileDirectory) {
952
958
  continue;
953
959
  }
954
960
  await promises.cp(sourcePath, targetPath, {
@@ -6849,6 +6855,20 @@ var init_semantic = __esm({
6849
6855
  {
6850
6856
  title: "OpensteerStealthProfileInput"
6851
6857
  }
6858
+ ),
6859
+ humanize: oneOfSchema(
6860
+ [
6861
+ { type: "boolean" },
6862
+ objectSchema(
6863
+ {
6864
+ mouse: { type: "boolean" },
6865
+ keyboard: { type: "boolean" },
6866
+ scroll: { type: "boolean" }
6867
+ },
6868
+ { title: "OpensteerHumanizeOptions" }
6869
+ )
6870
+ ],
6871
+ { title: "OpensteerHumanize" }
6852
6872
  )
6853
6873
  },
6854
6874
  {
@@ -10483,6 +10503,26 @@ function normalizeWorkspace(workspace) {
10483
10503
  const normalized = workspace?.trim();
10484
10504
  return normalized === void 0 || normalized.length === 0 ? void 0 : normalized;
10485
10505
  }
10506
+ function resolveLaunchOptions(launch, environment) {
10507
+ if (launch?.executablePath !== void 0) {
10508
+ return launch;
10509
+ }
10510
+ const executablePath = normalizeConfiguredExecutablePath(environment.OPENSTEER_EXECUTABLE_PATH);
10511
+ if (executablePath === void 0) {
10512
+ return launch;
10513
+ }
10514
+ return {
10515
+ ...launch ?? {},
10516
+ executablePath
10517
+ };
10518
+ }
10519
+ function normalizeConfiguredExecutablePath(value) {
10520
+ if (value === void 0) {
10521
+ return void 0;
10522
+ }
10523
+ const trimmed = value.trim();
10524
+ return trimmed.length === 0 ? void 0 : trimmed;
10525
+ }
10486
10526
  function toPersistedLocalBrowserSessionRecord(workspace, live) {
10487
10527
  return {
10488
10528
  layout: "opensteer-session",
@@ -10578,7 +10618,7 @@ async function launchOwnedBrowser(input) {
10578
10618
  }
10579
10619
  function buildChromeArgs(userDataDir, launch, viewport, requestedRemoteDebuggingPort) {
10580
10620
  const isHeadless = launch?.headless ?? true;
10581
- const args = [
10621
+ const args = isHeadless ? [
10582
10622
  ...requestedRemoteDebuggingPort === void 0 ? ["--remote-debugging-port=0"] : [],
10583
10623
  "--no-first-run",
10584
10624
  "--no-default-browser-check",
@@ -10597,6 +10637,12 @@ function buildChromeArgs(userDataDir, launch, viewport, requestedRemoteDebugging
10597
10637
  "--password-store=basic",
10598
10638
  "--use-mock-keychain",
10599
10639
  `--user-data-dir=${userDataDir}`
10640
+ ] : [
10641
+ ...requestedRemoteDebuggingPort === void 0 ? ["--remote-debugging-port=0"] : [],
10642
+ "--no-first-run",
10643
+ "--no-default-browser-check",
10644
+ "--disable-blink-features=AutomationControlled",
10645
+ `--user-data-dir=${userDataDir}`
10600
10646
  ];
10601
10647
  if (isHeadless) {
10602
10648
  args.push("--headless=new");
@@ -10820,23 +10866,36 @@ function isMissingPackageError(error, packageName) {
10820
10866
  }
10821
10867
  return error.message.includes(`Cannot find package '${packageName}'`) || error.message.includes(`Cannot find module '${packageName}'`) || error.message.includes(`Cannot find module "${packageName}"`);
10822
10868
  }
10823
- function normalizeBrowserContextOptions(context) {
10869
+ function normalizeBrowserContextOptions(context, environment, engineName = DEFAULT_OPENSTEER_ENGINE) {
10824
10870
  const stealthProfile = resolveStealthProfile(context?.stealthProfile);
10825
10871
  const locale = context?.locale ?? stealthProfile?.locale;
10826
10872
  const timezoneId = context?.timezoneId ?? stealthProfile?.timezoneId;
10827
10873
  const userAgent = context?.userAgent ?? stealthProfile?.userAgent;
10874
+ const humanize = engineName === "abp" && context?.humanize === void 0 ? void 0 : resolveHumanizeOption(context?.humanize, environment);
10828
10875
  return {
10829
10876
  ...context ?? {},
10830
10877
  ...stealthProfile === void 0 ? {} : { stealthProfile },
10831
10878
  ...locale === void 0 ? {} : { locale },
10832
10879
  ...timezoneId === void 0 ? {} : { timezoneId },
10833
10880
  ...userAgent === void 0 ? {} : { userAgent },
10881
+ ...humanize === void 0 ? {} : { humanize },
10834
10882
  viewport: context?.viewport ?? stealthProfile?.viewport ?? {
10835
10883
  width: 1440,
10836
10884
  height: 900
10837
10885
  }
10838
10886
  };
10839
10887
  }
10888
+ function resolveHumanizeOption(explicit, environment) {
10889
+ if (explicit !== void 0) {
10890
+ return explicit;
10891
+ }
10892
+ const envValue = environment?.OPENSTEER_HUMANIZE;
10893
+ if (envValue !== void 0) {
10894
+ const normalized = envValue.trim().toLowerCase();
10895
+ return normalized !== "false" && normalized !== "0";
10896
+ }
10897
+ return void 0;
10898
+ }
10840
10899
  function toEngineBrowserContextOptions(context) {
10841
10900
  const { stealthProfile: _stealthProfile, ...engineContext } = context;
10842
10901
  return engineContext;
@@ -10890,9 +10949,13 @@ var init_browser_manager = __esm({
10890
10949
  this.workspace = normalizeWorkspace(options.workspace);
10891
10950
  this.mode = resolveBrowserMode(this.workspace, options.browser);
10892
10951
  this.browserOptions = isAttachBrowserOptions(options.browser) ? options.browser : void 0;
10893
- this.launchOptions = options.launch;
10894
- this.contextOptions = normalizeBrowserContextOptions(options.context);
10952
+ this.launchOptions = resolveLaunchOptions(options.launch, options.environment ?? process.env);
10895
10953
  this.engineName = options.engineName ?? DEFAULT_OPENSTEER_ENGINE;
10954
+ this.contextOptions = normalizeBrowserContextOptions(
10955
+ options.context,
10956
+ options.environment ?? process.env,
10957
+ this.engineName
10958
+ );
10896
10959
  assertSupportedEngineOptions({
10897
10960
  engineName: this.engineName,
10898
10961
  ...options.browser === void 0 ? {} : { browser: options.browser },
@@ -12157,7 +12220,7 @@ var init_package = __esm({
12157
12220
  "../runtime-core/package.json"() {
12158
12221
  package_default2 = {
12159
12222
  name: "@opensteer/runtime-core",
12160
- version: "0.2.2",
12223
+ version: "0.2.3",
12161
12224
  description: "Shared semantic runtime for Opensteer local and cloud execution.",
12162
12225
  license: "MIT",
12163
12226
  type: "module",
@@ -22629,7 +22692,7 @@ function screenshotMediaType(format2) {
22629
22692
  return "image/webp";
22630
22693
  }
22631
22694
  }
22632
- var MUTATION_CAPTURE_FINALIZE_TIMEOUT_MS, PERSISTED_NETWORK_FLUSH_TIMEOUT_MS, PENDING_OPERATION_EVENT_CAPTURE_LIMIT, PENDING_OPERATION_EVENT_CAPTURE_SKEW_MS, REPLAY_PROBE_MIN_ATTEMPT_TIMEOUT_MS, REPLAY_PROBE_MAX_ATTEMPT_TIMEOUT_MS, REPLAY_PROBE_POST_SUCCESS_ATTEMPT_TIMEOUT_MS, OpensteerSessionRuntime, DEFAULT_STATE_GLOBAL_NAMES, REPLAY_TRANSPORT_LADDER, CAPTURE_PAGE_STATE_SCRIPT, INTERACTION_RECORDER_INSTALL_SCRIPT, INTERACTION_RECORDER_READ_SCRIPT, INTERACTION_REPLAY_SCRIPT, PAGE_HTTP_REQUEST_SCRIPT;
22695
+ var MUTATION_CAPTURE_FINALIZE_TIMEOUT_MS, PERSISTED_NETWORK_FLUSH_TIMEOUT_MS, PERSISTED_NETWORK_SETTLE_POLL_MS, PENDING_OPERATION_EVENT_CAPTURE_LIMIT, PENDING_OPERATION_EVENT_CAPTURE_SKEW_MS, REPLAY_PROBE_MIN_ATTEMPT_TIMEOUT_MS, REPLAY_PROBE_MAX_ATTEMPT_TIMEOUT_MS, REPLAY_PROBE_POST_SUCCESS_ATTEMPT_TIMEOUT_MS, OpensteerSessionRuntime, DEFAULT_STATE_GLOBAL_NAMES, REPLAY_TRANSPORT_LADDER, CAPTURE_PAGE_STATE_SCRIPT, INTERACTION_RECORDER_INSTALL_SCRIPT, INTERACTION_RECORDER_READ_SCRIPT, INTERACTION_REPLAY_SCRIPT, PAGE_HTTP_REQUEST_SCRIPT;
22633
22696
  var init_runtime3 = __esm({
22634
22697
  "../runtime-core/src/sdk/runtime.ts"() {
22635
22698
  init_src();
@@ -22663,6 +22726,7 @@ var init_runtime3 = __esm({
22663
22726
  init_diff();
22664
22727
  MUTATION_CAPTURE_FINALIZE_TIMEOUT_MS = 5e3;
22665
22728
  PERSISTED_NETWORK_FLUSH_TIMEOUT_MS = 5e3;
22729
+ PERSISTED_NETWORK_SETTLE_POLL_MS = 25;
22666
22730
  PENDING_OPERATION_EVENT_CAPTURE_LIMIT = 64;
22667
22731
  PENDING_OPERATION_EVENT_CAPTURE_SKEW_MS = 1e3;
22668
22732
  REPLAY_PROBE_MIN_ATTEMPT_TIMEOUT_MS = 3e3;
@@ -25437,15 +25501,22 @@ var init_runtime3 = __esm({
25437
25501
  return [];
25438
25502
  }
25439
25503
  const root = await this.ensureRoot();
25440
- const browserRecords = await this.readBrowserNetworkRecords(
25441
- {
25442
- includeBodies: true,
25443
- includeCurrentPageOnly: options.includeCurrentPageOnly,
25444
- ...options.pageRef === void 0 ? {} : { pageRef: options.pageRef },
25445
- requestIds
25446
- },
25447
- signal
25448
- );
25504
+ let browserRecords = [];
25505
+ for (; ; ) {
25506
+ browserRecords = await this.readBrowserNetworkRecords(
25507
+ {
25508
+ includeBodies: true,
25509
+ includeCurrentPageOnly: options.includeCurrentPageOnly,
25510
+ ...options.pageRef === void 0 ? {} : { pageRef: options.pageRef },
25511
+ requestIds
25512
+ },
25513
+ signal
25514
+ );
25515
+ if (browserRecords.length === requestIds.length && browserRecords.every((record) => record.captureState !== "pending")) {
25516
+ break;
25517
+ }
25518
+ await delayWithSignal(PERSISTED_NETWORK_SETTLE_POLL_MS, signal);
25519
+ }
25449
25520
  return this.networkHistory.persist(browserRecords, root.registry.savedNetwork, {
25450
25521
  bodyWriteMode: "authoritative",
25451
25522
  redactSecretHeaders: false
@@ -29543,9 +29614,11 @@ var init_session_proxy = __esm({
29543
29614
  function buildSharedRuntimeOptions(input) {
29544
29615
  const ownership = resolveOwnership(input.browser);
29545
29616
  const engineFactory = input.engineFactory ?? ((factoryOptions) => new OpensteerBrowserManager({
29617
+ ...input.rootDir === void 0 ? {} : { rootDir: input.rootDir },
29546
29618
  rootPath: input.rootPath,
29547
29619
  ...input.workspaceName === void 0 ? {} : { workspace: input.workspaceName },
29548
29620
  engineName: input.engineName,
29621
+ ...input.environment === void 0 ? {} : { environment: input.environment },
29549
29622
  ...(factoryOptions.browser ?? input.browser) === void 0 ? {} : { browser: factoryOptions.browser ?? input.browser },
29550
29623
  ...(factoryOptions.launch ?? input.launch) === void 0 ? {} : { launch: factoryOptions.launch ?? input.launch },
29551
29624
  ...(factoryOptions.context ?? input.context) === void 0 ? {} : { context: factoryOptions.context ?? input.context }
@@ -29608,8 +29681,10 @@ var init_runtime4 = __esm({
29608
29681
  super(
29609
29682
  buildSharedRuntimeOptions({
29610
29683
  name: publicWorkspace ?? "default",
29684
+ ...options.rootDir === void 0 ? {} : { rootDir: options.rootDir },
29611
29685
  rootPath,
29612
29686
  ...publicWorkspace === void 0 ? {} : { workspaceName: publicWorkspace },
29687
+ ...options.environment === void 0 ? {} : { environment: options.environment },
29613
29688
  ...options.browser === void 0 ? {} : { browser: options.browser },
29614
29689
  ...options.launch === void 0 ? {} : { launch: options.launch },
29615
29690
  ...options.context === void 0 ? {} : { context: options.context },
@@ -29651,9 +29726,10 @@ function resolveOpensteerRuntimeConfig(input = {}) {
29651
29726
  function createOpensteerSemanticRuntime(input = {}) {
29652
29727
  const runtimeOptions = input.runtimeOptions ?? {};
29653
29728
  const engine = input.engine ?? runtimeOptions.engineName ?? DEFAULT_OPENSTEER_ENGINE;
29729
+ const environment = input.environment ?? process.env;
29654
29730
  const config = resolveOpensteerRuntimeConfig({
29655
29731
  ...input.provider === void 0 ? {} : { provider: input.provider },
29656
- ...input.environment === void 0 ? {} : { environment: input.environment }
29732
+ environment
29657
29733
  });
29658
29734
  assertProviderSupportsEngine(config.provider.mode, engine);
29659
29735
  if (config.provider.mode === "cloud") {
@@ -29668,7 +29744,8 @@ function createOpensteerSemanticRuntime(input = {}) {
29668
29744
  }
29669
29745
  return new OpensteerRuntime({
29670
29746
  ...runtimeOptions,
29671
- engineName: engine
29747
+ engineName: engine,
29748
+ environment
29672
29749
  });
29673
29750
  }
29674
29751
  var init_runtime_resolution = __esm({
@@ -29993,6 +30070,7 @@ var init_opensteer = __esm({
29993
30070
  ...runtimeOptions.rootPath === void 0 ? {} : { rootPath: runtimeOptions.rootPath },
29994
30071
  ...runtimeOptions.workspace === void 0 ? {} : { workspace: runtimeOptions.workspace },
29995
30072
  ...engineName === void 0 ? {} : { engineName },
30073
+ environment,
29996
30074
  ...runtimeOptions.browser === void 0 ? {} : { browser: runtimeOptions.browser },
29997
30075
  ...runtimeOptions.launch === void 0 ? {} : { launch: runtimeOptions.launch },
29998
30076
  ...runtimeOptions.context === void 0 ? {} : { context: runtimeOptions.context }
@@ -30177,7 +30255,7 @@ var init_opensteer = __esm({
30177
30255
 
30178
30256
  // package.json
30179
30257
  var package_default = {
30180
- version: "0.9.2"};
30258
+ version: "0.9.4"};
30181
30259
 
30182
30260
  // src/cli/bin.ts
30183
30261
  init_browser_manager();
@@ -34177,7 +34255,7 @@ async function runLocalViewService() {
34177
34255
  init_service();
34178
34256
  init_session_manifest();
34179
34257
  init_root2();
34180
- async function handleViewCommand(parsed) {
34258
+ async function handleViewCommand(parsed, options = {}) {
34181
34259
  const subcommand = parsed.command[1];
34182
34260
  if (subcommand === "serve") {
34183
34261
  assertNoViewPreferenceFlag(parsed);
@@ -34211,6 +34289,16 @@ async function handleViewCommand(parsed) {
34211
34289
  url,
34212
34290
  ...sessionId === void 0 ? {} : { sessionId }
34213
34291
  });
34292
+ if (parsed.options.json !== true) {
34293
+ try {
34294
+ await (options.openUrl ?? openBrowserUrl)(url);
34295
+ } catch {
34296
+ process.stderr.write(
34297
+ `Could not automatically open the local view. Open it manually: ${url}
34298
+ `
34299
+ );
34300
+ }
34301
+ }
34214
34302
  }
34215
34303
  async function resolveWorkspaceSessionId(input) {
34216
34304
  const rootPath = resolveFilesystemWorkspacePath({