@proxysoul/soulforge 1.8.3 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22791,7 +22791,8 @@ var init_tree_sitter2 = __esm(() => {
22791
22791
  location: {
22792
22792
  file: resolve3(file),
22793
22793
  line: node.startPosition.row + 1,
22794
- column: node.startPosition.column + 1
22794
+ column: node.startPosition.column + 1,
22795
+ endLine: node.endPosition.row + 1
22795
22796
  }
22796
22797
  });
22797
22798
  }
@@ -22830,7 +22831,8 @@ var init_tree_sitter2 = __esm(() => {
22830
22831
  location: {
22831
22832
  file: resolve3(file),
22832
22833
  line: node.startPosition.row + 1,
22833
- column: node.startPosition.column + 1
22834
+ column: node.startPosition.column + 1,
22835
+ endLine: node.endPosition.row + 1
22834
22836
  }
22835
22837
  });
22836
22838
  }
@@ -22887,7 +22889,8 @@ var init_tree_sitter2 = __esm(() => {
22887
22889
  location: {
22888
22890
  file: resolve3(file),
22889
22891
  line: node.startPosition.row + 1,
22890
- column: node.startPosition.column + 1
22892
+ column: node.startPosition.column + 1,
22893
+ endLine: node.endPosition.row + 1
22891
22894
  }
22892
22895
  });
22893
22896
  }
@@ -22907,7 +22910,8 @@ var init_tree_sitter2 = __esm(() => {
22907
22910
  location: {
22908
22911
  file: resolve3(file),
22909
22912
  line: node.startPosition.row + 1,
22910
- column: node.startPosition.column + 1
22913
+ column: node.startPosition.column + 1,
22914
+ endLine: node.endPosition.row + 1
22911
22915
  }
22912
22916
  });
22913
22917
  }
@@ -22959,7 +22963,8 @@ var init_tree_sitter2 = __esm(() => {
22959
22963
  location: {
22960
22964
  file: absFile,
22961
22965
  line: node.startPosition.row + 1,
22962
- column: node.startPosition.column + 1
22966
+ column: node.startPosition.column + 1,
22967
+ endLine: node.endPosition.row + 1
22963
22968
  }
22964
22969
  });
22965
22970
  continue;
@@ -22987,7 +22992,8 @@ var init_tree_sitter2 = __esm(() => {
22987
22992
  location: {
22988
22993
  file: absFile,
22989
22994
  line: node.startPosition.row + 1,
22990
- column: node.startPosition.column + 1
22995
+ column: node.startPosition.column + 1,
22996
+ endLine: node.endPosition.row + 1
22991
22997
  }
22992
22998
  });
22993
22999
  }
@@ -23013,7 +23019,8 @@ var init_tree_sitter2 = __esm(() => {
23013
23019
  location: {
23014
23020
  file: absFile,
23015
23021
  line: node.startPosition.row + 1,
23016
- column: node.startPosition.column + 1
23022
+ column: node.startPosition.column + 1,
23023
+ endLine: node.endPosition.row + 1
23017
23024
  }
23018
23025
  });
23019
23026
  }
@@ -23030,7 +23037,8 @@ var init_tree_sitter2 = __esm(() => {
23030
23037
  location: {
23031
23038
  file: absFile,
23032
23039
  line: node.startPosition.row + 1,
23033
- column: node.startPosition.column + 1
23040
+ column: node.startPosition.column + 1,
23041
+ endLine: node.endPosition.row + 1
23034
23042
  }
23035
23043
  });
23036
23044
  }
@@ -23047,7 +23055,8 @@ var init_tree_sitter2 = __esm(() => {
23047
23055
  location: {
23048
23056
  file: absFile,
23049
23057
  line: node.startPosition.row + 1,
23050
- column: node.startPosition.column + 1
23058
+ column: node.startPosition.column + 1,
23059
+ endLine: node.endPosition.row + 1
23051
23060
  }
23052
23061
  });
23053
23062
  }
@@ -23117,7 +23126,8 @@ var init_tree_sitter2 = __esm(() => {
23117
23126
  location: {
23118
23127
  file: absFile,
23119
23128
  line: sourceCapture.node.startPosition.row + 1,
23120
- column: sourceCapture.node.startPosition.column + 1
23129
+ column: sourceCapture.node.startPosition.column + 1,
23130
+ endLine: sourceCapture.node.endPosition.row + 1
23121
23131
  }
23122
23132
  });
