opencode-auto-resume 1.0.1 → 1.0.2
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 +34 -22
- package/dist/index.js +50 -12385
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -56,35 +56,46 @@ Periodic: cleanup idle sessions older than 10min or >50 entries
|
|
|
56
56
|
|
|
57
57
|
## Installation
|
|
58
58
|
|
|
59
|
-
###
|
|
59
|
+
### Via npm (recommended)
|
|
60
60
|
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
"plugins": ["opencode-auto-resume@latest"]
|
|
64
|
-
}
|
|
61
|
+
```bash
|
|
62
|
+
npm install opencode-auto-resume
|
|
65
63
|
```
|
|
66
64
|
|
|
67
|
-
|
|
65
|
+
Add to your `opencode.jsonc`:
|
|
68
66
|
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
bun run build
|
|
67
|
+
```jsonc
|
|
68
|
+
{
|
|
69
|
+
"$schema": "https://opencode.ai/config.json",
|
|
70
|
+
"plugin": ["opencode-auto-resume"]
|
|
71
|
+
}
|
|
75
72
|
```
|
|
76
73
|
|
|
77
|
-
|
|
74
|
+
With options:
|
|
78
75
|
|
|
79
|
-
```
|
|
76
|
+
```jsonc
|
|
80
77
|
{
|
|
81
|
-
"$schema": "https://opencode.ai/config.json",
|
|
82
78
|
"plugin": [
|
|
83
|
-
"
|
|
79
|
+
["opencode-auto-resume", {
|
|
80
|
+
"chunkTimeoutMs": 45000,
|
|
81
|
+
"gracePeriodMs": 3000,
|
|
82
|
+
"maxRetries": 3
|
|
83
|
+
}]
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
### Via GitHub (manual clone)
|
|
89
|
+
|
|
90
|
+
OpenCode may clone the repository to `~/.config/opencode/plugins/opencode-auto-resume/` automatically.
|
|
91
|
+
|
|
92
|
+
**To update** the plugin:
|
|
93
|
+
```bash
|
|
94
|
+
cd ~/.config/opencode/plugins/opencode-auto-resume
|
|
95
|
+
git pull
|
|
96
|
+
bun run build
|
|
97
|
+
```
|
|
98
|
+
|
|
88
99
|
## Configuration
|
|
89
100
|
|
|
90
101
|
```json
|
|
@@ -110,14 +121,15 @@ Register in `opencode.json`:
|
|
|
110
121
|
| `loopMaxContinues` | `3` | Continues in window before triggering abort |
|
|
111
122
|
| `loopWindowMs` | `600000` | Hallucination loop detection window (10 min) |
|
|
112
123
|
|
|
113
|
-
##
|
|
124
|
+
## Verification
|
|
114
125
|
|
|
115
|
-
|
|
126
|
+
To verify the plugin is loaded:
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
128
|
+
1. Check OpenCode logs for: `opencode-auto-resume ready. timeout=45000ms...`
|
|
129
|
+
2. Let a session idle for 48 seconds — it should auto-resume
|
|
130
|
+
3. Check logs for `Stream stall` or `Ready-to-continue pattern detected`
|
|
131
|
+
|
|
132
|
+
The plugin handles all recovery automatically — no manual intervention needed.
|
|
121
133
|
|
|
122
134
|
## Troubleshooting
|
|
123
135
|
|