You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Engine version pin**: agentmemory pins iii-engine to v0.11.2 (v0.11.6+ has incompatible sandbox model).
38
38
-**Windows**: no binary auto-download; Docker fallback needed.
39
39
40
-
## Plugin API Compliance
40
+
## Plugin API Compliance (v2)
41
41
42
-
Per [OpenCode Plugin API](https://opencode.ai/docs/en/plugins/) — `@opencode-ai/plugin`v1.15+ (Hooks interface):
42
+
Per [OpenCode Plugin API v2](https://opencode.ai/docs/en/plugins/) — `@opencode-ai/plugin`>=1.17.10 (Effect + Promise plugins):
43
43
44
+
-**`Plugin` signature**: `(input: PluginInput, options?: PluginOptions) => Promise<Hooks>`. `PluginInput` includes `client`, `project`, `directory`, `worktree`, `serverUrl`, etc.
44
45
-**`config` hook**: called on every config load. Guard with `if (!timer)` for once-only init. Signature: `config?: (input: Config) => Promise<void>`.
45
-
-**`event` hook**: subscribe to lifecycle events including `server.instance.disposed`. Use for cleanup.
46
-
-**`timer.unref()`**: mark the health-check interval as non-blocking so it never prevents the Node process from exiting. Replaces the need for a `dispose` hook.
47
-
-**`dispose` does NOT exist**: the OpenCode `Hooks` interface has no `dispose` property. DO NOT return a `dispose` property from the plugin function — it will never be called. Use `timer.unref()` + the `event` hook instead.
46
+
-**`event` hook**: subscribe to lifecycle events including `server.instance.disposed`. Use for cleanup alongside `timer.unref()`.
47
+
-**`dispose` hook**: **NEW in v1.17.10+**. Called when the server shuts down. Use for deterministic cleanup.
48
+
-**`timer.unref()`**: mark the health-check interval as non-blocking so it never prevents the Node process from exiting.
48
49
-**`client.app.log()`**: Use for structured logging, not `console.error`.
49
50
50
51
## Conventions
51
52
52
53
- TypeScript strict — no `any`, no `@ts-ignore`
53
54
- Single export: `AgentmemoryLauncherPlugin: Plugin`
54
55
- Stateless — process supervision via `child.unref()`, no file I/O
55
-
- Runtime dependency: only `@opencode-ai/plugin` (devDeps in `package.json`)
56
+
- Runtime dependency: only `@opencode-ai/plugin` (>=1.17.10)
0 commit comments