@opencode/browse 0.0.6-dev.25 → 0.0.6-dev.28
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/{cli-df3reayk.mjs → cli-wgxfjgb3.mjs} +10 -67
- package/dist/cli.mjs +12 -13
- package/dist/{helpers-wjdq3qza.mjs → helpers-3fm1nwkt.mjs} +1 -1
- package/dist/main-4t3a1fw9.mjs +4 -0
- package/dist/{main-7pxrvrp0.mjs → main-8h1nwn45.mjs} +4 -34
- package/dist/{main-hh2mneh8.mjs → main-8ncff5jp.mjs} +4 -3
- package/dist/{main-xj8td7qw.mjs → main-rsqahh12.mjs} +33 -468
- package/dist/{main-spqvtmdy.mjs → main-scyv26xb.mjs} +2 -2
- package/dist/{main-mm82qqzb.mjs → main-tfkqwwrb.mjs} +3 -3
- package/dist/{main-tf22ynec.mjs → main-x8w3s3rv.mjs} +1 -1
- package/dist/{main-e83a20ce.mjs → main-xg3r1ze3.mjs} +2 -2
- package/dist/{mcp-dm33x3m1.mjs → mcp-7jjntfwf.mjs} +11 -78
- package/dist/{relay-qqjvahw5.mjs → relay-epeqzmcr.mjs} +38 -1107
- package/dist/{runtime-update-ypj67htb.mjs → runtime-update-3925nwpw.mjs} +4 -4
- package/dist/{setup-wwftne2g.mjs → setup-ys0qf6by.mjs} +20 -67
- package/dist/{skill-text-v35020jn.mjs → skill-text-rc6te209.mjs} +2 -78
- package/dist/{supervisor-sdq88esk.mjs → supervisor-yb615ygt.mjs} +3 -3
- package/dist/{update-fgnt6628.mjs → update-wjkqfk5f.mjs} +3 -3
- package/dist/{version-gv6f38gy.mjs → version-rh26jqa2.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +2 -78
- package/dist/main-sdmv8gfv.mjs +0 -4
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
compareVersions,
|
|
7
7
|
npmRuntime,
|
|
8
8
|
autoUpdateStatus
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-8ncff5jp.mjs";
|
|
10
10
|
import {
|
|
11
11
|
unpackedReloadAdvice
|
|
12
12
|
} from "./main-3gthmkzw.mjs";
|
|
@@ -315,7 +315,7 @@ function runUpdate(args, deps) {
|
|
|
315
315
|
async function runUpdateCommand2(args) {
|
|
316
316
|
const log = (line) => process.stdout.write(line + `
|
|
317
317
|
`);
|
|
318
|
-
const { runNpmUpdate } = await import("./runtime-update-
|
|
318
|
+
const { runNpmUpdate } = await import("./runtime-update-3925nwpw.mjs");
|
|
319
319
|
if (await runNpmUpdate(args))
|
|
320
320
|
return;
|
|
321
321
|
if (compiledBinary()) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNodeError
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-x8w3s3rv.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-8h1nwn45.mjs";
|
|
7
7
|
import {
|
|
8
8
|
dataRoot
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-8ncff5jp.mjs";
|
|
10
10
|
|
|
11
11
|
// src/session-manager/journal.ts
|
|
12
12
|
import fs from "node:fs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePrivateJsonFileSync
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-x8w3s3rv.mjs";
|
|
4
4
|
import {
|
|
5
5
|
dataRoot,
|
|
6
6
|
devExtensionUrl,
|
|
7
7
|
devExtensionFolder
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-8ncff5jp.mjs";
|
|
9
9
|
|
|
10
10
|
// src/relay/browser-pairing.ts
|
|
11
11
|
import crypto from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-4t3a1fw9.mjs";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateStatus
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-8ncff5jp.mjs";
|
|
7
7
|
import"./main-3gthmkzw.mjs";
|
|
8
8
|
import {
|
|
9
9
|
getObject2,
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
relayBuildProblem,
|
|
13
13
|
ensureRelay,
|
|
14
14
|
ensureExtensionConnected
|
|
15
|
-
} from "./main-
|
|
16
|
-
import"./main-
|
|
15
|
+
} from "./main-8h1nwn45.mjs";
|
|
16
|
+
import"./main-x8w3s3rv.mjs";
|
|
17
17
|
import {
|
|
18
18
|
updateJson2,
|
|
19
19
|
createUpdateWatcher2
|
|
20
|
-
} from "./main-
|
|
20
|
+
} from "./main-scyv26xb.mjs";
|
|
21
21
|
import {
|
|
22
22
|
settingKeys,
|
|
23
23
|
settingSpecs,
|
|
@@ -41,9 +41,8 @@ import {
|
|
|
41
41
|
toolResultForValue2,
|
|
42
42
|
mcpErrorMessage2,
|
|
43
43
|
toolResult,
|
|
44
|
-
readClient,
|
|
45
44
|
listSecrets
|
|
46
|
-
} from "./main-
|
|
45
|
+
} from "./main-rsqahh12.mjs";
|
|
47
46
|
|
|
48
47
|
// src/mcp.ts
|
|
49
48
|
import { NodeStdio } from "@effect/platform-node";
|
|
@@ -179,7 +178,7 @@ registerMcpTools({
|
|
|
179
178
|
destructive: false,
|
|
180
179
|
idempotent: true,
|
|
181
180
|
handle: () => Effect.tryPromise({
|
|
182
|
-
try: () => import("./skill-text-
|
|
181
|
+
try: () => import("./skill-text-rc6te209.mjs").then((module) => module.skillText),
|
|
183
182
|
catch: (cause) => new Error("read opencode-browser skill", { cause })
|
|
184
183
|
})
|
|
185
184
|
}
|
|
@@ -198,7 +197,7 @@ registerMcpTools({
|
|
|
198
197
|
inputSchema: objectSchema({
|
|
199
198
|
code: {
|
|
200
199
|
type: "string",
|
|
201
|
-
description:
|
|
200
|
+
description: "JavaScript code to execute. It receives browser, context, page, state, modules (path, url, util, crypto, buffer, zlib, events, stream), files (dir, path, write, read), fillInput, fillInputs, snapshot(options?) for compact semantic outlines (options: find to search them, diff or delta for changes), persistent compatible ref(id) locators, webmcp (list/call), screenshot helpers, ariaSnapshot, ghostCursor, handoff, demonstrate, network capture, pageConsole (start/stop capturing the page's own console messages and errors, off by default because pages can detect it), and secrets.type(locator, name) to type a stored site secret (see secrets_list) only on its allowed origins, without seeing it."
|
|
202
201
|
},
|
|
203
202
|
session: {
|
|
204
203
|
type: "string",
|
|
@@ -564,80 +563,14 @@ registerMcpTools({
|
|
|
564
563
|
{
|
|
565
564
|
name: "secrets_list",
|
|
566
565
|
requiresRelayCompatibility: false,
|
|
567
|
-
description:
|
|
566
|
+
description: "List what agents may type without seeing: site secrets the user stored (names, kinds and allowed origins; type them with secrets.type(target, name) in execute; only the user adds them with `opencode-browser secrets add`).",
|
|
568
567
|
inputSchema: sessionOnlyInputSchema,
|
|
569
568
|
readOnly: true,
|
|
570
569
|
destructive: false,
|
|
571
570
|
idempotent: true,
|
|
572
|
-
handle: (
|
|
571
|
+
handle: () => Effect5.gen(function* () {
|
|
573
572
|
const secrets = yield* listSecrets();
|
|
574
|
-
|
|
575
|
-
return {
|
|
576
|
-
secrets,
|
|
577
|
-
deadbolt: {
|
|
578
|
-
connected: false,
|
|
579
|
-
logins: [],
|
|
580
|
-
passkeys: [],
|
|
581
|
-
note: "browse isn't connected to Deadbolt. The user can connect it with `opencode-browser deadbolt connect` and grant logins with `deadbolt agents allow <site>`."
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
const deadbolt = yield* ctx.relay.deadboltLogins({ sessionId: ctx.resolveSessionId(input) }).pipe(Effect5.catch((error) => Effect5.succeed({
|
|
586
|
-
connected: true,
|
|
587
|
-
origins: [],
|
|
588
|
-
logins: [],
|
|
589
|
-
passkeys: [],
|
|
590
|
-
error: { code: "unavailable", message: error.message }
|
|
591
|
-
})));
|
|
592
|
-
return { secrets, deadbolt };
|
|
593
|
-
})
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
name: "signin",
|
|
597
|
-
description: 'Sign in to a site in the session\'s page with a Deadbolt login the user granted to browse, without seeing any value. The relay does the whole sign-in in one call: username, submit, password, an authenticator (TOTP) code when asked (split boxes too), "Use password instead" toggles, and Sign in with Google when a Google login is granted. A username also picks the passkey account when the site signs in with a passkey. Returns only {status: signed_in | needs_user | needs_choice | not_granted | failed, step, reason}; needs_choice comes with choices [{username, displayName}] when several passkeys could sign in: call again with one username. needs_user means a captcha, a code sent by SMS or email, a push approval or a new-device check: hand it to the user with handoff() in execute. not_granted: tell the user what to allow (`deadbolt agents allow <site>`). Navigate to the sign-in page first, or pass site.',
|
|
598
|
-
inputSchema: objectSchema({
|
|
599
|
-
site: {
|
|
600
|
-
type: "string",
|
|
601
|
-
description: "The login's site: a host like github.com, or an exact origin. Defaults to the page's site; the page goes there first when it is elsewhere."
|
|
602
|
-
},
|
|
603
|
-
username: {
|
|
604
|
-
type: "string",
|
|
605
|
-
description: "Which login (and which passkey account), when several are granted for the site."
|
|
606
|
-
},
|
|
607
|
-
session: sessionSchemaProperty,
|
|
608
|
-
timeoutMs: { type: "integer", minimum: 1, description: "Overall limit. Defaults to 90000." }
|
|
609
|
-
}),
|
|
610
|
-
readOnly: false,
|
|
611
|
-
destructive: true,
|
|
612
|
-
idempotent: false,
|
|
613
|
-
handle: (input) => Effect5.gen(function* () {
|
|
614
|
-
const object = input === undefined ? {} : requireObject(input);
|
|
615
|
-
const site = optionalStringField(object, "site");
|
|
616
|
-
const username = optionalStringField(object, "username");
|
|
617
|
-
const timeoutMs = optionalPositiveIntegerField(object, "timeoutMs");
|
|
618
|
-
const explicitSession = optionalStringField(object, "session");
|
|
619
|
-
const sessionId = explicitSession ?? ctx.currentSession.id;
|
|
620
|
-
yield* ensureExtensionConnected({ relay: ctx.relay, sessionId, waitForReconnect: true });
|
|
621
|
-
const options = {
|
|
622
|
-
...site ? { site } : {},
|
|
623
|
-
...username ? { username } : {},
|
|
624
|
-
...timeoutMs === undefined ? {} : { timeoutMs }
|
|
625
|
-
};
|
|
626
|
-
const outerTimeoutMs = timeoutMs === undefined ? 120000 : Math.max(60000, timeoutMs + 1e4);
|
|
627
|
-
const result = yield* ctx.relay.execute({
|
|
628
|
-
sessionId,
|
|
629
|
-
code: `return await secrets.signIn(${JSON.stringify(options)})`,
|
|
630
|
-
createIfMissing: !explicitSession,
|
|
631
|
-
timeoutMs: outerTimeoutMs
|
|
632
|
-
});
|
|
633
|
-
ctx.establishCurrentSession(sessionId);
|
|
634
|
-
if (result.isError)
|
|
635
|
-
return yield* Effect5.fail(new Error(result.text));
|
|
636
|
-
return {
|
|
637
|
-
...result.value,
|
|
638
|
-
...result.aftermath?.endUrl ? { url: result.aftermath.endUrl } : {},
|
|
639
|
-
...result.warnings?.length ? { warnings: result.warnings } : {}
|
|
640
|
-
};
|
|
573
|
+
return { secrets };
|
|
641
574
|
})
|
|
642
575
|
},
|
|
643
576
|
{
|