@exulu/backend 1.46.0 → 1.46.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,6 @@
1
- # [1.46.0](https://github.com/Qventu/exulu-backend/compare/v1.45.1...v1.46.0) (2026-02-23)
1
+ ## [1.46.1](https://github.com/Qventu/exulu-backend/compare/v1.46.0...v1.46.1) (2026-03-03)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * add type check for tool call ([25cf122](https://github.com/Qventu/exulu-backend/commit/25cf1224f4994366b079b92bd62c317ef37d9cbd))
7
-
8
-
9
- ### Features
10
-
11
- * add agentic retrieval, NLP preprocessing, Cerebras models, and Perplexity search ([d49a780](https://github.com/Qventu/exulu-backend/commit/d49a78063bcd534bc79f64da09871ca5599a48b9))
12
- * consolidate agentic search tools ([c84c151](https://github.com/Qventu/exulu-backend/commit/c84c151925fbe7b17d5e657914f8b857430a19a8))
6
+ * remove debug code and correct duplicate agent IDs ([0ff154e](https://github.com/Qventu/exulu-backend/commit/0ff154e49f7d8edbaa29987b0d7090d2c7aee57e))
package/dist/index.cjs CHANGED
@@ -1568,7 +1568,7 @@ var rateLimiter = async (key, windowSeconds, limit, points) => {
1568
1568
  // src/registry/agentic-retrieval.ts
1569
1569
  var import_zod = require("zod");
1570
1570
  var import_ai = require("ai");
1571
- var import_fs = __toESM(require("fs"), 1);
1571
+ var import_fs = require("fs");
1572
1572
 
1573
1573
  // src/registry/query-preprocessing.ts
1574
1574
  var import_franc = require("franc");
@@ -1783,7 +1783,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1783
1783
  query,
1784
1784
  onFinish
1785
1785
  }) {
1786
- import_fs.default.writeFileSync("reranker.json", JSON.stringify(reranker, null, 2));
1787
1786
  let finished = false;
1788
1787
  let maxSteps = 2;
1789
1788
  let currentStep = 0;
@@ -1797,7 +1796,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1797
1796
  while (!finished && currentStep < maxSteps) {
1798
1797
  currentStep++;
1799
1798
  console.log("[EXULU] Agentic retrieval step", currentStep);
1800
- import_fs.default.writeFileSync(currentStep - 1 + "_step_output.json", JSON.stringify(output, null, 2));
1801
1799
  const systemPrompt = `
1802
1800
  ${baseInstructions}
1803
1801
 
@@ -1815,7 +1813,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1815
1813
  ${customInstructions ? `
1816
1814
  CUSTOM INSTRUCTIONS: ${customInstructions}` : ""}
1817
1815
  `;
1818
- import_fs.default.writeFileSync("system_prompt_" + currentStep + ".txt", systemPrompt);
1819
1816
  let reasoningOutput;
1820
1817
  try {
1821
1818
  reasoningOutput = await withRetry(async () => {
@@ -1899,7 +1896,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1899
1896
  console.log("[EXULU] Processing tool results for step", currentStep);
1900
1897
  if (Array.isArray(toolResults)) {
1901
1898
  chunks = toolResults.map((result) => {
1902
- import_fs.default.writeFileSync(result.toolCallId + "_tool_call_result.json", JSON.stringify(result, null, 2));
1903
1899
  let chunks2 = [];
1904
1900
  if (typeof result.output === "string") {
1905
1901
  chunks2 = JSON.parse(result.output);
@@ -1919,9 +1915,7 @@ function createCustomAgenticRetrievalToolLoopAgent({
1919
1915
  if (chunks) {
1920
1916
  if (reranker) {
1921
1917
  console.log("[EXULU] Reranking chunks for step, using reranker", reranker.name + "(" + reranker.id + ")", "for step", currentStep, " for " + chunks?.length + " chunks");
1922
- import_fs.default.writeFileSync("chunks-before-reranking.json", JSON.stringify(chunks, null, 2));
1923
1918
  chunks = await reranker.run(query, chunks);
1924
- import_fs.default.writeFileSync("chunks-after-reranking.json", JSON.stringify(chunks, null, 2));
1925
1919
  console.log("[EXULU] Reranked chunks for step", currentStep, "using reranker", reranker.name + "(" + reranker.id + ")", " resulting in ", chunks?.length + " chunks");
1926
1920
  }
1927
1921
  output.chunks.push(...chunks);
@@ -8042,7 +8036,6 @@ var createUppyRoutes = async (app, contexts, config) => {
8042
8036
 
8043
8037
  // src/registry/classes.ts
8044
8038
  var import_officeparser = require("officeparser");
8045
- var import_fs2 = require("fs");
8046
8039
  var s3Client2;
8047
8040
  function sanitizeToolName(name) {
8048
8041
  if (typeof name !== "string") return "";
@@ -8199,9 +8192,6 @@ var createProjectItemsRetrievalTool = async ({
8199
8192
  const itemIds = set[contextName];
8200
8193
  console.log("[EXULU] Project search tool searching through items", itemIds);
8201
8194
  const result = await context.search({
8202
- // todo check if it is more performant to use a concatenation of
8203
- // the query and keywords, or just the keywords, instead of the
8204
- // query itself.
8205
8195
  query,
8206
8196
  itemFilters: [{
8207
8197
  id: {
@@ -10385,7 +10375,7 @@ var import_utils4 = require("@apollo/utils.keyvaluecache");
10385
10375
  var import_body_parser = __toESM(require("body-parser"), 1);
10386
10376
  var import_crypto_js4 = __toESM(require("crypto-js"), 1);
10387
10377
  var import_openai = __toESM(require("openai"), 1);
10388
- var import_fs3 = __toESM(require("fs"), 1);
10378
+ var import_fs2 = __toESM(require("fs"), 1);
10389
10379
  var import_node_crypto3 = require("crypto");
10390
10380
  var import_api2 = require("@opentelemetry/api");
10391
10381
  var import_sdk = __toESM(require("@anthropic-ai/sdk"), 1);
@@ -10422,7 +10412,7 @@ var REQUEST_SIZE_LIMIT = "50mb";
10422
10412
  var getExuluVersionNumber = async () => {
10423
10413
  try {
10424
10414
  const path = process.cwd();
10425
- const packageJson = import_fs3.default.readFileSync(path + "/package.json", "utf8");
10415
+ const packageJson = import_fs2.default.readFileSync(path + "/package.json", "utf8");
10426
10416
  const packageData = JSON.parse(packageJson);
10427
10417
  const exuluVersion = packageData.dependencies["@exulu/backend"];
10428
10418
  console.log(`[EXULU] Installed exulu-backend version: ${exuluVersion}`);
@@ -10680,8 +10670,8 @@ Mood: friendly and intelligent.
10680
10670
  }
10681
10671
  const image_bytes = Buffer.from(image_base64, "base64");
10682
10672
  const uuid = (0, import_node_crypto3.randomUUID)();
10683
- if (!import_fs3.default.existsSync("public")) {
10684
- import_fs3.default.mkdirSync("public");
10673
+ if (!import_fs2.default.existsSync("public")) {
10674
+ import_fs2.default.mkdirSync("public");
10685
10675
  }
10686
10676
  res.status(200).json({
10687
10677
  message: "Image generated successfully.",
@@ -11543,7 +11533,7 @@ var claudeOpus4Agent = new ExuluAgent3({
11543
11533
  }
11544
11534
  });
11545
11535
  var claudeSonnet4Agent = new ExuluAgent3({
11546
- id: `claude_code_agent`,
11536
+ id: `claude_sonnet_4_agent`,
11547
11537
  name: `CLAUDE-SONNET-4`,
11548
11538
  provider: "anthropic",
11549
11539
  description: `High intelligence and balanced performance, used a lot for agentic coding tasks. Anthropic provides a newer 4.5 model that is more powerful and faster.`,
@@ -11570,7 +11560,7 @@ var claudeSonnet4Agent = new ExuluAgent3({
11570
11560
  }
11571
11561
  });
11572
11562
  var claudeSonnet45Agent = new ExuluAgent3({
11573
- id: `claude_code_agent`,
11563
+ id: `claude_sonnet_4_5_agent`,
11574
11564
  name: `CLAUDE-SONNET-4.5`,
11575
11565
  provider: "anthropic",
11576
11566
  description: `Best Anthropic model for complex agents and coding. Highest intelligence across most tasks with exceptional agent and coding capabilities`,
package/dist/index.js CHANGED
@@ -1516,7 +1516,7 @@ var rateLimiter = async (key, windowSeconds, limit, points) => {
1516
1516
  // src/registry/agentic-retrieval.ts
1517
1517
  import { z } from "zod";
1518
1518
  import { stepCountIs, tool, Output, generateText } from "ai";
1519
- import fs from "fs";
1519
+ import "fs";
1520
1520
 
1521
1521
  // src/registry/query-preprocessing.ts
1522
1522
  import { franc } from "franc";
@@ -1731,7 +1731,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1731
1731
  query,
1732
1732
  onFinish
1733
1733
  }) {
1734
- fs.writeFileSync("reranker.json", JSON.stringify(reranker, null, 2));
1735
1734
  let finished = false;
1736
1735
  let maxSteps = 2;
1737
1736
  let currentStep = 0;
@@ -1745,7 +1744,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1745
1744
  while (!finished && currentStep < maxSteps) {
1746
1745
  currentStep++;
1747
1746
  console.log("[EXULU] Agentic retrieval step", currentStep);
1748
- fs.writeFileSync(currentStep - 1 + "_step_output.json", JSON.stringify(output, null, 2));
1749
1747
  const systemPrompt = `
1750
1748
  ${baseInstructions}
1751
1749
 
@@ -1763,7 +1761,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1763
1761
  ${customInstructions ? `
1764
1762
  CUSTOM INSTRUCTIONS: ${customInstructions}` : ""}
1765
1763
  `;
1766
- fs.writeFileSync("system_prompt_" + currentStep + ".txt", systemPrompt);
1767
1764
  let reasoningOutput;
1768
1765
  try {
1769
1766
  reasoningOutput = await withRetry(async () => {
@@ -1847,7 +1844,6 @@ function createCustomAgenticRetrievalToolLoopAgent({
1847
1844
  console.log("[EXULU] Processing tool results for step", currentStep);
1848
1845
  if (Array.isArray(toolResults)) {
1849
1846
  chunks = toolResults.map((result) => {
1850
- fs.writeFileSync(result.toolCallId + "_tool_call_result.json", JSON.stringify(result, null, 2));
1851
1847
  let chunks2 = [];
1852
1848
  if (typeof result.output === "string") {
1853
1849
  chunks2 = JSON.parse(result.output);
@@ -1867,9 +1863,7 @@ function createCustomAgenticRetrievalToolLoopAgent({
1867
1863
  if (chunks) {
1868
1864
  if (reranker) {
1869
1865
  console.log("[EXULU] Reranking chunks for step, using reranker", reranker.name + "(" + reranker.id + ")", "for step", currentStep, " for " + chunks?.length + " chunks");
1870
- fs.writeFileSync("chunks-before-reranking.json", JSON.stringify(chunks, null, 2));
1871
1866
  chunks = await reranker.run(query, chunks);
1872
- fs.writeFileSync("chunks-after-reranking.json", JSON.stringify(chunks, null, 2));
1873
1867
  console.log("[EXULU] Reranked chunks for step", currentStep, "using reranker", reranker.name + "(" + reranker.id + ")", " resulting in ", chunks?.length + " chunks");
1874
1868
  }
1875
1869
  output.chunks.push(...chunks);
@@ -8009,7 +8003,6 @@ var createUppyRoutes = async (app, contexts, config) => {
8009
8003
 
8010
8004
  // src/registry/classes.ts
8011
8005
  import { parseOfficeAsync } from "officeparser";
8012
- import "fs";
8013
8006
  var s3Client2;
8014
8007
  function sanitizeToolName(name) {
8015
8008
  if (typeof name !== "string") return "";
@@ -8166,9 +8159,6 @@ var createProjectItemsRetrievalTool = async ({
8166
8159
  const itemIds = set[contextName];
8167
8160
  console.log("[EXULU] Project search tool searching through items", itemIds);
8168
8161
  const result = await context.search({
8169
- // todo check if it is more performant to use a concatenation of
8170
- // the query and keywords, or just the keywords, instead of the
8171
- // query itself.
8172
8162
  query,
8173
8163
  itemFilters: [{
8174
8164
  id: {
@@ -10352,7 +10342,7 @@ import { InMemoryLRUCache } from "@apollo/utils.keyvaluecache";
10352
10342
  import bodyParser from "body-parser";
10353
10343
  import CryptoJS4 from "crypto-js";
10354
10344
  import OpenAI from "openai";
10355
- import fs3 from "fs";
10345
+ import fs2 from "fs";
10356
10346
  import { randomUUID as randomUUID3 } from "crypto";
10357
10347
  import "@opentelemetry/api";
10358
10348
  import Anthropic from "@anthropic-ai/sdk";
@@ -10389,7 +10379,7 @@ var REQUEST_SIZE_LIMIT = "50mb";
10389
10379
  var getExuluVersionNumber = async () => {
10390
10380
  try {
10391
10381
  const path = process.cwd();
10392
- const packageJson = fs3.readFileSync(path + "/package.json", "utf8");
10382
+ const packageJson = fs2.readFileSync(path + "/package.json", "utf8");
10393
10383
  const packageData = JSON.parse(packageJson);
10394
10384
  const exuluVersion = packageData.dependencies["@exulu/backend"];
10395
10385
  console.log(`[EXULU] Installed exulu-backend version: ${exuluVersion}`);
@@ -10647,8 +10637,8 @@ Mood: friendly and intelligent.
10647
10637
  }
10648
10638
  const image_bytes = Buffer.from(image_base64, "base64");
10649
10639
  const uuid = randomUUID3();
10650
- if (!fs3.existsSync("public")) {
10651
- fs3.mkdirSync("public");
10640
+ if (!fs2.existsSync("public")) {
10641
+ fs2.mkdirSync("public");
10652
10642
  }
10653
10643
  res.status(200).json({
10654
10644
  message: "Image generated successfully.",
@@ -11510,7 +11500,7 @@ var claudeOpus4Agent = new ExuluAgent3({
11510
11500
  }
11511
11501
  });
11512
11502
  var claudeSonnet4Agent = new ExuluAgent3({
11513
- id: `claude_code_agent`,
11503
+ id: `claude_sonnet_4_agent`,
11514
11504
  name: `CLAUDE-SONNET-4`,
11515
11505
  provider: "anthropic",
11516
11506
  description: `High intelligence and balanced performance, used a lot for agentic coding tasks. Anthropic provides a newer 4.5 model that is more powerful and faster.`,
@@ -11537,7 +11527,7 @@ var claudeSonnet4Agent = new ExuluAgent3({
11537
11527
  }
11538
11528
  });
11539
11529
  var claudeSonnet45Agent = new ExuluAgent3({
11540
- id: `claude_code_agent`,
11530
+ id: `claude_sonnet_4_5_agent`,
11541
11531
  name: `CLAUDE-SONNET-4.5`,
11542
11532
  provider: "anthropic",
11543
11533
  description: `Best Anthropic model for complex agents and coding. Highest intelligence across most tasks with exceptional agent and coding capabilities`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exulu/backend",
3
3
  "author": "Qventu Bv.",
4
- "version": "1.46.0",
4
+ "version": "1.46.1",
5
5
  "main": "./dist/index.js",
6
6
  "private": false,
7
7
  "publishConfig": {