@raindrop-ai/opencode-plugin 0.1.4 → 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 +23 -2
- package/dist/chunk-4DAI6CYK.js +2573 -0
- package/dist/index.cjs +22 -3
- package/dist/index.d-vgBcEZbX.d.cts +89 -0
- package/dist/index.d-vgBcEZbX.d.ts +89 -0
- package/dist/index.d.cts +2 -78
- package/dist/index.d.ts +2 -78
- package/dist/index.js +155 -2678
- package/dist/v2.cjs +3327 -0
- package/dist/v2.d.cts +41 -0
- package/dist/v2.d.ts +41 -0
- package/dist/v2.js +761 -0
- package/package.json +22 -3
package/README.md
CHANGED
|
@@ -54,10 +54,31 @@ 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`
|
|
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.
|
|
62
83
|
|
|
63
84
|
## Application Git identity
|