@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/dist/v2.d.cts ADDED
@@ -0,0 +1,41 @@
1
+ import { Plugin } from '@opencode/plugin';
2
+ import { I as IdentifyInput, S as SignalInput, A as AppGitOptions } from './index.d-vgBcEZbX.cjs';
3
+
4
+ interface RaindropOpencodeV2Options {
5
+ /** Application Git identity override. false disables enrichment. */
6
+ appGit?: AppGitOptions | false;
7
+ /** Config directory override; defaults to the first instance's ctx.location.directory. */
8
+ directory?: string;
9
+ }
10
+ /**
11
+ * The Raindrop control handle exposed on the v2 plugin. Unlike v1 (where the
12
+ * handle rides on the host-owned `Hooks` object), the OpenCode v2 API returns a
13
+ * `Plugin` object, so the handle lives on the `raindrop` property. Methods are
14
+ * safe before `setup` runs and when tracing is disabled — they no-op.
15
+ */
16
+ interface RaindropOpencodeV2Handle {
17
+ users: {
18
+ identify(users: IdentifyInput | IdentifyInput[]): Promise<void>;
19
+ };
20
+ signals: {
21
+ /** Post to `signals/track` via the shared EventShipper. */
22
+ track(signal: SignalInput): Promise<void>;
23
+ };
24
+ /** Raindrop eventId of the turn currently open for this OpenCode session, if any. */
25
+ currentEventId(sessionID: string): string | undefined;
26
+ flush(): Promise<void>;
27
+ shutdown(): Promise<void>;
28
+ }
29
+ interface RaindropOpencodePluginV2 extends Plugin.Plugin {
30
+ raindrop: RaindropOpencodeV2Handle;
31
+ }
32
+ /**
33
+ * Raindrop plugin for the OpenCode v2 plugin API (`@opencode/plugin`).
34
+ *
35
+ * Add "@raindrop-ai/opencode-plugin/v2" to the "plugin" array in opencode.json
36
+ * and set RAINDROP_WRITE_KEY. The default export of this package remains the
37
+ * v1 (`@opencode-ai/plugin`) plugin.
38
+ */
39
+ declare function raindrop(opts?: RaindropOpencodeV2Options): RaindropOpencodePluginV2;
40
+
41
+ export { IdentifyInput, type RaindropOpencodePluginV2, type RaindropOpencodeV2Handle, type RaindropOpencodeV2Options, SignalInput, raindrop as default };
package/dist/v2.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ import { Plugin } from '@opencode/plugin';
2
+ import { I as IdentifyInput, S as SignalInput, A as AppGitOptions } from './index.d-vgBcEZbX.js';
3
+
4
+ interface RaindropOpencodeV2Options {
5
+ /** Application Git identity override. false disables enrichment. */
6
+ appGit?: AppGitOptions | false;
7
+ /** Config directory override; defaults to the first instance's ctx.location.directory. */
8
+ directory?: string;
9
+ }
10
+ /**
11
+ * The Raindrop control handle exposed on the v2 plugin. Unlike v1 (where the
12
+ * handle rides on the host-owned `Hooks` object), the OpenCode v2 API returns a
13
+ * `Plugin` object, so the handle lives on the `raindrop` property. Methods are
14
+ * safe before `setup` runs and when tracing is disabled — they no-op.
15
+ */
16
+ interface RaindropOpencodeV2Handle {
17
+ users: {
18
+ identify(users: IdentifyInput | IdentifyInput[]): Promise<void>;
19
+ };
20
+ signals: {
21
+ /** Post to `signals/track` via the shared EventShipper. */
22
+ track(signal: SignalInput): Promise<void>;
23
+ };
24
+ /** Raindrop eventId of the turn currently open for this OpenCode session, if any. */
25
+ currentEventId(sessionID: string): string | undefined;
26
+ flush(): Promise<void>;
27
+ shutdown(): Promise<void>;
28
+ }
29
+ interface RaindropOpencodePluginV2 extends Plugin.Plugin {
30
+ raindrop: RaindropOpencodeV2Handle;
31
+ }
32
+ /**
33
+ * Raindrop plugin for the OpenCode v2 plugin API (`@opencode/plugin`).
34
+ *
35
+ * Add "@raindrop-ai/opencode-plugin/v2" to the "plugin" array in opencode.json
36
+ * and set RAINDROP_WRITE_KEY. The default export of this package remains the
37
+ * v1 (`@opencode-ai/plugin`) plugin.
38
+ */
39
+ declare function raindrop(opts?: RaindropOpencodeV2Options): RaindropOpencodePluginV2;
40
+
41
+ export { IdentifyInput, type RaindropOpencodePluginV2, type RaindropOpencodeV2Handle, type RaindropOpencodeV2Options, SignalInput, raindrop as default };