@opencode/browse 0.0.17-dev.188 → 0.0.17-dev.189
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-hmy7zww1.mjs → Runtime-tvxdkp60.mjs} +1 -1
- package/dist/{cli-5ezftnv2.mjs → cli-29hdwt7a.mjs} +58 -640
- package/dist/cli.mjs +18 -13
- package/dist/{helpers-k5ybc61c.mjs → helpers-00s350tq.mjs} +1 -1
- package/dist/{index-37ssbv86.mjs → index-kmxtpxxk.mjs} +2 -2
- package/dist/{legacy-runtime-j0sw664c.mjs → legacy-runtime-egp6zww2.mjs} +7 -7
- package/dist/{main-7h3v45ag.mjs → main-00ka28er.mjs} +5 -5
- package/dist/{main-pqxrvknr.mjs → main-0mv7rpmv.mjs} +2 -2
- package/dist/{main-svhdexdh.mjs → main-1h2rczbb.mjs} +3 -3
- package/dist/{main-d8km89cz.mjs → main-2jd6x6jq.mjs} +2 -2
- package/dist/{main-66fy08h5.mjs → main-7wq2brry.mjs} +58 -62
- package/dist/{main-7v4scg8t.mjs → main-ckyb9v7n.mjs} +3 -3
- package/dist/{main-0h387a1q.mjs → main-d1th6z2h.mjs} +3 -3
- package/dist/{main-m9n50a86.mjs → main-dvy4da2g.mjs} +2 -7
- package/dist/main-e575zjpk.mjs +4 -0
- package/dist/{main-kzcrfvmh.mjs → main-e5r3f1g8.mjs} +4 -4
- package/dist/{main-ba028a85.mjs → main-f1jjkpm9.mjs} +10 -17
- package/dist/{main-mvjg1jye.mjs → main-g82bc5x3.mjs} +37 -94
- package/dist/main-gexpjhk5.mjs +32 -0
- package/dist/{main-3514h33n.mjs → main-hh16893t.mjs} +3 -3
- package/dist/{main-9q9919e3.mjs → main-jtgan144.mjs} +3 -3
- package/dist/{main-tryp3jph.mjs → main-kd8f1nq2.mjs} +3 -4
- package/dist/{main-4qq4n32k.mjs → main-ky3vj3mx.mjs} +2 -2
- package/dist/{main-dab23et4.mjs → main-v1r263fc.mjs} +1 -1
- package/dist/{main-8xd753k5.mjs → main-z4c819pg.mjs} +4 -37
- package/dist/{main-j4kq90pw.mjs → main-zrjcdksk.mjs} +1 -1
- package/dist/{mcp-jh4atts2.mjs → mcp-rzn35bxy.mjs} +132 -293
- package/dist/{migrate-r433scvg.mjs → migrate-hz3a51xg.mjs} +7 -7
- package/dist/{relay-1epy67be.mjs → relay-n5jwr402.mjs} +2082 -4323
- package/dist/{remove-stored-secrets-wy3pakjj.mjs → remove-stored-secrets-r8dk5eqc.mjs} +1 -1
- package/dist/{runtime-update-ww2pejn2.mjs → runtime-update-avxgfgwm.mjs} +10 -10
- package/dist/{setup-n1hpbkz2.mjs → setup-cnp75dsm.mjs} +10 -10
- package/dist/{update-z7qvagkc.mjs → update-bmgjhjd0.mjs} +3 -3
- package/dist/{version-2123c138.mjs → version-74q9xrcd.mjs} +1 -1
- package/package.json +2 -3
- package/dist/main-qrqem3fy.mjs +0 -4
- package/dist/skill-text-0ndr12dz.mjs +0 -492
- package/skills/browse/SKILL.md +0 -484
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./main-pmfd055v.mjs";
|
|
5
5
|
import {
|
|
6
6
|
opencodeBrowserVersion2
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-e575zjpk.mjs";
|
|
8
8
|
import {
|
|
9
9
|
stateRoot,
|
|
10
10
|
fromCheckout,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
installedBinary,
|
|
14
14
|
cliPrefix,
|
|
15
15
|
RELEASE_SERVICE
|
|
16
|
-
} from "./main-
|
|
16
|
+
} from "./main-kd8f1nq2.mjs";
|
|
17
17
|
|
|
18
18
|
// src/protocol.ts
|
|
19
19
|
var extensionProtocolVersion = 3;
|
|
@@ -77,10 +77,6 @@ var extensionCommandMethodValues = [
|
|
|
77
77
|
"pageStatus.set",
|
|
78
78
|
"pageStatus.clear",
|
|
79
79
|
"runtime.reload",
|
|
80
|
-
"recording.start",
|
|
81
|
-
"recording.stop",
|
|
82
|
-
"recording.status",
|
|
83
|
-
"recording.cancel",
|
|
84
80
|
"tabs.cleanup",
|
|
85
81
|
"update.notice",
|
|
86
82
|
"relay.settings",
|
|
@@ -102,7 +98,6 @@ var extensionEventMethodValues = [
|
|
|
102
98
|
"tabs.opened",
|
|
103
99
|
"pong",
|
|
104
100
|
"log",
|
|
105
|
-
"recording.cancelled",
|
|
106
101
|
"pageStatus.requested",
|
|
107
102
|
"settings"
|
|
108
103
|
];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNodeError,
|
|
3
3
|
isValidSessionId2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-g82bc5x3.mjs";
|
|
5
5
|
import {
|
|
6
6
|
stateRoot
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-kd8f1nq2.mjs";
|
|
8
8
|
import {
|
|
9
9
|
decodeUnknownOption,
|
|
10
10
|
optionalKey,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
Struct,
|
|
15
15
|
ArraySchema,
|
|
16
16
|
NullOr
|
|
17
|
-
} from "./main-
|
|
17
|
+
} from "./main-z4c819pg.mjs";
|
|
18
18
|
import {
|
|
19
19
|
isSome
|
|
20
|
-
} from "./main-
|
|
20
|
+
} from "./main-d1th6z2h.mjs";
|
|
21
21
|
|
|
22
22
|
// src/session-manager/journal.ts
|
|
23
23
|
import fs from "node:fs";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
compareVersions,
|
|
6
6
|
installedRuntime2,
|
|
7
7
|
installedVersion
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-dvy4da2g.mjs";
|
|
9
9
|
import {
|
|
10
10
|
ensurePrivateDirectorySync,
|
|
11
11
|
SessionContainer,
|
|
@@ -30,13 +30,10 @@ import {
|
|
|
30
30
|
SettingsGetResponse,
|
|
31
31
|
SettingsSetResponse,
|
|
32
32
|
RecordingCancelResponse,
|
|
33
|
-
FlightRecorderStatusResponse,
|
|
34
|
-
FlightRecorderSaveResponse,
|
|
35
|
-
FlightRecorderCancelResponse,
|
|
36
33
|
RelayErrorCode,
|
|
37
34
|
ErrorEnvelope,
|
|
38
35
|
defaultPort2
|
|
39
|
-
} from "./main-
|
|
36
|
+
} from "./main-g82bc5x3.mjs";
|
|
40
37
|
import {
|
|
41
38
|
get,
|
|
42
39
|
post,
|
|
@@ -44,13 +41,13 @@ import {
|
|
|
44
41
|
bodyJson,
|
|
45
42
|
HttpClient,
|
|
46
43
|
layerNodeHttp
|
|
47
|
-
} from "./main-
|
|
44
|
+
} from "./main-hh16893t.mjs";
|
|
48
45
|
import {
|
|
49
46
|
opencodeBrowserBuildId2
|
|
50
|
-
} from "./main-
|
|
47
|
+
} from "./main-e575zjpk.mjs";
|
|
51
48
|
import {
|
|
52
49
|
relayAuthorization
|
|
53
|
-
} from "./main-
|
|
50
|
+
} from "./main-0mv7rpmv.mjs";
|
|
54
51
|
import {
|
|
55
52
|
endpointForPort,
|
|
56
53
|
configuredRelayPort,
|
|
@@ -58,14 +55,14 @@ import {
|
|
|
58
55
|
readRelayState,
|
|
59
56
|
processAlive,
|
|
60
57
|
resolveRelayPort
|
|
61
|
-
} from "./main-
|
|
58
|
+
} from "./main-ky3vj3mx.mjs";
|
|
62
59
|
import {
|
|
63
60
|
stateRoot,
|
|
64
61
|
compiledBinary,
|
|
65
62
|
scriptEntry,
|
|
66
63
|
cliCommand,
|
|
67
64
|
installCommand
|
|
68
|
-
} from "./main-
|
|
65
|
+
} from "./main-kd8f1nq2.mjs";
|
|
69
66
|
import {
|
|
70
67
|
Pointer,
|
|
71
68
|
passthrough,
|
|
@@ -92,7 +89,7 @@ import {
|
|
|
92
89
|
Defect,
|
|
93
90
|
TaggedError2,
|
|
94
91
|
toCodecStringTree
|
|
95
|
-
} from "./main-
|
|
92
|
+
} from "./main-z4c819pg.mjs";
|
|
96
93
|
import {
|
|
97
94
|
__require
|
|
98
95
|
} from "./main-j98fzrvv.mjs";
|
|
@@ -148,7 +145,7 @@ import {
|
|
|
148
145
|
mapEager,
|
|
149
146
|
flatMapEager,
|
|
150
147
|
catchEager
|
|
151
|
-
} from "./main-
|
|
148
|
+
} from "./main-d1th6z2h.mjs";
|
|
152
149
|
|
|
153
150
|
// node_modules/effect/dist/ConfigProvider.js
|
|
154
151
|
function makeValue(value) {
|
|
@@ -696,11 +693,7 @@ var make3 = fn("RelayClient.make")(function* (options) {
|
|
|
696
693
|
recordingCancel: (target) => postJson("/recording/cancel", recordingTargetBody(target), RecordingCancelResponse),
|
|
697
694
|
tabsCleanup: (idleMinutes, sessions) => postJson("/tabs/cleanup", { ...idleMinutes === undefined ? {} : { idleMinutes }, ...sessions ? { sessions } : {} }, TabsCleanupResponse),
|
|
698
695
|
settingsGet: getJson("/settings", SettingsGetResponse),
|
|
699
|
-
settingsSet: (changes) => postJson("/settings", { set: changes }, SettingsSetResponse)
|
|
700
|
-
flightRecorderStart: ({ sessionId, tabId, ...request }) => postJson("/flight-recorder/start", { ...recordingTargetBody({ sessionId, tabId }), ...request }, FlightRecorderStatusResponse),
|
|
701
|
-
flightRecorderStatus: (target) => getJson(`/flight-recorder/status${recordingTargetQuery(target)}`, FlightRecorderStatusResponse),
|
|
702
|
-
flightRecorderSaveLast: ({ sessionId, tabId, ...request }) => postJson("/flight-recorder/save-last", { ...recordingTargetBody({ sessionId, tabId }), ...request }, FlightRecorderSaveResponse),
|
|
703
|
-
flightRecorderCancel: (target) => postJson("/flight-recorder/cancel", recordingTargetBody(target), FlightRecorderCancelResponse)
|
|
696
|
+
settingsSet: (changes) => postJson("/settings", { set: changes }, SettingsSetResponse)
|
|
704
697
|
});
|
|
705
698
|
});
|
|
706
699
|
var layer = effect(Service, make3());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
unpackedExtensionId,
|
|
3
3
|
parseJsonObject
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-dvy4da2g.mjs";
|
|
5
5
|
import {
|
|
6
6
|
decodeUnknownOption,
|
|
7
7
|
optionalKey,
|
|
@@ -20,16 +20,14 @@ import {
|
|
|
20
20
|
TaggedUnion,
|
|
21
21
|
makeFilter,
|
|
22
22
|
isPattern,
|
|
23
|
-
isGreaterThan,
|
|
24
23
|
isGreaterThanOrEqualTo,
|
|
25
24
|
isBetween,
|
|
26
25
|
isInt,
|
|
27
26
|
Int2,
|
|
28
|
-
isMaxLength,
|
|
29
27
|
NonEmptyString,
|
|
30
28
|
TaggedError2,
|
|
31
29
|
Json
|
|
32
|
-
} from "./main-
|
|
30
|
+
} from "./main-z4c819pg.mjs";
|
|
33
31
|
import {
|
|
34
32
|
isString,
|
|
35
33
|
isNumber,
|
|
@@ -42,11 +40,10 @@ import {
|
|
|
42
40
|
callback2,
|
|
43
41
|
fail6,
|
|
44
42
|
catch_
|
|
45
|
-
} from "./main-
|
|
43
|
+
} from "./main-d1th6z2h.mjs";
|
|
46
44
|
// src/fs-durability.ts
|
|
47
45
|
import crypto from "node:crypto";
|
|
48
46
|
import fsSync from "node:fs";
|
|
49
|
-
import fs from "node:fs/promises";
|
|
50
47
|
import path from "node:path";
|
|
51
48
|
var unsupportedDirectorySyncCodes = new Set(["EPERM", "EINVAL", "ENOTSUP"]);
|
|
52
49
|
function isNodeError(error) {
|
|
@@ -55,28 +52,6 @@ function isNodeError(error) {
|
|
|
55
52
|
function isUnsupportedDirectorySyncError(error) {
|
|
56
53
|
return isNodeError(error) && isString(error.code) && unsupportedDirectorySyncCodes.has(error.code);
|
|
57
54
|
}
|
|
58
|
-
async function writeJsonFileAtomically(filePath, value, options = {}) {
|
|
59
|
-
const directory = path.dirname(filePath);
|
|
60
|
-
await fs.mkdir(directory, {
|
|
61
|
-
recursive: true,
|
|
62
|
-
...options.dirMode === undefined ? {} : { mode: options.dirMode }
|
|
63
|
-
});
|
|
64
|
-
if (options.dirMode !== undefined) {
|
|
65
|
-
await fs.chmod(directory, options.dirMode);
|
|
66
|
-
}
|
|
67
|
-
const temporaryPath = `${filePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
68
|
-
let renamed = false;
|
|
69
|
-
try {
|
|
70
|
-
await fs.writeFile(temporaryPath, `${JSON.stringify(value, null, 2)}
|
|
71
|
-
`, { mode: 384 });
|
|
72
|
-
await fs.rename(temporaryPath, filePath);
|
|
73
|
-
renamed = true;
|
|
74
|
-
await fs.chmod(filePath, 384);
|
|
75
|
-
} finally {
|
|
76
|
-
if (!renamed)
|
|
77
|
-
await fs.rm(temporaryPath, { force: true }).catch(() => {});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
55
|
function ensurePrivateDirectorySync(directory) {
|
|
81
56
|
fsSync.mkdirSync(directory, { recursive: true, mode: 448 });
|
|
82
57
|
if (process.platform !== "win32")
|
|
@@ -351,21 +326,11 @@ var RelayShutdownRequest = Struct({
|
|
|
351
326
|
var RelayShutdownResponse = Struct({
|
|
352
327
|
stopping: Literal(true)
|
|
353
328
|
});
|
|
354
|
-
var NetworkContentMode = Literals(["omit", "embed"]);
|
|
355
329
|
var NetworkStartRequest = Struct({
|
|
356
330
|
sessionId: NonEmptyString,
|
|
357
|
-
urlFilter: optionalKey(String3)
|
|
358
|
-
resourceTypes: optionalKey(ArraySchema(NonEmptyString).check(isMaxLength(50))),
|
|
359
|
-
content: optionalKey(NetworkContentMode),
|
|
360
|
-
maxBodyBytes: optionalKey(Int2.check(isBetween({ minimum: 1, maximum: 1e7 }))),
|
|
361
|
-
maxTotalBodyBytes: optionalKey(Int2.check(isBetween({ minimum: 1, maximum: 1e8 }))),
|
|
362
|
-
maxEntries: optionalKey(Int2.check(isBetween({ minimum: 1, maximum: 1e4 }))),
|
|
363
|
-
maxDurationMs: optionalKey(Int2.check(isBetween({ minimum: 1, maximum: 86400000 })))
|
|
331
|
+
urlFilter: optionalKey(String3)
|
|
364
332
|
});
|
|
365
333
|
var NetworkSessionRequest = Struct({ sessionId: NonEmptyString });
|
|
366
|
-
var NetworkStopRequest = NetworkSessionRequest.pipe(fieldsAssign({
|
|
367
|
-
outputPath: optionalKey(String3)
|
|
368
|
-
}));
|
|
369
334
|
var NetworkStatusResponse = Struct({
|
|
370
335
|
active: Boolean3,
|
|
371
336
|
startedAt: optionalKey(String3),
|
|
@@ -376,29 +341,46 @@ var NetworkStatusResponse = Struct({
|
|
|
376
341
|
truncatedBodyCount: Number2,
|
|
377
342
|
droppedEntryCount: Number2,
|
|
378
343
|
urlFilter: optionalKey(String3),
|
|
379
|
-
resourceTypes: optionalKey(ArraySchema(String3)),
|
|
380
|
-
content: optionalKey(NetworkContentMode),
|
|
381
344
|
endsAt: optionalKey(String3),
|
|
382
345
|
ended: optionalKey(String3)
|
|
383
346
|
});
|
|
384
|
-
var
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
347
|
+
var NetworkHeader = Struct({
|
|
348
|
+
name: String3,
|
|
349
|
+
value: String3
|
|
350
|
+
});
|
|
351
|
+
var NetworkBody = Struct({
|
|
352
|
+
size: Number2,
|
|
353
|
+
mimeType: String3,
|
|
354
|
+
text: optionalKey(String3),
|
|
355
|
+
truncated: Boolean3
|
|
356
|
+
});
|
|
357
|
+
var NetworkExchange = Struct({
|
|
358
|
+
id: String3,
|
|
359
|
+
startedDateTime: String3,
|
|
360
|
+
durationMs: Number2,
|
|
361
|
+
request: Struct({
|
|
362
|
+
method: String3,
|
|
363
|
+
url: String3,
|
|
364
|
+
headers: ArraySchema(NetworkHeader),
|
|
365
|
+
resourceType: String3,
|
|
366
|
+
body: optionalKey(NetworkBody),
|
|
367
|
+
redirectedFrom: optionalKey(String3)
|
|
368
|
+
}),
|
|
369
|
+
response: optionalKey(Struct({
|
|
370
|
+
status: Number2,
|
|
371
|
+
statusText: String3,
|
|
372
|
+
headers: ArraySchema(NetworkHeader),
|
|
373
|
+
body: optionalKey(NetworkBody)
|
|
374
|
+
})),
|
|
375
|
+
failure: optionalKey(String3)
|
|
392
376
|
});
|
|
377
|
+
var NetworkStopRequest = NetworkSessionRequest;
|
|
393
378
|
var NetworkStopResponse = NetworkStatusResponse.pipe(fieldsAssign({
|
|
394
379
|
active: Literal(false),
|
|
395
380
|
stoppedAt: String3,
|
|
396
|
-
|
|
397
|
-
endpoints: optionalKey(ArraySchema(NetworkEndpointDigest))
|
|
381
|
+
exchanges: ArraySchema(NetworkExchange)
|
|
398
382
|
}));
|
|
399
383
|
var NetworkCancelResponse = Struct({ cancelled: Boolean3 });
|
|
400
|
-
var RecordingMode = Literals(["tab-capture", "cdp"]);
|
|
401
|
-
var RecordingRequestedMode = Literals(["auto", "tab-capture", "cdp"]);
|
|
402
384
|
var RecordingFrameRate = Number2.check(isInt(), isBetween({ minimum: 1, maximum: 60 }));
|
|
403
385
|
var RecordingQuality = Struct({
|
|
404
386
|
width: Number2,
|
|
@@ -420,13 +402,8 @@ var RecordingTargetRequest = Struct({
|
|
|
420
402
|
});
|
|
421
403
|
var RecordingStartRequest = RecordingTargetRequest.pipe(fieldsAssign({
|
|
422
404
|
outputPath: String3,
|
|
423
|
-
mode: optionalKey(RecordingRequestedMode),
|
|
424
|
-
audio: optionalKey(Boolean3),
|
|
425
405
|
frameRate: optionalKey(RecordingFrameRate),
|
|
426
|
-
|
|
427
|
-
audioBitsPerSecond: optionalKey(Number2),
|
|
428
|
-
maxDurationMs: optionalKey(Number2),
|
|
429
|
-
cursor: optionalKey(Boolean3)
|
|
406
|
+
maxDurationMs: optionalKey(Number2)
|
|
430
407
|
}));
|
|
431
408
|
var RecordingArtifactType = Literals(["webm", "mp4"]);
|
|
432
409
|
var RecordingStartResponse = Struct({
|
|
@@ -435,7 +412,6 @@ var RecordingStartResponse = Struct({
|
|
|
435
412
|
startedAt: optionalKey(Number2),
|
|
436
413
|
path: optionalKey(String3),
|
|
437
414
|
mimeType: optionalKey(String3),
|
|
438
|
-
mode: optionalKey(RecordingMode),
|
|
439
415
|
artifactType: optionalKey(RecordingArtifactType),
|
|
440
416
|
frameRate: optionalKey(Number2),
|
|
441
417
|
error: optionalKey(String3)
|
|
@@ -446,7 +422,6 @@ var RecordingStopResponse = Struct({
|
|
|
446
422
|
duration: optionalKey(Number2),
|
|
447
423
|
path: optionalKey(String3),
|
|
448
424
|
size: optionalKey(Number2),
|
|
449
|
-
mode: optionalKey(RecordingMode),
|
|
450
425
|
artifactType: optionalKey(RecordingArtifactType),
|
|
451
426
|
frameCount: optionalKey(Number2),
|
|
452
427
|
quality: optionalKey(RecordingQuality),
|
|
@@ -458,7 +433,6 @@ var RecordingStatusResponse = Struct({
|
|
|
458
433
|
startedAt: optionalKey(Number2),
|
|
459
434
|
path: optionalKey(String3),
|
|
460
435
|
size: optionalKey(Number2),
|
|
461
|
-
mode: optionalKey(RecordingMode),
|
|
462
436
|
artifactType: optionalKey(RecordingArtifactType),
|
|
463
437
|
frameCount: optionalKey(Number2),
|
|
464
438
|
quality: optionalKey(RecordingQuality)
|
|
@@ -489,37 +463,6 @@ var RecordingCancelResponse = Struct({
|
|
|
489
463
|
success: Boolean3,
|
|
490
464
|
error: optionalKey(String3)
|
|
491
465
|
});
|
|
492
|
-
var FlightRecorderStartRequest = RecordingTargetRequest.pipe(fieldsAssign({
|
|
493
|
-
retentionMs: optionalKey(Number2.check(isInt(), isBetween({ minimum: 1000, maximum: 120000 }))),
|
|
494
|
-
frameRate: optionalKey(RecordingFrameRate),
|
|
495
|
-
cursor: optionalKey(Boolean3)
|
|
496
|
-
}));
|
|
497
|
-
var FlightRecorderStatusResponse = Struct({
|
|
498
|
-
active: Boolean3,
|
|
499
|
-
tabId: optionalKey(Number2),
|
|
500
|
-
sessionId: optionalKey(String3),
|
|
501
|
-
startedAt: optionalKey(Number2),
|
|
502
|
-
retentionMs: optionalKey(Number2),
|
|
503
|
-
retainedDurationMs: optionalKey(Number2),
|
|
504
|
-
frameRate: optionalKey(Number2),
|
|
505
|
-
bufferedFrames: optionalKey(Number2),
|
|
506
|
-
bufferedBytes: optionalKey(Number2),
|
|
507
|
-
sourceFrameCount: optionalKey(Number2),
|
|
508
|
-
droppedFrameCount: optionalKey(Number2),
|
|
509
|
-
saving: optionalKey(Boolean3)
|
|
510
|
-
});
|
|
511
|
-
var FlightRecorderSaveRequest = RecordingTargetRequest.pipe(fieldsAssign({
|
|
512
|
-
outputPath: String3,
|
|
513
|
-
durationMs: optionalKey(Number2.check(isInt(), isGreaterThan(0)))
|
|
514
|
-
}));
|
|
515
|
-
var FlightRecorderSaveResponse = Struct({
|
|
516
|
-
path: String3,
|
|
517
|
-
durationMs: Number2,
|
|
518
|
-
frameCount: Number2,
|
|
519
|
-
sourceFrameCount: Number2,
|
|
520
|
-
droppedFrameCount: Number2
|
|
521
|
-
});
|
|
522
|
-
var FlightRecorderCancelResponse = Struct({ cancelled: Boolean3 });
|
|
523
466
|
var RelayErrorCode = Literals([
|
|
524
467
|
"browser-unavailable",
|
|
525
468
|
"invalid-request",
|
|
@@ -976,4 +919,4 @@ async function dataUrlDocument2(url) {
|
|
|
976
919
|
return;
|
|
977
920
|
}
|
|
978
921
|
|
|
979
|
-
export { isNodeError, isUnsupportedDirectorySyncError,
|
|
922
|
+
export { isNodeError, isUnsupportedDirectorySyncError, ensurePrivateDirectorySync, writePrivateJsonFileSync, SessionContainer, SessionsContainer, SessionDeleted, SessionResetResponse, ExecuteRequest, SessionAdoptRequest, SessionNewRequest, SessionEnsureRequest, SessionIdRequest, SessionAllowlistRequest, SessionAdoptResponse, ExecuteLogEntry, ExecuteLogSummary, ExecuteAftermath, ExecuteResponse, AuthenticatedJsonRequest, AuthenticatedJsonOutcome, TargetSummaries, ExtensionStatus, RelayVersion, RelayShutdownRequest, RelayShutdownResponse, NetworkStartRequest, NetworkSessionRequest, NetworkStatusResponse, NetworkStopRequest, NetworkStopResponse, NetworkCancelResponse, RecordingQuality, RecordingTargetRequest, RecordingStartRequest, RecordingStartResponse, RecordingStopResponse, RecordingStatusResponse, TabsCleanupResponse, SettingsGetResponse, SettingsSetResponse, RecordingCancelResponse, RelayErrorCode, ErrorEnvelope, HttpRouteError2, formatHostForUrl2, listenHttpServer2, closeHttpServer2, closeWebSocketServer2, logCloseError2, sendJson2, readJsonBody2, stableUnpackedExtensionOrigin2, chromeExtensionOriginForPath2, parseAdditionalExtensionOrigins2, validateHostHeader2, validateBrowserFetchSite2, validateWebSocketOrigin2, defaultHost2, defaultPort2, optionalSessionId2, isValidSessionId2, requiredSessionId2, parseTargetSelection2, generateSessionId2, sendCdpResponse2, sendCdpEvent2, getObject2, getString2, createTargetUrl2, getNumber2, getIdText2, headerValue2, getTargetInfo2, isRestrictedTarget2, isRestrictedUrl2, dataUrlDocument2 };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/agent-guide.ts
|
|
2
|
+
var whatBrowseIs = `browse drives the user's real Chrome-family browser through the browse extension, so logins, extensions and open tabs are already there and the user can watch or take over.`;
|
|
3
|
+
var inspectActVerify = `Use one loop: inspect, act, verify.
|
|
4
|
+
- Inspect with \`await snapshot()\` before choosing anything. Prefer the returned refs: \`await ref("e12").click()\`. Fall back to accessible locators (\`page.getByRole(...)\`, \`getByLabel(...)\`), then CSS.
|
|
5
|
+
- Act with the narrowest stable control, and keep dependent steps in one \`execute\` while transient UI is open.
|
|
6
|
+
- Verify with a fresh page read (\`page.url()\`, a heading, or a new snapshot). A click that returned, or a handoff the user acknowledged, is not proof the task succeeded.`;
|
|
7
|
+
var handoffAdvice = `When only a person can proceed — login, 2FA, passkey, captcha or payment confirmation — call \`handoff("what the user should do")\` and wait. Pass \`start\` for an action that itself blocks. Never solve a captcha yourself and never retry-loop a blocked site; if a challenge is interactive or the site refuses the visit, hand off or stop and tell the user.`;
|
|
8
|
+
var sessionAdvice = `Each agent has its own current session when the client names the agent (OpenCode does), so bare calls don't land on another agent's page. When the client doesn't name agents, \`status\` reports \`sharedSession: true\` and all agents on this server share one current session, so when several (such as subagents) use it each should \`session_new\` its own and pass \`session\` on every call. When finished, \`session_reset\` (or \`session_delete\`) your own session; keep a session only when follow-up work is expected.`;
|
|
9
|
+
var agentHelp = `AGENT GUIDE
|
|
10
|
+
browse drives the user's real Chrome-family browser through the browse extension, so logins,
|
|
11
|
+
extensions and open tabs are already there and the user can watch or take over. Agents normally
|
|
12
|
+
use the MCP server (\`browse mcp\`); the same loop works from a terminal.
|
|
13
|
+
|
|
14
|
+
Write one Playwright script to a file and run it:
|
|
15
|
+
browse execute --file script.js
|
|
16
|
+
It receives browser, context, page, state, snapshot(), ref() and handoff(). \`return\` a value to
|
|
17
|
+
get it back.
|
|
18
|
+
|
|
19
|
+
Inspect, act, verify:
|
|
20
|
+
- \`await snapshot()\` before choosing anything; click the returned refs (\`await ref("e12").click()\`).
|
|
21
|
+
- Fall back to accessible locators (\`page.getByRole(...)\`), then CSS.
|
|
22
|
+
- Keep dependent steps in one script while transient UI is open.
|
|
23
|
+
- Verify with a fresh page read (\`page.url()\`, a heading, a new snapshot); a click that returned
|
|
24
|
+
proves nothing.
|
|
25
|
+
|
|
26
|
+
When only a person can proceed (login, 2FA, passkey, captcha, payment), call
|
|
27
|
+
\`handoff("what to do")\` and wait. Never solve a captcha yourself.
|
|
28
|
+
|
|
29
|
+
Pass \`--session\` to keep one session across calls. \`browse session reset\` or \`browse session delete\`
|
|
30
|
+
it when done; keep a session only for follow-up work.`;
|
|
31
|
+
|
|
32
|
+
export { whatBrowseIs, inspectActVerify, handoffAdvice, sessionAdvice, agentHelp };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeRunMain2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-zrjcdksk.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Error2,
|
|
6
6
|
TaggedError,
|
|
7
7
|
tag2,
|
|
8
8
|
Error3
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-z4c819pg.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./main-j98fzrvv.mjs";
|
|
@@ -190,7 +190,7 @@ import {
|
|
|
190
190
|
fnUntraced,
|
|
191
191
|
clockWith,
|
|
192
192
|
effectify
|
|
193
|
-
} from "./main-
|
|
193
|
+
} from "./main-d1th6z2h.mjs";
|
|
194
194
|
|
|
195
195
|
// node_modules/@effect/platform-node/dist/NodeHttpClient.js
|
|
196
196
|
var exports_NodeHttpClient = {};
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
uninterruptibleMask,
|
|
23
23
|
ClockRef,
|
|
24
24
|
currentTimeMillis2
|
|
25
|
-
} from "./main-
|
|
25
|
+
} from "./main-d1th6z2h.mjs";
|
|
26
26
|
|
|
27
27
|
// node_modules/effect/dist/Clock.js
|
|
28
28
|
var Clock = ClockRef;
|
|
@@ -130,7 +130,7 @@ class SemaphoreImpl {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var make = (permits) => sync(() => new SemaphoreImpl(permits));
|
|
134
134
|
|
|
135
135
|
// node_modules/effect/dist/internal/matcher.js
|
|
136
136
|
var TypeId = "~effect/Match/Matcher";
|
|
@@ -324,4 +324,4 @@ var boolean = isBoolean;
|
|
|
324
324
|
var orElse = orElse2;
|
|
325
325
|
var exhaustive = exhaustive2;
|
|
326
326
|
|
|
327
|
-
export { Clock, currentTimeMillis, makeUnsafe,
|
|
327
|
+
export { Clock, currentTimeMillis, makeUnsafe, make, type, value, when, tag, tags, is, string, number, boolean, orElse, exhaustive };
|
|
@@ -49,7 +49,6 @@ function fromCheckout() {
|
|
|
49
49
|
return !compiledBinary() && fs.existsSync(path.join(packageRoot(), "src", "main.ts"));
|
|
50
50
|
}
|
|
51
51
|
var compiledBinary = () => globalThis.__OPENCODE_BROWSER_COMPILED__ === true;
|
|
52
|
-
var binaryPackage = () => globalThis.__OPENCODE_BROWSER_TARGET__ ? `@opencode/browse-${globalThis.__OPENCODE_BROWSER_TARGET__}` : undefined;
|
|
53
52
|
var binaryName = (platform = process.platform) => platform === "win32" ? "browse.exe" : "browse";
|
|
54
53
|
var scriptEntry = (entry) => /\.[cm]?[jt]s$/.test(entry);
|
|
55
54
|
var entryCommand = (entry, node = process.execPath) => scriptEntry(entry) ? [node, entry] : [entry];
|
|
@@ -106,7 +105,7 @@ function cliInstall() {
|
|
|
106
105
|
return { kind: "binary", binary: installedBinary() ?? process.execPath, pathEnv: process.env.PATH };
|
|
107
106
|
if (fromCheckout())
|
|
108
107
|
return { kind: "checkout", bundle: path.join(packageRoot(), "dist", "cli.mjs") };
|
|
109
|
-
return { kind: "npm", version: "0.0.17-dev.
|
|
108
|
+
return { kind: "npm", version: "0.0.17-dev.189", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
|
|
110
109
|
}
|
|
111
110
|
function cliPrefix(install = cliInstall()) {
|
|
112
111
|
if (install.kind === "binary") {
|
|
@@ -128,7 +127,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
|
|
|
128
127
|
return id ? { id } : {};
|
|
129
128
|
}
|
|
130
129
|
var RELEASE_SERVICE = "https://anoma.ly/release";
|
|
131
|
-
function devExtension(baked = { file: "browse-extension-0.0.17-dev.
|
|
130
|
+
function devExtension(baked = { file: "browse-extension-0.0.17-dev.189.zip", sha256: "f2330c36e183042fac920edb3554cd073df4ba69b774da79bf327384e228c4a5", size: 184458 }) {
|
|
132
131
|
return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
|
|
133
132
|
}
|
|
134
133
|
var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
|
|
@@ -138,4 +137,4 @@ function installCommand() {
|
|
|
138
137
|
return fromCheckout() ? `cd ${quoted(path.dirname(packageRoot()))} && bun run setup` : cliCommand("install");
|
|
139
138
|
}
|
|
140
139
|
|
|
141
|
-
export { defaultRoots, configRoot2, dataRoot, stateRoot, cacheRoot, binRoot, installedBinaryPath, installerBinaryPath, defaultSettingsPath, oldStoreMarker, fromCheckout, compiledBinary,
|
|
140
|
+
export { defaultRoots, configRoot2, dataRoot, stateRoot, cacheRoot, binRoot, installedBinaryPath, installerBinaryPath, defaultSettingsPath, oldStoreMarker, fromCheckout, compiledBinary, binaryName, scriptEntry, entryCommand, resolveWindowsShim, entrySpawnCommand, installedBinary, runningEntry, checkoutRoot, cliPrefix, cliCommand, PUBLIC_STORE_ID, storeConfig, RELEASE_SERVICE, devExtension, devExtensionUrl, devExtensionFolder, storeUrl, installCommand };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePrivateJsonFileSync,
|
|
3
3
|
defaultPort2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-g82bc5x3.mjs";
|
|
5
5
|
import {
|
|
6
6
|
stateRoot
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-kd8f1nq2.mjs";
|
|
8
8
|
|
|
9
9
|
// src/relay/port.ts
|
|
10
10
|
import fs from "node:fs";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
TaggedError3,
|
|
35
35
|
Number3,
|
|
36
36
|
isLessThan,
|
|
37
|
-
|
|
37
|
+
isGreaterThan,
|
|
38
38
|
isLessThanOrEqualTo,
|
|
39
39
|
isGreaterThanOrEqualTo2,
|
|
40
40
|
none,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
mapBothEager,
|
|
87
87
|
flatMapEager,
|
|
88
88
|
fnUntracedEager
|
|
89
|
-
} from "./main-
|
|
89
|
+
} from "./main-d1th6z2h.mjs";
|
|
90
90
|
|
|
91
91
|
// node_modules/effect/dist/Data.js
|
|
92
92
|
var Class = class extends Class3 {
|
|
@@ -4795,22 +4795,6 @@ function isBase64(annotations) {
|
|
|
4795
4795
|
});
|
|
4796
4796
|
}
|
|
4797
4797
|
var Finite = /* @__PURE__ */ make8(finite);
|
|
4798
|
-
function makeIsGreaterThan(options) {
|
|
4799
|
-
const gt = isGreaterThan2(options.order);
|
|
4800
|
-
const formatter = options.formatter ?? format;
|
|
4801
|
-
return (exclusiveMinimum, annotations) => {
|
|
4802
|
-
return makeFilter((input) => gt(input, exclusiveMinimum), {
|
|
4803
|
-
expected: `a value greater than ${formatter(exclusiveMinimum)}`,
|
|
4804
|
-
arbitraryConstraint: {
|
|
4805
|
-
order: options.order,
|
|
4806
|
-
minimum: exclusiveMinimum,
|
|
4807
|
-
exclusiveMinimum: true
|
|
4808
|
-
},
|
|
4809
|
-
...options.annotate?.(exclusiveMinimum),
|
|
4810
|
-
...annotations
|
|
4811
|
-
});
|
|
4812
|
-
};
|
|
4813
|
-
}
|
|
4814
4798
|
function makeIsGreaterThanOrEqualTo(options) {
|
|
4815
4799
|
const gte = isGreaterThanOrEqualTo2(options.order);
|
|
4816
4800
|
const formatter = options.formatter ?? format;
|
|
@@ -4828,7 +4812,7 @@ function makeIsGreaterThanOrEqualTo(options) {
|
|
|
4828
4812
|
}
|
|
4829
4813
|
function makeIsBetween(deriveOptions) {
|
|
4830
4814
|
const greaterThanOrEqualTo = isGreaterThanOrEqualTo2(deriveOptions.order);
|
|
4831
|
-
const greaterThan =
|
|
4815
|
+
const greaterThan = isGreaterThan(deriveOptions.order);
|
|
4832
4816
|
const lessThanOrEqualTo = isLessThanOrEqualTo(deriveOptions.order);
|
|
4833
4817
|
const lessThan = isLessThan(deriveOptions.order);
|
|
4834
4818
|
const formatter = deriveOptions.formatter ?? format;
|
|
@@ -4859,23 +4843,6 @@ function encodeNumberPayload(number) {
|
|
|
4859
4843
|
}
|
|
4860
4844
|
return number;
|
|
4861
4845
|
}
|
|
4862
|
-
var isGreaterThan = /* @__PURE__ */ makeIsGreaterThan({
|
|
4863
|
-
order: Number3,
|
|
4864
|
-
annotate: (exclusiveMinimum) => ({
|
|
4865
|
-
representation: {
|
|
4866
|
-
id: "effect/schema/isGreaterThan",
|
|
4867
|
-
payload: {
|
|
4868
|
-
exclusiveMinimum: encodeNumberPayload(exclusiveMinimum)
|
|
4869
|
-
}
|
|
4870
|
-
},
|
|
4871
|
-
toJsonSchema: () => ({
|
|
4872
|
-
exclusiveMinimum
|
|
4873
|
-
}),
|
|
4874
|
-
toCode: () => ({
|
|
4875
|
-
runtime: `Schema.isGreaterThan(${format(exclusiveMinimum)})`
|
|
4876
|
-
})
|
|
4877
|
-
})
|
|
4878
|
-
});
|
|
4879
4846
|
var isGreaterThanOrEqualTo = /* @__PURE__ */ makeIsGreaterThanOrEqualTo({
|
|
4880
4847
|
order: Number3,
|
|
4881
4848
|
annotate: (minimum) => ({
|
|
@@ -5542,4 +5509,4 @@ var Json = /* @__PURE__ */ make8(/* @__PURE__ */ annotate(Json2, {
|
|
|
5542
5509
|
}));
|
|
5543
5510
|
var JsonObject = /* @__PURE__ */ Record(String3, Json);
|
|
5544
5511
|
|
|
5545
|
-
export { Class, taggedEnum, Error2, TaggedError, encode, decode, Pointer, defaultFormatter, passthrough, transformEffect, transformOptional, withDefault2, Transformation, unknown, applyToSelfOrLastLinkEncoding, decodeTo, toEncoded, _is, decodeUnknownEffect, omit, declare, SchemaError, is2, decodeUnknownEffect2, decodeUnknownOption, decodeUnknownResult, decodeUnknownSync, decodeSync, encodeUnknownEffect, encodeEffect, encodeUnknownOption, encodeSync, make8, isSchema, optionalKey, optional, toType, toEncoded2, Literal, TemplateLiteral, Never, Any, Unknown, Null, String3, Number2, Boolean3, Void, Struct, fieldsAssign, Record, StructWithRest, Tuple, ArraySchema, NonEmptyArray, Union, Literals, NullOr, UndefinedOr, decodeTo2, TrueLiterals, FalseLiterals, BooleanLiterals, decode2, withConstructorDefault, tag2, TaggedStruct, TaggedUnion, Opaque, makeFilter, isPattern, Finite,
|
|
5512
|
+
export { Class, taggedEnum, Error2, TaggedError, encode, decode, Pointer, defaultFormatter, passthrough, transformEffect, transformOptional, withDefault2, Transformation, unknown, applyToSelfOrLastLinkEncoding, decodeTo, toEncoded, _is, decodeUnknownEffect, omit, declare, SchemaError, is2, decodeUnknownEffect2, decodeUnknownOption, decodeUnknownResult, decodeUnknownSync, decodeSync, encodeUnknownEffect, encodeEffect, encodeUnknownOption, encodeSync, make8, isSchema, optionalKey, optional, toType, toEncoded2, Literal, TemplateLiteral, Never, Any, Unknown, Null, String3, Number2, Boolean3, Void, Struct, fieldsAssign, Record, StructWithRest, Tuple, ArraySchema, NonEmptyArray, Union, Literals, NullOr, UndefinedOr, decodeTo2, TrueLiterals, FalseLiterals, BooleanLiterals, decode2, withConstructorDefault, tag2, TaggedStruct, TaggedUnion, Opaque, makeFilter, isPattern, Finite, isGreaterThanOrEqualTo, isBetween, isInt, Int2, isMaxLength, NonEmptyString, Defect, Uint8ArrayFromBase64, Exit, Class2, Error3, TaggedError2, toJsonSchemaDocument, toCodecJson, toCodecStringTree, Json, JsonObject };
|