@probelabs/probe 0.6.0-rc314 → 0.6.0-rc316

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/cjs/index.cjs CHANGED
@@ -2018,6 +2018,7 @@ var init_query = __esm({
2018
2018
  language: "--language",
2019
2019
  ignore: "--ignore",
2020
2020
  allowTests: "--allow-tests",
2021
+ withContext: "--with-context",
2021
2022
  maxResults: "--max-results",
2022
2023
  format: "--format"
2023
2024
  };
@@ -18503,7 +18504,7 @@ function loadSetting({
18503
18504
  }
18504
18505
  if (typeof process === "undefined") {
18505
18506
  throw new LoadSettingError({
18506
- message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables is not supported in this environment.`
18507
+ message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables are not supported in this environment.`
18507
18508
  });
18508
18509
  }
18509
18510
  settingValue = process.env[environmentVariableName];
@@ -19642,7 +19643,7 @@ var init_dist2 = __esm({
19642
19643
  "ETIMEDOUT",
19643
19644
  "EPIPE"
19644
19645
  ];
19645
- VERSION = true ? "4.0.22" : "0.0.0-test";
19646
+ VERSION = true ? "4.0.26" : "0.0.0-test";
19646
19647
  suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
19647
19648
  suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
19648
19649
  ignoreOverride = /* @__PURE__ */ Symbol(
@@ -21510,6 +21511,19 @@ var require_dist_cjs5 = __commonJS({
21510
21511
  return out;
21511
21512
  }
21512
21513
  };
21514
+ var HEADER_VALUE_TYPE;
21515
+ (function(HEADER_VALUE_TYPE2) {
21516
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue";
21517
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse";
21518
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte";
21519
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short";
21520
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer";
21521
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long";
21522
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray";
21523
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string";
21524
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp";
21525
+ HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid";
21526
+ })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
21513
21527
  var BOOLEAN_TAG = "boolean";
21514
21528
  var BYTE_TAG = "byte";
21515
21529
  var SHORT_TAG = "short";
@@ -22381,12 +22395,15 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
22381
22395
  const message = block.messages[j];
22382
22396
  const isLastMessage = j === block.messages.length - 1;
22383
22397
  const { content } = message;
22398
+ const hasReasoningBlocks = content.some(
22399
+ (part) => part.type === "reasoning"
22400
+ );
22384
22401
  for (let k = 0; k < content.length; k++) {
22385
22402
  const part = content[k];
22386
22403
  const isLastContentPart = k === content.length - 1;
22387
22404
  switch (part.type) {
22388
22405
  case "text": {
22389
- if (!part.text.trim()) {
22406
+ if (!part.text.trim() && !hasReasoningBlocks) {
22390
22407
  break;
22391
22408
  }
22392
22409
  bedrockContent.push({
@@ -22427,7 +22444,9 @@ async function convertToBedrockChatMessages(prompt, isMistral = false) {
22427
22444
  }
22428
22445
  }
22429
22446
  });
22430
- } else {
22447
+ } else if (part.providerOptions == null || Object.keys(part.providerOptions).every(
22448
+ (k2) => k2 === "bedrock" || k2 === "amazonBedrock"
22449
+ )) {
22431
22450
  bedrockContent.push({
22432
22451
  reasoningContent: {
22433
22452
  reasoningText: {
@@ -22573,9 +22592,10 @@ function getBase64Data(file2) {
22573
22592
  }
22574
22593
  return file2.data;
22575
22594
  }
22576
- function createSigV4FetchFunction(getCredentials, fetch2 = globalThis.fetch) {
22595
+ function createSigV4FetchFunction(getCredentials, fetch2) {
22577
22596
  return async (input, init) => {
22578
22597
  var _a17, _b16;
22598
+ const effectiveFetch = fetch2 != null ? fetch2 : globalThis.fetch;
22579
22599
  const request = input instanceof Request ? input : void 0;
22580
22600
  const originalHeaders = combineHeaders(
22581
22601
  normalizeHeaders(request == null ? void 0 : request.headers),
@@ -22595,7 +22615,7 @@ function createSigV4FetchFunction(getCredentials, fetch2 = globalThis.fetch) {
22595
22615
  }
22596
22616
  const effectiveMethod = (_b16 = init == null ? void 0 : init.method) != null ? _b16 : request == null ? void 0 : request.method;
22597
22617
  if ((effectiveMethod == null ? void 0 : effectiveMethod.toUpperCase()) !== "POST" || !effectiveBody) {
22598
- return fetch2(input, {
22618
+ return effectiveFetch(input, {
22599
22619
  ...init,
22600
22620
  headers: headersWithUserAgent
22601
22621
  });
@@ -22617,7 +22637,7 @@ function createSigV4FetchFunction(getCredentials, fetch2 = globalThis.fetch) {
22617
22637
  const signingResult = await signer.sign();
22618
22638
  const signedHeaders = normalizeHeaders(signingResult.headers);
22619
22639
  const combinedHeaders = combineHeaders(headersWithUserAgent, signedHeaders);
22620
- return fetch2(input, {
22640
+ return effectiveFetch(input, {
22621
22641
  ...init,
22622
22642
  body,
22623
22643
  headers: combinedHeaders
@@ -22635,8 +22655,9 @@ function prepareBodyString(body) {
22635
22655
  return JSON.stringify(body);
22636
22656
  }
22637
22657
  }
22638
- function createApiKeyFetchFunction(apiKey, fetch2 = globalThis.fetch) {
22658
+ function createApiKeyFetchFunction(apiKey, fetch2) {
22639
22659
  return async (input, init) => {
22660
+ const effectiveFetch = fetch2 != null ? fetch2 : globalThis.fetch;
22640
22661
  const originalHeaders = normalizeHeaders(init == null ? void 0 : init.headers);
22641
22662
  const headersWithUserAgent = withUserAgentSuffix(
22642
22663
  originalHeaders,
@@ -22646,7 +22667,7 @@ function createApiKeyFetchFunction(apiKey, fetch2 = globalThis.fetch) {
22646
22667
  const finalHeaders = combineHeaders(headersWithUserAgent, {
22647
22668
  Authorization: `Bearer ${apiKey}`
22648
22669
  });
22649
- return fetch2(input, {
22670
+ return effectiveFetch(input, {
22650
22671
  ...init,
22651
22672
  headers: finalHeaders
22652
22673
  });
@@ -22693,7 +22714,7 @@ function createAmazonBedrock(options = {}) {
22693
22714
  environmentVariableName: "AWS_SECRET_ACCESS_KEY",
22694
22715
  description: "AWS secret access key"
22695
22716
  }),
22696
- sessionToken: loadOptionalSetting({
22717
+ sessionToken: options.accessKeyId != null && options.secretAccessKey != null ? options.sessionToken : loadOptionalSetting({
22697
22718
  settingValue: options.sessionToken,
22698
22719
  environmentVariableName: "AWS_SESSION_TOKEN"
22699
22720
  })
@@ -22794,7 +22815,7 @@ Original error: ${errorMessage}`
22794
22815
  provider.tools = import_internal.anthropicTools;
22795
22816
  return provider;
22796
22817
  }
22797
- var import_internal, import_eventstream_codec, import_util_utf8, import_internal2, BEDROCK_STOP_REASONS, BEDROCK_IMAGE_MIME_TYPES, BEDROCK_DOCUMENT_MIME_TYPES, bedrockFilePartProviderOptions, amazonBedrockLanguageModelOptions, BedrockErrorSchema, createBedrockEventStreamResponseHandler, BedrockChatLanguageModel, BedrockStopReasonSchema, BedrockAdditionalModelResponseFieldsSchema, BedrockToolUseSchema, BedrockReasoningTextSchema, BedrockRedactedReasoningSchema, BedrockResponseSchema, BedrockStreamSchema, bedrockReasoningMetadataSchema, amazonBedrockEmbeddingModelOptionsSchema, BedrockEmbeddingModel, BedrockEmbeddingResponseSchema, modelMaxImagesPerCall, BedrockImageModel, bedrockImageResponseSchema, VERSION2, bedrockRerankingResponseSchema, amazonBedrockRerankingModelOptionsSchema, BedrockRerankingModel, bedrock;
22818
+ var import_internal, import_eventstream_codec, import_util_utf8, import_internal2, BEDROCK_STOP_REASONS, BEDROCK_IMAGE_MIME_TYPES, BEDROCK_DOCUMENT_MIME_TYPES, bedrockFilePartProviderOptions, amazonBedrockLanguageModelOptions, BedrockErrorSchema, createBedrockEventStreamResponseHandler, bedrockReasoningMetadataSchema, BedrockChatLanguageModel, BedrockStopReasonSchema, BedrockAdditionalModelResponseFieldsSchema, BedrockToolUseSchema, BedrockReasoningTextSchema, BedrockRedactedReasoningSchema, BedrockResponseSchema, BedrockStreamSchema, amazonBedrockEmbeddingModelOptionsSchema, BedrockEmbeddingModel, BedrockEmbeddingResponseSchema, modelMaxImagesPerCall, BedrockImageModel, bedrockImageResponseSchema, VERSION2, bedrockRerankingResponseSchema, amazonBedrockRerankingModelOptionsSchema, BedrockRerankingModel, bedrock;
22798
22819
  var init_dist3 = __esm({
22799
22820
  "node_modules/@ai-sdk/amazon-bedrock/dist/index.mjs"() {
22800
22821
  import_internal = require("@ai-sdk/anthropic/internal");
@@ -22812,6 +22833,7 @@ var init_dist3 = __esm({
22812
22833
  import_internal2 = require("@ai-sdk/anthropic/internal");
22813
22834
  init_dist();
22814
22835
  init_dist2();
22836
+ init_v4();
22815
22837
  init_dist();
22816
22838
  init_dist2();
22817
22839
  init_v4();
@@ -22880,7 +22902,8 @@ var init_dist3 = __esm({
22880
22902
  external_exports.literal("adaptive")
22881
22903
  ]).optional(),
22882
22904
  budgetTokens: external_exports.number().optional(),
22883
- maxReasoningEffort: external_exports.enum(["low", "medium", "high", "max"]).optional()
22905
+ maxReasoningEffort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
22906
+ display: external_exports.enum(["omitted", "summarized"]).optional()
22884
22907
  }).optional(),
22885
22908
  /**
22886
22909
  * Anthropic beta features to enable
@@ -22939,6 +22962,10 @@ var init_dist3 = __esm({
22939
22962
  )
22940
22963
  };
22941
22964
  };
22965
+ bedrockReasoningMetadataSchema = external_exports.object({
22966
+ signature: external_exports.string().optional(),
22967
+ redactedData: external_exports.string().optional()
22968
+ });
22942
22969
  BedrockChatLanguageModel = class {
22943
22970
  constructor(modelId, config2) {
22944
22971
  this.modelId = modelId;
@@ -22964,7 +22991,7 @@ var init_dist3 = __esm({
22964
22991
  toolChoice,
22965
22992
  providerOptions
22966
22993
  }) {
22967
- var _a17, _b16, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
22994
+ var _a17, _b16, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
22968
22995
  const bedrockOptions = (_a17 = await parseProviderOptions({
22969
22996
  provider: "bedrock",
22970
22997
  providerOptions,
@@ -23042,6 +23069,7 @@ var init_dist3 = __esm({
23042
23069
  }
23043
23070
  const thinkingType = (_e = bedrockOptions.reasoningConfig) == null ? void 0 : _e.type;
23044
23071
  const thinkingBudget = thinkingType === "enabled" ? (_f = bedrockOptions.reasoningConfig) == null ? void 0 : _f.budgetTokens : void 0;
23072
+ const thinkingDisplay = thinkingType === "adaptive" ? (_g = bedrockOptions.reasoningConfig) == null ? void 0 : _g.display : void 0;
23045
23073
  const isAnthropicThinkingEnabled = isAnthropicModel && isThinkingEnabled;
23046
23074
  const inferenceConfig = {
23047
23075
  ...maxOutputTokens != null && { maxTokens: maxOutputTokens },
@@ -23068,12 +23096,13 @@ var init_dist3 = __esm({
23068
23096
  bedrockOptions.additionalModelRequestFields = {
23069
23097
  ...bedrockOptions.additionalModelRequestFields,
23070
23098
  thinking: {
23071
- type: "adaptive"
23099
+ type: "adaptive",
23100
+ ...thinkingDisplay != null && { display: thinkingDisplay }
23072
23101
  }
23073
23102
  };
23074
23103
  }
23075
23104
  } else if (!isAnthropicModel) {
23076
- if (((_g = bedrockOptions.reasoningConfig) == null ? void 0 : _g.budgetTokens) != null) {
23105
+ if (((_h = bedrockOptions.reasoningConfig) == null ? void 0 : _h.budgetTokens) != null) {
23077
23106
  warnings.push({
23078
23107
  type: "unsupported",
23079
23108
  feature: "budgetTokens",
@@ -23088,14 +23117,14 @@ var init_dist3 = __esm({
23088
23117
  });
23089
23118
  }
23090
23119
  }
23091
- const maxReasoningEffort = (_h = bedrockOptions.reasoningConfig) == null ? void 0 : _h.maxReasoningEffort;
23120
+ const maxReasoningEffort = (_i = bedrockOptions.reasoningConfig) == null ? void 0 : _i.maxReasoningEffort;
23092
23121
  const isOpenAIModel = this.modelId.startsWith("openai.");
23093
23122
  if (maxReasoningEffort != null) {
23094
23123
  if (isAnthropicModel) {
23095
23124
  bedrockOptions.additionalModelRequestFields = {
23096
23125
  ...bedrockOptions.additionalModelRequestFields,
23097
23126
  output_config: {
23098
- ...(_i = bedrockOptions.additionalModelRequestFields) == null ? void 0 : _i.output_config,
23127
+ ...(_j = bedrockOptions.additionalModelRequestFields) == null ? void 0 : _j.output_config,
23099
23128
  effort: maxReasoningEffort
23100
23129
  }
23101
23130
  };
@@ -23119,7 +23148,7 @@ var init_dist3 = __esm({
23119
23148
  bedrockOptions.additionalModelRequestFields = {
23120
23149
  ...bedrockOptions.additionalModelRequestFields,
23121
23150
  output_config: {
23122
- ...(_j = bedrockOptions.additionalModelRequestFields) == null ? void 0 : _j.output_config,
23151
+ ...(_k = bedrockOptions.additionalModelRequestFields) == null ? void 0 : _k.output_config,
23123
23152
  format: {
23124
23153
  type: "json_schema",
23125
23154
  schema: responseFormat.schema
@@ -23151,7 +23180,7 @@ var init_dist3 = __esm({
23151
23180
  details: "topK is not supported when thinking is enabled"
23152
23181
  });
23153
23182
  }
23154
- const hasAnyTools = ((_l = (_k = toolConfig.tools) == null ? void 0 : _k.length) != null ? _l : 0) > 0 || additionalTools;
23183
+ const hasAnyTools = ((_m = (_l = toolConfig.tools) == null ? void 0 : _l.length) != null ? _m : 0) > 0 || additionalTools;
23155
23184
  let filteredPrompt = prompt;
23156
23185
  if (!hasAnyTools) {
23157
23186
  const hasToolContent = prompt.some(
@@ -23246,7 +23275,7 @@ var init_dist3 = __esm({
23246
23275
  const content = [];
23247
23276
  let isJsonResponseFromTool = false;
23248
23277
  for (const part of response.output.message.content) {
23249
- if (part.text) {
23278
+ if (part.text != null) {
23250
23279
  content.push({ type: "text", text: part.text });
23251
23280
  }
23252
23281
  if (part.reasoningContent) {
@@ -23540,6 +23569,13 @@ var init_dist3 = __esm({
23540
23569
  delta: reasoningContent.text
23541
23570
  });
23542
23571
  } else if ("signature" in reasoningContent && reasoningContent.signature) {
23572
+ if (contentBlocks[blockIndex] == null) {
23573
+ contentBlocks[blockIndex] = { type: "reasoning" };
23574
+ controller.enqueue({
23575
+ type: "reasoning-start",
23576
+ id: String(blockIndex)
23577
+ });
23578
+ }
23543
23579
  controller.enqueue({
23544
23580
  type: "reasoning-delta",
23545
23581
  id: String(blockIndex),
@@ -23551,6 +23587,13 @@ var init_dist3 = __esm({
23551
23587
  }
23552
23588
  });
23553
23589
  } else if ("data" in reasoningContent && reasoningContent.data) {
23590
+ if (contentBlocks[blockIndex] == null) {
23591
+ contentBlocks[blockIndex] = { type: "reasoning" };
23592
+ controller.enqueue({
23593
+ type: "reasoning-start",
23594
+ id: String(blockIndex)
23595
+ });
23596
+ }
23554
23597
  controller.enqueue({
23555
23598
  type: "reasoning-delta",
23556
23599
  id: String(blockIndex),
@@ -23655,7 +23698,7 @@ var init_dist3 = __esm({
23655
23698
  BedrockToolUseSchema = external_exports.object({
23656
23699
  toolUseId: external_exports.string(),
23657
23700
  name: external_exports.string(),
23658
- input: external_exports.unknown()
23701
+ input: external_exports.unknown().optional()
23659
23702
  });
23660
23703
  BedrockReasoningTextSchema = external_exports.object({
23661
23704
  signature: external_exports.string().nullish(),
@@ -23750,10 +23793,6 @@ var init_dist3 = __esm({
23750
23793
  throttlingException: external_exports.record(external_exports.string(), external_exports.unknown()).nullish(),
23751
23794
  validationException: external_exports.record(external_exports.string(), external_exports.unknown()).nullish()
23752
23795
  });
23753
- bedrockReasoningMetadataSchema = external_exports.object({
23754
- signature: external_exports.string().optional(),
23755
- redactedData: external_exports.string().optional()
23756
- });
23757
23796
  amazonBedrockEmbeddingModelOptionsSchema = external_exports.object({
23758
23797
  /**
23759
23798
  * The number of dimensions the resulting output embeddings should have (defaults to 1024).
@@ -24113,7 +24152,7 @@ var init_dist3 = __esm({
24113
24152
  details: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
24114
24153
  preview: external_exports.unknown().optional()
24115
24154
  });
24116
- VERSION2 = true ? "4.0.89" : "0.0.0-test";
24155
+ VERSION2 = true ? "4.0.101" : "0.0.0-test";
24117
24156
  bedrockRerankingResponseSchema = lazySchema(
24118
24157
  () => zodSchema(
24119
24158
  external_exports.object({
@@ -28132,7 +28171,8 @@ var init_common = __esm({
28132
28171
  pattern: external_exports2.string().describe("AST pattern to search for. Use $NAME for variable names, $$$PARAMS for parameter lists, etc."),
28133
28172
  path: external_exports2.string().optional().default(".").describe("Path to search in"),
28134
28173
  language: external_exports2.string().optional().default("rust").describe("Programming language to use for parsing"),
28135
- allow_tests: external_exports2.boolean().optional().default(true).describe("Allow test files in search results")
28174
+ allow_tests: external_exports2.boolean().optional().default(true).describe("Allow test files in search results"),
28175
+ with_context: external_exports2.boolean().optional().default(false).describe("Include owning source-block context in JSON output")
28136
28176
  });
28137
28177
  extractSchema = external_exports2.object({
28138
28178
  targets: external_exports2.string().optional().describe('File paths or symbols to extract from. Formats: "file.js" (whole file), "file.js:42" (line 42), "file.js:10-20" (lines 10-20), "file.js#funcName" (symbol). Multiple targets separated by spaces.'),
@@ -28682,13 +28722,15 @@ var require_brace_expansion = __commonJS({
28682
28722
  parts.push.apply(parts, p);
28683
28723
  return parts;
28684
28724
  }
28685
- function expandTop(str) {
28725
+ function expandTop(str, options) {
28686
28726
  if (!str)
28687
28727
  return [];
28728
+ options = options || {};
28729
+ var max = options.max == null ? Infinity : options.max;
28688
28730
  if (str.substr(0, 2) === "{}") {
28689
28731
  str = "\\{\\}" + str.substr(2);
28690
28732
  }
28691
- return expand2(escapeBraces(str), true).map(unescapeBraces);
28733
+ return expand2(escapeBraces(str), max, true).map(unescapeBraces);
28692
28734
  }
28693
28735
  function embrace(str) {
28694
28736
  return "{" + str + "}";
@@ -28702,14 +28744,14 @@ var require_brace_expansion = __commonJS({
28702
28744
  function gte(i, y) {
28703
28745
  return i >= y;
28704
28746
  }
28705
- function expand2(str, isTop) {
28747
+ function expand2(str, max, isTop) {
28706
28748
  var expansions = [];
28707
28749
  var m = balanced("{", "}", str);
28708
28750
  if (!m) return [str];
28709
28751
  var pre = m.pre;
28710
- var post = m.post.length ? expand2(m.post, false) : [""];
28752
+ var post = m.post.length ? expand2(m.post, max, false) : [""];
28711
28753
  if (/\$$/.test(m.pre)) {
28712
- for (var k = 0; k < post.length; k++) {
28754
+ for (var k = 0; k < post.length && k < max; k++) {
28713
28755
  var expansion = pre + "{" + m.body + "}" + post[k];
28714
28756
  expansions.push(expansion);
28715
28757
  }
@@ -28721,7 +28763,7 @@ var require_brace_expansion = __commonJS({
28721
28763
  if (!isSequence && !isOptions) {
28722
28764
  if (m.post.match(/,(?!,).*\}/)) {
28723
28765
  str = m.pre + "{" + m.body + escClose + m.post;
28724
- return expand2(str);
28766
+ return expand2(str, max, true);
28725
28767
  }
28726
28768
  return [str];
28727
28769
  }
@@ -28731,7 +28773,7 @@ var require_brace_expansion = __commonJS({
28731
28773
  } else {
28732
28774
  n = parseCommaParts(m.body);
28733
28775
  if (n.length === 1) {
28734
- n = expand2(n[0], false).map(embrace);
28776
+ n = expand2(n[0], max, false).map(embrace);
28735
28777
  if (n.length === 1) {
28736
28778
  return post.map(function(p) {
28737
28779
  return m.pre + n[0] + p;
@@ -28777,11 +28819,11 @@ var require_brace_expansion = __commonJS({
28777
28819
  } else {
28778
28820
  N = [];
28779
28821
  for (var j = 0; j < n.length; j++) {
28780
- N.push.apply(N, expand2(n[j], false));
28822
+ N.push.apply(N, expand2(n[j], max, false));
28781
28823
  }
28782
28824
  }
28783
28825
  for (var j = 0; j < N.length; j++) {
28784
- for (var k = 0; k < post.length; k++) {
28826
+ for (var k = 0; k < post.length && expansions.length < max; k++) {
28785
28827
  var expansion = pre + N[j] + post[k];
28786
28828
  if (!isTop || isSequence || expansion)
28787
28829
  expansions.push(expansion);
@@ -69401,6 +69443,9 @@ var require_utils = __commonJS({
69401
69443
  "use strict";
69402
69444
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
69403
69445
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
69446
+ var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
69447
+ var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
69448
+ var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
69404
69449
  function stringArrayToHexStripped(input) {
69405
69450
  let acc = "";
69406
69451
  let code = 0;
@@ -69593,27 +69638,77 @@ var require_utils = __commonJS({
69593
69638
  }
69594
69639
  return output.join("");
69595
69640
  }
69596
- function normalizeComponentEncoding(component, esc2) {
69597
- const func = esc2 !== true ? escape : unescape;
69598
- if (component.scheme !== void 0) {
69599
- component.scheme = func(component.scheme);
69600
- }
69601
- if (component.userinfo !== void 0) {
69602
- component.userinfo = func(component.userinfo);
69603
- }
69604
- if (component.host !== void 0) {
69605
- component.host = func(component.host);
69641
+ var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
69642
+ var HOST_DELIM_RE = /[@/?#:]/g;
69643
+ var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
69644
+ function reescapeHostDelimiters(host, isIP) {
69645
+ const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
69646
+ re.lastIndex = 0;
69647
+ return host.replace(re, (ch) => HOST_DELIMS[ch]);
69648
+ }
69649
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
69650
+ if (input.indexOf("%") === -1) {
69651
+ return input;
69606
69652
  }
69607
- if (component.path !== void 0) {
69608
- component.path = func(component.path);
69653
+ let output = "";
69654
+ for (let i = 0; i < input.length; i++) {
69655
+ if (input[i] === "%" && i + 2 < input.length) {
69656
+ const hex = input.slice(i + 1, i + 3);
69657
+ if (isHexPair(hex)) {
69658
+ const normalizedHex = hex.toUpperCase();
69659
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
69660
+ if (decodeUnreserved && isUnreserved(decoded)) {
69661
+ output += decoded;
69662
+ } else {
69663
+ output += "%" + normalizedHex;
69664
+ }
69665
+ i += 2;
69666
+ continue;
69667
+ }
69668
+ }
69669
+ output += input[i];
69609
69670
  }
69610
- if (component.query !== void 0) {
69611
- component.query = func(component.query);
69671
+ return output;
69672
+ }
69673
+ function normalizePathEncoding(input) {
69674
+ let output = "";
69675
+ for (let i = 0; i < input.length; i++) {
69676
+ if (input[i] === "%" && i + 2 < input.length) {
69677
+ const hex = input.slice(i + 1, i + 3);
69678
+ if (isHexPair(hex)) {
69679
+ const normalizedHex = hex.toUpperCase();
69680
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
69681
+ if (decoded !== "." && isUnreserved(decoded)) {
69682
+ output += decoded;
69683
+ } else {
69684
+ output += "%" + normalizedHex;
69685
+ }
69686
+ i += 2;
69687
+ continue;
69688
+ }
69689
+ }
69690
+ if (isPathCharacter(input[i])) {
69691
+ output += input[i];
69692
+ } else {
69693
+ output += escape(input[i]);
69694
+ }
69612
69695
  }
69613
- if (component.fragment !== void 0) {
69614
- component.fragment = func(component.fragment);
69696
+ return output;
69697
+ }
69698
+ function escapePreservingEscapes(input) {
69699
+ let output = "";
69700
+ for (let i = 0; i < input.length; i++) {
69701
+ if (input[i] === "%" && i + 2 < input.length) {
69702
+ const hex = input.slice(i + 1, i + 3);
69703
+ if (isHexPair(hex)) {
69704
+ output += "%" + hex.toUpperCase();
69705
+ i += 2;
69706
+ continue;
69707
+ }
69708
+ }
69709
+ output += escape(input[i]);
69615
69710
  }
69616
- return component;
69711
+ return output;
69617
69712
  }
69618
69713
  function recomposeAuthority(component) {
69619
69714
  const uriTokens = [];
@@ -69628,7 +69723,7 @@ var require_utils = __commonJS({
69628
69723
  if (ipV6res.isIPV6 === true) {
69629
69724
  host = `[${ipV6res.escapedHost}]`;
69630
69725
  } else {
69631
- host = component.host;
69726
+ host = reescapeHostDelimiters(host, false);
69632
69727
  }
69633
69728
  }
69634
69729
  uriTokens.push(host);
@@ -69642,7 +69737,10 @@ var require_utils = __commonJS({
69642
69737
  module2.exports = {
69643
69738
  nonSimpleDomain,
69644
69739
  recomposeAuthority,
69645
- normalizeComponentEncoding,
69740
+ reescapeHostDelimiters,
69741
+ normalizePercentEncoding,
69742
+ normalizePathEncoding,
69743
+ escapePreservingEscapes,
69646
69744
  removeDotSegments,
69647
69745
  isIPv4,
69648
69746
  isUUID,
@@ -69866,12 +69964,12 @@ var require_schemes = __commonJS({
69866
69964
  var require_fast_uri = __commonJS({
69867
69965
  "node_modules/fast-uri/index.js"(exports2, module2) {
69868
69966
  "use strict";
69869
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
69967
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
69870
69968
  var { SCHEMES, getSchemeHandler } = require_schemes();
69871
69969
  function normalize4(uri, options) {
69872
69970
  if (typeof uri === "string") {
69873
69971
  uri = /** @type {T} */
69874
- serialize(parse11(uri, options), options);
69972
+ normalizeString(uri, options);
69875
69973
  } else if (typeof uri === "object") {
69876
69974
  uri = /** @type {T} */
69877
69975
  parse11(serialize(uri, options), options);
@@ -69938,19 +70036,9 @@ var require_fast_uri = __commonJS({
69938
70036
  return target;
69939
70037
  }
69940
70038
  function equal(uriA, uriB, options) {
69941
- if (typeof uriA === "string") {
69942
- uriA = unescape(uriA);
69943
- uriA = serialize(normalizeComponentEncoding(parse11(uriA, options), true), { ...options, skipEscape: true });
69944
- } else if (typeof uriA === "object") {
69945
- uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
69946
- }
69947
- if (typeof uriB === "string") {
69948
- uriB = unescape(uriB);
69949
- uriB = serialize(normalizeComponentEncoding(parse11(uriB, options), true), { ...options, skipEscape: true });
69950
- } else if (typeof uriB === "object") {
69951
- uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
69952
- }
69953
- return uriA.toLowerCase() === uriB.toLowerCase();
70039
+ const normalizedA = normalizeComparableURI(uriA, options);
70040
+ const normalizedB = normalizeComparableURI(uriB, options);
70041
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
69954
70042
  }
69955
70043
  function serialize(cmpts, opts) {
69956
70044
  const component = {
@@ -69975,12 +70063,12 @@ var require_fast_uri = __commonJS({
69975
70063
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
69976
70064
  if (component.path !== void 0) {
69977
70065
  if (!options.skipEscape) {
69978
- component.path = escape(component.path);
70066
+ component.path = escapePreservingEscapes(component.path);
69979
70067
  if (component.scheme !== void 0) {
69980
70068
  component.path = component.path.split("%3A").join(":");
69981
70069
  }
69982
70070
  } else {
69983
- component.path = unescape(component.path);
70071
+ component.path = normalizePercentEncoding(component.path);
69984
70072
  }
69985
70073
  }
69986
70074
  if (options.reference !== "suffix" && component.scheme) {
@@ -70015,7 +70103,16 @@ var require_fast_uri = __commonJS({
70015
70103
  return uriTokens.join("");
70016
70104
  }
70017
70105
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
70018
- function parse11(uri, opts) {
70106
+ function getParseError(parsed, matches) {
70107
+ if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
70108
+ return 'URI path must start with "/" when authority is present.';
70109
+ }
70110
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
70111
+ return "URI port is malformed.";
70112
+ }
70113
+ return void 0;
70114
+ }
70115
+ function parseWithStatus(uri, opts) {
70019
70116
  const options = Object.assign({}, opts);
70020
70117
  const parsed = {
70021
70118
  scheme: void 0,
@@ -70026,6 +70123,7 @@ var require_fast_uri = __commonJS({
70026
70123
  query: void 0,
70027
70124
  fragment: void 0
70028
70125
  };
70126
+ let malformedAuthorityOrPort = false;
70029
70127
  let isIP = false;
70030
70128
  if (options.reference === "suffix") {
70031
70129
  if (options.scheme) {
@@ -70046,6 +70144,11 @@ var require_fast_uri = __commonJS({
70046
70144
  if (isNaN(parsed.port)) {
70047
70145
  parsed.port = matches[5];
70048
70146
  }
70147
+ const parseError = getParseError(parsed, matches);
70148
+ if (parseError !== void 0) {
70149
+ parsed.error = parsed.error || parseError;
70150
+ malformedAuthorityOrPort = true;
70151
+ }
70049
70152
  if (parsed.host) {
70050
70153
  const ipv4result = isIPv4(parsed.host);
70051
70154
  if (ipv4result === false) {
@@ -70084,14 +70187,18 @@ var require_fast_uri = __commonJS({
70084
70187
  parsed.scheme = unescape(parsed.scheme);
70085
70188
  }
70086
70189
  if (parsed.host !== void 0) {
70087
- parsed.host = unescape(parsed.host);
70190
+ parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
70088
70191
  }
70089
70192
  }
70090
70193
  if (parsed.path) {
70091
- parsed.path = escape(unescape(parsed.path));
70194
+ parsed.path = normalizePathEncoding(parsed.path);
70092
70195
  }
70093
70196
  if (parsed.fragment) {
70094
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
70197
+ try {
70198
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
70199
+ } catch {
70200
+ parsed.error = parsed.error || "URI malformed";
70201
+ }
70095
70202
  }
70096
70203
  }
70097
70204
  if (schemeHandler && schemeHandler.parse) {
@@ -70100,7 +70207,29 @@ var require_fast_uri = __commonJS({
70100
70207
  } else {
70101
70208
  parsed.error = parsed.error || "URI can not be parsed.";
70102
70209
  }
70103
- return parsed;
70210
+ return { parsed, malformedAuthorityOrPort };
70211
+ }
70212
+ function parse11(uri, opts) {
70213
+ return parseWithStatus(uri, opts).parsed;
70214
+ }
70215
+ function normalizeString(uri, opts) {
70216
+ return normalizeStringWithStatus(uri, opts).normalized;
70217
+ }
70218
+ function normalizeStringWithStatus(uri, opts) {
70219
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
70220
+ return {
70221
+ normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
70222
+ malformedAuthorityOrPort
70223
+ };
70224
+ }
70225
+ function normalizeComparableURI(uri, opts) {
70226
+ if (typeof uri === "string") {
70227
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
70228
+ return malformedAuthorityOrPort ? void 0 : normalized;
70229
+ }
70230
+ if (typeof uri === "object") {
70231
+ return serialize(uri, opts);
70232
+ }
70104
70233
  }
70105
70234
  var fastUri = {
70106
70235
  SCHEMES,
@@ -70240,7 +70369,7 @@ var require_core = __commonJS({
70240
70369
  constructor(opts = {}) {
70241
70370
  this.schemas = {};
70242
70371
  this.refs = {};
70243
- this.formats = {};
70372
+ this.formats = /* @__PURE__ */ Object.create(null);
70244
70373
  this._compilations = /* @__PURE__ */ new Set();
70245
70374
  this._loading = {};
70246
70375
  this._cache = /* @__PURE__ */ new Map();
@@ -76007,6 +76136,8 @@ var require_Alias = __commonJS({
76007
76136
  * instance of the `source` anchor before this node.
76008
76137
  */
76009
76138
  resolve(doc, ctx) {
76139
+ if (ctx?.maxAliasCount === 0)
76140
+ throw new ReferenceError("Alias resolution is disabled");
76010
76141
  let nodes;
76011
76142
  if (ctx?.aliasResolveCache) {
76012
76143
  nodes = ctx.aliasResolveCache;
@@ -77079,18 +77210,18 @@ var require_merge2 = __commonJS({
77079
77210
  };
77080
77211
  var isMergeKey = (ctx, key) => (merge2.identify(key) || identity2.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
77081
77212
  function addMergeToJSMap(ctx, map3, value) {
77082
- value = ctx && identity2.isAlias(value) ? value.resolve(ctx.doc) : value;
77083
- if (identity2.isSeq(value))
77084
- for (const it of value.items)
77213
+ const source = resolveAliasValue(ctx, value);
77214
+ if (identity2.isSeq(source))
77215
+ for (const it of source.items)
77085
77216
  mergeValue(ctx, map3, it);
77086
- else if (Array.isArray(value))
77087
- for (const it of value)
77217
+ else if (Array.isArray(source))
77218
+ for (const it of source)
77088
77219
  mergeValue(ctx, map3, it);
77089
77220
  else
77090
- mergeValue(ctx, map3, value);
77221
+ mergeValue(ctx, map3, source);
77091
77222
  }
77092
77223
  function mergeValue(ctx, map3, value) {
77093
- const source = ctx && identity2.isAlias(value) ? value.resolve(ctx.doc) : value;
77224
+ const source = resolveAliasValue(ctx, value);
77094
77225
  if (!identity2.isMap(source))
77095
77226
  throw new Error("Merge sources must be maps or map aliases");
77096
77227
  const srcMap = source.toJSON(null, ctx, Map);
@@ -77111,6 +77242,9 @@ var require_merge2 = __commonJS({
77111
77242
  }
77112
77243
  return map3;
77113
77244
  }
77245
+ function resolveAliasValue(ctx, value) {
77246
+ return ctx && identity2.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
77247
+ }
77114
77248
  exports2.addMergeToJSMap = addMergeToJSMap;
77115
77249
  exports2.isMergeKey = isMergeKey;
77116
77250
  exports2.merge = merge2;
@@ -77748,7 +77882,7 @@ var require_stringifyNumber = __commonJS({
77748
77882
  if (!isFinite(num))
77749
77883
  return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
77750
77884
  let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
77751
- if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) {
77885
+ if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
77752
77886
  let i = n.indexOf(".");
77753
77887
  if (i < 0) {
77754
77888
  i = n.length;
@@ -80120,7 +80254,7 @@ var require_resolve_flow_scalar = __commonJS({
80120
80254
  while (next === " " || next === " ")
80121
80255
  next = source[++i + 1];
80122
80256
  } else if (next === "x" || next === "u" || next === "U") {
80123
- const length = { x: 2, u: 4, U: 8 }[next];
80257
+ const length = next === "x" ? 2 : next === "u" ? 4 : 8;
80124
80258
  res += parseCharCode(source, i + 1, length, onError);
80125
80259
  i += length;
80126
80260
  } else {
@@ -80195,12 +80329,13 @@ var require_resolve_flow_scalar = __commonJS({
80195
80329
  const cc2 = source.substr(offset2, length);
80196
80330
  const ok = cc2.length === length && /^[0-9a-fA-F]+$/.test(cc2);
80197
80331
  const code = ok ? parseInt(cc2, 16) : NaN;
80198
- if (isNaN(code)) {
80332
+ try {
80333
+ return String.fromCodePoint(code);
80334
+ } catch {
80199
80335
  const raw = source.substr(offset2 - 2, length + 2);
80200
80336
  onError(offset2 - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
80201
80337
  return raw;
80202
80338
  }
80203
- return String.fromCodePoint(code);
80204
80339
  }
80205
80340
  exports2.resolveFlowScalar = resolveFlowScalar;
80206
80341
  }
@@ -103526,9 +103661,16 @@ function autoQuoteSearchTerms(query2) {
103526
103661
  return result.join(" ");
103527
103662
  }
103528
103663
  async function checkDelegateDedup(newQuery, previousQueries, model, debug) {
103529
- if (!model || previousQueries.length === 0) {
103664
+ if (previousQueries.length === 0) {
103530
103665
  return { action: "allow", reason: "no previous queries" };
103531
103666
  }
103667
+ if (!model) {
103668
+ return {
103669
+ action: "allow",
103670
+ reason: "dedup model unavailable",
103671
+ error: "dedup_model_unavailable"
103672
+ };
103673
+ }
103532
103674
  const previousList = previousQueries.map((q, i) => {
103533
103675
  let line = `${i + 1}. "${q.query}" (path: ${q.path}, found results: ${q.hadResults})`;
103534
103676
  if (q.reason) line += `
@@ -103584,11 +103726,18 @@ Examples:
103584
103726
  return { action: "block", reason: parts[1]?.trim() || "duplicate query" };
103585
103727
  } else if (action === "rewrite" && parts[2]) {
103586
103728
  return { action: "rewrite", reason: parts[1]?.trim() || "refined query", rewritten: parts[2].trim() };
103729
+ } else if (action === "allow") {
103730
+ return { action: "allow", reason: parts[1]?.trim() || "new concept" };
103587
103731
  }
103588
- return { action: "allow", reason: parts[1]?.trim() || "new concept" };
103732
+ return {
103733
+ action: "allow",
103734
+ reason: "dedup returned unparseable response",
103735
+ error: `unexpected_response:${line.slice(0, 200)}`
103736
+ };
103589
103737
  } catch (err) {
103590
- if (debug) console.error("[DEDUP-LLM] Error:", err.message);
103591
- return { action: "allow", reason: "dedup check failed, allowing" };
103738
+ const errorMessage = err instanceof Error ? `${err.name}: ${err.message}` : String(err);
103739
+ if (debug) console.error("[DEDUP-LLM] Error:", errorMessage);
103740
+ return { action: "allow", reason: "dedup check failed", error: errorMessage };
103592
103741
  }
103593
103742
  }
103594
103743
  function normalizeTargets(targets) {
@@ -104030,9 +104179,9 @@ Change your strategy:${scopeHint}
104030
104179
  const delegatePath = searchPath || "";
104031
104180
  let effectiveQuery = searchQuery;
104032
104181
  if (previousDelegations.length > 0) {
104182
+ const dedupProvider = options.searchDelegateProvider || process.env.PROBE_SEARCH_DELEGATE_PROVIDER || options.provider || process.env.FORCE_PROVIDER || null;
104183
+ const dedupModelName = options.searchDelegateModel || process.env.PROBE_SEARCH_DELEGATE_MODEL || options.model || process.env.MODEL_NAME || null;
104033
104184
  if (cachedDedupModel === void 0) {
104034
- const dedupProvider = options.searchDelegateProvider || process.env.PROBE_SEARCH_DELEGATE_PROVIDER || options.provider || process.env.FORCE_PROVIDER || null;
104035
- const dedupModelName = options.searchDelegateModel || process.env.PROBE_SEARCH_DELEGATE_MODEL || options.model || process.env.MODEL_NAME || null;
104036
104185
  if (debug) {
104037
104186
  console.error(`[DEDUP-LLM] Creating model: provider=${dedupProvider}, model=${dedupModelName}`);
104038
104187
  }
@@ -104044,7 +104193,10 @@ Change your strategy:${scopeHint}
104044
104193
  const dedupSpanAttrs = {
104045
104194
  "dedup.query": searchQuery,
104046
104195
  "dedup.previous_count": String(previousDelegations.length),
104047
- "dedup.previous_queries": previousDelegations.map((d) => d.query).join(" | ")
104196
+ "dedup.previous_queries": previousDelegations.map((d) => d.query).join(" | "),
104197
+ "dedup.provider": dedupProvider || "",
104198
+ "dedup.model": dedupModelName || "",
104199
+ "dedup.model_available": cachedDedupModel ? "true" : "false"
104048
104200
  };
104049
104201
  const dedup = options.tracer?.withSpan ? await options.tracer.withSpan("search.delegate.dedup", async () => {
104050
104202
  return await checkDelegateDedup(searchQuery, previousDelegations, cachedDedupModel, debug);
@@ -104052,7 +104204,8 @@ Change your strategy:${scopeHint}
104052
104204
  span.setAttributes({
104053
104205
  "dedup.action": result.action,
104054
104206
  "dedup.reason": result.reason || "",
104055
- "dedup.rewritten": result.rewritten || ""
104207
+ "dedup.rewritten": result.rewritten || "",
104208
+ "dedup.error": result.error || ""
104056
104209
  });
104057
104210
  }) : await checkDelegateDedup(searchQuery, previousDelegations, cachedDedupModel, debug);
104058
104211
  if (debug) {
@@ -104194,7 +104347,7 @@ Do NOT search for analogies or loosely related concepts. If the feature does not
104194
104347
  name: "query",
104195
104348
  description: queryDescription,
104196
104349
  inputSchema: querySchema,
104197
- execute: async ({ pattern, path: path9, language, allow_tests }) => {
104350
+ execute: async ({ pattern, path: path9, language, allow_tests, with_context }) => {
104198
104351
  try {
104199
104352
  let queryPaths;
104200
104353
  if (path9) {
@@ -104214,6 +104367,7 @@ Do NOT search for analogies or loosely related concepts. If the feature does not
104214
104367
  // Working directory for resolving relative paths
104215
104368
  language,
104216
104369
  allowTests: allow_tests ?? true,
104370
+ withContext: with_context ?? false,
104217
104371
  json: false
104218
104372
  });
104219
104373
  return results;