@opencow-ai/opencow-agent-sdk 0.4.0 → 0.4.2-beta.0

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/client.js CHANGED
@@ -5,39 +5,60 @@ var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ function __accessProp(key) {
9
+ return this[key];
10
+ }
11
+ var __toESMCache_node;
12
+ var __toESMCache_esm;
8
13
  var __toESM = (mod, isNodeMode, target) => {
14
+ var canCache = mod != null && typeof mod === "object";
15
+ if (canCache) {
16
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
17
+ var cached = cache.get(mod);
18
+ if (cached)
19
+ return cached;
20
+ }
9
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
10
22
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
23
  for (let key of __getOwnPropNames(mod))
12
24
  if (!__hasOwnProp.call(to, key))
13
25
  __defProp(to, key, {
14
- get: () => mod[key],
26
+ get: __accessProp.bind(mod, key),
15
27
  enumerable: true
16
28
  });
29
+ if (canCache)
30
+ cache.set(mod, to);
17
31
  return to;
18
32
  };
19
- var __moduleCache = /* @__PURE__ */ new WeakMap;
20
33
  var __toCommonJS = (from) => {
21
- var entry = __moduleCache.get(from), desc;
34
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
22
35
  if (entry)
23
36
  return entry;
24
37
  entry = __defProp({}, "__esModule", { value: true });
25
- if (from && typeof from === "object" || typeof from === "function")
26
- __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
27
- get: () => from[key],
28
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
29
- }));
38
+ if (from && typeof from === "object" || typeof from === "function") {
39
+ for (var key of __getOwnPropNames(from))
40
+ if (!__hasOwnProp.call(entry, key))
41
+ __defProp(entry, key, {
42
+ get: __accessProp.bind(from, key),
43
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
44
+ });
45
+ }
30
46
  __moduleCache.set(from, entry);
31
47
  return entry;
32
48
  };
49
+ var __moduleCache;
33
50
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
51
+ var __returnValue = (v) => v;
52
+ function __exportSetter(name, newValue) {
53
+ this[name] = __returnValue.bind(null, newValue);
54
+ }
34
55
  var __export = (target, all) => {
35
56
  for (var name in all)
36
57
  __defProp(target, name, {
37
58
  get: all[name],
38
59
  enumerable: true,
39
60
  configurable: true,
40
- set: (newValue) => all[name] = () => newValue
61
+ set: __exportSetter.bind(all, name)
41
62
  });
42
63
  };
