@agentprojectcontext/apx 1.53.2 → 1.53.4
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/package.json +1 -1
- package/src/host/daemon/api/admin.js +2 -1
- package/src/host/daemon/api/mcps.js +4 -4
- package/src/host/daemon/api/vars.js +3 -1
- package/src/interfaces/web/dist/assets/{index-vuz4PKLd.js → index-Cy355-jV.js} +113 -113
- package/src/interfaces/web/dist/assets/{index-vuz4PKLd.js.map → index-Cy355-jV.js.map} +1 -1
- package/src/interfaces/web/dist/index.html +1 -1
- package/src/interfaces/web/package-lock.json +26 -44
- package/src/interfaces/web/src/i18n/en.ts +9 -0
- package/src/interfaces/web/src/i18n/es.ts +9 -0
- package/src/interfaces/web/src/lib/api/mcps.ts +1 -1
- package/src/interfaces/web/src/screens/project/McpsTab.tsx +25 -3
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import fs from "node:fs";
|
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
|
|
12
|
-
export function register(app, { scheduler, plugins, config }) {
|
|
12
|
+
export function register(app, { scheduler, plugins, config, registries }) {
|
|
13
13
|
// Daemon logs: errors.jsonl (structured) or apx.log (plain), newest first.
|
|
14
14
|
app.get("/admin/logs", (req, res) => {
|
|
15
15
|
const dir = path.join(os.homedir(), ".apx", "logs");
|
|
@@ -35,6 +35,7 @@ export function register(app, { scheduler, plugins, config }) {
|
|
|
35
35
|
Object.assign(config, fresh);
|
|
36
36
|
if (scheduler) scheduler.globalConfig = config;
|
|
37
37
|
if (plugins) plugins.config = config;
|
|
38
|
+
if (registries) registries.shutdown();
|
|
38
39
|
res.json({
|
|
39
40
|
ok: true,
|
|
40
41
|
super_agent_model: config.super_agent?.model || null,
|
|
@@ -70,8 +70,6 @@ export function register(app, { projects, registries, project }) {
|
|
|
70
70
|
}
|
|
71
71
|
const { name, command, args, env, url, headers, enabled } = req.body || {};
|
|
72
72
|
if (!name) return res.status(400).json({ error: "name required" });
|
|
73
|
-
if (!command && !url)
|
|
74
|
-
return res.status(400).json({ error: "either command or url required" });
|
|
75
73
|
|
|
76
74
|
let json;
|
|
77
75
|
try {
|
|
@@ -81,6 +79,8 @@ export function register(app, { projects, registries, project }) {
|
|
|
81
79
|
}
|
|
82
80
|
json.mcpServers = json.mcpServers || {};
|
|
83
81
|
const existing = json.mcpServers[name] || {};
|
|
82
|
+
if (!existing.command && !existing.url && !command && !url)
|
|
83
|
+
return res.status(400).json({ error: "either command or url required" });
|
|
84
84
|
json.mcpServers[name] = {
|
|
85
85
|
...existing,
|
|
86
86
|
...(command !== undefined ? { command } : {}),
|
|
@@ -95,7 +95,7 @@ export function register(app, { projects, registries, project }) {
|
|
|
95
95
|
} catch (e) {
|
|
96
96
|
return res.status(400).json({ error: e.message });
|
|
97
97
|
}
|
|
98
|
-
registries.
|
|
98
|
+
registries.shutdown();
|
|
99
99
|
projects.rebuild(p.id);
|
|
100
100
|
const entry = registries.for(p).getByName(name);
|
|
101
101
|
res.status(201).json(entry);
|
|
@@ -149,7 +149,7 @@ export function register(app, { projects, registries, project }) {
|
|
|
149
149
|
} catch (e) {
|
|
150
150
|
return res.status(400).json({ error: e.message });
|
|
151
151
|
}
|
|
152
|
-
registries.
|
|
152
|
+
registries.shutdown();
|
|
153
153
|
projects.rebuild(p.id);
|
|
154
154
|
res.status(204).end();
|
|
155
155
|
});
|
|
@@ -37,7 +37,7 @@ function maskAll(obj) {
|
|
|
37
37
|
return out;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export function register(app, { project }) {
|
|
40
|
+
export function register(app, { project, registries }) {
|
|
41
41
|
app.get("/projects/:pid/vars", (req, res) => {
|
|
42
42
|
const p = project(req, res);
|
|
43
43
|
if (!p) return;
|
|
@@ -107,6 +107,7 @@ export function register(app, { project }) {
|
|
|
107
107
|
} catch (e) {
|
|
108
108
|
return res.status(400).json({ error: e.message });
|
|
109
109
|
}
|
|
110
|
+
if (registries) registries.shutdown();
|
|
110
111
|
res.status(201).json({ ok: true, name, scope });
|
|
111
112
|
});
|
|
112
113
|
|
|
@@ -132,6 +133,7 @@ export function register(app, { project }) {
|
|
|
132
133
|
return res.status(400).json({ error: e.message });
|
|
133
134
|
}
|
|
134
135
|
if (!removed) return res.status(404).end();
|
|
136
|
+
if (registries) registries.shutdown();
|
|
135
137
|
res.status(204).end();
|
|
136
138
|
});
|
|
137
139
|
}
|