agent-dbg 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.
- package/.claude/settings.local.json +7 -5
- package/.claude/skills/agent-dbg/SKILL.md +116 -0
- package/.claude/skills/agent-dbg/references/commands.md +173 -0
- package/.vscode/launch.json +19 -0
- package/CLAUDE.md +2 -2
- package/PROGRESS.md +91 -91
- package/README.md +45 -17
- package/{ndbg-spec.md → SPEC.md} +152 -152
- package/dist/main.js +12500 -0
- package/package.json +3 -3
- package/src/cdp/client.ts +18 -4
- package/src/cdp/logger.ts +69 -0
- package/src/cli/parser.ts +54 -43
- package/src/commands/attach.ts +2 -2
- package/src/commands/blackbox-ls.ts +1 -1
- package/src/commands/blackbox-rm.ts +3 -3
- package/src/commands/blackbox.ts +2 -2
- package/src/commands/break-ls.ts +3 -2
- package/src/commands/break-rm.ts +2 -2
- package/src/commands/break-toggle.ts +2 -2
- package/src/commands/break.ts +46 -17
- package/src/commands/breakable.ts +2 -2
- package/src/commands/catch.ts +2 -2
- package/src/commands/console.ts +1 -1
- package/src/commands/continue.ts +5 -18
- package/src/commands/eval.ts +2 -2
- package/src/commands/exceptions.ts +1 -1
- package/src/commands/hotpatch.ts +2 -2
- package/src/commands/launch.ts +7 -11
- package/src/commands/logpoint.ts +7 -6
- package/src/commands/logs.ts +116 -0
- package/src/commands/pause.ts +5 -18
- package/src/commands/print-state.ts +85 -0
- package/src/commands/props.ts +2 -2
- package/src/commands/restart-frame.ts +1 -1
- package/src/commands/restart.ts +42 -0
- package/src/commands/run-to.ts +7 -20
- package/src/commands/scripts.ts +1 -1
- package/src/commands/search.ts +4 -3
- package/src/commands/set-return.ts +2 -2
- package/src/commands/set.ts +3 -3
- package/src/commands/source.ts +3 -2
- package/src/commands/sourcemap.ts +1 -1
- package/src/commands/stack.ts +1 -1
- package/src/commands/state.ts +3 -73
- package/src/commands/status.ts +3 -2
- package/src/commands/step.ts +5 -18
- package/src/commands/vars.ts +3 -1
- package/src/daemon/entry.ts +16 -6
- package/src/daemon/paths.ts +6 -2
- package/src/daemon/server.ts +1 -1
- package/src/daemon/session-breakpoints.ts +7 -2
- package/src/daemon/session-inspection.ts +6 -10
- package/src/daemon/session-state.ts +6 -5
- package/src/daemon/session.ts +23 -3
- package/src/formatter/logs.ts +110 -0
- package/src/formatter/path.ts +27 -0
- package/src/formatter/stack.ts +5 -2
- package/src/formatter/variables.ts +48 -1
- package/src/main.ts +2 -0
- package/src/protocol/messages.ts +3 -0
- package/tests/fixtures/async-app.js +1 -1
- package/tests/fixtures/error-app.js +1 -1
- package/tests/fixtures/simple-app.js +1 -1
- package/tests/fixtures/ts-app/src/app.ts +4 -0
- package/tests/integration/state.test.ts +7 -7
- package/tests/unit/daemon.test.ts +1 -1
- package/tests/unit/formatter.test.ts +8 -4
- package/.bin/ndbg +0 -0
- package/.claude/skills/ndbg-debugger/ndbg-debugger/SKILL.md +0 -116
- package/.claude/skills/ndbg-debugger/ndbg-debugger/references/commands.md +0 -173
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# agent-dbg
|
|
2
2
|
|
|
3
3
|
Node.js debugger CLI built for AI agents. Fast, token-efficient, no fluff.
|
|
4
4
|
|
|
@@ -9,48 +9,76 @@ Node.js debugger CLI built for AI agents. Fast, token-efficient, no fluff.
|
|
|
9
9
|
Requires [Bun](https://bun.sh).
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
12
|
+
bun install --global agent-dbg
|
|
13
|
+
npx skills add theodo-group/agent-dbg # Install skills
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
##
|
|
16
|
-
|
|
16
|
+
## Example
|
|
17
17
|
```bash
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
> agent-dbg launch --brk tsx src/app.ts
|
|
19
|
+
Session "default" started (pid 70445)
|
|
20
|
+
Paused at ./src/app.ts:0:1
|
|
21
|
+
|
|
22
|
+
> agent-dbg break src/app.ts:19
|
|
23
|
+
BP#1 set at src/app.ts:19
|
|
24
|
+
|
|
25
|
+
> agent-dbg continue
|
|
26
|
+
⏸ Paused at ./src/app.ts:19:21 (other)
|
|
27
|
+
|
|
28
|
+
Source:
|
|
29
|
+
16│
|
|
30
|
+
17│const alice: Person = { name: "Alice", age: 30 };
|
|
31
|
+
18│const greeting: string = greet(alice);
|
|
32
|
+
→ 19│const sum: number = add(2, 3);
|
|
33
|
+
^
|
|
34
|
+
20│console.log(greeting);
|
|
35
|
+
21│console.log("Sum:", sum);
|
|
36
|
+
22│
|
|
37
|
+
|
|
38
|
+
Locals:
|
|
39
|
+
@v1 greet Function greet(person)
|
|
40
|
+
@v2 add Function add(a,b)
|
|
41
|
+
@v3 alice Object { name: "Alice", age: 30 }
|
|
42
|
+
@v4 greeting "Hello, Alice! Age: 30"
|
|
43
|
+
|
|
44
|
+
Stack:
|
|
45
|
+
@f0 (anonymous) ./src/app.ts:19:21
|
|
46
|
+
@f1 run node:internal/modules/esm/module_job:413:25
|
|
47
|
+
|
|
48
|
+
Breakpoints: 1 active
|
|
21
49
|
```
|
|
22
50
|
|
|
23
51
|
## Usage
|
|
24
52
|
|
|
25
53
|
```bash
|
|
26
|
-
|
|
54
|
+
agent-dbg launch --brk node app.js
|
|
27
55
|
# Session "default" started (pid 12345)
|
|
28
56
|
# Paused at app.js:1:1
|
|
29
57
|
|
|
30
|
-
|
|
58
|
+
agent-dbg break src/handler.ts:42
|
|
31
59
|
# BP#1 src/handler.ts:42
|
|
32
60
|
|
|
33
|
-
|
|
61
|
+
agent-dbg continue
|
|
34
62
|
# Paused at src/handler.ts:42:5 (breakpoint)
|
|
35
63
|
|
|
36
|
-
|
|
64
|
+
agent-dbg vars
|
|
37
65
|
# @v1 x 42
|
|
38
66
|
# @v2 name "alice"
|
|
39
67
|
# @v3 opts {timeout: 3000}
|
|
40
68
|
|
|
41
|
-
|
|
69
|
+
agent-dbg props @v3
|
|
42
70
|
# @o1 timeout 3000
|
|
43
71
|
|
|
44
|
-
|
|
72
|
+
agent-dbg eval "x + 1"
|
|
45
73
|
# 43
|
|
46
74
|
|
|
47
|
-
|
|
75
|
+
agent-dbg step over
|
|
48
76
|
# Paused at src/handler.ts:43:5 (step)
|
|
49
77
|
|
|
50
|
-
|
|
78
|
+
agent-dbg set @v1 100
|
|
51
79
|
# @v1 changed to 100
|
|
52
80
|
|
|
53
|
-
|
|
81
|
+
agent-dbg stop
|
|
54
82
|
```
|
|
55
83
|
|
|
56
84
|
## Commands
|
|
@@ -64,4 +92,4 @@ ndbg stop
|
|
|
64
92
|
| Mutation | `set`, `set-return`, `hotpatch` |
|
|
65
93
|
| Blackbox | `blackbox`, `blackbox-ls`, `blackbox-rm` |
|
|
66
94
|
|
|
67
|
-
Run `
|
|
95
|
+
Run `agent-dbg --help` or `agent-dbg --help-agent` for the full reference.
|