libre-webui 0.2.8 → 0.3.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.
- package/README.md +25 -16
- package/backend/dist/db.d.ts.map +1 -1
- package/backend/dist/db.js +31 -0
- package/backend/dist/db.js.map +1 -1
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +13 -0
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/routes/imageGen.d.ts +3 -0
- package/backend/dist/routes/imageGen.d.ts.map +1 -0
- package/backend/dist/routes/imageGen.js +313 -0
- package/backend/dist/routes/imageGen.js.map +1 -0
- package/backend/dist/routes/plugins.d.ts.map +1 -1
- package/backend/dist/routes/plugins.js +122 -0
- package/backend/dist/routes/plugins.js.map +1 -1
- package/backend/dist/services/galleryService.d.ts +41 -0
- package/backend/dist/services/galleryService.d.ts.map +1 -0
- package/backend/dist/services/galleryService.js +175 -0
- package/backend/dist/services/galleryService.js.map +1 -0
- package/backend/dist/services/pluginCredentialsService.d.ts +46 -0
- package/backend/dist/services/pluginCredentialsService.d.ts.map +1 -0
- package/backend/dist/services/pluginCredentialsService.js +175 -0
- package/backend/dist/services/pluginCredentialsService.js.map +1 -0
- package/backend/dist/services/pluginService.d.ts +23 -1
- package/backend/dist/services/pluginService.d.ts.map +1 -1
- package/backend/dist/services/pluginService.js +440 -24
- package/backend/dist/services/pluginService.js.map +1 -1
- package/backend/dist/types/index.d.ts +39 -0
- package/backend/dist/types/index.d.ts.map +1 -1
- package/backend/dist/types/index.js.map +1 -1
- package/frontend/dist/assets/index-BAlYrgVl.js +26 -0
- package/frontend/dist/css/index-CYRSPYSA.css +1 -0
- package/frontend/dist/index.html +4 -4
- package/frontend/dist/js/ArtifactContainer-DOyRNr2K.js +24 -0
- package/frontend/dist/js/{ArtifactDemoPage-Cg6PD9Cv.js → ArtifactDemoPage-DuHnKjTy.js} +1 -1
- package/frontend/dist/js/ChatPage-D4AGvUr9.js +281 -0
- package/frontend/dist/js/GalleryPage-DPxs-JHF.js +1 -0
- package/frontend/dist/js/ModelsPage-CDx8DvZ8.js +2 -0
- package/frontend/dist/js/PersonasPage-CHDGv_Lh.js +13 -0
- package/frontend/dist/js/UserManagementPage-COb0e5_w.js +1 -0
- package/frontend/dist/js/{markdown-vendor-D-79K2xZ.js → markdown-vendor-DRtqGHm3.js} +1 -1
- package/frontend/dist/js/ui-vendor-DA07XX1l.js +177 -0
- package/package.json +1 -1
- package/plugins/comfyui.json +49 -0
- package/frontend/dist/assets/index-CE4fvnod.js +0 -3
- package/frontend/dist/css/index-B1OjddR-.css +0 -1
- package/frontend/dist/js/ArtifactContainer-BoHnMmlC.js +0 -23
- package/frontend/dist/js/ChatPage-Bwc5n8Z3.js +0 -281
- package/frontend/dist/js/ModelsPage-2HtOH51G.js +0 -2
- package/frontend/dist/js/PersonasPage-BESJgtJW.js +0 -13
- package/frontend/dist/js/UserManagementPage-DQaE_2Mt.js +0 -1
- package/frontend/dist/js/ui-vendor-VxSCY_bv.js +0 -177
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Libre WebUI
|
|
3
|
+
* Copyright (C) 2025 Kroonen AI, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at:
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
18
|
+
import { getDatabaseSafe } from '../db.js';
|
|
19
|
+
import { encryptionService } from './encryptionService.js';
|
|
20
|
+
class PluginCredentialsService {
|
|
21
|
+
/**
|
|
22
|
+
* Get API key for a specific plugin and user
|
|
23
|
+
* Returns null if not found, with optional fallback to environment variable
|
|
24
|
+
*/
|
|
25
|
+
getApiKey(pluginId, keyEnv, userId) {
|
|
26
|
+
const effectiveUserId = userId || 'default';
|
|
27
|
+
const db = getDatabaseSafe();
|
|
28
|
+
if (db) {
|
|
29
|
+
try {
|
|
30
|
+
const row = db
|
|
31
|
+
.prepare('SELECT api_key FROM plugin_credentials WHERE plugin_id = ? AND user_id = ?')
|
|
32
|
+
.get(pluginId, effectiveUserId);
|
|
33
|
+
if (row?.api_key) {
|
|
34
|
+
// Decrypt the API key
|
|
35
|
+
const decryptedKey = encryptionService.decrypt(row.api_key);
|
|
36
|
+
if (decryptedKey) {
|
|
37
|
+
return decryptedKey;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
console.error('Failed to get API key for plugin %s:', pluginId, error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// Fallback to environment variable
|
|
46
|
+
return process.env[keyEnv] || null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get all credentials for a user (API keys are masked for security)
|
|
50
|
+
*/
|
|
51
|
+
getCredentials(userId) {
|
|
52
|
+
const effectiveUserId = userId || 'default';
|
|
53
|
+
const db = getDatabaseSafe();
|
|
54
|
+
if (!db) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const rows = db
|
|
59
|
+
.prepare('SELECT plugin_id, api_key, updated_at FROM plugin_credentials WHERE user_id = ?')
|
|
60
|
+
.all(effectiveUserId);
|
|
61
|
+
return rows.map(row => ({
|
|
62
|
+
plugin_id: row.plugin_id,
|
|
63
|
+
has_api_key: Boolean(row.api_key),
|
|
64
|
+
updated_at: row.updated_at,
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.error('Failed to get plugin credentials:', error);
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Set or update API key for a plugin
|
|
74
|
+
*/
|
|
75
|
+
setApiKey(pluginId, apiKey, userId) {
|
|
76
|
+
const effectiveUserId = userId || 'default';
|
|
77
|
+
const db = getDatabaseSafe();
|
|
78
|
+
if (!db) {
|
|
79
|
+
console.error('Database not available for storing plugin credentials');
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
try {
|
|
83
|
+
const now = Date.now();
|
|
84
|
+
const encryptedKey = encryptionService.encrypt(apiKey);
|
|
85
|
+
// Check if credential already exists
|
|
86
|
+
const existing = db
|
|
87
|
+
.prepare('SELECT id FROM plugin_credentials WHERE plugin_id = ? AND user_id = ?')
|
|
88
|
+
.get(pluginId, effectiveUserId);
|
|
89
|
+
if (existing) {
|
|
90
|
+
// Update existing credential
|
|
91
|
+
db.prepare('UPDATE plugin_credentials SET api_key = ?, updated_at = ? WHERE id = ?').run(encryptedKey, now, existing.id);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
// Insert new credential
|
|
95
|
+
const id = uuidv4();
|
|
96
|
+
db.prepare('INSERT INTO plugin_credentials (id, user_id, plugin_id, api_key, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?)').run(id, effectiveUserId, pluginId, encryptedKey, now, now);
|
|
97
|
+
}
|
|
98
|
+
console.log(`API key ${existing ? 'updated' : 'set'} for plugin ${pluginId} (user: ${effectiveUserId})`);
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
console.error('Failed to set API key for plugin %s:', pluginId, error);
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Delete API key for a plugin
|
|
108
|
+
*/
|
|
109
|
+
deleteApiKey(pluginId, userId) {
|
|
110
|
+
const effectiveUserId = userId || 'default';
|
|
111
|
+
const db = getDatabaseSafe();
|
|
112
|
+
if (!db) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
try {
|
|
116
|
+
const result = db
|
|
117
|
+
.prepare('DELETE FROM plugin_credentials WHERE plugin_id = ? AND user_id = ?')
|
|
118
|
+
.run(pluginId, effectiveUserId);
|
|
119
|
+
if (result.changes > 0) {
|
|
120
|
+
console.log(`API key deleted for plugin ${pluginId} (user: ${effectiveUserId})`);
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
console.error('Failed to delete API key for plugin %s:', pluginId, error);
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Check if a user has an API key set for a plugin
|
|
132
|
+
*/
|
|
133
|
+
hasApiKey(pluginId, keyEnv, userId) {
|
|
134
|
+
return this.getApiKey(pluginId, keyEnv, userId) !== null;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Delete all credentials for a user (used when user account is deleted)
|
|
138
|
+
*/
|
|
139
|
+
deleteAllUserCredentials(userId) {
|
|
140
|
+
const db = getDatabaseSafe();
|
|
141
|
+
if (!db) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
db.prepare('DELETE FROM plugin_credentials WHERE user_id = ?').run(userId);
|
|
146
|
+
console.log(`All plugin credentials deleted for user ${userId}`);
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
console.error(`Failed to delete all credentials for user ${userId}:`, error);
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Delete all credentials for a plugin (used when plugin is deleted)
|
|
156
|
+
*/
|
|
157
|
+
deleteAllPluginCredentials(pluginId) {
|
|
158
|
+
const db = getDatabaseSafe();
|
|
159
|
+
if (!db) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
db.prepare('DELETE FROM plugin_credentials WHERE plugin_id = ?').run(pluginId);
|
|
164
|
+
console.log(`All credentials deleted for plugin ${pluginId}`);
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
console.error(`Failed to delete all credentials for plugin ${pluginId}:`, error);
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const pluginCredentialsService = new PluginCredentialsService();
|
|
174
|
+
export default pluginCredentialsService;
|
|
175
|
+
//# sourceMappingURL=pluginCredentialsService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginCredentialsService.js","sourceRoot":"","sources":["../../src/services/pluginCredentialsService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAoB3D,MAAM,wBAAwB;IAC5B;;;OAGG;IACH,SAAS,CAAC,QAAgB,EAAE,MAAc,EAAE,MAAe;QACzD,MAAM,eAAe,GAAG,MAAM,IAAI,SAAS,CAAC;QAC5C,MAAM,EAAE,GAAG,eAAe,EAAE,CAAC;QAE7B,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,EAAE;qBACX,OAAO,CACN,4EAA4E,CAC7E;qBACA,GAAG,CAAC,QAAQ,EAAE,eAAe,CAAoC,CAAC;gBAErE,IAAI,GAAG,EAAE,OAAO,EAAE,CAAC;oBACjB,sBAAsB;oBACtB,MAAM,YAAY,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBAC5D,IAAI,YAAY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,CAAC;YACR,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,CAAC;YACH,EAAE,CAAC,OAAO,CAAC,oDAAoD,CAAC,CAAC,GAAG,CAClE,QAAQ,CACT,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,sCAAsC,QAAQ,EAAE,CAAC,CAAC;YAC9D,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CACX,+CAA+C,QAAQ,GAAG,EAC1D,KAAK,CACN,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AAED,MAAM,wBAAwB,GAAG,IAAI,wBAAwB,EAAE,CAAC;AAChE,eAAe,wBAAwB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin, PluginStatus, PluginResponse, ChatMessage, GenerationOptions, TTSConfig, PluginType } from '../types/index.js';
|
|
1
|
+
import { Plugin, PluginStatus, PluginResponse, ChatMessage, GenerationOptions, TTSConfig, ImageGenConfig, ImageGenResponse, PluginType } from '../types/index.js';
|
|
2
2
|
declare class PluginService {
|
|
3
3
|
private pluginsDir;
|
|
4
4
|
private activePluginIds;
|
|
@@ -6,6 +6,13 @@ declare class PluginService {
|
|
|
6
6
|
private ensurePluginsDirectory;
|
|
7
7
|
private loadActivePlugins;
|
|
8
8
|
private saveActivePlugins;
|
|
9
|
+
/**
|
|
10
|
+
* Get API key for a plugin from database (per-user) or environment variable (fallback)
|
|
11
|
+
* @param plugin The plugin to get the API key for
|
|
12
|
+
* @param userId Optional user ID for per-user credentials
|
|
13
|
+
* @returns The API key or null if not found
|
|
14
|
+
*/
|
|
15
|
+
getApiKey(plugin: Plugin, userId?: string): string | null;
|
|
9
16
|
getAllPlugins(): Plugin[];
|
|
10
17
|
getPlugin(id: string): Plugin | null;
|
|
11
18
|
installPlugin(pluginData: Plugin): Plugin;
|
|
@@ -35,6 +42,21 @@ declare class PluginService {
|
|
|
35
42
|
}): Promise<Buffer>;
|
|
36
43
|
private splitTextForTTS;
|
|
37
44
|
getTTSConfig(pluginId: string): TTSConfig | null;
|
|
45
|
+
getPluginForImageGen(model: string): Plugin | null;
|
|
46
|
+
getAvailableImageGenModels(): {
|
|
47
|
+
model: string;
|
|
48
|
+
plugin: string;
|
|
49
|
+
config?: ImageGenConfig;
|
|
50
|
+
}[];
|
|
51
|
+
executeImageGenRequest(model: string, prompt: string, options?: {
|
|
52
|
+
size?: string;
|
|
53
|
+
quality?: string;
|
|
54
|
+
style?: string;
|
|
55
|
+
n?: number;
|
|
56
|
+
response_format?: 'url' | 'b64_json';
|
|
57
|
+
}): Promise<ImageGenResponse>;
|
|
58
|
+
private executeComfyUIRequest;
|
|
59
|
+
getImageGenConfig(pluginId: string): ImageGenConfig | null;
|
|
38
60
|
getPluginsByCapability(capabilityType: PluginType): Plugin[];
|
|
39
61
|
}
|
|
40
62
|
declare const _default: PluginService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginService.d.ts","sourceRoot":"","sources":["../../src/services/pluginService.ts"],"names":[],"mappings":"AAqBA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,UAAU,EACX,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"pluginService.d.ts","sourceRoot":"","sources":["../../src/services/pluginService.ts"],"names":[],"mappings":"AAqBA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,UAAU,EACX,MAAM,mBAAmB,CAAC;AAG3B,cAAM,aAAa;IACjB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAA0B;;IAQjD,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,iBAAiB;IASzB;;;;;OAKG;IACH,SAAS,C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