diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-11 16:13:17 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-11 16:13:17 +0300 |
| commit | 55cdf2e8f8af2dd3feebb4bb7d44c9cb7e23b384 (patch) | |
| tree | 91feb43a39812d63e19fc5068f95dbe0c896e118 /src/integration/assets/opencode | |
| parent | e201a647635905a5141bfce335619b0e232b396d (diff) | |
fix: stabilize integration agent state reports
Diffstat (limited to 'src/integration/assets/opencode')
| -rw-r--r-- | src/integration/assets/opencode/herdr-agent-state.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/integration/assets/opencode/herdr-agent-state.js b/src/integration/assets/opencode/herdr-agent-state.js index 6d5e3c87..0fb96217 100644 --- a/src/integration/assets/opencode/herdr-agent-state.js +++ b/src/integration/assets/opencode/herdr-agent-state.js @@ -1,6 +1,17 @@ +// installed by herdr +// safe to edit. this plugin only activates inside herdr-managed panes. +// HERDR_INTEGRATION_ID=opencode +// HERDR_INTEGRATION_VERSION=1 + import net from "node:net"; const SOURCE = "herdr:opencode"; +let reportSeq = Date.now() * 1000; + +function nextReportSeq() { + reportSeq += 1; + return reportSeq; +} function reportState(action) { const paneId = process.env.HERDR_PANE_ID; @@ -22,12 +33,14 @@ function reportState(action) { pane_id: paneId, source: SOURCE, agent: "opencode", + seq: nextReportSeq(), } : { pane_id: paneId, source: SOURCE, agent: "opencode", state: action, + seq: nextReportSeq(), }, }; |
