@opencode/browse 0.0.17-dev.155 → 0.0.17-dev.157

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  opencodeBrowserVersion2,
3
3
  opencodeBrowserBuildId2
4
- } from "./main-n77bcfj8.mjs";
4
+ } from "./main-4pt08reg.mjs";
5
5
  import {
6
6
  defaultRoots,
7
7
  configRoot2,
@@ -25,7 +25,7 @@ import {
25
25
  setStoredMode,
26
26
  autoUpdateStatus,
27
27
  createAutoUpdater
28
- } from "./main-a6x41zxr.mjs";
28
+ } from "./main-s8p6mgme.mjs";
29
29
  import {
30
30
  extensionProtocolVersion,
31
31
  minExtensionProtocolVersion,
@@ -101,8 +101,10 @@ import {
101
101
  getTargetInfo2,
102
102
  isRestrictedTarget2,
103
103
  isRestrictedUrl2,
104
- dataUrlDocument2
105
- } from "./main-aqdqrj4m.mjs";
104
+ dataUrlDocument2,
105
+ appendManagedRelayProcessLog,
106
+ relayLog
107
+ } from "./main-ttge8j3c.mjs";
106
108
  import {
107
109
  context,
108
110
  pendingPairingCodeKeys,
@@ -120,7 +122,7 @@ import {
120
122
  pairingSessionKey,
121
123
  sessionProof,
122
124
  wrapToken
123
- } from "./main-kx4ygn02.mjs";
125
+ } from "./main-yy5d2qyc.mjs";
124
126
  import {
125
127
  makeUnsafe,
126
128
  terminateChildProcess,
@@ -143,16 +145,16 @@ import {
143
145
  checkNavigationUrl,
144
146
  readSecret,
145
147
  secretText
146
- } from "./main-p31nga7a.mjs";
148
+ } from "./main-jqerqpen.mjs";
147
149
  import {
148
150
  defaultJournalBaseDir,
149
151
  makeJournalEntry,
150
152
  appendJournalEntry,
151
153
  startJournalRetention
152
- } from "./main-jtejbhfg.mjs";
154
+ } from "./main-w5xdsghz.mjs";
153
155
  import {
154
156
  createUpdateWatcher2
155
- } from "./main-ppp9k1gv.mjs";
157
+ } from "./main-5d6tc78f.mjs";
156
158
  import {
157
159
  SettingsInputError,
158
160
  parseSettingChanges,
@@ -160,13 +162,13 @@ import {
160
162
  settingsToExtension,
161
163
  describeSettings,
162
164
  describeChanges
163
- } from "./main-eqpe2r3r.mjs";
165
+ } from "./main-nf1jjqr6.mjs";
164
166
  import {
165
167
  relayHostname,
166
168
  isLocalPeer,
167
169
  installedDevExtension,
168
170
  syncDevExtension
169
- } from "./main-qssg13bm.mjs";
171
+ } from "./main-4gph14fn.mjs";
170
172
  import {
171
173
  legacyRoots
172
174
  } from "./main-ckssvk4c.mjs";
