diff options
| author | Mark Jaquith <mark.jaquith@gusto.com> | 2026-09-11 16:36:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-11 22:36:18 +0200 |
| commit | fb5525fc2234a246dfdfc9e0d7ed73c824cbd8a6 (patch) | |
| tree | f989f8175e8afdd89824fd94477b1b1645af05ff /src/integration/registry.rs | |
| parent | 38d002de59331b27aee2f5838639ea27a04878f8 (diff) | |
fix: opencode v2 lifecycle reporting (#3757)
* fix: support opencode v2 lifecycle reporting
* fix: repair Japanese docs
* fix: ignore payload-less OpenCode events
* fix: harden opencode v2 integration install and reporting
Follow-ups on top of the V2 lifecycle support:
- create `cli.json` when OpenCode has no V1 TUI preferences (`tui.json` or
`kv.json`) to migrate, instead of only registering into an existing file
- settle stalled socket attempts with a plain connect timer, and resend the
latest lifecycle state after a failed delivery so the pane cannot get stuck
- resolve the OpenCode state directory from `XDG_STATE_HOME`
- remove the managed `herdr-opencode` directory on uninstall
- document failed executions reporting `blocked`, keep the integration test
environment independent of an inherited `XDG_STATE_HOME`, and simplify
`reconcileBlockers` to reassign its map
---------
Co-authored-by: Jonathan Liebig <jonathan.liebig@gmail.com>
Diffstat (limited to 'src/integration/registry.rs')
| -rw-r--r-- | src/integration/registry.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/integration/registry.rs b/src/integration/registry.rs index 46251970..f3bb8c04 100644 --- a/src/integration/registry.rs +++ b/src/integration/registry.rs @@ -427,6 +427,18 @@ fn opencode_tui_integration_is_valid(plugin_path: &Path, expected_version: u32) config_dir, super::OPENCODE_TUI_PLUGIN_SPEC, ) + && (!config_dir.join("cli.json").exists() + || (super::opencode_config::cli_plugin_is_configured( + config_dir, + super::OPENCODE_V2_TUI_PLUGIN_SPEC, + ) && fs::read_to_string( + config_dir + .join(super::OPENCODE_V2_TUI_PLUGIN_DIR) + .join("tui.js"), + ) + .ok() + .and_then(|content| parse_integration_version(&content)) + .is_some_and(|version| version >= expected_version))) } pub(crate) fn integration_status_at( |