43
64
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -13368,7 +13389,7 @@ class JSONSchemaGenerator {
13368
13389
  if (val === undefined) {
13369
13390
  if (this.unrepresentable === "throw") {
13370
13391
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
13371
- } else {}
13392
+ }
13372
13393
  } else if (typeof val === "bigint") {
13373
13394
  if (this.unrepresentable === "throw") {
13374
13395
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -36355,7 +36376,6 @@ var init_base = __esm(() => {
36355
36376
  // node_modules/.bun/yoctocolors@2.1.2/node_modules/yoctocolors/index.js
36356
36377
  var init_yoctocolors = __esm(() => {
36357
36378
  init_base();
36358
- init_base();
36359
36379
  });
36360
36380
 
36361
36381
  // node_modules/.bun/execa@9.6.1/node_modules/execa/lib/verbose/default.js
@@ -62734,8 +62754,11 @@ var init_coreTypes = __esm(() => {
62734
62754
  "resume",
62735
62755
  "logout",
62736
62756
  "prompt_input_exit",
62737
- "other",
62738
- "bypass_permissions_disabled"
62757
+ "bypass_permissions_disabled",
62758
+ "normal",
62759
+ "aborted",
62760
+ "error",
62761
+ "other"
62739
62762
  ];
62740
62763
  });
62741
62764
 
@@ -90410,7 +90433,7 @@ var require_fetch = __commonJS((exports, module) => {
90410
90433
  request.cache = "no-store";
90411
90434
  }
90412
90435
  const newConnection = forceNewConnection ? "yes" : "no";
90413
- if (request.mode === "websocket") {} else {}
90436
+ if (request.mode === "websocket") {}
90414
90437
  let requestBody = null;
90415
90438
  if (request.body == null && fetchParams.processRequestEndOfBody) {
90416
90439
  queueMicrotask(() => fetchParams.processRequestEndOfBody());
@@ -94197,7 +94220,7 @@ var require_eventsource = __commonJS((exports, module) => {
94197
94220
 
94198
94221
  // node_modules/.bun/undici@7.24.6/node_modules/undici/index.js
94199
94222
  var require_undici = __commonJS((exports, module) => {
94200
- var __filename = "/Users/yunge/Projects/evose-react/opencow-agent-sdk/node_modules/.bun/undici@7.24.6/node_modules/undici/index.js";
94223
+ var __filename = "/home/runner/work/opencow-agent-sdk/opencow-agent-sdk/node_modules/.bun/undici@7.24.6/node_modules/undici/index.js";
94201
94224
  var Client2 = require_client();
94202
94225
  var Dispatcher = require_dispatcher();
94203
94226
  var Pool = require_pool();
@@ -95395,9 +95418,7 @@ async function* readSseEvents(response) {
95395
95418
  if (done)
95396
95419
  break;
95397
95420
  buffer += decoder.decode(value, { stream: true });
95398
- const chunks = buffer.split(`
95399
-
95400
- `);
95421
+ const chunks = buffer.split(/\r?\n\r?\n/);
95401
95422
  buffer = chunks.pop() ?? "";
95402
95423
  for (const chunk of chunks) {
95403
95424
  const lines = chunk.split(`
@@ -95425,6 +95446,25 @@ async function* readSseEvents(response) {
95425
95446
  yield { event, data };
95426
95447
  }
95427
95448
  }
95449
+ if (buffer.trim()) {
95450
+ const lines = buffer.split(`
95451
+ `).map((line) => line.trim()).filter(Boolean);
95452
+ const eventLine = lines.find((line) => line.startsWith("event: "));
95453
+ const dataLines = lines.filter((line) => line.startsWith("data: "));
95454
+ if (eventLine && dataLines.length > 0) {
95455
+ const event = eventLine.slice(7).trim();
95456
+ const rawData = dataLines.map((line) => line.slice(6)).join(`
95457
+ `);
95458
+ if (rawData !== "[DONE]") {
95459
+ try {
95460
+ const parsed = JSON.parse(rawData);
95461
+ if (parsed && typeof parsed === "object") {
95462
+ yield { event, data: parsed };
95463
+ }
95464
+ } catch {}
95465
+ }
95466
+ }
95467
+ }
95428
95468
  }
95429
95469
  function determineStopReason(response, sawToolUse) {
95430
95470
  const output = Array.isArray(response?.output) ? response.output : [];
@@ -95984,6 +96024,7 @@ function convertMessages(messages, system) {
95984
96024
  } else if (role === "assistant") {
95985
96025
  if (Array.isArray(content)) {
95986
96026
  const toolUses = content.filter((b) => b.type === "tool_use");
96027
+ const thinkingBlocks = content.filter((b) => b.type === "thinking");
95987
96028
  const textContent = content.filter((b) => b.type !== "tool_use" && b.type !== "thinking");
95988
96029
  const assistantMsg = {
95989
96030
  role: "assistant",
@@ -95992,6 +96033,13 @@ function convertMessages(messages, system) {
95992
96033
  return typeof c5 === "string" ? c5 : Array.isArray(c5) ? c5.map((p) => p.text ?? "").join("") : "";
95993
96034
  })()
95994
96035
  };
96036
+ if (thinkingBlocks.length > 0) {
96037
+ const reasoningText = thinkingBlocks.map((b) => b.thinking ?? "").filter(Boolean).join(`
96038
+ `);
96039
+ if (reasoningText) {
96040
+ assistantMsg.reasoning_content = reasoningText;
96041
+ }
96042
+ }
95995
96043
  if (toolUses.length > 0) {
95996
96044
  assistantMsg.tool_calls = toolUses.map((tu) => ({
95997
96045
  id: tu.id ?? `call_${crypto.randomUUID().replace(/-/g, "")}`,
@@ -108307,6 +108355,7 @@ __export(exports_sessionStorage, {
108307
108355
  getSessionFilesWithMtime: () => getSessionFilesWithMtime,
108308
108356
  getSessionFilesLite: () => getSessionFilesLite,
108309
108357
  getProjectsDir: () => getProjectsDir,
108358
+ getProjectSessionFileForTesting: () => getProjectSessionFileForTesting,
108310
108359
  getProjectDir: () => getProjectDir,
108311
108360
  getNodeEnv: () => getNodeEnv,
108312
108361
  getLogByIndex: () => getLogByIndex,
@@ -108327,6 +108376,7 @@ __export(exports_sessionStorage, {
108327
108376
  deleteRemoteAgentMetadata: () => deleteRemoteAgentMetadata,
108328
108377
  clearSessionMetadata: () => clearSessionMetadata,
108329
108378
  clearSessionMessagesCache: () => clearSessionMessagesCache,
108379
+ clearProjectForSession: () => clearProjectForSession,
108330
108380
  clearAgentTranscriptSubdir: () => clearAgentTranscriptSubdir,
108331
108381
  cleanMessagesForLogging: () => cleanMessagesForLogging,
108332
108382
  checkResumeConsistency: () => checkResumeConsistency,
@@ -108484,36 +108534,73 @@ function getEntrypoint() {
108484
108534
  function isCustomTitleEnabled() {
108485
108535
  return true;
108486
108536
  }
108537
+ function resolveProjectKey() {
108538
+ try {
108539
+ return getQueryContext().identity.sessionId;
108540
+ } catch {
108541
+ return NO_SESSION_PROJECT_KEY;
108542
+ }
108543
+ }
108487
108544
  function getProject() {
108488
- if (!project) {
108489
- project = new Project;
108545
+ const key = resolveProjectKey();
108546
+ let p = projects.get(key);
108547
+ if (!p) {
108548
+ p = new Project;
108549
+ if (processInternalEventWriter)
108550
+ p.setInternalEventWriter(processInternalEventWriter);
108551
+ if (processInternalEventReader)
108552
+ p.setInternalEventReader(processInternalEventReader);
108553
+ if (processInternalSubagentEventReader) {
108554
+ p.setInternalSubagentEventReader(processInternalSubagentEventReader);
108555
+ }
108556
+ projects.set(key, p);
108490
108557
  if (!cleanupRegistered) {
108491
108558
  registerCleanup(async () => {
108492
- await project?.flush();
108493
- try {
108494
- project?.reAppendSessionMetadata();
108495
- } catch {}
108559
+ for (const proj of projects.values()) {
108560
+ try {
108561
+ await proj.flush();
108562
+ } catch {}
108563
+ try {
108564
+ proj.reAppendSessionMetadata();
108565
+ } catch {}
108566
+ }
108496
108567
  });
108497
108568
  cleanupRegistered = true;
108498
108569
  }
108499
108570
  }
108500
- return project;
108571
+ return p;
108572
+ }
108573
+ function clearProjectForSession(sessionId) {
108574
+ projects.delete(sessionId);
108501
108575
  }
108502
108576
  function resetProjectFlushStateForTesting() {
108503
- project?._resetFlushState();
108577
+ for (const p of projects.values())
108578
+ p._resetFlushState();
108504
108579
  }
108505
108580
  function resetProjectForTesting() {
108506
- project = null;
108581
+ projects.clear();
108582
+ processInternalEventWriter = null;
108583
+ processInternalEventReader = null;
108584
+ processInternalSubagentEventReader = null;
108507
108585
  }
108508
108586
  function setSessionFileForTesting(path10) {
108509
108587
  getProject().sessionFile = path10;
108510
108588
  }
108589
+ function getProjectSessionFileForTesting() {
108590
+ return getProject().sessionFile;
108591
+ }
108511
108592
  function setInternalEventWriter(writer) {
108512
- getProject().setInternalEventWriter(writer);
108593
+ processInternalEventWriter = writer;
108594
+ for (const p of projects.values())
108595
+ p.setInternalEventWriter(writer);
108513
108596
  }
108514
108597
  function setInternalEventReader(reader, subagentReader) {
108515
- getProject().setInternalEventReader(reader);
108516
- getProject().setInternalSubagentEventReader(subagentReader);
108598
+ processInternalEventReader = reader;
108599
+ processInternalSubagentEventReader = subagentReader;
108600
+ for (const p of projects.values()) {
108601
+ p.setInternalEventReader(reader);
108602
+ p.setInternalSubagentEventReader(subagentReader);
108603
+ }
108517
108604
  }
108518
108605
  function setRemoteIngressUrlForTesting(url3) {
108519
108606
  getProject().setRemoteIngressUrl(url3);
@@ -109112,9 +109199,9 @@ async function resetSessionFilePointer() {
109112
109199
  getProject().resetSessionFile();
109113
109200
  }
109114
109201
  function adoptResumedSessionFile() {
109115
- const project2 = getProject();
109116
- project2.sessionFile = getTranscriptPath();
109117
- project2.reAppendSessionMetadata(true);
109202
+ const project = getProject();
109203
+ project.sessionFile = getTranscriptPath();
109204
+ project.reAppendSessionMetadata(true);
109118
109205
  }
109119
109206
  async function recordContextCollapseCommit(commit) {
109120
109207
  const sessionId = getSessionId();
@@ -109141,7 +109228,7 @@ async function flushSessionStorage() {
109141
109228
  }
109142
109229
  async function hydrateRemoteSession(sessionId, ingressUrl) {
109143
109230
  switchSession(asSessionId(sessionId));
109144
- const project2 = getProject();
109231
+ const project = getProject();
109145
109232
  try {
109146
109233
  const remoteLogs = await getSessionLogs(sessionId, ingressUrl) || [];
109147
109234
  const projectDir = getProjectDir(getOriginalCwd());
@@ -109157,14 +109244,14 @@ async function hydrateRemoteSession(sessionId, ingressUrl) {
109157
109244
  logForDiagnosticsNoPII("error", "hydrate_remote_session_fail");
109158
109245
  return false;
109159
109246
  } finally {
109160
- project2.setRemoteIngressUrl(ingressUrl);
109247
+ project.setRemoteIngressUrl(ingressUrl);
109161
109248
  }
109162
109249
  }
109163
109250
  async function hydrateFromCCRv2InternalEvents(sessionId) {
109164
109251
  const startMs = Date.now();
109165
109252
  switchSession(asSessionId(sessionId));
109166
- const project2 = getProject();
109167
- const reader = project2.getInternalEventReader();
109253
+ const project = getProject();
109254
+ const reader = project.getInternalEventReader();
109168
109255
  if (!reader) {
109169
109256
  logForDebugging("No internal event reader registered for CCR v2 resume");
109170
109257
  return false;
@@ -109184,7 +109271,7 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
109184
109271
  await writeFile(sessionFile, fgContent, { encoding: "utf8", mode: 384 });
109185
109272
  logForDebugging(`Hydrated ${events.length} foreground entries from CCR v2 internal events`);
109186
109273
  let subagentEventCount = 0;
109187
- const subagentReader = project2.getInternalSubagentEventReader();
109274
+ const subagentReader = project.getInternalSubagentEventReader();
109188
109275
  if (subagentReader) {
109189
109276
  const subagentEvents = await subagentReader();
109190
109277
  if (subagentEvents && subagentEvents.length > 0) {
@@ -110022,10 +110109,10 @@ async function linkSessionToPR(sessionId, prNumber, prUrl, prRepository, fullPat
110022
110109
  timestamp: new Date().toISOString()
110023
110110
  });
110024
110111
  if (sessionId === getSessionId()) {
110025
- const project2 = getProject();
110026
- project2.currentSessionPrNumber = prNumber;
110027
- project2.currentSessionPrUrl = prUrl;
110028
- project2.currentSessionPrRepository = prRepository;
110112
+ const project = getProject();
110113
+ project.currentSessionPrNumber = prNumber;
110114
+ project.currentSessionPrUrl = prUrl;
110115
+ project.currentSessionPrRepository = prRepository;
110029
110116
  }
110030
110117
  logEvent("tengu_session_linked_to_pr", { prNumber });
110031
110118
  }
@@ -110045,41 +110132,41 @@ function getCurrentSessionAgentColor() {
110045
110132
  return getProject().currentSessionAgentColor;
110046
110133
  }
110047
110134
  function restoreSessionMetadata(meta) {
110048
- const project2 = getProject();
110135
+ const project = getProject();
110049
110136
  if (meta.customTitle)
110050
- project2.currentSessionTitle ??= meta.customTitle;
110137
+ project.currentSessionTitle ??= meta.customTitle;
110051
110138
  if (meta.tag !== undefined)
110052
- project2.currentSessionTag = meta.tag || undefined;
110139
+ project.currentSessionTag = meta.tag || undefined;
110053
110140
  if (meta.agentName)
110054
- project2.currentSessionAgentName = meta.agentName;
110141
+ project.currentSessionAgentName = meta.agentName;
110055
110142
  if (meta.agentColor)
110056
- project2.currentSessionAgentColor = meta.agentColor;
110143
+ project.currentSessionAgentColor = meta.agentColor;
110057
110144
  if (meta.agentSetting)
110058
- project2.currentSessionAgentSetting = meta.agentSetting;
110145
+ project.currentSessionAgentSetting = meta.agentSetting;
110059
110146
  if (meta.mode)
110060
- project2.currentSessionMode = meta.mode;
110147
+ project.currentSessionMode = meta.mode;
110061
110148
  if (meta.worktreeSession !== undefined)
110062
- project2.currentSessionWorktree = meta.worktreeSession;
110149
+ project.currentSessionWorktree = meta.worktreeSession;
110063
110150
  if (meta.prNumber !== undefined)
110064
- project2.currentSessionPrNumber = meta.prNumber;
110151
+ project.currentSessionPrNumber = meta.prNumber;
110065
110152
  if (meta.prUrl)
110066
- project2.currentSessionPrUrl = meta.prUrl;
110153
+ project.currentSessionPrUrl = meta.prUrl;
110067
110154
  if (meta.prRepository)
110068
- project2.currentSessionPrRepository = meta.prRepository;
110155
+ project.currentSessionPrRepository = meta.prRepository;
110069
110156
  }
110070
110157
  function clearSessionMetadata() {
110071
- const project2 = getProject();
110072
- project2.currentSessionTitle = undefined;
110073
- project2.currentSessionTag = undefined;
110074
- project2.currentSessionAgentName = undefined;
110075
- project2.currentSessionAgentColor = undefined;
110076
- project2.currentSessionLastPrompt = undefined;
110077
- project2.currentSessionAgentSetting = undefined;
110078
- project2.currentSessionMode = undefined;
110079
- project2.currentSessionWorktree = undefined;
110080
- project2.currentSessionPrNumber = undefined;
110081
- project2.currentSessionPrUrl = undefined;
110082
- project2.currentSessionPrRepository = undefined;
110158
+ const project = getProject();
110159
+ project.currentSessionTitle = undefined;
110160
+ project.currentSessionTag = undefined;
110161
+ project.currentSessionAgentName = undefined;
110162
+ project.currentSessionAgentColor = undefined;
110163
+ project.currentSessionLastPrompt = undefined;
110164
+ project.currentSessionAgentSetting = undefined;
110165
+ project.currentSessionMode = undefined;
110166
+ project.currentSessionWorktree = undefined;
110167
+ project.currentSessionPrNumber = undefined;
110168
+ project.currentSessionPrUrl = undefined;
110169
+ project.currentSessionPrRepository = undefined;
110083
110170
  }
110084
110171
  function reAppendSessionMetadata() {
110085
110172
  getProject().reAppendSessionMetadata();
@@ -110128,10 +110215,10 @@ function saveWorktreeState(worktreeSession) {
110128
110215
  tmuxSessionName: worktreeSession.tmuxSessionName,
110129
110216
  hookBased: worktreeSession.hookBased
110130
110217
  } : null;
110131
- const project2 = getProject();
110132
- project2.currentSessionWorktree = stripped;
110133
- if (project2.sessionFile) {
110134
- appendEntryToFile(project2.sessionFile, {
110218
+ const project = getProject();
110219
+ project.currentSessionWorktree = stripped;
110220
+ if (project.sessionFile) {
110221
+ appendEntryToFile(project.sessionFile, {
110135
110222
  type: "worktree-state",
110136
110223
  worktreeSession: stripped,
110137
110224
  sessionId: getSessionId()
@@ -111352,7 +111439,7 @@ async function enrichLogs(allLogs, startIndex, count3) {
111352
111439
  }
111353
111440
  return { logs: result, nextIndex: i2 };
111354
111441
  }
111355
- var VERSION4, MAX_TOMBSTONE_REWRITE_BYTES, SKIP_FIRST_PROMPT_PATTERN, EPHEMERAL_PROGRESS_TYPES, MAX_TRANSCRIPT_READ_BYTES, agentTranscriptSubdirs, getProjectDir, project = null, cleanupRegistered = false, REMOTE_FLUSH_INTERVAL_MS = 10, PERSISTED_OUTPUT_TAG, TOOL_USE_RESULT_KEY, METADATA_TYPE_MARKERS, METADATA_MARKER_BUFS, METADATA_PREFIX_BOUND = 25, getSessionMessages, INITIAL_ENRICH_COUNT = 50;
111442
+ var VERSION4, MAX_TOMBSTONE_REWRITE_BYTES, SKIP_FIRST_PROMPT_PATTERN, EPHEMERAL_PROGRESS_TYPES, MAX_TRANSCRIPT_READ_BYTES, agentTranscriptSubdirs, getProjectDir, projects, cleanupRegistered = false, processInternalEventWriter = null, processInternalEventReader = null, processInternalSubagentEventReader = null, NO_SESSION_PROJECT_KEY = "__no_session__", REMOTE_FLUSH_INTERVAL_MS = 10, PERSISTED_OUTPUT_TAG, TOOL_USE_RESULT_KEY, METADATA_TYPE_MARKERS, METADATA_MARKER_BUFS, METADATA_PREFIX_BOUND = 25, getSessionMessages, INITIAL_ENRICH_COUNT = 50;
111356
111443
  var init_sessionStorage = __esm(() => {
111357
111444
  init_memoize();
111358
111445
  init_state();
@@ -111392,6 +111479,7 @@ var init_sessionStorage = __esm(() => {
111392
111479
  getProjectDir = memoize_default((projectDir) => {
111393
111480
  return join26(getProjectsDir(), sanitizePath(projectDir));
111394
111481
  });
111482
+ projects = new Map;
111395
111483
  PERSISTED_OUTPUT_TAG = Buffer.from("<persisted-output>");
111396
111484
  TOOL_USE_RESULT_KEY = Buffer.from('"toolUseResult":');
111397
111485
  METADATA_TYPE_MARKERS = [
@@ -120231,539 +120319,6 @@ var init_sandbox_runtime = __esm(() => {
120231
120319
  SandboxRuntimeConfigSchema2 = { parse: () => ({}) };
120232
120320
  });
120233
120321
 
120234
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/noop.js
120235
- function noop8() {}
120236
- var noop_default;
120237
- var init_noop = __esm(() => {
120238
- noop_default = noop8;
120239
- });
120240
-
120241
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseFindIndex.js
120242
- function baseFindIndex(array3, predicate, fromIndex, fromRight) {
120243
- var length = array3.length, index = fromIndex + (fromRight ? 1 : -1);
120244
- while (fromRight ? index-- : ++index < length) {
120245
- if (predicate(array3[index], index, array3)) {
120246
- return index;
120247
- }
120248
- }
120249
- return -1;
120250
- }
120251
- var _baseFindIndex_default;
120252
- var init__baseFindIndex = __esm(() => {
120253
- _baseFindIndex_default = baseFindIndex;
120254
- });
120255
-
120256
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseIsNaN.js
120257
- function baseIsNaN(value) {
120258
- return value !== value;
120259
- }
120260
- var _baseIsNaN_default;
120261
- var init__baseIsNaN = __esm(() => {
120262
- _baseIsNaN_default = baseIsNaN;
120263
- });
120264
-
120265
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_strictIndexOf.js
120266
- function strictIndexOf(array3, value, fromIndex) {
120267
- var index = fromIndex - 1, length = array3.length;
120268
- while (++index < length) {
120269
- if (array3[index] === value) {
120270
- return index;
120271
- }
120272
- }
120273
- return -1;
120274
- }
120275
- var _strictIndexOf_default;
120276
- var init__strictIndexOf = __esm(() => {
120277
- _strictIndexOf_default = strictIndexOf;
120278
- });
120279
-
120280
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseIndexOf.js
120281
- function baseIndexOf(array3, value, fromIndex) {
120282
- return value === value ? _strictIndexOf_default(array3, value, fromIndex) : _baseFindIndex_default(array3, _baseIsNaN_default, fromIndex);
120283
- }
120284
- var _baseIndexOf_default;
120285
- var init__baseIndexOf = __esm(() => {
120286
- init__baseFindIndex();
120287
- init__baseIsNaN();
120288
- init__strictIndexOf();
120289
- _baseIndexOf_default = baseIndexOf;
120290
- });
120291
-
120292
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayIncludes.js
120293
- function arrayIncludes(array3, value) {
120294
- var length = array3 == null ? 0 : array3.length;
120295
- return !!length && _baseIndexOf_default(array3, value, 0) > -1;
120296
- }
120297
- var _arrayIncludes_default;
120298
- var init__arrayIncludes = __esm(() => {
120299
- init__baseIndexOf();
120300
- _arrayIncludes_default = arrayIncludes;
120301
- });
120302
-
120303
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseSlice.js
120304
- function baseSlice(array3, start, end) {
120305
- var index = -1, length = array3.length;
120306
- if (start < 0) {
120307
- start = -start > length ? 0 : length + start;
120308
- }
120309
- end = end > length ? length : end;
120310
- if (end < 0) {
120311
- end += length;
120312
- }
120313
- length = start > end ? 0 : end - start >>> 0;
120314
- start >>>= 0;
120315
- var result = Array(length);
120316
- while (++index < length) {
120317
- result[index] = array3[index + start];
120318
- }
120319
- return result;
120320
- }
120321
- var _baseSlice_default;
120322
- var init__baseSlice = __esm(() => {
120323
- _baseSlice_default = baseSlice;
120324
- });
120325
-
120326
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_castSlice.js
120327
- function castSlice(array3, start, end) {
120328
- var length = array3.length;
120329
- end = end === undefined ? length : end;
120330
- return !start && end >= length ? array3 : _baseSlice_default(array3, start, end);
120331
- }
120332
- var _castSlice_default;
120333
- var init__castSlice = __esm(() => {
120334
- init__baseSlice();
120335
- _castSlice_default = castSlice;
120336
- });
120337
-
120338
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_hasUnicode.js
120339
- function hasUnicode(string5) {
120340
- return reHasUnicode.test(string5);
120341
- }
120342
- var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange, rsVarRange = "\\ufe0e\\ufe0f", rsZWJ = "\\u200d", reHasUnicode, _hasUnicode_default;
120343
- var init__hasUnicode = __esm(() => {
120344
- rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
120345
- reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
120346
- _hasUnicode_default = hasUnicode;
120347
- });
120348
-
120349
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_asciiToArray.js
120350
- function asciiToArray(string5) {
120351
- return string5.split("");
120352
- }
120353
- var _asciiToArray_default;
120354
- var init__asciiToArray = __esm(() => {
120355
- _asciiToArray_default = asciiToArray;
120356
- });
120357
-
120358
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_unicodeToArray.js
120359
- function unicodeToArray(string5) {
120360
- return string5.match(reUnicode) || [];
120361
- }
120362
- var rsAstralRange2 = "\\ud800-\\udfff", rsComboMarksRange2 = "\\u0300-\\u036f", reComboHalfMarksRange2 = "\\ufe20-\\ufe2f", rsComboSymbolsRange2 = "\\u20d0-\\u20ff", rsComboRange2, rsVarRange2 = "\\ufe0e\\ufe0f", rsAstral, rsCombo, rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier, rsNonAstral, rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ2 = "\\u200d", reOptMod, rsOptVar, rsOptJoin, rsSeq, rsSymbol, reUnicode, _unicodeToArray_default;
120363
- var init__unicodeToArray = __esm(() => {
120364
- rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
120365
- rsAstral = "[" + rsAstralRange2 + "]";
120366
- rsCombo = "[" + rsComboRange2 + "]";
120367
- rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
120368
- rsNonAstral = "[^" + rsAstralRange2 + "]";
120369
- reOptMod = rsModifier + "?";
120370
- rsOptVar = "[" + rsVarRange2 + "]?";
120371
- rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
120372
- rsSeq = rsOptVar + reOptMod + rsOptJoin;
120373
- rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
120374
- reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
120375
- _unicodeToArray_default = unicodeToArray;
120376
- });
120377
-
120378
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_stringToArray.js
120379
- function stringToArray(string5) {
120380
- return _hasUnicode_default(string5) ? _unicodeToArray_default(string5) : _asciiToArray_default(string5);
120381
- }
120382
- var _stringToArray_default;
120383
- var init__stringToArray = __esm(() => {
120384
- init__asciiToArray();
120385
- init__hasUnicode();
120386
- init__unicodeToArray();
120387
- _stringToArray_default = stringToArray;
120388
- });
120389
-
120390
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createCaseFirst.js
120391
- function createCaseFirst(methodName) {
120392
- return function(string5) {
120393
- string5 = toString_default(string5);
120394
- var strSymbols = _hasUnicode_default(string5) ? _stringToArray_default(string5) : undefined;
120395
- var chr = strSymbols ? strSymbols[0] : string5.charAt(0);
120396
- var trailing = strSymbols ? _castSlice_default(strSymbols, 1).join("") : string5.slice(1);
120397
- return chr[methodName]() + trailing;
120398
- };
120399
- }
120400
- var _createCaseFirst_default;
120401
- var init__createCaseFirst = __esm(() => {
120402
- init__castSlice();
120403
- init__hasUnicode();
120404
- init__stringToArray();
120405
- init_toString();
120406
- _createCaseFirst_default = createCaseFirst;
120407
- });
120408
-
120409
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/upperFirst.js
120410
- var upperFirst, upperFirst_default;
120411
- var init_upperFirst = __esm(() => {
120412
- init__createCaseFirst();
120413
- upperFirst = _createCaseFirst_default("toUpperCase");
120414
- upperFirst_default = upperFirst;
120415
- });
120416
-
120417
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/capitalize.js
120418
- function capitalize2(string5) {
120419
- return upperFirst_default(toString_default(string5).toLowerCase());
120420
- }
120421
- var capitalize_default;
120422
- var init_capitalize = __esm(() => {
120423
- init_toString();
120424
- init_upperFirst();
120425
- capitalize_default = capitalize2;
120426
- });
120427
-
120428
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayAggregator.js
120429
- function arrayAggregator(array3, setter, iteratee, accumulator) {
120430
- var index = -1, length = array3 == null ? 0 : array3.length;
120431
- while (++index < length) {
120432
- var value = array3[index];
120433
- setter(accumulator, value, iteratee(value), array3);
120434
- }
120435
- return accumulator;
120436
- }
120437
- var _arrayAggregator_default;
120438
- var init__arrayAggregator = __esm(() => {
120439
- _arrayAggregator_default = arrayAggregator;
120440
- });
120441
-
120442
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createBaseEach.js
120443
- function createBaseEach(eachFunc, fromRight) {
120444
- return function(collection, iteratee) {
120445
- if (collection == null) {
120446
- return collection;
120447
- }
120448
- if (!isArrayLike_default(collection)) {
120449
- return eachFunc(collection, iteratee);
120450
- }
120451
- var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
120452
- while (fromRight ? index-- : ++index < length) {
120453
- if (iteratee(iterable[index], index, iterable) === false) {
120454
- break;
120455
- }
120456
- }
120457
- return collection;
120458
- };
120459
- }
120460
- var _createBaseEach_default;
120461
- var init__createBaseEach = __esm(() => {
120462
- init_isArrayLike();
120463
- _createBaseEach_default = createBaseEach;
120464
- });
120465
-
120466
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseEach.js
120467
- var baseEach, _baseEach_default;
120468
- var init__baseEach = __esm(() => {
120469
- init__baseForOwn();
120470
- init__createBaseEach();
120471
- baseEach = _createBaseEach_default(_baseForOwn_default);
120472
- _baseEach_default = baseEach;
120473
- });
120474
-
120475
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseAggregator.js
120476
- function baseAggregator(collection, setter, iteratee, accumulator) {
120477
- _baseEach_default(collection, function(value, key, collection2) {
120478
- setter(accumulator, value, iteratee(value), collection2);
120479
- });
120480
- return accumulator;
120481
- }
120482
- var _baseAggregator_default;
120483
- var init__baseAggregator = __esm(() => {
120484
- init__baseEach();
120485
- _baseAggregator_default = baseAggregator;
120486
- });
120487
-
120488
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createAggregator.js
120489
- function createAggregator(setter, initializer3) {
120490
- return function(collection, iteratee) {
120491
- var func = isArray_default(collection) ? _arrayAggregator_default : _baseAggregator_default, accumulator = initializer3 ? initializer3() : {};
120492
- return func(collection, setter, _baseIteratee_default(iteratee, 2), accumulator);
120493
- };
120494
- }
120495
- var _createAggregator_default;
120496
- var init__createAggregator = __esm(() => {
120497
- init__arrayAggregator();
120498
- init__baseAggregator();
120499
- init__baseIteratee();
120500
- init_isArray();
120501
- _createAggregator_default = createAggregator;
120502
- });
120503
-
120504
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayIncludesWith.js
120505
- function arrayIncludesWith(array3, value, comparator) {
120506
- var index = -1, length = array3 == null ? 0 : array3.length;
120507
- while (++index < length) {
120508
- if (comparator(value, array3[index])) {
120509
- return true;
120510
- }
120511
- }
120512
- return false;
120513
- }
120514
- var _arrayIncludesWith_default;
120515
- var init__arrayIncludesWith = __esm(() => {
120516
- _arrayIncludesWith_default = arrayIncludesWith;
120517
- });
120518
-
120519
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseFilter.js
120520
- function baseFilter(collection, predicate) {
120521
- var result = [];
120522
- _baseEach_default(collection, function(value, index, collection2) {
120523
- if (predicate(value, index, collection2)) {
120524
- result.push(value);
120525
- }
120526
- });
120527
- return result;
120528
- }
120529
- var _baseFilter_default;
120530
- var init__baseFilter = __esm(() => {
120531
- init__baseEach();
120532
- _baseFilter_default = baseFilter;
120533
- });
120534
-
120535
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseValues.js
120536
- function baseValues(object4, props) {
120537
- return _arrayMap_default(props, function(key) {
120538
- return object4[key];
120539
- });
120540
- }
120541
- var _baseValues_default;
120542
- var init__baseValues = __esm(() => {
120543
- init__arrayMap();
120544
- _baseValues_default = baseValues;
120545
- });
120546
-
120547
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/values.js
120548
- function values(object4) {
120549
- return object4 == null ? [] : _baseValues_default(object4, keys_default(object4));
120550
- }
120551
- var values_default;
120552
- var init_values3 = __esm(() => {
120553
- init__baseValues();
120554
- init_keys();
120555
- values_default = values;
120556
- });
120557
-
120558
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/isEqual.js
120559
- function isEqual(value, other) {
120560
- return _baseIsEqual_default(value, other);
120561
- }
120562
- var isEqual_default;
120563
- var init_isEqual = __esm(() => {
120564
- init__baseIsEqual();
120565
- isEqual_default = isEqual;
120566
- });
120567
-
120568
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/negate.js
120569
- function negate(predicate) {
120570
- if (typeof predicate != "function") {
120571
- throw new TypeError(FUNC_ERROR_TEXT2);
120572
- }
120573
- return function() {
120574
- var args = arguments;
120575
- switch (args.length) {
120576
- case 0:
120577
- return !predicate.call(this);
120578
- case 1:
120579
- return !predicate.call(this, args[0]);
120580
- case 2:
120581
- return !predicate.call(this, args[0], args[1]);
120582
- case 3:
120583
- return !predicate.call(this, args[0], args[1], args[2]);
120584
- }
120585
- return !predicate.apply(this, args);
120586
- };
120587
- }
120588
- var FUNC_ERROR_TEXT2 = "Expected a function", negate_default;
120589
- var init_negate = __esm(() => {
120590
- negate_default = negate;
120591
- });
120592
-
120593
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/partition.js
120594
- var partition2, partition_default;
120595
- var init_partition = __esm(() => {
120596
- init__createAggregator();
120597
- partition2 = _createAggregator_default(function(result, value, key) {
120598
- result[key ? 0 : 1].push(value);
120599
- }, function() {
120600
- return [[], []];
120601
- });
120602
- partition_default = partition2;
120603
- });
120604
-
120605
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseRandom.js
120606
- function baseRandom(lower, upper) {
120607
- return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
120608
- }
120609
- var nativeFloor, nativeRandom, _baseRandom_default;
120610
- var init__baseRandom = __esm(() => {
120611
- nativeFloor = Math.floor;
120612
- nativeRandom = Math.random;
120613
- _baseRandom_default = baseRandom;
120614
- });
120615
-
120616
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/reject.js
120617
- function reject(collection, predicate) {
120618
- var func = isArray_default(collection) ? _arrayFilter_default : _baseFilter_default;
120619
- return func(collection, negate_default(_baseIteratee_default(predicate, 3)));
120620
- }
120621
- var reject_default;
120622
- var init_reject2 = __esm(() => {
120623
- init__arrayFilter();
120624
- init__baseFilter();
120625
- init__baseIteratee();
120626
- init_isArray();
120627
- init_negate();
120628
- reject_default = reject;
120629
- });
120630
-
120631
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arraySample.js
120632
- function arraySample(array3) {
120633
- var length = array3.length;
120634
- return length ? array3[_baseRandom_default(0, length - 1)] : undefined;
120635
- }
120636
- var _arraySample_default;
120637
- var init__arraySample = __esm(() => {
120638
- init__baseRandom();
120639
- _arraySample_default = arraySample;
120640
- });
120641
-
120642
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseSample.js
120643
- function baseSample(collection) {
120644
- return _arraySample_default(values_default(collection));
120645
- }
120646
- var _baseSample_default;
120647
- var init__baseSample = __esm(() => {
120648
- init__arraySample();
120649
- init_values3();
120650
- _baseSample_default = baseSample;
120651
- });
120652
-
120653
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/sample.js
120654
- function sample(collection) {
120655
- var func = isArray_default(collection) ? _arraySample_default : _baseSample_default;
120656
- return func(collection);
120657
- }
120658
- var sample_default;
120659
- var init_sample = __esm(() => {
120660
- init__arraySample();
120661
- init__baseSample();
120662
- init_isArray();
120663
- sample_default = sample;
120664
- });
120665
-
120666
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createSet.js
120667
- var INFINITY3, createSet, _createSet_default;
120668
- var init__createSet = __esm(() => {
120669
- init__Set();
120670
- init_noop();
120671
- init__setToArray();
120672
- INFINITY3 = 1 / 0;
120673
- createSet = !(_Set_default && 1 / _setToArray_default(new _Set_default([, -0]))[1] == INFINITY3) ? noop_default : function(values2) {
120674
- return new _Set_default(values2);
120675
- };
120676
- _createSet_default = createSet;
120677
- });
120678
-
120679
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseUniq.js
120680
- function baseUniq(array3, iteratee, comparator) {
120681
- var index = -1, includes = _arrayIncludes_default, length = array3.length, isCommon = true, result = [], seen = result;
120682
- if (comparator) {
120683
- isCommon = false;
120684
- includes = _arrayIncludesWith_default;
120685
- } else if (length >= LARGE_ARRAY_SIZE2) {
120686
- var set3 = iteratee ? null : _createSet_default(array3);
120687
- if (set3) {
120688
- return _setToArray_default(set3);
120689
- }
120690
- isCommon = false;
120691
- includes = _cacheHas_default;
120692
- seen = new _SetCache_default;
120693
- } else {
120694
- seen = iteratee ? [] : result;
120695
- }
120696
- outer:
120697
- while (++index < length) {
120698
- var value = array3[index], computed = iteratee ? iteratee(value) : value;
120699
- value = comparator || value !== 0 ? value : 0;
120700
- if (isCommon && computed === computed) {
120701
- var seenIndex = seen.length;
120702
- while (seenIndex--) {
120703
- if (seen[seenIndex] === computed) {
120704
- continue outer;
120705
- }
120706
- }
120707
- if (iteratee) {
120708
- seen.push(computed);
120709
- }
120710
- result.push(value);
120711
- } else if (!includes(seen, computed, comparator)) {
120712
- if (seen !== result) {
120713
- seen.push(computed);
120714
- }
120715
- result.push(value);
120716
- }
120717
- }
120718
- return result;
120719
- }
120720
- var LARGE_ARRAY_SIZE2 = 200, _baseUniq_default;
120721
- var init__baseUniq = __esm(() => {
120722
- init__SetCache();
120723
- init__arrayIncludes();
120724
- init__arrayIncludesWith();
120725
- init__cacheHas();
120726
- init__createSet();
120727
- init__setToArray();
120728
- _baseUniq_default = baseUniq;
120729
- });
120730
-
120731
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/uniqBy.js
120732
- function uniqBy(array3, iteratee) {
120733
- return array3 && array3.length ? _baseUniq_default(array3, _baseIteratee_default(iteratee, 2)) : [];
120734
- }
120735
- var uniqBy_default;
120736
- var init_uniqBy = __esm(() => {
120737
- init__baseIteratee();
120738
- init__baseUniq();
120739
- uniqBy_default = uniqBy;
120740
- });
120741
-
120742
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseZipObject.js
120743
- function baseZipObject(props, values2, assignFunc) {
120744
- var index = -1, length = props.length, valsLength = values2.length, result = {};
120745
- while (++index < length) {
120746
- var value = index < valsLength ? values2[index] : undefined;
120747
- assignFunc(result, props[index], value);
120748
- }
120749
- return result;
120750
- }
120751
- var _baseZipObject_default;
120752
- var init__baseZipObject = __esm(() => {
120753
- _baseZipObject_default = baseZipObject;
120754
- });
120755
-
120756
- // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/zipObject.js
120757
- function zipObject(props, values2) {
120758
- return _baseZipObject_default(props || [], values2 || [], _assignValue_default);
120759
- }
120760
- var zipObject_default;
120761
- var init_zipObject = __esm(() => {
120762
- init__assignValue();
120763
- init__baseZipObject();
120764
- zipObject_default = zipObject;
120765
- });
120766
-
120767
120322
  // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/lodash.js
120768
120323
  var init_lodash = __esm(() => {
120769
120324
  init_memoize();
@@ -121165,9 +120720,9 @@ class NodeFsHandler {
121165
120720
  this._addToNodeFs(path10, initialAdd, wh, depth + 1);
121166
120721
  }
121167
120722
  }).on(EV.ERROR, this._boundHandleError);
121168
- return new Promise((resolve11, reject2) => {
120723
+ return new Promise((resolve11, reject) => {
121169
120724
  if (!stream4)
121170
- return reject2();
120725
+ return reject();
121171
120726
  stream4.once(STR_END, () => {
121172
120727
  if (this.fsw.closed) {
121173
120728
  stream4 = undefined;
@@ -122651,7 +122206,7 @@ function ripGrepRaw(args, target, abortSignal, callback, singleThread = false) {
122651
122206
  async function ripGrepFileCount(args, target, abortSignal) {
122652
122207
  await codesignRipgrepIfNecessary();
122653
122208
  const { rgPath, rgArgs } = ripgrepCommand();
122654
- return new Promise((resolve13, reject2) => {
122209
+ return new Promise((resolve13, reject) => {
122655
122210
  const child = spawn3(rgPath, [...rgArgs, ...args, target], {
122656
122211
  signal: abortSignal,
122657
122212
  env: getQueryEnvForSpawn2(),
@@ -122671,13 +122226,13 @@ async function ripGrepFileCount(args, target, abortSignal) {
122671
122226
  if (code === 0 || code === 1)
122672
122227
  resolve13(lines);
122673
122228
  else
122674
- reject2(new Error(`rg --files exited ${code}`));
122229
+ reject(new Error(`rg --files exited ${code}`));
122675
122230
  });
122676
122231
  child.on("error", (err2) => {
122677
122232
  if (settled)
122678
122233
  return;
122679
122234
  settled = true;
122680
- reject2(err2.code === "ENOENT" ? wrapRipgrepUnavailableError(err2) : err2);
122235
+ reject(err2.code === "ENOENT" ? wrapRipgrepUnavailableError(err2) : err2);
122681
122236
  });
122682
122237
  });
122683
122238
  }
@@ -122686,7 +122241,7 @@ async function ripGrep(args, target, abortSignal) {
122686
122241
  testRipgrepOnFirstUse().catch((error41) => {
122687
122242
  logError(error41);
122688
122243
  });
122689
- return new Promise((resolve13, reject2) => {
122244
+ return new Promise((resolve13, reject) => {
122690
122245
  const handleResult3 = (error41, stdout, stderr, isRetry) => {
122691
122246
  if (!error41) {
122692
122247
  resolve13(stdout.trim().split(`
@@ -122699,7 +122254,7 @@ async function ripGrep(args, target, abortSignal) {
122699
122254
  }
122700
122255
  const CRITICAL_ERROR_CODES = ["ENOENT", "EACCES", "EPERM"];
122701
122256
  if (CRITICAL_ERROR_CODES.includes(error41.code)) {
122702
- reject2(error41.code === "ENOENT" ? wrapRipgrepUnavailableError(error41) : error41);
122257
+ reject(error41.code === "ENOENT" ? wrapRipgrepUnavailableError(error41) : error41);
122703
122258
  return;
122704
122259
  }
122705
122260
  if (!isRetry && isEagainError(stderr)) {
@@ -122726,7 +122281,7 @@ async function ripGrep(args, target, abortSignal) {
122726
122281
  logError(error41);
122727
122282
  }
122728
122283
  if (isTimeout && lines.length === 0) {
122729
- reject2(new RipgrepTimeoutError(`Ripgrep search timed out after ${getPlatform() === "wsl" ? 60 : 20} seconds. The search may have matched files but did not complete in time. Try searching a more specific path or pattern.`, lines));
122284
+ reject(new RipgrepTimeoutError(`Ripgrep search timed out after ${getPlatform() === "wsl" ? 60 : 20} seconds. The search may have matched files but did not complete in time. Try searching a more specific path or pattern.`, lines));
122730
122285
  return;
122731
122286
  }
122732
122287
  resolve13(lines);
@@ -125074,256 +124629,6 @@ class Diff {
125074
124629
  return components;
125075
124630
  }
125076
124631
  }
125077
-
125078
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/character.js
125079
- var CharacterDiff, characterDiff;
125080
- var init_character = __esm(() => {
125081
- CharacterDiff = class CharacterDiff extends Diff {
125082
- };
125083
- characterDiff = new CharacterDiff;
125084
- });
125085
-
125086
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/util/string.js
125087
- function longestCommonPrefix(str1, str2) {
125088
- let i3;
125089
- for (i3 = 0;i3 < str1.length && i3 < str2.length; i3++) {
125090
- if (str1[i3] != str2[i3]) {
125091
- return str1.slice(0, i3);
125092
- }
125093
- }
125094
- return str1.slice(0, i3);
125095
- }
125096
- function longestCommonSuffix(str1, str2) {
125097
- let i3;
125098
- if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) {
125099
- return "";
125100
- }
125101
- for (i3 = 0;i3 < str1.length && i3 < str2.length; i3++) {
125102
- if (str1[str1.length - (i3 + 1)] != str2[str2.length - (i3 + 1)]) {
125103
- return str1.slice(-i3);
125104
- }
125105
- }
125106
- return str1.slice(-i3);
125107
- }
125108
- function replacePrefix(string5, oldPrefix, newPrefix) {
125109
- if (string5.slice(0, oldPrefix.length) != oldPrefix) {
125110
- throw Error(`string ${JSON.stringify(string5)} doesn't start with prefix ${JSON.stringify(oldPrefix)}; this is a bug`);
125111
- }
125112
- return newPrefix + string5.slice(oldPrefix.length);
125113
- }
125114
- function replaceSuffix(string5, oldSuffix, newSuffix) {
125115
- if (!oldSuffix) {
125116
- return string5 + newSuffix;
125117
- }
125118
- if (string5.slice(-oldSuffix.length) != oldSuffix) {
125119
- throw Error(`string ${JSON.stringify(string5)} doesn't end with suffix ${JSON.stringify(oldSuffix)}; this is a bug`);
125120
- }
125121
- return string5.slice(0, -oldSuffix.length) + newSuffix;
125122
- }
125123
- function removePrefix(string5, oldPrefix) {
125124
- return replacePrefix(string5, oldPrefix, "");
125125
- }
125126
- function removeSuffix(string5, oldSuffix) {
125127
- return replaceSuffix(string5, oldSuffix, "");
125128
- }
125129
- function maximumOverlap(string1, string22) {
125130
- return string22.slice(0, overlapCount(string1, string22));
125131
- }
125132
- function overlapCount(a2, b) {
125133
- let startA = 0;
125134
- if (a2.length > b.length) {
125135
- startA = a2.length - b.length;
125136
- }
125137
- let endB = b.length;
125138
- if (a2.length < b.length) {
125139
- endB = a2.length;
125140
- }
125141
- const map3 = Array(endB);
125142
- let k = 0;
125143
- map3[0] = 0;
125144
- for (let j = 1;j < endB; j++) {
125145
- if (b[j] == b[k]) {
125146
- map3[j] = map3[k];
125147
- } else {
125148
- map3[j] = k;
125149
- }
125150
- while (k > 0 && b[j] != b[k]) {
125151
- k = map3[k];
125152
- }
125153
- if (b[j] == b[k]) {
125154
- k++;
125155
- }
125156
- }
125157
- k = 0;
125158
- for (let i3 = startA;i3 < a2.length; i3++) {
125159
- while (k > 0 && a2[i3] != b[k]) {
125160
- k = map3[k];
125161
- }
125162
- if (a2[i3] == b[k]) {
125163
- k++;
125164
- }
125165
- }
125166
- return k;
125167
- }
125168
- function trailingWs(string5) {
125169
- let i3;
125170
- for (i3 = string5.length - 1;i3 >= 0; i3--) {
125171
- if (!string5[i3].match(/\s/)) {
125172
- break;
125173
- }
125174
- }
125175
- return string5.substring(i3 + 1);
125176
- }
125177
- function leadingWs(string5) {
125178
- const match = string5.match(/^\s*/);
125179
- return match ? match[0] : "";
125180
- }
125181
-
125182
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/word.js
125183
- function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) {
125184
- if (deletion && insertion) {
125185
- const oldWsPrefix = leadingWs(deletion.value);
125186
- const oldWsSuffix = trailingWs(deletion.value);
125187
- const newWsPrefix = leadingWs(insertion.value);
125188
- const newWsSuffix = trailingWs(insertion.value);
125189
- if (startKeep) {
125190
- const commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix);
125191
- startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix);
125192
- deletion.value = removePrefix(deletion.value, commonWsPrefix);
125193
- insertion.value = removePrefix(insertion.value, commonWsPrefix);
125194
- }
125195
- if (endKeep) {
125196
- const commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix);
125197
- endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix);
125198
- deletion.value = removeSuffix(deletion.value, commonWsSuffix);
125199
- insertion.value = removeSuffix(insertion.value, commonWsSuffix);
125200
- }
125201
- } else if (insertion) {
125202
- if (startKeep) {
125203
- const ws = leadingWs(insertion.value);
125204
- insertion.value = insertion.value.substring(ws.length);
125205
- }
125206
- if (endKeep) {
125207
- const ws = leadingWs(endKeep.value);
125208
- endKeep.value = endKeep.value.substring(ws.length);
125209
- }
125210
- } else if (startKeep && endKeep) {
125211
- const newWsFull = leadingWs(endKeep.value), delWsStart = leadingWs(deletion.value), delWsEnd = trailingWs(deletion.value);
125212
- const newWsStart = longestCommonPrefix(newWsFull, delWsStart);
125213
- deletion.value = removePrefix(deletion.value, newWsStart);
125214
- const newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd);
125215
- deletion.value = removeSuffix(deletion.value, newWsEnd);
125216
- endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd);
125217
- startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length));
125218
- } else if (endKeep) {
125219
- const endKeepWsPrefix = leadingWs(endKeep.value);
125220
- const deletionWsSuffix = trailingWs(deletion.value);
125221
- const overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix);
125222
- deletion.value = removeSuffix(deletion.value, overlap);
125223
- } else if (startKeep) {
125224
- const startKeepWsSuffix = trailingWs(startKeep.value);
125225
- const deletionWsPrefix = leadingWs(deletion.value);
125226
- const overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix);
125227
- deletion.value = removePrefix(deletion.value, overlap);
125228
- }
125229
- }
125230
- var extendedWordChars = "a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", tokenizeIncludingWhitespace, WordDiff, wordDiff, WordsWithSpaceDiff, wordsWithSpaceDiff;
125231
- var init_word = __esm(() => {
125232
- tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, "ug");
125233
- WordDiff = class WordDiff extends Diff {
125234
- equals(left, right, options) {
125235
- if (options.ignoreCase) {
125236
- left = left.toLowerCase();
125237
- right = right.toLowerCase();
125238
- }
125239
- return left.trim() === right.trim();
125240
- }
125241
- tokenize(value, options = {}) {
125242
- let parts;
125243
- if (options.intlSegmenter) {
125244
- const segmenter = options.intlSegmenter;
125245
- if (segmenter.resolvedOptions().granularity != "word") {
125246
- throw new Error('The segmenter passed must have a granularity of "word"');
125247
- }
125248
- parts = [];
125249
- for (const segmentObj of Array.from(segmenter.segment(value))) {
125250
- const segment = segmentObj.segment;
125251
- if (parts.length && /\s/.test(parts[parts.length - 1]) && /\s/.test(segment)) {
125252
- parts[parts.length - 1] += segment;
125253
- } else {
125254
- parts.push(segment);
125255
- }
125256
- }
125257
- } else {
125258
- parts = value.match(tokenizeIncludingWhitespace) || [];
125259
- }
125260
- const tokens = [];
125261
- let prevPart = null;
125262
- parts.forEach((part) => {
125263
- if (/\s/.test(part)) {
125264
- if (prevPart == null) {
125265
- tokens.push(part);
125266
- } else {
125267
- tokens.push(tokens.pop() + part);
125268
- }
125269
- } else if (prevPart != null && /\s/.test(prevPart)) {
125270
- if (tokens[tokens.length - 1] == prevPart) {
125271
- tokens.push(tokens.pop() + part);
125272
- } else {
125273
- tokens.push(prevPart + part);
125274
- }
125275
- } else {
125276
- tokens.push(part);
125277
- }
125278
- prevPart = part;
125279
- });
125280
- return tokens;
125281
- }
125282
- join(tokens) {
125283
- return tokens.map((token, i3) => {
125284
- if (i3 == 0) {
125285
- return token;
125286
- } else {
125287
- return token.replace(/^\s+/, "");
125288
- }
125289
- }).join("");
125290
- }
125291
- postProcess(changes, options) {
125292
- if (!changes || options.oneChangePerToken) {
125293
- return changes;
125294
- }
125295
- let lastKeep = null;
125296
- let insertion = null;
125297
- let deletion = null;
125298
- changes.forEach((change) => {
125299
- if (change.added) {
125300
- insertion = change;
125301
- } else if (change.removed) {
125302
- deletion = change;
125303
- } else {
125304
- if (insertion || deletion) {
125305
- dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change);
125306
- }
125307
- lastKeep = change;
125308
- insertion = null;
125309
- deletion = null;
125310
- }
125311
- });
125312
- if (insertion || deletion) {
125313
- dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null);
125314
- }
125315
- return changes;
125316
- }
125317
- };
125318
- wordDiff = new WordDiff;
125319
- WordsWithSpaceDiff = class WordsWithSpaceDiff extends Diff {
125320
- tokenize(value) {
125321
- const regex2 = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, "ug");
125322
- return value.match(regex2) || [];
125323
- }
125324
- };
125325
- wordsWithSpaceDiff = new WordsWithSpaceDiff;
125326
- });
125327
124632
  // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/line.js
