@inerrata-corporation/errata 2.0.7-dev.2822 → 2.0.7

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 +14 -5
  2. package/package.json +1 -1
package/errata.mjs CHANGED
@@ -26315,8 +26315,8 @@ var init_config = __esm({
26315
26315
  "use strict";
26316
26316
  init_paths();
26317
26317
  LEGACY_CLOUD_URL = "https://inerrata-gateway.onrender.com";
26318
- DEFAULT_CLOUD_URL = true ? "https://dev.inerrata.dev" : DEV_CLOUD_URL;
26319
- DEFAULT_UPDATE_CHANNEL = false ? "latest" : "dev";
26318
+ DEFAULT_CLOUD_URL = true ? "https://inerrata.dev" : DEV_CLOUD_URL;
26319
+ DEFAULT_UPDATE_CHANNEL = true ? "latest" : "dev";
26320
26320
  }
26321
26321
  });
26322
26322
 
@@ -79931,7 +79931,7 @@ function createWatchBreaker(deps) {
79931
79931
  }
79932
79932
 
79933
79933
  // src/engine.ts
79934
- var DAEMON_VERSION = true ? "2.0.7-dev.2822" : "2.0.0-alpha.0";
79934
+ var DAEMON_VERSION = true ? "2.0.7" : "2.0.0-alpha.0";
79935
79935
  var IGNORED_PATH = /[\\/](?:\.git|node_modules|\.errata|\.claude|\.codex|\.cursor|\.turbo|\.next|dist|coverage|test-results|playwright-report|__pycache__)(?:[\\/]|$)/;
79936
79936
  var IGNORED_NOISE = /castalia\.db|eventlog\.sqlite|turn-cursors/;
79937
79937
  var GIT_OP_MUTE_MS = 4e3;
@@ -84955,6 +84955,13 @@ function throttledPoll(res, intervalMs) {
84955
84955
  waitMs: Math.max(next, retryAfterMs(res.headers) ?? 0, THROTTLED_POLL_MIN_WAIT_MS)
84956
84956
  };
84957
84957
  }
84958
+ async function fetchDevicePoll(fetchFn, url2, init2) {
84959
+ try {
84960
+ return await fetchFn(url2, init2);
84961
+ } catch {
84962
+ return null;
84963
+ }
84964
+ }
84958
84965
  function retryAfterMs(headers, now = Date.now()) {
84959
84966
  for (const name2 of ["retry-after", "x-retry-after"]) {
84960
84967
  const raw2 = headers.get(name2)?.trim();
@@ -85026,7 +85033,7 @@ async function loginOAuthDevice(opts) {
85026
85033
  while (Date.now() < deadline) {
85027
85034
  await (opts.sleep ?? ((ms) => new Promise((resolve7) => setTimeout(resolve7, ms))))(waitMs);
85028
85035
  waitMs = intervalMs;
85029
- const poll = await fetchFn(device.token, {
85036
+ const poll = await fetchDevicePoll(fetchFn, device.token, {
85030
85037
  method: "POST",
85031
85038
  headers: { "content-type": "application/json", accept: "application/json" },
85032
85039
  body: JSON.stringify({
@@ -85035,6 +85042,7 @@ async function loginOAuthDevice(opts) {
85035
85042
  client_id: clientId
85036
85043
  })
85037
85044
  });
85045
+ if (!poll) continue;
85038
85046
  const payload = await poll.json().catch(() => null);
85039
85047
  if (!poll.ok) {
85040
85048
  const throttle = throttledPoll(poll, intervalMs);
@@ -85274,7 +85282,7 @@ async function linkThroughConsole(opts) {
85274
85282
  while (Date.now() < deadline) {
85275
85283
  await sleep(waitMs);
85276
85284
  waitMs = intervalMs;
85277
- const poll = await fetchFn(device.token, {
85285
+ const poll = await fetchDevicePoll(fetchFn, device.token, {
85278
85286
  method: "POST",
85279
85287
  headers: { "content-type": "application/json", accept: "application/json" },
85280
85288
  body: JSON.stringify({
@@ -85283,6 +85291,7 @@ async function linkThroughConsole(opts) {
85283
85291
  client_id: clientId
85284
85292
  })
85285
85293
  });
85294
+ if (!poll) continue;
85286
85295
  const payload = await poll.json().catch(() => null);
85287
85296
  if (!poll.ok) {
85288
85297
  const throttle = throttledPoll(poll, intervalMs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inerrata-corporation/errata",
3
- "version": "2.0.7-dev.2822",
3
+ "version": "2.0.7",
4
4
  "description": "errata - local-first observation engine for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {