@inerrata-corporation/errata 2.0.2-dev.886 → 2.0.2-dev.902

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/errata.mjs +17 -4
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -49857,19 +49857,32 @@ function summarizeWitnessLedger(configDir, nowMs) {
49857
49857
  if (entries.length === 0) return [];
49858
49858
  const byChannel = /* @__PURE__ */ new Map();
49859
49859
  for (const e of entries) {
49860
- const c = byChannel.get(e.channel) ?? { recorded: 0, selfSkipped: 0, selfGated: 0, unmatched: 0, lastTs: 0 };
49860
+ const c = byChannel.get(e.channel) ?? {
49861
+ recorded: 0,
49862
+ selfSkipped: 0,
49863
+ selfGated: 0,
49864
+ unmatchedAttempts: 0,
49865
+ parked: -1,
49866
+ awaitingDrain: -1,
49867
+ lastTs: 0
49868
+ };
49861
49869
  c.recorded += e.recorded ?? 0;
49862
49870
  c.selfSkipped += e.clientSelfSkipped ?? 0;
49863
49871
  c.selfGated += e.selfGated ?? 0;
49864
- c.unmatched += e.unmatched ?? 0;
49872
+ c.unmatchedAttempts += e.unmatched ?? 0;
49873
+ if (e.ts >= c.lastTs) {
49874
+ if (e.parked !== void 0) c.parked = e.parked;
49875
+ if (e.awaitingDrain !== void 0) c.awaitingDrain = e.awaitingDrain;
49876
+ }
49865
49877
  c.lastTs = Math.max(c.lastTs, e.ts);
49866
49878
  byChannel.set(e.channel, c);
49867
49879
  }
49868
49880
  const out2 = [];
49869
49881
  for (const [channel, c] of byChannel) {
49870
49882
  const ageH = Math.round((nowMs - c.lastTs) / 36e5);
49883
+ const depth = c.parked < 0 ? "parked ?" : `parked ${c.parked}${c.awaitingDrain > 0 ? ` (${c.awaitingDrain} awaiting drain)` : ""}`;
49871
49884
  out2.push(
49872
- `${channel}: recorded ${c.recorded} \xB7 self-gated ${c.selfSkipped + c.selfGated} \xB7 unmatched ${c.unmatched} \xB7 last activity ${ageH}h ago`
49885
+ `${channel}: recorded ${c.recorded} \xB7 self-gated ${c.selfSkipped + c.selfGated} \xB7 ${depth} \xB7 ${c.unmatchedAttempts} unmatched attempt(s) \xB7 last activity ${ageH}h ago`
49873
49886
  );
49874
49887
  }
49875
49888
  return out2;
@@ -56179,7 +56192,7 @@ function createLivenessWatch(deps) {
56179
56192
  }
56180
56193
 
56181
56194
  // src/engine.ts
56182
- var DAEMON_VERSION = true ? "2.0.2-dev.886" : "2.0.0-alpha.0";
56195
+ var DAEMON_VERSION = true ? "2.0.2-dev.902" : "2.0.0-alpha.0";
56183
56196
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
56184
56197
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
56185
56198
  var GIT_OP_MUTE_MS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.2-dev.886",
3
+ "version": "2.0.2-dev.902",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {