@co0ontty/wand 4.0.2 → 4.1.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/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
3
|
-
"builtAt": "2026-07-15T03:
|
|
4
|
-
"version": "4.0
|
|
2
|
+
"commit": "20ca28d60df07cdef5ec0b4f9baba55cc3848b75",
|
|
3
|
+
"builtAt": "2026-07-15T03:34:11.428Z",
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"channel": "stable"
|
|
6
6
|
}
|
|
@@ -17,13 +17,42 @@ function publicConfig(config) {
|
|
|
17
17
|
defaultModels,
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
+
function publicDistributionInfo(distribution) {
|
|
21
|
+
const androidApk = { ...distribution.androidApk };
|
|
22
|
+
const macosDmg = { ...distribution.macosDmg };
|
|
23
|
+
// These server filesystem paths are useful to administrators, but the About
|
|
24
|
+
// panel only needs versions, sizes, and download URLs.
|
|
25
|
+
delete androidApk.apkDir;
|
|
26
|
+
delete macosDmg.dmgDir;
|
|
27
|
+
return { androidApk, macosDmg };
|
|
28
|
+
}
|
|
20
29
|
export function registerSettingsRoutes(app, deps) {
|
|
21
30
|
const { storage, config, runtimeConfig, configPath, configDir, requireAdmin, requireAdminOrSessionPreferences, } = deps;
|
|
31
|
+
app.get("/api/settings/about", asyncRoute(async (_req, res) => {
|
|
32
|
+
const distribution = publicDistributionInfo(await deps.getDistributionSettings());
|
|
33
|
+
const cachedUpdate = deps.getCachedUpdateInfo();
|
|
34
|
+
res.json({
|
|
35
|
+
settingsAccess: "read-only",
|
|
36
|
+
version: deps.packageInfo.version,
|
|
37
|
+
packageName: deps.packageInfo.name,
|
|
38
|
+
nodeVersion: deps.packageInfo.nodeVersion,
|
|
39
|
+
repoUrl: deps.packageInfo.repoUrl,
|
|
40
|
+
updateAvailable: cachedUpdate?.updateAvailable ?? false,
|
|
41
|
+
latestVersion: cachedUpdate?.latest ?? null,
|
|
42
|
+
updateChannel: deps.getUpdateChannel(),
|
|
43
|
+
build: {
|
|
44
|
+
...deps.buildInfo,
|
|
45
|
+
shortCommit: deps.buildInfo.commit ? deps.buildInfo.commit.slice(0, 7) : null,
|
|
46
|
+
},
|
|
47
|
+
...distribution,
|
|
48
|
+
});
|
|
49
|
+
}));
|
|
22
50
|
app.get("/api/settings", requireAdmin, asyncRoute(async (_req, res) => {
|
|
23
51
|
const desiredConfig = runtimeConfig.desiredSnapshot();
|
|
24
52
|
const distribution = await deps.getDistributionSettings();
|
|
25
53
|
const cachedUpdate = deps.getCachedUpdateInfo();
|
|
26
54
|
res.json({
|
|
55
|
+
settingsAccess: "admin",
|
|
27
56
|
version: deps.packageInfo.version,
|
|
28
57
|
packageName: deps.packageInfo.name,
|
|
29
58
|
nodeVersion: deps.packageInfo.nodeVersion,
|
package/dist/server.js
CHANGED
|
@@ -1074,9 +1074,10 @@ export async function startServer(config, configPath, options = {}) {
|
|
|
1074
1074
|
], requireFiles);
|
|
1075
1075
|
app.use("/api/browser-extension", requirePasswordVault);
|
|
1076
1076
|
// ── Config & Session info ──
|
|
1077
|
-
app.get("/api/config", asyncRoute(async (
|
|
1077
|
+
app.get("/api/config", asyncRoute(async (req, res) => {
|
|
1078
1078
|
const structuredChatPersona = await buildStructuredChatPersonaPayload(configPath, config);
|
|
1079
1079
|
const defaultModels = getProviderDefaultModels(config);
|
|
1080
|
+
const principal = requestPrincipals.get(req);
|
|
1080
1081
|
res.json({
|
|
1081
1082
|
host: config.host,
|
|
1082
1083
|
port: config.port,
|
|
@@ -1106,6 +1107,7 @@ export async function startServer(config, configPath, options = {}) {
|
|
|
1106
1107
|
updateChannel: getUpdateChannel(),
|
|
1107
1108
|
currentVersion: DISPLAY_VERSION,
|
|
1108
1109
|
packageVersion: PKG_VERSION,
|
|
1110
|
+
canManageSettings: !!principal && principalHasScope(principal, "admin"),
|
|
1109
1111
|
serverInstanceId: SERVER_INSTANCE_ID,
|
|
1110
1112
|
});
|
|
1111
1113
|
}));
|