@misha_misha/agentwatch 0.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Misha Nefedov
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 ADDED
@@ -0,0 +1,95 @@
1
+ # agentwatch
2
+
3
+ **Local-only observability for AI coding agents.** One terminal timeline across Claude Code, Cursor, and OpenClaw — what each agent is reading, writing, running, and what each is actually allowed to do.
4
+
5
+ No cloud. No Docker. No telemetry. `npm i -g agentwatch` and go.
6
+
7
+ ## Why
8
+
9
+ You're running Claude Code + Cursor + OpenClaw on the same machine. Each has its own config (`CLAUDE.md`, `.cursorrules`, OpenClaw workspaces), its own activity log in a different place, and its own permission model. Nothing shows you one unified view: *right now, which agent just touched which file, ran which command, and why.*
10
+
11
+ [claude-devtools](https://github.com/matt1398/claude-devtools) solves this beautifully — for Claude only. agentwatch does the same thing for the whole multi-agent setup.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm i -g @misha_misha/agentwatch
17
+ agentwatch
18
+ ```
19
+
20
+ That's it. No config, no accounts, no daemon. (Published under a
21
+ scope because `agentwatch` was blocked by npm's anti-typosquatting
22
+ check — the binary is still `agentwatch`.)
23
+
24
+ Requires Node ≥ 20. Works on macOS and Linux.
25
+
26
+ ## What it shows
27
+
28
+ - **Claude Code** — tails `~/.claude/projects/**/*.jsonl` and emits every prompt, response, tool call, file read/write, and shell exec with attribution and risk scoring.
29
+ - **OpenClaw** — watches `~/.openclaw/agents/*/sessions/*.jsonl` across every sub-agent (content, research, docs, main) with sub-agent attribution in the event stream, plus `config-audit.jsonl` with elevated risk scoring for config writes.
30
+ - **Cursor** — config-level visibility: MCP server list, permissions (`cli-config.json`), recently-viewed files (`ide_state.json`), discovered `.cursorrules` anywhere in your workspace.
31
+ - **Workspace filesystem** — chokidar-backed watcher over `$WORKSPACE_ROOT` (default `~/IdeaProjects`) with sensible ignores (`node_modules`, `.git`, `dist`).
32
+ - **Permissions (Claude)** — press `p` in the TUI to open a full-screen view of `~/.claude/settings.json`. Renders the allow / deny lists, `defaultMode`, and flags dangerous patterns: `Bash(*)`, missing `~/.ssh`/`.aws`/`.gnupg` denies, auto/bypass modes.
33
+
34
+ ## Hotkeys
35
+
36
+ ```
37
+ q quit
38
+ a toggle agent side panel
39
+ f cycle agent filter
40
+ p toggle full-screen permission view
41
+ space pause / resume event stream
42
+ c clear events
43
+ ```
44
+
45
+ ## CLI
46
+
47
+ ```
48
+ agentwatch launch the TUI
49
+ agentwatch doctor detect installed agents and print config paths
50
+ agentwatch --help usage
51
+ ```
52
+
53
+ `$WORKSPACE_ROOT` overrides the detected workspace root.
54
+
55
+ ## How it compares
56
+
57
+ | | agentwatch | claude-devtools | Unfucked | Langfuse / Phoenix |
58
+ |---|---|---|---|---|
59
+ | Runs locally only | ✓ | ✓ | ✓ | self-host possible |
60
+ | Multi-agent | ✓ Claude + Cursor + OpenClaw | Claude only | agent-agnostic (file-level) | production apps, not CLI agents |
61
+ | Per-agent attribution | ✓ | ✓ | ✗ (file-level only) | N/A |
62
+ | Permission surface view | ✓ | ✗ | ✗ | ✗ |
63
+ | Install | `npm i -g` | Homebrew / Electron app | Homebrew / Rust binary | Docker + Postgres |
64
+
65
+ ## Non-goals
66
+
67
+ - Not cloud. Not a SaaS. Not ever.
68
+ - Not an agent itself.
69
+ - Not production LLM-app tracing — [Langfuse](https://langfuse.com) owns that space.
70
+ - Not enterprise compliance — Anthropic's Compliance API covers that.
71
+ - Not orchestration. Use [Mission Control](https://github.com/MeisnerDan/mission-control) or [DevSwarm](https://devswarm.ai) for running agents in parallel.
72
+
73
+ ## Roadmap
74
+
75
+ - Codex + Gemini CLI adapters
76
+ - Deeper Cursor activity (SQLite AI-tracking DB)
77
+ - MCP proxy mode (`agentwatch wrap <agent>`)
78
+ - Permission viewer for OpenClaw + Cursor + Codex + Gemini
79
+
80
+ Feature requests → [GitHub issues](https://github.com/mishanefedov/agentwatch/issues).
81
+
82
+ ## Development
83
+
84
+ ```bash
85
+ git clone https://github.com/mishanefedov/agentwatch.git
86
+ cd agentwatch
87
+ npm install
88
+ npm run dev
89
+ ```
90
+
91
+ Run tests with `npm test`. Typecheck with `npm run typecheck`.
92
+
93
+ ## License
94
+
95
+ MIT © Misha Nefedov. See [LICENSE](./LICENSE).
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../dist/index.js";
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/util/workspace.ts
4
+ import { existsSync, statSync } from "fs";
5
+ import { homedir } from "os";
6
+ import { join } from "path";
7
+ function detectWorkspaceRoot() {
8
+ const envRoot = process.env.WORKSPACE_ROOT;
9
+ if (envRoot && isDir(envRoot)) return envRoot;
10
+ const home = homedir();
11
+ const candidates = [
12
+ join(home, "IdeaProjects"),
13
+ join(home, "src"),
14
+ join(home, "code"),
15
+ join(home, "Projects"),
16
+ join(home, "dev")
17
+ ];
18
+ for (const c of candidates) {
19
+ if (isDir(c)) return c;
20
+ }
21
+ return home;
22
+ }
23
+ function claudeProjectsDir() {
24
+ return join(homedir(), ".claude", "projects");
25
+ }
26
+ function isDir(p) {
27
+ try {
28
+ return existsSync(p) && statSync(p).isDirectory();
29
+ } catch {
30
+ return false;
31
+ }
32
+ }
33
+
34
+ export {
35
+ detectWorkspaceRoot,
36
+ claudeProjectsDir
37
+ };
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/adapters/detect.ts
4
+ import { existsSync } from "fs";
5
+ import { homedir } from "os";
6
+ import { join } from "path";
7
+ function detectAgents() {
8
+ const home = homedir();
9
+ return [
10
+ {
11
+ name: "claude-code",
12
+ label: "Claude Code",
13
+ configPath: join(home, ".claude", "settings.json"),
14
+ present: existsSync(join(home, ".claude", "projects"))
15
+ },
16
+ {
17
+ name: "codex",
18
+ label: "Codex",
19
+ configPath: join(home, ".codex", "config.toml"),
20
+ present: existsSync(join(home, ".codex"))
21
+ },
22
+ {
23
+ name: "cursor",
24
+ label: "Cursor",
25
+ configPath: join(home, ".cursor", "mcp.json"),
26
+ present: existsSync(join(home, ".cursor"))
27
+ },
28
+ {
29
+ name: "gemini",
30
+ label: "Gemini CLI",
31
+ configPath: join(home, ".gemini", "settings.json"),
32
+ present: existsSync(join(home, ".gemini"))
33
+ },
34
+ {
35
+ name: "openclaw",
36
+ label: "OpenClaw",
37
+ configPath: join(home, ".openclaw"),
38
+ present: existsSync(join(home, ".openclaw"))
39
+ }
40
+ ];
41
+ }
42
+
43
+ export {
44
+ detectAgents
45
+ };
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ detectAgents
4
+ } from "./chunk-LF76VUCL.js";
5
+ export {
6
+ detectAgents
7
+ };