@@ -187,7 +189,7 @@ import {
187
189
  relayToken,
188
190
  secretsEqual,
189
191
  ensurePrivateDirectory
190
- } from "./main-5hhgehca.mjs";
192
+ } from "./main-2be5p7he.mjs";
191
193
  import {
192
194
  taggedEnum,
193
195
  is2,
@@ -301,7 +303,7 @@ import {
301
303
 
302
304
  // src/relay.ts
303
305
  import crypto10 from "node:crypto";
304
- import path15 from "node:path";
306
+ import path14 from "node:path";
305
307
 
306
308
  // src/relay/browser-links.ts
307
309
  import dns from "node:dns/promises";
@@ -10838,33 +10840,6 @@ class Recorder {
10838
10840
  }
10839
10841
  }
10840
10842
 
10841
- // src/relay/log.ts
10842
- import fs8 from "node:fs";
10843
- import os5 from "node:os";
10844
- import path8 from "node:path";
10845
- var maxLogBytes = 1e6;
10846
- var maxEntryCharacters = 64000;
10847
- function managedRelayLogPath(home = os5.homedir()) {
10848
- return path8.join(stateRoot(home), "logs", "relay.log");
10849
- }
10850
- function appendManagedRelayProcessLog(message, home = os5.homedir()) {
10851
- try {
10852
- const logPath = managedRelayLogPath(home);
10853
- ensurePrivateDirectorySync(path8.dirname(logPath));
10854
- const entry = `${new Date().toISOString()} ${message.slice(0, maxEntryCharacters)}
10855
- `;
10856
- const stat = fs8.statSync(logPath, { throwIfNoEntry: false });
10857
- if (stat && stat.size + Buffer.byteLength(entry) > maxLogBytes)
10858
- fs8.renameSync(logPath, `${logPath}.1`);
10859
- fs8.appendFileSync(logPath, entry, { encoding: "utf8", mode: 384 });
10860
- fs8.chmodSync(logPath, 384);
10861
- } catch {}
10862
- }
10863
- function relayLog(event, fields = {}) {
10864
- const detail = Object.entries(fields).filter(([, value]) => value !== undefined).map(([key, value]) => `${key}=${typeof value === "string" && !/\s/.test(value) ? value : JSON.stringify(value)}`).join(" ");
10865
- appendManagedRelayProcessLog(detail ? `${event} ${detail}` : event);
10866
- }
10867
-
10868
10843
  // src/execute/patchright-tuning.ts
10869
10844
  function tunePatchright({ server }) {
10870
10845
  const page = server?.Page?.prototype;
@@ -11331,15 +11306,15 @@ class ExecuteSandbox extends DefaultPageHost {
11331
11306
  }
11332
11307
 
11333
11308
  // src/recording-relay/flight-recorder.ts
11334
- import fs10 from "node:fs/promises";
11335
- import path10 from "node:path";
11309
+ import fs9 from "node:fs/promises";
11310
+ import path9 from "node:path";
11336
11311
  import { performance as performance3 } from "node:perf_hooks";
11337
11312
 
11338
11313
  // src/recording-relay/ffmpeg-encoder.ts
11339
11314
  import { execFile, spawn } from "node:child_process";
11340
11315
  import crypto6 from "node:crypto";
11341
11316
  import { once } from "node:events";
11342
- import fs9 from "node:fs/promises";
11317
+ import fs8 from "node:fs/promises";
11343
11318
 
11344
11319
  // src/recording-relay/mjpeg-matroska.ts
11345
11320
  var ebml = Buffer.from("1A45DFA3", "hex");
@@ -11456,7 +11431,7 @@ function mjpegMatroskaFrame(timestampMs, durationMs, frameLength) {
11456
11431
  import { performance as performance2 } from "node:perf_hooks";
11457
11432
 
11458
11433
  // src/recording-relay/types.ts
11459
- import path9 from "node:path";
11434
+ import path8 from "node:path";
11460
11435
  var defaultMaxDurationMs = 15 * 60 * 1000;
11461
11436
  var defaultCdpFrameRate = 60;
11462
11437
  var maxRecordingFrameRate = 60;
@@ -11552,7 +11527,7 @@ function findByRecordingTarget(map, target, ambiguousMessage) {
11552
11527
  return map.values().next().value;
11553
11528
  }
11554
11529
  function cdpArtifactType(outputPath) {
11555
- const extension = path9.extname(outputPath).toLowerCase();
11530
+ const extension = path8.extname(outputPath).toLowerCase();
11556
11531
  if (extension === ".webm")
11557
11532
  return "webm";
11558
11533
  if (extension === ".mp4")
@@ -11751,7 +11726,7 @@ async function createFfmpegVideoEncoder(options) {
11751
11726
  await writeStreamChunk(child.stdin, mjpegMatroskaHeader(options.width, options.height));
11752
11727
  } catch (error) {
11753
11728
  await exit;
11754
- await fs9.rm(temporaryOutputPath, { force: true });
11729
+ await fs8.rm(temporaryOutputPath, { force: true });
11755
11730
  throw error;
11756
11731
  }
11757
11732
  let completed = false;
@@ -11795,10 +11770,10 @@ async function createFfmpegVideoEncoder(options) {
11795
11770
  throw error;
11796
11771
  if (inputError)
11797
11772
  throw inputError;
11798
- await fs9.rename(temporaryOutputPath, options.outputPath);
11773
+ await fs8.rename(temporaryOutputPath, options.outputPath);
11799
11774
  completed = true;
11800
11775
  })().catch(async (error) => {
11801
- await fs9.rm(temporaryOutputPath, { force: true });
11776
+ await fs8.rm(temporaryOutputPath, { force: true });
11802
11777
  throw error;
11803
11778
  });
11804
11779
  return finishingPromise;
@@ -11810,7 +11785,7 @@ async function createFfmpegVideoEncoder(options) {
11810
11785
  return cancelPromise;
11811
11786
  cancelPromise = (async () => {
11812
11787
  await terminate();
11813
- await fs9.rm(temporaryOutputPath, { force: true });
11788
+ await fs8.rm(temporaryOutputPath, { force: true });
11814
11789
  })();
11815
11790
  return cancelPromise;
11816
11791
  }
@@ -11974,7 +11949,7 @@ class FlightRecorderRelay {
11974
11949
  const startAt = frames[0].receivedAt;
11975
11950
  const endAt = frames.at(-1).receivedAt;
11976
11951
  const durationMs = Math.max(1, endAt - startAt);
11977
- await fs10.mkdir(path10.dirname(target.outputPath), { recursive: true });
11952
+ await fs9.mkdir(path9.dirname(target.outputPath), { recursive: true });
11978
11953
  let encoder;
11979
11954
  try {
11980
11955
  encoder = await (this.options.startVideoEncoder ?? startFfmpegVideoEncoder)({
@@ -11998,7 +11973,7 @@ class FlightRecorderRelay {
11998
11973
  sourceFrameCount: recorder.sourceFrameCount,
11999
11974
  droppedFrameCount: recorder.droppedFrameCount
12000
11975
  };
12001
- await fs10.writeFile(`${target.outputPath}.json`, `${JSON.stringify({ ...receipt, savedAt: new Date(this.now()).toISOString(), retainedDurationMs: this.retainedDuration(recorder) }, null, 2)}
11976
+ await fs9.writeFile(`${target.outputPath}.json`, `${JSON.stringify({ ...receipt, savedAt: new Date(this.now()).toISOString(), retainedDurationMs: this.retainedDuration(recorder) }, null, 2)}
12002
11977
  `, "utf8");
12003
11978
  return receipt;
12004
11979
  } catch (error) {
@@ -12099,7 +12074,7 @@ class FlightRecorderRelay {
12099
12074
  }
12100
12075
  async function assertOutputAvailable(filePath) {
12101
12076
  try {
12102
- await fs10.stat(filePath);
12077
+ await fs9.stat(filePath);
12103
12078
  } catch (error) {
12104
12079
  if (error instanceof Error && "code" in error && error.code === "ENOENT")
12105
12080
  return;
@@ -12292,8 +12267,8 @@ function resolveExactHandoffTarget(options) {
12292
12267
  }
12293
12268
 
12294
12269
  // src/relay/lifecycle-log.ts
12295
- import fs11 from "node:fs";
12296
- import path11 from "node:path";
12270
+ import fs10 from "node:fs";
12271
+ import path10 from "node:path";
12297
12272
  var requestFields = {
12298
12273
  instanceId: RelayShutdownRequest.fields.instanceId,
12299
12274
  requestId: RelayShutdownRequest.fields.requestId,
@@ -12311,30 +12286,30 @@ var RelayLifecycleEvent = TaggedUnion({
12311
12286
  }
12312
12287
  });
12313
12288
  function appendRelayLifecycleEvent(filePath, event) {
12314
- const directory = path11.dirname(filePath);
12289
+ const directory = path10.dirname(filePath);
12315
12290
  ensurePrivateDirectorySync(directory);
12316
12291
  const entry = `${JSON.stringify({ ...encodeSync(RelayLifecycleEvent)(event), timestamp: new Date().toISOString() })}
12317
12292
  `;
12318
- const file = fs11.openSync(filePath, "a+", 384);
12293
+ const file = fs10.openSync(filePath, "a+", 384);
12319
12294
  try {
12320
- fs11.fchmodSync(file, 384);
12321
- if (fs11.fstatSync(file).size + Buffer.byteLength(entry) > 256000)
12322
- fs11.ftruncateSync(file, 0);
12323
- fs11.writeFileSync(file, entry);
12324
- fs11.fsyncSync(file);
12295
+ fs10.fchmodSync(file, 384);
12296
+ if (fs10.fstatSync(file).size + Buffer.byteLength(entry) > 256000)
12297
+ fs10.ftruncateSync(file, 0);
12298
+ fs10.writeFileSync(file, entry);
12299
+ fs10.fsyncSync(file);
12325
12300
  } finally {
12326
- fs11.closeSync(file);
12301
+ fs10.closeSync(file);
12327
12302
  }
12328
- const parent = fs11.openSync(directory, "r");
12303
+ const parent = fs10.openSync(directory, "r");
12329
12304
  try {
12330
12305
  try {
12331
- fs11.fsyncSync(parent);
12306
+ fs10.fsyncSync(parent);
12332
12307
  } catch (error) {
12333
12308
  if (!isUnsupportedDirectorySyncError(error))
12334
12309
  throw error;
12335
12310
  }
12336
12311
  } finally {
12337
- fs11.closeSync(parent);
12312
+ fs10.closeSync(parent);
12338
12313
  }
12339
12314
  }
12340
12315
 
@@ -13754,8 +13729,8 @@ function sendNotFound(response) {
13754
13729
 
13755
13730
  // src/recording-relay.ts
13756
13731
  import crypto7 from "node:crypto";
13757
- import fs13 from "node:fs/promises";
13758
- import path13 from "node:path";
13732
+ import fs12 from "node:fs/promises";
13733
+ import path12 from "node:path";
13759
13734
  import { performance as performance4 } from "node:perf_hooks";
13760
13735
 
13761
13736
  // src/recording-relay/protocol.ts
@@ -13823,8 +13798,8 @@ function validateUint32(value, field, positive) {
13823
13798
  }
13824
13799
 
13825
13800
  // src/recording-relay/cdp-capture.ts
13826
- import fs12 from "node:fs/promises";
13827
- import path12 from "node:path";
13801
+ import fs11 from "node:fs/promises";
13802
+ import path11 from "node:path";
13828
13803
  function handleCdpScreencastFrame(context, recording, options) {
13829
13804
  const frame = parseScreencastFrame(options.params);
13830
13805
  acknowledgeScreencastFrame({
@@ -13889,7 +13864,7 @@ async function startCdpRecording(context, options, starting) {
13889
13864
  if (!artifactType) {
13890
13865
  return { success: false, error: "CDP recording output path must end in .webm or .mp4" };
13891
13866
  }
13892
- await fs12.mkdir(path12.dirname(options.outputPath), { recursive: true });
13867
+ await fs11.mkdir(path11.dirname(options.outputPath), { recursive: true });
13893
13868
  if (starting.cancelled)
13894
13869
  return cancelledResult();
13895
13870
  const frameRate = options.frameRate ?? defaultCdpFrameRate;
@@ -14028,7 +14003,7 @@ async function finishCdpRecording(context, recording) {
14028
14003
  await writeSourceFrame(recording, recording.lastFrame, endFrameNumber);
14029
14004
  recording.frameCount = endFrameNumber;
14030
14005
  await recording.encoder.finish();
14031
- const stat = await fs12.stat(recording.outputPath);
14006
+ const stat = await fs11.stat(recording.outputPath);
14032
14007
  const quality = recordingQuality(recording, durationMs);
14033
14008
  const metadata = {
14034
14009
  mode: "cdp",
@@ -14042,7 +14017,7 @@ async function finishCdpRecording(context, recording) {
14042
14017
  ...quality,
14043
14018
  mimeType: recording.artifactType === "mp4" ? "video/mp4" : "video/webm"
14044
14019
  };
14045
- await fs12.writeFile(`${recording.outputPath}.json`, `${JSON.stringify(metadata, null, 2)}
14020
+ await fs11.writeFile(`${recording.outputPath}.json`, `${JSON.stringify(metadata, null, 2)}
14046
14021
  `, "utf8");
14047
14022
  return {
14048
14023
  success: true,
@@ -14405,7 +14380,7 @@ class RecordingRelay {
14405
14380
  throw new Error("No tab capture data was received");
14406
14381
  await recording.file.sync();
14407
14382
  await recording.file.close();
14408
- await fs13.rename(recording.temporaryPath, recording.outputPath);
14383
+ await fs12.rename(recording.temporaryPath, recording.outputPath);
14409
14384
  recording.finalized = true;
14410
14385
  recording.resolveStop?.({
14411
14386
  success: true,
@@ -14451,7 +14426,7 @@ class RecordingRelay {
14451
14426
  await recording.writePromise.catch(() => {});
14452
14427
  await recording.file.close().catch(() => {});
14453
14428
  if (!recording.finalized)
14454
- await fs13.rm(recording.temporaryPath, { force: true }).catch(() => {});
14429
+ await fs12.rm(recording.temporaryPath, { force: true }).catch(() => {});
14455
14430
  if (this.activeRecordings.get(recording.tabId) === recording) {
14456
14431
  this.activeRecordings.delete(recording.tabId);
14457
14432
  this.recordingChanged(recording.tabId);
@@ -14475,11 +14450,11 @@ class RecordingRelay {
14475
14450
  if (cdpArtifactType(options.outputPath) !== "webm") {
14476
14451
  return { success: false, error: "tabCapture recording output path must end in .webm; use --mode cdp for MP4" };
14477
14452
  }
14478
- await fs13.mkdir(path13.dirname(options.outputPath), { recursive: true });
14453
+ await fs12.mkdir(path12.dirname(options.outputPath), { recursive: true });
14479
14454
  if (starting.cancelled)
14480
14455
  return { success: false, error: "Recording was cancelled while starting" };
14481
14456
  const temporaryPath = `${options.outputPath}.partial-${process.pid}-${crypto7.randomUUID()}`;
14482
- const file = await fs13.open(temporaryPath, "wx", 384);
14457
+ const file = await fs12.open(temporaryPath, "wx", 384);
14483
14458
  const recording = {
14484
14459
  tabId: options.tabId,
14485
14460
  ...options.sessionId ? { sessionId: options.sessionId } : {},
@@ -16803,7 +16778,7 @@ function createExtensionEventHandler(options) {
16803
16778
 
16804
16779
  // src/relay/extension-handshake.ts
16805
16780
  import crypto8 from "node:crypto";
16806
- import fs14 from "node:fs";
16781
+ import fs13 from "node:fs";
16807
16782
  import { WebSocket as WebSocket3 } from "ws";
16808
16783
  var maxPreAuthMessageBytes = 64 * 1024;
16809
16784
  var preAuthHandshakeTimeoutMs = 1e4;
@@ -16825,7 +16800,7 @@ class ExtensionHandshake {
16825
16800
  this.options = options;
16826
16801
  }
16827
16802
  rejectedProtocol() {
16828
- return this.mismatch ?? (fs14.existsSync(oldStoreMarker()) ? extensionProtocolCompatibility(2) : undefined);
16803
+ return this.mismatch ?? (fs13.existsSync(oldStoreMarker()) ? extensionProtocolCompatibility(2) : undefined);
16829
16804
  }
16830
16805
  mismatchAdvice(version) {
16831
16806
  return extensionProtocolAdvice(version, { install: installCommand() }, !this.mismatch || this.mismatch.origin === `chrome-extension://${this.options.storeId}` ? "store" : this.mismatch.origin === stableUnpackedExtensionOrigin2 ? "unpacked" : undefined);
@@ -16980,8 +16955,8 @@ class ExtensionHandshake {
16980
16955
  return;
16981
16956
  }
16982
16957
  this.mismatch = undefined;
16983
- if (fs14.existsSync(oldStoreMarker()))
16984
- fs14.rmSync(oldStoreMarker(), { force: true });
16958
+ if (fs13.existsSync(oldStoreMarker()))
16959
+ fs13.rmSync(oldStoreMarker(), { force: true });
16985
16960
  if (message.method === "protocol") {
16986
16961
  if (message.params?.unpaired === true) {
16987
16962
  this.lastUnpaired = Date.now();
@@ -18202,9 +18177,9 @@ class RootTargetLifecycle {
18202
18177
  }
18203
18178
 
18204
18179
  // src/session-manager/catalog.ts
18205
- import fs15 from "node:fs/promises";
18206
- import os6 from "node:os";
18207
- import path14 from "node:path";
18180
+ import fs14 from "node:fs/promises";
18181
+ import os5 from "node:os";
18182
+ import path13 from "node:path";
18208
18183
  import crypto9 from "node:crypto";
18209
18184
  var PersistedSession = Struct({
18210
18185
  id: String3,
@@ -18224,8 +18199,8 @@ var Catalog = Struct({
18224
18199
  version: Literal(1),
18225
18200
  sessions: ArraySchema(PersistedSession)
18226
18201
  });
18227
- function defaultSessionCatalogPath(port, home = os6.homedir()) {
18228
- return path14.join(dataRoot(home), "relays", String(port), "sessions.json");
18202
+ function defaultSessionCatalogPath(port, home = os5.homedir()) {
18203
+ return path13.join(dataRoot(home), "relays", String(port), "sessions.json");
18229
18204
  }
18230
18205
 
18231
18206
  class SessionCatalog {
@@ -18236,7 +18211,7 @@ class SessionCatalog {
18236
18211
  async load() {
18237
18212
  let text;
18238
18213
  try {
18239
- text = await fs15.readFile(this.filePath, "utf8");
18214
+ text = await fs14.readFile(this.filePath, "utf8");
18240
18215
  } catch (error) {
18241
18216
  if (isNodeError(error) && error.code === "ENOENT")
18242
18217
  return [];
@@ -18252,7 +18227,7 @@ class SessionCatalog {
18252
18227
  const detail = error instanceof Error && error.message ? `: ${error.message}` : "";
18253
18228
  const corruptPath = `${this.filePath}.corrupt-${Date.now()}`;
18254
18229
  try {
18255
- await fs15.rename(this.filePath, corruptPath);
18230
+ await fs14.rename(this.filePath, corruptPath);
18256
18231
  console.error(`Browse session catalog at ${this.filePath} was unreadable${detail}; moved it to ${corruptPath} and started with no saved sessions`);
18257
18232
  } catch (moveError) {
18258
18233
  console.error(`Browse session catalog at ${this.filePath} was unreadable${detail}; could not move it aside (${moveError instanceof Error ? moveError.message : String(moveError)}), starting with no saved sessions`);
@@ -18261,21 +18236,21 @@ class SessionCatalog {
18261
18236
  }
18262
18237
  }
18263
18238
  async save(sessions) {
18264
- const directory = path14.dirname(this.filePath);
18239
+ const directory = path13.dirname(this.filePath);
18265
18240
  const temporaryPath = `${this.filePath}.${process.pid}.${crypto9.randomUUID()}.tmp`;
18266
18241
  const contents = `${JSON.stringify({ version: 1, sessions }, null, 2)}
18267
18242
  `;
18268
18243
  let temporaryFile;
18269
18244
  try {
18270
- await fs15.mkdir(directory, { recursive: true, mode: 448 });
18271
- await fs15.chmod(directory, 448);
18272
- temporaryFile = await fs15.open(temporaryPath, "wx", 384);
18245
+ await fs14.mkdir(directory, { recursive: true, mode: 448 });
18246
+ await fs14.chmod(directory, 448);
18247
+ temporaryFile = await fs14.open(temporaryPath, "wx", 384);
18273
18248
  await temporaryFile.writeFile(contents, "utf8");
18274
18249
  await temporaryFile.sync();
18275
18250
  await temporaryFile.close();
18276
18251
  temporaryFile = undefined;
18277
- await fs15.rename(temporaryPath, this.filePath);
18278
- const directoryHandle = await fs15.open(directory, "r");
18252
+ await fs14.rename(temporaryPath, this.filePath);
18253
+ const directoryHandle = await fs14.open(directory, "r");
18279
18254
  try {
18280
18255
  try {
18281
18256
  await directoryHandle.sync();
@@ -18291,7 +18266,7 @@ class SessionCatalog {
18291
18266
  await temporaryFile?.close();
18292
18267
  } catch {}
18293
18268
  try {
18294
- await fs15.rm(temporaryPath, { force: true });
18269
+ await fs14.rm(temporaryPath, { force: true });
18295
18270
  } catch {}
18296
18271
  throw new Error(`Could not write browse session catalog at ${this.filePath}`, { cause: error });
18297
18272
  }
@@ -18783,7 +18758,7 @@ var makeRelay = fnUntraced(function* (options = {}) {
18783
18758
  const restartTimeoutMs = yield* Int("OPENCODE_BROWSER_RESTART_TIMEOUT_MS").pipe(withDefault(1e4));
18784
18759
  const clientGoneGraceMs = yield* Int("OPENCODE_BROWSER_CLIENT_GONE_GRACE_MS").pipe(withDefault(60000));
18785
18760
  const restartRequestId = yield* option(String2("OPENCODE_BROWSER_RESTART_REQUEST_ID"));
18786
- const lifecycleLogPath = path15.join(stateRoot(), "relays", String(port), "lifecycle.jsonl");
18761
+ const lifecycleLogPath = path14.join(stateRoot(), "relays", String(port), "lifecycle.jsonl");
18787
18762
  const audit = (event) => try_2(() => appendRelayLifecycleEvent(lifecycleLogPath, event));
18788
18763
  function setProtectedUi(tabId, protectedUi) {
18789
18764
  const changed = registry.markRootTargetProtectedUi(tabId, protectedUi);
@@ -1,5 +1,5 @@
1
1
  import"./main-9bk4pprj.mjs";
2
- import"./main-n77bcfj8.mjs";
2
+ import"./main-4pt08reg.mjs";
3
3
  import {
4
4
  cliCommand,
5
5
  installCommand,
@@ -16,17 +16,17 @@ import {
16
16
  registryUrl,
17
17
  fetchPublished,
18
18
  runInstaller
19
- } from "./main-a6x41zxr.mjs";
19
+ } from "./main-s8p6mgme.mjs";
20
20
  import"./main-b3jrctcx.mjs";
21
21
  import {
22
22
  Service,
23
23
  layerFetch,
24
24
  restartRelay,
25
25
  startManagedRelay
26
- } from "./main-aqdqrj4m.mjs";
26
+ } from "./main-ttge8j3c.mjs";
27
27
  import"./main-4h7rfhhr.mjs";
28
28
  import"./main-bc8cjey0.mjs";
29
- import"./main-5hhgehca.mjs";
29
+ import"./main-2be5p7he.mjs";
30
30
  import {
31
31
  succeed6,
32
32
  gen,
@@ -63,10 +63,10 @@ import {
63
63
  installRuntime,
64
64
  installedRuntime,
65
65
  manualMcpEntry
66
- } from "./main-8126mrjm.mjs";
66
+ } from "./main-d5r6evna.mjs";
67
67
  import {
68
68
  opencodeBrowserBuildId2
69
- } from "./main-n77bcfj8.mjs";
69
+ } from "./main-4pt08reg.mjs";
70
70
  import {
71
71
  installedBinaryPath,
72
72
  installerBinaryPath,
@@ -83,7 +83,7 @@ import {
83
83
  autoUpdateStatus,
84
84
  describeAutoUpdate,
85
85
  runCommand
86
- } from "./main-a6x41zxr.mjs";
86
+ } from "./main-s8p6mgme.mjs";
87
87
  import"./main-4h7rfhhr.mjs";
88
88
  import {
89
89
  pairingCodeTtlMs,
@@ -97,24 +97,25 @@ import {
97
97
  revokeBrowserToken,
98
98
  legacyPairingCode,
99
99
  removeLegacyPairingCode
100
- } from "./main-kx4ygn02.mjs";
100
+ } from "./main-yy5d2qyc.mjs";
101
101
  import {
102
102
  unpackedExtensionId,
103
103
  extensionProtocolSkew,
104
104
  extensionProtocolAdvice
105
105
  } from "./main-b3jrctcx.mjs";
106
+ import"./main-tk4axre7.mjs";
106
107
  import {
107
108
  defaultSiteSecretsDir
108
- } from "./main-p31nga7a.mjs";
109
+ } from "./main-jqerqpen.mjs";
109
110
  import {
110
111
  parseHostname,
111
112
  readRelayConfig,
112
113
  writeRelayConfig,
113
114
  syncDevExtension
114
- } from "./main-qssg13bm.mjs";
115
+ } from "./main-4gph14fn.mjs";
115
116
  import {
116
117
  relayAuthorization
117
- } from "./main-5hhgehca.mjs";
118
+ } from "./main-2be5p7he.mjs";
118
119
 
119
120
  // src/setup.ts
120
121
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -1,9 +1,9 @@
1
- import"./main-n77bcfj8.mjs";
1
+ import"./main-4pt08reg.mjs";
2
2
  import {
3
3
  entrySpawnCommand,
4
4
  installedRuntime2,
5
5
  installedVersion
6
- } from "./main-a6x41zxr.mjs";
6
+ } from "./main-s8p6mgme.mjs";
7
7
 
8
8
  // src/mcp/supervisor.ts
9
9
  import { spawn } from "node:child_process";
@@ -34,7 +34,7 @@ async function runBinaryMcp(args) {
34
34
  const runtime = installedRuntime2();
35
35
  if (!runtime || runtime.kind === "npx") {
36
36
  process.env[directEnvironmentVariable] = "1";
37
- const { runCli } = await import("./cli-zsxeh68v.mjs");
37
+ const { runCli } = await import("./cli-bnwccwpc.mjs");
38
38
  return runCli();
39
39
  }
40
40
  const REPLAY = `opencode-browser-shim-initialize-${randomUUID()}`;
@@ -4,10 +4,10 @@ import {
4
4
  updateNotice2,
5
5
  createUpdateWatcher2,
6
6
  runUpdateCommand2
7
- } from "./main-ppp9k1gv.mjs";
7
+ } from "./main-5d6tc78f.mjs";
8
8
  import"./main-b3jrctcx.mjs";
9
- import"./main-a6x41zxr.mjs";
10
- import"./main-n77bcfj8.mjs";
9
+ import"./main-s8p6mgme.mjs";
10
+ import"./main-4pt08reg.mjs";
11
11
  export {
12
12
  createUpdateWatcher2 as createUpdateWatcher,
13
13
  formatUpdateNotice2 as formatUpdateNotice,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  opencodeBrowserVersion2,
3
3
  opencodeBrowserBuildId2
4
- } from "./main-n77bcfj8.mjs";
4
+ } from "./main-4pt08reg.mjs";
5
5
  export {
6
6
  opencodeBrowserBuildId2 as opencodeBrowserBuildId,
7
7
  opencodeBrowserVersion2 as opencodeBrowserVersion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode/browse",
3
- "version": "0.0.17-dev.155",
3
+ "version": "0.0.17-dev.157",
4
4
  "description": "browse: connect the extension to opencode, and drive your browser from any agent (CLI, MCP, Playwright).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.17-dev.155";
3
- var opencodeBrowserBuildId2 = "2026-11-09T02:04:42.605Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };