@inerrata-corporation/errata 2.0.22-dev.4554 → 2.0.22-dev.4603

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/errata.mjs CHANGED
@@ -86711,7 +86711,7 @@ function createWatchBreaker(deps) {
86711
86711
  }
86712
86712
 
86713
86713
  // src/engine.ts
86714
- var DAEMON_VERSION = true ? "2.0.22-dev.4554" : "2.0.0-alpha.0";
86714
+ var DAEMON_VERSION = true ? "2.0.22-dev.4603" : "2.0.0-alpha.0";
86715
86715
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
86716
86716
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
86717
86717
  var GIT_OP_MUTE_MS = 4e3;
@@ -86862,6 +86862,7 @@ function createWorkspaceEngine(opts) {
86862
86862
  let watchBreaker = null;
86863
86863
  let lastActivityTs = Date.now();
86864
86864
  let storeReconciled = !!opts.skipWatchers;
86865
+ let lastGitEventTs = 0;
86865
86866
  let stopGit = null;
86866
86867
  let fsReindex;
86867
86868
  let stopping = false;
@@ -86986,6 +86987,7 @@ function createWorkspaceEngine(opts) {
86986
86987
  watcher.on("change", markDirty);
86987
86988
  watcher.on("unlink", markDirty);
86988
86989
  const handleGitEvent = async (ev) => {
86990
+ lastGitEventTs = Date.now();
86989
86991
  if (ev.kind !== "commit") {
86990
86992
  gitOpMuteUntil = Date.now() + GIT_OP_MUTE_MS;
86991
86993
  fsReindex.clear();
@@ -89063,6 +89065,7 @@ B: ${b}`,
89063
89065
  return lastActivityTs;
89064
89066
  },
89065
89067
  storeReconciled: () => storeReconciled,
89068
+ lastGitEventAt: () => lastGitEventTs,
89066
89069
  quarantinedSessions: () => sessions.originSessions(),
89067
89070
  markContextDirty() {
89068
89071
  contextDirty = true;
@@ -92921,10 +92924,16 @@ async function enumerateUnits(root, opts = {}) {
92921
92924
  const branch = opts.branch ?? "HEAD";
92922
92925
  const line = await firstParentLine(root, branch);
92923
92926
  let start2 = 0;
92927
+ let covered = null;
92924
92928
  if (opts.since) {
92925
92929
  const at = line.findIndex((c) => c.sha === opts.since);
92926
- if (at < 0) throw new Error(`history-walk: watermark ${opts.since} is not on the first-parent line of ${branch}`);
92927
- start2 = at + 1;
92930
+ if (at >= 0) start2 = at + 1;
92931
+ else {
92932
+ const ancestors = await git(root, [...GIT_OPTS, "rev-list", opts.since]).catch(() => null);
92933
+ if (ancestors === null) throw new Error(`history-walk: watermark ${opts.since} is not a commit in this repository`);
92934
+ covered = new Set(ancestors.split(/\r?\n/).filter(Boolean));
92935
+ while (start2 < line.length && covered.has(line[start2].sha)) start2++;
92936
+ }
92928
92937
  }
92929
92938
  const tags = await tagsByCommit(root);
92930
92939
  const tagsOf = (sha2) => tags.get(sha2) ?? [];
@@ -92958,7 +92967,7 @@ async function enumerateUnits(root, opts = {}) {
92958
92967
  continue;
92959
92968
  }
92960
92969
  const side = sides.get(sha2) ?? await mergeSide(root, parents[0], parents[1]);
92961
- const group = [];
92970
+ let group = [];
92962
92971
  for (const s of side) {
92963
92972
  if (s.parents.length >= 2) continue;
92964
92973
  const c = await commit(s.sha);
@@ -92995,6 +93004,7 @@ async function enumerateUnits(root, opts = {}) {
92995
93004
  groupSha: sha2
92996
93005
  });
92997
93006
  }
93007
+ if (covered) group = group.filter((g) => !covered.has(g.sha));
92998
93008
  if (group.length === 0) {
92999
93009
  group.push({
93000
93010
  index,
@@ -95576,7 +95586,8 @@ async function startMultiDaemon(opts = {}) {
95576
95586
  const c = loadConfig();
95577
95587
  if (registryCorrupt()) return;
95578
95588
  for (const r of records) {
95579
- if (!revisionBacklog.has(r.root) && Date.now() - (lastAnchorPull.get(r.root) ?? 0) < ANCHOR_PULL_INTERVAL_MS) continue;
95589
+ const lastPull = lastAnchorPull.get(r.root) ?? 0;
95590
+ if (!revisionBacklog.has(r.root) && r.engine.lastGitEventAt() <= lastPull && Date.now() - lastPull < ANCHOR_PULL_INTERVAL_MS) continue;
95580
95591
  const projectId = r.engine.profile.projectId;
95581
95592
  if (!projectId || !effectiveConsent(c, r.engine.profile).sync) continue;
95582
95593
  const identity = identityFor(liveWorkspaceEntry(r.entry));
@@ -95588,8 +95599,9 @@ async function startMultiDaemon(opts = {}) {
95588
95599
  const client = cloudForIdentity(identity);
95589
95600
  try {
95590
95601
  const { salt } = await resolveProjectSymbolSalt(client, projectId);
95602
+ const pullStartedAt = Date.now();
95591
95603
  await pullProjectAnchors(r, client, salt);
95592
- lastAnchorPull.set(r.root, Date.now());
95604
+ lastAnchorPull.set(r.root, pullStartedAt);
95593
95605
  } catch (err2) {
95594
95606
  console.warn(`[errata] anchor pull skipped for ${r.engine.profile.name}: ${err2 instanceof Error ? err2.message : String(err2)}`);
95595
95607
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.22-dev.4554",
3
+ "version": "2.0.22-dev.4603",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "errata-context",
3
- "version": "2.0.22-dev.4554",
3
+ "version": "2.0.22-dev.4603",
4
4
  "description": "A minimal 3D view of loaded Errata priors and recent graph bursts.",
5
5
  "author": {
6
6
  "name": "inErrata"
@@ -1,4 +1,4 @@
1
- b640d2d37f65c14b9a0922dd9c7e4bf32f2e27bf121f472295c6b8c7cbbd8883 .codex-plugin/plugin.json
1
+ ed83b0cd166da771bafa1dbbd54745dc01d262303d88cf5eac8e8f0c4e085c1b .codex-plugin/plugin.json
2
2
  a7bebae9fb01c838d6c75fc784129e28be571233fa66ff5ee8039b574f35ccf7 assets/icon.png
3
3
  fc38b64e4df1e0b72c35764bef6c4c05430d97c9009ad0ecc8a9e75b4deab232 configure-local.mjs
4
4
  73dc6028b3b070257c7c31f252d11e55a9e096f4aed0f187f10cb21716e1e6d7 dist/client.js