@opencode/browse 0.0.11-dev.76 → 0.0.11-dev.78

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.
Files changed (33) hide show
  1. package/dist/{cli-qpkh40gh.mjs → cli-e9x2hzbm.mjs} +63 -52
  2. package/dist/cli.mjs +30 -19
  3. package/dist/{helpers-kp0j46jt.mjs → helpers-681ybn8r.mjs} +2 -2
  4. package/dist/{index-0dcypq31.mjs → index-yzz55kxm.mjs} +1 -1
  5. package/dist/{main-eej5z0y5.mjs → main-0yxzwqt8.mjs} +6 -6
  6. package/dist/main-1ja7rnnp.mjs +4 -0
  7. package/dist/main-3d4mj1xj.mjs +157 -0
  8. package/dist/main-4qeb707s.mjs +161 -0
  9. package/dist/{main-rt6g5418.mjs → main-8z9d979q.mjs} +15 -15
  10. package/dist/{main-nqmm7pdz.mjs → main-93xmqcr3.mjs} +47 -47
  11. package/dist/{main-gevbt7h7.mjs → main-csnx585b.mjs} +151 -151
  12. package/dist/{setup-j76yv51b.mjs → main-fkskfb8a.mjs} +3608 -4406
  13. package/dist/main-ftsbt0hk.mjs +73 -0
  14. package/dist/{main-brv9dhy5.mjs → main-gdvgbgce.mjs} +9 -9
  15. package/dist/{main-ajza8egc.mjs → main-mysz5yma.mjs} +44 -39
  16. package/dist/main-qzvstggv.mjs +465 -0
  17. package/dist/main-vgzr4689.mjs +61 -0
  18. package/dist/{mcp-sy8qgkyr.mjs → mcp-3v0wxzr5.mjs} +139 -138
  19. package/dist/migrate-5phz1hha.mjs +233 -0
  20. package/dist/{relay-ateyg5ax.mjs → relay-4chyv51v.mjs} +128 -123
  21. package/dist/runtime-update-pzazb7sh.mjs +156 -0
  22. package/dist/setup-5g5kza58.mjs +956 -0
  23. package/dist/{skill-text-x7sccp6h.mjs → skill-text-mrxy6zpc.mjs} +5 -4
  24. package/dist/{supervisor-0rvjpf4e.mjs → supervisor-bfrn5cxb.mjs} +38 -17
  25. package/dist/{update-rbd2025v.mjs → update-42j1j7w1.mjs} +3 -3
  26. package/dist/{version-4cjr3wpp.mjs → version-w0dwcyve.mjs} +1 -1
  27. package/package.json +1 -1
  28. package/skills/browse/SKILL.md +5 -4
  29. package/dist/main-7wgmq04v.mjs +0 -303
  30. package/dist/main-exnm62gg.mjs +0 -4
  31. package/dist/main-hm4fcpfz.mjs +0 -131
  32. package/dist/main-rn7hdcq2.mjs +0 -805
  33. package/dist/runtime-update-70gqzynp.mjs +0 -200