23123
23133
  }
@@ -26186,7 +26196,7 @@ class RepoMap {
26186
26196
  for (const s2 of syms)
26187
26197
  allSymbolNames.push(s2.name);
26188
26198
  }
26189
- const callerCounts = this.getCallerCounts(allSymbolNames);
26199
+ const callerDetails = this.getCallerDetails(allSymbolNames);
26190
26200
  const recentCutoff = Date.now() - 172800000;
26191
26201
  const reexportSources = new Map;
26192
26202
  const barrelIdSet = new Set;
@@ -26269,8 +26279,13 @@ class RepoMap {
26269
26279
  } else {
26270
26280
  display = rawSig ?? `${kindTag(sym.kind)}${sym.name}`;
26271
26281
  }
26272
- const callers = callerCounts.get(sym.name);
26273
- const callerBadge = callers && callers >= 10 ? ` [${String(callers)}\u2191]` : "";
26282
+ const callerInfo = callerDetails.get(sym.name);
26283
+ let callerBadge = "";
26284
+ if (callerInfo) {
26285
+ const names = callerInfo.topCallers.join(", ");
26286
+ const remaining = callerInfo.count - callerInfo.topCallers.length;
26287
+ callerBadge = remaining > 0 ? ` [${names}, +${String(remaining)}\u2191]` : ` [${names}]`;
26288
+ }
26274
26289
  symbolLines += ` ${exported}${display} :${String(sym.line)}${callerBadge}
26275
26290
  `;
26276
26291
  }
@@ -26511,7 +26526,7 @@ class RepoMap {
26511
26526
  return results;
26512
26527
  }
