@downtrace/mcp 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +16 -22
  2. package/src/cli.ts +0 -25
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@downtrace/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Downtrace over MCP: the queries and operations of the product as tools a coding agent can discover and use. Speaks the public HTTP API, no dependencies.",
5
5
  "type": "module",
6
6
  "bin": {
7
- "downtrace-mcp": "./src/cli.ts"
7
+ "downtrace-mcp": "./dist/cli.js"
8
8
  },
9
9
  "exports": {
10
- ".": "./src/index.ts"
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ }
11
14
  },
12
15
  "files": [
13
16
  "dist",
@@ -17,11 +20,6 @@
17
20
  "engines": {
18
21
  "node": ">=20"
19
22
  },
20
- "scripts": {
21
- "test": "vitest run",
22
- "typecheck": "tsc -p tsconfig.json",
23
- "build": "tsdown"
24
- },
25
23
  "license": "MIT",
26
24
  "repository": {
27
25
  "type": "git",
@@ -38,17 +36,13 @@
38
36
  "tools"
39
37
  ],
40
38
  "publishConfig": {
41
- "access": "public",
42
- "main": "./dist/index.js",
43
- "types": "./dist/index.d.ts",
44
- "bin": {
45
- "downtrace-mcp": "./dist/cli.js"
46
- },
47
- "exports": {
48
- ".": {
49
- "types": "./dist/index.d.ts",
50
- "default": "./dist/index.js"
51
- }
52
- }
53
- }
54
- }
39
+ "access": "public"
40
+ },
41
+ "scripts": {
42
+ "test": "vitest run",
43
+ "typecheck": "tsc -p tsconfig.json",
44
+ "build": "tsdown"
45
+ },
46
+ "main": "./dist/index.js",
47
+ "types": "./dist/index.d.ts"
48
+ }
package/src/cli.ts DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env node
2
- import { ConfigError, configFrom } from "./config.ts";
3
- import { linesOf } from "./rpc.ts";
4
- import { createServer } from "./server.ts";
5
- import { VERSION } from "./version.ts";
6
-
7
- /**
8
- * What a coding agent's configuration points at. Speaks JSON-RPC on stdin and stdout, so **nothing else may
9
- * ever be written to stdout**: a stray `console.log` would be a malformed message to the client. Diagnostics
10
- * go to stderr, which is what a client shows the user.
11
- */
12
- try {
13
- const config = configFrom((name) => process.env[name]);
14
- if (config.token === "") {
15
- process.stderr.write("downtrace-mcp: no DOWNTRACE_TOKEN, so this session can read but not operate\n");
16
- }
17
- const server = createServer({ config, version: VERSION });
18
- await server.run(linesOf(process.stdin), (line) => process.stdout.write(line));
19
- } catch (err) {
20
- if (err instanceof ConfigError) {
21
- process.stderr.write(`downtrace-mcp: ${err.message}\n`);
22
- process.exit(2);
23
- }
24
- throw err;
25
- }