parent
6d4c04fa50
commit
6b9b092228
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
- The OpenCode integration no longer treats `session.created` or `session.updated` plugin events as idle signals, so active sessions stay marked working until OpenCode reports `session.status` or `session.idle`. (#351)
|
||||
|
||||
## [0.6.5] - 2026-05-29
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// managed by herdr; reinstalling or updating the integration overwrites this file.
|
||||
// add custom hooks/plugins beside this file instead of editing it.
|
||||
// HERDR_INTEGRATION_ID=opencode
|
||||
// HERDR_INTEGRATION_VERSION=2
|
||||
// HERDR_INTEGRATION_VERSION=3
|
||||
|
||||
import net from "node:net";
|
||||
|
||||
|
|
@ -111,9 +111,8 @@ export const HerdrAgentStatePlugin = async () => {
|
|||
break;
|
||||
case "session.created":
|
||||
case "session.updated":
|
||||
if (sessionID) {
|
||||
await reportState("idle", sessionID);
|
||||
}
|
||||
// session.created and session.updated are metadata events; lifecycle
|
||||
// state comes from session.status and the deprecated session.idle.
|
||||
break;
|
||||
case "session.status": {
|
||||
const status =
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const CODEX_INTEGRATION_VERSION: u32 = 4;
|
|||
const CODEX_HOME_ENV_VAR: &str = "CODEX_HOME";
|
||||
const OPENCODE_PLUGIN_INSTALL_NAME: &str = "herdr-agent-state.js";
|
||||
const OPENCODE_PLUGIN_ASSET: &str = include_str!("assets/opencode/herdr-agent-state.js");
|
||||
const OPENCODE_INTEGRATION_VERSION: u32 = 2;
|
||||
const OPENCODE_INTEGRATION_VERSION: u32 = 3;
|
||||
const HERMES_PLUGIN_INSTALL_NAME: &str = "herdr-agent-state";
|
||||
const HERMES_PLUGIN_MANIFEST_INSTALL_NAME: &str = "plugin.yaml";
|
||||
const HERMES_PLUGIN_INIT_INSTALL_NAME: &str = "__init__.py";
|
||||
|
|
@ -2859,6 +2859,7 @@ mod tests {
|
|||
assert!(OPENCODE_PLUGIN_ASSET.contains("properties?.sessionID"));
|
||||
assert!(OPENCODE_PLUGIN_ASSET.contains("dispose: async"));
|
||||
assert!(OPENCODE_PLUGIN_ASSET.contains("agent_session_id: sessionID"));
|
||||
assert!(!OPENCODE_PLUGIN_ASSET.contains("await reportState(\"idle\", sessionID);\n }\n break;\n case \"session.status\""));
|
||||
assert!(HERMES_PLUGIN_INIT_ASSET.contains("session_id = _session_id(kwargs)"));
|
||||
assert!(HERMES_PLUGIN_INIT_ASSET.contains("agent_session_id"));
|
||||
// Qoder hook reads the event from the stdin JSON payload (per
|
||||
|
|
|
|||
Loading…
Reference in New Issue