loopctl-mcp-server 2.43.0 → 2.44.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.
Files changed (2) hide show
  1. package/index.js +54 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -413,6 +413,30 @@ async function createKbScope({ name, slug, repo_url, description, tech_stack })
413
413
  return toContent(result);
414
414
  }
415
415
 
416
+ async function archiveKbScope({ project_id }) {
417
+ // Reversible soft-delete of an agent-owned :kb scope on the AGENT key; frees its
418
+ // max_projects slot. The server rejects a :work project (422). Reverse with restore_kb_scope.
419
+ const result = await apiCall(
420
+ "DELETE",
421
+ `/api/v1/kb-scopes/${project_id}`,
422
+ null,
423
+ process.env.LOOPCTL_AGENT_KEY,
424
+ );
425
+ return toContent(result);
426
+ }
427
+
428
+ async function restoreKbScope({ project_id }) {
429
+ // Re-activate an archived :kb scope on the AGENT key (re-consumes a max_projects slot;
430
+ // 422 if at the cap). The server rejects a :work project (422).
431
+ const result = await apiCall(
432
+ "POST",
433
+ `/api/v1/kb-scopes/${project_id}/restore`,
434
+ {},
435
+ process.env.LOOPCTL_AGENT_KEY,
436
+ );
437
+ return toContent(result);
438
+ }
439
+
416
440
  async function deleteProject({ project_id }) {
417
441
  const result = await apiCall(
418
442
  "DELETE",
@@ -2130,6 +2154,30 @@ const TOOLS = [
2130
2154
  required: ["name", "slug"],
2131
2155
  },
2132
2156
  },
2157
+ {
2158
+ name: "archive_kb_scope",
2159
+ description:
2160
+ "Archive (reversible soft-delete) a knowledge-only project scope (kind: kb) you own, on the agent key. Frees the scope's slot in the tenant's max_projects budget so you can reclaim KB-scope capacity — the reverse of create_kb_scope. Its articles remain readable/writable; restore_kb_scope re-activates it. Rejects a kind: work project (422) — archiving a work project stays human-anchored. Idempotent on an already-archived scope.",
2161
+ inputSchema: {
2162
+ type: "object",
2163
+ properties: {
2164
+ project_id: { type: "string", description: "UUID of the :kb scope to archive." },
2165
+ },
2166
+ required: ["project_id"],
2167
+ },
2168
+ },
2169
+ {
2170
+ name: "restore_kb_scope",
2171
+ description:
2172
+ "Restore (re-activate) an archived knowledge-only project scope (kind: kb) you own, on the agent key — the reverse of archive_kb_scope. Re-activating consumes an active max_projects slot, so it is rejected (422) when the tenant is at its cap. Rejects a kind: work project (422).",
2173
+ inputSchema: {
2174
+ type: "object",
2175
+ properties: {
2176
+ project_id: { type: "string", description: "UUID of the archived :kb scope to restore." },
2177
+ },
2178
+ required: ["project_id"],
2179
+ },
2180
+ },
2133
2181
  {
2134
2182
  name: "delete_project",
2135
2183
  description:
@@ -4893,6 +4941,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
4893
4941
  case "create_kb_scope":
4894
4942
  return await createKbScope(args);
4895
4943
 
4944
+ case "archive_kb_scope":
4945
+ return await archiveKbScope(args);
4946
+
4947
+ case "restore_kb_scope":
4948
+ return await restoreKbScope(args);
4949
+
4896
4950
  case "delete_project":
4897
4951
  return await deleteProject(args);
4898
4952
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopctl-mcp-server",
3
- "version": "2.43.0",
3
+ "version": "2.44.0",
4
4
  "description": "MCP server for loopctl — structural trust for AI development loops",
5
5
  "type": "module",
6
6
  "main": "index.js",