@agfpd/iapeer 0.4.82 → 0.4.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agfpd/iapeer",
3
- "version": "0.4.82",
3
+ "version": "0.4.83",
4
4
  "description": "Run Claude Code and Codex CLI as local background agents that message each other, wake on demand, and share one memory.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "agfpd",
@@ -215,13 +215,19 @@ export const launch: LaunchFn = async (
215
215
  // BOOT: the supervisor's boot-driver dismisses startup dialogs internally; wait for the input
216
216
  // surface via the pane-log model, then deliver over the socket + ready-gate on a model turn —
217
217
  // the SAME shape as the tmux boot/deliver/ready-gate below, with host equivalents.
218
- const baselineMtime = adapter.newestActivityMtime(cwd) ?? 0
219
218
  const isReady = await waitHostReady(
220
219
  { identity, logDir: cfg.logDir, adapter, bootDeadlineSecs: cfg.bootDeadlineSecs, paneLogStartByte, approvalMode: spec.approvalMode, env },
221
220
  sleep,
222
221
  )
223
222
  if (!isReady) return fail(identity, 'never-became-ready (hosted: supervisor input surface not ready)')
224
223
  if (firstMessage.trim().length === 0) return ready(identity) // bare bring-up — no message to deliver
224
+ // В18 — snap the ready-gate baseline AFTER boot, not before. newestActivityMtime is a raw
225
+ // transcript-file mtime that BOOT ITSELF advances: codex writes its rollout-jsonl on start,
226
+ // a claude-resume re-saves the transcript. Captured before waitHostReady, those boot writes
227
+ // alone push mtime past the baseline, so the gate below fires on the boot write — NOT on the
228
+ // model PROCESSING firstMessage — returning ready/taskDelivered while the message is unseen
229
+ // (silent loss). Snapped here — post-boot, pre-deliver — only the model's own turn advances it.
230
+ const baselineMtime = adapter.newestActivityMtime(cwd) ?? 0
225
231
  // INSTRUMENTATION (premature-ready diagnosis): record the session-start boundary and how much THIS
226
232
  // session had written into the shared pane-log by the time the ready-gate fired. On a recurrence,
227
233
  // paneLogBytes ≈ paneLogStartByte (ready seen though the new session wrote ~nothing) localizes a