commit 8a8a85ee0e3d21770a2714e6db6f2ea97f503066 Author: Reavo End Date: Sun Jul 19 17:32:03 2026 -0700 fix(messaging): wake deferred deliveries Route accepted deferred messages through OMP's hidden next-turn channel with an explicit wake trigger, then cut adapter v0.3.9. Co-authored by: emphasys diff --git a/CHANGELOG.md b/CHANGELOG.md index 82277c7..bc7e9c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable user-facing changes to **omp-spt** (the Spacetime adapter for oh-my- > Each release below is keyed to the **adapter version of truth** (the version `spt adapter list` reports and the GitHub release tag). omp-spt starts its own version line at 0.1.0; the sections from [0.17.3] down are the inherited **claude-spt** lineage this project forked from, retained for history. +## [0.3.9] - 2026-07-19 + +### Fixed +- **Deferred peer deliveries now wake the receiving OMP session reliably.** Accepted messages use OMP's hidden next-turn channel with an explicit turn trigger, preserving the full SPT envelope without depending on the editable follow-up queue to resume after an active or interrupted turn. + ## [0.3.8] - 2026-07-19 > Requires spt-core **v0.31.0 or newer** and Oh My Pi **v16.3.15 or newer**. Update with `spt adapter update omp-spt`, then restart existing endpoints so they load the corrected listener and session identity. diff --git a/adapter/strings/omp-spt.mjs b/adapter/strings/omp-spt.mjs index 463621f..7320055 100644 --- a/adapter/strings/omp-spt.mjs +++ b/adapter/strings/omp-spt.mjs @@ -1643,12 +1643,21 @@ export function createOmpSpt(overrides = {}) { queue.unshift(item); return; } - item.stub = senderStub(item.from ?? "unknown"); item.submitted = true; + item.hiddenSubmitted = true; try { - pi.sendUserMessage(item.stub, { deliverAs: "followUp" }); + pi.sendMessage( + { + customType: "omp-spt-peer-message", + content: item.envelope, + display: true, + attribution: "user", + }, + { deliverAs: "nextTurn", triggerTurn: true }, + ); } catch (error) { item.submitted = false; + item.hiddenSubmitted = false; await rejectItem(item, "could not submit your message to OMP", error); } } finally { @@ -1836,7 +1845,7 @@ export function createOmpSpt(overrides = {}) { item.assistantBaseline = baseline; current = item; } - if (current?.submitted) { + if (current?.submitted && !current.hiddenSubmitted) { if (current.activeInjected) { const content = `${current.stub}\n\n${current.envelope}`; if (