opencode-sync-plugin 0.3.6 → 0.3.7
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 +36 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,13 +4,16 @@ Sync your OpenCode sessions to the cloud. Search, share, and access your coding
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/opencode-sync-plugin)
|
|
6
6
|
|
|
7
|
-
## OpenSync Ecosystem
|
|
7
|
+
## OpenSync Ecosystem
|
|
8
8
|
|
|
9
|
-
|
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
9
|
+
| Project | Description | Links |
|
|
10
|
+
| ---------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| OpenSync | Dashboards for AI coding sessions | [Website](https://www.opensync.dev/) / [GitHub](https://github.com/waynesutton/opensync) |
|
|
12
|
+
| opencode-sync-plugin | Sync OpenCode sessions | [GitHub](https://github.com/waynesutton/opencode-sync-plugin) / [npm](https://www.npmjs.com/package/opencode-sync-plugin) |
|
|
13
|
+
| claude-code-sync | Sync Claude Code sessions | [GitHub](https://github.com/waynesutton/claude-code-sync) / [npm](https://www.npmjs.com/package/claude-code-sync) |
|
|
14
|
+
| droid-sync | Sync Factory Droid sessions (community built) | [GitHub](https://github.com/yemyat/droid-sync-plugin) / [npm](https://www.npmjs.com/package/droid-sync) |
|
|
15
|
+
| codex-sync | Sync Codex CLI sessions | [GitHub](https://github.com/waynesutton/codex-sync-plugin) / [npm](https://www.npmjs.com/package/codex-sync) |
|
|
16
|
+
| cursor-opensync-plugin | Sync Cursor sessions | [GitHub](https://github.com/waynesutton/cursor-cli-sync-plugin) / [npm](https://www.npmjs.com/package/cursor-opensync-plugin) |
|
|
14
17
|
|
|
15
18
|
## Installation
|
|
16
19
|
|
|
@@ -146,13 +149,13 @@ This checks that both your credentials and OpenCode config are set up correctly.
|
|
|
146
149
|
|
|
147
150
|
The plugin hooks into OpenCode events and syncs data automatically:
|
|
148
151
|
|
|
149
|
-
| Event
|
|
150
|
-
|
|
151
|
-
| `session.created`
|
|
152
|
-
| `session.updated`
|
|
153
|
-
| `session.idle`
|
|
154
|
-
| `message.updated`
|
|
155
|
-
| `message.part.updated` | Syncs completed message parts
|
|
152
|
+
| Event | Action |
|
|
153
|
+
| ---------------------- | ------------------------------------------------------ |
|
|
154
|
+
| `session.created` | Creates session record in cloud |
|
|
155
|
+
| `session.updated` | Updates session metadata |
|
|
156
|
+
| `session.idle` | Final sync with accurate title, token counts, and cost |
|
|
157
|
+
| `message.updated` | Syncs user and assistant messages |
|
|
158
|
+
| `message.part.updated` | Syncs completed message parts |
|
|
156
159
|
|
|
157
160
|
On `session.idle`, the plugin queries OpenCode's SDK to get the accurate session title (generated after the first message exchange). This ensures sessions are stored with meaningful titles instead of "Untitled".
|
|
158
161
|
|
|
@@ -160,19 +163,19 @@ Data is stored in your Convex deployment. You can view, search, and share sessio
|
|
|
160
163
|
|
|
161
164
|
## CLI Commands
|
|
162
165
|
|
|
163
|
-
| Command
|
|
164
|
-
|
|
165
|
-
| `opencode-sync login`
|
|
166
|
-
| `opencode-sync verify`
|
|
167
|
-
| `opencode-sync sync`
|
|
168
|
-
| `opencode-sync sync --new`
|
|
169
|
-
| `opencode-sync sync --all`
|
|
170
|
-
| `opencode-sync sync --force` | Clear tracking and resync all sessions
|
|
171
|
-
| `opencode-sync logout`
|
|
172
|
-
| `opencode-sync status`
|
|
173
|
-
| `opencode-sync config`
|
|
174
|
-
| `opencode-sync version`
|
|
175
|
-
| `opencode-sync help`
|
|
166
|
+
| Command | Description |
|
|
167
|
+
| ---------------------------- | --------------------------------------------------- |
|
|
168
|
+
| `opencode-sync login` | Configure with Convex URL and API Key |
|
|
169
|
+
| `opencode-sync verify` | Verify credentials and OpenCode config |
|
|
170
|
+
| `opencode-sync sync` | Test connectivity and create a test session |
|
|
171
|
+
| `opencode-sync sync --new` | Sync only new sessions (uses local tracking) |
|
|
172
|
+
| `opencode-sync sync --all` | Sync all sessions (queries backend, skips existing) |
|
|
173
|
+
| `opencode-sync sync --force` | Clear tracking and resync all sessions |
|
|
174
|
+
| `opencode-sync logout` | Clear stored credentials |
|
|
175
|
+
| `opencode-sync status` | Show authentication status |
|
|
176
|
+
| `opencode-sync config` | Show current configuration |
|
|
177
|
+
| `opencode-sync version` | Show installed version |
|
|
178
|
+
| `opencode-sync help` | Show help message |
|
|
176
179
|
|
|
177
180
|
## Configuration storage
|
|
178
181
|
|
|
@@ -190,7 +193,13 @@ This plugin follows the [OpenCode plugin specification](https://opencode.ai/docs
|
|
|
190
193
|
```typescript
|
|
191
194
|
import type { Plugin } from "@opencode-ai/plugin";
|
|
192
195
|
|
|
193
|
-
export const OpenCodeSyncPlugin: Plugin = async ({
|
|
196
|
+
export const OpenCodeSyncPlugin: Plugin = async ({
|
|
197
|
+
project,
|
|
198
|
+
client,
|
|
199
|
+
$,
|
|
200
|
+
directory,
|
|
201
|
+
worktree,
|
|
202
|
+
}) => {
|
|
194
203
|
// Initialize plugin
|
|
195
204
|
await client.app.log({
|
|
196
205
|
service: "opencode-sync",
|