125328
124633
  function diffLines(oldStr, newStr, options) {
125329
124634
  return lineDiff.diff(oldStr, newStr, options);
@@ -125380,140 +124685,6 @@ var init_line2 = __esm(() => {
125380
124685
  lineDiff = new LineDiff;
125381
124686
  });
125382
124687
 
125383
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/sentence.js
125384
- function isSentenceEndPunct(char) {
125385
- return char == "." || char == "!" || char == "?";
125386
- }
125387
- var SentenceDiff, sentenceDiff;
125388
- var init_sentence = __esm(() => {
125389
- SentenceDiff = class SentenceDiff extends Diff {
125390
- tokenize(value) {
125391
- var _a3;
125392
- const result = [];
125393
- let tokenStartI = 0;
125394
- for (let i3 = 0;i3 < value.length; i3++) {
125395
- if (i3 == value.length - 1) {
125396
- result.push(value.slice(tokenStartI));
125397
- break;
125398
- }
125399
- if (isSentenceEndPunct(value[i3]) && value[i3 + 1].match(/\s/)) {
125400
- result.push(value.slice(tokenStartI, i3 + 1));
125401
- i3 = tokenStartI = i3 + 1;
125402
- while ((_a3 = value[i3 + 1]) === null || _a3 === undefined ? undefined : _a3.match(/\s/)) {
125403
- i3++;
125404
- }
125405
- result.push(value.slice(tokenStartI, i3 + 1));
125406
- tokenStartI = i3 + 1;
125407
- }
125408
- }
125409
- return result;
125410
- }
125411
- };
125412
- sentenceDiff = new SentenceDiff;
125413
- });
125414
-
125415
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/css.js
125416
- var CssDiff, cssDiff;
125417
- var init_css = __esm(() => {
125418
- CssDiff = class CssDiff extends Diff {
125419
- tokenize(value) {
125420
- return value.split(/([{}:;,]|\s+)/);
125421
- }
125422
- };
125423
- cssDiff = new CssDiff;
125424
- });
125425
-
125426
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/json.js
125427
- function canonicalize(obj, stack, replacementStack, replacer, key) {
125428
- stack = stack || [];
125429
- replacementStack = replacementStack || [];
125430
- if (replacer) {
125431
- obj = replacer(key === undefined ? "" : key, obj);
125432
- }
125433
- let i3;
125434
- for (i3 = 0;i3 < stack.length; i3 += 1) {
125435
- if (stack[i3] === obj) {
125436
- return replacementStack[i3];
125437
- }
125438
- }
125439
- let canonicalizedObj;
125440
- if (Object.prototype.toString.call(obj) === "[object Array]") {
125441
- stack.push(obj);
125442
- canonicalizedObj = new Array(obj.length);
125443
- replacementStack.push(canonicalizedObj);
125444
- for (i3 = 0;i3 < obj.length; i3 += 1) {
125445
- canonicalizedObj[i3] = canonicalize(obj[i3], stack, replacementStack, replacer, String(i3));
125446
- }
125447
- stack.pop();
125448
- replacementStack.pop();
125449
- return canonicalizedObj;
125450
- }
125451
- if (obj && obj.toJSON) {
125452
- obj = obj.toJSON();
125453
- }
125454
- if (typeof obj === "object" && obj !== null) {
125455
- stack.push(obj);
125456
- canonicalizedObj = {};
125457
- replacementStack.push(canonicalizedObj);
125458
- const sortedKeys = [];
125459
- let key2;
125460
- for (key2 in obj) {
125461
- if (Object.prototype.hasOwnProperty.call(obj, key2)) {
125462
- sortedKeys.push(key2);
125463
- }
125464
- }
125465
- sortedKeys.sort();
125466
- for (i3 = 0;i3 < sortedKeys.length; i3 += 1) {
125467
- key2 = sortedKeys[i3];
125468
- canonicalizedObj[key2] = canonicalize(obj[key2], stack, replacementStack, replacer, key2);
125469
- }
125470
- stack.pop();
125471
- replacementStack.pop();
125472
- } else {
125473
- canonicalizedObj = obj;
125474
- }
125475
- return canonicalizedObj;
125476
- }
125477
- var JsonDiff, jsonDiff;
125478
- var init_json2 = __esm(() => {
125479
- init_line2();
125480
- JsonDiff = class JsonDiff extends Diff {
125481
- constructor() {
125482
- super(...arguments);
125483
- this.tokenize = tokenize2;
125484
- }
125485
- get useLongestToken() {
125486
- return true;
125487
- }
125488
- castInput(value, options) {
125489
- const { undefinedReplacement, stringifyReplacer = (k, v) => typeof v === "undefined" ? undefinedReplacement : v } = options;
125490
- return typeof value === "string" ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), null, " ");
125491
- }
125492
- equals(left, right, options) {
125493
- return super.equals(left.replace(/,([\r\n])/g, "$1"), right.replace(/,([\r\n])/g, "$1"), options);
125494
- }
125495
- };
125496
- jsonDiff = new JsonDiff;
125497
- });
125498
-
125499
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/array.js
125500
- var ArrayDiff, arrayDiff;
125501
- var init_array3 = __esm(() => {
125502
- ArrayDiff = class ArrayDiff extends Diff {
125503
- tokenize(value) {
125504
- return value.slice();
125505
- }
125506
- join(value) {
125507
- return value;
125508
- }
125509
- removeEmpty(value) {
125510
- return value;
125511
- }
125512
- };
125513
- arrayDiff = new ArrayDiff;
125514
- });
125515
- // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/apply.js
125516
- var init_apply = () => {};
125517
124688
  // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/create.js
