librechat-data-provider 0.8.402 → 0.8.404

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.
Files changed (109) hide show
  1. package/dist/index.es.js +1 -1
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/react-query/index.es.js +1 -1
  6. package/dist/react-query/index.es.js.map +1 -1
  7. package/dist/types/accessPermissions.d.ts +744 -0
  8. package/dist/types/actions.d.ts +118 -0
  9. package/dist/types/api-endpoints.d.ts +150 -0
  10. package/dist/types/artifacts.d.ts +97 -0
  11. package/dist/types/azure.d.ts +22 -0
  12. package/dist/types/bedrock.d.ts +1220 -0
  13. package/dist/types/config.d.ts +14849 -0
  14. package/dist/types/config.spec.d.ts +1 -0
  15. package/dist/types/createPayload.d.ts +5 -0
  16. package/dist/types/data-service.d.ts +287 -0
  17. package/dist/types/feedback.d.ts +36 -0
  18. package/dist/types/file-config.d.ts +263 -0
  19. package/dist/types/file-config.spec.d.ts +1 -0
  20. package/dist/types/generate.d.ts +597 -0
  21. package/dist/types/headers-helpers.d.ts +2 -0
  22. package/{src/index.ts → dist/types/index.d.ts} +0 -15
  23. package/dist/types/keys.d.ts +92 -0
  24. package/dist/types/mcp.d.ts +2760 -0
  25. package/dist/types/messages.d.ts +10 -0
  26. package/dist/types/models.d.ts +1547 -0
  27. package/dist/types/parameterSettings.d.ts +69 -0
  28. package/dist/types/parsers.d.ts +110 -0
  29. package/dist/types/permissions.d.ts +522 -0
  30. package/dist/types/react-query/react-query-service.d.ts +85 -0
  31. package/dist/types/request.d.ts +25 -0
  32. package/dist/types/roles.d.ts +554 -0
  33. package/dist/types/roles.spec.d.ts +1 -0
  34. package/dist/types/schemas.d.ts +5110 -0
  35. package/dist/types/schemas.spec.d.ts +1 -0
  36. package/dist/types/types/agents.d.ts +433 -0
  37. package/dist/types/types/assistants.d.ts +547 -0
  38. package/dist/types/types/files.d.ts +172 -0
  39. package/dist/types/types/graph.d.ts +135 -0
  40. package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
  41. package/dist/types/types/mutations.d.ts +209 -0
  42. package/dist/types/types/queries.d.ts +169 -0
  43. package/dist/types/types/runs.d.ts +36 -0
  44. package/dist/types/types/web.d.ts +520 -0
  45. package/dist/types/types.d.ts +503 -0
  46. package/dist/types/utils.d.ts +12 -0
  47. package/package.json +5 -1
  48. package/babel.config.js +0 -4
  49. package/check_updates.sh +0 -52
  50. package/jest.config.js +0 -19
  51. package/react-query/package-lock.json +0 -292
  52. package/react-query/package.json +0 -10
  53. package/rollup.config.js +0 -74
  54. package/server-rollup.config.js +0 -40
  55. package/specs/actions.spec.ts +0 -2533
  56. package/specs/api-endpoints-subdir.spec.ts +0 -140
  57. package/specs/api-endpoints.spec.ts +0 -74
  58. package/specs/azure.spec.ts +0 -844
  59. package/specs/bedrock.spec.ts +0 -862
  60. package/specs/filetypes.spec.ts +0 -175
  61. package/specs/generate.spec.ts +0 -770
  62. package/specs/headers-helpers.spec.ts +0 -24
  63. package/specs/mcp.spec.ts +0 -147
  64. package/specs/openapiSpecs.ts +0 -524
  65. package/specs/parsers.spec.ts +0 -601
  66. package/specs/request-interceptor.spec.ts +0 -304
  67. package/specs/utils.spec.ts +0 -196
  68. package/src/accessPermissions.ts +0 -346
  69. package/src/actions.ts +0 -813
  70. package/src/api-endpoints.ts +0 -440
  71. package/src/artifacts.ts +0 -3104
  72. package/src/azure.ts +0 -328
  73. package/src/bedrock.ts +0 -425
  74. package/src/config.spec.ts +0 -315
  75. package/src/config.ts +0 -2006
  76. package/src/createPayload.ts +0 -46
  77. package/src/data-service.ts +0 -1087
  78. package/src/feedback.ts +0 -141
  79. package/src/file-config.spec.ts +0 -1248
  80. package/src/file-config.ts +0 -764
  81. package/src/generate.ts +0 -634
  82. package/src/headers-helpers.ts +0 -13
  83. package/src/keys.ts +0 -99
  84. package/src/mcp.ts +0 -271
  85. package/src/messages.ts +0 -50
  86. package/src/models.ts +0 -69
  87. package/src/parameterSettings.ts +0 -1111
  88. package/src/parsers.ts +0 -563
  89. package/src/permissions.ts +0 -188
  90. package/src/react-query/react-query-service.ts +0 -566
  91. package/src/request.ts +0 -171
  92. package/src/roles.spec.ts +0 -132
  93. package/src/roles.ts +0 -225
  94. package/src/schemas.spec.ts +0 -355
  95. package/src/schemas.ts +0 -1234
  96. package/src/types/agents.ts +0 -470
  97. package/src/types/assistants.ts +0 -654
  98. package/src/types/files.ts +0 -191
  99. package/src/types/graph.ts +0 -145
  100. package/src/types/mutations.ts +0 -422
  101. package/src/types/queries.ts +0 -208
  102. package/src/types/runs.ts +0 -40
  103. package/src/types/web.ts +0 -588
  104. package/src/types.ts +0 -676
  105. package/src/utils.ts +0 -85
  106. package/tsconfig.json +0 -28
  107. package/tsconfig.spec.json +0 -10
  108. /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
  109. /package/{src/types/index.ts → dist/types/types/index.d.ts} +0 -0
