@exulu/backend 1.45.0 → 1.45.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,6 +1,6 @@
1
- # [1.45.0](https://github.com/Qventu/exulu-backend/compare/v1.44.0...v1.45.0) (2026-01-10)
1
+ ## [1.45.1](https://github.com/Qventu/exulu-backend/compare/v1.45.0...v1.45.1) (2026-01-13)
2
2
 
3
3
 
4
- ### Features
4
+ ### Bug Fixes
5
5
 
6
- * add workflow scheduling with cron validation and simplified workflow templates ([1181364](https://github.com/Qventu/exulu-backend/commit/118136412321bddbd2f8ae5425e425de64040e1d))
6
+ * remove unused preview-pdf tool and correct RBAC table prefix handling ([886facd](https://github.com/Qventu/exulu-backend/commit/886facd0c632883201053e50a1f4609c811f4f6c))
package/dist/index.cjs CHANGED
@@ -3792,14 +3792,14 @@ var applyAccessControl = (table, query, user, field_prefix) => {
3792
3792
  this.orWhere(`${prefix}created_by`, user.id);
3793
3793
  this.orWhere(function() {
3794
3794
  this.where(`${prefix}rights_mode`, "users").whereExists(function() {
3795
- this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + tableNamePlural + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "User").where("rbac.user_id", user.id);
3795
+ this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + (prefix ? prefix.slice(0, -1) : tableNamePlural) + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "User").where("rbac.user_id", user.id);
3796
3796
  });
3797
3797
  });
3798
3798
  }
3799
3799
  if (user?.role) {
3800
3800
  this.orWhere(function() {
3801
3801
  this.where(`${prefix}rights_mode`, "roles").whereExists(function() {
3802
- this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + tableNamePlural + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "Role").where("rbac.role_id", user.role.id);
3802
+ this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + (prefix ? prefix.slice(0, -1) : tableNamePlural) + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "Role").where("rbac.role_id", user.role.id);
3803
3803
  });
3804
3804
  });
3805
3805
  }
@@ -11351,37 +11351,6 @@ var mathTools = [
11351
11351
  degreesToRadiansTool
11352
11352
  ];
11353
11353
 
11354
- // src/templates/tools/preview-pdf.ts
11355
- var import_zod5 = require("zod");
11356
- var previewPdfTool = new ExuluTool3({
11357
- id: "preview_pdf",
11358
- name: "Preview PDF",
11359
- description: "Used to display a PDF file in an iframe web view",
11360
- type: "function",
11361
- config: [],
11362
- inputSchema: import_zod5.z.object({
11363
- s3key: import_zod5.z.string().describe("The S3 key of the PDF file to preview."),
11364
- page: import_zod5.z.number().describe("The page number to preview, defaults to 1.").optional()
11365
- }),
11366
- execute: async ({ s3key, page, exuluConfig }) => {
11367
- const bucket = s3key.split("/")[0];
11368
- const key = s3key.split("/").slice(1).join("/");
11369
- if (!bucket || !key) {
11370
- throw new Error("Invalid S3 key, must be in the format of <bucket>/<key>.");
11371
- }
11372
- const url = await getPresignedUrl(bucket, key, exuluConfig);
11373
- if (!url) {
11374
- throw new Error("No URL provided for PDF preview");
11375
- }
11376
- return {
11377
- result: JSON.stringify({
11378
- url,
11379
- page: page ?? 1
11380
- })
11381
- };
11382
- }
11383
- });
11384
-
11385
11354
  // src/templates/tools/todo/todowrite.txt
11386
11355
  var todowrite_default = `Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
11387
11356
  It also helps the user understand the progress of the task and overall progress of their requests.
@@ -11568,12 +11537,12 @@ Usage:
11568
11537
  - If no todos exist yet, an empty list will be returned`;
11569
11538
 
11570
11539
  // src/templates/tools/todo/todo.ts