@@ -26,18 +26,18 @@ import {
26
26
  get,
27
27
  merge,
28
28
  Reference,
29
- fromInputUnsafe,
30
- isFinite2,
31
- isZero,
32
- zero,
33
- millis,
34
- toMillis,
35
29
  normalize,
36
30
  isFailure,
37
31
  isSuccess,
38
32
  filter,
39
33
  take,
40
34
  empty2,
35
+ fromInputUnsafe,
36
+ isFinite2,
37
+ isZero,
38
+ zero,
39
+ millis,
40
+ toMillis,
41
41
  Scheduler,
42
42
  Class,
43
43
  taggedEnum,
@@ -46,16 +46,23 @@ import {
46
46
  externalSpan,
47
47
  LogLevelOrder,
48
48
  reportCauseUnsafe,
49
+ map4,
50
+ squash,
51
+ hasDies,
52
+ hasInterrupts,
53
+ interruptors,
54
+ IllegalArgumentError,
55
+ ExceededCapacityError,
49
56
  isExit,
50
57
  succeed3,
51
58
  failCause,
52
- fail2,
59
+ fail3,
53
60
  die,
54
61
  interrupt,
55
62
  void_2,
56
63
  isSuccess2,
57
64
  isFailure2,
58
- hasInterrupts,
65
+ hasInterrupts2,
59
66
  isDeferred,
60
67
  makeUnsafe3,
61
68
  make5,
@@ -81,13 +88,6 @@ import {
81
88
  provide2,
82
89
  provideMerge,
83
90
  launch,
84
- map4,
85
- squash,
86
- hasDies,
87
- hasInterrupts2,
88
- interruptors,
89
- IllegalArgumentError,
90
- ExceededCapacityError,
91
91
  catchDone,
92
92
  spaced,
93
93
  isEffect,
@@ -102,7 +102,7 @@ import {
102
102
  callback2,
103
103
  never,
104
104
  gen,
105
- fail4,
105
+ fail5,
106
106
  die2,
107
107
  try_,
108
108
  withFiber2,
@@ -131,11 +131,11 @@ import {
131
131
  ignoreCause,
132
132
  timeout,
133
133
  race,
134
- when,
134
+ when2,
135
135
  match3,
136
136
  matchCauseEffect,
137
137
  matchEffect,
138
- context,
138
+ context2,
139
139
  contextWith,
140
140
  provide3,
141
141
  provideContext,
@@ -168,6 +168,8 @@ import {
168
168
  logError,
169
169
  logDebug,
170
170
  annotateLogs,
171
+ encode,
172
+ decode,
171
173
  empty3,
172
174
  empty4,
173
175
  fromInput,
@@ -176,42 +178,11 @@ import {
176
178
  setAll,
177
179
  merge2,
178
180
  remove,
179
- interrupt3,
180
- getCurrent,
181
- runIn,
182
- make8,
183
- set2,
184
- makeUnsafe5,
185
- Empty,
186
- make9,
187
- append,
188
- prepend,
189
- takeAll,
190
- take2,
191
- remove2,
192
- make10,
193
- bounded,
194
- dropping,
195
- offer,
196
- offerUnsafe,
197
- offerAll,
198
- failCause2,
199
- end,
200
- shutdownUnsafe,
201
- takeAll2,
202
- take3,
203
- fromQueue,
204
- unwrap,
205
- run2,
206
- runForEach,
207
- runForEachArray,
208
- encode,
209
- decode,
210
181
  defaultFormatter,
211
182
  passthrough,
212
183
  transformOptional,
213
184
  omit,
214
- is,
185
+ is2,
215
186
  decodeUnknownEffect2,
216
187
  decodeUnknownResult,
217
188
  decodeSync,
@@ -249,18 +220,47 @@ import {
249
220
  toCodecJson,
250
221
  Json,
251
222
  JsonObject,
223
+ interrupt3,
224
+ getCurrent,
225
+ runIn,
226
+ makeUnsafe5,
227
+ make9,
228
+ set2,
229
+ Empty,
230
+ make10,
231
+ append,
232
+ prepend,
233
+ takeAll,
234
+ take2,
235
+ remove2,
236
+ make11,
237
+ bounded,
238
+ dropping,
239
+ offer,
240
+ offerUnsafe,
241
+ offerAll,
242
+ failCause2,
243
+ end,
244
+ shutdownUnsafe,
245
+ takeAll2,
246
+ take3,
247
+ fromQueue,
248
+ unwrap,
249
+ run2,
250
+ runForEach,
251
+ runForEachArray,
252
+ Stdio,
252
253
  empty5,
253
254
  jsonUnsafe,
254
- Stdio,
255
255
  layer
256
- } from "./main-gevbt7h7.mjs";
256
+ } from "./main-csnx585b.mjs";
257
257
  import {
258
258
  opencodeBrowserVersion2
259
- } from "./main-exnm62gg.mjs";
259
+ } from "./main-1ja7rnnp.mjs";
260
260
  import {
261
261
  cliCommand,
262
262
  autoUpdateStatus
263
- } from "./main-rn7hdcq2.mjs";
263
+ } from "./main-qzvstggv.mjs";
264
264
  import"./main-mrew6jy8.mjs";
265
265
  import {
266
266
  option,
@@ -280,12 +280,12 @@ import {
280
280
  relayBuildProblem,
281
281
  ensureRelay,
282
282
  ensureExtensionConnected
283
- } from "./main-ajza8egc.mjs";
284
- import"./main-hm4fcpfz.mjs";
283
+ } from "./main-mysz5yma.mjs";
284
+ import"./main-vgzr4689.mjs";
285
285
  import {
286
286
  updateJson2,
287
287
  createUpdateWatcher2
288
- } from "./main-brv9dhy5.mjs";
288
+ } from "./main-gdvgbgce.mjs";
289
289
  import {
290
290
  makeUnsafe,
291
291
  make,
@@ -369,21 +369,22 @@ import {
369
369
  mcpErrorMessage2,
370
370
  toolResult,
371
371
  listSecrets
372
- } from "./main-nqmm7pdz.mjs";
372
+ } from "./main-93xmqcr3.mjs";
373
373
  import {
374
374
  Clock,
375
375
  type,
376
- value2,
377
- when2,
378
- tag2,
376
+ value,
377
+ when,
378
+ tag,
379
379
  tags,
380
- is2,
380
+ is,
381
381
  string,
382
382
  number,
383
383
  boolean,
384
384
  orElse,
385
385
  exhaustive
386
- } from "./main-rt6g5418.mjs";
386
+ } from "./main-8z9d979q.mjs";
387
+ import"./main-ftsbt0hk.mjs";
387
388
  import {
388
389
  pipeArguments,
389
390
  dual,
@@ -403,7 +404,7 @@ import {
403
404
  // node_modules/effect/dist/PubSub.js
404
405
  var TypeId = "~effect/PubSub";
405
406
  var SubscriptionTypeId = "~effect/PubSub/Subscription";
406
- var make4 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe4(), makeUnsafe5(false), make8(false), options.strategy(), make8(none())));
407
+ var make4 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe4(), makeUnsafe5(false), make9(false), options.strategy(), make9(none())));
407
408
  var unbounded = (options) => make4({
408
409
  atomicPubSub: () => makeAtomicUnbounded(options),
409
410
  strategy: () => new DroppingStrategy
@@ -438,7 +439,7 @@ var unsubscribe = (self) => uninterruptible(withFiber2((state) => {
438
439
  self.subscription.unsubscribe();
439
440
  self.replayWindow.close();
440
441
  self.strategy.onPubSubEmptySpaceUnsafe(self.pubsub, self.subscribers);
441
- })), when(self.shutdownHook.open), asVoid2);
442
+ })), when2(self.shutdownHook.open), asVoid2);
442
443
  }));
