@bunshin-cc/bunshin 0.5.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/dist/bin.js +3 -2
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -5258,9 +5258,9 @@ function buildEpisode(store, session, transcriptPath, now = /* @__PURE__ */ new
5258
5258
  const from = reflectCursor(session, turns);
5259
5259
  const fresh = sinceTurn(scan, from);
5260
5260
  const signals = { ...sessionSignals({ scan: fresh, startedAt: session.startedAt, lastActivityAt: session.lastActivityAt, partial: from > 0 }), ...outcome ? { outcome: outcome.status } : {} };
5261
- const gate = sessionGate(signals, { now: now.toISOString(), cacheTtlMs: config.reflect.cacheTtlMs });
5262
5261
  const id = episodeIdFor(view.ctx.id, session.sessionId);
5263
5262
  const previous = v2.readEpisode(id);
5263
+ const gate = sessionGate(signals, { now: now.toISOString(), cacheTtlMs: config.reflect.cacheTtlMs });
5264
5264
  const upload = config.upload ?? "redacted";
5265
5265
  const calls = v2.readCalls(session.sessionId);
5266
5266
  const snippets = [.../* @__PURE__ */ new Set([...v2.readSnippets(session.sessionId), ...scan.snippets])];
@@ -5279,7 +5279,8 @@ function buildEpisode(store, session, transcriptPath, now = /* @__PURE__ */ new
5279
5279
  suggestionIds: [.../* @__PURE__ */ new Set([...previous?.suggestionIds ?? [], ...session.suggestionIds])],
5280
5280
  // "edge" only while this machine's reflections cover every turn; new work is open again.
5281
5281
  reflected: previous?.reflected === "edge" && from >= turns ? "edge" : "none",
5282
- gate,
5282
+ // Nothing new since the last reflection: the header keeps the gate that judged that work.
5283
+ gate: turns <= from && previous?.gate ? previous.gate : gate,
5283
5284
  upload,
5284
5285
  turns,
5285
5286
  reflectedTurns: from,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunshin-cc/bunshin",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Shared memory for company AI agents. Connect Codex, Claude Code, or Pi to Bunshin.",
5
5
  "type": "module",
6
6
  "bin": {