feat: line-based process logs
This commit is contained in:
@@ -15,7 +15,7 @@ Key parameters:
|
||||
- `command` (required)
|
||||
- `yieldMs` (default 20000): auto‑background after this delay
|
||||
- `background` (bool): background immediately
|
||||
- `timeout` (seconds): kill the process after this timeout
|
||||
- `timeout` (seconds, default 1800): kill the process after this timeout
|
||||
- `workdir`, `env`
|
||||
|
||||
Behavior:
|
||||
@@ -28,6 +28,11 @@ Environment overrides:
|
||||
- `PI_BASH_MAX_OUTPUT_CHARS`: in‑memory output cap (chars)
|
||||
- `PI_BASH_JOB_TTL_MS`: TTL for finished sessions (ms, bounded to 1m–3h)
|
||||
|
||||
Config (preferred):
|
||||
- `agent.bash.backgroundMs` (default 20000)
|
||||
- `agent.bash.timeoutSec` (default 1800)
|
||||
- `agent.bash.cleanupMs` (default 1800000)
|
||||
|
||||
## process tool
|
||||
|
||||
Actions:
|
||||
@@ -43,6 +48,8 @@ Notes:
|
||||
- Only backgrounded sessions are listed/persisted in memory.
|
||||
- Sessions are lost on process restart (no disk persistence).
|
||||
- Session logs are only saved to chat history if you run `process poll/log` and the tool result is recorded.
|
||||
- `process list` includes a derived `name` (command verb + target) for quick scans.
|
||||
- `process log` uses line-based `offset`/`limit` (omit `offset` to grab the last N lines).
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
@@ -131,11 +131,21 @@ Controls the embedded agent runtime (provider/model/thinking/verbose/timeouts).
|
||||
timeoutSeconds: 600,
|
||||
mediaMaxMb: 5,
|
||||
heartbeatMinutes: 30,
|
||||
bash: {
|
||||
backgroundMs: 20000,
|
||||
timeoutSec: 1800,
|
||||
cleanupMs: 1800000
|
||||
},
|
||||
contextTokens: 200000
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`agent.bash` configures background bash defaults:
|
||||
- `backgroundMs`: time before auto-background (ms, default 20000)
|
||||
- `timeoutSec`: auto-kill after this runtime (seconds, default 1800)
|
||||
- `cleanupMs`: how long to keep finished sessions in memory (ms, default 1800000)
|
||||
|
||||
### `models` (custom providers + base URLs)
|
||||
|
||||
Clawdis uses the **pi-coding-agent** model catalog. You can add custom providers
|
||||
|
||||
@@ -20,7 +20,7 @@ Core parameters:
|
||||
- `command` (required)
|
||||
- `yieldMs` (auto-background after timeout, default 20000)
|
||||
- `background` (immediate background)
|
||||
- `timeout` (seconds; kills the process if exceeded)
|
||||
- `timeout` (seconds; kills the process if exceeded, default 1800)
|
||||
|
||||
Notes:
|
||||
- Returns `status: "running"` with a `sessionId` when backgrounded.
|
||||
@@ -34,7 +34,7 @@ Core actions:
|
||||
|
||||
Notes:
|
||||
- `poll` returns new output and exit status when complete.
|
||||
- `log` supports `offset`/`limit` to page through output.
|
||||
- `log` supports line-based `offset`/`limit` (omit `offset` to grab the last N lines).
|
||||
|
||||
### `clawdis_browser`
|
||||
Control the dedicated clawd browser.
|
||||
@@ -90,6 +90,15 @@ Notes:
|
||||
- `add` expects a full cron job object (same schema as `cron.add` RPC).
|
||||
- `update` uses `{ jobId, patch }`.
|
||||
|
||||
### `clawdis_gateway`
|
||||
Restart the running Gateway process (in-place).
|
||||
|
||||
Core actions:
|
||||
- `restart` (sends `SIGUSR1` to the current process; `clawdis gateway`/`gateway-daemon` restart in-place)
|
||||
|
||||
Notes:
|
||||
- Use `delayMs` (defaults to 2000) to avoid interrupting an in-flight reply.
|
||||
|
||||
## Parameters (common)
|
||||
|
||||
Gateway-backed tools (`clawdis_canvas`, `clawdis_nodes`, `clawdis_cron`):
|
||||
|
||||
Reference in New Issue
Block a user