copilot-agent 0.7.0 → 0.8.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/README.md CHANGED
@@ -1,16 +1,21 @@
1
1
  # copilot-agent
2
2
 
3
- Autonomous GitHub Copilot CLI agent — auto-resume sessions, discover tasks, run overnight.
3
+ Autonomous AI agent manager — auto-resume sessions, discover tasks, run overnight. Supports **GitHub Copilot CLI** and **Claude Code**.
4
4
 
5
5
  ## Features
6
6
 
7
- - **`status`** View recent & active Copilot sessions with premium usage
8
- - **`watch`** — Monitor a session, auto-resume when it stops
9
- - **`run`** Auto-discover and fix issues in any project
10
- - **`overnight`** Run tasks continuously until a deadline (e.g. 07:00)
11
- - **`research`** Research improvements, dependencies, architecture
12
- - **`daemon`** Background watchdog that auto-resumes interrupted sessions
13
- - **`multi`** Multi-project orchestrator (register projects, run health/research on all)
7
+ | Command | Description |
8
+ |---------|-------------|
9
+ | **`status`** | View sessions & active processes from both Copilot and Claude |
10
+ | **`watch`** | Monitor a session, auto-resume when it stops |
11
+ | **`run`** | Auto-discover and fix issues in any project |
12
+ | **`overnight`** | Run tasks continuously until a deadline (e.g. 07:00) |
13
+ | **`research`** | Architecture, security, and performance analysis |
14
+ | **`report`** | Session activity report — tools, commits, files, tokens |
15
+ | **`dashboard`** | Real-time TUI dashboard (pure terminal) |
16
+ | **`web`** | Web dashboard with live updates (Hono + htmx + SSE) |
17
+
18
+ All commands support `--agent copilot` or `--agent claude` (auto-detects if omitted).
14
19
 
15
20
  ## Install
16
21
 
@@ -18,18 +23,27 @@ Autonomous GitHub Copilot CLI agent — auto-resume sessions, discover tasks, ru
18
23
  npm install -g copilot-agent
19
24
  ```
20
25
 
21
- Requires [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli) installed and authenticated.
26
+ ### Prerequisites
27
+
28
+ At least one of:
29
+
30
+ - [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli) — installed and authenticated
31
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) — installed and authenticated
22
32
 
23
33
  ## Usage
24
34
 
25
35
  ### Show session status
26
36
 
27
37
  ```bash
28
- # Recent sessions
38
+ # All sessions (copilot + claude merged)
29
39
  copilot-agent status
30
40
 
31
- # Active (running) sessions only
41
+ # Active processes only
32
42
  copilot-agent status --active
43
+
44
+ # Filter by agent
45
+ copilot-agent status --agent claude
46
+ copilot-agent status --agent copilot
33
47
  ```
34
48
 
35
49
  ### Watch & auto-resume
@@ -38,8 +52,8 @@ copilot-agent status --active
38
52
  # Auto-detect latest incomplete session
39
53
  copilot-agent watch
40
54
 
41
- # Watch specific session
42
- copilot-agent watch abc12345-...
55
+ # Watch specific session with Claude
56
+ copilot-agent watch abc12345-... --agent claude
43
57
 
44
58
  # Custom resume settings
45
59
  copilot-agent watch --steps 100 --max-resumes 50
@@ -48,14 +62,17 @@ copilot-agent watch --steps 100 --max-resumes 50
48
62
  ### Discover & fix issues
49
63
 
50
64
  ```bash
51
- # Run on current directory
65
+ # Run with auto-detected agent
52
66
  copilot-agent run
53
67
 
54
- # Run on specific project
55
- copilot-agent run ~/my-project
68
+ # Run on specific project with Claude Code
69
+ copilot-agent run ~/my-project --agent claude
56
70
 
57
71
  # Preview tasks without executing
58
72
  copilot-agent run --dry-run
