@exulu/backend 5.16.0 → 5.17.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.
@@ -11,7 +11,7 @@ import {
11
11
  resolveModel,
12
12
  waitForLiteLLMReady,
13
13
  withRetry
14
- } from "./chunk-NBDSN45T.js";
14
+ } from "./chunk-NBAFO66K.js";
15
15
  import {
16
16
  resolveLiteLLMTarget
17
17
  } from "./chunk-6URU62NI.js";
@@ -7,6 +7,46 @@ import {
7
7
  setLiteLLMClientMode
8
8
  } from "./chunk-6URU62NI.js";
9
9
 
10
+ // ee/entitlements.ts
11
+ var ENTITLEMENTS = {
12
+ "rbac": false,
13
+ "advanced-markdown-chunker": false,
14
+ "agentic-retrieval": false,
15
+ "queues": false,
16
+ "custom-branding": false,
17
+ "evals": false,
18
+ "template-conversations": false,
19
+ "agent-feedback": false,
20
+ "multi-agent-tooling": false,
21
+ "advanced-document-processing": false,
22
+ "rate-limits": false,
23
+ "claim-check": false,
24
+ "channels": false
25
+ };
26
+ var checkLicense = () => {
27
+ if (!process.env.EXULU_ENTERPRISE_LICENSE || process.env.EXULU_ENTERPRISE_LICENSE === "" || !process.env.EXULU_ENTERPRISE_LICENSE.startsWith("EXULU_EE_")) {
28
+ return ENTITLEMENTS;
29
+ } else {
30
+ return {
31
+ "rbac": true,
32
+ "advanced-markdown-chunker": true,
33
+ "agentic-retrieval": true,
34
+ "mcp": true,
35
+ "queues": true,
36
+ "prompt-library": true,
37
+ "custom-branding": true,
38
+ "evals": true,
39
+ "template-conversations": true,
40
+ "agent-feedback": true,
41
+ "multi-agent-tooling": true,
42
+ "advanced-document-processing": true,
43
+ "rate-limits": true,
44
+ "claim-check": true,
45
+ "channels": true
46
+ };
47
+ }
48
+ };
49
+
10
50
  // src/postgres/client.ts
11
51
  import Knex from "knex";
12
52
  import "pgvector/knex";
@@ -373,44 +413,6 @@ var registerShutdownHandlers = () => {
373
413
  };
374
414
  var getSupervisorState = () => internal.state;
375
415
 
376
- // ee/entitlements.ts
377
- var ENTITLEMENTS = {
378
- "rbac": false,
379
- "advanced-markdown-chunker": false,
380
- "agentic-retrieval": false,
381
- "queues": false,
382
- "custom-branding": false,
383
- "evals": false,
384
- "template-conversations": false,
385
- "agent-feedback": false,
386
- "multi-agent-tooling": false,
387
- "advanced-document-processing": false,
388
- "rate-limits": false,
389
- "claim-check": false
390
- };
391
- var checkLicense = () => {
392
- if (!process.env.EXULU_ENTERPRISE_LICENSE || process.env.EXULU_ENTERPRISE_LICENSE === "" || !process.env.EXULU_ENTERPRISE_LICENSE.startsWith("EXULU_EE_")) {
393
- return ENTITLEMENTS;
394
- } else {
395
- return {
396
- "rbac": true,
397
- "advanced-markdown-chunker": true,
398
- "agentic-retrieval": true,
399
- "mcp": true,
400
- "queues": true,
401
- "prompt-library": true,
402
- "custom-branding": true,
403
- "evals": true,
404
- "template-conversations": true,
405
- "agent-feedback": true,
406
- "multi-agent-tooling": true,
407
- "advanced-document-processing": true,
408
- "rate-limits": true,
409
- "claim-check": true
410
- };
411
- }
412
- };
413
-
414
416
  // src/exulu/resolve-model.ts
415
417
  import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
416
418
 
@@ -1157,6 +1159,7 @@ async function withRetry(generateFn, maxRetries = 3, opts = {}) {
1157
1159
  }
1158
1160
 
1159
1161
  export {
1162
+ checkLicense,
1160
1163
  postgresClient,
1161
1164
  LITELLM_UI_PATH,
1162
1165
  isLiteLLMEnabled,
@@ -1179,7 +1182,6 @@ export {
1179
1182
  getTagBudgetMap,
1180
1183
  provisionDefaultUserBudget,
1181
1184
  getUserBudgetView,
1182
- checkLicense,
1183
1185
  ResolveModelError,
1184
1186
  resolveModel,
1185
1187
  processWideLimiters,
@@ -9,7 +9,7 @@ import {
9
9
  resolveModel,
10
10
  waitForLiteLLMReady,
11
11
  withRetry
12
- } from "./chunk-NBDSN45T.js";
12
+ } from "./chunk-NBAFO66K.js";
13
13
  import {
14
14
  findLiteLLMModel
15
15
  } from "./chunk-F534XOQR.js";
@@ -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-UYF2OK7F.js");
672
+ const { convertExuluToolsToAiSdkTools: convertExuluToolsToAiSdkTools2 } = await import("./convert-exulu-tools-to-ai-sdk-tools-BCHKS5CK.js");
673
673
  const tools = await convertExuluToolsToAiSdkTools2(
674
674
  [this],
675
675
  [],
@@ -10025,6 +10025,41 @@ var workflowTemplatesSchema = {
10025
10025
  }
10026
10026
  ]
10027
10027
  };
