@yail259/overnight 0.1.0 → 0.3.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/.context/notes.md +0 -0
- package/.context/todos.md +0 -0
- package/README.md +73 -16
- package/dist/cli.js +1754 -249
- package/package.json +2 -2
- package/src/cli.ts +499 -112
- package/src/goal-runner.ts +709 -0
- package/src/planner.ts +238 -0
- package/src/runner.ts +427 -47
- package/src/security.ts +162 -0
- package/src/types.ts +85 -4
|
File without changes
|
|
File without changes
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Batch job runner for Claude Code. Queue tasks, run them unattended, get results.
|
|
|
9
9
|
- **Push Notifications** - `--notify` sends completion summary to ntfy.sh (free, no signup).
|
|
10
10
|
- **Markdown Reports** - `-r report.md` generates a summary with status and next steps.
|
|
11
11
|
- **Verification Loops** - Optionally runs a verification prompt after each task.
|
|
12
|
-
- **
|
|
12
|
+
- **Security Sandboxing** - Path sandboxing, deny patterns for sensitive files, max turns limit, audit logging.
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
@@ -84,6 +84,10 @@ tasks:
|
|
|
84
84
|
| `--notify` | Send push notification via ntfy.sh |
|
|
85
85
|
| `--notify-topic <topic>` | ntfy.sh topic (default: overnight) |
|
|
86
86
|
| `-q, --quiet` | Minimal output |
|
|
87
|
+
| `--sandbox <dir>` | Restrict file access to directory |
|
|
88
|
+
| `--max-turns <n>` | Max agent iterations (default: 100) |
|
|
89
|
+
| `--audit-log <file>` | Log all file operations |
|
|
90
|
+
| `--no-security` | Disable default deny patterns |
|
|
87
91
|
|
|
88
92
|
### `overnight single`
|
|
89
93
|
|
|
@@ -92,6 +96,9 @@ tasks:
|
|
|
92
96
|
| `-t, --timeout <secs>` | Timeout in seconds (default: 300) |
|
|
93
97
|
| `--verify/--no-verify` | Run verification pass (default: true) |
|
|
94
98
|
| `-T, --tools <tool...>` | Allowed tools (can specify multiple) |
|
|
99
|
+
| `--sandbox <dir>` | Restrict file access to directory |
|
|
100
|
+
| `--max-turns <n>` | Max agent iterations (default: 100) |
|
|
101
|
+
| `--no-security` | Disable default deny patterns |
|
|
95
102
|
|
|
96
103
|
## Example Workflows
|
|
97
104
|
|
|
@@ -154,24 +161,74 @@ The state file is automatically deleted on successful completion.
|
|
|
154
161
|
|
|
155
162
|
## Security
|
|
156
163
|
|
|
157
|
-
|
|
158
|
-
- `Read` - Read files
|
|
159
|
-
- `Edit` - Edit files
|
|
160
|
-
- `Write` - Write files
|
|
161
|
-
- `Glob` - Find files by pattern
|
|
162
|
-
- `Grep` - Search file contents
|
|
164
|
+
overnight includes multiple layers of security to prevent rogue agents:
|
|
163
165
|
|
|
164
|
-
|
|
166
|
+
### Tool Whitelisting
|
|
165
167
|
|
|
168
|
+
By default, only safe file operations are allowed (no Bash):
|
|
169
|
+
- `Read`, `Edit`, `Write`, `Glob`, `Grep`
|
|
170
|
+
|
|
171
|
+
### Deny Patterns (Enabled by Default)
|
|
172
|
+
|
|
173
|
+
Sensitive files are automatically blocked:
|
|
174
|
+
- `.env`, `.env.*` - Environment secrets
|
|
175
|
+
- `.git/config` - Git credentials
|
|
176
|
+
- `*.key`, `*.pem`, `*.p12` - Private keys
|
|
177
|
+
- `id_rsa*`, `id_ed25519*` - SSH keys
|
|
178
|
+
- `.ssh/*`, `.aws/*` - Cloud credentials
|
|
179
|
+
- `.npmrc`, `.netrc` - Auth tokens
|
|
180
|
+
|
|
181
|
+
### Path Sandboxing
|
|
182
|
+
|
|
183
|
+
Restrict agent to a specific directory:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
overnight run tasks.yaml --sandbox ./src
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Or in tasks.yaml:
|
|
166
190
|
```yaml
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
191
|
+
defaults:
|
|
192
|
+
security:
|
|
193
|
+
sandbox_dir: "./src"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Max Turns Limit
|
|
197
|
+
|
|
198
|
+
Prevent runaway agents with iteration limits:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
overnight run tasks.yaml --max-turns 50
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Audit Logging
|
|
205
|
+
|
|
206
|
+
Log all file operations:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
overnight run tasks.yaml --audit-log overnight-audit.log
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Full Security Config Example
|
|
213
|
+
|
|
214
|
+
```yaml
|
|
215
|
+
defaults:
|
|
216
|
+
security:
|
|
217
|
+
sandbox_dir: "."
|
|
218
|
+
max_turns: 100
|
|
219
|
+
audit_log: "overnight-audit.log"
|
|
220
|
+
deny_patterns:
|
|
221
|
+
- "**/.env*"
|
|
222
|
+
- "**/*.key"
|
|
223
|
+
- "**/secrets.*"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Disabling Security
|
|
227
|
+
|
|
228
|
+
To run without deny patterns (not recommended):
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
overnight run tasks.yaml --no-security
|
|
175
232
|
```
|
|
176
233
|
|
|
177
234
|
## Exit Codes
|