@opencode/browse 0.0.17-dev.149 → 0.0.17-dev.151
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/dist/Runtime-qfc1eg1n.mjs +16 -0
- package/dist/{Undici-mxpvn7gy.mjs → Undici-xgvbtsb1.mjs} +1 -1
- package/dist/{cli-p328zvjm.mjs → cli-q8c8a5qs.mjs} +70 -66
- package/dist/cli.mjs +30 -13
- package/dist/{helpers-nkqb08wz.mjs → helpers-zsf41ghm.mjs} +2 -2
- package/dist/{index-6gkr235e.mjs → index-7d47yfra.mjs} +2 -1
- package/dist/{main-cst567w9.mjs → main-0m3tkvbh.mjs} +3 -3
- package/dist/{main-30rjteds.mjs → main-131pm12v.mjs} +2 -2
- package/dist/main-2n1a279y.mjs +4 -0
- package/dist/{main-er120rjm.mjs → main-4074weqb.mjs} +2 -2
- package/dist/{main-azpzpy0x.mjs → main-4h7rfhhr.mjs} +1 -1
- package/dist/{main-4k172hg8.mjs → main-4kvbqnpf.mjs} +7 -5
- package/dist/{main-sxpz5bpr.mjs → main-65rqqv4r.mjs} +3 -3
- package/dist/{main-54zshzc0.mjs → main-8rmfjhq4.mjs} +25 -23
- package/dist/main-9bk4pprj.mjs +64 -0
- package/dist/{main-9t2s5ptx.mjs → main-bc8cjey0.mjs} +32 -77
- package/dist/{main-zfa78nvh.mjs → main-gb5jg0mj.mjs} +71 -69
- package/dist/main-j98fzrvv.mjs +68 -0
- package/dist/{main-g5cqqxg2.mjs → main-pchbej16.mjs} +71 -68
- package/dist/{main-ken6azcs.mjs → main-qazf3bhk.mjs} +1 -68
- package/dist/{main-j31p1ner.mjs → main-rvkfzxdh.mjs} +2 -2
- package/dist/{main-fvrncx2h.mjs → main-v36tamg2.mjs} +4 -4
- package/dist/main-v6hzbxjd.mjs +5547 -0
- package/dist/main-xycdhwqs.mjs +5196 -0
- package/dist/{main-r22n170p.mjs → main-zq18j4rx.mjs} +2 -2
- package/dist/{mcp-fhje7121.mjs → mcp-kn0t0wy9.mjs} +167 -158
- package/dist/{migrate-gvm5g6d6.mjs → migrate-pkbyqcwq.mjs} +5 -5
- package/dist/{relay-y3f9yke0.mjs → relay-ehaeyrbv.mjs} +53 -51
- package/dist/{runtime-update-sgygvs2h.mjs → runtime-update-8k5n6vhp.mjs} +8 -7
- package/dist/{setup-tvcnzwgp.mjs → setup-cd2bs8nw.mjs} +8 -8
- package/dist/{skill-text-fspw9136.mjs → skill-text-30xek3h1.mjs} +16 -8
- package/dist/{supervisor-5d6dtv1f.mjs → supervisor-vavntyze.mjs} +26 -8
- package/dist/{update-1gtct0ph.mjs → update-zx6w8w1f.mjs} +3 -3
- package/dist/{version-p3507ap8.mjs → version-5ffc64pk.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +16 -8
- package/dist/main-j6c2h3jj.mjs +0 -4
- package/dist/main-yf5j8g79.mjs +0 -10662
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
browseServerCommand,
|
|
7
7
|
editAgentConfig,
|
|
8
8
|
configureMcp
|
|
9
|
-
} from "./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
} from "./main-v36tamg2.mjs";
|
|
10
|
+
import"./main-2n1a279y.mjs";
|
|
11
11
|
import {
|
|
12
12
|
configRoot2,
|
|
13
13
|
dataRoot,
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
cacheRoot,
|
|
16
16
|
binRoot,
|
|
17
17
|
binaryName
|
|
18
|
-
} from "./main-
|
|
19
|
-
import"./main-
|
|
20
|
-
import"./main-
|
|
18
|
+
} from "./main-65rqqv4r.mjs";
|
|
19
|
+
import"./main-4h7rfhhr.mjs";
|
|
20
|
+
import"./main-131pm12v.mjs";
|
|
21
21
|
import"./main-b3jrctcx.mjs";
|
|
22
22
|
import {
|
|
23
23
|
legacyDataRoot,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2,
|
|
3
3
|
opencodeBrowserBuildId2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-2n1a279y.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-
|
|
28
|
+
} from "./main-65rqqv4r.mjs";
|
|
29
29
|
import {
|
|
30
30
|
extensionProtocolVersion,
|
|
31
31
|
minExtensionProtocolVersion,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
writeJsonFileAtomically,
|
|
48
48
|
ensurePrivateDirectorySync,
|
|
49
49
|
writePrivateJsonFileSync
|
|
50
|
-
} from "./main-
|
|
50
|
+
} from "./main-4h7rfhhr.mjs";
|
|
51
51
|
import {
|
|
52
52
|
withDefault,
|
|
53
53
|
option,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
isRestrictedTarget2,
|
|
103
103
|
isRestrictedUrl2,
|
|
104
104
|
dataUrlDocument2
|
|
105
|
-
} from "./main-
|
|
105
|
+
} from "./main-gb5jg0mj.mjs";
|
|
106
106
|
import {
|
|
107
107
|
context,
|
|
108
108
|
pendingPairingCodeKeys,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
pairingSessionKey,
|
|
121
121
|
sessionProof,
|
|
122
122
|
wrapToken
|
|
123
|
-
} from "./main-
|
|
123
|
+
} from "./main-131pm12v.mjs";
|
|
124
124
|
import {
|
|
125
125
|
makeUnsafe,
|
|
126
126
|
terminateChildProcess,
|
|
@@ -142,16 +142,16 @@ import {
|
|
|
142
142
|
checkNavigationUrl,
|
|
143
143
|
readSecret,
|
|
144
144
|
secretText
|
|
145
|
-
} from "./main-
|
|
145
|
+
} from "./main-8rmfjhq4.mjs";
|
|
146
146
|
import {
|
|
147
147
|
defaultJournalBaseDir,
|
|
148
148
|
makeJournalEntry,
|
|
149
149
|
appendJournalEntry,
|
|
150
150
|
startJournalRetention
|
|
151
|
-
} from "./main-
|
|
151
|
+
} from "./main-4kvbqnpf.mjs";
|
|
152
152
|
import {
|
|
153
153
|
createUpdateWatcher2
|
|
154
|
-
} from "./main-
|
|
154
|
+
} from "./main-zq18j4rx.mjs";
|
|
155
155
|
import {
|
|
156
156
|
SettingsInputError,
|
|
157
157
|
parseSettingChanges,
|
|
@@ -159,13 +159,13 @@ import {
|
|
|
159
159
|
settingsToExtension,
|
|
160
160
|
describeSettings,
|
|
161
161
|
describeChanges
|
|
162
|
-
} from "./main-
|
|
162
|
+
} from "./main-pchbej16.mjs";
|
|
163
163
|
import {
|
|
164
164
|
relayHostname,
|
|
165
165
|
isLocalPeer,
|
|
166
166
|
installedDevExtension,
|
|
167
167
|
syncDevExtension
|
|
168
|
-
} from "./main-
|
|
168
|
+
} from "./main-0m3tkvbh.mjs";
|
|
169
169
|
import {
|
|
170
170
|
legacyRoots
|
|
171
171
|
} from "./main-ckssvk4c.mjs";
|
|
@@ -175,18 +175,39 @@ import {
|
|
|
175
175
|
when,
|
|
176
176
|
orElse,
|
|
177
177
|
exhaustive
|
|
178
|
-
} from "./main-
|
|
178
|
+
} from "./main-4074weqb.mjs";
|
|
179
179
|
import {
|
|
180
180
|
join,
|
|
181
181
|
interrupt,
|
|
182
182
|
makeUnsafe2
|
|
183
|
-
} from "./main-
|
|
183
|
+
} from "./main-bc8cjey0.mjs";
|
|
184
184
|
import {
|
|
185
185
|
relayTokenQueryParam,
|
|
186
186
|
relayToken,
|
|
187
187
|
secretsEqual,
|
|
188
188
|
ensurePrivateDirectory
|
|
189
|
-
} from "./main-
|
|
189
|
+
} from "./main-rvkfzxdh.mjs";
|
|
190
|
+
import {
|
|
191
|
+
taggedEnum,
|
|
192
|
+
is2,
|
|
193
|
+
decodeUnknownEffect2,
|
|
194
|
+
decodeUnknownOption,
|
|
195
|
+
decodeUnknownSync,
|
|
196
|
+
encodeSync,
|
|
197
|
+
optionalKey,
|
|
198
|
+
Literal,
|
|
199
|
+
String3,
|
|
200
|
+
Number2,
|
|
201
|
+
Boolean3,
|
|
202
|
+
Struct,
|
|
203
|
+
ArraySchema,
|
|
204
|
+
Union,
|
|
205
|
+
Literals,
|
|
206
|
+
TaggedUnion,
|
|
207
|
+
Int2,
|
|
208
|
+
Defect,
|
|
209
|
+
TaggedError2
|
|
210
|
+
} from "./main-v6hzbxjd.mjs";
|
|
190
211
|
import {
|
|
191
212
|
isNone,
|
|
192
213
|
isSome,
|
|
@@ -194,19 +215,18 @@ import {
|
|
|
194
215
|
getOrUndefined,
|
|
195
216
|
isFailure,
|
|
196
217
|
isSuccess,
|
|
197
|
-
taggedEnum,
|
|
198
218
|
void_2,
|
|
199
219
|
isSuccess2,
|
|
200
220
|
isFailure2,
|
|
201
221
|
asVoid,
|
|
202
222
|
makeUnsafe4,
|
|
203
|
-
|
|
223
|
+
make11,
|
|
204
224
|
_await,
|
|
205
225
|
done2,
|
|
206
226
|
fail5,
|
|
207
227
|
succeed4,
|
|
208
228
|
doneUnsafe,
|
|
209
|
-
|
|
229
|
+
make12,
|
|
210
230
|
close,
|
|
211
231
|
modifyDelay,
|
|
212
232
|
spaced,
|
|
@@ -234,7 +254,7 @@ import {
|
|
|
234
254
|
catch_,
|
|
235
255
|
catchCause,
|
|
236
256
|
catchIf,
|
|
237
|
-
|
|
257
|
+
mapError2,
|
|
238
258
|
tapError,
|
|
239
259
|
retry,
|
|
240
260
|
ignore,
|
|
@@ -244,7 +264,7 @@ import {
|
|
|
244
264
|
timeoutOrElse,
|
|
245
265
|
sleep,
|
|
246
266
|
raceFirst,
|
|
247
|
-
|
|
267
|
+
match4,
|
|
248
268
|
matchEffect2,
|
|
249
269
|
context2,
|
|
250
270
|
scoped,
|
|
@@ -265,26 +285,8 @@ import {
|
|
|
265
285
|
runPromise,
|
|
266
286
|
runSync,
|
|
267
287
|
fnUntraced,
|
|
268
|
-
fn
|
|
269
|
-
|
|
270
|
-
decodeUnknownEffect2,
|
|
271
|
-
decodeUnknownOption,
|
|
272
|
-
decodeUnknownSync,
|
|
273
|
-
encodeSync,
|
|
274
|
-
optionalKey,
|
|
275
|
-
Literal,
|
|
276
|
-
String3,
|
|
277
|
-
Number2,
|
|
278
|
-
Boolean3,
|
|
279
|
-
Struct,
|
|
280
|
-
ArraySchema,
|
|
281
|
-
Union,
|
|
282
|
-
Literals,
|
|
283
|
-
TaggedUnion,
|
|
284
|
-
Int2,
|
|
285
|
-
Defect,
|
|
286
|
-
TaggedError2
|
|
287
|
-
} from "./main-yf5j8g79.mjs";
|
|
288
|
+
fn
|
|
289
|
+
} from "./main-xycdhwqs.mjs";
|
|
288
290
|
import {
|
|
289
291
|
isString,
|
|
290
292
|
isNumber,
|
|
@@ -294,7 +296,7 @@ import {
|
|
|
294
296
|
isFunction,
|
|
295
297
|
isObjectOrArray,
|
|
296
298
|
isObject
|
|
297
|
-
} from "./main-
|
|
299
|
+
} from "./main-qazf3bhk.mjs";
|
|
298
300
|
|
|
299
301
|
// src/relay.ts
|
|
300
302
|
import crypto10 from "node:crypto";
|
|
@@ -1728,7 +1730,7 @@ class CdpRuntime {
|
|
|
1728
1730
|
if (!current())
|
|
1729
1731
|
return void_3;
|
|
1730
1732
|
this.trace(route, `runtime-reset command=${method}`);
|
|
1731
|
-
return this.options.send({ tabId: route.tabId, method, params, ...route.chromeSessionId === undefined ? {} : { sessionId: route.chromeSessionId } }).pipe(
|
|
1733
|
+
return this.options.send({ tabId: route.tabId, method, params, ...route.chromeSessionId === undefined ? {} : { sessionId: route.chromeSessionId } }).pipe(match4({
|
|
1732
1734
|
onFailure: (error) => this.trace(route, `runtime-reset command=${method} outcome=failed failure=${runtimeFailureKind(error)}`),
|
|
1733
1735
|
onSuccess: () => this.trace(route, `runtime-reset command=${method} outcome=ok`)
|
|
1734
1736
|
}));
|
|
@@ -4966,7 +4968,7 @@ async function resolvePageTargetId(page) {
|
|
|
4966
4968
|
label: "Resolve session page target id",
|
|
4967
4969
|
timeoutMs: playwrightCloseTimeoutMs,
|
|
4968
4970
|
run: () => pageTargetId(page)
|
|
4969
|
-
}).pipe(
|
|
4971
|
+
}).pipe(match4({
|
|
4970
4972
|
onFailure: () => {
|
|
4971
4973
|
return;
|
|
4972
4974
|
},
|
|
@@ -5072,7 +5074,7 @@ var recoverSessionPage = fn("Execute.recoverSessionPage")(function* (options) {
|
|
|
5072
5074
|
label: "Session page health check",
|
|
5073
5075
|
timeoutMs: options.timeoutMs,
|
|
5074
5076
|
run: options.healthCheck
|
|
5075
|
-
}).pipe(
|
|
5077
|
+
}).pipe(match4({
|
|
5076
5078
|
onFailure: (error) => error,
|
|
5077
5079
|
onSuccess: () => {
|
|
5078
5080
|
return;
|
|
@@ -5102,7 +5104,7 @@ var recoverSessionPage = fn("Execute.recoverSessionPage")(function* (options) {
|
|
|
5102
5104
|
label: "Close unhealthy session page",
|
|
5103
5105
|
timeoutMs: options.timeoutMs,
|
|
5104
5106
|
run: options.close
|
|
5105
|
-
}).pipe(
|
|
5107
|
+
}).pipe(match4({
|
|
5106
5108
|
onFailure: (error) => error,
|
|
5107
5109
|
onSuccess: () => {
|
|
5108
5110
|
return;
|
|
@@ -10595,7 +10597,7 @@ class Recorder {
|
|
|
10595
10597
|
const secrets = options.secrets;
|
|
10596
10598
|
const profileOptions = capture.recorderOptions.authProfileBaseDir ? { baseDir: capture.recorderOptions.authProfileBaseDir } : {};
|
|
10597
10599
|
const finish = finishCapture(active, options, secrets, profileOptions);
|
|
10598
|
-
const finished = yield* (secrets ? withLock(secrets, profileOptions, finish) : finish).pipe(
|
|
10600
|
+
const finished = yield* (secrets ? withLock(secrets, profileOptions, finish) : finish).pipe(mapError2((cause) => cause instanceof NetworkCaptureError ? cause : new NetworkCaptureError({ message: cause.message, operation: "auth-profile", reason: "persistence-failed", cause })));
|
|
10599
10601
|
const { endsAt: _endsAt, ...finalStatus } = capture.status();
|
|
10600
10602
|
capture.active = undefined;
|
|
10601
10603
|
clearTimeout(capture.expiry);
|
|
@@ -10979,7 +10981,7 @@ class ExecuteSandbox extends DefaultPageHost {
|
|
|
10979
10981
|
}
|
|
10980
10982
|
return cause instanceof Error ? cause : new Error("execute sandbox code", { cause });
|
|
10981
10983
|
}
|
|
10982
|
-
}).pipe(uninterruptible, tapError(() => promise(() => this.networkCapture.settleForOutput())),
|
|
10984
|
+
}).pipe(uninterruptible, tapError(() => promise(() => this.networkCapture.settleForOutput())), match4({
|
|
10983
10985
|
onFailure: (error) => {
|
|
10984
10986
|
const logSummary = error instanceof ExecuteCodeError ? error.logSummary : emptyExecuteLogSummary();
|
|
10985
10987
|
const aftermath = error instanceof ExecuteCodeError ? error.aftermath : undefined;
|
|
@@ -12752,7 +12754,7 @@ function adoptTargetForSession(context, options) {
|
|
|
12752
12754
|
return context.admission.withAdmission(options.sessionId, uninterruptibleMask2((restore) => gen(function* () {
|
|
12753
12755
|
const resolved = yield* context.resolveWorkSession(options.sessionId, options.createIfMissing);
|
|
12754
12756
|
const session = resolved.session;
|
|
12755
|
-
const result2 = yield*
|
|
12757
|
+
const result2 = yield* make11();
|
|
12756
12758
|
let state = "pending";
|
|
12757
12759
|
let cancelled = false;
|
|
12758
12760
|
let reservation;
|
|
@@ -12904,7 +12906,7 @@ function executeInSession(ctx, options) {
|
|
|
12904
12906
|
}
|
|
12905
12907
|
const resolved = yield* ctx.resolveWorkSession(options.sessionId, options.createIfMissing, options.browser);
|
|
12906
12908
|
const session = resolved.session;
|
|
12907
|
-
const response = yield*
|
|
12909
|
+
const response = yield* make11();
|
|
12908
12910
|
let started = false;
|
|
12909
12911
|
let cancelled = false;
|
|
12910
12912
|
const operation = gen(function* () {
|
|
@@ -12916,7 +12918,7 @@ function executeInSession(ctx, options) {
|
|
|
12916
12918
|
}
|
|
12917
12919
|
yield* trySession(() => ctx.resolveBrowser(options.browser, session));
|
|
12918
12920
|
if (session.browser?.key && ctx.hooks.checkBrowserResponsive)
|
|
12919
|
-
yield* ctx.hooks.checkBrowserResponsive(session.browser.key).pipe(
|
|
12921
|
+
yield* ctx.hooks.checkBrowserResponsive(session.browser.key).pipe(mapError2((error) => sessionError("browser-unavailable", error.message, session.id)));
|
|
12920
12922
|
started = true;
|
|
12921
12923
|
session.updatedAt = new Date().toISOString();
|
|
12922
12924
|
yield* ctx.setExecuting(session.id, true);
|
|
@@ -13691,7 +13693,7 @@ function targetSummaries(registry) {
|
|
|
13691
13693
|
});
|
|
13692
13694
|
}
|
|
13693
13695
|
function decodeRequest(schema, body, label) {
|
|
13694
|
-
return decodeUnknownEffect2(schema)(body).pipe(
|
|
13696
|
+
return decodeUnknownEffect2(schema)(body).pipe(mapError2((cause) => new HttpRouteError2({
|
|
13695
13697
|
message: `Invalid ${label} request: ${cause.message}`,
|
|
13696
13698
|
status: 400,
|
|
13697
13699
|
code: "invalid-request"
|
|
@@ -17417,7 +17419,7 @@ function createRelaySettingsSync(options) {
|
|
|
17417
17419
|
const rejected = handshake.rejectedProtocol();
|
|
17418
17420
|
return yield* fail6(new Error(rejected ? handshake.mismatchAdvice(rejected.version) : "The browse extension isn't connected, so its settings can't be read or changed. Ask the user to open the browser with the extension; its options page shows whether it's connected."));
|
|
17419
17421
|
}
|
|
17420
|
-
const result = yield* sendToExtension({ method, ...values ? { params: { values } } : {} }).pipe(
|
|
17422
|
+
const result = yield* sendToExtension({ method, ...values ? { params: { values } } : {} }).pipe(mapError2((error) => /Invalid extension command/.test(error.message) ? new Error(`The connected browse extension is too old to read or change settings from here. Update browse (\`${installCommand()}\`) and reload the extension, or change them on its options page.`) : error));
|
|
17421
17423
|
return settingsFromExtension(result);
|
|
17422
17424
|
});
|
|
17423
17425
|
const settingOverrides = () => {
|
|
@@ -17926,7 +17928,7 @@ class RootTargetLifecycle {
|
|
|
17926
17928
|
scope;
|
|
17927
17929
|
run;
|
|
17928
17930
|
static make = fn("RootTargetLifecycle.make")(function* (options) {
|
|
17929
|
-
const scope = yield*
|
|
17931
|
+
const scope = yield* make12();
|
|
17930
17932
|
const run = runForkWith(yield* context2());
|
|
17931
17933
|
return yield* acquireRelease(sync2(() => new RootTargetLifecycle(options, scope, run)), (lifecycle) => lifecycle.close());
|
|
17932
17934
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-9bk4pprj.mjs";
|
|
2
|
+
import"./main-2n1a279y.mjs";
|
|
2
3
|
import {
|
|
3
4
|
cliCommand,
|
|
4
5
|
installCommand,
|
|
@@ -15,17 +16,17 @@ import {
|
|
|
15
16
|
registryUrl,
|
|
16
17
|
fetchPublished,
|
|
17
18
|
runInstaller
|
|
18
|
-
} from "./main-
|
|
19
|
+
} from "./main-65rqqv4r.mjs";
|
|
19
20
|
import"./main-b3jrctcx.mjs";
|
|
20
21
|
import {
|
|
21
22
|
Service,
|
|
22
23
|
layerFetch,
|
|
23
24
|
restartRelay,
|
|
24
25
|
startManagedRelay
|
|
25
|
-
} from "./main-
|
|
26
|
-
import"./main-
|
|
27
|
-
import"./main-
|
|
28
|
-
import"./main-
|
|
26
|
+
} from "./main-gb5jg0mj.mjs";
|
|
27
|
+
import"./main-4h7rfhhr.mjs";
|
|
28
|
+
import"./main-bc8cjey0.mjs";
|
|
29
|
+
import"./main-rvkfzxdh.mjs";
|
|
29
30
|
import {
|
|
30
31
|
succeed6,
|
|
31
32
|
gen,
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
catch_,
|
|
34
35
|
provide3,
|
|
35
36
|
runPromise
|
|
36
|
-
} from "./main-
|
|
37
|
+
} from "./main-xycdhwqs.mjs";
|
|
37
38
|
|
|
38
39
|
// src/update/runtime-update.ts
|
|
39
40
|
var log = (line) => process.stdout.write(line + `
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
installRuntime,
|
|
64
64
|
installedRuntime,
|
|
65
65
|
manualMcpEntry
|
|
66
|
-
} from "./main-
|
|
66
|
+
} from "./main-v36tamg2.mjs";
|
|
67
67
|
import {
|
|
68
68
|
opencodeBrowserBuildId2
|
|
69
|
-
} from "./main-
|
|
69
|
+
} from "./main-2n1a279y.mjs";
|
|
70
70
|
import {
|
|
71
71
|
installedBinaryPath,
|
|
72
72
|
installerBinaryPath,
|
|
@@ -83,8 +83,8 @@ import {
|
|
|
83
83
|
autoUpdateStatus,
|
|
84
84
|
describeAutoUpdate,
|
|
85
85
|
runCommand
|
|
86
|
-
} from "./main-
|
|
87
|
-
import"./main-
|
|
86
|
+
} from "./main-65rqqv4r.mjs";
|
|
87
|
+
import"./main-4h7rfhhr.mjs";
|
|
88
88
|
import {
|
|
89
89
|
pairingCodeTtlMs,
|
|
90
90
|
bundledPairingCodeTtlMs,
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
revokeBrowserToken,
|
|
98
98
|
legacyPairingCode,
|
|
99
99
|
removeLegacyPairingCode
|
|
100
|
-
} from "./main-
|
|
100
|
+
} from "./main-131pm12v.mjs";
|
|
101
101
|
import {
|
|
102
102
|
unpackedExtensionId,
|
|
103
103
|
extensionProtocolSkew,
|
|
@@ -105,16 +105,16 @@ import {
|
|
|
105
105
|
} from "./main-b3jrctcx.mjs";
|
|
106
106
|
import {
|
|
107
107
|
defaultSiteSecretsDir
|
|
108
|
-
} from "./main-
|
|
108
|
+
} from "./main-8rmfjhq4.mjs";
|
|
109
109
|
import {
|
|
110
110
|
parseHostname,
|
|
111
111
|
readRelayConfig,
|
|
112
112
|
writeRelayConfig,
|
|
113
113
|
syncDevExtension
|
|
114
|
-
} from "./main-
|
|
114
|
+
} from "./main-0m3tkvbh.mjs";
|
|
115
115
|
import {
|
|
116
116
|
relayAuthorization
|
|
117
|
-
} from "./main-
|
|
117
|
+
} from "./main-rvkfzxdh.mjs";
|
|
118
118
|
|
|
119
119
|
// src/setup.ts
|
|
120
120
|
import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
|
|
@@ -22,10 +22,16 @@ it is needed, so do not start \`browse serve\` first.
|
|
|
22
22
|
|
|
23
23
|
## Sessions
|
|
24
24
|
|
|
25
|
-
Over MCP, each agent has its own current session
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
Over MCP, each agent has its own current session when the client names the
|
|
26
|
+
agent (OpenCode does), so omit \`session\` for the normal path; another named
|
|
27
|
+
agent's bare calls don't land on your page. \`status\` reports
|
|
28
|
+
\`sharedSession: true\` when the client doesn't name agents, and then every
|
|
29
|
+
agent on that server shares one current session: if several agents (such as
|
|
30
|
+
subagents) use it, each should \`session_new\` its own and pass \`session\` on
|
|
31
|
+
every call. \`session_new\`, \`session_use\`, \`session_reset\`, and \`execute\` or
|
|
32
|
+
\`session_adopt\` with a \`session\`, make it your current session. Pass an
|
|
33
|
+
explicit \`session\` id to work in several sessions, or to share one with
|
|
34
|
+
another agent on purpose.
|
|
29
35
|
|
|
30
36
|
CLI sessions are named, and a named session keeps its default page across short
|
|
31
37
|
commands and relay restarts:
|
|
@@ -377,10 +383,12 @@ browse session delete <name> # MCP: session_delete
|
|
|
377
383
|
\`\`\`
|
|
378
384
|
|
|
379
385
|
\`tabs_cleanup\` with \`idleMinutes: 0\` closes your own sessions' idle tabs at
|
|
380
|
-
once; other agents' tabs close only after the user's idle setting.
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
386
|
+
once; other agents' tabs close only after the user's idle setting. When the
|
|
387
|
+
client doesn't name agents, "your own" is every session any agent on that
|
|
388
|
+
server made current, so don't use \`idleMinutes: 0\` unless the user asks. The
|
|
389
|
+
CLI's \`browse tabs cleanup --idle-minutes 0\` has no agent to scope to and
|
|
390
|
+
closes every agent tab, so only run it when the user asks. Keep a session only
|
|
391
|
+
when you will continue with it.
|
|
384
392
|
|
|
385
393
|
Use the \`settings\` tool (CLI: \`browse settings get\` / \`settings set key=value …\`)
|
|
386
394
|
only when the user asks to change how browse behaves: where tabs open (\`window\`),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-2n1a279y.mjs";
|
|
2
2
|
import {
|
|
3
3
|
entrySpawnCommand,
|
|
4
4
|
installedRuntime2,
|
|
5
5
|
installedVersion
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-65rqqv4r.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-
|
|
37
|
+
const { runCli } = await import("./cli-q8c8a5qs.mjs");
|
|
38
38
|
return runCli();
|
|
39
39
|
}
|
|
40
40
|
const REPLAY = `opencode-browser-shim-initialize-${randomUUID()}`;
|
|
@@ -56,6 +56,13 @@ async function runBinaryMcp(args) {
|
|
|
56
56
|
`);
|
|
57
57
|
const toChild = (line) => child.stdin.write(line + `
|
|
58
58
|
`);
|
|
59
|
+
let finishing = false;
|
|
60
|
+
const finish = (code) => {
|
|
61
|
+
if (finishing)
|
|
62
|
+
return;
|
|
63
|
+
finishing = true;
|
|
64
|
+
process.stdout.write("", () => process.exit(code));
|
|
65
|
+
};
|
|
59
66
|
const parse = (line) => {
|
|
60
67
|
try {
|
|
61
68
|
return JSON.parse(line);
|
|
@@ -88,12 +95,23 @@ async function runBinaryMcp(args) {
|
|
|
88
95
|
const next = spawn(file, [...prefix, "mcp", ...args], { stdio: ["pipe", "pipe", "inherit"], env: { ...process.env, [directEnvironmentVariable]: "1" }, windowsHide: true });
|
|
89
96
|
next.stdin.on("error", () => {});
|
|
90
97
|
child = next;
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
let linesDone = false;
|
|
99
|
+
let exited;
|
|
100
|
+
const finishChild = () => {
|
|
101
|
+
if (next !== child || !linesDone || !exited)
|
|
93
102
|
return;
|
|
94
|
-
|
|
103
|
+
finish(exited.code ?? (exited.signal ? 1 : 0));
|
|
104
|
+
};
|
|
105
|
+
next.on("close", (code, signal) => {
|
|
106
|
+
exited = { code, signal };
|
|
107
|
+
finishChild();
|
|
108
|
+
});
|
|
109
|
+
const reader = createInterface({ input: next.stdout });
|
|
110
|
+
reader.on("close", () => {
|
|
111
|
+
linesDone = true;
|
|
112
|
+
finishChild();
|
|
95
113
|
});
|
|
96
|
-
|
|
114
|
+
reader.on("line", (line) => {
|
|
97
115
|
if (next !== child)
|
|
98
116
|
return;
|
|
99
117
|
const message = parse(line);
|
|
@@ -190,7 +208,7 @@ async function runBinaryMcp(args) {
|
|
|
190
208
|
start(false);
|
|
191
209
|
createInterface({ input: process.stdin }).on("line", fromClient).on("close", () => {
|
|
192
210
|
child.stdin.end();
|
|
193
|
-
setTimeout(() =>
|
|
211
|
+
setTimeout(() => finish(0), 5000).unref();
|
|
194
212
|
});
|
|
195
213
|
setInterval(() => void maybeSwap(), 1000).unref();
|
|
196
214
|
}
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
updateNotice2,
|
|
5
5
|
createUpdateWatcher2,
|
|
6
6
|
runUpdateCommand2
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-zq18j4rx.mjs";
|
|
8
8
|
import"./main-b3jrctcx.mjs";
|
|
9
|
-
import"./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
import"./main-65rqqv4r.mjs";
|
|
10
|
+
import"./main-2n1a279y.mjs";
|
|
11
11
|
export {
|
|
12
12
|
createUpdateWatcher2 as createUpdateWatcher,
|
|
13
13
|
formatUpdateNotice2 as formatUpdateNotice,
|
package/package.json
CHANGED
package/skills/browse/SKILL.md
CHANGED
|
@@ -21,10 +21,16 @@ it is needed, so do not start `browse serve` first.
|
|
|
21
21
|
|
|
22
22
|
## Sessions
|
|
23
23
|
|
|
24
|
-
Over MCP, each agent has its own current session
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
Over MCP, each agent has its own current session when the client names the
|
|
25
|
+
agent (OpenCode does), so omit `session` for the normal path; another named
|
|
26
|
+
agent's bare calls don't land on your page. `status` reports
|
|
27
|
+
`sharedSession: true` when the client doesn't name agents, and then every
|
|
28
|
+
agent on that server shares one current session: if several agents (such as
|
|
29
|
+
subagents) use it, each should `session_new` its own and pass `session` on
|
|
30
|
+
every call. `session_new`, `session_use`, `session_reset`, and `execute` or
|
|
31
|
+
`session_adopt` with a `session`, make it your current session. Pass an
|
|
32
|
+
explicit `session` id to work in several sessions, or to share one with
|
|
33
|
+
another agent on purpose.
|
|
28
34
|
|
|
29
35
|
CLI sessions are named, and a named session keeps its default page across short
|
|
30
36
|
commands and relay restarts:
|
|
@@ -376,10 +382,12 @@ browse session delete <name> # MCP: session_delete
|
|
|
376
382
|
```
|
|
377
383
|
|
|
378
384
|
`tabs_cleanup` with `idleMinutes: 0` closes your own sessions' idle tabs at
|
|
379
|
-
once; other agents' tabs close only after the user's idle setting.
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
385
|
+
once; other agents' tabs close only after the user's idle setting. When the
|
|
386
|
+
client doesn't name agents, "your own" is every session any agent on that
|
|
387
|
+
server made current, so don't use `idleMinutes: 0` unless the user asks. The
|
|
388
|
+
CLI's `browse tabs cleanup --idle-minutes 0` has no agent to scope to and
|
|
389
|
+
closes every agent tab, so only run it when the user asks. Keep a session only
|
|
390
|
+
when you will continue with it.
|
|
383
391
|
|
|
384
392
|
Use the `settings` tool (CLI: `browse settings get` / `settings set key=value …`)
|
|
385
393
|
only when the user asks to change how browse behaves: where tabs open (`window`),
|
package/dist/main-j6c2h3jj.mjs
DELETED