@claudecam/server 0.1.1 → 0.1.3

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/README.md +54 -0
  2. package/package.json +11 -12
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @claudecam/server
2
+
3
+ Backend server for [Claude Agent Monitor (CAM)](https://github.com/pedropauloai/claude-agent-monitor) -- Mission Control for Claude Code agents.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@claudecam/server)](https://www.npmjs.com/package/@claudecam/server)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/pedropauloai/claude-agent-monitor/blob/main/LICENSE)
7
+
8
+ ## What This Package Does
9
+
10
+ Express server with SQLite persistence, REST API, and Server-Sent Events (SSE) for real-time agent monitoring. Receives hook events from Claude Code, stores them, and streams updates to the dashboard.
11
+
12
+ **Key features:**
13
+ - REST API for sessions, agents, events, projects, sprints, and tasks
14
+ - SSE streaming for real-time dashboard updates
15
+ - SQLite (WAL mode) for concurrent reads
16
+ - Correlation Engine that auto-links tool events to sprint tasks
17
+ - Multi-project support with project registry
18
+
19
+ ## Usage
20
+
21
+ This package is used internally by `@claudecam/cli`. You typically don't install it directly.
22
+
23
+ ```bash
24
+ # Recommended: use the CLI
25
+ npx @claudecam/cli start
26
+
27
+ # Or programmatic usage
28
+ import { startServer } from '@claudecam/server';
29
+ startServer({ port: 7890 });
30
+ ```
31
+
32
+ ## API Endpoints
33
+
34
+ | Method | Endpoint | Description |
35
+ |--------|----------|-------------|
36
+ | `POST` | `/api/events` | Ingest hook events |
37
+ | `GET` | `/api/sessions` | List sessions |
38
+ | `GET` | `/api/sessions/:id` | Session details with agents |
39
+ | `GET` | `/api/sessions/:id/agents` | Agents in a session |
40
+ | `GET` | `/api/sessions/:id/events` | Events with filters |
41
+ | `GET` | `/api/sessions/:id/files` | File changes |
42
+ | `GET` | `/api/stream` | SSE real-time stream |
43
+ | `GET` | `/api/projects` | List projects |
44
+ | `GET` | `/api/projects/:id/tasks` | Tasks with filters |
45
+
46
+ ## Links
47
+
48
+ - [GitHub Repository](https://github.com/pedropauloai/claude-agent-monitor)
49
+ - [Full Documentation](https://github.com/pedropauloai/claude-agent-monitor#readme)
50
+ - [CLI Package](https://www.npmjs.com/package/@claudecam/cli)
51
+
52
+ ## License
53
+
54
+ [MIT](https://github.com/pedropauloai/claude-agent-monitor/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudecam/server",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Backend server for Claude Agent Monitor - Express + SQLite + REST API + SSE",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,20 +15,12 @@
15
15
  "files": [
16
16
  "dist"
17
17
  ],
18
- "scripts": {
19
- "build": "tsc && node -e \"const fs=require('fs');const p=require('path');fs.mkdirSync(p.join('dist','db'),{recursive:true});fs.copyFileSync(p.join('src','db','schema.sql'),p.join('dist','db','schema.sql'));\"",
20
- "dev": "cross-env CAM_PORT=7860 tsx watch src/index.ts",
21
- "start": "node dist/index.js",
22
- "typecheck": "tsc --noEmit",
23
- "clean": "rm -rf dist",
24
- "prepack": "pnpm run build"
25
- },
26
18
  "dependencies": {
27
- "@claudecam/shared": "workspace:*",
28
19
  "better-sqlite3": "11.6.0",
29
20
  "cors": "^2.8.5",
30
21
  "express": "^4.21.0",
31
- "uuid": "^11.0.0"
22
+ "uuid": "^11.0.0",
23
+ "@claudecam/shared": "0.1.1"
32
24
  },
33
25
  "devDependencies": {
34
26
  "@types/better-sqlite3": "^7.6.13",
@@ -57,5 +49,12 @@
57
49
  "author": "CAM Contributors",
58
50
  "publishConfig": {
59
51
  "access": "public"
52
+ },
53
+ "scripts": {
54
+ "build": "tsc && node -e \"const fs=require('fs');const p=require('path');fs.mkdirSync(p.join('dist','db'),{recursive:true});fs.copyFileSync(p.join('src','db','schema.sql'),p.join('dist','db','schema.sql'));\"",
55
+ "dev": "cross-env CAM_PORT=7860 tsx watch src/index.ts",
56
+ "start": "node dist/index.js",
57
+ "typecheck": "tsc --noEmit",
58
+ "clean": "rm -rf dist"
60
59
  }
61
- }
60
+ }