10028
+ var agentChannelsSchema = {
10029
+ type: "agent_channels",
10030
+ name: {
10031
+ plural: "agent_channels",
10032
+ singular: "agent_channel"
10033
+ },
10034
+ RBAC: false,
10035
+ graphql: false,
10036
+ fields: [
10037
+ { name: "agent", type: "uuid", required: true, index: true },
10038
+ { name: "type", type: "text", required: true },
10039
+ { name: "enabled", type: "boolean", default: false },
10040
+ { name: "config", type: "json" },
10041
+ { name: "secrets", type: "text", hidden: true },
10042
+ { name: "verify_token", type: "text", hidden: true }
10043
+ ]
10044
+ };
10045
+ var channelLinksSchema = {
10046
+ type: "channel_links",
10047
+ name: {
10048
+ plural: "channel_links",
10049
+ singular: "channel_link"
10050
+ },
10051
+ RBAC: false,
10052
+ graphql: false,
10053
+ fields: [
10054
+ { name: "channel", type: "uuid", required: true, index: true },
10055
+ { name: "identity", type: "text", required: true },
10056
+ { name: "user", type: "number", required: true, index: true },
10057
+ { name: "linked_at", type: "date" },
10058
+ { name: "expires_at", type: "date" },
10059
+ { name: "revoked_at", type: "date" },
10060
+ { name: "last_seen_at", type: "date" }
10061
+ ]
10062
+ };
10028
10063
  var workflowTriggersSchema = {
10029
10064
  type: "workflow_triggers",
10030
10065
  name: {
@@ -11253,6 +11288,10 @@ var coreSchemas = {
11253
11288
  schemas.workflowTemplatesSchema = () => addCoreFields(workflowTemplatesSchema);
11254
11289
  schemas.workflowTriggersSchema = () => addCoreFields(workflowTriggersSchema);
11255
11290
  }
11291
+ if (license["channels"]) {
11292
+ schemas.agentChannelsSchema = () => addCoreFields(agentChannelsSchema);
11293
+ schemas.channelLinksSchema = () => addCoreFields(channelLinksSchema);
11294
+ }
11256
11295
  if (license["queues"]) {
11257
11296
  schemas.jobResultsSchema = () => addCoreFields(jobResultsSchema);
11258
11297
  }
@@ -15540,6 +15579,11 @@ var ENV_CLASSIFICATION = {
15540
15579
  DEBUG: "runtime",
15541
15580
  BACKEND: "runtime",
15542
15581
  FRONTEND: "runtime",
15582
+ // Public web addresses, like BACKEND/FRONTEND: the override and the last
15583
+ // fallback for the WhatsApp link page base (channels/config.ts linkPageUrl),
15584
+ // which normally comes from FRONTEND.
15585
+ CHANNEL_LINK_BASE_URL: "runtime",
15586
+ NEXTAUTH_URL: "runtime",
15543
15587
  // Found via `rg process\.env\.[A-Z0-9_]+ src ee` (Step 3 of the task brief):
15544
15588
  AUTH_MODE: "runtime",
15545
15589
  // "password" | "otp" mode selector, echoed by GET /config
@@ -17601,7 +17645,7 @@ function tooLongForToolNotice(filename, pageCount, maxPages) {
17601
17645
  return `[Document too long: "${filename}" has ${pageCount} pages, the limit for reading a document is ${maxPages} pages (EXULU_DOCUMENT_MAX_PAGES). The document was NOT read. Tell the user plainly and suggest splitting the file.]`;
17602
17646
  }
17603
17647
  var loadDocumentProcessor = async () => {
17604
- const mod = await import("./doc_processor-SVOSOVOY.js");
17648
+ const mod = await import("./doc_processor-RJNG7GGH.js");
17605
17649
  return mod.documentProcessor;
17606
17650
  };
17607
17651
  function pagesToText(pages) {
@@ -19196,6 +19240,7 @@ export {
19196
19240
  buildMemoryPromptBlock,
19197
19241
  normalizeRbac,
19198
19242
  collectMemoryDecisions,
19243
+ PUBLIC_SURFACE_HEADER,
19199
19244
  isPublicSurface,
19200
19245
  treatAsGuest,
19201
19246
  KB_EDITOR_TOOL_ID,
@@ -3,8 +3,8 @@ import {
3
3
  OUTPUT_OFFLOAD_EXEMPT_TOOL_IDS,
4
4
  convertExuluToolsToAiSdkTools,
5
5
  hydrateVariables
6
- } from "./chunk-2FDGX6WH.js";
7
- import "./chunk-NBDSN45T.js";
6
+ } from "./chunk-ZNG2HEDN.js";
7
+ import "./chunk-NBAFO66K.js";
8
8
  import "./chunk-F534XOQR.js";
9
9
  import "./chunk-6URU62NI.js";
10
10
  export {
@@ -2,9 +2,9 @@ import "dotenv/config";
2
2
  import {
3
3
  documentProcessor,
4
4
  reconstructTableHeaders
5
- } from "./chunk-KLPCQWM3.js";
5
+ } from "./chunk-7UDWQTFZ.js";
6
6
  import "./chunk-JIZCKSJO.js";
7
- import "./chunk-NBDSN45T.js";
7
+ import "./chunk-NBAFO66K.js";
8
8
  import "./chunk-6URU62NI.js";
9
9
  export {
10
10
  documentProcessor,