@raindrop-ai/opencode-plugin 0.1.3 → 0.2.0

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
@@ -54,8 +54,33 @@ then send its `event_id` to [`/v1/signals`](https://docs.raindrop.ai):
54
54
  }
55
55
  ```
56
56
 
57
+ ## OpenCode v2 plugin API
58
+
59
+ OpenCode's newer plugin API (`@opencode/plugin`, `@opencode/sdk` v2) is served
60
+ by the `@raindrop-ai/opencode-plugin/v2` subpath. Use it instead of the default
61
+ export when running against the v2 plugin host:
62
+
63
+ ```jsonc
64
+ // opencode.json
65
+ { "plugin": ["@raindrop-ai/opencode-plugin/v2"] }
66
+ ```
67
+
68
+ ```bash
69
+ npm install @raindrop-ai/opencode-plugin @opencode/plugin
70
+ ```
71
+
72
+ The v2 entry exposes the plugin object plus a `raindrop` handle
73
+ (`users.identify`, `signals.track`, `currentEventId(sessionID)`, `flush`,
74
+ `shutdown`). Configuration, event/tracing semantics, and payload bounds are the
75
+ same as the v1 entry. `@opencode/plugin` and `@opencode/sdk` are optional peer
76
+ dependencies — v1 users install neither.
77
+
57
78
  ## Notes
58
79
 
59
- - `@opencode-ai/plugin` is required.
60
- - `@opencode-ai/sdk` is an optional peer dependency.
80
+ - `@opencode-ai/plugin` is required for the default (v1) export; `@opencode/plugin` for `/v2`.
81
+ - `@opencode-ai/sdk` and `@opencode/sdk` are optional peer dependencies.
61
82
  - Tests live in the nested `tests/` package and validate HTTP payloads and tracing behavior.
83
+
84
+ ## Application Git identity
85
+
86
+ OpenCode does not treat the edited project directory or ambient deploy/CI metadata in the plugin process as the agent-under-test revision. By default the new canonical application revision is unknown. Configure an `app_git` object in `raindrop.json` using `commit_sha`, `commit_dirty`, and ordinary `branch`, set `RAINDROP_COMMIT_SHA` / `RAINDROP_COMMIT_DIRTY` / `RAINDROP_BRANCH`, or set an explicit `source_directory` (or `RAINDROP_GIT_SOURCE_DIRECTORY`) that identifies the agent-under-test checkout. Set `app_git` to `false` to opt out. Automatic canonical branch discovery is off unless `detect_branch` is true.