package/src/utils.ts DELETED
@@ -1,85 +0,0 @@
1
- export const envVarRegex = /^\${(.+)}$/;
2
-
3
- /**
4
- * Infrastructure env vars that must never be resolved via placeholder expansion.
5
- * These are internal secrets whose exposure would compromise the system —
6
- * they have no legitimate reason to appear in outbound headers, MCP env/args, or OAuth config.
7
- *
8
- * Intentionally excludes API keys (operators reference them in config) and
9
- * OAuth/session secrets (referenced in MCP OAuth config via processMCPEnv).
10
- */
11
- const SENSITIVE_ENV_VARS = new Set([
12
- 'JWT_SECRET',
13
- 'JWT_REFRESH_SECRET',
14
- 'CREDS_KEY',
15
- 'CREDS_IV',
16
- 'MEILI_MASTER_KEY',
17
- 'MONGO_URI',
18
- 'REDIS_URI',
19
- 'REDIS_PASSWORD',
20
- ]);
21
-
22
- /** Returns true when `varName` refers to an infrastructure secret that must not leak. */
23
- export function isSensitiveEnvVar(varName: string): boolean {
24
- return SENSITIVE_ENV_VARS.has(varName);
25
- }
26
-
27
- /** Extracts the environment variable name from a template literal string */
28
- export function extractVariableName(value: string): string | null {
29
- if (!value) {
30
- return null;
31
- }
32
-
33
- const match = value.trim().match(envVarRegex);
34
- return match ? match[1] : null;
35
- }
36
-
37
- /** Extracts the value of an environment variable from a string. */
38
- export function extractEnvVariable(value: string) {
39
- if (!value) {
40
- return value;
41
- }
42
-
43
- const trimmed = value.trim();
44
-
45
- const singleMatch = trimmed.match(envVarRegex);
46
- if (singleMatch) {
47
- const varName = singleMatch[1];
48
- if (isSensitiveEnvVar(varName)) {
49
- return trimmed;
50
- }
51
- return process.env[varName] || trimmed;
52
- }
53
-
54
- const regex = /\${([^}]+)}/g;
55
- let result = trimmed;
56
-
57
- const matches = [];
58
- let match;
59
- while ((match = regex.exec(trimmed)) !== null) {
60
- matches.push({
61
- fullMatch: match[0],
62
- varName: match[1],
63
- index: match.index,
64
- });
65
- }
66
-
67
- for (let i = matches.length - 1; i >= 0; i--) {
68
- const { fullMatch, varName, index } = matches[i];
69
- if (isSensitiveEnvVar(varName)) {
70
- continue;
71
- }
72
- const envValue = process.env[varName] || fullMatch;
73
- result = result.substring(0, index) + envValue + result.substring(index + fullMatch.length);
74
- }
75
-
76
- return result;
77
- }
78
-
79
- /**
80
- * Normalize the endpoint name to system-expected value.
81
- * @param name
82
- */
83
- export function normalizeEndpointName(name = ''): string {
84
- return name.toLowerCase() === 'ollama' ? 'ollama' : name;
85
- }
package/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "declaration": true,
4
- "declarationDir": "./dist/types",
5
- "module": "esnext",
6
- "noImplicitAny": true,
7
- "outDir": "./types",
8
- "target": "es5",
9
- "moduleResolution": "node",
10
- "allowSyntheticDefaultImports": true,
11
- "lib": ["es2017", "dom", "ES2021.String"],
12
- "allowJs": true,
13
- "skipLibCheck": true,
14
- "esModuleInterop": true,
15
- "strict": true,
16
- "forceConsistentCasingInFileNames": true,
17
- "resolveJsonModule": true,
18
- "isolatedModules": true,
19
- "noEmit": true,
20
- "sourceMap": true,
21
- "baseUrl": ".",
22
- "paths": {
23
- "librechat-data-provider/react-query": ["./src/react-query/index.ts"]
24
- }
25
- },
26
- "exclude": ["node_modules", "dist", "types"],
27
- "include": ["src/**/*", "types/index.d.ts", "types/react-query/index.d.ts"]
28
- }
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "noEmit": true,
5
- "outDir": "./dist/tests",
6
- "baseUrl": "."
7
- },
8
- "include": ["specs/**/*", "src/**/*"],
9
- "exclude": ["node_modules", "dist"]
10
- }