@agentprojectcontext/apx 1.53.3 → 1.53.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentprojectcontext/apx",
3
- "version": "1.53.3",
3
+ "version": "1.53.5",
4
4
  "description": "APX — unified CLI + daemon for the Agent Project Context (APC) standard.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -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.for(p).evict(name);
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.for(p).evict(req.params.name);
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
  }