125518
124689
  function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
125519
124690
  let optionsObj;
@@ -125638,16 +124809,10 @@ function splitLines(text) {
125638
124809
  var init_create2 = __esm(() => {
125639
124810
  init_line2();
125640
124811
  });
124812
+
125641
124813
  // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/index.js
125642
124814
  var init_libesm = __esm(() => {
125643
- init_character();
125644
- init_word();
125645
124815
  init_line2();
125646
- init_sentence();
125647
- init_css();
125648
- init_json2();
125649
- init_array3();
125650
- init_apply();
125651
124816
  init_create2();
125652
124817
  });
125653
124818
 
@@ -127514,25 +126679,25 @@ ${text}</tr>
127514
126679
  this.use(...args);
127515
126680
  }
127516
126681
  walkTokens(tokens, callback) {
127517
- let values2 = [];
126682
+ let values = [];
127518
126683
  for (const token of tokens) {
127519
- values2 = values2.concat(callback.call(this, token));
126684
+ values = values.concat(callback.call(this, token));
127520
126685
  switch (token.type) {
127521
126686
  case "table": {
127522
126687
  const tableToken = token;
127523
126688
  for (const cell of tableToken.header) {
127524
- values2 = values2.concat(this.walkTokens(cell.tokens, callback));
126689
+ values = values.concat(this.walkTokens(cell.tokens, callback));
127525
126690
  }
127526
126691
  for (const row of tableToken.rows) {
127527
126692
  for (const cell of row) {
127528
- values2 = values2.concat(this.walkTokens(cell.tokens, callback));
126693
+ values = values.concat(this.walkTokens(cell.tokens, callback));
127529
126694
  }
127530
126695
  }
127531
126696
  break;
127532
126697
  }
127533
126698
  case "list": {
127534
126699
  const listToken = token;
127535
- values2 = values2.concat(this.walkTokens(listToken.items, callback));
126700
+ values = values.concat(this.walkTokens(listToken.items, callback));
127536
126701
  break;
127537
126702
  }
127538
126703
  default: {
@@ -127540,15 +126705,15 @@ ${text}</tr>
127540
126705
  if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
127541
126706
  this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
127542
126707
  const tokens2 = genericToken[childTokens].flat(Infinity);
127543
- values2 = values2.concat(this.walkTokens(tokens2, callback));
126708
+ values = values.concat(this.walkTokens(tokens2, callback));
127544
126709
  });
127545
126710
  } else if (genericToken.tokens) {
127546
- values2 = values2.concat(this.walkTokens(genericToken.tokens, callback));
126711
+ values = values.concat(this.walkTokens(genericToken.tokens, callback));
127547
126712
  }
127548
126713
  }