11571
- var import_zod6 = __toESM(require("zod"), 1);
11572
- var TodoSchema = import_zod6.default.object({
11573
- content: import_zod6.default.string().describe("Brief description of the task"),
11574
- status: import_zod6.default.string().describe("Current status of the task: pending, in_progress, completed, cancelled"),
11575
- priority: import_zod6.default.string().describe("Priority level of the task: high, medium, low"),
11576
- id: import_zod6.default.string().describe("Unique identifier for the todo item")
11540
+ var import_zod5 = __toESM(require("zod"), 1);
11541
+ var TodoSchema = import_zod5.default.object({
11542
+ content: import_zod5.default.string().describe("Brief description of the task"),
11543
+ status: import_zod5.default.string().describe("Current status of the task: pending, in_progress, completed, cancelled"),
11544
+ priority: import_zod5.default.string().describe("Priority level of the task: high, medium, low"),
11545
+ id: import_zod5.default.string().describe("Unique identifier for the todo item")
11577
11546
  });
11578
11547
  var TodoWriteTool = new ExuluTool3({
11579
11548
  id: "todo_write",
@@ -11586,8 +11555,8 @@ var TodoWriteTool = new ExuluTool3({
11586
11555
  description: "The description of the todo list, if set overwrites the default description.",
11587
11556
  default: todowrite_default
11588
11557
  }],
11589
- inputSchema: import_zod6.default.object({
11590
- todos: import_zod6.default.array(TodoSchema).describe("The updated todo list")
11558
+ inputSchema: import_zod5.default.object({
11559
+ todos: import_zod5.default.array(TodoSchema).describe("The updated todo list")
11591
11560
  }),
11592
11561
  execute: async (inputs) => {
11593
11562
  const { sessionID, todos, user } = inputs;
@@ -11618,7 +11587,7 @@ var TodoReadTool = new ExuluTool3({
11618
11587
  id: "todo_read",
11619
11588
  name: "Todo Read",
11620
11589
  description: "Use this tool to read your todo list",
11621
- inputSchema: import_zod6.default.object({}),
11590
+ inputSchema: import_zod5.default.object({}),
11622
11591
  type: "function",
11623
11592
  category: "todo",
11624
11593
  config: [{
@@ -11731,7 +11700,6 @@ var ExuluApp = class {
11731
11700
  this._tools = [
11732
11701
  ...tools ?? [],
11733
11702
  ...mathTools,
11734
- ...[previewPdfTool],
11735
11703
  ...todoTools,
11736
11704
  // Add contexts as tools
11737
11705
  ...Object.values(contexts || {}).map((context) => context.tool()).filter(Boolean)
package/dist/index.js CHANGED
@@ -3741,14 +3741,14 @@ var applyAccessControl = (table, query, user, field_prefix) => {
3741
3741
  this.orWhere(`${prefix}created_by`, user.id);
3742
3742
  this.orWhere(function() {
3743
3743
  this.where(`${prefix}rights_mode`, "users").whereExists(function() {
3744
- this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + tableNamePlural + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "User").where("rbac.user_id", user.id);
3744
+ this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + (prefix ? prefix.slice(0, -1) : tableNamePlural) + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "User").where("rbac.user_id", user.id);
3745
3745
  });
3746
3746
  });
3747
3747
  }
3748
3748
  if (user?.role) {
3749
3749
  this.orWhere(function() {
3750
3750
  this.where(`${prefix}rights_mode`, "roles").whereExists(function() {
3751
- this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + tableNamePlural + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "Role").where("rbac.role_id", user.role.id);
3751
+ this.select("*").from("rbac").whereRaw("rbac.target_resource_id = " + (prefix ? prefix.slice(0, -1) : tableNamePlural) + ".id").where("rbac.entity", table.name.singular).where("rbac.access_type", "Role").where("rbac.role_id", user.role.id);
3752
3752
  });
3753
3753
  });
3754
3754
  }
@@ -11319,37 +11319,6 @@ var mathTools = [
11319
11319
  degreesToRadiansTool
11320
11320
  ];
11321
11321
 
11322
- // src/templates/tools/preview-pdf.ts
11323
- import { z as z5 } from "zod";
11324
- var previewPdfTool = new ExuluTool3({
11325
- id: "preview_pdf",
11326
- name: "Preview PDF",
11327
- description: "Used to display a PDF file in an iframe web view",
11328
- type: "function",
11329
- config: [],
11330
- inputSchema: z5.object({
11331
- s3key: z5.string().describe("The S3 key of the PDF file to preview."),
11332
- page: z5.number().describe("The page number to preview, defaults to 1.").optional()
11333
- }),
11334
- execute: async ({ s3key, page, exuluConfig }) => {
11335
- const bucket = s3key.split("/")[0];
11336
- const key = s3key.split("/").slice(1).join("/");
11337
- if (!bucket || !key) {
11338
- throw new Error("Invalid S3 key, must be in the format of <bucket>/<key>.");
11339
- }
11340
- const url = await getPresignedUrl(bucket, key, exuluConfig);
11341
- if (!url) {
11342
- throw new Error("No URL provided for PDF preview");
11343
- }
11344
- return {
11345
- result: JSON.stringify({
11346
- url,
11347
- page: page ?? 1
11348
- })
11349
- };
11350
- }
11351
- });
11352
-
11353
11322
  // src/templates/tools/todo/todowrite.txt
11354
11323
  var todowrite_default = `Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
11355
11324
  It also helps the user understand the progress of the task and overall progress of their requests.
@@ -11536,12 +11505,12 @@ Usage:
11536
11505
  - If no todos exist yet, an empty list will be returned`;
11537
11506
 
11538
11507
  // src/templates/tools/todo/todo.ts
11539
- import z6 from "zod";
11540
- var TodoSchema = z6.object({
11541
- content: z6.string().describe("Brief description of the task"),
11542
- status: z6.string().describe("Current status of the task: pending, in_progress, completed, cancelled"),
11543
- priority: z6.string().describe("Priority level of the task: high, medium, low"),
11544
- id: z6.string().describe("Unique identifier for the todo item")
11508
+ import z5 from "zod";
11509
+ var TodoSchema = z5.object({
11510
+ content: z5.string().describe("Brief description of the task"),
11511
+ status: z5.string().describe("Current status of the task: pending, in_progress, completed, cancelled"),
11512
+ priority: z5.string().describe("Priority level of the task: high, medium, low"),
11513
+ id: z5.string().describe("Unique identifier for the todo item")
11545
11514
  });
11546
11515
  var TodoWriteTool = new ExuluTool3({
11547
11516
  id: "todo_write",
@@ -11554,8 +11523,8 @@ var TodoWriteTool = new ExuluTool3({
11554
11523
  description: "The description of the todo list, if set overwrites the default description.",
11555
11524
  default: todowrite_default
11556
11525
  }],
11557
- inputSchema: z6.object({
11558
- todos: z6.array(TodoSchema).describe("The updated todo list")
11526
+ inputSchema: z5.object({
11527
+ todos: z5.array(TodoSchema).describe("The updated todo list")
11559
11528
  }),
11560
11529
  execute: async (inputs) => {
11561
11530
  const { sessionID, todos, user } = inputs;
@@ -11586,7 +11555,7 @@ var TodoReadTool = new ExuluTool3({
11586
11555
  id: "todo_read",
11587
11556
  name: "Todo Read",
11588
11557
  description: "Use this tool to read your todo list",
11589
- inputSchema: z6.object({}),
11558
+ inputSchema: z5.object({}),
11590
11559
  type: "function",
11591
11560
  category: "todo",
11592
11561
  config: [{
@@ -11699,7 +11668,6 @@ var ExuluApp = class {
11699
11668
  this._tools = [
11700
11669
  ...tools ?? [],
11701
11670
  ...mathTools,
11702
- ...[previewPdfTool],
11703
11671
  ...todoTools,
11704
11672
  // Add contexts as tools
11705
11673
  ...Object.values(contexts || {}).map((context) => context.tool()).filter(Boolean)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exulu/backend",
3
3
  "author": "Qventu Bv.",
4
- "version": "1.45.0",
4
+ "version": "1.45.1",
5
5
  "main": "./dist/index.js",
6
6
  "private": false,
7
7
  "publishConfig": {