73
+
74
+ # Use git worktree for parallel execution
75
+ copilot-agent run --worktree
59
76
  ```
60
77
 
61
78
  ### Overnight runner
@@ -64,57 +81,58 @@ copilot-agent run --dry-run
64
81
  # Run until 7am (default)
65
82
  copilot-agent overnight ~/my-project
66
83
 
67
- # Custom deadline & budget
68
- copilot-agent overnight --until 06:00 --max-premium 200
84
+ # Run with Claude Code
85
+ copilot-agent overnight --agent claude --until 07 --max-premium 200
69
86
 
70
- # Preview
71
- copilot-agent overnight --dry-run
87
+ # Use worktree for parallel tasks
88
+ copilot-agent overnight --worktree
72
89
  ```
73
90
 
74
- ### Research
91
+ ### Session report
75
92
 
76
93
  ```bash
77
- # Run all predefined research tasks
78
- copilot-agent research
94
+ # Latest session
95
+ copilot-agent report
96
+
97
+ # Specific session
98
+ copilot-agent report abc12345-...
99
+
100
+ # Multiple recent sessions as JSON
101
+ copilot-agent report -l 5 --json
79
102
 
80
- # Research a specific topic
81
- copilot-agent research "migrate from Room to SQLDelight"
103
+ # Filter by project directory
104
+ copilot-agent report --project ~/my-project
82
105
  ```
83
106
 
84
- ### Background daemon
107
+ ### Research
85
108
 
86
109
  ```bash
87
- # Start watchdog (monitors & auto-resumes sessions)
88
- copilot-agent daemon start --resume
110
+ # Analyze current project
111
+ copilot-agent research
89
112
 
90
- # Check status / view logs / stop
91
- copilot-agent daemon status
92
- copilot-agent daemon logs
93
- copilot-agent daemon stop
113
+ # With Claude Code
114
+ copilot-agent research --agent claude
94
115
  ```
95
116
 
96
- ### Multi-project
117
+ ### Dashboards
97
118
 
98
119
  ```bash
99
- # Register projects
100
- copilot-agent multi add ~/project-a
101
- copilot-agent multi add ~/project-b
102
- copilot-agent multi list
103
-
104
- # Run health check on all projects
105
- copilot-agent multi health
120
+ # Terminal UI (pure ANSI, no deps)
121
+ copilot-agent dashboard
106
122
 
107
- # Run research on all projects
108
- copilot-agent multi research --dry-run
123
+ # Web UI (Hono + htmx, opens browser)
124
+ copilot-agent web
125
+ copilot-agent web --port 8080
109
126
  ```
110
127
 
111
128
  ## How it works
112
129
 
113
- 1. **Session detection** — Reads `~/.copilot/session-state/*/events.jsonl` to detect task completion vs interruption
114
- 2. **Auto-resume** — Uses `copilot --resume=SESSION_ID --autopilot` to continue interrupted sessions
115
- 3. **Task discovery** — Detects project type (KMP, React, Python, etc.) and generates relevant maintenance tasks
116
- 4. **Race prevention** — File locking via `proper-lockfile` prevents concurrent copilot runs
117
- 5. **Process tracking** — Uses `ps-list` to find and wait for copilot processes by PID
130
+ 1. **Agent abstraction** — Unified interface for both Copilot CLI and Claude Code
131
+ 2. **Session detection** — Reads Copilot (`~/.copilot/session-state/`) and Claude (`~/.claude/projects/`) session files
132
+ 3. **Auto-resume** — Copilot: `--resume --autopilot`; Claude: `--resume --dangerously-skip-permissions`
133
+ 4. **Task discovery** — Detects project type and generates relevant maintenance tasks
134
+ 5. **Race prevention** — File locking + process tracking prevents concurrent agents in the same directory
135
+ 6. **Worktree isolation** — Optional `--worktree` flag for parallel task execution via `git worktree`
118
136
 
119
137
  ## Supported project types
120
138
 
@@ -130,8 +148,8 @@ copilot-agent multi research --dry-run
130
148
  ## Requirements
131
149
 
132
150
  - Node.js ≥ 18
133
- - GitHub Copilot CLI installed & authenticated
134
151
  - macOS or Linux
152
+ - At least one: GitHub Copilot CLI or Claude Code
135
153
 
136
154
  ## License
137
155