error-mom 0.7.0 → 0.7.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ken Kai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,14 +1,105 @@
1
1
  # error-mom
2
2
 
3
- Agent-first CLI and MCP tools for a self-hosted Error Mom incident desk.
3
+ Agent-first CLI and MCP tools for a self-hosted [Error Mom](https://github.com/KenKaiii/error-mom) deployment.
4
+
5
+ ## Install and authenticate
4
6
 
5
7
  ```bash
6
8
  npm install --global error-mom
7
9
  error-mom login https://errors.example.com --token "$ERROR_MOM_ADMIN_TOKEN"
10
+ ```
11
+
12
+ Login stores the server URL and private admin token in `~/.error-mom/config.json` with private file permissions. You can instead set `ERROR_MOM_SERVER` and `ERROR_MOM_ADMIN_TOKEN`.
13
+
14
+ ## Connect an app
15
+
16
+ Run this from the app you want to monitor:
17
+
18
+ ```bash
19
+ error-mom init
20
+ ```
21
+
22
+ `init` creates or reuses a project, installs `@kenkaiiii/error-mom`, generates a setup file, detects the framework, and returns exact wiring instructions. For a pnpm or Yarn workspace, use `error-mom init --skip-install` and install the SDK with the workspace package manager.
23
+
24
+ The generated project key is write-only and safe to commit or ship. It can submit events but cannot read issues, manage projects, or upload source maps. Keep the admin token private.
25
+
26
+ Verify health and ingestion with the exact `error-mom doctor --project-key ...` command printed by `init`. Synthetic doctor events are validated but never stored as issues.
27
+
28
+ ## Work with projects and issues
29
+
30
+ ```bash
8
31
  error-mom projects
9
32
  error-mom issues
33
+ error-mom issues --project <project-id>
34
+ error-mom issues --status observed
10
35
  error-mom inspect <issue-id>
36
+ error-mom inspect <issue-id> --samples 5
11
37
  error-mom resolve <issue-id> --release 1.4.2
12
38
  ```
13
39
 
14
- Run `error-mom mcp` as a stdio MCP server. It exposes `list_projects`, `list_issues`, `get_issue`, and `resolve_issue`.
40
+ Operational quota and transient failures plus low-volume tool failures begin in `observed` status and promote to `open` after three occurrences. The default unresolved list returns `open` and `regressed` issues; request `--status observed` to inspect low-volume noise. Resolved issues stay hidden by default. If the same issue returns in the fixed release or a newer release, Error Mom marks it as regressed.
41
+
42
+ Permanently deleting a project also deletes its issues, samples, ingest keys, and receipts:
43
+
44
+ ```bash
45
+ error-mom delete-project <project-id>
46
+ ```
47
+
48
+ ## Source maps
49
+
50
+ Upload source maps immediately after a production build. The release must exactly match the release reported by the SDK.
51
+
52
+ ```bash
53
+ error-mom sourcemaps <build-directory> \
54
+ --release <app-version> \
55
+ --project <project-slug>
56
+ ```
57
+
58
+ The command discovers JavaScript/source-map pairs and warns about missing `sourcesContent` or release mismatches. Uploads require the admin token; project ingest keys are rejected.
59
+
60
+ Test symbolication without storing an event or map:
61
+
62
+ ```bash
63
+ error-mom doctor --symbolication
64
+ ```
65
+
66
+ ## MCP server
67
+
68
+ Run `error-mom mcp` as a stdio MCP server. It exposes:
69
+
70
+ - `list_projects`
71
+ - `list_issues`
72
+ - `get_issue`
73
+ - `resolve_issue`
74
+ - `check_symbolication`
75
+ - `delete_project`
76
+
77
+ Example client configuration:
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "error-mom": {
83
+ "command": "error-mom",
84
+ "args": ["mcp"],
85
+ "env": {
86
+ "ERROR_MOM_SERVER": "https://errors.example.com",
87
+ "ERROR_MOM_ADMIN_TOKEN": "set-this-in-your-secret-store"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ Prefer your MCP client's secure environment or secret configuration instead of committing the admin token.
95
+
96
+ ## Command help
97
+
98
+ ```bash
99
+ error-mom --help
100
+ error-mom <command> --help
101
+ ```
102
+
103
+ Operational commands write machine-readable JSON to stdout, making the CLI suitable for coding agents and automation.
104
+
105
+ See the [repository README](https://github.com/KenKaiii/error-mom#readme) for deployment, SDK, framework, dashboard, and security instructions.
package/dist/cli.js CHANGED
@@ -63,7 +63,7 @@ async function findBuildFiles(dir) {
63
63
  }
64
64
 
65
65
  // src/cli.ts
66
- var VERSION = "0.7.0";
66
+ var VERSION = "0.7.2";
67
67
  var CONFIG_DIR = join2(homedir(), ".error-mom");
68
68
  var CONFIG_FILE = join2(CONFIG_DIR, "config.json");
69
69
  function slugifyName(value) {
@@ -89,7 +89,11 @@ program.command("projects").description("List every project and unresolved issue
89
89
  const config = await loadConfig();
90
90
  print(await request(config.server, config.adminToken, "/api/v1/projects"));
91
91
  });
92
- program.command("issues").description("List compact issue summaries; unresolved issues are returned by default").option("--project <id>", "Filter by project ID").option("--status <status>", "unresolved, open, regressed, resolved, or all", "unresolved").action(async (options) => {
92
+ program.command("issues").description("List compact issue summaries; unresolved issues are returned by default").option("--project <id>", "Filter by project ID").option(
93
+ "--status <status>",
94
+ "unresolved, observed, open, regressed, resolved, or all",
95
+ "unresolved"
96
+ ).action(async (options) => {
93
97
  const config = await loadConfig();
94
98
  const query = new URLSearchParams({ status: options.status });
95
99
  if (options.project) query.set("projectId", options.project);
@@ -281,7 +285,7 @@ async function runMcpServer() {
281
285
  description: "List compact issues. Defaults to unresolved so fixed work does not consume context.",
282
286
  inputSchema: {
283
287
  projectId: z.string().optional(),
284
- status: z.enum(["unresolved", "open", "regressed", "resolved", "all"]).default("unresolved")
288
+ status: z.enum(["unresolved", "observed", "open", "regressed", "resolved", "all"]).default("unresolved")
285
289
  }
286
290
  },
287
291
  async ({ projectId, status }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "error-mom",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Agent-first CLI and MCP tools for self-hosted Error Mom",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,11 +11,6 @@
11
11
  "dist",
12
12
  "README.md"
13
13
  ],
14
- "scripts": {
15
- "build": "tsup src/cli.ts --format esm --dts --clean",
16
- "check": "tsc --noEmit",
17
- "test": "vitest run --passWithNoTests"
18
- },
19
14
  "dependencies": {
20
15
  "@modelcontextprotocol/sdk": "^1.29.0",
21
16
  "commander": "^15.0.0",
@@ -28,5 +23,10 @@
28
23
  "publishConfig": {
29
24
  "access": "public"
30
25
  },
31
- "license": "MIT"
32
- }
26
+ "license": "MIT",
27
+ "scripts": {
28
+ "build": "tsup src/cli.ts --format esm --dts --clean",
29
+ "check": "tsc --noEmit",
30
+ "test": "vitest run --passWithNoTests"
31
+ }
32
+ }