feat: add destroy command and session_id validation

- Add destroy subcommand for deleting sessions
- Add destroy --all for fresh start with confirmation
- Add -y flag to skip confirmation prompts
- Add validate_session_id() to reject empty session_ids
- Remove misleading force resume error message
- Update SKILL.md to v1.1 with destroy documentation
This commit is contained in:
shokollm
2026-03-29 14:34:56 +00:00
parent b992949314
commit dd9a444920
2 changed files with 136 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ license: MIT
compatibility: Requires opencode CLI, bash, and filesystem access for session state.
metadata:
author: shoko
version: "1.0"
version: "1.1"
---
# kugetsu - OpenCode Session Manager
@@ -85,6 +85,23 @@ kugetsu stop mytask
- Sends SIGTERM to process
- Sets state to `idle`
### kugetsu destroy `<session_id>` [-y]
Delete a session:
```bash
kugetsu destroy mytask # Prompts for confirmation (default: N)
kugetsu destroy mytask -y # Skips confirmation
```
- Errors if session is `used` (use `stop` first)
- Errors if session not found
### kugetsu destroy --all [-y]
Delete all sessions:
```bash
kugetsu destroy --all # Prompts for confirmation (default: N)
kugetsu destroy --all -y # Skips confirmation
```
- Useful for fresh start
### kugetsu help
Show usage help.
@@ -94,6 +111,9 @@ Show usage help.
start ──────────────► used ──────► idle (stop/SIGTERM)
└──────► left (kill/SIGINT/crash)
destroy (delete)
```
## Example Workflow
@@ -112,6 +132,9 @@ kugetsu resume issue42
# Later, when done
kugetsu stop issue42
# When you want a fresh start
kugetsu destroy --all
```
## Without kugetsu