error-mom 0.3.0 → 0.3.1

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/dist/cli.js +27 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import { Command } from "commander";
10
10
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
11
11
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
12
12
  import { z } from "zod";
13
- var VERSION = "0.3.0";
13
+ var VERSION = "0.3.1";
14
14
  var CONFIG_DIR = join(homedir(), ".error-mom");
15
15
  var CONFIG_FILE = join(CONFIG_DIR, "config.json");
16
16
  var program = new Command().name("error-mom").description("Query and operate a self-hosted Error Mom incident desk").version(VERSION);
@@ -64,6 +64,17 @@ program.command("resolve").description("Resolve one issue and record the release
64
64
  )
65
65
  );
66
66
  });
67
+ program.command("delete-project").description("Permanently delete one project and all of its issues and history").argument("<project-id>").action(async (projectId) => {
68
+ const config = await loadConfig();
69
+ print(
70
+ await request(
71
+ config.server,
72
+ config.adminToken,
73
+ `/api/v1/projects/${encodeURIComponent(projectId)}`,
74
+ { method: "DELETE" }
75
+ )
76
+ );
77
+ });
67
78
  program.command("doctor").description("Verify collector health, credentials, and optional project ingestion").option("--project-key <key>", "Send and verify a synthetic event with this write-only key").action(async (options) => {
68
79
  const config = await loadConfig();
69
80
  const health = await request(config.server, void 0, "/api/health");
@@ -194,6 +205,21 @@ async function runMcpServer() {
194
205
  )
195
206
  )
196
207
  );
208
+ server.registerTool(
209
+ "delete_project",
210
+ {
211
+ description: "Permanently delete a project and all of its issues, samples, and history. Irreversible.",
212
+ inputSchema: { projectId: z.string().min(1) }
213
+ },
214
+ async ({ projectId }) => toolResult(
215
+ await request(
216
+ config.server,
217
+ config.adminToken,
218
+ `/api/v1/projects/${encodeURIComponent(projectId)}`,
219
+ { method: "DELETE" }
220
+ )
221
+ )
222
+ );
197
223
  await server.connect(new StdioServerTransport());
198
224
  }
199
225
  function toolResult(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "error-mom",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Agent-first CLI and MCP tools for self-hosted Error Mom",
5
5
  "type": "module",
6
6
  "bin": {