443
444
  var take4 = (self) => suspend2(() => {
444
445
  if (self.shutdownFlag.current) {
@@ -493,7 +494,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
493
494
  subscribers.delete(subscription);
494
495
  }
495
496
  };
496
- var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make9(), makeUnsafe5(false), make8(false), strategy, pubsub.replayWindow(), ended);
497
+ var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make10(), makeUnsafe5(false), make9(false), strategy, pubsub.replayWindow(), ended);
497
498
  class UnboundedPubSub {
498
499
  publisherHead = {
499
500
  value: AbsentValue,
@@ -1047,7 +1048,7 @@ var get3 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask2((restore)
1047
1048
  entry = o.value;
1048
1049
  entry.refCount++;
1049
1050
  } else if (Number.isFinite(self.capacity) && size(self.state.map) >= self.capacity) {
1050
- return fail4(new ExceededCapacityError(`RcMap attempted to exceed capacity of ${self.capacity}`));
1051
+ return fail5(new ExceededCapacityError(`RcMap attempted to exceed capacity of ${self.capacity}`));
1051
1052
  } else {
1052
1053
  entry = {
1053
1054
  deferred: makeUnsafe3(),
@@ -1067,7 +1068,7 @@ var get3 = /* @__PURE__ */ dual(2, (self, key) => uninterruptibleMask2((restore)
1067
1068
  context.set(Scope.key, entry.scope);
1068
1069
  const lookupContext = makeUnsafe2(context);
1069
1070
  suspend2(() => self.lookup(key)).pipe(runForkWith(lookupContext), runIn(entry.scope)).addObserver((exit) => {
1070
- if (hasInterrupts(exit))
1071
+ if (hasInterrupts2(exit))
1071
1072
  removeInterrupted(self, key, entry, lookupContext);
1072
1073
  doneUnsafe(entry.deferred, exit);
1073
1074
  });
@@ -1167,7 +1168,7 @@ class PromptNotFound extends (/* @__PURE__ */ TaggedError("PromptNotFound")) {
1167
1168
  }
1168
1169
  var ClientNotification = /* @__PURE__ */ taggedEnum();
1169
1170
  var ServerNotification = /* @__PURE__ */ taggedEnum();
1170
- var make11 = /* @__PURE__ */ sync2(() => {
1171
+ var make8 = /* @__PURE__ */ sync2(() => {
1171
1172
  const registrations = new Map;
1172
1173
  const resourceRegistrations = [];
1173
1174
  const resourceTemplateRegistrations = [];
@@ -1693,7 +1694,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
1693
1694
  const supportsAck = options?.supportsAck ?? true;
1694
1695
  const disableTracing = options?.disableTracing ?? false;
1695
1696
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
1696
- const services = yield* context();
1697
+ const services = yield* context2();
1697
1698
  const scope = get(services, Scope);
1698
1699
  const entries = new Map;
1699
1700
  let isShutdown = false;
@@ -2011,7 +2012,7 @@ var make12 = /* @__PURE__ */ fnUntraced(function* (group, options) {
2011
2012
  clientId: 0,
2012
2013
  requestId,
2013
2014
  exit: failCause(cause)
2014
- }).pipe(andThen(hasInterrupts2(cause) ? void_3 : ignore(interruptRequest(requestId))))), catchCauseIf((cause) => !hasInterrupts2(cause), () => void_3)));
2015
+ }).pipe(andThen(hasInterrupts(cause) ? void_3 : ignore(interruptRequest(requestId))))), catchCauseIf((cause) => !hasInterrupts(cause), () => void_3)));
2015
2016
  }
2016
2017
  case "Exit": {
2017
2018
  const requestId = RequestId(message.requestId);
@@ -2042,7 +2043,7 @@ var make12 = /* @__PURE__ */ fnUntraced(function* (group, options) {
2042
2043
  });
2043
2044
  }
2044
2045
  case "ClientProtocolError": {
2045
- const exit = fail2(message.error);
2046
+ const exit = fail3(message.error);
2046
2047
  return forEach(Array.from(entries.keys()), (requestId) => write({
2047
2048
  _tag: "Exit",
2048
2049
  clientId: 0,
@@ -2166,7 +2167,7 @@ var invocationFromRequestContext = (request) => ({
2166
2167
  },
2167
2168
  requestContext: request
2168
2169
  });
2169
- var requireCompleteOperation = (protocolVersion, outcome) => outcome._tag === "Complete" ? succeed6(outcome.value) : fail4(new UnsupportedByProtocol({
2170
+ var requireCompleteOperation = (protocolVersion, outcome) => outcome._tag === "Complete" ? succeed6(outcome.value) : fail5(new UnsupportedByProtocol({
2170
2171
  protocolVersion,
2171
2172
  feature: "Client input"
2172
2173
  }));
@@ -2201,7 +2202,7 @@ var samplingRequestRequiresTools = (request) => {
2201
2202
 
2202
2203
  class ProtocolError extends (/* @__PURE__ */ TaggedError("ProtocolError")) {
2203
2204
  static fromTool(error) {
2204
- const message = value2(error).pipe(tag2("ToolNotFound", (error) => `Tool '${error.name}' not found`), tag2("UnsupportedByProtocol", (error) => `${error.feature} is not supported by MCP ${error.protocolVersion}`), tags({
2205
+ const message = value(error).pipe(tag("ToolNotFound", (error) => `Tool '${error.name}' not found`), tag("UnsupportedByProtocol", (error) => `${error.feature} is not supported by MCP ${error.protocolVersion}`), tags({
2205
2206
  InvalidToolInput: (error) => error.message,
2206
2207
  InvalidToolContinuation: (error) => error.message,
2207
2208
  ToolExecutionError: (error) => error.message
@@ -2527,7 +2528,7 @@ var make15 = () => {
2527
2528
  subscribe: (uri, clientId, headers) => {
2528
2529
  const subscriptions = resolveSession(clientId, headers)?.resourceSubscriptions;
2529
2530
  if (subscriptions === undefined) {
2530
- return fail4(new ProtocolError({
2531
+ return fail5(new ProtocolError({
2531
2532
  code: METHOD_NOT_FOUND_ERROR_CODE,
2532
2533
  message: "Resource subscriptions are not supported"
2533
2534
  }));
@@ -2537,7 +2538,7 @@ var make15 = () => {
2537
2538
  unsubscribe: (uri, clientId, headers) => {
2538
2539
  const subscriptions = resolveSession(clientId, headers)?.resourceSubscriptions;
2539
2540
  if (subscriptions === undefined) {
2540
- return fail4(new ProtocolError({
2541
+ return fail5(new ProtocolError({
2541
2542
  code: METHOD_NOT_FOUND_ERROR_CODE,
2542
2543
  message: "Resource subscriptions are not supported"
2543
2544
  }));
@@ -3451,7 +3452,7 @@ var unsupported = (operation, reason) => new McpReverseOperationUnsupported({
3451
3452
  protocolVersion,
3452
3453
  reason
3453
3454
  });
3454
- var requireCapability = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail4(unsupported(operation, `Client did not advertise the ${capability} capability`));
3455
+ var requireCapability = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail5(unsupported(operation, `Client did not advertise the ${capability} capability`));
3455
3456
  var projectCapabilities = (capabilities) => ({
3456
3457
  experimental: capabilities.experimental,
3457
3458
  extensions: capabilities.extensions,
@@ -3461,19 +3462,19 @@ var projectCapabilities = (capabilities) => ({
3461
3462
  tools: capabilities.tools
3462
3463
  });
3463
3464
  var projectContent = /* @__PURE__ */ fnUntraced(function* (content) {
3464
- const projected = value2(content).pipe(when2({
3465
+ const projected = value(content).pipe(when({
3465
3466
  type: "text"
3466
3467
  }, (content) => ({
3467
3468
  ...content,
3468
3469
  annotations: content.annotations
3469
- })), when2({
3470
+ })), when({
3470
3471
  type: "image"
3471
3472
  }, (content) => ImageContent.make({
3472
3473
  type: "image",
3473
3474
  mimeType: content.mimeType,
3474
3475
  data: encode(content.data),
3475
3476
  annotations: content.annotations
3476
- })), when2({
3477
+ })), when({
3477
3478
  type: "resource"
3478
3479
  }, (content) => {
3479
3480
  const resource = content.resource;
@@ -3497,8 +3498,8 @@ var projectContent = /* @__PURE__ */ fnUntraced(function* (content) {
3497
3498
  },
3498
3499
  annotations: content.annotations
3499
3500
  });
3500
- }), when2({
3501
- type: is2("audio", "resource_link")
3501
+ }), when({
3502
+ type: is("audio", "resource_link")
3502
3503
  }, (content) => new UnsupportedByProtocol({
3503
3504
  protocolVersion,
3504
3505
  feature: `${content.type} tool content`
@@ -3686,7 +3687,7 @@ var protocol = /* @__PURE__ */ make13({
3686
3687
  const result = yield* client["sampling/createMessage"](wireRequest).pipe(mapError(reverseError("sampling/createMessage")));
3687
3688
  return yield* transcode(CreateMessage2.successSchema, CreateMessage.successSchema, result).pipe(mapError(() => unsupported("sampling/createMessage", "Response is not representable by the canonical model")));
3688
3689
  }),
3689
- elicit: () => fail4(unsupported("elicitation/create", "Elicitation was introduced after this protocol revision"))
3690
+ elicit: () => fail5(unsupported("elicitation/create", "Elicitation was introduced after this protocol revision"))
3690
3691
  }),
3691
3692
  projectNotification: (notification) => makeNotificationProjector({
3692
3693
  supportsProgressMessage: false
@@ -3857,21 +3858,21 @@ var unsupported2 = (operation, reason) => new McpReverseOperationUnsupported({
3857
3858
  protocolVersion: protocolVersion2,
3858
3859
  reason
3859
3860
  });
3860
- var requireCapability2 = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail4(unsupported2(operation, `Client did not advertise the ${capability} capability`));
3861
+ var requireCapability2 = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail5(unsupported2(operation, `Client did not advertise the ${capability} capability`));
3861
3862
  var projectContent2 = /* @__PURE__ */ fnUntraced(function* (content) {
3862
- const projected = value2(content).pipe(when2({
3863
+ const projected = value(content).pipe(when({
3863
3864
  type: "text"
3864
3865
  }, (content) => ({
3865
3866
  ...content,
3866
3867
  annotations: content.annotations
3867
- })), when2({
3868
- type: is2("image", "audio")
3868
+ })), when({
3869
+ type: is("image", "audio")
3869
3870
  }, (content) => ({
3870
3871
  type: content.type,
3871
3872
  mimeType: content.mimeType,
3872
3873
  data: encode(content.data),
3873
3874
  annotations: content.annotations
3874
- })), when2({
3875
+ })), when({
3875
3876
  type: "resource"
3876
3877
  }, (content) => {
3877
3878
  const resource = content.resource;
@@ -3895,7 +3896,7 @@ var projectContent2 = /* @__PURE__ */ fnUntraced(function* (content) {
3895
3896
  },
3896
3897
  annotations: content.annotations
3897
3898
  });
3898
- }), when2({
3899
+ }), when({
3899
3900
  type: "resource_link"
3900
3901
  }, () => new UnsupportedByProtocol({
3901
3902
  protocolVersion: protocolVersion2,
@@ -4112,7 +4113,7 @@ var protocol2 = /* @__PURE__ */ make13({
4112
4113
  const result = yield* client["sampling/createMessage"](wireRequest).pipe(mapError(reverseError("sampling/createMessage")));
4113
4114
  return yield* transcode(CreateMessage3.successSchema, CreateMessage.successSchema, result).pipe(mapError(() => unsupported2("sampling/createMessage", "Response is not representable by the canonical model")));
4114
4115
  }),
4115
- elicit: () => fail4(unsupported2("elicitation/create", "Elicitation was introduced after this protocol revision"))
4116
+ elicit: () => fail5(unsupported2("elicitation/create", "Elicitation was introduced after this protocol revision"))
4116
4117
  }),
4117
4118
  projectNotification: (notification) => makeNotificationProjector({
4118
4119
  supportsProgressMessage: true
@@ -4473,19 +4474,19 @@ var unsupported3 = (operation, reason) => new McpReverseOperationUnsupported({
4473
4474
  protocolVersion: protocolVersion3,
4474
4475
  reason
4475
4476
  });
4476
- var requireCapability3 = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail4(unsupported3(operation, `Client did not advertise the ${capability} capability`));
4477
+ var requireCapability3 = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail5(unsupported3(operation, `Client did not advertise the ${capability} capability`));
4477
4478
  var projectContent3 = /* @__PURE__ */ fnUntraced(function* (content) {
4478
- return value2(content).pipe(when2({
4479
- type: is2("text", "resource_link")
4480
- }, (content) => content), when2({
4481
- type: is2("image", "audio")
4479
+ return value(content).pipe(when({
4480
+ type: is("text", "resource_link")
4481
+ }, (content) => content), when({
4482
+ type: is("image", "audio")
4482
4483
  }, (content) => ({
4483
4484
  type: content.type,
4484
4485
  mimeType: content.mimeType,
4485
4486
  data: encode(content.data),
4486
4487
  annotations: content.annotations,
4487
4488
  _meta: content._meta
4488
- })), when2({
4489
+ })), when({
4489
4490
  type: "resource"
4490
4491
  }, (content) => {
4491
4492
  const resource = content.resource;
@@ -5102,7 +5103,7 @@ var unsupported4 = (operation, reason) => new McpReverseOperationUnsupported({
5102
5103
  protocolVersion: protocolVersion4,
5103
5104
  reason
5104
5105
  });
5105
- var requireCapability4 = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail4(unsupported4(operation, `Client did not advertise the ${capability} capability`));
5106
+ var requireCapability4 = (profile, operation, capability) => Object.hasOwn(profile.clientCapabilities, capability) && profile.clientCapabilities[capability] !== undefined ? void_3 : fail5(unsupported4(operation, `Client did not advertise the ${capability} capability`));
5106
5107
  var resultRequiresSamplingTools = (result) => result.stopReason === "toolUse" || ("type" in result.content ? result.content.type === "tool_use" || result.content.type === "tool_result" : result.content.some((block) => block.type === "tool_use" || block.type === "tool_result"));
5107
5108
  var hasElicitationModeCapability = (profile, mode) => {
5108
5109
  const elicitation = profile.clientCapabilities.elicitation;
@@ -5111,17 +5112,17 @@ var hasElicitationModeCapability = (profile, mode) => {
5111
5112
  return mode === "form" ? elicitation.form !== undefined || elicitation.url === undefined : elicitation.url !== undefined;
5112
5113
  };
5113
5114
  var projectContent4 = /* @__PURE__ */ fnUntraced(function* (content) {
5114
- return value2(content).pipe(when2({
5115
- type: is2("text", "resource_link")
5116
- }, (content) => content), when2({
5117
- type: is2("image", "audio")
5115
+ return value(content).pipe(when({
5116
+ type: is("text", "resource_link")
5117
+ }, (content) => content), when({
5118
+ type: is("image", "audio")
5118
5119
  }, (content) => ({
5119
5120
  type: content.type,
5120
5121
  mimeType: content.mimeType,
5121
5122
  data: encode(content.data),
5122
5123
  annotations: content.annotations,
5123
5124
  _meta: content._meta
5124
- })), when2({
5125
+ })), when({
5125
5126
  type: "resource"
5126
5127
  }, (content) => {
5127
5128
  const resource = content.resource;
@@ -5874,7 +5875,7 @@ class ServerNotificationRpcs6 extends (/* @__PURE__ */ make3(CancelledNotificati
5874
5875
  var InputResponses2 = /* @__PURE__ */ Record(String3, JsonObject);
5875
5876
  var decodeRequestMetadata = /* @__PURE__ */ decodeUnknownEffect2(RequestMetaObject);
5876
5877
  var decodeCancellation = /* @__PURE__ */ decodeUnknownEffect2(CancelledNotification3.payloadSchema);
5877
- var isJson = /* @__PURE__ */ is(Json);
5878
+ var isJson = /* @__PURE__ */ is2(Json);
5878
5879
  var encodeImplementation = /* @__PURE__ */ encodeEffect(Implementation5);
5879
5880
  var MAX_PENDING_SUBSCRIPTION_NOTIFICATIONS = 64;
5880
5881
  var omitUndefined = (value) => {
@@ -5897,7 +5898,7 @@ var parameterHeaderMatches = (header, argument) => {
5897
5898
  if (decoded === undefined) {
5898
5899
  return false;
5899
5900
  }
5900
- return value2(argument).pipe(when2(string, (argument) => decoded === argument), when2(boolean, (argument) => decoded === String(argument)), when2(number, (argument) => Number.isSafeInteger(argument) && decoded.trim().length > 0 && Number(decoded) === argument), orElse(() => false));
5901
+ return value(argument).pipe(when(string, (argument) => decoded === argument), when(boolean, (argument) => decoded === String(argument)), when(number, (argument) => Number.isSafeInteger(argument) && decoded.trim().length > 0 && Number(decoded) === argument), orElse(() => false));
5901
5902
  };
5902
5903
  var profileFromRequestMetadata = /* @__PURE__ */ fnUntraced(function* (metadata) {
5903
5904
  const requestMetadata = yield* decodeRequestMetadata(metadata);
@@ -5938,12 +5939,12 @@ var projectCallToolOutcome = /* @__PURE__ */ fnUntraced(function* (outcome, serv
5938
5939
  var requiredCapabilitiesForInputRequests = (inputRequests, capabilities) => {
5939
5940
  const required = {};
5940
5941
  for (const request of Object.values(inputRequests ?? {})) {
5941
- value2(request).pipe(when2({
5942
+ value(request).pipe(when({
5942
5943
  method: "roots/list"
5943
5944
  }, () => {
5944
5945
  if (capabilities.roots === undefined)
5945
5946
  required.roots = {};
5946
- }), when2({
5947
+ }), when({
5947
5948
  method: "sampling/createMessage"
5948
5949
  }, (request) => {
5949
5950
  const sampling = required.sampling ?? {};
@@ -5955,7 +5956,7 @@ var requiredCapabilitiesForInputRequests = (inputRequests, capabilities) => {
5955
5956
  }
5956
5957
  if (capabilities.sampling === undefined || Object.keys(sampling).length > 0)
5957
5958
  required.sampling = sampling;
5958
- }), when2({
5959
+ }), when({
5959
5960
  method: "elicitation/create"
5960
5961
  }, (request) => {
5961
5962
  const mode = request.params.mode === "url" ? "url" : "form";
@@ -5977,17 +5978,17 @@ var projectResourceContents3 = (resource) => omitUndefined({
5977
5978
  blob: encode(resource.blob)
5978
5979
  }
5979
5980
  });
5980
- var projectContent5 = /* @__PURE__ */ type().pipe(/* @__PURE__ */ when2({
5981
- type: /* @__PURE__ */ is2("text", "resource_link")
5982
- }, (content) => content), /* @__PURE__ */ when2({
5983
- type: /* @__PURE__ */ is2("image", "audio")
5981
+ var projectContent5 = /* @__PURE__ */ type().pipe(/* @__PURE__ */ when({
5982
+ type: /* @__PURE__ */ is("text", "resource_link")
5983
+ }, (content) => content), /* @__PURE__ */ when({
5984
+ type: /* @__PURE__ */ is("image", "audio")
5984
5985
  }, (content) => omitUndefined({
5985
5986
  type: content.type,
5986
5987
  mimeType: content.mimeType,
5987
5988
  data: encode(content.data),
5988
5989
  annotations: content.annotations,
5989
5990
  _meta: content._meta
5990
- })), /* @__PURE__ */ when2({
5991
+ })), /* @__PURE__ */ when({
5991
5992
  type: "resource"
5992
5993
  }, (content) => omitUndefined({
5993
5994
  type: "resource",
@@ -6011,13 +6012,13 @@ var projectCompleteResult = /* @__PURE__ */ fnUntraced(function* (value, serverI
6011
6012
  resultType: "complete"
6012
6013
  };
6013
6014
  });
6014
- var matchedProtocolError = /* @__PURE__ */ type().pipe(/* @__PURE__ */ tag2("ResourceNotFound", (error) => new ProtocolError({
6015
+ var matchedProtocolError = /* @__PURE__ */ type().pipe(/* @__PURE__ */ tag("ResourceNotFound", (error) => new ProtocolError({
6015
6016
  code: INVALID_PARAMS,
6016
6017
  message: `Resource '${error.uri}' not found`,
6017
6018
  data: {
6018
6019
  uri: error.uri
6019
6020
  }
6020
- })), /* @__PURE__ */ tag2("ToolNotFound", "InvalidToolInput", "InvalidToolContinuation", "ToolExecutionError", "UnsupportedByProtocol", ProtocolError.fromTool), /* @__PURE__ */ orElse(ProtocolError.fromFeature));
6021
+ })), /* @__PURE__ */ tag("ToolNotFound", "InvalidToolInput", "InvalidToolContinuation", "ToolExecutionError", "UnsupportedByProtocol", ProtocolError.fromTool), /* @__PURE__ */ orElse(ProtocolError.fromFeature));
6021
6022
  var projectError = (error) => {
6022
6023
  const protocolError = matchedProtocolError(error);
6023
6024
  return McpError3.make({
@@ -6151,7 +6152,7 @@ var makeHandlers = (core, _lifecycle, context) => {
6151
6152
  continue;
6152
6153
  }
6153
6154
  const notification = event.notification;
6154
- const rpc = value2(notification).pipe(tags({
6155
+ const rpc = value(notification).pipe(tags({
6155
6156
  ToolsChanged: () => honored.toolsListChanged === true ? ToolListChangedNotification3 : undefined,
6156
6157
  PromptsChanged: () => honored.promptsListChanged === true ? PromptListChangedNotification3 : undefined,
6157
6158
  ResourcesChanged: () => honored.resourcesListChanged === true ? ResourceListChangedNotification3 : undefined,
@@ -6396,9 +6397,9 @@ var protocol5 = /* @__PURE__ */ make13({
6396
6397
  handlerRpcs,
6397
6398
  makeHandlers,
6398
6399
  toReverseClient: () => ({
6399
- listRoots: () => fail4(unsupported5("roots/list")),
6400
- createMessage: () => fail4(unsupported5("sampling/createMessage")),
6401
- elicit: () => fail4(unsupported5("elicitation/create"))
6400
+ listRoots: () => fail5(unsupported5("roots/list")),
6401
+ createMessage: () => fail5(unsupported5("sampling/createMessage")),
6402
+ elicit: () => fail5(unsupported5("elicitation/create"))
6402
6403
  }),
6403
6404
  projectNotification: (notification) => isSubscriptionServerNotification(notification) ? succeed6(undefined) : makeNotificationProjector({
6404
6405
  supportsProgressMessage: true
@@ -7247,7 +7248,7 @@ var makeNoSerialization2 = /* @__PURE__ */ fnUntraced(function* (group, options)
7247
7248
  const spanPrefix = options.spanPrefix ?? "RpcServer";
7248
7249
  const concurrency = options.concurrency ?? "unbounded";
7249
7250
  const disableFatalDefects = options.disableFatalDefects ?? false;
7250
- const services = yield* context();
7251
+ const services = yield* context2();
7251
7252
  const scope = get(services, Scope);
7252
7253
  const trackFiber = runIn(forkUnsafe(scope, "parallel"));
7253
7254
  const concurrencySemaphore = concurrency === "unbounded" ? undefined : yield* make(concurrency);
@@ -7390,7 +7391,7 @@ var makeNoSerialization2 = /* @__PURE__ */ fnUntraced(function* (group, options)
7390
7391
  exit
7391
7392
  });
7392
7393
  }
7393
- } else if (!disableFatalDefects && hasDies(exit.cause) && !hasInterrupts2(exit.cause)) {
7394
+ } else if (!disableFatalDefects && hasDies(exit.cause) && !hasInterrupts(exit.cause)) {
7394
7395
  write = sendDefect(client, squash(exit.cause));
7395
7396
  } else {
7396
7397
  write = options.onFromServer({
@@ -7552,7 +7553,7 @@ var make19 = /* @__PURE__ */ fnUntraced(function* (group, options) {
7552
7553
  supportsTransferables
7553
7554
  } = yield* Protocol2;
7554
7555
  const encodeDefectUnsafe = encodeSync(codecFor(Defect()));
7555
- const services = yield* context();
7556
+ const services = yield* context2();
7556
7557
  const scope = yield* make6();
7557
7558
  const server = yield* makeNoSerialization2(group, {
7558
7559
  ...options,
@@ -7744,7 +7745,7 @@ var makeProtocolStdio = /* @__PURE__ */ gen(function* () {
7744
7745
  startImmediately: true
7745
7746
  })), forkScoped);
7746
7747
  return {
7747
- disconnects: yield* make10(),
7748
+ disconnects: yield* make11(),
7748
7749
  send(_clientId, response) {
7749
7750
  const responseEncoded = parser.encode(response);
7750
7751
  if (responseEncoded === undefined) {
@@ -7770,7 +7771,7 @@ var layerProtocolStdio = /* @__PURE__ */ effect(Protocol2, makeProtocolStdio);
7770
7771
  // node_modules/effect/dist/ai/McpServer.js
7771
7772
  var internalState = /* @__PURE__ */ new WeakMap;
7772
7773
  var BroadcastServerNotificationRpcs = /* @__PURE__ */ ServerNotificationRpcs.omit("notifications/elicitation/complete");
7773
- var isLoggingLevel = /* @__PURE__ */ is(LoggingLevel);
7774
+ var isLoggingLevel = /* @__PURE__ */ is2(LoggingLevel);
7774
7775
  var toInternalServerNotification = (message) => {
7775
7776
  switch (message.tag) {
7776
7777
  case "notifications/cancelled":
@@ -7827,12 +7828,12 @@ var provideInvocationContext = (effect, invocation) => {
7827
7828
 
7828
7829
  class McpServer extends (/* @__PURE__ */ Service2()("effect/ai/McpServer")) {
7829
7830
  static make = /* @__PURE__ */ gen(function* () {
7830
- const internalCore = yield* make11;
7831
+ const internalCore = yield* make8;
7831
7832
  const tools = empty2();
7832
7833
  const resources = [];
7833
7834
  const resourceTemplates = [];
7834
7835
  const prompts = [];
7835
- const notificationsQueue = yield* make10();
7836
+ const notificationsQueue = yield* make11();
7836
7837
  const notificationDelivery = {
7837
7838
  consumers: 0
7838
7839
  };
@@ -7915,11 +7916,11 @@ class McpServer extends (/* @__PURE__ */ Service2()("effect/ai/McpServer")) {
7915
7916
  clientInfo: profile.clientInfo
7916
7917
  }),
7917
7918
  handle: (call, invocation) => provideInvocationContext(options.handle(call.arguments), invocation).pipe(catchTags({
7918
- InternalError: (error) => fail4(new ToolExecutionError({
7919
+ InternalError: (error) => fail5(new ToolExecutionError({
7919
7920
  name: options.tool.name,
7920
7921
  message: error.message
7921
7922
  })),
7922
- InvalidParams: (error) => fail4(new (invocation.requestContext.requestState === undefined && invocation.requestContext.inputResponses === undefined ? InvalidToolInput : InvalidToolContinuation)({
7923
+ InvalidParams: (error) => fail5(new (invocation.requestContext.requestState === undefined && invocation.requestContext.inputResponses === undefined ? InvalidToolInput : InvalidToolContinuation)({
7923
7924
  name: options.tool.name,
7924
7925
  message: error.message
7925
7926
  }))
@@ -8026,7 +8027,7 @@ class McpServer extends (/* @__PURE__ */ Service2()("effect/ai/McpServer")) {
8026
8027
  }),
8027
8028
  findResource: (uri) => gen(function* () {
8028
8029
  const client = yield* McpServerClient;
8029
- return yield* internalCore.resources.read(uri, invocationFromClient(client)).pipe(catchTag("ResourceNotFound", (error) => fail4(new InvalidParams({
8030
+ return yield* internalCore.resources.read(uri, invocationFromClient(client)).pipe(catchTag("ResourceNotFound", (error) => fail5(new InvalidParams({
8030
8031
  message: `Resource '${error.uri}' not found`
8031
8032
  }))));
8032
8033
  }),
@@ -8662,7 +8663,7 @@ var mcpStdioSerialization = (protocols) => {
8662
8663
  }
8663
8664
  });
8664
8665
  };
8665
- var isEncodedMcpFailureCause = /* @__PURE__ */ is(/* @__PURE__ */ TaggedStruct("Cause", {
8666
+ var isEncodedMcpFailureCause = /* @__PURE__ */ is2(/* @__PURE__ */ TaggedStruct("Cause", {
8666
8667
  data: /* @__PURE__ */ Tuple([/* @__PURE__ */ TaggedStruct("Fail", {
8667
8668
  error: /* @__PURE__ */ toEncoded2(McpError)
8668
8669
  })])
@@ -8872,10 +8873,10 @@ registerMcpTools({
8872
8873
  }
8873
8874
  const changes = getObject2(set);
8874
8875
  if (!changes) {
8875
- return fail4(new Error('set must be an object, for example { "grouping": "shared" }'));
8876
+ return fail5(new Error('set must be an object, for example { "grouping": "shared" }'));
8876
8877
  }
8877
8878
  if ("autoUpdate" in changes) {
8878
- return fail4(new Error("autoUpdate can't be read or changed from MCP. The user can change it with `browse settings set autoUpdate=...` or the extension's options page; `status` reports the current value."));
8879
+ return fail5(new Error("autoUpdate can't be read or changed from MCP. The user can change it with `browse settings set autoUpdate=...` or the extension's options page; `status` reports the current value."));
8879
8880
  }
8880
8881
  return ctx.relay.settingsSet(changes).pipe(map5((result) => ({ ...result, settings: agentSettings(result.settings) })));
8881
8882
  }
@@ -8889,7 +8890,7 @@ registerMcpTools({
8889
8890
  build: (ctx) => [
8890
8891
  {
8891
8892
  name: "execute",
8892
- description: `Execute Playwright JavaScript against the browse session. Code runs in a sandbox on the relay without process, require, import(), fs, child_process, http/https or Node fetch; save and read files with the files helper inside the execute file roots, and cookie access is limited to the session's pages. The result includes console logs, warnings, a bounded execution-context diagnostic when relevant, and an aftermath summary (URL movement, navigations, error counts, handoffs, and a bot challenge or block page when one appears: hand interactive ones to the user with handoff(), never solve or retry-loop them).`,
8893
+ description: `Execute Playwright JavaScript against the browse session. Code runs in a restricted JavaScript realm on the relay without process, require, import(), fs, child_process, http/https or Node fetch; save and read files with the files helper inside the execute file roots, and cookie access is limited to the session's pages. Synchronous code stops after about 2 seconds. It is not a security boundary, so treat code as running as the user. The result includes console logs, warnings, a bounded execution-context diagnostic when relevant, and an aftermath summary (URL movement, navigations, error counts, handoffs, and a bot challenge or block page when one appears: hand interactive ones to the user with handoff(), never solve or retry-loop them).`,
8893
8894
  inputSchema: objectSchema({
8894
8895
  code: {
8895
8896
  type: "string",
@@ -9028,7 +9029,7 @@ registerMcpTools({
9028
9029
  const outputPath = optionalStringField(object, "outputPath");
9029
9030
  const secrets = optionalStringField(object, "secrets");
9030
9031
  if (!outputPath && !secrets) {
9031
- return yield* fail4(new Error("network stop requires outputPath, secrets, or both"));
9032
+ return yield* fail5(new Error("network stop requires outputPath, secrets, or both"));
9032
9033
  }
9033
9034
  return {
9034
9035
  action,
@@ -9051,7 +9052,7 @@ registerMcpTools({
9051
9052
  yield* ensureExtensionConnected({ relay: ctx.relay, sessionId, waitForReconnect: true });
9052
9053
  const content = optionalStringField(object, "content");
9053
9054
  if (content !== undefined && content !== "embed" && content !== "omit") {
9054
- return yield* fail4(new Error("content must be embed or omit"));
9055
+ return yield* fail5(new Error("content must be embed or omit"));
9055
9056
  }
9056
9057
  const urlFilter = optionalStringField(object, "urlFilter");
9057
9058
  const resourceTypes = optionalStringArrayField(object, "resourceTypes");
@@ -9134,11 +9135,11 @@ registerMcpTools({
9134
9135
  }
9135
9136
  const mode = optionalStringField(object, "mode");
9136
9137
  if (mode !== undefined && mode !== "auto" && mode !== "tab-capture" && mode !== "cdp") {
9137
- return yield* fail4(new Error("mode must be auto, tab-capture, or cdp"));
9138
+ return yield* fail5(new Error("mode must be auto, tab-capture, or cdp"));
9138
9139
  }
9139
9140
  const frameRate = optionalPositiveIntegerField(object, "frameRate");
9140
9141
  if (frameRate !== undefined && frameRate > 60)
9141
- return yield* fail4(new Error("frameRate must be at most 60"));
9142
+ return yield* fail5(new Error("frameRate must be at most 60"));
9142
9143
  const maxDurationMs = optionalPositiveIntegerField(object, "maxDurationMs");
9143
9144
  const audio = optionalBooleanField(object, "audio");
9144
9145
  const cursor = optionalBooleanField(object, "cursor");
@@ -9394,7 +9395,7 @@ registerMcpTools({
9394
9395
  const sessionId = ctx.resolveSessionId(input);
9395
9396
  const allowedOrigins = requireObject(input).allowedOrigins;
9396
9397
  if (!Array.isArray(allowedOrigins) || !allowedOrigins.every((item) => isString(item))) {
9397
- return yield* fail4(new Error("allowedOrigins must be an array of strings"));
9398
+ return yield* fail5(new Error("allowedOrigins must be an array of strings"));
9398
9399
  }
9399
9400
  return { session: yield* ctx.relay.sessionAllowlist(sessionId, allowedOrigins) };
9400
9401
  })
@@ -9575,7 +9576,7 @@ var registerTools = gen(function* () {
9575
9576
  annotations: empty(),
9576
9577
  handle: (payload) => {
9577
9578
  const requiresRelay = typeof spec.requiresRelayCompatibility === "function" ? spec.requiresRelayCompatibility(payload) : spec.requiresRelayCompatibility !== false;
9578
- const operation = requiresRelay ? ensureRelay({ relay }).pipe(flatMap3((readiness) => readiness.buildProblem ? fail4(new Error(readiness.buildProblem)) : spec.handle(payload))) : spec.handle(payload);
9579
+ const operation = requiresRelay ? ensureRelay({ relay }).pipe(flatMap3((readiness) => readiness.buildProblem ? fail5(new Error(readiness.buildProblem)) : spec.handle(payload))) : spec.handle(payload);
9579
9580
  return operation.pipe(match3({
9580
9581
  onFailure: (error) => toolResult({ text: mcpErrorMessage2(spec.name, error.message), isError: true }),
9581
9582
  onSuccess: (value) => spec.result ? spec.result(value) : toolResultForValue2(value, spec.outputSchema ? { outputSchema: spec.outputSchema } : {})