@exulu/backend 1.39.1 → 1.39.3
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 +2 -2
- package/changelog-backend-10.11.2025_03.12.2025.md +316 -0
- package/dist/index.cjs +29 -5
- package/dist/index.js +29 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [1.39.
|
|
1
|
+
## [1.39.3](https://github.com/Qventu/exulu-backend/compare/v1.39.2...v1.39.3) (2025-12-03)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* add version number to return headers ([57ea1dc](https://github.com/Qventu/exulu-backend/commit/57ea1dc0ec85ec49d2e4a839a522fd6215c1857e))
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
|
|
2
|
+
----
|
|
3
|
+
|
|
4
|
+
### feat: add project-scoped context retrieval and enhanced personalization
|
|
5
|
+
|
|
6
|
+
Date: 2025-12-03
|
|
7
|
+
Author: dclaessen-exulu
|
|
8
|
+
|
|
9
|
+
This commit introduces a comprehensive project-based information retrieval
|
|
10
|
+
system and several enhancements to the agent and context infrastructure:
|
|
11
|
+
|
|
12
|
+
**Project Context Retrieval:**
|
|
13
|
+
- Add createProjectRetrievalTool for project-specific information search
|
|
14
|
+
across multiple contexts
|
|
15
|
+
- Implement project caching mechanism to optimize repeated project queries
|
|
16
|
+
- Support hybrid search across project items with filtering and ranking
|
|
17
|
+
- Enable automatic project tool injection when session has associated
|
|
18
|
+
project
|
|
19
|
+
|
|
20
|
+
**Enhanced Personalization:**
|
|
21
|
+
- Add firstname/lastname fields to user authentication for API users
|
|
22
|
+
- Include user information in system prompts for better personalization
|
|
23
|
+
- Make personalization configurable via privacy settings
|
|
24
|
+
|
|
25
|
+
**Field Processor Improvements:**
|
|
26
|
+
- Add generateEmbeddings configuration option to field processors
|
|
27
|
+
- Support onInsert trigger in addition to existing triggers
|
|
28
|
+
- Enable processors to run without user context for system operations
|
|
29
|
+
- Improve processor execution flow with better logging
|
|
30
|
+
|
|
31
|
+
**Infrastructure Enhancements:**
|
|
32
|
+
- Add database connection pool logging for debugging
|
|
33
|
+
- Improve file parts processing with better error handling
|
|
34
|
+
- Make convertToolsArrayToObject async to support dynamic tool generation
|
|
35
|
+
- Enhance storage utility to support uploads without user context
|
|
36
|
+
- Better handling of tool variable configs vs execution configs
|
|
37
|
+
- Comment out unused project_id from RBAC schema
|
|
38
|
+
|
|
39
|
+
**Context and Search Improvements:**
|
|
40
|
+
- Add search method directly to ExuluContext class
|
|
41
|
+
- Expose applyFilters and contextToTableDefinition utilities
|
|
42
|
+
- Support context source execution with exuluConfig parameter
|
|
43
|
+
- Improve error messages and reduce excessive logging
|
|
44
|
+
|
|
45
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
46
|
+
|
|
47
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
48
|
+
|
|
49
|
+
----
|
|
50
|
+
|
|
51
|
+
### feat: add document parsing for AI agent file handling with JWT secret fix
|
|
52
|
+
|
|
53
|
+
Date: 2025-11-30
|
|
54
|
+
Author: dclaessen-exulu
|
|
55
|
+
|
|
56
|
+
Enhance agent file processing capabilities and fix authentication:
|
|
57
|
+
|
|
58
|
+
- Add officeparser integration to extract text from document files
|
|
59
|
+
- Implement processFilePartsInMessages to convert file parts to
|
|
60
|
+
OpenAI Responses API compatible format
|
|
61
|
+
- Convert document files to text parts with extracted content
|
|
62
|
+
- Keep image files as image parts (natively supported by API)
|
|
63
|
+
- Add message deduplication to prevent duplicate message IDs
|
|
64
|
+
- Change saveChat to process messages sequentially for correct
|
|
65
|
+
timestamp ordering
|
|
66
|
+
- Fix JWT verification in getToken by converting NEXTAUTH_SECRET
|
|
67
|
+
to base64url format as required by jose library
|
|
68
|
+
|
|
69
|
+
This enables agents to process uploaded documents by extracting
|
|
70
|
+
their text content and presenting it in a format compatible with
|
|
71
|
+
the OpenAI Responses API.
|
|
72
|
+
|
|
73
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
74
|
+
|
|
75
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
76
|
+
|
|
77
|
+
----
|
|
78
|
+
|
|
79
|
+
### feat: add PDF preview tool and enhance agent API with cookie authentication and message persistence
|
|
80
|
+
|
|
81
|
+
Date: 2025-11-26
|
|
82
|
+
Author: dclaessen-exulu
|
|
83
|
+
|
|
84
|
+
Adds a new preview-pdf tool for viewing PDF documents and significantly enhances the agent
|
|
85
|
+
chat API to support public agents with optional authentication. Implements cookie-based session
|
|
86
|
+
management, message ID tracking to prevent duplicates during chat persistence, and allows
|
|
87
|
+
passing full message arrays for stateless interactions.
|
|
88
|
+
|
|
89
|
+
Also downgrades AI SDK from v5.0.95 to v5.0.65 for stability, adds cookie-parser dependency,
|
|
90
|
+
and improves context embedding generation with better metadata handling and increased timeout
|
|
91
|
+
limits. Enhances S3 integration with multi-bucket support via key notation [bucket:name],
|
|
92
|
+
improves vector search result limits, and adds better error handling for encrypted variables
|
|
93
|
+
and external ID lookups in context operations.
|
|
94
|
+
|
|
95
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
96
|
+
|
|
97
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
98
|
+
|
|
99
|
+
----
|
|
100
|
+
|
|
101
|
+
### fix: issue with upsert
|
|
102
|
+
|
|
103
|
+
Date: 2025-11-19
|
|
104
|
+
Author: dclaessen-exulu
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
----
|
|
108
|
+
|
|
109
|
+
### feat: upgrade AI SDK to v5.0.95 and add Gemini 3 Pro support with parameterized context sources
|
|
110
|
+
|
|
111
|
+
Date: 2025-11-19
|
|
112
|
+
Author: dclaessen-exulu
|
|
113
|
+
|
|
114
|
+
This commit introduces several enhancements to the AI capabilities and context system:
|
|
115
|
+
|
|
116
|
+
- Upgrade AI SDK from v5.0.56 to v5.0.95 with improved provider utilities
|
|
117
|
+
- Add @vercel/oidc dependency for enhanced authentication support
|
|
118
|
+
- Implement Google Vertex Gemini 3 Pro agent with 1M+ token context window
|
|
119
|
+
- Enhance context source configuration with parameterizable inputs
|
|
120
|
+
- Improve Vertex authentication documentation with detailed setup instructions
|
|
121
|
+
- Add support for dynamic parameters in context source definitions via GraphQL schema
|
|
122
|
+
|
|
123
|
+
The new Gemini 3 Pro agent provides very high intelligence with moderate speed,
|
|
124
|
+
supporting text, images, files, audio, and video inputs. Context sources can now
|
|
125
|
+
define parameters with names, descriptions, and default values for more flexible
|
|
126
|
+
data retrieval configurations.
|
|
127
|
+
|
|
128
|
+
Changes include:
|
|
129
|
+
- src/index.ts: Export new vertexGemini3ProAgent
|
|
130
|
+
- src/registry/index.ts: Register Gemini 3 Pro agent
|
|
131
|
+
- src/registry/classes.ts: Add params field to ExuluContextSource config
|
|
132
|
+
- src/registry/utils/graphql.ts: Add ContextSourceParam type and params support
|
|
133
|
+
- src/templates/agents/google/vertex/index.ts: Add Gemini 3 Pro agent, refactor auth docs
|
|
134
|
+
- types/models/context.ts: Add params field to Context interface
|
|
135
|
+
|
|
136
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
137
|
+
|
|
138
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
139
|
+
|
|
140
|
+
----
|
|
141
|
+
|
|
142
|
+
### feat: add Google Vertex AI agent support and enhance embedder configuration system
|
|
143
|
+
|
|
144
|
+
Date: 2025-11-18
|
|
145
|
+
Author: dclaessen-exulu
|
|
146
|
+
|
|
147
|
+
Add Google Vertex Gemini 2.5 Flash agent integration with support for
|
|
148
|
+
optional authentication. Implement new embedder_settings table for
|
|
149
|
+
context-specific embedder configuration with variable management.
|
|
150
|
+
|
|
151
|
+
Major changes:
|
|
152
|
+
- Add vertexGemini25FlashAgent to default agents and registry
|
|
153
|
+
- Implement embedder_settings schema for per-context embedder config
|
|
154
|
+
- Add authenticationInformation field to ExuluAgent class
|
|
155
|
+
- Make providerapikey optional across agent and MCP initialization
|
|
156
|
+
- Add config field to ExuluEmbedder with hydrateEmbedderConfig method
|
|
157
|
+
- Pass context ID and settings to embedder chunker and generation ops
|
|
158
|
+
- Update GraphQL schema to expose authenticationInformation and config
|
|
159
|
+
- Enhance error messages with agent name and ID for better debugging
|
|
160
|
+
|
|
161
|
+
Breaking changes:
|
|
162
|
+
- ChunkerOperation signature now requires config parameter
|
|
163
|
+
- VectorGenerateOperation signature now requires settings parameter
|
|
164
|
+
- convertToolsArrayToObject contexts parameter now optional
|
|
165
|
+
|
|
166
|
+
This enables agents that don't require API keys (e.g., Vertex AI with
|
|
167
|
+
workload identity) and allows embedders to retrieve configuration from
|
|
168
|
+
variables per context.
|
|
169
|
+
|
|
170
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
171
|
+
|
|
172
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
173
|
+
|
|
174
|
+
----
|
|
175
|
+
|
|
176
|
+
### fix: project tracking anthropic passthrough and timeout for worker
|
|
177
|
+
|
|
178
|
+
Date: 2025-11-17
|
|
179
|
+
Author: dclaessen-exulu
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
----
|
|
183
|
+
|
|
184
|
+
### feat: add MCP prompt library integration and JSON filtering enhancements
|
|
185
|
+
|
|
186
|
+
Date: 2025-11-17
|
|
187
|
+
Author: dclaessen-exulu
|
|
188
|
+
|
|
189
|
+
Add comprehensive prompt template management via MCP tools and enhanced JSON field filtering:
|
|
190
|
+
|
|
191
|
+
Prompt Library Features:
|
|
192
|
+
- Add prompt_library and prompt_favorites database schemas
|
|
193
|
+
- Register getListOfPromptTemplates and getPromptTemplateDetails MCP tools
|
|
194
|
+
- Enable agents to discover and retrieve prompt templates with usage/favorite tracking
|
|
195
|
+
- Support agent-specific prompt assignment via assigned_agents JSON field
|
|
196
|
+
|
|
197
|
+
GraphQL & Filtering Improvements:
|
|
198
|
+
- Add JSON field containment support using PostgreSQL @> operator
|
|
199
|
+
- Enhance filter operators to handle JSON equality and IN operations with jsonb casting
|
|
200
|
+
- Pass table schema context to applyFilters for type-aware query building
|
|
201
|
+
|
|
202
|
+
Bug Fixes & Refinements:
|
|
203
|
+
- Fix upsert validation to require id or external_id
|
|
204
|
+
- Add source update statistics tracking for API and job triggers
|
|
205
|
+
- Improve eval function result metadata structure with function_results array
|
|
206
|
+
- Add default scoring method fallback to average for eval runs
|
|
207
|
+
- Fix typo: rename eval to evaluation in bullmq decorator
|
|
208
|
+
|
|
209
|
+
Configuration:
|
|
210
|
+
- Add .mcp.json for exulu-mcp-server-default-coding-agent integration
|
|
211
|
+
|
|
212
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
213
|
+
|
|
214
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
215
|
+
|
|
216
|
+
----
|
|
217
|
+
|
|
218
|
+
### feat: add todo system, enhanced roles, session metadata, and scheduling support
|
|
219
|
+
|
|
220
|
+
Date: 2025-11-14
|
|
221
|
+
Author: dclaessen-exulu
|
|
222
|
+
|
|
223
|
+
This commit introduces several significant features and improvements to the Exulu backend:
|
|
224
|
+
|
|
225
|
+
- Implement TodoWrite and TodoRead tools for session-based task tracking
|
|
226
|
+
- Store todos in agent_sessions.metadata JSON field
|
|
227
|
+
- Add access control checks for todo operations
|
|
228
|
+
- Tools require authenticated session context
|
|
229
|
+
|
|
230
|
+
- Create default "admin" role with full write permissions
|
|
231
|
+
- Create "default" role with agent write + read-only for other resources
|
|
232
|
+
- Add support for "evals" and "api" permissions in role structure
|
|
233
|
+
- Automatically provision both roles during database initialization
|
|
234
|
+
|
|
235
|
+
- Add metadata JSON column to agent_sessions table
|
|
236
|
+
- Pass sessionID throughout tool execution pipeline
|
|
237
|
+
- Implement getSession helper for consistent session retrieval
|
|
238
|
+
- Enable session-aware tool execution with user context
|
|
239
|
+
|
|
240
|
+
- Add cron-like scheduling support for context data sources
|
|
241
|
+
- Implement queue configuration options
|
|
242
|
+
- Add retry logic with exponential/linear backoff strategies
|
|
243
|
+
- Enable automated data ingestion workflows
|
|
244
|
+
|
|
245
|
+
- Fix Redis URL construction when using authentication
|
|
246
|
+
- Improve handling of username/password credentials
|
|
247
|
+
- Better fallback values for missing environment variables
|
|
248
|
+
|
|
249
|
+
- Support config-based tool description overrides
|
|
250
|
+
- Pass sessionID to all tool executions
|
|
251
|
+
- Enable tools to access session metadata
|
|
252
|
+
- Improve tool configuration hydration
|
|
253
|
+
|
|
254
|
+
- Add better-auth (v1.3.34) with WebAuthn support
|
|
255
|
+
- Include cryptography libraries (@noble/ciphers, @noble/hashes)
|
|
256
|
+
- Add @simplewebauthn packages for authentication flows
|
|
257
|
+
- Include kysely for type-safe database queries
|
|
258
|
+
|
|
259
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
260
|
+
|
|
261
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
262
|
+
|
|
263
|
+
----
|
|
264
|
+
|
|
265
|
+
### fix: add ExuluItem as export
|
|
266
|
+
|
|
267
|
+
Date: 2025-11-11
|
|
268
|
+
Author: dclaessen-exulu
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
----
|
|
272
|
+
|
|
273
|
+
### feat: implement scheduled data sources for contexts
|
|
274
|
+
|
|
275
|
+
Date: 2025-11-11
|
|
276
|
+
Author: dclaessen-exulu
|
|
277
|
+
|
|
278
|
+
Add support for scheduled data sources within ExuluContext that automatically
|
|
279
|
+
fetch and ingest items at regular intervals.
|
|
280
|
+
|
|
281
|
+
Key changes:
|
|
282
|
+
- Introduce ExuluContextSource type with configurable cron schedules, retry
|
|
283
|
+
logic, and backoff strategies
|
|
284
|
+
- Add source execution handler in BullMQ workers to process scheduled jobs
|
|
285
|
+
- Create automatic job schedulers for each context source with configurable
|
|
286
|
+
retry attempts (default: 3) and exponential backoff (default: 2000ms)
|
|
287
|
+
- Rename Context.process() to processField() for clarity
|
|
288
|
+
- Add executeSource() method to handle source execution and item creation
|
|
289
|
+
- Track source metadata in BullMQ job data for job identification
|
|
290
|
+
|
|
291
|
+
Sources enable automated data ingestion workflows where external data can be
|
|
292
|
+
pulled into contexts on a schedule without manual intervention. Each source
|
|
293
|
+
execution creates items in the context and optionally schedules follow-up
|
|
294
|
+
processing jobs for embeddings and chunking.
|
|
295
|
+
|
|
296
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
297
|
+
|
|
298
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
299
|
+
|
|
300
|
+
----
|
|
301
|
+
|
|
302
|
+
### fix: minor exulu upgrade for redis connection
|
|
303
|
+
|
|
304
|
+
Date: 2025-11-10
|
|
305
|
+
Author: dclaessen-exulu
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
----
|
|
309
|
+
|
|
310
|
+
### fix: redis auth url
|
|
311
|
+
|
|
312
|
+
Date: 2025-11-10
|
|
313
|
+
Author: dclaessen-exulu
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
----
|
package/dist/index.cjs
CHANGED
|
@@ -5612,14 +5612,19 @@ var ExuluAgent2 = class {
|
|
|
5612
5612
|
if (part.type !== "file") {
|
|
5613
5613
|
return part;
|
|
5614
5614
|
}
|
|
5615
|
+
console.log(`[EXULU] Processing part`, part);
|
|
5615
5616
|
const { mediaType, url, filename } = part;
|
|
5616
|
-
|
|
5617
|
-
|
|
5617
|
+
console.log(`[EXULU] Media type: ${mediaType}`);
|
|
5618
|
+
console.log(`[EXULU] URL: ${url}`);
|
|
5619
|
+
console.log(`[EXULU] Filename: ${filename}`);
|
|
5620
|
+
const imageTypes = [".png", ".jpeg", ".jpg", ".gif", ".webp"];
|
|
5621
|
+
const imageType = imageTypes.find((type) => filename.toLowerCase().includes(type.toLowerCase()));
|
|
5622
|
+
if (imageType) {
|
|
5618
5623
|
console.log(`[EXULU] Converting file part to image part: ${filename} `);
|
|
5619
5624
|
return {
|
|
5620
|
-
type: "
|
|
5621
|
-
|
|
5622
|
-
|
|
5625
|
+
type: "file",
|
|
5626
|
+
mediaType: `image/${imageType.replace(".", "")}`,
|
|
5627
|
+
url
|
|
5623
5628
|
};
|
|
5624
5629
|
}
|
|
5625
5630
|
console.log(`[EXULU] Converting file part to text using officeparser: ${filename}`);
|
|
@@ -6679,6 +6684,18 @@ var CLAUDE_MESSAGES = {
|
|
|
6679
6684
|
var import_ai2 = require("ai");
|
|
6680
6685
|
var import_cookie_parser = __toESM(require("cookie-parser"), 1);
|
|
6681
6686
|
var REQUEST_SIZE_LIMIT = "50mb";
|
|
6687
|
+
var getExuluVersionNumber = async () => {
|
|
6688
|
+
try {
|
|
6689
|
+
const path = process.cwd();
|
|
6690
|
+
const packageJson = import_fs.default.readFileSync(path + "/package.json", "utf8");
|
|
6691
|
+
const packageData = JSON.parse(packageJson);
|
|
6692
|
+
const exuluVersion = packageData.dependencies["@exulu/backend"];
|
|
6693
|
+
console.log(`[EXULU] Installed exulu-backend version: ${exuluVersion}`);
|
|
6694
|
+
return exuluVersion;
|
|
6695
|
+
} catch (error) {
|
|
6696
|
+
console.error("Could not find or import package.json:", error.message);
|
|
6697
|
+
}
|
|
6698
|
+
};
|
|
6682
6699
|
var global_queues = {
|
|
6683
6700
|
eval_runs: "eval_runs"
|
|
6684
6701
|
};
|
|
@@ -6715,6 +6732,13 @@ var createExpressRoutes = async (app, agents, tools, contexts, config, evals, tr
|
|
|
6715
6732
|
app.use(import_body_parser.default.urlencoded({ extended: true, limit: REQUEST_SIZE_LIMIT }));
|
|
6716
6733
|
app.use(import_body_parser.default.json({ limit: REQUEST_SIZE_LIMIT }));
|
|
6717
6734
|
app.use((0, import_cookie_parser.default)());
|
|
6735
|
+
app.use(async (req, res, next) => {
|
|
6736
|
+
const version = await getExuluVersionNumber();
|
|
6737
|
+
if (version) {
|
|
6738
|
+
res.setHeader("exulu-version", version);
|
|
6739
|
+
}
|
|
6740
|
+
next();
|
|
6741
|
+
});
|
|
6718
6742
|
console.log(`
|
|
6719
6743
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557
|
|
6720
6744
|
\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551
|
package/dist/index.js
CHANGED
|
@@ -5579,14 +5579,19 @@ var ExuluAgent2 = class {
|
|
|
5579
5579
|
if (part.type !== "file") {
|
|
5580
5580
|
return part;
|
|
5581
5581
|
}
|
|
5582
|
+
console.log(`[EXULU] Processing part`, part);
|
|
5582
5583
|
const { mediaType, url, filename } = part;
|
|
5583
|
-
|
|
5584
|
-
|
|
5584
|
+
console.log(`[EXULU] Media type: ${mediaType}`);
|
|
5585
|
+
console.log(`[EXULU] URL: ${url}`);
|
|
5586
|
+
console.log(`[EXULU] Filename: ${filename}`);
|
|
5587
|
+
const imageTypes = [".png", ".jpeg", ".jpg", ".gif", ".webp"];
|
|
5588
|
+
const imageType = imageTypes.find((type) => filename.toLowerCase().includes(type.toLowerCase()));
|
|
5589
|
+
if (imageType) {
|
|
5585
5590
|
console.log(`[EXULU] Converting file part to image part: ${filename} `);
|
|
5586
5591
|
return {
|
|
5587
|
-
type: "
|
|
5588
|
-
|
|
5589
|
-
|
|
5592
|
+
type: "file",
|
|
5593
|
+
mediaType: `image/${imageType.replace(".", "")}`,
|
|
5594
|
+
url
|
|
5590
5595
|
};
|
|
5591
5596
|
}
|
|
5592
5597
|
console.log(`[EXULU] Converting file part to text using officeparser: ${filename}`);
|
|
@@ -6646,6 +6651,18 @@ var CLAUDE_MESSAGES = {
|
|
|
6646
6651
|
import { createIdGenerator } from "ai";
|
|
6647
6652
|
import cookieParser from "cookie-parser";
|
|
6648
6653
|
var REQUEST_SIZE_LIMIT = "50mb";
|
|
6654
|
+
var getExuluVersionNumber = async () => {
|
|
6655
|
+
try {
|
|
6656
|
+
const path = process.cwd();
|
|
6657
|
+
const packageJson = fs.readFileSync(path + "/package.json", "utf8");
|
|
6658
|
+
const packageData = JSON.parse(packageJson);
|
|
6659
|
+
const exuluVersion = packageData.dependencies["@exulu/backend"];
|
|
6660
|
+
console.log(`[EXULU] Installed exulu-backend version: ${exuluVersion}`);
|
|
6661
|
+
return exuluVersion;
|
|
6662
|
+
} catch (error) {
|
|
6663
|
+
console.error("Could not find or import package.json:", error.message);
|
|
6664
|
+
}
|
|
6665
|
+
};
|
|
6649
6666
|
var global_queues = {
|
|
6650
6667
|
eval_runs: "eval_runs"
|
|
6651
6668
|
};
|
|
@@ -6682,6 +6699,13 @@ var createExpressRoutes = async (app, agents, tools, contexts, config, evals, tr
|
|
|
6682
6699
|
app.use(bodyParser.urlencoded({ extended: true, limit: REQUEST_SIZE_LIMIT }));
|
|
6683
6700
|
app.use(bodyParser.json({ limit: REQUEST_SIZE_LIMIT }));
|
|
6684
6701
|
app.use(cookieParser());
|
|
6702
|
+
app.use(async (req, res, next) => {
|
|
6703
|
+
const version = await getExuluVersionNumber();
|
|
6704
|
+
if (version) {
|
|
6705
|
+
res.setHeader("exulu-version", version);
|
|
6706
|
+
}
|
|
6707
|
+
next();
|
|
6708
|
+
});
|
|
6685
6709
|
console.log(`
|
|
6686
6710
|
\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557
|
|
6687
6711
|
\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551
|