librechat-data-provider 0.8.402 → 0.8.403

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 (103) hide show
  1. package/dist/types/accessPermissions.d.ts +744 -0
  2. package/dist/types/actions.d.ts +118 -0
  3. package/dist/types/api-endpoints.d.ts +149 -0
  4. package/dist/types/artifacts.d.ts +97 -0
  5. package/dist/types/azure.d.ts +22 -0
  6. package/dist/types/bedrock.d.ts +1220 -0
  7. package/dist/types/config.d.ts +13916 -0
  8. package/dist/types/config.spec.d.ts +1 -0
  9. package/dist/types/createPayload.d.ts +5 -0
  10. package/dist/types/data-service.d.ts +284 -0
  11. package/dist/types/feedback.d.ts +36 -0
  12. package/dist/types/file-config.d.ts +263 -0
  13. package/dist/types/file-config.spec.d.ts +1 -0
  14. package/dist/types/generate.d.ts +597 -0
  15. package/dist/types/headers-helpers.d.ts +2 -0
  16. package/{src/index.ts → dist/types/index.d.ts} +0 -15
  17. package/dist/types/keys.d.ts +92 -0
  18. package/dist/types/mcp.d.ts +2760 -0
  19. package/dist/types/messages.d.ts +10 -0
  20. package/dist/types/models.d.ts +1677 -0
  21. package/dist/types/parameterSettings.d.ts +69 -0
  22. package/dist/types/parsers.d.ts +110 -0
  23. package/dist/types/permissions.d.ts +522 -0
  24. package/dist/types/react-query/react-query-service.d.ts +85 -0
  25. package/dist/types/request.d.ts +25 -0
  26. package/dist/types/roles.d.ts +554 -0
  27. package/dist/types/roles.spec.d.ts +1 -0
  28. package/dist/types/schemas.d.ts +4815 -0
  29. package/dist/types/schemas.spec.d.ts +1 -0
  30. package/dist/types/types/agents.d.ts +433 -0
  31. package/dist/types/types/assistants.d.ts +547 -0
  32. package/dist/types/types/files.d.ts +172 -0
  33. package/dist/types/types/graph.d.ts +135 -0
  34. package/{src/types/mcpServers.ts → dist/types/types/mcpServers.d.ts} +12 -18
  35. package/dist/types/types/mutations.d.ts +209 -0
  36. package/dist/types/types/queries.d.ts +169 -0
  37. package/dist/types/types/runs.d.ts +36 -0
  38. package/dist/types/types/web.d.ts +520 -0
  39. package/dist/types/types.d.ts +503 -0
  40. package/dist/types/utils.d.ts +12 -0
  41. package/package.json +4 -1
  42. package/babel.config.js +0 -4
  43. package/check_updates.sh +0 -52
  44. package/jest.config.js +0 -19
  45. package/react-query/package-lock.json +0 -292
  46. package/react-query/package.json +0 -10
  47. package/rollup.config.js +0 -74
  48. package/server-rollup.config.js +0 -40
  49. package/specs/actions.spec.ts +0 -2533
  50. package/specs/api-endpoints-subdir.spec.ts +0 -140
  51. package/specs/api-endpoints.spec.ts +0 -74
  52. package/specs/azure.spec.ts +0 -844
  53. package/specs/bedrock.spec.ts +0 -862
  54. package/specs/filetypes.spec.ts +0 -175
  55. package/specs/generate.spec.ts +0 -770
  56. package/specs/headers-helpers.spec.ts +0 -24
  57. package/specs/mcp.spec.ts +0 -147
  58. package/specs/openapiSpecs.ts +0 -524
  59. package/specs/parsers.spec.ts +0 -601
  60. package/specs/request-interceptor.spec.ts +0 -304
  61. package/specs/utils.spec.ts +0 -196
  62. package/src/accessPermissions.ts +0 -346
  63. package/src/actions.ts +0 -813
  64. package/src/api-endpoints.ts +0 -440
  65. package/src/artifacts.ts +0 -3104
  66. package/src/azure.ts +0 -328
  67. package/src/bedrock.ts +0 -425
  68. package/src/config.spec.ts +0 -315
  69. package/src/config.ts +0 -2006
  70. package/src/createPayload.ts +0 -46
  71. package/src/data-service.ts +0 -1087
  72. package/src/feedback.ts +0 -141
  73. package/src/file-config.spec.ts +0 -1248
  74. package/src/file-config.ts +0 -764
  75. package/src/generate.ts +0 -634
  76. package/src/headers-helpers.ts +0 -13
  77. package/src/keys.ts +0 -99
  78. package/src/mcp.ts +0 -271
  79. package/src/messages.ts +0 -50
  80. package/src/models.ts +0 -69
  81. package/src/parameterSettings.ts +0 -1111
  82. package/src/parsers.ts +0 -563
  83. package/src/permissions.ts +0 -188
  84. package/src/react-query/react-query-service.ts +0 -566
  85. package/src/request.ts +0 -171
  86. package/src/roles.spec.ts +0 -132
  87. package/src/roles.ts +0 -225
  88. package/src/schemas.spec.ts +0 -355
  89. package/src/schemas.ts +0 -1234
  90. package/src/types/agents.ts +0 -470
  91. package/src/types/assistants.ts +0 -654
  92. package/src/types/files.ts +0 -191
  93. package/src/types/graph.ts +0 -145
  94. package/src/types/mutations.ts +0 -422
  95. package/src/types/queries.ts +0 -208
  96. package/src/types/runs.ts +0 -40
  97. package/src/types/web.ts +0 -588
  98. package/src/types.ts +0 -676
  99. package/src/utils.ts +0 -85
  100. package/tsconfig.json +0 -28
  101. package/tsconfig.spec.json +0 -10
  102. /package/{src/react-query/index.ts → dist/types/react-query/index.d.ts} +0 -0
  103. /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
- }