@exulu/backend 5.15.0 → 5.16.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.
@@ -669,7 +669,7 @@ var ExuluTool = class _ExuluTool {
669
669
  if (!agent) {
670
670
  throw new Error("Agent not found.");
671
671
  }
672
- const { convertExuluToolsToAiSdkTools: convertExuluToolsToAiSdkTools2 } = await import("./convert-exulu-tools-to-ai-sdk-tools-GLRM3PM6.js");
672
+ const { convertExuluToolsToAiSdkTools: convertExuluToolsToAiSdkTools2 } = await import("./convert-exulu-tools-to-ai-sdk-tools-UYF2OK7F.js");
673
673
  const tools = await convertExuluToolsToAiSdkTools2(
674
674
  [this],
675
675
  [],
@@ -10344,6 +10344,14 @@ var agentsSchema = {
10344
10344
  name: "welcomemessage",
10345
10345
  type: "text"
10346
10346
  },
10347
+ {
10348
+ // The welcome message in further languages: { "<locale>": "<text>" },
10349
+ // e.g. { "de": "Hallo …" }. `welcomemessage` stays the default (English,
10350
+ // and any language without an entry). Read through welcomeTranslations()
10351
+ // in public-agents.ts. Auto-ALTERed on boot.
10352
+ name: "welcomemessage_translations",
10353
+ type: "json"
10354
+ },
10347
10355
  {
10348
10356
  name: "instructions",
10349
10357
  type: "text"
@@ -3,7 +3,7 @@ import {
3
3
  OUTPUT_OFFLOAD_EXEMPT_TOOL_IDS,
4
4
  convertExuluToolsToAiSdkTools,
5
5
  hydrateVariables
6
- } from "./chunk-S4UXKMN5.js";
6
+ } from "./chunk-2FDGX6WH.js";
7
7
  import "./chunk-NBDSN45T.js";
8
8
  import "./chunk-F534XOQR.js";
9
9
  import "./chunk-6URU62NI.js";
package/dist/index.cjs CHANGED
@@ -6009,6 +6009,14 @@ var init_core_schema = __esm({
6009
6009
  name: "welcomemessage",
6010
6010
  type: "text"
6011
6011
  },
6012
+ {
6013
+ // The welcome message in further languages: { "<locale>": "<text>" },
6014
+ // e.g. { "de": "Hallo …" }. `welcomemessage` stays the default (English,
6015
+ // and any language without an entry). Read through welcomeTranslations()
6016
+ // in public-agents.ts. Auto-ALTERed on boot.
6017
+ name: "welcomemessage_translations",
6018
+ type: "json"
6019
+ },
6012
6020
  {
6013
6021
  name: "instructions",
6014
6022
  type: "text"
@@ -41221,12 +41229,32 @@ init_session_file_adopt();
41221
41229
  // src/exulu/public-agents.ts
41222
41230
  init_cjs_shims();
41223
41231
  init_shared_artifacts();
41232
+ var LOCALE_KEY = /^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$/;
41233
+ var welcomeTranslations = (raw) => {
41234
+ let value = raw;
41235
+ if (typeof value === "string") {
41236
+ try {
41237
+ value = JSON.parse(value);
41238
+ } catch {
41239
+ return {};
41240
+ }
41241
+ }
41242
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
41243
+ const result = {};
41244
+ for (const [key, text] of Object.entries(value)) {
41245
+ if (!LOCALE_KEY.test(key) || typeof text !== "string") continue;
41246
+ const trimmed = text.trim();
41247
+ if (trimmed) result[key] = trimmed;
41248
+ }
41249
+ return result;
41250
+ };
41224
41251
  var publicAgentView = (row, slug) => ({
41225
41252
  id: row.id,
41226
41253
  name: row.name ?? "",
41227
41254
  description: row.description ?? "",
41228
41255
  image: row.image ?? null,
41229
41256
  welcomemessage: row.welcomemessage ?? "",
41257
+ welcomemessage_translations: welcomeTranslations(row.welcomemessage_translations),
41230
41258
  slug,
41231
41259
  guest_auth_mode: row.guest_auth_mode || "regular",
41232
41260
  guest_has_cover: !!row.guest_cover_image,
@@ -45589,6 +45617,7 @@ ${style.markdown}` : params.prompt;
45589
45617
  "description",
45590
45618
  "image",
45591
45619
  "welcomemessage",
45620
+ "welcomemessage_translations",
45592
45621
  "model",
45593
45622
  "guest_auth_mode",
45594
45623
  "guest_cover_image",
package/dist/index.d.cts CHANGED
@@ -103,6 +103,8 @@ interface ExuluAgent {
103
103
  /** Memory behaviour (retrieval limit, visibility preselect, guest display). null = defaults. */
104
104
  memory_config?: Record<string, unknown> | string | null;
105
105
  welcomemessage?: string;
106
+ /** Further language versions of the welcome message, keyed by locale. null = none. */
107
+ welcomemessage_translations?: Record<string, string> | string | null;
106
108
  defaultagent?: boolean;
107
109
  type: "agent";
108
110
  name: string;
package/dist/index.d.ts CHANGED
@@ -103,6 +103,8 @@ interface ExuluAgent {
103
103
  /** Memory behaviour (retrieval limit, visibility preselect, guest display). null = defaults. */
104
104
  memory_config?: Record<string, unknown> | string | null;
105
105
  welcomemessage?: string;
106
+ /** Further language versions of the welcome message, keyed by locale. null = none. */
107
+ welcomemessage_translations?: Record<string, string> | string | null;
106
108
  defaultagent?: boolean;
107
109
  type: "agent";
108
110
  name: string;
package/dist/index.js CHANGED
@@ -245,7 +245,7 @@ import {
245
245
  willEmbedOnQueue,
246
246
  withRunSession,
247
247
  workflowTemplatesSchema
248
- } from "./chunk-S4UXKMN5.js";
248
+ } from "./chunk-2FDGX6WH.js";
249
249
  import {
250
250
  LITELLM_UI_PATH,
251
251
  ResolveModelError,
@@ -17815,12 +17815,32 @@ var verifyRecallRequest = (headers, rawBody, secret = recallVerificationSecret()
17815
17815
  };
17816
17816
 
17817
17817
  // src/exulu/public-agents.ts
17818
+ var LOCALE_KEY = /^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$/;
17819
+ var welcomeTranslations = (raw) => {
17820
+ let value = raw;
17821
+ if (typeof value === "string") {
17822
+ try {
17823
+ value = JSON.parse(value);
17824
+ } catch {
17825
+ return {};
17826
+ }
17827
+ }
17828
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
17829
+ const result = {};
17830
+ for (const [key, text] of Object.entries(value)) {
17831
+ if (!LOCALE_KEY.test(key) || typeof text !== "string") continue;
17832
+ const trimmed = text.trim();
17833
+ if (trimmed) result[key] = trimmed;
17834
+ }
17835
+ return result;
17836
+ };
17818
17837
  var publicAgentView = (row, slug) => ({
17819
17838
  id: row.id,
17820
17839
  name: row.name ?? "",
17821
17840
  description: row.description ?? "",
17822
17841
  image: row.image ?? null,
17823
17842
  welcomemessage: row.welcomemessage ?? "",
17843
+ welcomemessage_translations: welcomeTranslations(row.welcomemessage_translations),
17824
17844
  slug,
17825
17845
  guest_auth_mode: row.guest_auth_mode || "regular",
17826
17846
  guest_has_cover: !!row.guest_cover_image,
@@ -22173,6 +22193,7 @@ ${style.markdown}` : params.prompt;
22173
22193
  "description",
22174
22194
  "image",
22175
22195
  "welcomemessage",
22196
+ "welcomemessage_translations",
22176
22197
  "model",
22177
22198
  "guest_auth_mode",
22178
22199
  "guest_cover_image",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exulu/backend",
3
3
  "author": "Qventu B.V.",
4
- "version": "5.15.0",
4
+ "version": "5.16.0",
5
5
  "main": "./dist/index.js",
6
6
  "private": false,
7
7
  "publishConfig": {