@inerrata-corporation/errata 2.0.8-dev.2929 → 2.0.8-dev.2932

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 +30 -6
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -29506,6 +29506,18 @@ function resolveWorkspaceIdentity(cfg, entry, env2 = process.env) {
29506
29506
  function identityKey(id) {
29507
29507
  return id.profileName ?? "@default";
29508
29508
  }
29509
+ function publicWorkspaceIdentity(identity) {
29510
+ return {
29511
+ profileName: identity.profileName,
29512
+ rule: identity.rule,
29513
+ invalid: identity.invalid,
29514
+ reason: identity.reason,
29515
+ profile: identity.profile ? {
29516
+ installationId: identity.profile.installationId,
29517
+ cloudUrl: identity.profile.cloudUrl
29518
+ } : null
29519
+ };
29520
+ }
29509
29521
  function blockedCloudClient(reason) {
29510
29522
  return new Proxy(
29511
29523
  {},
@@ -80267,7 +80279,7 @@ function createWatchBreaker(deps) {
80267
80279
  }
80268
80280
 
80269
80281
  // src/engine.ts
80270
- var DAEMON_VERSION = true ? "2.0.8-dev.2929" : "2.0.0-alpha.0";
80282
+ var DAEMON_VERSION = true ? "2.0.8-dev.2932" : "2.0.0-alpha.0";
80271
80283
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
80272
80284
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
80273
80285
  var GIT_OP_MUTE_MS = 4e3;
@@ -86995,11 +87007,17 @@ async function startMultiDaemon(opts = {}) {
86995
87007
  const ANCHOR_PULL_INTERVAL_MS = 10 * 60 * 1e3;
86996
87008
  const anchorPullAll = async () => {
86997
87009
  const c = loadConfig();
86998
- if (!hasCloudCredential(c)) return;
86999
- const client = cloudNow();
87010
+ if (registryCorrupt()) return;
87000
87011
  for (const r of records) {
87001
87012
  const projectId = r.engine.profile.projectId;
87002
87013
  if (!projectId || !effectiveConsent(c, r.engine.profile).sync) continue;
87014
+ const identity = identityFor(liveWorkspaceEntry(r.entry));
87015
+ if (identity.invalid) {
87016
+ noteIdentityBlock(r.id, r.entry.name, identity);
87017
+ continue;
87018
+ }
87019
+ if (identity.rule !== "workspace-binding" && !hasCloudCredential(c)) continue;
87020
+ const client = cloudForIdentity(identity);
87003
87021
  try {
87004
87022
  const { salt } = await resolveProjectSymbolSalt(client, projectId);
87005
87023
  await pullProjectAnchors(r, client, salt);
@@ -87013,11 +87031,17 @@ async function startMultiDaemon(opts = {}) {
87013
87031
  }, ANCHOR_PULL_INTERVAL_MS);
87014
87032
  const ambientLinkAll = async () => {
87015
87033
  const c = loadConfig();
87016
- if (!hasCloudCredential(c)) return;
87017
- const client = cloudNow();
87034
+ if (registryCorrupt()) return;
87018
87035
  for (const r of records) {
87019
87036
  const working = loadProfile(r.root) ?? r.engine.profile;
87020
87037
  if (!effectiveConsent(c, working).sync) continue;
87038
+ const identity = identityFor(liveWorkspaceEntry(r.entry));
87039
+ if (identity.invalid) {
87040
+ noteIdentityBlock(r.id, r.entry.name, identity);
87041
+ continue;
87042
+ }
87043
+ if (identity.rule !== "workspace-binding" && !hasCloudCredential(c)) continue;
87044
+ const client = cloudForIdentity(identity);
87021
87045
  const out2 = await ensureProjectLink(r.root, working, client);
87022
87046
  if (working !== r.engine.profile) adoptLinkFields(r.engine.profile, working);
87023
87047
  if (out2.linked) {
@@ -89615,7 +89639,7 @@ async function cmdWhoami(args2) {
89615
89639
  `note: daemon capture and the MCP server resolve identically; a process with ERRATA_CONFIG_PATH set resolves by rule 1 regardless of binding.`
89616
89640
  ];
89617
89641
  if (args2.includes("--json")) {
89618
- console.log(JSON.stringify({ path: path2, registered: Boolean(entry), ...identity }, null, 2));
89642
+ console.log(JSON.stringify({ path: path2, registered: Boolean(entry), ...publicWorkspaceIdentity(identity) }, null, 2));
89619
89643
  } else {
89620
89644
  for (const l of lines) console.log(l);
89621
89645
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.8-dev.2929",
3
+ "version": "2.0.8-dev.2932",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {