@koalaauto/agentchannel 3.82.0 → 3.82.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.
package/README.md CHANGED
@@ -83,7 +83,8 @@ Your hub names the newest `ach` release (`ach doctor` shows it), and the backgro
83
83
  new tasks, lets the runs in flight finish, installs the release (`npm install -g` for a global install; an `npx` start
84
84
  fetches it itself) and exits with code 75, which systemd and launchd restart. It never crosses to a new major release
85
85
  by itself, never moves a stable install onto a prerelease, leaves a source checkout alone, and tries a failed update
86
- again only after a day. `ACH_AUTO_UPDATE=0` turns the installing off; it still says so in the log.
86
+ again only after a day (a release npm does not serve yet, right after it is published, is tried again in five minutes).
87
+ `ACH_AUTO_UPDATE=0` turns the installing off; it still says so in the log.
87
88
  - **A session (`ach mcp`, started by Claude Code or Codex)** cannot be restarted from outside: it gets one line in the
88
89
  session saying it is behind. Restart the session (`npx` installs pick up the new release); run
89
90
  `npm install -g @koalaauto/agentchannel@latest` first if `ach` is installed globally.
@@ -27,6 +27,8 @@ export const UPDATE_EXIT_CODE = 75;
27
27
  /** Windows: the runner exited so that a helper can install the release (windowsHandoff); the process tree ends, nothing restarts here. */
28
28
  export const UPDATE_HANDOFF_EXIT_CODE = 76;
29
29
  const DAY_MS = 24 * 3600_000;
30
+ /** npm's answer when the version is not (yet) served where it asked: E404, ETARGET / No matching version. */
31
+ const NOT_ON_NPM = /\bE404\b|\b404 Not Found\b|npm error 404|\bETARGET\b|No matching version found/i;
30
32
  const CHECK_EVERY_MS = 6 * 3600_000;
31
33
  const isVersion = (v) => typeof v === 'string' && /^\d+\.\d+\.\d+(-[0-9A-Za-z.]+)?$/.test(v);
32
34
  const major = (v) => Number(v.split('.')[0]);
@@ -287,6 +289,7 @@ export class SelfUpdater {
287
289
  try {
288
290
  this.log(`ach ${v.target} is out (this is ${version}): taking no new work, ${this.o.runner.busy()} run(s) to finish first`);
289
291
  await this.o.runner.quiesce();
292
+ const before = loadUpdateState(this.o.home);
290
293
  saveUpdateState(this.o.home, { target: v.target, at: now, attempts: (last?.attempts ?? 0) + 1, previous: version });
291
294
  if ((this.o.platform ?? process.platform) === 'win32' && kind.kind === 'global') {
292
295
  // Windows will not replace files a running process holds (its native modules: npm EBUSY, and the install left half
@@ -305,7 +308,13 @@ export class SelfUpdater {
305
308
  }
306
309
  const r = await installRelease(kind, v.target, this.o.exec);
307
310
  if (!r.ok) {
308
- this.log(`update to ${v.target} failed: ${r.detail}; staying on ${version}`);
311
+ // npm said "no such version" although its view had just named it: the release is still spreading over npm's servers
312
+ // (seen 2026-11-24, a 404 five minutes after publish). That is no failed install: it is tried again in five minutes
313
+ // (heardLatest), not after the day's back-off, which kept every runner that met it a day behind.
314
+ const notYet = NOT_ON_NPM.test(r.detail);
315
+ if (notYet)
316
+ saveUpdateState(this.o.home, before);
317
+ this.log(`update to ${v.target} failed: ${r.detail}; staying on ${version}${notYet ? ' (npm does not serve it yet; trying again soon)' : ''}`);
309
318
  this.o.runner.unquiesce();
310
319
  return 'failed';
311
320
  }
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "3.82.0";
1
+ export declare const VERSION = "3.82.1";
2
2
  /** The npm package (scripts/release.mjs keeps it and VERSION in step with package.json). */
3
3
  export declare const PKG_NAME = "@koalaauto/agentchannel";
4
4
  /**
@@ -1,4 +1,4 @@
1
- export const VERSION = '3.82.0';
1
+ export const VERSION = '3.82.1';
2
2
  /** The npm package (scripts/release.mjs keeps it and VERSION in step with package.json). */
3
3
  export const PKG_NAME = '@koalaauto/agentchannel';
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koalaauto/agentchannel",
3
- "version": "3.82.0",
3
+ "version": "3.82.1",
4
4
  "description": "Hand work between your team's agents (Claude Code, Codex) and follow it in one panel: the ach CLI, MCP server and runner for AgentChannel v2",
5
5
  "keywords": [
6
6
  "agentchannel",