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.
Files changed (3) hide show
  1. package/README.md +34 -22
  2. package/dist/index.js +50 -12385
  3. 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
- ### Opencode
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
- ### Manual
65
+ Add to your `opencode.jsonc`:
68
66
 
69
- ```bash
70
- mkdir -p ~/.config/opencode/plugin/opencode-auto-resume
71
- cd ~/.config/opencode/plugin/opencode-auto-resume
72
- # Copy package.json, tsconfig.json, src/ here
73
- bun install
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
- Register in `opencode.json`:
74
+ With options:
78
75
 
79
- ```json
76
+ ```jsonc
80
77
  {
81
- "$schema": "https://opencode.ai/config.json",
82
78
  "plugin": [
83
- "file:///home/YOURUSER/.config/opencode/plugins/opencode-auto-resume/dist/index.js"
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
- ## Manual resume
124
+ ## Verification
114
125
 
115
- The plugin exposes a `resume` tool:
126
+ To verify the plugin is loaded:
116
127
 
117
- ```
118
- Please use the resume tool to unstick this session
119
- Please use the resume tool with prompt "try the edit on src/main.js again"
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