@probelabs/probe 0.6.0-rc270 → 0.6.0-rc272

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.
@@ -11508,22 +11508,16 @@ var init_JsonShapeDeserializer = __esm({
11508
11508
  if (Array.isArray(value) && ns.isListSchema()) {
11509
11509
  const listMember = ns.getValueSchema();
11510
11510
  const out = [];
11511
- const sparse = !!ns.getMergedTraits().sparse;
11512
11511
  for (const item of value) {
11513
- if (sparse || item != null) {
11514
- out.push(this._read(listMember, item));
11515
- }
11512
+ out.push(this._read(listMember, item));
11516
11513
  }
11517
11514
  return out;
11518
11515
  }
11519
11516
  if (ns.isMapSchema()) {
11520
11517
  const mapMember = ns.getValueSchema();
11521
11518
  const out = {};
11522
- const sparse = !!ns.getMergedTraits().sparse;
11523
11519
  for (const [_k, _v] of Object.entries(value)) {
11524
- if (sparse || _v != null) {
11525
- out[_k] = this._read(mapMember, _v);
11526
- }
11520
+ out[_k] = this._read(mapMember, _v);
11527
11521
  }
11528
11522
  return out;
11529
11523
  }
@@ -13172,18 +13166,18 @@ var init_XmlShapeDeserializer = __esm({
13172
13166
  return value;
13173
13167
  }
13174
13168
  if (typeof value === "object") {
13175
- const sparse = !!traits.sparse;
13176
13169
  const flat = !!traits.xmlFlattened;
13177
13170
  if (ns.isListSchema()) {
13178
13171
  const listValue = ns.getValueSchema();
13179
13172
  const buffer2 = [];
13180
13173
  const sourceKey = listValue.getMergedTraits().xmlName ?? "member";
13181
13174
  const source = flat ? value : (value[0] ?? value)[sourceKey];
13175
+ if (source == null) {
13176
+ return buffer2;
13177
+ }
13182
13178
  const sourceArray = Array.isArray(source) ? source : [source];
13183
13179
  for (const v5 of sourceArray) {
13184
- if (v5 != null || sparse) {
13185
- buffer2.push(this.readSchema(listValue, v5));
13186
- }
13180
+ buffer2.push(this.readSchema(listValue, v5));
13187
13181
  }
13188
13182
  return buffer2;
13189
13183
  }
@@ -13202,9 +13196,7 @@ var init_XmlShapeDeserializer = __esm({
13202
13196
  for (const entry of entries) {
13203
13197
  const key = entry[keyProperty];
13204
13198
  const value2 = entry[valueProperty];
13205
- if (value2 != null || sparse) {
13206
- buffer[key] = this.readSchema(memberNs, value2);
13207
- }
13199
+ buffer[key] = this.readSchema(memberNs, value2);
13208
13200
  }
13209
13201
  return buffer;
13210
13202
  }
@@ -17546,7 +17538,7 @@ var require_package2 = __commonJS({
17546
17538
  module2.exports = {
17547
17539
  name: "@aws-sdk/client-bedrock-runtime",
17548
17540
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
17549
- version: "3.1001.0",
17541
+ version: "3.1002.0",
17550
17542
  scripts: {
17551
17543
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
17552
17544
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -17570,21 +17562,21 @@ var require_package2 = __commonJS({
17570
17562
  dependencies: {
17571
17563
  "@aws-crypto/sha256-browser": "5.2.0",
17572
17564
  "@aws-crypto/sha256-js": "5.2.0",
17573
- "@aws-sdk/core": "^3.973.16",
17574
- "@aws-sdk/credential-provider-node": "^3.972.15",
17565
+ "@aws-sdk/core": "^3.973.17",
17566
+ "@aws-sdk/credential-provider-node": "^3.972.16",
17575
17567
  "@aws-sdk/eventstream-handler-node": "^3.972.9",
17576
17568
  "@aws-sdk/middleware-eventstream": "^3.972.6",
17577
17569
  "@aws-sdk/middleware-host-header": "^3.972.6",
17578
17570
  "@aws-sdk/middleware-logger": "^3.972.6",
17579
17571
  "@aws-sdk/middleware-recursion-detection": "^3.972.6",
17580
- "@aws-sdk/middleware-user-agent": "^3.972.16",
17572
+ "@aws-sdk/middleware-user-agent": "^3.972.17",
17581
17573
  "@aws-sdk/middleware-websocket": "^3.972.11",
17582
17574
  "@aws-sdk/region-config-resolver": "^3.972.6",
17583
- "@aws-sdk/token-providers": "3.1001.0",
17575
+ "@aws-sdk/token-providers": "3.1002.0",
17584
17576
  "@aws-sdk/types": "^3.973.4",
17585
17577
  "@aws-sdk/util-endpoints": "^3.996.3",
17586
17578
  "@aws-sdk/util-user-agent-browser": "^3.972.6",
17587
- "@aws-sdk/util-user-agent-node": "^3.973.1",
17579
+ "@aws-sdk/util-user-agent-node": "^3.973.2",
17588
17580
  "@smithy/config-resolver": "^4.4.9",
17589
17581
  "@smithy/core": "^3.23.7",
17590
17582
  "@smithy/eventstream-serde-browser": "^4.2.10",
@@ -18333,7 +18325,7 @@ var init_package = __esm({
18333
18325
  "node_modules/@aws-sdk/nested-clients/package.json"() {
18334
18326
  package_default = {
18335
18327
  name: "@aws-sdk/nested-clients",
18336
- version: "3.996.4",
18328
+ version: "3.996.5",
18337
18329
  description: "Nested clients for AWS SDK packages.",
18338
18330
  main: "./dist-cjs/index.js",
18339
18331
  module: "./dist-es/index.js",
@@ -18362,16 +18354,16 @@ var init_package = __esm({
18362
18354
  dependencies: {
18363
18355
  "@aws-crypto/sha256-browser": "5.2.0",
18364
18356
  "@aws-crypto/sha256-js": "5.2.0",
18365
- "@aws-sdk/core": "^3.973.16",
18357
+ "@aws-sdk/core": "^3.973.17",
18366
18358
  "@aws-sdk/middleware-host-header": "^3.972.6",
18367
18359
  "@aws-sdk/middleware-logger": "^3.972.6",
18368
18360
  "@aws-sdk/middleware-recursion-detection": "^3.972.6",
18369
- "@aws-sdk/middleware-user-agent": "^3.972.16",
18361
+ "@aws-sdk/middleware-user-agent": "^3.972.17",
18370
18362
  "@aws-sdk/region-config-resolver": "^3.972.6",
18371
18363
  "@aws-sdk/types": "^3.973.4",
18372
18364
  "@aws-sdk/util-endpoints": "^3.996.3",
18373
18365
  "@aws-sdk/util-user-agent-browser": "^3.972.6",
18374
- "@aws-sdk/util-user-agent-node": "^3.973.1",
18366
+ "@aws-sdk/util-user-agent-node": "^3.973.2",
18375
18367
  "@smithy/config-resolver": "^4.4.9",
18376
18368
  "@smithy/core": "^3.23.7",
18377
18369
  "@smithy/fetch-http-handler": "^5.3.12",
@@ -36502,6 +36494,17 @@ function parseDelegatedTargets(rawResponse) {
36502
36494
  }
36503
36495
  return normalizeTargets(fallbackTargetsFromText(trimmed));
36504
36496
  }
36497
+ function splitTargetSuffix(target) {
36498
+ const searchStart = target.length > 2 && target[1] === ":" && /[a-zA-Z]/.test(target[0]) ? 2 : 0;
36499
+ const colonIdx = target.indexOf(":", searchStart);
36500
+ const hashIdx = target.indexOf("#");
36501
+ if (colonIdx !== -1 && (hashIdx === -1 || colonIdx < hashIdx)) {
36502
+ return { filePart: target.substring(0, colonIdx), suffix: target.substring(colonIdx) };
36503
+ } else if (hashIdx !== -1) {
36504
+ return { filePart: target.substring(0, hashIdx), suffix: target.substring(hashIdx) };
36505
+ }
36506
+ return { filePart: target, suffix: "" };
36507
+ }
36505
36508
  function buildSearchDelegateTask({ searchQuery, searchPath, exact, language, allowTests }) {
36506
36509
  return [
36507
36510
  "You are a code-search subagent. Your job is to find ALL relevant code locations for the given query.",
@@ -36516,7 +36519,7 @@ function buildSearchDelegateTask({ searchQuery, searchPath, exact, language, all
36516
36519
  "",
36517
36520
  "Strategy for complex queries:",
36518
36521
  "1. Analyze the query - identify key concepts, entities, and relationships",
36519
- '2. Run focused searches for each concept (e.g., "error handling" + "authentication" separately)',
36522
+ '2. Run focused searches for each independent concept (e.g., for "how do payments work and how are emails sent", search "payments" and "emails" separately since they are unrelated)',
36520
36523
  "3. Use extract to verify relevance of promising results",
36521
36524
  "4. Combine all relevant targets in your final response",
36522
36525
  "",
@@ -36530,7 +36533,7 @@ function buildSearchDelegateTask({ searchQuery, searchPath, exact, language, all
36530
36533
  "Deduplicate targets. Do NOT explain or answer - ONLY return the JSON targets."
36531
36534
  ].join("\n");
36532
36535
  }
36533
- var import_ai, CODE_SEARCH_SCHEMA, searchTool, queryTool, extractTool, delegateTool, analyzeAllTool;
36536
+ var import_ai, import_fs4, CODE_SEARCH_SCHEMA, searchTool, queryTool, extractTool, delegateTool, analyzeAllTool;
36534
36537
  var init_vercel = __esm({
36535
36538
  "src/tools/vercel.js"() {
36536
36539
  "use strict";
@@ -36541,6 +36544,7 @@ var init_vercel = __esm({
36541
36544
  init_delegate();
36542
36545
  init_analyzeAll();
36543
36546
  init_common2();
36547
+ import_fs4 = require("fs");
36544
36548
  init_error_types();
36545
36549
  init_hashline();
36546
36550
  CODE_SEARCH_SCHEMA = {
@@ -36666,10 +36670,47 @@ var init_vercel = __esm({
36666
36670
  }
36667
36671
  return fallbackResult;
36668
36672
  }
36673
+ const delegateBase = options.allowedFolders?.[0] || options.cwd || ".";
36669
36674
  const resolutionBase = searchPaths[0] || options.cwd || ".";
36670
- const resolvedTargets = targets.map((target) => resolveTargetPath(target, resolutionBase));
36675
+ const resolvedTargets = targets.map((target) => resolveTargetPath(target, delegateBase));
36676
+ const validatedTargets = [];
36677
+ for (const target of resolvedTargets) {
36678
+ const { filePart, suffix } = splitTargetSuffix(target);
36679
+ if ((0, import_fs4.existsSync)(filePart)) {
36680
+ validatedTargets.push(target);
36681
+ continue;
36682
+ }
36683
+ let fixed = false;
36684
+ const parts = filePart.split("/").filter(Boolean);
36685
+ for (let i5 = 0; i5 < parts.length - 1; i5++) {
36686
+ if (parts[i5] === parts[i5 + 1]) {
36687
+ const candidate = "/" + [...parts.slice(0, i5), ...parts.slice(i5 + 1)].join("/");
36688
+ if ((0, import_fs4.existsSync)(candidate)) {
36689
+ validatedTargets.push(candidate + suffix);
36690
+ if (debug) console.error(`[search-delegate] Fixed doubled path segment: ${filePart} \u2192 ${candidate}`);
36691
+ fixed = true;
36692
+ break;
36693
+ }
36694
+ }
36695
+ }
36696
+ if (fixed) continue;
36697
+ for (const altBase of [resolutionBase, options.cwd].filter(Boolean)) {
36698
+ if (altBase === delegateBase) continue;
36699
+ const altResolved = resolveTargetPath(target, altBase);
36700
+ const { filePart: altFile } = splitTargetSuffix(altResolved);
36701
+ if ((0, import_fs4.existsSync)(altFile)) {
36702
+ validatedTargets.push(altResolved);
36703
+ if (debug) console.error(`[search-delegate] Resolved with alt base: ${filePart} \u2192 ${altFile}`);
36704
+ fixed = true;
36705
+ break;
36706
+ }
36707
+ }
36708
+ if (fixed) continue;
36709
+ if (debug) console.error(`[search-delegate] Warning: target may not exist: ${filePart}`);
36710
+ validatedTargets.push(target);
36711
+ }
36671
36712
  const extractOptions = {
36672
- files: resolvedTargets,
36713
+ files: validatedTargets,
36673
36714
  cwd: resolutionBase,
36674
36715
  allowTests: allow_tests ?? true
36675
36716
  };
@@ -38314,7 +38355,7 @@ async function executeBashCommand(command, options = {}) {
38314
38355
  let cwd = workingDirectory;
38315
38356
  try {
38316
38357
  cwd = (0, import_path6.resolve)(cwd);
38317
- if (!(0, import_fs4.existsSync)(cwd)) {
38358
+ if (!(0, import_fs5.existsSync)(cwd)) {
38318
38359
  throw new Error(`Working directory does not exist: ${cwd}`);
38319
38360
  }
38320
38361
  } catch (error2) {
@@ -38570,7 +38611,7 @@ function validateExecutionOptions(options = {}) {
38570
38611
  if (options.workingDirectory) {
38571
38612
  if (typeof options.workingDirectory !== "string") {
38572
38613
  errors.push("workingDirectory must be a string");
38573
- } else if (!(0, import_fs4.existsSync)(options.workingDirectory)) {
38614
+ } else if (!(0, import_fs5.existsSync)(options.workingDirectory)) {
38574
38615
  errors.push(`workingDirectory does not exist: ${options.workingDirectory}`);
38575
38616
  }
38576
38617
  }
@@ -38583,13 +38624,13 @@ function validateExecutionOptions(options = {}) {
38583
38624
  warnings
38584
38625
  };
38585
38626
  }
38586
- var import_child_process6, import_path6, import_fs4;
38627
+ var import_child_process6, import_path6, import_fs5;
38587
38628
  var init_bashExecutor = __esm({
38588
38629
  "src/agent/bashExecutor.js"() {
38589
38630
  "use strict";
38590
38631
  import_child_process6 = require("child_process");
38591
38632
  import_path6 = require("path");
38592
- import_fs4 = require("fs");
38633
+ import_fs5 = require("fs");
38593
38634
  init_bashCommandUtils();
38594
38635
  }
38595
38636
  });
@@ -39147,7 +39188,7 @@ Example: <edit><file_path>${file_path}</file_path><symbol>${allMatches[0].qualif
39147
39188
  Example: <extract><targets>${file_path}#${symbol15}</targets></extract>`;
39148
39189
  }
39149
39190
  }
39150
- const content = await import_fs5.promises.readFile(resolvedPath2, "utf-8");
39191
+ const content = await import_fs6.promises.readFile(resolvedPath2, "utf-8");
39151
39192
  const lines = content.split("\n");
39152
39193
  if (position) {
39153
39194
  const refIndent = detectBaseIndent(symbolInfo.code);
@@ -39158,7 +39199,7 @@ Example: <extract><targets>${file_path}#${symbol15}</targets></extract>`;
39158
39199
  } else {
39159
39200
  lines.splice(symbolInfo.startLine - 1, 0, ...newLines, "");
39160
39201
  }
39161
- await import_fs5.promises.writeFile(resolvedPath2, lines.join("\n"), "utf-8");
39202
+ await import_fs6.promises.writeFile(resolvedPath2, lines.join("\n"), "utf-8");
39162
39203
  if (fileTracker) {
39163
39204
  const updated = await findSymbol(resolvedPath2, symbol15, cwd || process.cwd());
39164
39205
  if (updated) {
@@ -39176,7 +39217,7 @@ Example: <extract><targets>${file_path}#${symbol15}</targets></extract>`;
39176
39217
  const reindented = reindent(new_string, originalIndent);
39177
39218
  const newLines = reindented.split("\n");
39178
39219
  lines.splice(symbolInfo.startLine - 1, symbolInfo.endLine - symbolInfo.startLine + 1, ...newLines);
39179
- await import_fs5.promises.writeFile(resolvedPath2, lines.join("\n"), "utf-8");
39220
+ await import_fs6.promises.writeFile(resolvedPath2, lines.join("\n"), "utf-8");
39180
39221
  if (fileTracker) {
39181
39222
  const updated = await findSymbol(resolvedPath2, symbol15, cwd || process.cwd());
39182
39223
  if (updated) {
@@ -39231,7 +39272,7 @@ async function handleLineEdit({ resolvedPath: resolvedPath2, file_path, start_li
39231
39272
  if (position !== void 0 && position !== null && position !== "before" && position !== "after") {
39232
39273
  return 'Error editing file: Invalid position - must be "before" or "after". Use position="before" to insert before the line, or position="after" to insert after it.';
39233
39274
  }
39234
- const content = await import_fs5.promises.readFile(resolvedPath2, "utf-8");
39275
+ const content = await import_fs6.promises.readFile(resolvedPath2, "utf-8");
39235
39276
  const fileLines = content.split("\n");
39236
39277
  if (startLine > fileLines.length) {
39237
39278
  return `Error editing file: Line ${startLine} is beyond file length (${fileLines.length} lines). Use 'extract' to read the current file content.`;
@@ -39260,20 +39301,20 @@ async function handleLineEdit({ resolvedPath: resolvedPath2, file_path, start_li
39260
39301
  const newLines = cleaned === "" ? [] : cleaned.split("\n");
39261
39302
  if (position === "after") {
39262
39303
  fileLines.splice(startLine, 0, ...newLines);
39263
- await import_fs5.promises.writeFile(resolvedPath2, fileLines.join("\n"), "utf-8");
39304
+ await import_fs6.promises.writeFile(resolvedPath2, fileLines.join("\n"), "utf-8");
39264
39305
  if (fileTracker) await fileTracker.trackFileAfterWrite(resolvedPath2);
39265
39306
  const action = `${newLines.length} line${newLines.length !== 1 ? "s" : ""} inserted after line ${startLine}`;
39266
39307
  return buildLineEditResponse(file_path, startLine, startLine, newLines.length, fileLines, startLine, action, modifications);
39267
39308
  } else if (position === "before") {
39268
39309
  fileLines.splice(startLine - 1, 0, ...newLines);
39269
- await import_fs5.promises.writeFile(resolvedPath2, fileLines.join("\n"), "utf-8");
39310
+ await import_fs6.promises.writeFile(resolvedPath2, fileLines.join("\n"), "utf-8");
39270
39311
  if (fileTracker) await fileTracker.trackFileAfterWrite(resolvedPath2);
39271
39312
  const action = `${newLines.length} line${newLines.length !== 1 ? "s" : ""} inserted before line ${startLine}`;
39272
39313
  return buildLineEditResponse(file_path, startLine, startLine, newLines.length, fileLines, startLine - 1, action, modifications);
39273
39314
  } else {
39274
39315
  const replacedCount = endLine - startLine + 1;
39275
39316
  fileLines.splice(startLine - 1, replacedCount, ...newLines);
39276
- await import_fs5.promises.writeFile(resolvedPath2, fileLines.join("\n"), "utf-8");
39317
+ await import_fs6.promises.writeFile(resolvedPath2, fileLines.join("\n"), "utf-8");
39277
39318
  if (fileTracker) await fileTracker.trackFileAfterWrite(resolvedPath2);
39278
39319
  let action;
39279
39320
  if (newLines.length === 0) {
@@ -39286,14 +39327,14 @@ async function handleLineEdit({ resolvedPath: resolvedPath2, file_path, start_li
39286
39327
  return buildLineEditResponse(file_path, startLine, endLine, newLines.length, fileLines, startLine - 1, action, modifications);
39287
39328
  }
39288
39329
  }
39289
- var import_ai3, import_fs5, import_path8, import_fs6, editTool, createTool, multiEditTool, editSchema, createSchema, multiEditSchema, editDescription, createDescription, multiEditDescription, editToolDefinition, createToolDefinition, multiEditToolDefinition;
39330
+ var import_ai3, import_fs6, import_path8, import_fs7, editTool, createTool, multiEditTool, editSchema, createSchema, multiEditSchema, editDescription, createDescription, multiEditDescription, editToolDefinition, createToolDefinition, multiEditToolDefinition;
39290
39331
  var init_edit = __esm({
39291
39332
  "src/tools/edit.js"() {
39292
39333
  "use strict";
39293
39334
  import_ai3 = require("ai");
39294
- import_fs5 = require("fs");
39295
- import_path8 = require("path");
39296
39335
  import_fs6 = require("fs");
39336
+ import_path8 = require("path");
39337
+ import_fs7 = require("fs");
39297
39338
  init_path_validation();
39298
39339
  init_fuzzyMatch();
39299
39340
  init_symbolEdit();
@@ -39377,7 +39418,7 @@ Parameters:
39377
39418
  const relativePath = toRelativePath(resolvedPath2, workspaceRoot);
39378
39419
  return `Error editing file: Permission denied - ${relativePath} is outside allowed directories. Use a file path within the project workspace.`;
39379
39420
  }
39380
- if (!(0, import_fs6.existsSync)(resolvedPath2)) {
39421
+ if (!(0, import_fs7.existsSync)(resolvedPath2)) {
39381
39422
  return `Error editing file: File not found - ${file_path}. Verify the path is correct and the file exists. Use 'search' to find files by name, or 'create' to make a new file.`;
39382
39423
  }
39383
39424
  if (options.fileTracker && !options.fileTracker.isFileSeen(resolvedPath2)) {
@@ -39407,7 +39448,7 @@ Example: <extract><targets>${displayPath}</targets></extract>`;
39407
39448
  Example: <extract><targets>${displayPath}</targets></extract>`;
39408
39449
  }
39409
39450
  }
39410
- const content = await import_fs5.promises.readFile(resolvedPath2, "utf-8");
39451
+ const content = await import_fs6.promises.readFile(resolvedPath2, "utf-8");
39411
39452
  let matchTarget = old_string;
39412
39453
  let matchStrategy = "exact";
39413
39454
  if (!content.includes(old_string)) {
@@ -39439,7 +39480,7 @@ Example: <extract><targets>${displayPath}</targets></extract>`;
39439
39480
  if (newContent === content) {
39440
39481
  return `Error editing file: No changes made - the replacement result is identical to the original. Verify that old_string and new_string are actually different. If fuzzy matching was used, the matched text may already equal new_string.`;
39441
39482
  }
39442
- await import_fs5.promises.writeFile(resolvedPath2, newContent, "utf-8");
39483
+ await import_fs6.promises.writeFile(resolvedPath2, newContent, "utf-8");
39443
39484
  if (options.fileTracker) {
39444
39485
  await options.fileTracker.trackFileAfterWrite(resolvedPath2);
39445
39486
  options.fileTracker.recordTextEdit(resolvedPath2);
@@ -39510,13 +39551,13 @@ Important:
39510
39551
  const relativePath = toRelativePath(resolvedPath2, workspaceRoot);
39511
39552
  return `Error creating file: Permission denied - ${relativePath} is outside allowed directories. Use a file path within the project workspace.`;
39512
39553
  }
39513
- if ((0, import_fs6.existsSync)(resolvedPath2) && !overwrite) {
39554
+ if ((0, import_fs7.existsSync)(resolvedPath2) && !overwrite) {
39514
39555
  return `Error creating file: File already exists - ${file_path}. Use overwrite: true to replace it.`;
39515
39556
  }
39516
- const existed = (0, import_fs6.existsSync)(resolvedPath2);
39557
+ const existed = (0, import_fs7.existsSync)(resolvedPath2);
39517
39558
  const dir = (0, import_path8.dirname)(resolvedPath2);
39518
- await import_fs5.promises.mkdir(dir, { recursive: true });
39519
- await import_fs5.promises.writeFile(resolvedPath2, content, "utf-8");
39559
+ await import_fs6.promises.mkdir(dir, { recursive: true });
39560
+ await import_fs6.promises.writeFile(resolvedPath2, content, "utf-8");
39520
39561
  if (options.fileTracker) await options.fileTracker.trackFileAfterWrite(resolvedPath2);
39521
39562
  const action = existed && overwrite ? "overwrote" : "created";
39522
39563
  const bytes = Buffer.byteLength(content, "utf-8");
@@ -53822,22 +53863,22 @@ var init_esm3 = __esm({
53822
53863
  });
53823
53864
 
53824
53865
  // node_modules/path-scurry/dist/esm/index.js
53825
- var import_node_path, import_node_url, import_fs7, actualFS, import_promises, realpathSync2, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
53866
+ var import_node_path, import_node_url, import_fs8, actualFS, import_promises, realpathSync2, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
53826
53867
  var init_esm4 = __esm({
53827
53868
  "node_modules/path-scurry/dist/esm/index.js"() {
53828
53869
  init_esm2();
53829
53870
  import_node_path = require("node:path");
53830
53871
  import_node_url = require("node:url");
53831
- import_fs7 = require("fs");
53872
+ import_fs8 = require("fs");
53832
53873
  actualFS = __toESM(require("node:fs"), 1);
53833
53874
  import_promises = require("node:fs/promises");
53834
53875
  init_esm3();
53835
- realpathSync2 = import_fs7.realpathSync.native;
53876
+ realpathSync2 = import_fs8.realpathSync.native;
53836
53877
  defaultFS = {
53837
- lstatSync: import_fs7.lstatSync,
53838
- readdir: import_fs7.readdir,
53839
- readdirSync: import_fs7.readdirSync,
53840
- readlinkSync: import_fs7.readlinkSync,
53878
+ lstatSync: import_fs8.lstatSync,
53879
+ readdir: import_fs8.readdir,
53880
+ readdirSync: import_fs8.readdirSync,
53881
+ readlinkSync: import_fs8.readlinkSync,
53841
53882
  realpathSync: realpathSync2,
53842
53883
  promises: {
53843
53884
  lstat: import_promises.lstat,
@@ -57366,10 +57407,10 @@ async function listFilesByLevel(options) {
57366
57407
  maxFiles = 100,
57367
57408
  respectGitignore = true
57368
57409
  } = options;
57369
- if (!import_fs8.default.existsSync(directory)) {
57410
+ if (!import_fs9.default.existsSync(directory)) {
57370
57411
  throw new Error(`Directory does not exist: ${directory}`);
57371
57412
  }
57372
- const gitDirExists = import_fs8.default.existsSync(import_path9.default.join(directory, ".git"));
57413
+ const gitDirExists = import_fs9.default.existsSync(import_path9.default.join(directory, ".git"));
57373
57414
  if (gitDirExists && respectGitignore) {
57374
57415
  try {
57375
57416
  return await listFilesUsingGit(directory, maxFiles);
@@ -57400,7 +57441,7 @@ async function listFilesByLevelManually(directory, maxFiles, respectGitignore) {
57400
57441
  while (queue.length > 0 && result.length < maxFiles) {
57401
57442
  const { dir, level } = queue.shift();
57402
57443
  try {
57403
- const entries = import_fs8.default.readdirSync(dir, { withFileTypes: true });
57444
+ const entries = import_fs9.default.readdirSync(dir, { withFileTypes: true });
57404
57445
  const files = entries.filter((entry) => {
57405
57446
  const fullPath = import_path9.default.join(dir, entry.name);
57406
57447
  return getEntryTypeSync(entry, fullPath).isFile;
@@ -57431,11 +57472,11 @@ async function listFilesByLevelManually(directory, maxFiles, respectGitignore) {
57431
57472
  }
57432
57473
  function loadGitignorePatterns(directory) {
57433
57474
  const gitignorePath = import_path9.default.join(directory, ".gitignore");
57434
- if (!import_fs8.default.existsSync(gitignorePath)) {
57475
+ if (!import_fs9.default.existsSync(gitignorePath)) {
57435
57476
  return [];
57436
57477
  }
57437
57478
  try {
57438
- const content = import_fs8.default.readFileSync(gitignorePath, "utf8");
57479
+ const content = import_fs9.default.readFileSync(gitignorePath, "utf8");
57439
57480
  return content.split("\n").map((line) => line.trim()).filter((line) => line && !line.startsWith("#"));
57440
57481
  } catch (error2) {
57441
57482
  console.error(`Warning: Could not read .gitignore: ${error2.message}`);
@@ -57453,11 +57494,11 @@ function shouldIgnore(filePath, ignorePatterns) {
57453
57494
  }
57454
57495
  return false;
57455
57496
  }
57456
- var import_fs8, import_path9, import_util11, import_child_process7, execAsync3;
57497
+ var import_fs9, import_path9, import_util11, import_child_process7, execAsync3;
57457
57498
  var init_file_lister = __esm({
57458
57499
  "src/utils/file-lister.js"() {
57459
57500
  "use strict";
57460
- import_fs8 = __toESM(require("fs"), 1);
57501
+ import_fs9 = __toESM(require("fs"), 1);
57461
57502
  import_path9 = __toESM(require("path"), 1);
57462
57503
  import_util11 = require("util");
57463
57504
  import_child_process7 = require("child_process");
@@ -57757,11 +57798,11 @@ var init_fileTracker = __esm({
57757
57798
  });
57758
57799
 
57759
57800
  // src/agent/simpleTelemetry.js
57760
- var import_fs9, import_path11;
57801
+ var import_fs10, import_path11;
57761
57802
  var init_simpleTelemetry = __esm({
57762
57803
  "src/agent/simpleTelemetry.js"() {
57763
57804
  "use strict";
57764
- import_fs9 = require("fs");
57805
+ import_fs10 = require("fs");
57765
57806
  import_path11 = require("path");
57766
57807
  }
57767
57808
  });
@@ -57868,7 +57909,7 @@ function createWrappedTools(baseTools) {
57868
57909
  }
57869
57910
  return wrappedTools;
57870
57911
  }
57871
- var import_child_process8, import_util12, import_crypto4, import_events, import_fs10, import_fs11, import_path12, toolCallEmitter, activeToolExecutions, wrapToolWithEmitter, listFilesTool, searchFilesTool, listFilesToolInstance, searchFilesToolInstance;
57912
+ var import_child_process8, import_util12, import_crypto4, import_events, import_fs11, import_fs12, import_path12, toolCallEmitter, activeToolExecutions, wrapToolWithEmitter, listFilesTool, searchFilesTool, listFilesToolInstance, searchFilesToolInstance;
57872
57913
  var init_probeTool = __esm({
57873
57914
  "src/agent/probeTool.js"() {
57874
57915
  "use strict";
@@ -57877,8 +57918,8 @@ var init_probeTool = __esm({
57877
57918
  import_util12 = require("util");
57878
57919
  import_crypto4 = require("crypto");
57879
57920
  import_events = require("events");
57880
- import_fs10 = __toESM(require("fs"), 1);
57881
- import_fs11 = require("fs");
57921
+ import_fs11 = __toESM(require("fs"), 1);
57922
+ import_fs12 = require("fs");
57882
57923
  import_path12 = __toESM(require("path"), 1);
57883
57924
  init_esm5();
57884
57925
  init_symlink_utils();
@@ -57987,7 +58028,7 @@ var init_probeTool = __esm({
57987
58028
  console.log(`[DEBUG] Listing files in directory: ${targetDir}`);
57988
58029
  }
57989
58030
  try {
57990
- const files = await import_fs11.promises.readdir(targetDir, { withFileTypes: true });
58031
+ const files = await import_fs12.promises.readdir(targetDir, { withFileTypes: true });
57991
58032
  const formatSize = (size) => {
57992
58033
  if (size < 1024) return `${size}B`;
57993
58034
  if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)}K`;
@@ -97834,11 +97875,11 @@ function loadMCPConfigurationFromPath(configPath) {
97834
97875
  if (!configPath) {
97835
97876
  throw new Error("Config path is required");
97836
97877
  }
97837
- if (!(0, import_fs12.existsSync)(configPath)) {
97878
+ if (!(0, import_fs13.existsSync)(configPath)) {
97838
97879
  throw new Error(`MCP configuration file not found: ${configPath}`);
97839
97880
  }
97840
97881
  try {
97841
- const content = (0, import_fs12.readFileSync)(configPath, "utf8");
97882
+ const content = (0, import_fs13.readFileSync)(configPath, "utf8");
97842
97883
  const config = JSON.parse(content);
97843
97884
  if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
97844
97885
  console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
@@ -97863,9 +97904,9 @@ function loadMCPConfiguration() {
97863
97904
  ].filter(Boolean);
97864
97905
  let config = null;
97865
97906
  for (const configPath of configPaths) {
97866
- if ((0, import_fs12.existsSync)(configPath)) {
97907
+ if ((0, import_fs13.existsSync)(configPath)) {
97867
97908
  try {
97868
- const content = (0, import_fs12.readFileSync)(configPath, "utf8");
97909
+ const content = (0, import_fs13.readFileSync)(configPath, "utf8");
97869
97910
  config = JSON.parse(content);
97870
97911
  if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
97871
97912
  console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
@@ -97986,11 +98027,11 @@ function parseEnabledServers(config) {
97986
98027
  }
97987
98028
  return servers;
97988
98029
  }
97989
- var import_fs12, import_path13, import_os3, import_url4, __filename4, __dirname5, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
98030
+ var import_fs13, import_path13, import_os3, import_url4, __filename4, __dirname5, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
97990
98031
  var init_config = __esm({
97991
98032
  "src/agent/mcp/config.js"() {
97992
98033
  "use strict";
97993
- import_fs12 = require("fs");
98034
+ import_fs13 = require("fs");
97994
98035
  import_path13 = require("path");
97995
98036
  import_os3 = require("os");
97996
98037
  import_url4 = require("url");
@@ -106085,11 +106126,11 @@ function isSafeEntryName(name14) {
106085
106126
  if (name14.includes("\0")) return false;
106086
106127
  return !name14.includes("/") && !name14.includes("\\");
106087
106128
  }
106088
- var import_fs13, import_promises3, import_path15, DEFAULT_SKILL_DIRS, SKILL_FILE_NAME, SkillRegistry;
106129
+ var import_fs14, import_promises3, import_path15, DEFAULT_SKILL_DIRS, SKILL_FILE_NAME, SkillRegistry;
106089
106130
  var init_registry = __esm({
106090
106131
  "src/agent/skills/registry.js"() {
106091
106132
  "use strict";
106092
- import_fs13 = require("fs");
106133
+ import_fs14 = require("fs");
106093
106134
  import_promises3 = require("fs/promises");
106094
106135
  import_path15 = require("path");
106095
106136
  init_parser7();
@@ -106164,7 +106205,7 @@ var init_registry = __esm({
106164
106205
  return resolvedReal;
106165
106206
  }
106166
106207
  async _scanSkillDir(dirPath) {
106167
- if (!(0, import_fs13.existsSync)(dirPath)) return [];
106208
+ if (!(0, import_fs14.existsSync)(dirPath)) return [];
106168
106209
  let entries;
106169
106210
  try {
106170
106211
  entries = await (0, import_promises3.readdir)(dirPath, { withFileTypes: true });
@@ -106204,7 +106245,7 @@ var init_registry = __esm({
106204
106245
  }
106205
106246
  continue;
106206
106247
  }
106207
- if (!(0, import_fs13.existsSync)(skillFilePath)) continue;
106248
+ if (!(0, import_fs14.existsSync)(skillFilePath)) continue;
106208
106249
  const { skill, error: error2 } = await parseSkillFile(skillFilePath, entry.name);
106209
106250
  if (!skill) {
106210
106251
  if (error2) {
@@ -108712,7 +108753,7 @@ __export(ProbeAgent_exports, {
108712
108753
  ProbeAgent: () => ProbeAgent
108713
108754
  });
108714
108755
  module.exports = __toCommonJS(ProbeAgent_exports);
108715
- var import_dotenv2, import_anthropic2, import_openai2, import_google2, import_ai6, import_crypto9, import_events4, import_fs14, import_promises6, import_path18, ENGINE_ACTIVITY_TIMEOUT_DEFAULT, ENGINE_ACTIVITY_TIMEOUT_MIN, ENGINE_ACTIVITY_TIMEOUT_MAX, MAX_TOOL_ITERATIONS, MAX_HISTORY_MESSAGES, MAX_IMAGE_FILE_SIZE, ProbeAgent;
108756
+ var import_dotenv2, import_anthropic2, import_openai2, import_google2, import_ai6, import_crypto9, import_events4, import_fs15, import_promises6, import_path18, ENGINE_ACTIVITY_TIMEOUT_DEFAULT, ENGINE_ACTIVITY_TIMEOUT_MIN, ENGINE_ACTIVITY_TIMEOUT_MAX, MAX_TOOL_ITERATIONS, MAX_HISTORY_MESSAGES, MAX_IMAGE_FILE_SIZE, ProbeAgent;
108716
108757
  var init_ProbeAgent = __esm({
108717
108758
  "src/agent/ProbeAgent.js"() {
108718
108759
  import_dotenv2 = __toESM(require_main(), 1);
@@ -108723,7 +108764,7 @@ var init_ProbeAgent = __esm({
108723
108764
  import_ai6 = require("ai");
108724
108765
  import_crypto9 = require("crypto");
108725
108766
  import_events4 = require("events");
108726
- import_fs14 = require("fs");
108767
+ import_fs15 = require("fs");
108727
108768
  import_promises6 = require("fs/promises");
108728
108769
  import_path18 = require("path");
108729
108770
  init_tokenCounter();
@@ -110730,7 +110771,7 @@ var init_ProbeAgent = __esm({
110730
110771
  } else {
110731
110772
  guidanceCandidates = ["agents.md", "claude.md"];
110732
110773
  }
110733
- if (!(0, import_fs14.existsSync)(rootDirectory)) {
110774
+ if (!(0, import_fs15.existsSync)(rootDirectory)) {
110734
110775
  this._architectureContextLoaded = true;
110735
110776
  return null;
110736
110777
  }