opencode-auto-resume 1.0.0 → 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 +36 -14
- package/dist/index.js +209 -12433
- package/package.json +8 -3
- package/src/index.ts +0 -770
- package/tsconfig.json +0 -14
package/README.md
CHANGED
|
@@ -56,25 +56,46 @@ Periodic: cleanup idle sessions older than 10min or >50 entries
|
|
|
56
56
|
|
|
57
57
|
## Installation
|
|
58
58
|
|
|
59
|
+
### Via npm (recommended)
|
|
60
|
+
|
|
59
61
|
```bash
|
|
60
|
-
|
|
61
|
-
cd ~/.config/opencode/plugin/opencode-auto-resume
|
|
62
|
-
# Copy package.json, tsconfig.json, src/ here
|
|
63
|
-
bun install
|
|
64
|
-
bun run build
|
|
62
|
+
npm install opencode-auto-resume
|
|
65
63
|
```
|
|
66
64
|
|
|
67
|
-
|
|
65
|
+
Add to your `opencode.jsonc`:
|
|
68
66
|
|
|
69
|
-
```
|
|
67
|
+
```jsonc
|
|
70
68
|
{
|
|
71
69
|
"$schema": "https://opencode.ai/config.json",
|
|
70
|
+
"plugin": ["opencode-auto-resume"]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
With options:
|
|
75
|
+
|
|
76
|
+
```jsonc
|
|
77
|
+
{
|
|
72
78
|
"plugin": [
|
|
73
|
-
"
|
|
79
|
+
["opencode-auto-resume", {
|
|
80
|
+
"chunkTimeoutMs": 45000,
|
|
81
|
+
"gracePeriodMs": 3000,
|
|
82
|
+
"maxRetries": 3
|
|
83
|
+
}]
|
|
74
84
|
]
|
|
75
85
|
}
|
|
76
86
|
```
|
|
77
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
|
+
|
|
78
99
|
## Configuration
|
|
79
100
|
|
|
80
101
|
```json
|
|
@@ -100,14 +121,15 @@ Register in `opencode.json`:
|
|
|
100
121
|
| `loopMaxContinues` | `3` | Continues in window before triggering abort |
|
|
101
122
|
| `loopWindowMs` | `600000` | Hallucination loop detection window (10 min) |
|
|
102
123
|
|
|
103
|
-
##
|
|
124
|
+
## Verification
|
|
104
125
|
|
|
105
|
-
|
|
126
|
+
To verify the plugin is loaded:
|
|
106
127
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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.
|
|
111
133
|
|
|
112
134
|
## Troubleshooting
|
|
113
135
|
|