@exulu/backend 0.1.6

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.
@@ -0,0 +1,43 @@
1
+ ---
2
+ convention:
3
+ commitTypes:
4
+ - feat
5
+ - fix
6
+ - perf
7
+ - refactor
8
+ - style
9
+ - test
10
+ - build
11
+ - ops
12
+ - docs
13
+ - chore
14
+ - merge
15
+ - revert
16
+ commitScopes: []
17
+ releaseTagGlobPattern: v[0-9]*.[0-9]*.[0-9]*
18
+ changelog:
19
+ commitTypes:
20
+ - feat
21
+ - fix
22
+ - perf
23
+ - merge
24
+ includeInvalidCommits: true
25
+ commitIgnoreRegexPattern: "^WIP "
26
+ headlines:
27
+ feat: Features
28
+ fix: Bug Fixes
29
+ perf: Performance Improvements
30
+ merge: Merges
31
+ breakingChange: BREAKING CHANGES
32
+
33
+ ## GitHub
34
+ # commitUrl: https://github.com/ACCOUNT/REPOSITORY/commit/%commit%
35
+ # commitRangeUrl: https://github.com/ACCOUNT/REPOSITORY/compare/%from%...%to%?diff=split
36
+
37
+ ## GitHub Issues
38
+ # issueRegexPattern: "#[0-9]+"
39
+ # issueUrl: https://github.com/ACCOUNT/REPOSITORY/issues/%issue%
40
+
41
+ ## Jira Issues
42
+ # issueRegexPattern: "[A-Z][A-Z0-9]+-[0-9]+"
43
+ # issueUrl: https://WORKSPACE.atlassian.net/browse/%issue%
package/license.md ADDED
@@ -0,0 +1,81 @@
1
+ # Exulu Software License Agreement
2
+
3
+ **Version 1.0**
4
+ **Effective Date: [Insert Date]**
5
+
6
+ This Software License Agreement (the **"Agreement"**) is a legal agreement between **Qventu Bv.**, a company registered in the Netherlands with its registered office at **Lindenlaan 30, 6301 EL Valkenburg aan de Geul**, and registered with the Dutch Chamber of Commerce under number **76483894** (hereinafter "**Qventu**"), and the individual or entity installing, copying, accessing, or otherwise using the **Exulu** software (the "**Licensee**").
7
+
8
+ By installing, copying, or otherwise using the Exulu software (the "**Software**"), Licensee agrees to be bound by the terms of this Agreement.
9
+
10
+ ---
11
+
12
+ ## 1. Ownership and Intellectual Property
13
+
14
+ The Software, including all associated intellectual property rights, documentation, and any copies or derivative works, is and shall remain the sole property of **Qventu Bv.**.
15
+
16
+ Nothing in this Agreement shall be construed as transferring any rights, title, or ownership in or to the Software to the Licensee, except as explicitly set forth herein.
17
+
18
+ ---
19
+
20
+ ## 2. Grant of License
21
+
22
+ Subject to the terms and conditions of this Agreement, Qventu grants to the Licensee a **non-exclusive, non-transferable, non-sublicensable**, and **revocable license** to use the Software **only while a valid license agreement is in effect** between the Licensee and either:
23
+
24
+ - **Qventu Bv.**, or
25
+ - an **official partner** of Qventu Bv., authorized to grant such licenses.
26
+
27
+ ---
28
+
29
+ ## 3. License Restrictions
30
+
31
+ Licensee shall not:
32
+
33
+ - Use the Software without an active license agreement as specified in Section 2.
34
+ - Distribute, sublicense, lease, rent, lend, or otherwise transfer the Software to any third party.
35
+ - Reverse engineer, decompile, or disassemble the Software, except as permitted by applicable law.
36
+ - Modify or create derivative works based on the Software unless expressly authorized in writing by Qventu.
37
+
38
+ ---
39
+
40
+ ## 4. Term and Termination
41
+
42
+ This Agreement and the license granted herein shall remain in effect only while there is an active license agreement in place as defined in Section 2.
43
+
44
+ Qventu may terminate this Agreement immediately upon written notice if the Licensee breaches any provision of this Agreement or uses the Software without a valid license.
45
+
46
+ Upon termination, Licensee must immediately cease all use of the Software and destroy all copies in their possession or control.
47
+
48
+ ---
49
+
50
+ ## 5. Disclaimer of Warranties
51
+
52
+ The Software is provided "AS IS" without warranty of any kind, whether express, implied, or statutory, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement.
53
+
54
+ ---
55
+
56
+ ## 6. Limitation of Liability
57
+
58
+ To the maximum extent permitted by applicable law, in no event shall Qventu be liable for any indirect, incidental, consequential, special, or punitive damages arising out of or related to this Agreement or the use of the Software, even if Qventu has been advised of the possibility of such damages.
59
+
60
+ ---
61
+
62
+ ## 7. Governing Law and Jurisdiction
63
+
64
+ This Agreement shall be governed by and construed in accordance with the laws of the **Netherlands**. Any disputes arising out of or in connection with this Agreement shall be subject to the exclusive jurisdiction of the competent courts of the Netherlands.
65
+
66
+ ---
67
+
68
+ ## 8. Contact Information
69
+
70
+ For inquiries regarding this Agreement or licensing of the Software, please contact:
71
+
72
+ **Qventu Bv.**
73
+ Lindenlaan 30
74
+ 6301 EL Valkenburg aan de Geul
75
+ Netherlands
76
+ KvK: 76483894
77
+ Email: [Insert Contact Email]
78
+
79
+ ---
80
+
81
+ © Qventu Bv. All rights reserved.
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@exulu/backend",
3
+ "author": "Qventu Bv.",
4
+ "version": "0.1.6",
5
+ "main": "./dist/index.js",
6
+ "private": false,
7
+ "publishConfig": {
8
+ "access": "restricted"
9
+ },
10
+ "module": "./dist/index.mjs",
11
+ "types": "./dist/index.d.ts",
12
+ "homepage": "https://exulu.com",
13
+ "engines": {
14
+ "node": "20.10.0"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/Qventu/exulu-core"
19
+ },
20
+ "scripts": {
21
+ "build": "tsup",
22
+ "dev": "npm link && tsup --watch"
23
+ },
24
+ "keywords": [
25
+ "exulu"
26
+ ],
27
+ "type": "module",
28
+ "devDependencies": {
29
+ "@types/bun": "latest",
30
+ "@types/node": "^22.14.0",
31
+ "@types/pg": "^8.15.1",
32
+ "mastra": "^0.4.4",
33
+ "tsup": "^8.5.0",
34
+ "tsx": "^4.19.3"
35
+ },
36
+ "peerDependencies": {
37
+ "typescript": "^5.8.3"
38
+ },
39
+ "dependencies": {
40
+ "@as-integrations/express5": "^1.0.0",
41
+ "@aws-sdk/client-s3": "^3.338.0",
42
+ "@aws-sdk/client-sts": "^3.338.0",
43
+ "@aws-sdk/s3-request-presigner": "^3.338.0",
44
+ "@mastra/core": "^0.8.3",
45
+ "@mastra/memory": "^0.2.10",
46
+ "@mastra/pg": "^0.2.10",
47
+ "@mastra/rag": "^0.1.23",
48
+ "@types/bcrypt": "^5.0.2",
49
+ "@types/cors": "^2.8.18",
50
+ "@types/express": "^5.0.1",
51
+ "@types/graphql-type-json": "^0.3.5",
52
+ "@types/multer": "^1.4.12",
53
+ "ai": "^4.3.9",
54
+ "apollo-server": "^3.13.0",
55
+ "bcryptjs": "^3.0.2",
56
+ "body-parser": "^2.2.0",
57
+ "bullmq": "^5.48.1",
58
+ "class-validator": "^0.14.2",
59
+ "cors": "^2.8.5",
60
+ "csv-parse": "^5.6.0",
61
+ "dotenv": "^16.0.0",
62
+ "express": "^5.1.0",
63
+ "graphql": "^16.11.0",
64
+ "graphql-tools": "^9.0.18",
65
+ "graphql-type-json": "^0.3.2",
66
+ "jose": "^6.0.10",
67
+ "jsonwebtoken": "^9.0.2",
68
+ "knex": "^3.1.0",
69
+ "multer": "^1.4.5-lts.2",
70
+ "next-auth": "^4.24.11",
71
+ "openai": "^4.94.0",
72
+ "papaparse": "^5.5.2",
73
+ "pgvector": "^0.2.0",
74
+ "redis": "^4.7.0",
75
+ "reflect-metadata": "^0.2.2",
76
+ "type-graphql": "^2.0.0-rc.2",
77
+ "uninstall": "^0.0.0",
78
+ "uuid": "^11.1.0",
79
+ "zod": "^3.24.2",
80
+ "zodex": "^0.18.2"
81
+ }
82
+ }
@@ -0,0 +1 @@
1
+ export type ExuluFieldTypes = "text" | "longText" | "shortText" | "number" | "boolean" | "code" | "json"
@@ -0,0 +1,13 @@
1
+ export type STATISTICS_TYPE = "context.retrieve" | "source.update" | "embedder.upsert" | "embedder.delete" | "workflow.run" | "context.upsert" | "tool.call" | "agent.run";
2
+
3
+ export const STATISTICS_TYPE_ENUM = {
4
+ CONTEXT_RETRIEVE: "context.retrieve",
5
+ SOURCE_UPDATE: "source.update",
6
+ EMBEDDER_UPSERT: "embedder.upsert",
7
+ EMBEDDER_GENERATE: "embedder.generate",
8
+ EMBEDDER_DELETE: "embedder.delete",
9
+ WORKFLOW_RUN: "workflow.run",
10
+ CONTEXT_UPSERT: "context.upsert",
11
+ TOOL_CALL: "tool.call",
12
+ AGENT_RUN: "agent.run"
13
+ };
@@ -0,0 +1,15 @@
1
+ // Represents an agent backend
2
+ // which is created and run in
3
+ // the agents service. Agents
4
+ // registered in Exulu must have
5
+ // a connected backend agent that
6
+ // does the actual work.
7
+ export interface AgentBackend {
8
+ id: string
9
+ name: string
10
+ description: string
11
+ enable_batch: boolean
12
+ inputSchema: any;
13
+ slug: string
14
+ type: string
15
+ }
@@ -0,0 +1,17 @@
1
+ export interface AgentSession {
2
+ createdAt: string;
3
+ updatedAt: string;
4
+ id: string;
5
+ metadata: any;
6
+ agentId: string;
7
+ resourceId: string;
8
+ title: string;
9
+ }
10
+ export interface AgentMessage {
11
+ id: string;
12
+ thread_id: string;
13
+ content: string;
14
+ role: "function" | "data" | "user" | "system" | "assistant" | "tool";
15
+ type: string;
16
+ createdAt: Date;
17
+ }
@@ -0,0 +1,23 @@
1
+ export interface Agent {
2
+ id: string;
3
+ backend: string;
4
+ type: "chat" | "flow";
5
+ extensions: string[];
6
+ name: string;
7
+ active?: boolean;
8
+ public?: boolean;
9
+ description?: string;
10
+ slug?: string;
11
+ tools?: {
12
+ id: string;
13
+ description: string;
14
+ type?: "context";
15
+ }[];
16
+ capabilities?: {
17
+ tools: boolean;
18
+ images: string[];
19
+ files: string[];
20
+ audio: string[];
21
+ video: string[];
22
+ }
23
+ }
@@ -0,0 +1,35 @@
1
+ import type { ExuluFieldTypes } from "../enums/field-types"
2
+ import type { Agent } from "./agent"
3
+
4
+ export interface Context {
5
+ id: string
6
+ name: string
7
+ description: string
8
+ embedder: string
9
+ active: boolean
10
+ slug: string
11
+ fields: {
12
+ name: string
13
+ type: ExuluFieldTypes
14
+ }[]
15
+ sources: ContextSource[]
16
+ agents: Agent[]
17
+ }
18
+
19
+ export interface ContextSource {
20
+ id: string
21
+ name: string
22
+ description: string
23
+ updaters: Updater[]
24
+ }
25
+
26
+ export interface Updater {
27
+ id: string
28
+ type: string
29
+ configuration: Configuration
30
+ }
31
+
32
+ export interface Configuration {
33
+ query: string
34
+ }
35
+
@@ -0,0 +1,15 @@
1
+
2
+ // Represents an embedder backend
3
+ // which is created and run in
4
+ // the agents service. Embedders
5
+ // registered in Exulu must have
6
+ // a connected backend that
7
+ // does the actual work.
8
+
9
+ export interface EmbedderBackend {
10
+ id: string
11
+ name: string
12
+ slug: string
13
+ supported: string
14
+ description: string
15
+ }
@@ -0,0 +1,17 @@
1
+ export interface Embedding {
2
+ collection: string
3
+ metadata: {
4
+ certainty: number
5
+ creation_time?: string
6
+ distance?: number
7
+ }
8
+ uuid: string
9
+ properties: {
10
+ chunk_count: string
11
+ chunk_index: string
12
+ external_id: string
13
+ original_content: string
14
+ original_image: string
15
+ original_title: string
16
+ }
17
+ }
@@ -0,0 +1,21 @@
1
+ export interface Item {
2
+ id?: string;
3
+ name?: string;
4
+ description?: string,
5
+ createdAt?: string;
6
+ updatedAt?: string;
7
+ external_id?: string;
8
+ source?: string;
9
+ tags?: string[];
10
+ textLength?: number;
11
+ chunks?: {
12
+ id: string;
13
+ index: number;
14
+ content: string;
15
+ source: string;
16
+ embedding: number;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }[];
20
+ [key: string]: any;
21
+ }
@@ -0,0 +1,8 @@
1
+ export type Job = {
2
+ id: string
3
+ name: string
4
+ status: string
5
+ result?: string
6
+ date_done?: Date
7
+ date_started?: Date
8
+ };
@@ -0,0 +1,8 @@
1
+ export interface Tool {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ type: string;
6
+ inputSchema: any;
7
+ outputSchema: any;
8
+ }
@@ -0,0 +1,6 @@
1
+ export type UserRole = {
2
+ id: string;
3
+ name: string;
4
+ is_admin: boolean;
5
+ agents?: string[];
6
+ };
@@ -0,0 +1,10 @@
1
+ export type User = {
2
+ id: string;
3
+ email: string;
4
+ emailVerified?: string;
5
+ type?: "api" | "user"
6
+ roles?: {
7
+ id: string;
8
+ role: string;
9
+ }[];
10
+ };
@@ -0,0 +1,10 @@
1
+ export const VectorMethodEnum = {
2
+ "cosineDistance": "cosineDistance",
3
+ "l1Distance": "l1Distance",
4
+ "l2Distance": "l2Distance",
5
+ "hammingDistance": "hammingDistance",
6
+ "jaccardDistance": "jaccardDistance",
7
+ "maxInnerProduct": "maxInnerProduct"
8
+ } as const;
9
+
10
+ export type VectorMethod = (typeof VectorMethodEnum)[keyof typeof VectorMethodEnum];