opencode-auto-resume 1.1.6 → 1.1.9

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 CHANGED
@@ -349,3 +349,4 @@ The plugin handles all recovery automatically — no manual intervention needed.
349
349
  | Hallucination loop not caught | Decrease `loopMaxContinues` to `2` |
350
350
  | Tool-text not detected | Check server logs — requires SDK message fetching |
351
351
  | Long-running tool killed | Should not happen — active-tool guard prevents it. Report a bug. |
352
+ | `Unexpected server error` on startup | Update to v1.1.8+. Caused by non-Plugin exports being treated as plugin entrypoints by OpenCode's loader. Clear the plugin cache (`~/.cache/opencode/packages/opencode-auto-resume@*`) and restart. |
package/dist/index.js CHANGED
@@ -12523,6 +12523,8 @@ function isOpenTodo(t) {
12523
12523
  return t.status === "pending" || t.status === "in_progress";
12524
12524
  }
12525
12525
  function getOpenTodos(todos) {
12526
+ if (!Array.isArray(todos))
12527
+ return [];
12526
12528
  return todos.filter(isOpenTodo);
12527
12529
  }
12528
12530
  function buildOpenTodosReminder(todos) {
@@ -13911,12 +13913,13 @@ var AutoResumePlugin = async (ctx, options) => {
13911
13913
  if (!sid)
13912
13914
  break;
13913
13915
  const props = ev.properties;
13914
- const todos = props?.todos ?? [];
13916
+ const rawTodos = props?.todos;
13917
+ const todos = Array.isArray(rawTodos) ? rawTodos : [];
13915
13918
  const w = ensureWatch(sid);
13916
13919
  w.todos = todos.map((t) => ({
13917
- content: t.content ?? "",
13918
- status: t.status ?? "pending",
13919
- priority: t.priority ?? "medium"
13920
+ content: t?.content ?? "",
13921
+ status: t?.status ?? "pending",
13922
+ priority: t?.priority ?? "medium"
13920
13923
  }));
13921
13924
  break;
13922
13925
  }
@@ -14050,10 +14053,6 @@ var AutoResumePlugin = async (ctx, options) => {
14050
14053
  };
14051
14054
  var src_default = AutoResumePlugin;
14052
14055
  export {
14053
- isStreamingFailure,
14054
- getLastAssistantError,
14055
14056
  src_default as default,
14056
- buildOpenTodosReminder,
14057
- backoffMs,
14058
14057
  AutoResumePlugin
14059
14058
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-auto-resume",
3
- "version": "1.1.6",
3
+ "version": "1.1.9",
4
4
  "description": "OpenCode plugin that automatically resumes stalled LLM sessions when thinking/streaming freezes mid-generation.",
5
5
  "keywords": [
6
6
  "opencode",