@opencow-ai/opencow-agent-sdk 0.4.0 → 0.4.1

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/sdk.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();
@@ -108307,6 +108330,7 @@ __export(exports_sessionStorage, {
108307
108330
  getSessionFilesWithMtime: () => getSessionFilesWithMtime,
108308
108331
  getSessionFilesLite: () => getSessionFilesLite,
108309
108332
  getProjectsDir: () => getProjectsDir,
108333
+ getProjectSessionFileForTesting: () => getProjectSessionFileForTesting,
108310
108334
  getProjectDir: () => getProjectDir,
108311
108335
  getNodeEnv: () => getNodeEnv,
108312
108336
  getLogByIndex: () => getLogByIndex,
@@ -108327,6 +108351,7 @@ __export(exports_sessionStorage, {
108327
108351
  deleteRemoteAgentMetadata: () => deleteRemoteAgentMetadata,
108328
108352
  clearSessionMetadata: () => clearSessionMetadata,
108329
108353
  clearSessionMessagesCache: () => clearSessionMessagesCache,
108354
+ clearProjectForSession: () => clearProjectForSession,
108330
108355
  clearAgentTranscriptSubdir: () => clearAgentTranscriptSubdir,
108331
108356
  cleanMessagesForLogging: () => cleanMessagesForLogging,
108332
108357
  checkResumeConsistency: () => checkResumeConsistency,
@@ -108484,36 +108509,73 @@ function getEntrypoint() {
108484
108509
  function isCustomTitleEnabled() {
108485
108510
  return true;
108486
108511
  }
108512
+ function resolveProjectKey() {
108513
+ try {
108514
+ return getQueryContext().identity.sessionId;
108515
+ } catch {
108516
+ return NO_SESSION_PROJECT_KEY;
108517
+ }
108518
+ }
108487
108519
  function getProject() {
108488
- if (!project) {
108489
- project = new Project;
108520
+ const key = resolveProjectKey();
108521
+ let p = projects.get(key);
108522
+ if (!p) {
108523
+ p = new Project;
108524
+ if (processInternalEventWriter)
108525
+ p.setInternalEventWriter(processInternalEventWriter);
108526
+ if (processInternalEventReader)
108527
+ p.setInternalEventReader(processInternalEventReader);
108528
+ if (processInternalSubagentEventReader) {
108529
+ p.setInternalSubagentEventReader(processInternalSubagentEventReader);
108530
+ }
108531
+ projects.set(key, p);
108490
108532
  if (!cleanupRegistered) {
108491
108533
  registerCleanup(async () => {
108492
- await project?.flush();
108493
- try {
108494
- project?.reAppendSessionMetadata();
108495
- } catch {}
108534
+ for (const proj of projects.values()) {
108535
+ try {
108536
+ await proj.flush();
108537
+ } catch {}
108538
+ try {
108539
+ proj.reAppendSessionMetadata();
108540
+ } catch {}
108541
+ }
108496
108542
  });
108497
108543
  cleanupRegistered = true;
108498
108544
  }
108499
108545
  }
108500
- return project;
108546
+ return p;
108547
+ }
108548
+ function clearProjectForSession(sessionId) {
108549
+ projects.delete(sessionId);
108501
108550
  }
108502
108551
  function resetProjectFlushStateForTesting() {
108503
- project?._resetFlushState();
108552
+ for (const p of projects.values())
108553
+ p._resetFlushState();
108504
108554
  }
108505
108555
  function resetProjectForTesting() {
108506
- project = null;
108556
+ projects.clear();
108557
+ processInternalEventWriter = null;
108558
+ processInternalEventReader = null;
108559
+ processInternalSubagentEventReader = null;
108507
108560
  }
108508
108561
  function setSessionFileForTesting(path10) {
108509
108562
  getProject().sessionFile = path10;
108510
108563
  }
108564
+ function getProjectSessionFileForTesting() {
108565
+ return getProject().sessionFile;
108566
+ }
108511
108567
  function setInternalEventWriter(writer) {
108512
- getProject().setInternalEventWriter(writer);
108568
+ processInternalEventWriter = writer;
108569
+ for (const p of projects.values())
108570
+ p.setInternalEventWriter(writer);
108513
108571
  }
108514
108572
  function setInternalEventReader(reader, subagentReader) {
108515
- getProject().setInternalEventReader(reader);
108516
- getProject().setInternalSubagentEventReader(subagentReader);
108573
+ processInternalEventReader = reader;
108574
+ processInternalSubagentEventReader = subagentReader;
108575
+ for (const p of projects.values()) {
108576
+ p.setInternalEventReader(reader);
108577
+ p.setInternalSubagentEventReader(subagentReader);
108578
+ }
108517
108579
  }
108518
108580
  function setRemoteIngressUrlForTesting(url3) {
108519
108581
  getProject().setRemoteIngressUrl(url3);
@@ -109112,9 +109174,9 @@ async function resetSessionFilePointer() {
109112
109174
  getProject().resetSessionFile();
109113
109175
  }
109114
109176
  function adoptResumedSessionFile() {
109115
- const project2 = getProject();
109116
- project2.sessionFile = getTranscriptPath();
109117
- project2.reAppendSessionMetadata(true);
109177
+ const project = getProject();
109178
+ project.sessionFile = getTranscriptPath();
109179
+ project.reAppendSessionMetadata(true);
109118
109180
  }
109119
109181
  async function recordContextCollapseCommit(commit) {
109120
109182
  const sessionId = getSessionId();
@@ -109141,7 +109203,7 @@ async function flushSessionStorage() {
109141
109203
  }
109142
109204
  async function hydrateRemoteSession(sessionId, ingressUrl) {
109143
109205
  switchSession(asSessionId(sessionId));
109144
- const project2 = getProject();
109206
+ const project = getProject();
109145
109207
  try {
109146
109208
  const remoteLogs = await getSessionLogs(sessionId, ingressUrl) || [];
109147
109209
  const projectDir = getProjectDir(getOriginalCwd());
@@ -109157,14 +109219,14 @@ async function hydrateRemoteSession(sessionId, ingressUrl) {
109157
109219
  logForDiagnosticsNoPII("error", "hydrate_remote_session_fail");
109158
109220
  return false;
109159
109221
  } finally {
109160
- project2.setRemoteIngressUrl(ingressUrl);
109222
+ project.setRemoteIngressUrl(ingressUrl);
109161
109223
  }
109162
109224
  }
109163
109225
  async function hydrateFromCCRv2InternalEvents(sessionId) {
109164
109226
  const startMs = Date.now();
109165
109227
  switchSession(asSessionId(sessionId));
109166
- const project2 = getProject();
109167
- const reader = project2.getInternalEventReader();
109228
+ const project = getProject();
109229
+ const reader = project.getInternalEventReader();
109168
109230
  if (!reader) {
109169
109231
  logForDebugging("No internal event reader registered for CCR v2 resume");
109170
109232
  return false;
@@ -109184,7 +109246,7 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
109184
109246
  await writeFile(sessionFile, fgContent, { encoding: "utf8", mode: 384 });
109185
109247
  logForDebugging(`Hydrated ${events.length} foreground entries from CCR v2 internal events`);
109186
109248
  let subagentEventCount = 0;
109187
- const subagentReader = project2.getInternalSubagentEventReader();
109249
+ const subagentReader = project.getInternalSubagentEventReader();
109188
109250
  if (subagentReader) {
109189
109251
  const subagentEvents = await subagentReader();
109190
109252
  if (subagentEvents && subagentEvents.length > 0) {
@@ -110022,10 +110084,10 @@ async function linkSessionToPR(sessionId, prNumber, prUrl, prRepository, fullPat
110022
110084
  timestamp: new Date().toISOString()
110023
110085
  });
110024
110086
  if (sessionId === getSessionId()) {
110025
- const project2 = getProject();
110026
- project2.currentSessionPrNumber = prNumber;
110027
- project2.currentSessionPrUrl = prUrl;
110028
- project2.currentSessionPrRepository = prRepository;
110087
+ const project = getProject();
110088
+ project.currentSessionPrNumber = prNumber;
110089
+ project.currentSessionPrUrl = prUrl;
110090
+ project.currentSessionPrRepository = prRepository;
110029
110091
  }
110030
110092
  logEvent("tengu_session_linked_to_pr", { prNumber });
110031
110093
  }
@@ -110045,41 +110107,41 @@ function getCurrentSessionAgentColor() {
110045
110107
  return getProject().currentSessionAgentColor;
110046
110108
  }
110047
110109
  function restoreSessionMetadata(meta) {
110048
- const project2 = getProject();
110110
+ const project = getProject();
110049
110111
  if (meta.customTitle)
110050
- project2.currentSessionTitle ??= meta.customTitle;
110112
+ project.currentSessionTitle ??= meta.customTitle;
110051
110113
  if (meta.tag !== undefined)
110052
- project2.currentSessionTag = meta.tag || undefined;
110114
+ project.currentSessionTag = meta.tag || undefined;
110053
110115
  if (meta.agentName)
110054
- project2.currentSessionAgentName = meta.agentName;
110116
+ project.currentSessionAgentName = meta.agentName;
110055
110117
  if (meta.agentColor)
110056
- project2.currentSessionAgentColor = meta.agentColor;
110118
+ project.currentSessionAgentColor = meta.agentColor;
110057
110119
  if (meta.agentSetting)
110058
- project2.currentSessionAgentSetting = meta.agentSetting;
110120
+ project.currentSessionAgentSetting = meta.agentSetting;
110059
110121
  if (meta.mode)
110060
- project2.currentSessionMode = meta.mode;
110122
+ project.currentSessionMode = meta.mode;
110061
110123
  if (meta.worktreeSession !== undefined)
110062
- project2.currentSessionWorktree = meta.worktreeSession;
110124
+ project.currentSessionWorktree = meta.worktreeSession;
110063
110125
  if (meta.prNumber !== undefined)
110064
- project2.currentSessionPrNumber = meta.prNumber;
110126
+ project.currentSessionPrNumber = meta.prNumber;
110065
110127
  if (meta.prUrl)
110066
- project2.currentSessionPrUrl = meta.prUrl;
110128
+ project.currentSessionPrUrl = meta.prUrl;
110067
110129
  if (meta.prRepository)
110068
- project2.currentSessionPrRepository = meta.prRepository;
110130
+ project.currentSessionPrRepository = meta.prRepository;
110069
110131
  }
110070
110132
  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;
110133
+ const project = getProject();
110134
+ project.currentSessionTitle = undefined;
110135
+ project.currentSessionTag = undefined;
110136
+ project.currentSessionAgentName = undefined;
110137
+ project.currentSessionAgentColor = undefined;
110138
+ project.currentSessionLastPrompt = undefined;
110139
+ project.currentSessionAgentSetting = undefined;
110140
+ project.currentSessionMode = undefined;
110141
+ project.currentSessionWorktree = undefined;
110142
+ project.currentSessionPrNumber = undefined;
110143
+ project.currentSessionPrUrl = undefined;
110144
+ project.currentSessionPrRepository = undefined;
110083
110145
  }
110084
110146
  function reAppendSessionMetadata() {
110085
110147
  getProject().reAppendSessionMetadata();
@@ -110128,10 +110190,10 @@ function saveWorktreeState(worktreeSession) {
110128
110190
  tmuxSessionName: worktreeSession.tmuxSessionName,
110129
110191
  hookBased: worktreeSession.hookBased
110130
110192
  } : null;
110131
- const project2 = getProject();
110132
- project2.currentSessionWorktree = stripped;
110133
- if (project2.sessionFile) {
110134
- appendEntryToFile(project2.sessionFile, {
110193
+ const project = getProject();
110194
+ project.currentSessionWorktree = stripped;
110195
+ if (project.sessionFile) {
110196
+ appendEntryToFile(project.sessionFile, {
110135
110197
  type: "worktree-state",
110136
110198
  worktreeSession: stripped,
110137
110199
  sessionId: getSessionId()
@@ -111352,7 +111414,7 @@ async function enrichLogs(allLogs, startIndex, count3) {
111352
111414
  }
111353
111415
  return { logs: result, nextIndex: i2 };
111354
111416
  }
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;
111417
+ 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
111418
  var init_sessionStorage = __esm(() => {
111357
111419
  init_memoize();
111358
111420
  init_state();
@@ -111392,6 +111454,7 @@ var init_sessionStorage = __esm(() => {
111392
111454
  getProjectDir = memoize_default((projectDir) => {
111393
111455
  return join26(getProjectsDir(), sanitizePath(projectDir));
111394
111456
  });
111457
+ projects = new Map;
111395
111458
  PERSISTED_OUTPUT_TAG = Buffer.from("<persisted-output>");
111396
111459
  TOOL_USE_RESULT_KEY = Buffer.from('"toolUseResult":');
111397
111460
  METADATA_TYPE_MARKERS = [
@@ -120231,539 +120294,6 @@ var init_sandbox_runtime = __esm(() => {
120231
120294
  SandboxRuntimeConfigSchema2 = { parse: () => ({}) };
120232
120295
  });
120233
120296
 
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
120297
  // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/lodash.js
120768
120298
  var init_lodash = __esm(() => {
120769
120299
  init_memoize();
@@ -121165,9 +120695,9 @@ class NodeFsHandler {
121165
120695
  this._addToNodeFs(path10, initialAdd, wh, depth + 1);
121166
120696
  }
121167
120697
  }).on(EV.ERROR, this._boundHandleError);
121168
- return new Promise((resolve11, reject2) => {
120698
+ return new Promise((resolve11, reject) => {
121169
120699
  if (!stream4)
121170
- return reject2();
120700
+ return reject();
121171
120701
  stream4.once(STR_END, () => {
121172
120702
  if (this.fsw.closed) {
121173
120703
  stream4 = undefined;
@@ -122651,7 +122181,7 @@ function ripGrepRaw(args, target, abortSignal, callback, singleThread = false) {
122651
122181
  async function ripGrepFileCount(args, target, abortSignal) {
122652
122182
  await codesignRipgrepIfNecessary();
122653
122183
  const { rgPath, rgArgs } = ripgrepCommand();
122654
- return new Promise((resolve13, reject2) => {
122184
+ return new Promise((resolve13, reject) => {
122655
122185
  const child = spawn3(rgPath, [...rgArgs, ...args, target], {
122656
122186
  signal: abortSignal,
122657
122187
  env: getQueryEnvForSpawn2(),
@@ -122671,13 +122201,13 @@ async function ripGrepFileCount(args, target, abortSignal) {
122671
122201
  if (code === 0 || code === 1)
122672
122202
  resolve13(lines);
122673
122203
  else
122674
- reject2(new Error(`rg --files exited ${code}`));
122204
+ reject(new Error(`rg --files exited ${code}`));
122675
122205
  });
122676
122206
  child.on("error", (err2) => {
122677
122207
  if (settled)
122678
122208
  return;
122679
122209
  settled = true;
122680
- reject2(err2.code === "ENOENT" ? wrapRipgrepUnavailableError(err2) : err2);
122210
+ reject(err2.code === "ENOENT" ? wrapRipgrepUnavailableError(err2) : err2);
122681
122211
  });
122682
122212
  });
122683
122213
  }
@@ -122686,7 +122216,7 @@ async function ripGrep(args, target, abortSignal) {
122686
122216
  testRipgrepOnFirstUse().catch((error41) => {
122687
122217
  logError(error41);
122688
122218
  });
122689
- return new Promise((resolve13, reject2) => {
122219
+ return new Promise((resolve13, reject) => {
122690
122220
  const handleResult3 = (error41, stdout, stderr, isRetry) => {
122691
122221
  if (!error41) {
122692
122222
  resolve13(stdout.trim().split(`
@@ -122699,7 +122229,7 @@ async function ripGrep(args, target, abortSignal) {
122699
122229
  }
122700
122230
  const CRITICAL_ERROR_CODES = ["ENOENT", "EACCES", "EPERM"];
122701
122231
  if (CRITICAL_ERROR_CODES.includes(error41.code)) {
122702
- reject2(error41.code === "ENOENT" ? wrapRipgrepUnavailableError(error41) : error41);
122232
+ reject(error41.code === "ENOENT" ? wrapRipgrepUnavailableError(error41) : error41);
122703
122233
  return;
122704
122234
  }
122705
122235
  if (!isRetry && isEagainError(stderr)) {
@@ -122726,7 +122256,7 @@ async function ripGrep(args, target, abortSignal) {
122726
122256
  logError(error41);
122727
122257
  }
122728
122258
  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));
122259
+ 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
122260
  return;
122731
122261
  }
122732
122262
  resolve13(lines);
@@ -125074,256 +124604,6 @@ class Diff {
125074
124604
  return components;
125075
124605
  }
125076
124606
  }
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
124607
  // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/diff/line.js
125328
124608
  function diffLines(oldStr, newStr, options) {
125329
124609
  return lineDiff.diff(oldStr, newStr, options);
@@ -125380,140 +124660,6 @@ var init_line2 = __esm(() => {
125380
124660
  lineDiff = new LineDiff;
125381
124661
  });
125382
124662
 
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
124663
  // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/patch/create.js
125518
124664
  function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
125519
124665
  let optionsObj;
@@ -125638,16 +124784,10 @@ function splitLines(text) {
125638
124784
  var init_create2 = __esm(() => {
125639
124785
  init_line2();
125640
124786
  });
124787
+
125641
124788
  // node_modules/.bun/diff@8.0.3/node_modules/diff/libesm/index.js
125642
124789
  var init_libesm = __esm(() => {
125643
- init_character();
125644
- init_word();
125645
124790
  init_line2();
125646
- init_sentence();
125647
- init_css();
125648
- init_json2();
125649
- init_array3();
125650
- init_apply();
125651
124791
  init_create2();
125652
124792
  });
125653
124793
 
@@ -127514,25 +126654,25 @@ ${text}</tr>
127514
126654
  this.use(...args);
127515
126655
  }
127516
126656
  walkTokens(tokens, callback) {
127517
- let values2 = [];
126657
+ let values = [];
127518
126658
  for (const token of tokens) {
127519
- values2 = values2.concat(callback.call(this, token));
126659
+ values = values.concat(callback.call(this, token));
127520
126660
  switch (token.type) {
127521
126661
  case "table": {
127522
126662
  const tableToken = token;
127523
126663
  for (const cell of tableToken.header) {
127524
- values2 = values2.concat(this.walkTokens(cell.tokens, callback));
126664
+ values = values.concat(this.walkTokens(cell.tokens, callback));
127525
126665
  }
127526
126666
  for (const row of tableToken.rows) {
127527
126667
  for (const cell of row) {
127528
- values2 = values2.concat(this.walkTokens(cell.tokens, callback));
126668
+ values = values.concat(this.walkTokens(cell.tokens, callback));
127529
126669
  }
127530
126670
  }
127531
126671
  break;
127532
126672
  }
127533
126673
  case "list": {
127534
126674
  const listToken = token;
127535
- values2 = values2.concat(this.walkTokens(listToken.items, callback));
126675
+ values = values.concat(this.walkTokens(listToken.items, callback));
127536
126676
  break;
127537
126677
  }
127538
126678
  default: {
@@ -127540,15 +126680,15 @@ ${text}</tr>
127540
126680
  if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
127541
126681
  this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
127542
126682
  const tokens2 = genericToken[childTokens].flat(Infinity);
127543
- values2 = values2.concat(this.walkTokens(tokens2, callback));
126683
+ values = values.concat(this.walkTokens(tokens2, callback));
127544
126684
  });
127545
126685
  } else if (genericToken.tokens) {
127546
- values2 = values2.concat(this.walkTokens(genericToken.tokens, callback));
126686
+ values = values.concat(this.walkTokens(genericToken.tokens, callback));
127547
126687
  }
127548
126688
  }
127549
126689
  }
127550
126690
  }
127551
- return values2;
126691
+ return values;
127552
126692
  }
127553
126693
  use(...args) {
127554
126694
  const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };
@@ -127688,12 +126828,12 @@ ${text}</tr>
127688
126828
  const walkTokens2 = this.defaults.walkTokens;
127689
126829
  const packWalktokens = pack.walkTokens;
127690
126830
  opts.walkTokens = function(token) {
127691
- let values2 = [];
127692
- values2.push(packWalktokens.call(this, token));
126831
+ let values = [];
126832
+ values.push(packWalktokens.call(this, token));
127693
126833
  if (walkTokens2) {
127694
- values2 = values2.concat(walkTokens2.call(this, token));
126834
+ values = values.concat(walkTokens2.call(this, token));
127695
126835
  }
127696
- return values2;
126836
+ return values;
127697
126837
  };
127698
126838
  }
127699
126839
  this.defaults = { ...this.defaults, ...opts };
@@ -128661,11 +127801,11 @@ var require_parse4 = __commonJS((exports, module) => {
128661
127801
  return value.replace(/\\(.)/g, "$1");
128662
127802
  };
128663
127803
  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];
127804
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
127805
+ for (let i3 = 0;i3 < values.length; i3++) {
127806
+ for (let j = i3 + 1;j < values.length; j++) {
127807
+ const a2 = values[i3];
127808
+ const b = values[j];
128669
127809
  const char = a2[0];
128670
127810
  if (!char || a2 !== char.repeat(a2.length) || b !== char.repeat(b.length)) {
128671
127811
  continue;
@@ -128868,7 +128008,7 @@ var require_parse4 = __commonJS((exports, module) => {
128868
128008
  state2.output += token.output != null ? token.output : token.value;
128869
128009
  consume(token.value);
128870
128010
  };
128871
- const negate2 = () => {
128011
+ const negate = () => {
128872
128012
  let count3 = 1;
128873
128013
  while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
128874
128014
  advance();
@@ -129289,7 +128429,7 @@ var require_parse4 = __commonJS((exports, module) => {
129289
128429
  }
129290
128430
  }
129291
128431
  if (opts.nonegate !== true && state2.index === 0) {
129292
- negate2();
128432
+ negate();
129293
128433
  continue;
129294
128434
  }
129295
128435
  }
@@ -130747,6 +129887,166 @@ var init_sessionMemoryUtils = __esm(() => {
130747
129887
  init_state2();
130748
129888
  });
130749
129889
 
129890
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseFindIndex.js
129891
+ function baseFindIndex(array3, predicate, fromIndex, fromRight) {
129892
+ var length = array3.length, index = fromIndex + (fromRight ? 1 : -1);
129893
+ while (fromRight ? index-- : ++index < length) {
129894
+ if (predicate(array3[index], index, array3)) {
129895
+ return index;
129896
+ }
129897
+ }
129898
+ return -1;
129899
+ }
129900
+ var _baseFindIndex_default;
129901
+ var init__baseFindIndex = __esm(() => {
129902
+ _baseFindIndex_default = baseFindIndex;
129903
+ });
129904
+
129905
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseIsNaN.js
129906
+ function baseIsNaN(value) {
129907
+ return value !== value;
129908
+ }
129909
+ var _baseIsNaN_default;
129910
+ var init__baseIsNaN = __esm(() => {
129911
+ _baseIsNaN_default = baseIsNaN;
129912
+ });
129913
+
129914
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_strictIndexOf.js
129915
+ function strictIndexOf(array3, value, fromIndex) {
129916
+ var index = fromIndex - 1, length = array3.length;
129917
+ while (++index < length) {
129918
+ if (array3[index] === value) {
129919
+ return index;
129920
+ }
129921
+ }
129922
+ return -1;
129923
+ }
129924
+ var _strictIndexOf_default;
129925
+ var init__strictIndexOf = __esm(() => {
129926
+ _strictIndexOf_default = strictIndexOf;
129927
+ });
129928
+
129929
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseIndexOf.js
129930
+ function baseIndexOf(array3, value, fromIndex) {
129931
+ return value === value ? _strictIndexOf_default(array3, value, fromIndex) : _baseFindIndex_default(array3, _baseIsNaN_default, fromIndex);
129932
+ }
129933
+ var _baseIndexOf_default;
129934
+ var init__baseIndexOf = __esm(() => {
129935
+ init__baseFindIndex();
129936
+ init__baseIsNaN();
129937
+ init__strictIndexOf();
129938
+ _baseIndexOf_default = baseIndexOf;
129939
+ });
129940
+
129941
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayIncludes.js
129942
+ function arrayIncludes(array3, value) {
129943
+ var length = array3 == null ? 0 : array3.length;
129944
+ return !!length && _baseIndexOf_default(array3, value, 0) > -1;
129945
+ }
129946
+ var _arrayIncludes_default;
129947
+ var init__arrayIncludes = __esm(() => {
129948
+ init__baseIndexOf();
129949
+ _arrayIncludes_default = arrayIncludes;
129950
+ });
129951
+
129952
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayIncludesWith.js
129953
+ function arrayIncludesWith(array3, value, comparator) {
129954
+ var index = -1, length = array3 == null ? 0 : array3.length;
129955
+ while (++index < length) {
129956
+ if (comparator(value, array3[index])) {
129957
+ return true;
129958
+ }
129959
+ }
129960
+ return false;
129961
+ }
129962
+ var _arrayIncludesWith_default;
129963
+ var init__arrayIncludesWith = __esm(() => {
129964
+ _arrayIncludesWith_default = arrayIncludesWith;
129965
+ });
129966
+
129967
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/noop.js
129968
+ function noop8() {}
129969
+ var noop_default;
129970
+ var init_noop = __esm(() => {
129971
+ noop_default = noop8;
129972
+ });
129973
+
129974
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createSet.js
129975
+ var INFINITY3, createSet, _createSet_default;
129976
+ var init__createSet = __esm(() => {
129977
+ init__Set();
129978
+ init_noop();
129979
+ init__setToArray();
129980
+ INFINITY3 = 1 / 0;
129981
+ createSet = !(_Set_default && 1 / _setToArray_default(new _Set_default([, -0]))[1] == INFINITY3) ? noop_default : function(values) {
129982
+ return new _Set_default(values);
129983
+ };
129984
+ _createSet_default = createSet;
129985
+ });
129986
+
129987
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseUniq.js
129988
+ function baseUniq(array3, iteratee, comparator) {
129989
+ var index = -1, includes = _arrayIncludes_default, length = array3.length, isCommon = true, result = [], seen = result;
129990
+ if (comparator) {
129991
+ isCommon = false;
129992
+ includes = _arrayIncludesWith_default;
129993
+ } else if (length >= LARGE_ARRAY_SIZE2) {
129994
+ var set3 = iteratee ? null : _createSet_default(array3);
129995
+ if (set3) {
129996
+ return _setToArray_default(set3);
129997
+ }
129998
+ isCommon = false;
129999
+ includes = _cacheHas_default;
130000
+ seen = new _SetCache_default;
130001
+ } else {
130002
+ seen = iteratee ? [] : result;
130003
+ }
130004
+ outer:
130005
+ while (++index < length) {
130006
+ var value = array3[index], computed = iteratee ? iteratee(value) : value;
130007
+ value = comparator || value !== 0 ? value : 0;
130008
+ if (isCommon && computed === computed) {
130009
+ var seenIndex = seen.length;
130010
+ while (seenIndex--) {
130011
+ if (seen[seenIndex] === computed) {
130012
+ continue outer;
130013
+ }
130014
+ }
130015
+ if (iteratee) {
130016
+ seen.push(computed);
130017
+ }
130018
+ result.push(value);
130019
+ } else if (!includes(seen, computed, comparator)) {
130020
+ if (seen !== result) {
130021
+ seen.push(computed);
130022
+ }
130023
+ result.push(value);
130024
+ }
130025
+ }
130026
+ return result;
130027
+ }
130028
+ var LARGE_ARRAY_SIZE2 = 200, _baseUniq_default;
130029
+ var init__baseUniq = __esm(() => {
130030
+ init__SetCache();
130031
+ init__arrayIncludes();
130032
+ init__arrayIncludesWith();
130033
+ init__cacheHas();
130034
+ init__createSet();
130035
+ init__setToArray();
130036
+ _baseUniq_default = baseUniq;
130037
+ });
130038
+
130039
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/uniqBy.js
130040
+ function uniqBy(array3, iteratee) {
130041
+ return array3 && array3.length ? _baseUniq_default(array3, _baseIteratee_default(iteratee, 2)) : [];
130042
+ }
130043
+ var uniqBy_default;
130044
+ var init_uniqBy = __esm(() => {
130045
+ init__baseIteratee();
130046
+ init__baseUniq();
130047
+ uniqBy_default = uniqBy;
130048
+ });
130049
+
130750
130050
  // src/capabilities/tools/ToolSearchTool/ToolSearchTool.ts
130751
130051
  function getDeferredToolsCacheKey(deferredTools) {
130752
130052
  return deferredTools.map((t) => t.name).sort().join(",");
@@ -131862,6 +131162,16 @@ var init_imageValidation = __esm(() => {
131862
131162
  };
131863
131163
  });
131864
131164
 
131165
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/isEqual.js
131166
+ function isEqual(value, other2) {
131167
+ return _baseIsEqual_default(value, other2);
131168
+ }
131169
+ var isEqual_default;
131170
+ var init_isEqual = __esm(() => {
131171
+ init__baseIsEqual();
131172
+ isEqual_default = isEqual;
131173
+ });
131174
+
131865
131175
  // src/lib/thinking.ts
131866
131176
  function isUltrathinkEnabled() {
131867
131177
  if (true) {
@@ -224507,9 +223817,9 @@ var init_stream2 = __esm(() => {
224507
223817
  if (this.hasError) {
224508
223818
  return Promise.reject(this.hasError);
224509
223819
  }
224510
- return new Promise((resolve15, reject2) => {
223820
+ return new Promise((resolve15, reject) => {
224511
223821
  this.readResolve = resolve15;
224512
- this.readReject = reject2;
223822
+ this.readReject = reject;
224513
223823
  });
224514
223824
  }
224515
223825
  enqueue(value) {
@@ -224534,10 +223844,10 @@ var init_stream2 = __esm(() => {
224534
223844
  error(error41) {
224535
223845
  this.hasError = error41;
224536
223846
  if (this.readReject) {
224537
- const reject2 = this.readReject;
223847
+ const reject = this.readReject;
224538
223848
  this.readResolve = undefined;
224539
223849
  this.readReject = undefined;
224540
- reject2(error41);
223850
+ reject(error41);
224541
223851
  }
224542
223852
  }
224543
223853
  return() {
@@ -225862,7 +225172,7 @@ class SSEClientTransport {
225862
225172
  }
225863
225173
  _startOrAuth() {
225864
225174
  const fetchImpl = this?._eventSourceInit?.fetch ?? this._fetch ?? fetch;
225865
- return new Promise((resolve15, reject2) => {
225175
+ return new Promise((resolve15, reject) => {
225866
225176
  this._eventSource = new EventSource(this._url.href, {
225867
225177
  ...this._eventSourceInit,
225868
225178
  fetch: async (url3, init) => {
@@ -225883,11 +225193,11 @@ class SSEClientTransport {
225883
225193
  this._abortController = new AbortController;
225884
225194
  this._eventSource.onerror = (event) => {
225885
225195
  if (event.code === 401 && this._authProvider) {
225886
- this._authThenStart().then(resolve15, reject2);
225196
+ this._authThenStart().then(resolve15, reject);
225887
225197
  return;
225888
225198
  }
225889
225199
  const error41 = new SseError(event.code, event.message, event);
225890
- reject2(error41);
225200
+ reject(error41);
225891
225201
  this.onerror?.(error41);
225892
225202
  };
225893
225203
  this._eventSource.onopen = () => {};
@@ -225899,7 +225209,7 @@ class SSEClientTransport {
225899
225209
  throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`);
225900
225210
  }
225901
225211
  } catch (error41) {
225902
- reject2(error41);
225212
+ reject(error41);
225903
225213
  this.onerror?.(error41);
225904
225214
  this.close();
225905
225215
  return;
@@ -226067,7 +225377,7 @@ class StdioClientTransport {
226067
225377
  if (this._process) {
226068
225378
  throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
226069
225379
  }
226070
- return new Promise((resolve15, reject2) => {
225380
+ return new Promise((resolve15, reject) => {
226071
225381
  this._process = import_cross_spawn3.default(this._serverParams.command, this._serverParams.args ?? [], {
226072
225382
  env: {
226073
225383
  ...getDefaultEnvironment(),
@@ -226079,7 +225389,7 @@ class StdioClientTransport {
226079
225389
  cwd: this._serverParams.cwd
226080
225390
  });
226081
225391
  this._process.on("error", (error41) => {
226082
- reject2(error41);
225392
+ reject(error41);
226083
225393
  this.onerror?.(error41);
226084
225394
  });
226085
225395
  this._process.on("spawn", () => {
@@ -226584,6 +225894,31 @@ var init_streamableHttp = __esm(() => {
226584
225894
  };
226585
225895
  });
226586
225896
 
225897
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseZipObject.js
225898
+ function baseZipObject(props, values, assignFunc) {
225899
+ var index = -1, length = props.length, valsLength = values.length, result = {};
225900
+ while (++index < length) {
225901
+ var value = index < valsLength ? values[index] : undefined;
225902
+ assignFunc(result, props[index], value);
225903
+ }
225904
+ return result;
225905
+ }
225906
+ var _baseZipObject_default;
225907
+ var init__baseZipObject = __esm(() => {
225908
+ _baseZipObject_default = baseZipObject;
225909
+ });
225910
+
225911
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/zipObject.js
225912
+ function zipObject(props, values) {
225913
+ return _baseZipObject_default(props || [], values || [], _assignValue_default);
225914
+ }
225915
+ var zipObject_default;
225916
+ var init_zipObject = __esm(() => {
225917
+ init__assignValue();
225918
+ init__baseZipObject();
225919
+ zipObject_default = zipObject;
225920
+ });
225921
+
226587
225922
  // node_modules/.bun/p-map@7.0.4/node_modules/p-map/index.js
226588
225923
  async function pMap(iterable, mapper, {
226589
225924
  concurrency = Number.POSITIVE_INFINITY,
@@ -226610,7 +225945,7 @@ async function pMap(iterable, mapper, {
226610
225945
  let currentIndex = 0;
226611
225946
  const iterator2 = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
226612
225947
  const signalListener = () => {
226613
- reject2(signal.reason);
225948
+ reject(signal.reason);
226614
225949
  };
226615
225950
  const cleanup = () => {
226616
225951
  signal?.removeEventListener("abort", signalListener);
@@ -226619,7 +225954,7 @@ async function pMap(iterable, mapper, {
226619
225954
  resolve_(value);
226620
225955
  cleanup();
226621
225956
  };
226622
- const reject2 = (reason) => {
225957
+ const reject = (reason) => {
226623
225958
  isRejected = true;
226624
225959
  isResolved = true;
226625
225960
  reject_(reason);
@@ -226627,7 +225962,7 @@ async function pMap(iterable, mapper, {
226627
225962
  };
226628
225963
  if (signal) {
226629
225964
  if (signal.aborted) {
226630
- reject2(signal.reason);
225965
+ reject(signal.reason);
226631
225966
  }
226632
225967
  signal.addEventListener("abort", signalListener, { once: true });
226633
225968
  }
@@ -226642,7 +225977,7 @@ async function pMap(iterable, mapper, {
226642
225977
  isIterableDone = true;
226643
225978
  if (resolvingCount === 0 && !isResolved) {
226644
225979
  if (!stopOnError && errors4.length > 0) {
226645
- reject2(new AggregateError(errors4));
225980
+ reject(new AggregateError(errors4));
226646
225981
  return;
226647
225982
  }
226648
225983
  isResolved = true;
@@ -226677,14 +226012,14 @@ async function pMap(iterable, mapper, {
226677
226012
  await next();
226678
226013
  } catch (error41) {
226679
226014
  if (stopOnError) {
226680
- reject2(error41);
226015
+ reject(error41);
226681
226016
  } else {
226682
226017
  errors4.push(error41);
226683
226018
  resolvingCount--;
226684
226019
  try {
226685
226020
  await next();
226686
226021
  } catch (error42) {
226687
- reject2(error42);
226022
+ reject(error42);
226688
226023
  }
226689
226024
  }
226690
226025
  }
@@ -226695,7 +226030,7 @@ async function pMap(iterable, mapper, {
226695
226030
  try {
226696
226031
  await next();
226697
226032
  } catch (error41) {
226698
- reject2(error41);
226033
+ reject(error41);
226699
226034
  break;
226700
226035
  }
226701
226036
  if (isIterableDone || isRejected) {
@@ -229904,6 +229239,95 @@ var init_MCPTool = __esm(() => {
229904
229239
  });
229905
229240
  });
229906
229241
 
229242
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createBaseEach.js
229243
+ function createBaseEach(eachFunc, fromRight) {
229244
+ return function(collection, iteratee) {
229245
+ if (collection == null) {
229246
+ return collection;
229247
+ }
229248
+ if (!isArrayLike_default(collection)) {
229249
+ return eachFunc(collection, iteratee);
229250
+ }
229251
+ var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
229252
+ while (fromRight ? index-- : ++index < length) {
229253
+ if (iteratee(iterable[index], index, iterable) === false) {
229254
+ break;
229255
+ }
229256
+ }
229257
+ return collection;
229258
+ };
229259
+ }
229260
+ var _createBaseEach_default;
229261
+ var init__createBaseEach = __esm(() => {
229262
+ init_isArrayLike();
229263
+ _createBaseEach_default = createBaseEach;
229264
+ });
229265
+
229266
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseEach.js
229267
+ var baseEach, _baseEach_default;
229268
+ var init__baseEach = __esm(() => {
229269
+ init__baseForOwn();
229270
+ init__createBaseEach();
229271
+ baseEach = _createBaseEach_default(_baseForOwn_default);
229272
+ _baseEach_default = baseEach;
229273
+ });
229274
+
229275
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseFilter.js
229276
+ function baseFilter(collection, predicate) {
229277
+ var result = [];
229278
+ _baseEach_default(collection, function(value, index, collection2) {
229279
+ if (predicate(value, index, collection2)) {
229280
+ result.push(value);
229281
+ }
229282
+ });
229283
+ return result;
229284
+ }
229285
+ var _baseFilter_default;
229286
+ var init__baseFilter = __esm(() => {
229287
+ init__baseEach();
229288
+ _baseFilter_default = baseFilter;
229289
+ });
229290
+
229291
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/negate.js
229292
+ function negate(predicate) {
229293
+ if (typeof predicate != "function") {
229294
+ throw new TypeError(FUNC_ERROR_TEXT2);
229295
+ }
229296
+ return function() {
229297
+ var args = arguments;
229298
+ switch (args.length) {
229299
+ case 0:
229300
+ return !predicate.call(this);
229301
+ case 1:
229302
+ return !predicate.call(this, args[0]);
229303
+ case 2:
229304
+ return !predicate.call(this, args[0], args[1]);
229305
+ case 3:
229306
+ return !predicate.call(this, args[0], args[1], args[2]);
229307
+ }
229308
+ return !predicate.apply(this, args);
229309
+ };
229310
+ }
229311
+ var FUNC_ERROR_TEXT2 = "Expected a function", negate_default;
229312
+ var init_negate = __esm(() => {
229313
+ negate_default = negate;
229314
+ });
229315
+
229316
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/reject.js
229317
+ function reject(collection, predicate) {
229318
+ var func = isArray_default(collection) ? _arrayFilter_default : _baseFilter_default;
229319
+ return func(collection, negate_default(_baseIteratee_default(predicate, 3)));
229320
+ }
229321
+ var reject_default;
229322
+ var init_reject2 = __esm(() => {
229323
+ init__arrayFilter();
229324
+ init__baseFilter();
229325
+ init__baseIteratee();
229326
+ init_isArray();
229327
+ init_negate();
229328
+ reject_default = reject;
229329
+ });
229330
+
229907
229331
  // node_modules/.bun/cssfilter@0.0.10/node_modules/cssfilter/lib/default.js
229908
229332
  var require_default2 = __commonJS((exports) => {
229909
229333
  function getDefaultWhiteList() {
@@ -238034,6 +237458,75 @@ var init_detection = __esm(() => {
238034
237458
  ORIGINAL_TMUX_PANE = process.env.TMUX_PANE;
238035
237459
  });
238036
237460
 
237461
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseRandom.js
237462
+ function baseRandom(lower, upper) {
237463
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
237464
+ }
237465
+ var nativeFloor, nativeRandom, _baseRandom_default;
237466
+ var init__baseRandom = __esm(() => {
237467
+ nativeFloor = Math.floor;
237468
+ nativeRandom = Math.random;
237469
+ _baseRandom_default = baseRandom;
237470
+ });
237471
+
237472
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arraySample.js
237473
+ function arraySample(array3) {
237474
+ var length = array3.length;
237475
+ return length ? array3[_baseRandom_default(0, length - 1)] : undefined;
237476
+ }
237477
+ var _arraySample_default;
237478
+ var init__arraySample = __esm(() => {
237479
+ init__baseRandom();
237480
+ _arraySample_default = arraySample;
237481
+ });
237482
+
237483
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseValues.js
237484
+ function baseValues(object4, props) {
237485
+ return _arrayMap_default(props, function(key) {
237486
+ return object4[key];
237487
+ });
237488
+ }
237489
+ var _baseValues_default;
237490
+ var init__baseValues = __esm(() => {
237491
+ init__arrayMap();
237492
+ _baseValues_default = baseValues;
237493
+ });
237494
+
237495
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/values.js
237496
+ function values(object4) {
237497
+ return object4 == null ? [] : _baseValues_default(object4, keys_default(object4));
237498
+ }
237499
+ var values_default;
237500
+ var init_values3 = __esm(() => {
237501
+ init__baseValues();
237502
+ init_keys();
237503
+ values_default = values;
237504
+ });
237505
+
237506
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseSample.js
237507
+ function baseSample(collection) {
237508
+ return _arraySample_default(values_default(collection));
237509
+ }
237510
+ var _baseSample_default;
237511
+ var init__baseSample = __esm(() => {
237512
+ init__arraySample();
237513
+ init_values3();
237514
+ _baseSample_default = baseSample;
237515
+ });
237516
+
237517
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/sample.js
237518
+ function sample(collection) {
237519
+ var func = isArray_default(collection) ? _arraySample_default : _baseSample_default;
237520
+ return func(collection);
237521
+ }
237522
+ var sample_default;
237523
+ var init_sample = __esm(() => {
237524
+ init__arraySample();
237525
+ init__baseSample();
237526
+ init_isArray();
237527
+ sample_default = sample;
237528
+ });
237529
+
238037
237530
  // src/constants/spinnerVerbs.ts
238038
237531
  function getSpinnerVerbs() {
238039
237532
  const settings = getInitialSettings();
@@ -238887,8 +238380,11 @@ var init_coreSchemas = __esm(() => {
238887
238380
  "resume",
238888
238381
  "logout",
238889
238382
  "prompt_input_exit",
238890
- "other",
238891
- "bypass_permissions_disabled"
238383
+ "bypass_permissions_disabled",
238384
+ "normal",
238385
+ "aborted",
238386
+ "error",
238387
+ "other"
238892
238388
  ];
238893
238389
  ExitReasonSchema = lazySchema(() => exports_external2.enum(EXIT_REASONS2));
238894
238390
  SessionEndHookInputSchema = lazySchema(() => BaseHookInputSchema().and(exports_external2.object({
@@ -251607,6 +251103,131 @@ duration_ms: ${data.totalDurationMs}</usage>`
251607
251103
  });
251608
251104
  });
251609
251105
 
251106
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseSlice.js
251107
+ function baseSlice(array3, start, end) {
251108
+ var index = -1, length = array3.length;
251109
+ if (start < 0) {
251110
+ start = -start > length ? 0 : length + start;
251111
+ }
251112
+ end = end > length ? length : end;
251113
+ if (end < 0) {
251114
+ end += length;
251115
+ }
251116
+ length = start > end ? 0 : end - start >>> 0;
251117
+ start >>>= 0;
251118
+ var result = Array(length);
251119
+ while (++index < length) {
251120
+ result[index] = array3[index + start];
251121
+ }
251122
+ return result;
251123
+ }
251124
+ var _baseSlice_default;
251125
+ var init__baseSlice = __esm(() => {
251126
+ _baseSlice_default = baseSlice;
251127
+ });
251128
+
251129
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_castSlice.js
251130
+ function castSlice(array3, start, end) {
251131
+ var length = array3.length;
251132
+ end = end === undefined ? length : end;
251133
+ return !start && end >= length ? array3 : _baseSlice_default(array3, start, end);
251134
+ }
251135
+ var _castSlice_default;
251136
+ var init__castSlice = __esm(() => {
251137
+ init__baseSlice();
251138
+ _castSlice_default = castSlice;
251139
+ });
251140
+
251141
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_hasUnicode.js
251142
+ function hasUnicode(string5) {
251143
+ return reHasUnicode.test(string5);
251144
+ }
251145
+ var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange, rsVarRange = "\\ufe0e\\ufe0f", rsZWJ = "\\u200d", reHasUnicode, _hasUnicode_default;
251146
+ var init__hasUnicode = __esm(() => {
251147
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
251148
+ reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
251149
+ _hasUnicode_default = hasUnicode;
251150
+ });
251151
+
251152
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_asciiToArray.js
251153
+ function asciiToArray(string5) {
251154
+ return string5.split("");
251155
+ }
251156
+ var _asciiToArray_default;
251157
+ var init__asciiToArray = __esm(() => {
251158
+ _asciiToArray_default = asciiToArray;
251159
+ });
251160
+
251161
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_unicodeToArray.js
251162
+ function unicodeToArray(string5) {
251163
+ return string5.match(reUnicode) || [];
251164
+ }
251165
+ 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;
251166
+ var init__unicodeToArray = __esm(() => {
251167
+ rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
251168
+ rsAstral = "[" + rsAstralRange2 + "]";
251169
+ rsCombo = "[" + rsComboRange2 + "]";
251170
+ rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
251171
+ rsNonAstral = "[^" + rsAstralRange2 + "]";
251172
+ reOptMod = rsModifier + "?";
251173
+ rsOptVar = "[" + rsVarRange2 + "]?";
251174
+ rsOptJoin = "(?:" + rsZWJ2 + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
251175
+ rsSeq = rsOptVar + reOptMod + rsOptJoin;
251176
+ rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
251177
+ reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
251178
+ _unicodeToArray_default = unicodeToArray;
251179
+ });
251180
+
251181
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_stringToArray.js
251182
+ function stringToArray(string5) {
251183
+ return _hasUnicode_default(string5) ? _unicodeToArray_default(string5) : _asciiToArray_default(string5);
251184
+ }
251185
+ var _stringToArray_default;
251186
+ var init__stringToArray = __esm(() => {
251187
+ init__asciiToArray();
251188
+ init__hasUnicode();
251189
+ init__unicodeToArray();
251190
+ _stringToArray_default = stringToArray;
251191
+ });
251192
+
251193
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createCaseFirst.js
251194
+ function createCaseFirst(methodName) {
251195
+ return function(string5) {
251196
+ string5 = toString_default(string5);
251197
+ var strSymbols = _hasUnicode_default(string5) ? _stringToArray_default(string5) : undefined;
251198
+ var chr = strSymbols ? strSymbols[0] : string5.charAt(0);
251199
+ var trailing = strSymbols ? _castSlice_default(strSymbols, 1).join("") : string5.slice(1);
251200
+ return chr[methodName]() + trailing;
251201
+ };
251202
+ }
251203
+ var _createCaseFirst_default;
251204
+ var init__createCaseFirst = __esm(() => {
251205
+ init__castSlice();
251206
+ init__hasUnicode();
251207
+ init__stringToArray();
251208
+ init_toString();
251209
+ _createCaseFirst_default = createCaseFirst;
251210
+ });
251211
+
251212
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/upperFirst.js
251213
+ var upperFirst, upperFirst_default;
251214
+ var init_upperFirst = __esm(() => {
251215
+ init__createCaseFirst();
251216
+ upperFirst = _createCaseFirst_default("toUpperCase");
251217
+ upperFirst_default = upperFirst;
251218
+ });
251219
+
251220
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/capitalize.js
251221
+ function capitalize2(string5) {
251222
+ return upperFirst_default(toString_default(string5).toLowerCase());
251223
+ }
251224
+ var capitalize_default;
251225
+ var init_capitalize = __esm(() => {
251226
+ init_toString();
251227
+ init_upperFirst();
251228
+ capitalize_default = capitalize2;
251229
+ });
251230
+
251610
251231
  // src/lib/jetbrains.ts
251611
251232
  var pluginInstalledCache, pluginInstalledPromiseCache;
251612
251233
  var init_jetbrains = __esm(() => {
@@ -282388,7 +282009,7 @@ function getAnthropicEnvMetadata() {
282388
282009
  function getBuildAgeMinutes() {
282389
282010
  if (false)
282390
282011
  ;
282391
- const buildTime = new Date("2026-05-15T07:36:09.106Z").getTime();
282012
+ const buildTime = new Date("2026-05-18T09:28:09.100Z").getTime();
282392
282013
  if (isNaN(buildTime))
282393
282014
  return;
282394
282015
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -323430,7 +323051,7 @@ var require_dbcs_codec = __commonJS((exports) => {
323430
323051
  if (resCode !== undefined) {
323431
323052
  dbcsCode = resCode;
323432
323053
  nextChar = uCode;
323433
- } else {}
323054
+ }
323434
323055
  }
323435
323056
  seqObj = undefined;
323436
323057
  } else if (uCode >= 0) {
@@ -323491,7 +323112,7 @@ var require_dbcs_codec = __commonJS((exports) => {
323491
323112
  newBuf[j++] = dbcsCode >> 8;
323492
323113
  newBuf[j++] = dbcsCode & 255;
323493
323114
  }
323494
- } else {}
323115
+ }
323495
323116
  this.seqObj = undefined;
323496
323117
  }
323497
323118
  if (this.leadSurrogate !== -1) {
@@ -329094,8 +328715,47 @@ init_log2();
329094
328715
  init_permissions2();
329095
328716
  init_permissionSetup();
329096
328717
 
328718
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_arrayAggregator.js
328719
+ function arrayAggregator(array3, setter, iteratee, accumulator) {
328720
+ var index = -1, length = array3 == null ? 0 : array3.length;
328721
+ while (++index < length) {
328722
+ var value = array3[index];
328723
+ setter(accumulator, value, iteratee(value), array3);
328724
+ }
328725
+ return accumulator;
328726
+ }
328727
+ var _arrayAggregator_default = arrayAggregator;
328728
+
328729
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_baseAggregator.js
328730
+ init__baseEach();
328731
+ function baseAggregator(collection, setter, iteratee, accumulator) {
328732
+ _baseEach_default(collection, function(value, key, collection2) {
328733
+ setter(accumulator, value, iteratee(value), collection2);
328734
+ });
328735
+ return accumulator;
328736
+ }
328737
+ var _baseAggregator_default = baseAggregator;
328738
+
328739
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/_createAggregator.js
328740
+ init__baseIteratee();
328741
+ init_isArray();
328742
+ function createAggregator(setter, initializer3) {
328743
+ return function(collection, iteratee) {
328744
+ var func = isArray_default(collection) ? _arrayAggregator_default : _baseAggregator_default, accumulator = initializer3 ? initializer3() : {};
328745
+ return func(collection, setter, _baseIteratee_default(iteratee, 2), accumulator);
328746
+ };
328747
+ }
328748
+ var _createAggregator_default = createAggregator;
328749
+
328750
+ // node_modules/.bun/lodash-es@4.18.0/node_modules/lodash-es/partition.js
328751
+ var partition2 = _createAggregator_default(function(result, value, key) {
328752
+ result[key ? 0 : 1].push(value);
328753
+ }, function() {
328754
+ return [[], []];
328755
+ });
328756
+ var partition_default = partition2;
328757
+
329097
328758
  // src/controller/toolPool.ts
329098
- init_partition();
329099
328759
  init_uniqBy();
329100
328760
  init_tools();
329101
328761
  init_utils5();
@@ -329534,16 +329194,6 @@ function runSdkQueryRuntime(params) {
329534
329194
  };
329535
329195
  }
329536
329196
  } 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
329197
  runtimeState.runningTurn = false;
329548
329198
  for (const client of [...dynamicClients, ...sdkClients]) {
329549
329199
  if (client.type === "connected") {
@@ -329562,6 +329212,11 @@ function runSdkQueryRuntime(params) {
329562
329212
  init_fileHistory();
329563
329213
  init_buildFromSdk();
329564
329214
  init_als();
329215
+ init_registries2();
329216
+ init_hooks2();
329217
+ init_AppStateStore();
329218
+ init_debug();
329219
+ init_errors5();
329565
329220
  function mergeTurnOptions(sessionOptions, turnOptions) {
329566
329221
  if (!turnOptions)
329567
329222
  return sessionOptions;
@@ -329622,8 +329277,32 @@ class SessionRuntime {
329622
329277
  async getInfo() {
329623
329278
  return;
329624
329279
  }
329625
- async close() {
329280
+ async close(reason = "normal") {
329281
+ if (this.closed)
329282
+ return;
329626
329283
  this.closed = true;
329284
+ const ctx = buildRewindQueryContext(this.baseOptions);
329285
+ await runWithQueryContext(ctx, async () => {
329286
+ if (this.baseOptions.hooks) {
329287
+ try {
329288
+ registerHookCallbacks2(this.baseOptions.hooks);
329289
+ } catch (err2) {
329290
+ logForDebugging(`SessionRuntime.close: registerHookCallbacks threw: ${errorMessage(err2)}`, { level: "warn" });
329291
+ }
329292
+ }
329293
+ let state3 = getDefaultAppState();
329294
+ try {
329295
+ await executeSessionEndHooks(reason, {
329296
+ getAppState: () => state3,
329297
+ setAppState: (updater) => {
329298
+ state3 = updater(state3);
329299
+ },
329300
+ timeoutMs: getSessionEndHookTimeoutMs()
329301
+ });
329302
+ } catch (err2) {
329303
+ logForDebugging(`SessionRuntime.close: SessionEnd hooks errored: ${errorMessage(err2)}`, { level: "warn" });
329304
+ }
329305
+ });
329627
329306
  }
329628
329307
  canRewindFiles(state3, messageUuid) {
329629
329308
  const effective = this.accumulatedFileHistory ?? state3;
@@ -331284,7 +330963,7 @@ init_frontmatterParser();
331284
330963
  init_messages4();
331285
330964
  init_model();
331286
330965
 
331287
- // missing-module-stub:/Users/yunge/Projects/evose-react/opencow-agent-sdk/src/capabilities/config.js
330966
+ // missing-module-stub:/home/runner/work/opencow-agent-sdk/opencow-agent-sdk/src/capabilities/config.js
331288
330967
  var noop12 = () => null;
331289
330968
  var saveGlobalConfig2 = noop12;
331290
330969
 
@@ -334828,6 +334507,10 @@ function getSDKBuiltInTools() {
334828
334507
  function getBuiltInTools() {
334829
334508
  return getSDKBuiltInTools();
334830
334509
  }
334510
+
334511
+ // src/client.ts
334512
+ init_sessionStorage();
334513
+
334831
334514
  // src/providers/anthropic/oauth/index.ts
334832
334515
  init_browser();
334833
334516
 
@@ -335478,6 +335161,7 @@ export {
335478
335161
  createSession2 as createSession,
335479
335162
  createSdkMcpServer,
335480
335163
  connectRemoteControl,
335164
+ clearProjectForSession,
335481
335165
  buildMissedTaskNotification,
335482
335166
  buildAuthUrl,
335483
335167
  attachSdkLogObserver,
@@ -335504,4 +335188,4 @@ export {
335504
335188
  AbortError2 as AbortError
335505
335189
  };
335506
335190
 
335507
- //# debugId=8C1353CB9CA54D2064756E2164756E21
335191
+ //# debugId=1DC839138D0F01B464756E2164756E21