127549
126714
  }
127550
126715
  }
127551
- return values2;
126716
+ return values;
127552
126717
  }
127553
126718
  use(...args) {
127554
126719
  const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };
@@ -127688,12 +126853,12 @@ ${text}</tr>
127688
126853
  const walkTokens2 = this.defaults.walkTokens;
127689
126854
  const packWalktokens = pack.walkTokens;
127690
126855
  opts.walkTokens = function(token) {
127691
- let values2 = [];
127692
- values2.push(packWalktokens.call(this, token));
126856
+ let values = [];
126857
+ values.push(packWalktokens.call(this, token));
127693
126858
  if (walkTokens2) {
127694
- values2 = values2.concat(walkTokens2.call(this, token));
126859
+ values = values.concat(walkTokens2.call(this, token));
127695
126860
  }
127696
- return values2;
126861
+ return values;
127697
126862
  };
127698
126863
  }
127699
126864
  this.defaults = { ...this.defaults, ...opts };
@@ -128661,11 +127826,11 @@ var require_parse4 = __commonJS((exports, module) => {
128661
127826
  return value.replace(/\\(.)/g, "$1");
128662
127827
  };
128663
127828
  var hasRepeatedCharPrefixOverlap = (branches) => {
128664
- const values2 = branches.map(normalizeSimpleBranch).filter(Boolean);
128665
- for (let i3 = 0;i3 < values2.length; i3++) {
128666
- for (let j = i3 + 1;j < values2.length; j++) {
128667
- const a2 = values2[i3];
128668
- const b = values2[j];
127829
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
127830
+ for (let i3 = 0;i3 < values.length; i3++) {
127831
+ for (let j = i3 + 1;j < values.length; j++) {
127832
+ const a2 = values[i3];
127833
+ const b = values[j];
128669
127834
  const char = a2[0];
128670
127835
  if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
128671
127836
  continue;
@@ -128868,7 +128033,7 @@ var require_parse4 = __commonJS((exports, module) => {
128868
128033
  state2.output += token.output != null ? token.output : token.value;
128869
128034
  consume(token.value);
128870
128035
  };
128871
- const negate2 = () => {
128036
+ const negate = () => {
128872
128037
  let count3 = 1;
128873
128038
  while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
128874
128039
  advance();
@@ -129289,7 +128454,7 @@ var require_parse4 = __commonJS((exports, module) => {
129289
128454
  }
129290
128455
  }
129291
128456
  if (opts.nonegate !== true && state2.index === 0) {
129292
- negate2();
128457
+ negate();
129293
128458
  continue;
129294
128459
  }
129295
128460
  }
@@ -130747,6 +129912,166 @@ var init_sessionMemoryUtils = __esm(() => {
130747
129912
  init_state2();
130748
129913
  });
130749
129914
 
129915
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseFindIndex.js
129916
+ function baseFindIndex(array3, predicate, fromIndex, fromRight) {
129917
+ var length = array3.length, index = fromIndex + (fromRight ? 1 : -1);
129918
+ while (fromRight ? index-- : ++index < length) {
129919
+ if (predicate(array3[index], index, array3)) {
129920
+ return index;
129921
+ }
129922
+ }
129923
+ return -1;
129924
+ }
129925
+ var _baseFindIndex_default;
129926
+ var init__baseFindIndex = __esm(() => {
129927
+ _baseFindIndex_default = baseFindIndex;
129928
+ });
129929
+
129930
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseIsNaN.js
129931
+ function baseIsNaN(value) {
129932
+ return value !== value;
129933
+ }
129934
+ var _baseIsNaN_default;
129935
+ var init__baseIsNaN = __esm(() => {
129936
+ _baseIsNaN_default = baseIsNaN;
129937
+ });
129938
+
129939
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_strictIndexOf.js
129940
+ function strictIndexOf(array3, value, fromIndex) {
129941
+ var index = fromIndex - 1, length = array3.length;
129942
+ while (++index < length) {
129943
+ if (array3[index] === value) {
129944
+ return index;
129945
+ }
129946
+ }
129947
+ return -1;
129948
+ }
129949
+ var _strictIndexOf_default;
129950
+ var init__strictIndexOf = __esm(() => {
129951
+ _strictIndexOf_default = strictIndexOf;
129952
+ });
129953
+
129954
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseIndexOf.js
129955
+ function baseIndexOf(array3, value, fromIndex) {
129956
+ return value === value ? _strictIndexOf_default(array3, value, fromIndex) : _baseFindIndex_default(array3, _baseIsNaN_default, fromIndex);
129957
+ }
129958
+ var _baseIndexOf_default;
129959
+ var init__baseIndexOf = __esm(() => {
129960
+ init__baseFindIndex();
129961
+ init__baseIsNaN();
129962
+ init__strictIndexOf();
129963
+ _baseIndexOf_default = baseIndexOf;
129964
+ });
129965
+
129966
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayIncludes.js
129967
+ function arrayIncludes(array3, value) {
129968
+ var length = array3 == null ? 0 : array3.length;
129969
+ return !!length && _baseIndexOf_default(array3, value, 0) > -1;
129970
+ }
129971
+ var _arrayIncludes_default;
129972
+ var init__arrayIncludes = __esm(() => {
129973
+ init__baseIndexOf();
129974
+ _arrayIncludes_default = arrayIncludes;
129975
+ });
129976
+
129977
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayIncludesWith.js
129978
+ function arrayIncludesWith(array3, value, comparator) {
129979
+ var index = -1, length = array3 == null ? 0 : array3.length;
129980
+ while (++index < length) {
129981
+ if (comparator(value, array3[index])) {
129982
+ return true;
129983
+ }
129984
+ }
129985
+ return false;
129986
+ }
129987
+ var _arrayIncludesWith_default;
129988
+ var init__arrayIncludesWith = __esm(() => {
129989
+ _arrayIncludesWith_default = arrayIncludesWith;
129990
+ });
129991
+
129992
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/noop.js
129993
+ function noop8() {}
129994
+ var noop_default;
129995
+ var init_noop = __esm(() => {
129996
+ noop_default = noop8;
129997
+ });
129998
+
129999
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createSet.js
130000
+ var INFINITY3, createSet, _createSet_default;
130001
+ var init__createSet = __esm(() => {
130002
+ init__Set();
130003
+ init_noop();
130004
+ init__setToArray();
130005
+ INFINITY3 = 1 / 0;
130006
+ createSet = !(_Set_default && 1 / _setToArray_default(new _Set_default([, -0]))[1] == INFINITY3) ? noop_default : function(values) {
130007
+ return new _Set_default(values);
130008
+ };
130009
+ _createSet_default = createSet;
130010
+ });
130011
+
130012
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseUniq.js
130013
+ function baseUniq(array3, iteratee, comparator) {
130014
+ var index = -1, includes = _arrayIncludes_default, length = array3.length, isCommon = true, result = [], seen = result;
130015
+ if (comparator) {
130016
+ isCommon = false;
130017
+ includes = _arrayIncludesWith_default;
130018
+ } else if (length >= LARGE_ARRAY_SIZE2) {
130019
+ var set3 = iteratee ? null : _createSet_default(array3);
130020
+ if (set3) {
130021
+ return _setToArray_default(set3);
130022
+ }
130023
+ isCommon = false;
130024
+ includes = _cacheHas_default;
130025
+ seen = new _SetCache_default;
130026
+ } else {
130027
+ seen = iteratee ? [] : result;
130028
+ }
130029
+ outer:
130030
+ while (++index < length) {
130031
+ var value = array3[index], computed = iteratee ? iteratee(value) : value;
130032
+ value = comparator || value !== 0 ? value : 0;
130033
+ if (isCommon && computed === computed) {
130034
+ var seenIndex = seen.length;
130035
+ while (seenIndex--) {
130036
+ if (seen[seenIndex] === computed) {
130037
+ continue outer;
130038
+ }
130039
+ }
130040
+ if (iteratee) {
130041
+ seen.push(computed);
130042
+ }
130043
+ result.push(value);
130044
+ } else if (!includes(seen, computed, comparator)) {
130045
+ if (seen !== result) {
130046
+ seen.push(computed);
130047
+ }
130048
+ result.push(value);
130049
+ }
130050
+ }
130051
+ return result;
130052
+ }
130053
+ var LARGE_ARRAY_SIZE2 = 200, _baseUniq_default;
130054
+ var init__baseUniq = __esm(() => {
130055
+ init__SetCache();
130056
+ init__arrayIncludes();
130057
+ init__arrayIncludesWith();
130058
+ init__cacheHas();
130059
+ init__createSet();
130060
+ init__setToArray();
130061
+ _baseUniq_default = baseUniq;
130062
+ });
130063
+
130064
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/uniqBy.js
130065
+ function uniqBy(array3, iteratee) {
130066
+ return array3 && array3.length ? _baseUniq_default(array3, _baseIteratee_default(iteratee, 2)) : [];
130067
+ }
130068
+ var uniqBy_default;
130069
+ var init_uniqBy = __esm(() => {
130070
+ init__baseIteratee();
130071
+ init__baseUniq();
130072
+ uniqBy_default = uniqBy;
130073
+ });
130074
+
130750
130075
  // src/capabilities/tools/ToolSearchTool/ToolSearchTool.ts
130751
130076
  function getDeferredToolsCacheKey(deferredTools) {
130752
130077
  return deferredTools.map((t) => t.name).sort().join(",");
@@ -131862,6 +131187,16 @@ var init_imageValidation = __esm(() => {
131862
131187
  };
131863
131188
  });
131864
131189
 
131190
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/isEqual.js
131191
+ function isEqual(value, other2) {
131192
+ return _baseIsEqual_default(value, other2);
131193
+ }
131194
+ var isEqual_default;
131195
+ var init_isEqual = __esm(() => {
131196
+ init__baseIsEqual();
131197
+ isEqual_default = isEqual;
131198
+ });
131199
+
131865
131200
  // src/lib/thinking.ts
131866
131201
  function isUltrathinkEnabled() {
131867
131202
  if (true) {
@@ -224507,9 +223842,9 @@ var init_stream2 = __esm(() => {
224507
223842
  if (this.hasError) {
224508
223843
  return Promise.reject(this.hasError);
224509
223844
  }
224510
- return new Promise((resolve15, reject2) => {
223845
+ return new Promise((resolve15, reject) => {
224511
223846
  this.readResolve = resolve15;
224512
- this.readReject = reject2;
223847
+ this.readReject = reject;
224513
223848
  });
224514
223849
  }
224515
223850
  enqueue(value) {
@@ -224534,10 +223869,10 @@ var init_stream2 = __esm(() => {
224534
223869
  error(error41) {
224535
223870
  this.hasError = error41;
224536
223871
  if (this.readReject) {
224537
- const reject2 = this.readReject;
223872
+ const reject = this.readReject;
224538
223873
  this.readResolve = undefined;
224539
223874
  this.readReject = undefined;
224540
- reject2(error41);
223875
+ reject(error41);
224541
223876
  }
224542
223877
  }
224543
223878
  return() {
@@ -225862,7 +225197,7 @@ class SSEClientTransport {
225862
225197
  }
225863
225198
  _startOrAuth() {
225864
225199
  const fetchImpl = this?._eventSourceInit?.fetch ?? this._fetch ?? fetch;
225865
- return new Promise((resolve15, reject2) => {
225200
+ return new Promise((resolve15, reject) => {
225866
225201
  this._eventSource = new EventSource(this._url.href, {
225867
225202
  ...this._eventSourceInit,
225868
225203
  fetch: async (url3, init) => {
@@ -225883,11 +225218,11 @@ class SSEClientTransport {
225883
225218
  this._abortController = new AbortController;
225884
225219
  this._eventSource.onerror = (event) => {
225885
225220
  if (event.code === 401 && this._authProvider) {
225886
- this._authThenStart().then(resolve15, reject2);
225221
+ this._authThenStart().then(resolve15, reject);
225887
225222
  return;
225888
225223
  }
225889
225224
  const error41 = new SseError(event.code, event.message, event);
225890
- reject2(error41);
225225
+ reject(error41);
225891
225226
  this.onerror?.(error41);
225892
225227
  };
225893
225228
  this._eventSource.onopen = () => {};
@@ -225899,7 +225234,7 @@ class SSEClientTransport {
225899
225234
  throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`);
225900
225235
  }
225901
225236
  } catch (error41) {
225902
- reject2(error41);
225237
+ reject(error41);
225903
225238
  this.onerror?.(error41);
225904
225239
  this.close();
225905
225240
  return;
@@ -226067,7 +225402,7 @@ class StdioClientTransport {
226067
225402
  if (this._process) {
226068
225403
  throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
226069
225404
  }
226070
- return new Promise((resolve15, reject2) => {
225405
+ return new Promise((resolve15, reject) => {
226071
225406
  this._process = import_cross_spawn3.default(this._serverParams.command, this._serverParams.args ?? [], {
226072
225407
  env: {
226073
225408
  ...getDefaultEnvironment(),
@@ -226079,7 +225414,7 @@ class StdioClientTransport {
226079
225414
  cwd: this._serverParams.cwd
226080
225415
  });
226081
225416
  this._process.on("error", (error41) => {
226082
- reject2(error41);
225417
+ reject(error41);
226083
225418
  this.onerror?.(error41);
226084
225419
  });
226085
225420
  this._process.on("spawn", () => {
@@ -226584,6 +225919,31 @@ var init_streamableHttp = __esm(() => {
226584
225919
  };
226585
225920
  });
226586
225921
 
225922
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseZipObject.js
225923
+ function baseZipObject(props, values, assignFunc) {
225924
+ var index = -1, length = props.length, valsLength = values.length, result = {};
225925
+ while (++index < length) {
225926
+ var value = index < valsLength ? values[index] : undefined;
225927
+ assignFunc(result, props[index], value);
225928
+ }
225929
+ return result;
225930
+ }
225931
+ var _baseZipObject_default;
225932
+ var init__baseZipObject = __esm(() => {
225933
+ _baseZipObject_default = baseZipObject;
225934
+ });
225935
+
225936
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/zipObject.js
225937
+ function zipObject(props, values) {
225938
+ return _baseZipObject_default(props || [], values || [], _assignValue_default);
225939
+ }
225940
+ var zipObject_default;
225941
+ var init_zipObject = __esm(() => {
225942
+ init__assignValue();
225943
+ init__baseZipObject();
225944
+ zipObject_default = zipObject;
225945
+ });
225946
+
226587
225947
  // node_modules/.bun/p-map@7.0.4/node_modules/p-map/index.js
226588
225948
  async function pMap(iterable, mapper, {
226589
225949
  concurrency = Number.POSITIVE_INFINITY,
@@ -226610,7 +225970,7 @@ async function pMap(iterable, mapper, {
226610
225970
  let currentIndex = 0;
226611
225971
  const iterator2 = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
226612
225972
  const signalListener = () => {
226613
- reject2(signal.reason);
225973
+ reject(signal.reason);
226614
225974
  };
226615
225975
  const cleanup = () => {
226616
225976
  signal?.removeEventListener("abort", signalListener);
@@ -226619,7 +225979,7 @@ async function pMap(iterable, mapper, {
226619
225979
  resolve_(value);
226620
225980
  cleanup();
226621
225981
  };
226622
- const reject2 = (reason) => {
225982
+ const reject = (reason) => {
226623
225983
  isRejected = true;
226624
225984
  isResolved = true;
226625
225985
  reject_(reason);
@@ -226627,7 +225987,7 @@ async function pMap(iterable, mapper, {
226627
225987
  };
226628
225988
  if (signal) {
226629
225989
  if (signal.aborted) {
226630
- reject2(signal.reason);
225990
+ reject(signal.reason);
226631
225991
  }
226632
225992
  signal.addEventListener("abort", signalListener, { once: true });
226633
225993
  }
@@ -226642,7 +226002,7 @@ async function pMap(iterable, mapper, {
226642
226002
  isIterableDone = true;
226643
226003
  if (resolvingCount === 0 && !isResolved) {
226644
226004
  if (!stopOnError && errors4.length > 0) {
226645
- reject2(new AggregateError(errors4));
226005
+ reject(new AggregateError(errors4));
226646
226006
  return;
226647
226007
  }
226648
226008
  isResolved = true;
@@ -226677,14 +226037,14 @@ async function pMap(iterable, mapper, {
226677
226037
  await next();
226678
226038
  } catch (error41) {
226679
226039
  if (stopOnError) {
226680
- reject2(error41);
226040
+ reject(error41);
226681
226041
  } else {
226682
226042
  errors4.push(error41);
226683
226043
  resolvingCount--;
226684
226044
  try {
226685
226045
  await next();
226686
226046
  } catch (error42) {
226687
- reject2(error42);
226047
+ reject(error42);
226688
226048
  }
226689
226049
  }
226690
226050
  }
@@ -226695,7 +226055,7 @@ async function pMap(iterable, mapper, {
226695
226055
  try {
226696
226056
  await next();
226697
226057
  } catch (error41) {
226698
- reject2(error41);
226058
+ reject(error41);
226699
226059
  break;
226700
226060
  }
226701
226061
  if (isIterableDone || isRejected) {
@@ -229904,6 +229264,95 @@ var init_MCPTool = __esm(() => {
229904
229264
  });
229905
229265
  });
229906
229266
 
229267
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createBaseEach.js
229268
+ function createBaseEach(eachFunc, fromRight) {
229269
+ return function(collection, iteratee) {
229270
+ if (collection == null) {
229271
+ return collection;
229272
+ }
229273
+ if (!isArrayLike_default(collection)) {
229274
+ return eachFunc(collection, iteratee);
229275
+ }
229276
+ var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
229277
+ while (fromRight ? index-- : ++index < length) {
229278
+ if (iteratee(iterable[index], index, iterable) === false) {
229279
+ break;
229280
+ }
229281
+ }
229282
+ return collection;
229283
+ };
229284
+ }
229285
+ var _createBaseEach_default;
229286
+ var init__createBaseEach = __esm(() => {
229287
+ init_isArrayLike();
229288
+ _createBaseEach_default = createBaseEach;
229289
+ });
229290
+
229291
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseEach.js
229292
+ var baseEach, _baseEach_default;
229293
+ var init__baseEach = __esm(() => {
229294
+ init__baseForOwn();
229295
+ init__createBaseEach();
229296
+ baseEach = _createBaseEach_default(_baseForOwn_default);
229297
+ _baseEach_default = baseEach;
229298
+ });
229299
+
229300
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseFilter.js
229301
+ function baseFilter(collection, predicate) {
229302
+ var result = [];
229303
+ _baseEach_default(collection, function(value, index, collection2) {
229304
+ if (predicate(value, index, collection2)) {
229305
+ result.push(value);
229306
+ }
229307
+ });
229308
+ return result;
229309
+ }
229310
+ var _baseFilter_default;
229311
+ var init__baseFilter = __esm(() => {
229312
+ init__baseEach();
229313
+ _baseFilter_default = baseFilter;
229314
+ });
229315
+
229316
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/negate.js
229317
+ function negate(predicate) {
229318
+ if (typeof predicate != "function") {
229319
+ throw new TypeError(FUNC_ERROR_TEXT2);
229320
+ }
229321
+ return function() {
229322
+ var args = arguments;
229323
+ switch (args.length) {
229324
+ case 0:
229325
+ return !predicate.call(this);
229326
+ case 1:
229327
+ return !predicate.call(this, args[0]);
229328
+ case 2:
229329
+ return !predicate.call(this, args[0], args[1]);
229330
+ case 3:
229331
+ return !predicate.call(this, args[0], args[1], args[2]);
229332
+ }
229333
+ return !predicate.apply(this, args);
229334
+ };
229335
+ }
229336
+ var FUNC_ERROR_TEXT2 = "Expected a function", negate_default;
229337
+ var init_negate = __esm(() => {
229338
+ negate_default = negate;
229339
+ });
229340
+
229341
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/reject.js
229342
+ function reject(collection, predicate) {
229343
+ var func = isArray_default(collection) ? _arrayFilter_default : _baseFilter_default;
229344
+ return func(collection, negate_default(_baseIteratee_default(predicate, 3)));
229345
+ }
229346
+ var reject_default;
229347
+ var init_reject2 = __esm(() => {
229348
+ init__arrayFilter();
229349
+ init__baseFilter();
229350
+ init__baseIteratee();
229351
+ init_isArray();
229352
+ init_negate();
229353
+ reject_default = reject;
229354
+ });
229355
+
229907
229356
  // node_modules/.bun/cssfilter@0.0.10/node_modules/cssfilter/lib/default.js
229908
229357
  var require_default2 = __commonJS((exports) => {
229909
229358
  function getDefaultWhiteList() {
@@ -238034,6 +237483,75 @@ var init_detection = __esm(() => {
238034
237483
  ORIGINAL_TMUX_PANE = process.env.TMUX_PANE;
238035
237484
  });
238036
237485
 
237486
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseRandom.js
237487
+ function baseRandom(lower, upper) {
237488
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
237489
+ }
237490
+ var nativeFloor, nativeRandom, _baseRandom_default;
237491
+ var init__baseRandom = __esm(() => {
237492
+ nativeFloor = Math.floor;
237493
+ nativeRandom = Math.random;
237494
+ _baseRandom_default = baseRandom;
237495
+ });
237496
+
237497
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arraySample.js
237498
+ function arraySample(array3) {
237499
+ var length = array3.length;
237500
+ return length ? array3[_baseRandom_default(0, length - 1)] : undefined;
237501
+ }
237502
+ var _arraySample_default;
237503
+ var init__arraySample = __esm(() => {
237504
+ init__baseRandom();
237505
+ _arraySample_default = arraySample;
237506
+ });
237507
+
237508
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseValues.js
237509
+ function baseValues(object4, props) {
237510
+ return _arrayMap_default(props, function(key) {
237511
+ return object4[key];
237512
+ });
237513
+ }
237514
+ var _baseValues_default;
237515
+ var init__baseValues = __esm(() => {
237516
+ init__arrayMap();
237517
+ _baseValues_default = baseValues;
237518
+ });
237519
+
237520
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/values.js
237521
+ function values(object4) {
237522
+ return object4 == null ? [] : _baseValues_default(object4, keys_default(object4));
237523
+ }
237524
+ var values_default;
237525
+ var init_values3 = __esm(() => {
237526
+ init__baseValues();
237527
+ init_keys();
237528
+ values_default = values;
237529
+ });
237530
+
237531
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseSample.js
237532
+ function baseSample(collection) {
237533
+ return _arraySample_default(values_default(collection));
237534
+ }
237535
+ var _baseSample_default;
237536
+ var init__baseSample = __esm(() => {
237537
+ init__arraySample();
237538
+ init_values3();
237539
+ _baseSample_default = baseSample;
237540
+ });
237541
+
237542
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/sample.js
237543
+ function sample(collection) {
237544
+ var func = isArray_default(collection) ? _arraySample_default : _baseSample_default;
237545
+ return func(collection);
237546
+ }
237547
+ var sample_default;
237548
+ var init_sample = __esm(() => {
237549
+ init__arraySample();
237550
+ init__baseSample();
237551
+ init_isArray();
237552
+ sample_default = sample;
237553
+ });
237554
+
238037
237555
  // src/constants/spinnerVerbs.ts
238038
237556
  function getSpinnerVerbs() {
238039
237557
  const settings = getInitialSettings();
@@ -238887,8 +238405,11 @@ var init_coreSchemas = __esm(() => {
238887
238405
  "resume",
238888
238406
  "logout",
238889
238407
  "prompt_input_exit",
238890
- "other",
238891
- "bypass_permissions_disabled"
238408
+ "bypass_permissions_disabled",
238409
+ "normal",
238410
+ "aborted",
238411
+ "error",
238412
+ "other"
238892
238413
  ];
238893
238414
  ExitReasonSchema = lazySchema(() => exports_external2.enum(EXIT_REASONS2));
238894
238415
  SessionEndHookInputSchema = lazySchema(() => BaseHookInputSchema().and(exports_external2.object({
@@ -251607,6 +251128,131 @@ duration_ms: ${data.totalDurationMs}</usage>`
251607
251128
  });
251608
251129
  });
251609
251130
 
251131
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseSlice.js
251132
+ function baseSlice(array3, start, end) {
251133
+ var index = -1, length = array3.length;
251134
+ if (start < 0) {
251135
+ start = -start > length ? 0 : length + start;
251136
+ }
251137
+ end = end > length ? length : end;
251138
+ if (end < 0) {
251139
+ end += length;
251140
+ }
251141
+ length = start > end ? 0 : end - start >>> 0;
251142
+ start >>>= 0;
251143
+ var result = Array(length);
251144
+ while (++index < length) {
251145
+ result[index] = array3[index + start];
251146
+ }
251147
+ return result;
251148
+ }
251149
+ var _baseSlice_default;
251150
+ var init__baseSlice = __esm(() => {
251151
+ _baseSlice_default = baseSlice;
251152
+ });
251153
+
251154
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_castSlice.js
251155
+ function castSlice(array3, start, end) {
251156
+ var length = array3.length;
251157
+ end = end === undefined ? length : end;
251158
+ return !start && end >= length ? array3 : _baseSlice_default(array3, start, end);
251159
+ }
251160
+ var _castSlice_default;
251161
+ var init__castSlice = __esm(() => {
251162
+ init__baseSlice();
251163
+ _castSlice_default = castSlice;
251164
+ });
251165
+
251166
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_hasUnicode.js
251167
+ function hasUnicode(string5) {
251168
+ return reHasUnicode.test(string5);
251169
+ }
251170
+ var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange, rsVarRange = "\\ufe0e\\ufe0f", rsZWJ = "\\u200d", reHasUnicode, _hasUnicode_default;
251171
+ var init__hasUnicode = __esm(() => {
251172
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
251173
+ reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
251174
+ _hasUnicode_default = hasUnicode;
251175
+ });
251176
+
251177
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_asciiToArray.js
251178
+ function asciiToArray(string5) {
251179
+ return string5.split("");
251180
+ }
251181
+ var _asciiToArray_default;
251182
+ var init__asciiToArray = __esm(() => {
251183
+ _asciiToArray_default = asciiToArray;
251184
+ });
251185
+
251186
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_unicodeToArray.js
251187
+ function unicodeToArray(string5) {
251188
+ return string5.match(reUnicode) || [];
251189
+ }
251190
+ var rsAstralRange2 = "\\ud800-\\udfff", rsComboMarksRange2 = "\\u0300-\\u036f", reComboHalfMarksRange2 = "\\ufe20-\\ufe2f", rsComboSymbolsRange2 = "\\u20d0-\\u20ff", rsComboRange2, rsVarRange2 = "\\ufe0e\\ufe0f", rsAstral, rsCombo, rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier, rsNonAstral, rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ2 = "\\u200d", reOptMod, rsOptVar, rsOptJoin, rsSeq, rsSymbol, reUnicode, _unicodeToArray_default;
251191
+ var init__unicodeToArray = __esm(() => {
251192
+ rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
251193
+ rsAstral = "[" + rsAstralRange2 + "]";
251194
+ rsCombo = "[" + rsComboRange2 + "]";
251195
+ rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
251196
+ rsNonAstral = "[^" + rsAstralRange2 + "]";
251197
+ reOptMod = rsModifier + "?";
251198
+ rsOptVar = "[" + rsVarRange2 + "]?";
251199
+ rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
251200
+ rsSeq = rsOptVar + reOptMod + rsOptJoin;
251201
+ rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
251202
+ reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
251203
+ _unicodeToArray_default = unicodeToArray;
251204
+ });
251205
+
251206
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_stringToArray.js
251207
+ function stringToArray(string5) {
251208
+ return _hasUnicode_default(string5) ? _unicodeToArray_default(string5) : _asciiToArray_default(string5);
251209
+ }
251210
+ var _stringToArray_default;
251211
+ var init__stringToArray = __esm(() => {
251212
+ init__asciiToArray();
251213
+ init__hasUnicode();
251214
+ init__unicodeToArray();
251215
+ _stringToArray_default = stringToArray;
251216
+ });
251217
+
251218
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createCaseFirst.js
251219
+ function createCaseFirst(methodName) {
251220
+ return function(string5) {
251221
+ string5 = toString_default(string5);
251222
+ var strSymbols = _hasUnicode_default(string5) ? _stringToArray_default(string5) : undefined;
251223
+ var chr = strSymbols ? strSymbols[0] : string5.charAt(0);
251224
+ var trailing = strSymbols ? _castSlice_default(strSymbols, 1).join("") : string5.slice(1);
251225
+ return chr[methodName]() + trailing;
251226
+ };
251227
+ }
251228
+ var _createCaseFirst_default;
251229
+ var init__createCaseFirst = __esm(() => {
251230
+ init__castSlice();
251231
+ init__hasUnicode();
251232
+ init__stringToArray();
251233
+ init_toString();
251234
+ _createCaseFirst_default = createCaseFirst;
251235
+ });
251236
+
251237
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/upperFirst.js
251238
+ var upperFirst, upperFirst_default;
251239
+ var init_upperFirst = __esm(() => {
251240
+ init__createCaseFirst();
251241
+ upperFirst = _createCaseFirst_default("toUpperCase");
251242
+ upperFirst_default = upperFirst;
251243
+ });
251244
+
251245
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/capitalize.js
251246
+ function capitalize2(string5) {
251247
+ return upperFirst_default(toString_default(string5).toLowerCase());
251248
+ }
251249
+ var capitalize_default;
251250
+ var init_capitalize = __esm(() => {
251251
+ init_toString();
251252
+ init_upperFirst();
251253
+ capitalize_default = capitalize2;
251254
+ });
251255
+
251610
251256
  // src/lib/jetbrains.ts
251611
251257
  var pluginInstalledCache, pluginInstalledPromiseCache;
251612
251258
  var init_jetbrains = __esm(() => {
@@ -282388,7 +282034,7 @@ function getAnthropicEnvMetadata() {
282388
282034
  function getBuildAgeMinutes() {
282389
282035
  if (false)
282390
282036
  ;
282391
- const buildTime = new Date("2026-05-15T07:36:09.106Z").getTime();
282037
+ const buildTime = new Date("2026-05-19T09:07:47.609Z").getTime();
282392
282038
  if (isNaN(buildTime))
282393
282039
  return;
282394
282040
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -323430,7 +323076,7 @@ var require_dbcs_codec = __commonJS((exports) => {
323430
323076
  if (resCode !== undefined) {
323431
323077
  dbcsCode = resCode;
323432
323078
  nextChar = uCode;
323433
- } else {}
323079
+ }
323434
323080
  }
323435
323081
  seqObj = undefined;
323436
323082
  } else if (uCode >= 0) {
@@ -323491,7 +323137,7 @@ var require_dbcs_codec = __commonJS((exports) => {
323491
323137
  newBuf[j++] = dbcsCode >> 8;
323492
323138
  newBuf[j++] = dbcsCode & 255;
323493
323139
  }
323494
- } else {}
323140
+ }
323495
323141
  this.seqObj = undefined;
323496
323142
  }
323497
323143
  if (this.leadSurrogate !== -1) {
@@ -329094,8 +328740,47 @@ init_log2();
329094
328740
  init_permissions2();
329095
328741
  init_permissionSetup();
329096
328742
 
328743
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayAggregator.js
328744
+ function arrayAggregator(array3, setter, iteratee, accumulator) {
328745
+ var index = -1, length = array3 == null ? 0 : array3.length;
328746
+ while (++index < length) {
328747
+ var value = array3[index];
328748
+ setter(accumulator, value, iteratee(value), array3);
328749
+ }
328750
+ return accumulator;
328751
+ }
328752
+ var _arrayAggregator_default = arrayAggregator;
328753
+
328754
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseAggregator.js
328755
+ init__baseEach();
328756
+ function baseAggregator(collection, setter, iteratee, accumulator) {
328757
+ _baseEach_default(collection, function(value, key, collection2) {
328758
+ setter(accumulator, value, iteratee(value), collection2);
328759
+ });
328760
+ return accumulator;
328761
+ }
328762
+ var _baseAggregator_default = baseAggregator;
328763
+
328764
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createAggregator.js
328765
+ init__baseIteratee();
328766
+ init_isArray();
328767
+ function createAggregator(setter, initializer3) {
328768
+ return function(collection, iteratee) {
328769
+ var func = isArray_default(collection) ? _arrayAggregator_default : _baseAggregator_default, accumulator = initializer3 ? initializer3() : {};
328770
+ return func(collection, setter, _baseIteratee_default(iteratee, 2), accumulator);
328771
+ };
328772
+ }
328773
+ var _createAggregator_default = createAggregator;
328774
+
328775
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/partition.js
328776
+ var partition2 = _createAggregator_default(function(result, value, key) {
328777
+ result[key ? 0 : 1].push(value);
328778
+ }, function() {
328779
+ return [[], []];
328780
+ });
328781
+ var partition_default = partition2;
328782
+
329097
328783
  // src/controller/toolPool.ts
329098
- init_partition();
329099
328784
  init_uniqBy();
329100
328785
  init_tools();
329101
328786
  init_utils5();
@@ -329534,16 +329219,6 @@ function runSdkQueryRuntime(params) {
329534
329219
  };
329535
329220
  }
329536
329221
  } finally {
329537
- const sessionEndTimeoutMs = getSessionEndHookTimeoutMs();
329538
- try {
329539
- await executeSessionEndHooks("other", {
329540
- getAppState: appStateStore.getAppState,
329541
- setAppState: appStateStore.setAppState,
329542
- timeoutMs: sessionEndTimeoutMs
329543
- });
329544
- } catch (err2) {
329545
- logForDebugging(`SessionEnd hooks errored on SDK programmatic path: ${errorMessage(err2)}`, { level: "warn" });
329546
- }
329547
329222
  runtimeState.runningTurn = false;
329548
329223
  for (const client of [...dynamicClients, ...sdkClients]) {
329549
329224
  if (client.type === "connected") {
@@ -329562,6 +329237,11 @@ function runSdkQueryRuntime(params) {
329562
329237
  init_fileHistory();
329563
329238
  init_buildFromSdk();
329564
329239
  init_als();
329240
+ init_registries2();
329241
+ init_hooks2();
329242
+ init_AppStateStore();
329243
+ init_debug();
329244
+ init_errors5();
329565
329245
  function mergeTurnOptions(sessionOptions, turnOptions) {
329566
329246
  if (!turnOptions)
329567
329247
  return sessionOptions;
@@ -329622,8 +329302,32 @@ class SessionRuntime {
329622
329302
  async getInfo() {
329623
329303
  return;
329624
329304
  }
329625
- async close() {
329305
+ async close(reason = "normal") {
329306
+ if (this.closed)
329307
+ return;
329626
329308
  this.closed = true;
329309
+ const ctx = buildRewindQueryContext(this.baseOptions);
329310
+ await runWithQueryContext(ctx, async () => {
329311
+ if (this.baseOptions.hooks) {
329312
+ try {
329313
+ registerHookCallbacks2(this.baseOptions.hooks);
329314
+ } catch (err2) {
329315
+ logForDebugging(`SessionRuntime.close: registerHookCallbacks threw: ${errorMessage(err2)}`, { level: "warn" });
329316
+ }
329317
+ }
329318
+ let state3 = getDefaultAppState();
329319
+ try {
329320
+ await executeSessionEndHooks(reason, {
329321
+ getAppState: () => state3,
329322
+ setAppState: (updater) => {
329323
+ state3 = updater(state3);
329324
+ },
329325
+ timeoutMs: getSessionEndHookTimeoutMs()
329326
+ });
329327
+ } catch (err2) {
329328
+ logForDebugging(`SessionRuntime.close: SessionEnd hooks errored: ${errorMessage(err2)}`, { level: "warn" });
329329
+ }
329330
+ });
329627
329331
  }
329628
329332
  canRewindFiles(state3, messageUuid) {
329629
329333
  const effective = this.accumulatedFileHistory ?? state3;
@@ -331284,7 +330988,7 @@ init_frontmatterParser();
331284
330988
  init_messages4();
331285
330989
  init_model();
331286
330990
 
331287
- // missing-module-stub:/Users/yunge/Projects/evose-react/opencow-agent-sdk/src/capabilities/config.js
330991
+ // missing-module-stub:/home/runner/work/opencow-agent-sdk/opencow-agent-sdk/src/capabilities/config.js
331288
330992
  var noop12 = () => null;
331289
330993
  var saveGlobalConfig2 = noop12;
331290
330994
 
@@ -334828,6 +334532,10 @@ function getSDKBuiltInTools() {
334828
334532
  function getBuiltInTools() {
334829
334533
  return getSDKBuiltInTools();
334830
334534
  }
334535
+
334536
+ // src/client.ts
334537
+ init_sessionStorage();
334538
+
334831
334539
  // src/providers/anthropic/oauth/index.ts
334832
334540
  init_browser();
334833
334541
 
@@ -335478,6 +335186,7 @@ export {
335478
335186
  createSession2 as createSession,
335479
335187
  createSdkMcpServer,
335480
335188
  connectRemoteControl,
335189
+ clearProjectForSession,
335481
335190
  buildMissedTaskNotification,
335482
335191
  buildAuthUrl,
335483
335192
  attachSdkLogObserver,
@@ -335504,4 +335213,4 @@ export {
335504
335213
  AbortError2 as AbortError
335505
335214
  };
335506
335215
 
335507
- //# debugId=B384E53B9F354B8D64756E2164756E21
335216
+ //# debugId=E32B2704E5125D2B64756E2164756E21