@segosolutions/auto-task 1.3.0 → 1.5.0
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 +57 -8
- package/dist/index.mjs +54 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,11 +34,15 @@ This means less manual work for you and faster turnaround for your clients.
|
|
|
34
34
|
|
|
35
35
|
## Prerequisites
|
|
36
36
|
|
|
37
|
-
> **Important:**
|
|
37
|
+
> **Important:** The monitor uses the Claude Agent SDK by default. For legacy CLI mode, see the CLI Mode section below.
|
|
38
38
|
|
|
39
|
-
### Claude
|
|
39
|
+
### Claude Agent SDK (Default)
|
|
40
40
|
|
|
41
|
-
The
|
|
41
|
+
The Agent SDK is included as a dependency and will be used automatically. No additional installation required.
|
|
42
|
+
|
|
43
|
+
### Claude Code CLI (Legacy Mode)
|
|
44
|
+
|
|
45
|
+
If you prefer to use the legacy CLI subprocess mode, install and authenticate:
|
|
42
46
|
|
|
43
47
|
```bash
|
|
44
48
|
# Install globally
|
|
@@ -49,6 +53,9 @@ claude auth login
|
|
|
49
53
|
|
|
50
54
|
# Verify it works
|
|
51
55
|
claude --version
|
|
56
|
+
|
|
57
|
+
# Run monitor in CLI mode
|
|
58
|
+
sego-auto-task --use-cli-mode
|
|
52
59
|
```
|
|
53
60
|
|
|
54
61
|
> **Note:** Claude Code requires an Anthropic account with API access.
|
|
@@ -70,12 +77,23 @@ npm install -g @segosolutions/auto-task
|
|
|
70
77
|
# Step 2: Run the interactive setup wizard
|
|
71
78
|
sego-auto-task init
|
|
72
79
|
|
|
73
|
-
# Step 3: Start monitoring
|
|
80
|
+
# Step 3: Start monitoring (that's it - smart defaults handle the rest!)
|
|
74
81
|
sego-auto-task
|
|
75
82
|
```
|
|
76
83
|
|
|
77
84
|
That's it! The monitor will now process eligible tasks automatically.
|
|
78
85
|
|
|
86
|
+
### Smart Defaults
|
|
87
|
+
|
|
88
|
+
When you run `sego-auto-task` with a configured `.env` file, intelligent defaults are applied:
|
|
89
|
+
|
|
90
|
+
- **Agent SDK** is used by default (no `--use-agent-sdk` flag needed)
|
|
91
|
+
- **Stream progress** is enabled by default (real-time updates in web UI)
|
|
92
|
+
- **SSE/real-time mode** is enabled when `PROJECT_ID` is set
|
|
93
|
+
- **Auto-commit/push** are disabled by default for safety
|
|
94
|
+
|
|
95
|
+
The startup banner shows the source of each setting (`[cli]`, `[env]`, or `[default]`) so you always know where your configuration comes from.
|
|
96
|
+
|
|
79
97
|
### One-Liner (For the impatient)
|
|
80
98
|
|
|
81
99
|
```bash
|
|
@@ -161,7 +179,11 @@ Create a `.env` file in your project directory (or use `sego-auto-task init`):
|
|
|
161
179
|
| `SEGO_API_URL` | No | `https://sego.pm` | API endpoint URL |
|
|
162
180
|
| `SEGO_PROJECT_ID` | No | All projects | Filter to a specific project |
|
|
163
181
|
| `SEGO_WORKING_DIR` | No | Current directory | Working directory for Claude |
|
|
182
|
+
| `USE_CLI_MODE` | No | `false` | Use legacy CLI subprocess instead of Agent SDK |
|
|
183
|
+
| `STREAM_PROGRESS` | No | `true` | Stream agent progress events to the web app |
|
|
164
184
|
| `CONVERSATION_ONLY` | No | `false` | Only handle conversations, skip auto-tasks |
|
|
185
|
+
| `AUTO_COMMIT` | No | `false` | Automatically commit changes after task completion |
|
|
186
|
+
| `AUTO_PUSH` | No | `false` | Automatically push commits to remote (requires AUTO_COMMIT) |
|
|
165
187
|
|
|
166
188
|
**Example `.env` file:**
|
|
167
189
|
|
|
@@ -173,7 +195,12 @@ SEGO_API_KEY=sk_live_your_key_here
|
|
|
173
195
|
SEGO_API_URL=https://sego.pm
|
|
174
196
|
SEGO_PROJECT_ID=proj_abc123
|
|
175
197
|
SEGO_WORKING_DIR=/path/to/project
|
|
176
|
-
|
|
198
|
+
|
|
199
|
+
# Feature flags
|
|
200
|
+
STREAM_PROGRESS=true # Stream progress events to web app (default: true)
|
|
201
|
+
CONVERSATION_ONLY=false # Only process conversations, skip auto-tasks
|
|
202
|
+
AUTO_COMMIT=false # Automatically commit changes after task completion
|
|
203
|
+
AUTO_PUSH=false # Automatically push commits to remote
|
|
177
204
|
```
|
|
178
205
|
|
|
179
206
|
### CLI Options
|
|
@@ -190,7 +217,11 @@ All options can be passed via command line (overrides environment variables):
|
|
|
190
217
|
| `--client-request-timeout <minutes>` | Client request analysis timeout | `2` |
|
|
191
218
|
| `--no-sse` | Disable real-time SSE mode | SSE enabled |
|
|
192
219
|
| `--dry-run` | Check for tasks without processing | `false` |
|
|
220
|
+
| `--use-cli-mode` | Use legacy CLI subprocess instead of Agent SDK | `false` |
|
|
221
|
+
| `--no-stream-progress` | Disable streaming progress events to the web app | Streaming enabled |
|
|
193
222
|
| `--conversation-only` | Only handle conversational sessions, skip auto-task processing | `false` |
|
|
223
|
+
| `--auto-commit` | Automatically commit changes after task completion | `false` |
|
|
224
|
+
| `--auto-push` | Automatically push commits to remote (requires --auto-commit) | `false` |
|
|
194
225
|
| `--working-dir <path>` | Working directory for Claude | Current directory |
|
|
195
226
|
| `--no-update-check` | Skip update check on startup | Check enabled |
|
|
196
227
|
| `-V, --version` | Show version number | |
|
|
@@ -286,7 +317,7 @@ New Request/Task Found
|
|
|
286
317
|
Claim Task (mark IN_PROGRESS)
|
|
287
318
|
|
|
|
288
319
|
v
|
|
289
|
-
Run Claude with project context
|
|
320
|
+
Run Claude Agent SDK with project context
|
|
290
321
|
|
|
|
291
322
|
v
|
|
292
323
|
Complete (move to IN_REVIEW)
|
|
@@ -295,6 +326,8 @@ New Request/Task Found
|
|
|
295
326
|
Post results as task comment
|
|
296
327
|
```
|
|
297
328
|
|
|
329
|
+
> **Note:** The monitor uses the Agent SDK by default for execution. Use `--use-cli-mode` to switch to the legacy CLI subprocess mode.
|
|
330
|
+
|
|
298
331
|
---
|
|
299
332
|
|
|
300
333
|
## Project Configuration (Sego PM)
|
|
@@ -435,9 +468,16 @@ docker run -d --name sego-monitor sego-auto-task
|
|
|
435
468
|
|
|
436
469
|
## Troubleshooting
|
|
437
470
|
|
|
438
|
-
### "Claude
|
|
471
|
+
### "Claude Agent SDK is not available"
|
|
472
|
+
|
|
473
|
+
The monitor uses the Agent SDK by default. This is bundled with the package, so this error is rare. If you encounter it:
|
|
474
|
+
|
|
475
|
+
1. Reinstall the package: `npm install -g @segosolutions/auto-task`
|
|
476
|
+
2. Or use legacy CLI mode: `sego-auto-task --use-cli-mode`
|
|
439
477
|
|
|
440
|
-
|
|
478
|
+
### "Claude CLI is not available" (Legacy Mode)
|
|
479
|
+
|
|
480
|
+
If using `--use-cli-mode`, the Claude Code CLI must be installed and authenticated:
|
|
441
481
|
|
|
442
482
|
```bash
|
|
443
483
|
# Install Claude CLI
|
|
@@ -639,6 +679,15 @@ node dist/index.cjs --help
|
|
|
639
679
|
|
|
640
680
|
## Changelog
|
|
641
681
|
|
|
682
|
+
### v1.4.0
|
|
683
|
+
|
|
684
|
+
- **Smart defaults**: Agent SDK and stream progress enabled by default
|
|
685
|
+
- **Auto-commit/push**: Automatically commit and push changes after task completion
|
|
686
|
+
- **Config source tracking**: Startup banner shows where each setting comes from (`[cli]`, `[env]`, `[default]`)
|
|
687
|
+
- New CLI flags: `--auto-commit`, `--auto-push`, `--no-stream-progress`
|
|
688
|
+
- New env vars: `AUTO_COMMIT`, `AUTO_PUSH`, `STREAM_PROGRESS`
|
|
689
|
+
- Replaced `--use-agent-sdk` with `--use-cli-mode` (legacy mode)
|
|
690
|
+
|
|
642
691
|
### v1.0.1
|
|
643
692
|
|
|
644
693
|
- Fixed repository URLs in package.json
|