loop: ocm-session-move completed after 7 iterations

This commit is contained in:
Chris Scott committed 2026-07-08 13:51:36 -04:00
1 parent 54323267f5
commit ac8ab89b4a
11 files changed
+694 -60

No files matched your search

+6 -2
View File
@@ -35,7 +35,7 @@ Add the package to your OpenCode config and OpenCode will fetch it on next start
// ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@opencode-manager/ocm-cli"]
"plugin": ["@opencode-manager/ocm-cli", "@opencode-manager/ocm-cli/tui"]
}
```
@@ -51,7 +51,7 @@ If `~/.local/bin` is not on your PATH, the message will tell you. Add this to yo
export PATH="$HOME/.local/bin:$PATH"
```
The plugin itself is a no-op — it does not register tools, commands, or hooks. Its only side effect is the bin symlink, so all real work happens through the `ocm` CLI.
The default plugin entry only installs the bin symlink. The `./tui` entry registers `/ocm-move`, a TUI command that keeps the local session and copies the active session to the Manager after pushing the current repo state. Run it from inside a local OpenCode session after `ocm login` and after the repo exists on the Manager (`ocm push --create` if needed).
### Option B — global package manager install
@@ -129,6 +129,10 @@ The child takes over the terminal (`stdio: inherit`); closing the TUI exits `ocm
`ocm pull` uses a fast git bundle + working-tree patch by default to sync the matching Manager repo over `$PWD`. Pass `--full` to use the legacy tarball mirror. If the fast path fails, `ocm` prompts before reverting to the tarball mirror (and proceeds automatically when there is no TTY to prompt).
### TUI `/ocm-move`
When the TUI plugin entry is installed, `/ocm-move` is available in local OpenCode sessions. It checks that the matching Manager repo has not diverged, pushes the local git state with the fast bundle + working-tree patch path, exports the active session history from the local OpenCode `/sync` API, rewrites local repo directories to the Manager repo directory, and replays the session through `/api/opencode-proxy/sync/replay`. The local session is retained.
- `--force` skips the dirty-working-tree check on `pull` and the safety bail on `push`.
- `--create` (on `push`) creates a new Manager repo when no `origin` match is found.
- `--yes` skips the interactive create confirmation.