@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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultTeardown2,
|
|
3
|
+
makeRunMain2,
|
|
4
|
+
errorExitCode2,
|
|
5
|
+
getErrorExitCode2,
|
|
6
|
+
errorReported2,
|
|
7
|
+
getErrorReported2
|
|
8
|
+
} from "./main-9bk4pprj.mjs";
|
|
9
|
+
export {
|
|
10
|
+
defaultTeardown2 as defaultTeardown,
|
|
11
|
+
errorExitCode2 as errorExitCode,
|
|
12
|
+
errorReported2 as errorReported,
|
|
13
|
+
getErrorExitCode2 as getErrorExitCode,
|
|
14
|
+
getErrorReported2 as getErrorReported,
|
|
15
|
+
makeRunMain2 as makeRunMain
|
|
16
|
+
};
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
errorExitCode2,
|
|
4
|
+
errorReported2
|
|
5
|
+
} from "./main-9bk4pprj.mjs";
|
|
2
6
|
import {
|
|
3
7
|
make4,
|
|
4
8
|
value2,
|
|
5
9
|
take2,
|
|
6
10
|
FileSystem,
|
|
7
11
|
Path,
|
|
8
|
-
errorExitCode,
|
|
9
|
-
errorReported,
|
|
10
12
|
QuitError,
|
|
11
13
|
isQuitError,
|
|
12
14
|
Terminal,
|
|
13
15
|
runMain,
|
|
14
16
|
layer2
|
|
15
|
-
} from "./main-
|
|
17
|
+
} from "./main-bc8cjey0.mjs";
|
|
16
18
|
import {
|
|
17
19
|
opencodeBrowserVersion2,
|
|
18
20
|
opencodeBrowserBuildId2
|
|
19
|
-
} from "./main-
|
|
21
|
+
} from "./main-2n1a279y.mjs";
|
|
20
22
|
import {
|
|
21
23
|
configRoot2,
|
|
22
24
|
dataRoot,
|
|
@@ -29,7 +31,7 @@ import {
|
|
|
29
31
|
devExtension,
|
|
30
32
|
installCommand,
|
|
31
33
|
autoUpdateStatus
|
|
32
|
-
} from "./main-
|
|
34
|
+
} from "./main-65rqqv4r.mjs";
|
|
33
35
|
import {
|
|
34
36
|
extensionProtocolVersion,
|
|
35
37
|
extensionProtocolAdvice
|
|
@@ -55,29 +57,50 @@ import {
|
|
|
55
57
|
ensureExtensionConnected,
|
|
56
58
|
stoppedRelayStatus,
|
|
57
59
|
statusCollections
|
|
58
|
-
} from "./main-
|
|
59
|
-
import"./main-
|
|
60
|
+
} from "./main-gb5jg0mj.mjs";
|
|
61
|
+
import"./main-4h7rfhhr.mjs";
|
|
60
62
|
import {
|
|
61
63
|
updateJson2,
|
|
62
64
|
formatUpdateNotice2,
|
|
63
65
|
updateNotice2
|
|
64
|
-
} from "./main-
|
|
66
|
+
} from "./main-zq18j4rx.mjs";
|
|
65
67
|
import {
|
|
66
68
|
settingKeys,
|
|
67
69
|
formatSettings,
|
|
68
70
|
ensureSessionExists
|
|
69
|
-
} from "./main-
|
|
71
|
+
} from "./main-pchbej16.mjs";
|
|
70
72
|
import {
|
|
71
73
|
addSecret,
|
|
72
74
|
listSecrets,
|
|
73
75
|
removeSecret
|
|
74
|
-
} from "./main-
|
|
76
|
+
} from "./main-8rmfjhq4.mjs";
|
|
75
77
|
import {
|
|
76
78
|
defaultJournalBaseDir,
|
|
77
79
|
readJournalEntries,
|
|
78
80
|
formatJournalEntry
|
|
79
|
-
} from "./main-
|
|
80
|
-
import"./main-
|
|
81
|
+
} from "./main-4kvbqnpf.mjs";
|
|
82
|
+
import"./main-rvkfzxdh.mjs";
|
|
83
|
+
import {
|
|
84
|
+
taggedEnum,
|
|
85
|
+
is2,
|
|
86
|
+
decodeUnknownEffect2,
|
|
87
|
+
optionalKey,
|
|
88
|
+
optional,
|
|
89
|
+
Literal,
|
|
90
|
+
String3,
|
|
91
|
+
Struct,
|
|
92
|
+
Record,
|
|
93
|
+
ArraySchema,
|
|
94
|
+
Union,
|
|
95
|
+
TrueLiterals,
|
|
96
|
+
FalseLiterals,
|
|
97
|
+
BooleanLiterals,
|
|
98
|
+
TaggedStruct,
|
|
99
|
+
Int2,
|
|
100
|
+
Defect,
|
|
101
|
+
TaggedError2,
|
|
102
|
+
toCodecStringTree
|
|
103
|
+
} from "./main-v6hzbxjd.mjs";
|
|
81
104
|
import {
|
|
82
105
|
format,
|
|
83
106
|
assignProperty,
|
|
@@ -95,12 +118,12 @@ import {
|
|
|
95
118
|
exists,
|
|
96
119
|
Service2,
|
|
97
120
|
empty4,
|
|
98
|
-
|
|
121
|
+
make10,
|
|
99
122
|
Reference,
|
|
100
123
|
succeed,
|
|
101
124
|
fail2,
|
|
102
125
|
isFailure,
|
|
103
|
-
|
|
126
|
+
match3,
|
|
104
127
|
isReadonlyArrayNonEmpty,
|
|
105
128
|
findFirstIndex,
|
|
106
129
|
findFirst,
|
|
@@ -108,7 +131,6 @@ import {
|
|
|
108
131
|
empty5,
|
|
109
132
|
map3,
|
|
110
133
|
reduce,
|
|
111
|
-
taggedEnum,
|
|
112
134
|
sync,
|
|
113
135
|
ConsoleRef,
|
|
114
136
|
MinimumLogLevel,
|
|
@@ -137,11 +159,11 @@ import {
|
|
|
137
159
|
catchTags,
|
|
138
160
|
catchIf,
|
|
139
161
|
catchFilter,
|
|
140
|
-
|
|
162
|
+
mapError2,
|
|
141
163
|
orDie,
|
|
142
164
|
orElseSucceed,
|
|
143
165
|
raceFirst,
|
|
144
|
-
|
|
166
|
+
match4,
|
|
145
167
|
provide3,
|
|
146
168
|
provideContext2,
|
|
147
169
|
provideService,
|
|
@@ -149,26 +171,8 @@ import {
|
|
|
149
171
|
ensuring,
|
|
150
172
|
interrupt3,
|
|
151
173
|
fnUntraced,
|
|
152
|
-
fn
|
|
153
|
-
|
|
154
|
-
decodeUnknownEffect2,
|
|
155
|
-
optionalKey,
|
|
156
|
-
optional,
|
|
157
|
-
Literal,
|
|
158
|
-
String3,
|
|
159
|
-
Struct,
|
|
160
|
-
Record,
|
|
161
|
-
ArraySchema,
|
|
162
|
-
Union,
|
|
163
|
-
TrueLiterals,
|
|
164
|
-
FalseLiterals,
|
|
165
|
-
BooleanLiterals,
|
|
166
|
-
TaggedStruct,
|
|
167
|
-
Int2,
|
|
168
|
-
Defect,
|
|
169
|
-
TaggedError2,
|
|
170
|
-
toCodecStringTree
|
|
171
|
-
} from "./main-yf5j8g79.mjs";
|
|
174
|
+
fn
|
|
175
|
+
} from "./main-xycdhwqs.mjs";
|
|
172
176
|
import {
|
|
173
177
|
pipeArguments,
|
|
174
178
|
dual,
|
|
@@ -179,7 +183,7 @@ import {
|
|
|
179
183
|
isObject,
|
|
180
184
|
hasProperty,
|
|
181
185
|
isTagged
|
|
182
|
-
} from "./main-
|
|
186
|
+
} from "./main-qazf3bhk.mjs";
|
|
183
187
|
|
|
184
188
|
// node_modules/effect/dist/Number.js
|
|
185
189
|
var Number2 = globalThis.Number;
|
|
@@ -298,7 +302,7 @@ class UserError extends (/* @__PURE__ */ TaggedError2(`${TypeId}/UserError`)("Us
|
|
|
298
302
|
userMessage: /* @__PURE__ */ optionalKey(String3)
|
|
299
303
|
})) {
|
|
300
304
|
[TypeId] = TypeId;
|
|
301
|
-
[
|
|
305
|
+
[errorReported2] = true;
|
|
302
306
|
get message() {
|
|
303
307
|
if (this.userMessage)
|
|
304
308
|
return this.userMessage;
|
|
@@ -316,8 +320,8 @@ class ShowHelp extends (/* @__PURE__ */ TaggedError2(`${TypeId}/ShowHelp`)("Show
|
|
|
316
320
|
errors: /* @__PURE__ */ ArraySchema(NonShowHelpErrors)
|
|
317
321
|
})) {
|
|
318
322
|
[TypeId] = TypeId;
|
|
319
|
-
[
|
|
320
|
-
[
|
|
323
|
+
[errorExitCode2] = this.errors.length ? 1 : 0;
|
|
324
|
+
[errorReported2] = false;
|
|
321
325
|
get message() {
|
|
322
326
|
return "Help requested";
|
|
323
327
|
}
|
|
@@ -340,7 +344,7 @@ var makePrimitive = (tag, parse) => Object.assign(Object.create(Proto), {
|
|
|
340
344
|
var makeSchemaPrimitive = (tag, schema) => {
|
|
341
345
|
const toCodecStringTree2 = toCodecStringTree(schema);
|
|
342
346
|
const decode = decodeUnknownEffect2(toCodecStringTree2);
|
|
343
|
-
return makePrimitive(tag, (value) =>
|
|
347
|
+
return makePrimitive(tag, (value) => mapError2(decode(value), (error) => error.message));
|
|
344
348
|
};
|
|
345
349
|
var Boolean2 = /* @__PURE__ */ makeSchemaPrimitive("Boolean", BooleanLiterals);
|
|
346
350
|
var Int3 = /* @__PURE__ */ makeSchemaPrimitive("Int", Int2);
|
|
@@ -646,7 +650,7 @@ var run = /* @__PURE__ */ fnUntraced(function* (self) {
|
|
|
646
650
|
const terminal = yield* Terminal;
|
|
647
651
|
const input = yield* terminal.readInput;
|
|
648
652
|
return yield* runWithInput(self, terminal, input);
|
|
649
|
-
}, /* @__PURE__ */
|
|
653
|
+
}, /* @__PURE__ */ mapError2(() => new QuitError({})), scoped);
|
|
650
654
|
var getSelectInitialIndex = (choices) => {
|
|
651
655
|
let initialIndex = 0;
|
|
652
656
|
let seenSelected = -1;
|
|
@@ -864,7 +868,7 @@ var handleDateClear = (options) => {
|
|
|
864
868
|
const promptText = renderDateOutput(figures.prefix, figures.pointerSmall, parts, options, {
|
|
865
869
|
plain: true
|
|
866
870
|
});
|
|
867
|
-
const errorText = isSome(state.error) ?
|
|
871
|
+
const errorText = isSome(state.error) ? match3(state.error.value.split(NEWLINE_REGEXP), {
|
|
868
872
|
onEmpty: () => "",
|
|
869
873
|
onNonEmpty: (errorLines) => separateSymbol(figures.pointerSmall, errorLines.join(`
|
|
870
874
|
`))
|
|
@@ -1025,7 +1029,7 @@ var handleDateProcess = (options) => {
|
|
|
1025
1029
|
}
|
|
1026
1030
|
case "enter":
|
|
1027
1031
|
case "return": {
|
|
1028
|
-
return
|
|
1032
|
+
return match4(options.validate(state.value), {
|
|
1029
1033
|
onFailure: (error) => Action.NextFrame({
|
|
1030
1034
|
state: {
|
|
1031
1035
|
...state,
|
|
@@ -1320,7 +1324,7 @@ var renderPrompt = (confirm, message, leadingSymbol, trailingSymbol, options) =>
|
|
|
1320
1324
|
return output;
|
|
1321
1325
|
};
|
|
1322
1326
|
const annotate = options?.plain === true ? (line) => line : annotateLine;
|
|
1323
|
-
return
|
|
1327
|
+
return match3(message.split(NEWLINE_REGEXP), {
|
|
1324
1328
|
onEmpty: () => renderLine(""),
|
|
1325
1329
|
onNonEmpty: (promptLines) => {
|
|
1326
1330
|
const lines = map3(promptLines, (line) => annotate(line));
|
|
@@ -1362,7 +1366,7 @@ var renderNumberInput = (state, submitted, theme, renderOptions) => {
|
|
|
1362
1366
|
};
|
|
1363
1367
|
var renderNumberError = (state, pointer, theme, renderOptions) => {
|
|
1364
1368
|
if (isSome(state.error)) {
|
|
1365
|
-
return
|
|
1369
|
+
return match3(state.error.value.split(NEWLINE_REGEXP), {
|
|
1366
1370
|
onEmpty: () => "",
|
|
1367
1371
|
onNonEmpty: (errorLines) => {
|
|
1368
1372
|
if (renderOptions?.plain === true) {
|
|
@@ -1520,7 +1524,7 @@ var handleProcessInteger = (options) => {
|
|
|
1520
1524
|
}
|
|
1521
1525
|
}));
|
|
1522
1526
|
} else {
|
|
1523
|
-
return
|
|
1527
|
+
return match4(options.validate(parsed), {
|
|
1524
1528
|
onFailure: (error) => Action.NextFrame({
|
|
1525
1529
|
state: {
|
|
1526
1530
|
...state,
|
|
@@ -1590,7 +1594,7 @@ var handleProcessFloat = (options) => {
|
|
|
1590
1594
|
}
|
|
1591
1595
|
}));
|
|
1592
1596
|
} else {
|
|
1593
|
-
return flatMap3(sync2(() => round(parsed, options.precision)), (rounded) =>
|
|
1597
|
+
return flatMap3(sync2(() => round(parsed, options.precision)), (rounded) => match4(options.validate(rounded), {
|
|
1594
1598
|
onFailure: (error) => Action.NextFrame({
|
|
1595
1599
|
state: {
|
|
1596
1600
|
...state,
|
|
@@ -1791,7 +1795,7 @@ var renderTextInput = (nextState, options, theme, submitted, renderOptions) => {
|
|
|
1791
1795
|
};
|
|
1792
1796
|
var renderTextError = (nextState, pointer, theme, renderOptions) => {
|
|
1793
1797
|
if (isSome(nextState.error)) {
|
|
1794
|
-
return
|
|
1798
|
+
return match3(nextState.error.value.split(NEWLINE_REGEXP), {
|
|
1795
1799
|
onEmpty: () => "",
|
|
1796
1800
|
onNonEmpty: (errorLines) => {
|
|
1797
1801
|
if (renderOptions?.plain === true) {
|
|
@@ -1971,7 +1975,7 @@ var handleTextProcess = (options) => {
|
|
|
1971
1975
|
case "enter":
|
|
1972
1976
|
case "return": {
|
|
1973
1977
|
const value = state.value;
|
|
1974
|
-
return
|
|
1978
|
+
return match4(options.validate(value), {
|
|
1975
1979
|
onFailure: (error) => Action.NextFrame({
|
|
1976
1980
|
state: {
|
|
1977
1981
|
...state,
|
|
@@ -2269,7 +2273,7 @@ var parsePositional = /* @__PURE__ */ fnUntraced(function* (name, primitiveType,
|
|
|
2269
2273
|
});
|
|
2270
2274
|
}
|
|
2271
2275
|
const arg = args.arguments[0];
|
|
2272
|
-
const value = yield*
|
|
2276
|
+
const value = yield* mapError2(primitiveType.parse(arg), (error) => new InvalidValue({
|
|
2273
2277
|
option: name,
|
|
2274
2278
|
value: arg,
|
|
2275
2279
|
expected: error,
|
|
@@ -2285,7 +2289,7 @@ var parseFlag = /* @__PURE__ */ fnUntraced(function* (name, primitiveType, args)
|
|
|
2285
2289
|
});
|
|
2286
2290
|
}
|
|
2287
2291
|
const arg = providedValues[0];
|
|
2288
|
-
const value = yield*
|
|
2292
|
+
const value = yield* mapError2(primitiveType.parse(arg), (error) => new InvalidValue({
|
|
2289
2293
|
option: name,
|
|
2290
2294
|
value: arg,
|
|
2291
2295
|
expected: error,
|
|
@@ -4876,7 +4880,7 @@ var showHelp = (command, error2, renderErrors) => gen(function* () {
|
|
|
4876
4880
|
var showUserError = (error2) => gen(function* () {
|
|
4877
4881
|
const formatter = yield* Formatter;
|
|
4878
4882
|
yield* error(formatter.formatError(error2));
|
|
4879
|
-
error2[
|
|
4883
|
+
error2[errorReported2] = false;
|
|
4880
4884
|
});
|
|
4881
4885
|
var runWith = (command, config) => {
|
|
4882
4886
|
const commandImpl = toImpl(command);
|
|
@@ -4982,7 +4986,7 @@ var runWith = (command, config) => {
|
|
|
4982
4986
|
}
|
|
4983
4987
|
const services = match(logLevel, {
|
|
4984
4988
|
onNone: () => empty4(),
|
|
4985
|
-
onSome: (level) =>
|
|
4989
|
+
onSome: (level) => make10(MinimumLogLevel, level)
|
|
4986
4990
|
});
|
|
4987
4991
|
yield* provideContext2(program, services);
|
|
4988
4992
|
}, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed(error) : fail2(error), (error) => andThen2(showHelp(command, error, config.renderErrors !== false), fail6(error))), catchFilter((error) => config.renderErrors !== false && isCliError(error) && error._tag === "UserError" ? succeed(error) : fail2(error), (error) => andThen2(showUserError(error), fail6(error))), catchFilter((e) => isQuitError(e) ? succeed(e) : fail2(e), (_) => interrupt3));
|
|
@@ -5053,7 +5057,7 @@ var make2 = fn("SessionStore.make")(function* (options) {
|
|
|
5053
5057
|
const fs = yield* FileSystem;
|
|
5054
5058
|
const path = yield* Path;
|
|
5055
5059
|
const filePath = options?.filePath ?? defaultFilePath();
|
|
5056
|
-
const port = yield* portConfig.pipe(
|
|
5060
|
+
const port = yield* portConfig.pipe(mapError2((cause) => new SessionStoreError({
|
|
5057
5061
|
message: `Invalid OPENCODE_BROWSER_PORT configuration: ${cause.message}`,
|
|
5058
5062
|
operation: "configure",
|
|
5059
5063
|
cause
|
|
@@ -5065,12 +5069,12 @@ var make2 = fn("SessionStore.make")(function* (options) {
|
|
|
5065
5069
|
operation,
|
|
5066
5070
|
cause
|
|
5067
5071
|
});
|
|
5068
|
-
const readStore = fs.readFileString(filePath).pipe(map5(some), catchTag("PlatformError", (error) => isTagged(error.reason, "NotFound") ? succeed6(none()) : fail6(error)),
|
|
5072
|
+
const readStore = fs.readFileString(filePath).pipe(map5(some), catchTag("PlatformError", (error) => isTagged(error.reason, "NotFound") ? succeed6(none()) : fail6(error)), mapError2(storeError("read")), flatMap3(match({
|
|
5069
5073
|
onNone: () => succeed6({}),
|
|
5070
5074
|
onSome: (text) => try_2({
|
|
5071
5075
|
try: () => JSON.parse(text),
|
|
5072
5076
|
catch: (cause) => cause
|
|
5073
|
-
}).pipe(flatMap3(decodeUnknownEffect2(StoreFile)),
|
|
5077
|
+
}).pipe(flatMap3(decodeUnknownEffect2(StoreFile)), mapError2(storeError("decode")))
|
|
5074
5078
|
})));
|
|
5075
5079
|
const currentEntries = (store) => {
|
|
5076
5080
|
const entries = { ...store.endpoints ?? {} };
|
|
@@ -5080,7 +5084,7 @@ var make2 = fn("SessionStore.make")(function* (options) {
|
|
|
5080
5084
|
return entries;
|
|
5081
5085
|
};
|
|
5082
5086
|
const writeStore = (entries) => fs.makeDirectory(path.dirname(filePath), { recursive: true, mode: 448 }).pipe(andThen2(fs.writeFileString(filePath, `${JSON.stringify({ endpoints: entries }, null, 2)}
|
|
5083
|
-
`, { mode: 384 })), andThen2(fs.chmod(filePath, 384)),
|
|
5087
|
+
`, { mode: 384 })), andThen2(fs.chmod(filePath, 384)), mapError2(storeError("write")));
|
|
5084
5088
|
const read = readStore.pipe(map5((store) => currentEntries(store)[endpoint]?.id));
|
|
5085
5089
|
const write = (id) => readStore.pipe(flatMap3((store) => {
|
|
5086
5090
|
const entries = currentEntries(store);
|
|
@@ -5108,7 +5112,7 @@ function extensionManifestVersion(version) {
|
|
|
5108
5112
|
return version;
|
|
5109
5113
|
return match[2] ? `${match[1]}.${match[2]}` : match[1];
|
|
5110
5114
|
}
|
|
5111
|
-
var probe = (effect) => effect.pipe(
|
|
5115
|
+
var probe = (effect) => effect.pipe(match4({
|
|
5112
5116
|
onFailure: (error) => ({ ok: false, error: errorMessage(error) }),
|
|
5113
5117
|
onSuccess: (value) => ({ ok: true, value })
|
|
5114
5118
|
}));
|
|
@@ -5123,10 +5127,10 @@ var createDoctorReport = fn("Doctor.createReport")(function* (options) {
|
|
|
5123
5127
|
const store = yield* Service3;
|
|
5124
5128
|
const fs = yield* FileSystem;
|
|
5125
5129
|
const path = yield* Path;
|
|
5126
|
-
const readJsonFile = (relativePath, schema) => fs.readFileString(path.join(options.packageRoot, relativePath)).pipe(
|
|
5130
|
+
const readJsonFile = (relativePath, schema) => fs.readFileString(path.join(options.packageRoot, relativePath)).pipe(mapError2((cause) => new Error(`read ${relativePath}: ${cause.reason.message}`)), flatMap3((text) => try_2({
|
|
5127
5131
|
try: () => JSON.parse(text),
|
|
5128
5132
|
catch: () => new Error(`parse ${relativePath}: invalid JSON`)
|
|
5129
|
-
})), flatMap3((value) => decodeUnknownEffect2(schema)(value).pipe(
|
|
5133
|
+
})), flatMap3((value) => decodeUnknownEffect2(schema)(value).pipe(mapError2((cause) => new Error(`decode ${relativePath}: ${cause.message}`)))));
|
|
5130
5134
|
const compiled = compiledBinary();
|
|
5131
5135
|
const readPackageInfo = compiled ? succeed6({ name: binaryPackage() ?? "@opencode/browse", version: opencodeBrowserVersion2, bin: { opencodeBrowser: process.execPath } }) : readJsonFile("package.json", PackageMetadata).pipe(map5((metadata) => ({
|
|
5132
5136
|
name: metadata.name,
|
|
@@ -5871,7 +5875,7 @@ var status = make("status", {
|
|
|
5871
5875
|
}
|
|
5872
5876
|
})).pipe(withDescription4("Show relay, extension, and target status"));
|
|
5873
5877
|
var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
|
|
5874
|
-
const { runMcpServer } = yield* promise(() => import("./mcp-
|
|
5878
|
+
const { runMcpServer } = yield* promise(() => import("./mcp-kn0t0wy9.mjs"));
|
|
5875
5879
|
yield* runMcpServer;
|
|
5876
5880
|
})).pipe(withDescription4("Run the browse MCP server over stdio"));
|
|
5877
5881
|
registerCliCommand(400, () => tabs);
|
|
@@ -5892,7 +5896,7 @@ registerCliCommand(810, ({ packageRoot }) => make("doctor", {
|
|
|
5892
5896
|
}
|
|
5893
5897
|
})).pipe(withDescription4("Diagnose the local browse install and runtime")));
|
|
5894
5898
|
registerCliCommand(820, () => make("skill", {}, fn("Cli.skill")(function* () {
|
|
5895
|
-
const { skillText } = yield* promise(() => import("./skill-text-
|
|
5899
|
+
const { skillText } = yield* promise(() => import("./skill-text-30xek3h1.mjs"));
|
|
5896
5900
|
yield* log(skillText.trimEnd());
|
|
5897
5901
|
})).pipe(withDescription4("Print the browse agent skill text")));
|
|
5898
5902
|
registerCliCommand(900, () => mcp);
|
|
@@ -5901,7 +5905,7 @@ registerCliCommand(900, () => mcp);
|
|
|
5901
5905
|
import path from "node:path";
|
|
5902
5906
|
var readExecuteFile = fnUntraced(function* (filePath) {
|
|
5903
5907
|
const fs = yield* FileSystem;
|
|
5904
|
-
return yield* fs.readFileString(path.resolve(filePath)).pipe(
|
|
5908
|
+
return yield* fs.readFileString(path.resolve(filePath)).pipe(mapError2((cause) => new Error(`read execute file ${filePath}: ${cause.reason.message}`, { cause })));
|
|
5905
5909
|
});
|
|
5906
5910
|
function formatExecuteLogs(logs) {
|
|
5907
5911
|
return [
|
|
@@ -6319,7 +6323,7 @@ registerCliCommand(710, () => flightRecorder);
|
|
|
6319
6323
|
|
|
6320
6324
|
// src/cli/relay.ts
|
|
6321
6325
|
var serve = make("serve", {}, fn("Cli.serve")(function* () {
|
|
6322
|
-
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-
|
|
6326
|
+
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-ehaeyrbv.mjs"), import("./helpers-zsf41ghm.mjs")]));
|
|
6323
6327
|
const port = yield* portConfig;
|
|
6324
6328
|
const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
|
|
6325
6329
|
yield* scoped(gen(function* () {
|
package/dist/cli.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
// src/main.ts
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
var embeddedVersion = "0.0.17-dev.
|
|
9
|
+
var embeddedVersion = "0.0.17-dev.151";
|
|
10
10
|
var setupCommands = new Set(["install", "uninstall", "extension", "pair", "set"]);
|
|
11
11
|
var command = process.argv[2];
|
|
12
12
|
var args = process.argv.slice(3);
|
|
@@ -17,29 +17,46 @@ var askedForHelp = command === "--help" || command === "-h" || options.some((arg
|
|
|
17
17
|
var preCliHelp = askedForHelp && (command === "update" || command !== undefined && setupCommands.has(command));
|
|
18
18
|
if (command !== "--version" && command !== "-v" && !askedForHelp && !process.env.OPENCODE_BROWSER_HOME && legacyRoots().some((root) => fs.existsSync(root))) {
|
|
19
19
|
try {
|
|
20
|
-
const { migrateLegacy } = await import("./migrate-
|
|
20
|
+
const { migrateLegacy } = await import("./migrate-pkbyqcwq.mjs");
|
|
21
21
|
migrateLegacy();
|
|
22
22
|
} catch {}
|
|
23
23
|
}
|
|
24
24
|
if (command === "--version" || command === "-v") {
|
|
25
|
-
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-
|
|
25
|
+
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-5ffc64pk.mjs")).opencodeBrowserVersion;
|
|
26
26
|
process.stdout.write(`${opencodeBrowserVersion}
|
|
27
27
|
`);
|
|
28
|
-
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-
|
|
29
|
-
const { runBinaryMcp } = await import("./supervisor-
|
|
28
|
+
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-vavntyze.mjs")).supervisesMcp()) {
|
|
29
|
+
const { runBinaryMcp } = await import("./supervisor-vavntyze.mjs");
|
|
30
30
|
await runBinaryMcp(process.argv.slice(3));
|
|
31
31
|
} else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
|
|
32
|
-
const { NodeRuntime } = await import("./index-
|
|
33
|
-
const {
|
|
34
|
-
runMcpServer
|
|
32
|
+
const { NodeRuntime } = await import("./index-7d47yfra.mjs");
|
|
33
|
+
const { defaultTeardown } = await import("./Runtime-qfc1eg1n.mjs");
|
|
34
|
+
const { runMcpServer } = await import("./mcp-kn0t0wy9.mjs");
|
|
35
|
+
let stdinEnded = false;
|
|
36
|
+
let signalled = false;
|
|
37
|
+
process.stdin.once("end", () => {
|
|
38
|
+
stdinEnded = true;
|
|
39
|
+
});
|
|
40
|
+
const onSignal = () => {
|
|
41
|
+
signalled = true;
|
|
42
|
+
};
|
|
43
|
+
process.once("SIGINT", onSignal);
|
|
44
|
+
process.once("SIGTERM", onSignal);
|
|
45
|
+
runMcpServer.pipe(NodeRuntime.runMain({
|
|
46
|
+
teardown: (exit, onExit) => defaultTeardown(exit, (code) => {
|
|
47
|
+
if (stdinEnded && !signalled && code === 130)
|
|
48
|
+
return process.exit(0);
|
|
49
|
+
onExit(code);
|
|
50
|
+
})
|
|
51
|
+
}));
|
|
35
52
|
} else if (command === "self-update" || command === "runtime-switch") {
|
|
36
|
-
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-
|
|
53
|
+
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-8k5n6vhp.mjs");
|
|
37
54
|
await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
|
|
38
55
|
} else if (command === "update" && !askedForHelp) {
|
|
39
|
-
const { runUpdateCommand } = await import("./update-
|
|
56
|
+
const { runUpdateCommand } = await import("./update-zx6w8w1f.mjs");
|
|
40
57
|
await runUpdateCommand(process.argv.slice(3));
|
|
41
58
|
} else if (command && setupCommands.has(command) && !askedForHelp) {
|
|
42
|
-
const { runSetup } = await import("./setup-
|
|
59
|
+
const { runSetup } = await import("./setup-cd2bs8nw.mjs");
|
|
43
60
|
await runSetup(command, process.argv.slice(3));
|
|
44
61
|
} else {
|
|
45
62
|
if (preCliHelp || !command || command === "--help" || command === "-h") {
|
|
@@ -76,9 +93,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
|
|
|
76
93
|
`);
|
|
77
94
|
}
|
|
78
95
|
if (command === "status" && !askedForHelp && !process.argv.includes("--json")) {
|
|
79
|
-
const { printSetupStatus } = await import("./setup-
|
|
96
|
+
const { printSetupStatus } = await import("./setup-cd2bs8nw.mjs");
|
|
80
97
|
printSetupStatus();
|
|
81
98
|
}
|
|
82
|
-
const { runCli } = await import("./cli-
|
|
99
|
+
const { runCli } = await import("./cli-q8c8a5qs.mjs");
|
|
83
100
|
runCli(preCliHelp ? ["--help"] : undefined);
|
|
84
101
|
}
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
isRestrictedTarget2,
|
|
33
33
|
isRestrictedUrl2,
|
|
34
34
|
dataUrlDocument2
|
|
35
|
-
} from "./main-
|
|
36
|
-
import"./main-
|
|
35
|
+
} from "./main-gb5jg0mj.mjs";
|
|
36
|
+
import"./main-4h7rfhhr.mjs";
|
|
37
37
|
import"./main-b3jrctcx.mjs";
|
|
38
38
|
export {
|
|
39
39
|
HttpRouteError2 as HttpRouteError,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePrivateJsonFileSync
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-4h7rfhhr.mjs";
|
|
4
4
|
import {
|
|
5
5
|
bundledPairingCodeTtlMs,
|
|
6
6
|
mintPairingCode,
|
|
7
7
|
writeExtensionPairing
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-131pm12v.mjs";
|
|
9
9
|
import {
|
|
10
10
|
configRoot2,
|
|
11
11
|
cacheRoot,
|
|
12
12
|
devExtensionUrl,
|
|
13
13
|
devExtensionFolder
|
|
14
|
-
} from "./main-
|
|
14
|
+
} from "./main-65rqqv4r.mjs";
|
|
15
15
|
|
|
16
16
|
// src/setup/dev-extension.ts
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePrivateJsonFileSync
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-4h7rfhhr.mjs";
|
|
4
4
|
import {
|
|
5
5
|
dataRoot,
|
|
6
6
|
stateRoot
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-65rqqv4r.mjs";
|
|
8
8
|
|
|
9
9
|
// src/relay/browser-pairing.ts
|
|
10
10
|
import crypto from "node:crypto";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
isSuccess,
|
|
6
6
|
ClockRef,
|
|
7
7
|
currentTimeMillis2
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-xycdhwqs.mjs";
|
|
9
9
|
import {
|
|
10
10
|
pipeArguments,
|
|
11
11
|
identity,
|
|
12
12
|
isString,
|
|
13
13
|
isNumber,
|
|
14
14
|
isBoolean
|
|
15
|
-
} from "./main-
|
|
15
|
+
} from "./main-qazf3bhk.mjs";
|
|
16
16
|
|
|
17
17
|
// node_modules/effect/dist/Clock.js
|
|
18
18
|
var Clock = ClockRef;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNodeError
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-4h7rfhhr.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-gb5jg0mj.mjs";
|
|
7
7
|
import {
|
|
8
|
-
isSome,
|
|
9
8
|
decodeUnknownOption,
|
|
10
9
|
optionalKey,
|
|
11
10
|
String3,
|
|
@@ -14,10 +13,13 @@ import {
|
|
|
14
13
|
Struct,
|
|
15
14
|
ArraySchema,
|
|
16
15
|
NullOr
|
|
17
|
-
} from "./main-
|
|
16
|
+
} from "./main-v6hzbxjd.mjs";
|
|
17
|
+
import {
|
|
18
|
+
isSome
|
|
19
|
+
} from "./main-xycdhwqs.mjs";
|
|
18
20
|
import {
|
|
19
21
|
stateRoot
|
|
20
|
-
} from "./main-
|
|
22
|
+
} from "./main-65rqqv4r.mjs";
|
|
21
23
|
|
|
22
24
|
// src/session-manager/journal.ts
|
|
23
25
|
import fs from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-2n1a279y.mjs";
|
|
4
4
|
|
|
5
5
|
// src/paths.ts
|
|
6
6
|
import fs from "node:fs";
|
|
@@ -110,7 +110,7 @@ function cliInstall() {
|
|
|
110
110
|
return { kind: "binary", binary: installedBinary() ?? process.execPath, pathEnv: process.env.PATH };
|
|
111
111
|
if (fromCheckout())
|
|
112
112
|
return { kind: "checkout", bundle: path.join(packageRoot(), "dist", "cli.mjs") };
|
|
113
|
-
return { kind: "npm", version: "0.0.17-dev.
|
|
113
|
+
return { kind: "npm", version: "0.0.17-dev.151", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
|
|
114
114
|
}
|
|
115
115
|
function cliPrefix(install = cliInstall()) {
|
|
116
116
|
if (install.kind === "binary") {
|
|
@@ -132,7 +132,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
|
|
|
132
132
|
return id ? { id } : {};
|
|
133
133
|
}
|
|
134
134
|
var RELEASE_SERVICE = "https://anoma.ly/release";
|
|
135
|
-
function devExtension(baked = { file: "browse-extension-0.0.17-dev.
|
|
135
|
+
function devExtension(baked = { file: "browse-extension-0.0.17-dev.151.zip", sha256: "0fe5f51c6c7f71355ee54bf0e23c679406d4aebe6e8f130286a5d8853bbe9032", size: 183293 }) {
|
|
136
136
|
return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
|
|
137
137
|
}
|
|
138
138
|
var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
|