26513
26528
  getFileSymbols(relPath) {
26514
- return this.db.query(`SELECT s.name, s.kind, s.is_exported
26529
+ return this.db.query(`SELECT s.name, s.kind, s.is_exported, s.line, s.end_line
26515
26530
  FROM symbols s JOIN files f ON f.id = s.file_id
26516
26531
  WHERE f.path = ?
26517
26532
  AND s.kind IN ('interface','type','class','function','enum','method','constant')
@@ -26520,11 +26535,13 @@ class RepoMap {
26520
26535
  LIMIT 15`).all(relPath).map((r4) => ({
26521
26536
  name: r4.name,
26522
26537
  kind: r4.kind,
26523
- isExported: r4.is_exported === 1
26538
+ isExported: r4.is_exported === 1,
26539
+ line: r4.line,
26540
+ endLine: r4.end_line
26524
26541
  }));
26525
26542
  }
26526
26543
  getFileSymbolRanges(relPath) {
26527
- return this.db.query(`SELECT s.name, s.kind, s.line, s.end_line
26544
+ return this.db.query(`SELECT s.name, s.qualified_name, s.kind, s.line, s.end_line
26528
26545
  FROM symbols s JOIN files f ON f.id = s.file_id
26529
26546
  WHERE f.path = ?
26530
26547
  AND s.kind IN ('interface','type','class','function','enum','method','constant')
@@ -26532,6 +26549,7 @@ class RepoMap {
26532
26549
  ORDER BY s.line
26533
26550
  LIMIT 20`).all(relPath).map((r4) => ({
26534
26551
  name: r4.name,
26552
+ qualifiedName: r4.qualified_name,
26535
26553
  kind: r4.kind,
26536
26554
  line: r4.line,
26537
26555
  endLine: r4.end_line
@@ -26668,7 +26686,7 @@ class RepoMap {
26668
26686
  getUnusedExports(limit = 500) {
26669
26687
  if (!this.ready)
26670
26688
  return [];
26671
- const rows = this.db.query(`SELECT s.name, f.path, s.kind, f.line_count FROM symbols s
26689
+ const rows = this.db.query(`SELECT s.name, f.path, s.kind, s.line, s.end_line, f.line_count FROM symbols s
26672
26690
  JOIN files f ON f.id = s.file_id
26673
26691
  WHERE s.is_exported = 1
26674
26692
  AND NOT EXISTS (
@@ -26702,6 +26720,8 @@ class RepoMap {
26702
26720
  name: row.name,
26703
26721
  path: row.path,
26704
26722
  kind: row.kind,
26723
+ line: row.line,
26724
+ endLine: row.end_line,
26705
26725
  lineCount: row.line_count,
26706
26726
  usedInternally
26707
26727
  };
@@ -26710,7 +26730,7 @@ class RepoMap {
26710
26730
  getTestOnlyExports() {
26711
26731
  if (!this.ready)
26712
26732
  return [];
26713
- return this.db.query(`SELECT s.name, f.path, s.kind FROM symbols s
26733
+ return this.db.query(`SELECT s.name, f.path, s.kind, s.line, s.end_line FROM symbols s
26714
26734
  JOIN files f ON f.id = s.file_id
26715
26735
  WHERE s.is_exported = 1
26716
26736
  AND EXISTS (
@@ -26739,7 +26759,13 @@ class RepoMap {
26739
26759
  )
26740
26760
  AND rf.path NOT LIKE 'tests/%' AND rf.path NOT LIKE '%.test.%' AND rf.path NOT LIKE '%.spec.%' AND rf.path NOT LIKE '%/__tests__/%'
26741
26761
  )
26742
- ORDER BY f.path`).all();
26762
+ ORDER BY f.path`).all().map((r4) => ({
26763
+ name: r4.name,
26764
+ path: r4.path,
26765
+ kind: r4.kind,
26766
+ line: r4.line,
26767
+ endLine: r4.end_line
26768
+ }));
26743
26769
  }
26744
26770
  getDeadBarrels() {
26745
26771
  if (!this.ready)
@@ -26870,9 +26896,10 @@ class RepoMap {
26870
26896
  getNearDuplicates(threshold = 0.7, limit = 20) {
26871
26897
  if (!this.ready)
26872
26898
  return [];
26873
- const rows = this.db.query(`SELECT ts.name, f.path, ts.line, ts.end_line, ts.minhash
26899
+ const rows = this.db.query(`SELECT ts.name, COALESCE(s.kind, '') as kind, s.signature as sig, f.path, ts.line, ts.end_line, ts.minhash
26874
26900
  FROM token_signatures ts
26875
26901
  JOIN files f ON f.id = ts.file_id
26902
+ LEFT JOIN symbols s ON s.file_id = ts.file_id AND s.name = ts.name AND s.line = ts.line
26876
26903
  ORDER BY f.pagerank DESC
26877
26904
  LIMIT 500`).all();
26878
26905
  const pairs = [];
@@ -26884,6 +26911,7 @@ class RepoMap {
26884
26911
  new Uint8Array(copy.buffer).set(new Uint8Array(buf.buffer, buf.byteOffset, 512));
26885
26912
  return copy;
26886
26913
  };
26914
+ const TYPE_KINDS = new Set(["interface", "type", "enum"]);
26887
26915
  for (let i4 = 0;i4 < rows.length; i4++) {
26888
26916
  const a2 = rows[i4];
26889
26917
  const sigA = toSig(a2.minhash);
@@ -26891,9 +26919,30 @@ class RepoMap {
26891
26919
  const b3 = rows[j2];
26892
26920
  if (a2.path === b3.path && a2.line === b3.line)
26893
26921
  continue;
26922
+ if (a2.path === b3.path) {
26923
+ if (a2.line <= b3.line && a2.end_line >= b3.end_line)
26924
+ continue;
26925
+ if (b3.line <= a2.line && b3.end_line >= a2.end_line)
26926
+ continue;
26927
+ }
26928
+ if (TYPE_KINDS.has(a2.kind) && TYPE_KINDS.has(b3.kind))
26929
+ continue;
26930
+ if (a2.kind === "variable" && b3.kind === "variable" && a2.end_line - a2.line < 10 && b3.end_line - b3.line < 10)
26931
+ continue;
26894
26932
  const sigB = toSig(b3.minhash);
26895
26933
  const sim = jaccardSimilarity(sigA, sigB);
26896
26934
  if (sim >= threshold && sim < 1) {
26935
+ if (sim < 0.95 && a2.sig && b3.sig) {
26936
+ const tokA = new Set(a2.sig.toLowerCase().split(/[\s,(){}:;|&=<>]+/).filter(Boolean));
26937
+ const tokB = new Set(b3.sig.toLowerCase().split(/[\s,(){}:;|&=<>]+/).filter(Boolean));
26938
+ let shared = 0;
26939
+ for (const t of tokA)
26940
+ if (tokB.has(t))
26941
+ shared++;
26942
+ const sigSim = shared / Math.max(tokA.size, tokB.size);
26943
+ if (sigSim < 0.3)
26944
+ continue;
26945
+ }
26897
26946
  pairs.push({
26898
26947
  similarity: sim,
26899
26948
  a: {
@@ -27096,6 +27145,17 @@ class RepoMap {
27096
27145
  callLine: r4.call_line
27097
27146
  }));
27098
27147
  }
27148
+ getCalleesForSymbol(relPath, symbolName) {
27149
+ const rows = this.db.query(`SELECT DISTINCT c.callee_name
27150
+ FROM calls c
27151
+ JOIN symbols s ON s.id = c.caller_symbol_id
27152
+ JOIN files f ON f.id = s.file_id
27153
+ WHERE s.name = ? AND f.path = ?
27154
+ ORDER BY c.line`).all(symbolName, relPath);
27155
+ return rows.map((r4) => ({
27156
+ calleeName: r4.callee_name
27157
+ }));
27158
+ }
27099
27159
  getClassMembers(className) {
27100
27160
  const rows = this.db.query(`SELECT s.name, s.kind, s.line, s.end_line, s.signature, s.is_exported, s.qualified_name
27101
27161
  FROM symbols s
@@ -27150,6 +27210,41 @@ class RepoMap {
27150
27210
  result.set(r4.callee_name, r4.cnt);
27151
27211
  return result;
27152
27212
  }
27213
+ getCallerDetails(symbolNames) {
27214
+ if (symbolNames.length === 0)
27215
+ return new Map;
27216
+ const placeholders = symbolNames.map(() => "?").join(",");
27217
+ const rows = this.db.query(`SELECT c.callee_name, s.name as caller_name, COUNT(*) as cnt
27218
+ FROM calls c
27219
+ JOIN symbols s ON s.id = c.caller_symbol_id
27220
+ WHERE c.callee_name IN (${placeholders})
27221
+ GROUP BY c.callee_name, s.name
27222
+ ORDER BY c.callee_name, cnt DESC`).all(...symbolNames);
27223
+ const grouped = new Map;
27224
+ for (const r4 of rows) {
27225
+ let entry = grouped.get(r4.callee_name);
27226
+ if (!entry) {
27227
+ entry = {
27228
+ count: 0,
27229
+ callers: []
27230
+ };
27231
+ grouped.set(r4.callee_name, entry);
27232
+ }
27233
+ entry.count += r4.cnt;
27234
+ if (entry.callers.length < 3)
27235
+ entry.callers.push(r4.caller_name);
27236
+ }
27237
+ const result = new Map;
27238
+ for (const [name2, entry] of grouped) {
27239
+ if (entry.count >= 5) {
27240
+ result.set(name2, {
27241
+ count: entry.count,
27242
+ topCallers: entry.callers
27243
+ });
27244
+ }
27245
+ }
27246
+ return result;
27247
+ }
27153
27248
  getStats() {
27154
27249
  const files = this.db.query("SELECT COUNT(*) as c FROM files").get()?.c ?? 0;
27155
27250
  const symbols = this.db.query("SELECT COUNT(*) as c FROM symbols").get()?.c ?? 0;
@@ -28067,7 +28162,7 @@ var init_config = __esm(() => {
28067
28162
  format: true,
28068
28163
  syncEditorOnEdit: false
28069
28164
  },
28070
- codeExecution: false,
28165
+ codeExecution: true,
28071
28166
  webSearch: true,
28072
28167
  compaction: {
28073
28168
  strategy: "v2",
@@ -30832,7 +30927,9 @@ function flattenDocumentSymbols(raw2, file, query) {
30832
30927
  location: {
30833
30928
  file: uriToFilePath(si.location.uri),
30834
30929
  line: si.location.range.start.line + 1,
30835
- column: si.location.range.start.character + 1
30930
+ column: si.location.range.start.character + 1,
30931
+ endLine: si.location.range.end.line + 1,
30932
+ endColumn: si.location.range.end.character + 1
30836
30933
  },
30837
30934
  containerName: si.containerName
30838
30935
  };
@@ -271512,7 +271609,8 @@ class TsMorphBackend {
271512
271609
  location: {
271513
271610
  file: resolve6(file),
271514
271611
  line: imp.getStartLineNumber(),
271515
- column: 1
271612
+ column: 1,
271613
+ endLine: imp.getEndLineNumber()
271516
271614
  }
271517
271615
  };
271518
271616
  });
@@ -271544,7 +271642,8 @@ class TsMorphBackend {
271544
271642
  location: {
271545
271643
  file: resolve6(file),
271546
271644
  line: decl.getStartLineNumber(),
271547
- column: 1
271645
+ column: 1,
271646
+ endLine: decl.getEndLineNumber()
271548
271647
  }
271549
271648
  });
271550
271649
  }
@@ -272634,6 +272733,7 @@ var handlers = {
272634
272733
  getNearDuplicates: (threshold, limit) => requireRepoMap().getNearDuplicates(threshold, limit),
272635
272734
  getFileDuplicates: (relPath) => requireRepoMap().getFileDuplicates(relPath),
272636
272735
  getCallees: (symbolId) => requireRepoMap().getCallees(symbolId),
272736
+ getCalleesForSymbol: (relPath, symbolName) => requireRepoMap().getCalleesForSymbol(relPath, symbolName),
272637
272737
  getCallers: (name2, filePath) => requireRepoMap().getCallers(name2, filePath),
272638
272738
  getClassMembers: (className) => requireRepoMap().getClassMembers(className),
272639
272739
  getSymbolSummaries: (file, name2) => requireRepoMap().getSymbolSummaries(file, name2),
@@ -23372,6 +23372,24 @@ function createGatewayProvider(options = {}) {
23372
23372
  throw await asGatewayError(error48, await parseAuthMethod(await getHeaders()));
23373
23373
  });
23374
23374
  };
23375
+ const getSpendReport = async (params) => {
23376
+ return new GatewaySpendReport({
23377
+ baseURL,
23378
+ headers: getHeaders,
23379
+ fetch: options.fetch
23380
+ }).getSpendReport(params).catch(async (error48) => {
23381
+ throw await asGatewayError(error48, await parseAuthMethod(await getHeaders()));
23382
+ });
23383
+ };
23384
+ const getGenerationInfo = async (params) => {
23385
+ return new GatewayGenerationInfoFetcher({
23386
+ baseURL,
23387
+ headers: getHeaders,
23388
+ fetch: options.fetch
23389
+ }).getGenerationInfo(params).catch(async (error48) => {
23390
+ throw await asGatewayError(error48, await parseAuthMethod(await getHeaders()));
23391
+ });
23392
+ };
23375
23393
  const provider = function(modelId) {
23376
23394
  if (new.target) {
23377
23395
  throw new Error("The Gateway Provider model function cannot be called with the new keyword.");
@@ -23381,6 +23399,8 @@ function createGatewayProvider(options = {}) {
23381
23399
  provider.specificationVersion = "v3";
23382
23400
  provider.getAvailableModels = getAvailableModels;
23383
23401
  provider.getCredits = getCredits;
23402
+ provider.getSpendReport = getSpendReport;
23403
+ provider.getGenerationInfo = getGenerationInfo;
23384
23404
  provider.imageModel = (modelId) => {
23385
23405
  return new GatewayImageModel(modelId, {
23386
23406
  provider: "gateway",
@@ -23474,7 +23494,75 @@ var import_oidc, import_oidc2, marker17 = "vercel.ai.gateway.error", symbol18, _
23474
23494
  throw await asGatewayError(error48);
23475
23495
  }
23476
23496
  }
23477
- }, gatewayAvailableModelsResponseSchema, gatewayCreditsResponseSchema, GatewayLanguageModel = class {
23497
+ }, gatewayAvailableModelsResponseSchema, gatewayCreditsResponseSchema, GatewaySpendReport = class {
23498
+ constructor(config2) {
23499
+ this.config = config2;
23500
+ }
23501
+ async getSpendReport(params) {
23502
+ try {
23503
+ const baseUrl = new URL(this.config.baseURL);
23504
+ const searchParams = new URLSearchParams;
23505
+ searchParams.set("start_date", params.startDate);
23506
+ searchParams.set("end_date", params.endDate);
23507
+ if (params.groupBy) {
23508
+ searchParams.set("group_by", params.groupBy);
23509
+ }
23510
+ if (params.datePart) {
23511
+ searchParams.set("date_part", params.datePart);
23512
+ }
23513
+ if (params.userId) {
23514
+ searchParams.set("user_id", params.userId);
23515
+ }
23516
+ if (params.model) {
23517
+ searchParams.set("model", params.model);
23518
+ }
23519
+ if (params.provider) {
23520
+ searchParams.set("provider", params.provider);
23521
+ }
23522
+ if (params.credentialType) {
23523
+ searchParams.set("credential_type", params.credentialType);
23524
+ }
23525
+ if (params.tags && params.tags.length > 0) {
23526
+ searchParams.set("tags", params.tags.join(","));
23527
+ }
23528
+ const { value } = await getFromApi({
23529
+ url: `${baseUrl.origin}/v1/report?${searchParams.toString()}`,
23530
+ headers: await resolve(this.config.headers()),
23531
+ successfulResponseHandler: createJsonResponseHandler(gatewaySpendReportResponseSchema),
23532
+ failedResponseHandler: createJsonErrorResponseHandler({
23533
+ errorSchema: exports_external.any(),
23534
+ errorToMessage: (data) => data
23535
+ }),
23536
+ fetch: this.config.fetch
23537
+ });
23538
+ return value;
23539
+ } catch (error48) {
23540
+ throw await asGatewayError(error48);
23541
+ }
23542
+ }
23543
+ }, gatewaySpendReportResponseSchema, GatewayGenerationInfoFetcher = class {
23544
+ constructor(config2) {
23545
+ this.config = config2;
23546
+ }
23547
+ async getGenerationInfo(params) {
23548
+ try {
23549
+ const baseUrl = new URL(this.config.baseURL);
23550
+ const { value } = await getFromApi({
23551
+ url: `${baseUrl.origin}/v1/generation?id=${encodeURIComponent(params.id)}`,
23552
+ headers: await resolve(this.config.headers()),
23553
+ successfulResponseHandler: createJsonResponseHandler(gatewayGenerationInfoResponseSchema),
23554
+ failedResponseHandler: createJsonErrorResponseHandler({
23555
+ errorSchema: exports_external.any(),
23556
+ errorToMessage: (data) => data
23557
+ }),
23558
+ fetch: this.config.fetch
23559
+ });
23560
+ return value;
23561
+ } catch (error48) {
23562
+ throw await asGatewayError(error48);
23563
+ }
23564
+ }
23565
+ }, gatewayGenerationInfoResponseSchema, GatewayLanguageModel = class {
23478
23566
  constructor(modelId, config2) {
23479
23567
  this.modelId = modelId;
23480
23568
  this.config = config2;
@@ -23871,7 +23959,7 @@ var import_oidc, import_oidc2, marker17 = "vercel.ai.gateway.error", symbol18, _
23871
23959
  "ai-model-id": this.modelId
23872
23960
  };
23873
23961
  }
23874
- }, providerMetadataEntrySchema2, gatewayVideoDataSchema, gatewayVideoWarningSchema, gatewayVideoEventSchema, parallelSearchInputSchema, parallelSearchOutputSchema, parallelSearchToolFactory, parallelSearch = (config2 = {}) => parallelSearchToolFactory(config2), perplexitySearchInputSchema, perplexitySearchOutputSchema, perplexitySearchToolFactory, perplexitySearch = (config2 = {}) => perplexitySearchToolFactory(config2), gatewayTools, VERSION2 = "3.0.80", AI_GATEWAY_PROTOCOL_VERSION = "0.0.1", gateway;
23962
+ }, providerMetadataEntrySchema2, gatewayVideoDataSchema, gatewayVideoWarningSchema, gatewayVideoEventSchema, parallelSearchInputSchema, parallelSearchOutputSchema, parallelSearchToolFactory, parallelSearch = (config2 = {}) => parallelSearchToolFactory(config2), perplexitySearchInputSchema, perplexitySearchOutputSchema, perplexitySearchToolFactory, perplexitySearch = (config2 = {}) => perplexitySearchToolFactory(config2), gatewayTools, VERSION2 = "3.0.85", AI_GATEWAY_PROTOCOL_VERSION = "0.0.1", gateway;
23875
23963
  var init_dist4 = __esm(() => {
23876
23964
  init_dist3();
23877
23965
  init_dist();
@@ -23889,6 +23977,10 @@ var init_dist4 = __esm(() => {
23889
23977
  init_v4();
23890
23978
  init_dist3();
23891
23979
  init_v4();
23980
+ init_dist3();
23981
+ init_v4();
23982
+ init_dist3();
23983
+ init_v4();
23892
23984
  init_dist();
23893
23985
  init_dist3();
23894
23986
  init_v4();
@@ -24150,6 +24242,99 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
24150
24242
  balance,
24151
24243
  totalUsed: total_used
24152
24244
  }))));
24245
+ gatewaySpendReportResponseSchema = lazySchema(() => zodSchema(exports_external.object({
24246
+ results: exports_external.array(exports_external.object({
24247
+ day: exports_external.string().optional(),
24248
+ hour: exports_external.string().optional(),
24249
+ user: exports_external.string().optional(),
24250
+ model: exports_external.string().optional(),
24251
+ tag: exports_external.string().optional(),
24252
+ provider: exports_external.string().optional(),
24253
+ credential_type: exports_external.enum(["byok", "system"]).optional(),
24254
+ total_cost: exports_external.number(),
24255
+ market_cost: exports_external.number().optional(),
24256
+ input_tokens: exports_external.number().optional(),
24257
+ output_tokens: exports_external.number().optional(),
24258
+ cached_input_tokens: exports_external.number().optional(),
24259
+ cache_creation_input_tokens: exports_external.number().optional(),
24260
+ reasoning_tokens: exports_external.number().optional(),
24261
+ request_count: exports_external.number().optional()
24262
+ }).transform(({
24263
+ credential_type,
24264
+ total_cost,
24265
+ market_cost,
24266
+ input_tokens,
24267
+ output_tokens,
24268
+ cached_input_tokens,
24269
+ cache_creation_input_tokens,
24270
+ reasoning_tokens,
24271
+ request_count,
24272
+ ...rest
24273
+ }) => ({
24274
+ ...rest,
24275
+ ...credential_type !== undefined ? { credentialType: credential_type } : {},
24276
+ totalCost: total_cost,
24277
+ ...market_cost !== undefined ? { marketCost: market_cost } : {},
24278
+ ...input_tokens !== undefined ? { inputTokens: input_tokens } : {},
24279
+ ...output_tokens !== undefined ? { outputTokens: output_tokens } : {},
24280
+ ...cached_input_tokens !== undefined ? { cachedInputTokens: cached_input_tokens } : {},
24281
+ ...cache_creation_input_tokens !== undefined ? { cacheCreationInputTokens: cache_creation_input_tokens } : {},
24282
+ ...reasoning_tokens !== undefined ? { reasoningTokens: reasoning_tokens } : {},
24283
+ ...request_count !== undefined ? { requestCount: request_count } : {}
24284
+ })))
24285
+ })));
24286
+ gatewayGenerationInfoResponseSchema = lazySchema(() => zodSchema(exports_external.object({
24287
+ data: exports_external.object({
24288
+ id: exports_external.string(),
24289
+ total_cost: exports_external.number(),
24290
+ upstream_inference_cost: exports_external.number(),
24291
+ usage: exports_external.number(),
24292
+ created_at: exports_external.string(),
24293
+ model: exports_external.string(),
24294
+ is_byok: exports_external.boolean(),
24295
+ provider_name: exports_external.string(),
24296
+ streamed: exports_external.boolean(),
24297
+ finish_reason: exports_external.string(),
24298
+ latency: exports_external.number(),
24299
+ generation_time: exports_external.number(),
24300
+ native_tokens_prompt: exports_external.number(),
24301
+ native_tokens_completion: exports_external.number(),
24302
+ native_tokens_reasoning: exports_external.number(),
24303
+ native_tokens_cached: exports_external.number(),
24304
+ native_tokens_cache_creation: exports_external.number(),
24305
+ billable_web_search_calls: exports_external.number()
24306
+ }).transform(({
24307
+ total_cost,
24308
+ upstream_inference_cost,
24309
+ created_at,
24310
+ is_byok,
24311
+ provider_name,
24312
+ finish_reason,
24313
+ generation_time,
24314
+ native_tokens_prompt,
24315
+ native_tokens_completion,
24316
+ native_tokens_reasoning,
24317
+ native_tokens_cached,
24318
+ native_tokens_cache_creation,
24319
+ billable_web_search_calls,
24320
+ ...rest
24321
+ }) => ({
24322
+ ...rest,
24323
+ totalCost: total_cost,
24324
+ upstreamInferenceCost: upstream_inference_cost,
24325
+ createdAt: created_at,
24326
+ isByok: is_byok,
24327
+ providerName: provider_name,
24328
+ finishReason: finish_reason,
24329
+ generationTime: generation_time,
24330
+ promptTokens: native_tokens_prompt,
24331
+ completionTokens: native_tokens_completion,
24332
+ reasoningTokens: native_tokens_reasoning,
24333
+ cachedTokens: native_tokens_cached,
24334
+ cacheCreationTokens: native_tokens_cache_creation,
24335
+ billableWebSearchCalls: billable_web_search_calls
24336
+ }))
24337
+ }).transform(({ data }) => data)));
24153
24338
  gatewayEmbeddingResponseSchema = lazySchema(() => zodSchema(exports_external.object({
24154
24339
  embeddings: exports_external.array(exports_external.array(exports_external.number())),
24155
24340
  usage: exports_external.object({ tokens: exports_external.number() }).nullish(),
@@ -28470,7 +28655,7 @@ var import_api, import_api2, __defProp2, __export2 = (target, all) => {
28470
28655
  const bytes = typeof data === "string" ? convertBase64ToUint8Array(data) : data;
28471
28656
  const id3Size = (bytes[6] & 127) << 21 | (bytes[7] & 127) << 14 | (bytes[8] & 127) << 7 | bytes[9] & 127;
28472
28657
  return bytes.slice(id3Size + 10);
28473
- }, VERSION3 = "6.0.138", download = async ({
28658
+ }, VERSION3 = "6.0.143", download = async ({
28474
28659
  url: url2,
28475
28660
  maxBytes,
28476
28661
  abortSignal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proxysoul/soulforge",
3
- "version": "1.8.3",
3
+ "version": "1.9.0",
4
4
  "description": "Graph-powered code intelligence — multi-agent coding with codebase-aware AI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@babel/core": "7.29.0",
53
- "@biomejs/biome": "2.4.9",
53
+ "@biomejs/biome": "2.4.10",
54
54
  "@types/babel__core": "7.20.5",
55
55
  "@types/bun": "1.3.11",
56
56
  "@types/linkify-it": "5.0.0",
@@ -62,15 +62,15 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@ai-sdk/anthropic": "3.0.64",
65
- "@ai-sdk/google": "3.0.53",
66
- "@ai-sdk/openai": "3.0.48",
67
- "@ai-sdk/xai": "3.0.74",
68
- "@anthropic-ai/sdk": "0.80.0",
65
+ "@ai-sdk/google": "3.0.55",
66
+ "@ai-sdk/openai": "3.0.49",
67
+ "@ai-sdk/xai": "3.0.75",
68
+ "@anthropic-ai/sdk": "0.82.0",
69
69
  "@llmgateway/ai-sdk-provider": "3.5.0",
70
70
  "@mozilla/readability": "0.6.0",
71
71
  "@openrouter/ai-sdk-provider": "2.3.3",
72
- "@opentui/react": "0.1.90",
73
- "ai": "6.0.138",
72
+ "@opentui/react": "0.1.95",
73
+ "ai": "6.0.143",
74
74
  "ghostty-opentui": "1.4.10",
75
75
  "isbinaryfile": "6.0.0",
76
76
  "linkedom": "0.18.12",