@koalaauto/agentchannel 3.57.1 → 3.57.2
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/dist/src/cli-run.js +3 -0
- package/dist/src/selfupdate.js +11 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/dist/src/cli-run.js
CHANGED
|
@@ -438,6 +438,9 @@ async function moveOldService(io, who, home) {
|
|
|
438
438
|
const mark = join(home, `reload-${VERSION}`);
|
|
439
439
|
if (env.ACH_SERVICE_DIR || existsSync(mark))
|
|
440
440
|
return false;
|
|
441
|
+
// this release goes into the install first: the launcher would otherwise start the older one copied when the file was rewritten
|
|
442
|
+
if (!adoptFromNpx({ self: thisCliPath(), env, log: (s) => io.err(`[ach run] ${s}`) }))
|
|
443
|
+
return false;
|
|
441
444
|
try {
|
|
442
445
|
writeFileSync(mark, '', { mode: 0o600 });
|
|
443
446
|
reloadService(platform, serviceFile(specOf(own, platform), undefined, env).start, env);
|
package/dist/src/selfupdate.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import { execFile, spawn } from 'node:child_process';
|
|
20
20
|
import { accessSync, constants, existsSync, mkdirSync, readFileSync, realpathSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
21
21
|
import { dirname, join, sep } from 'node:path';
|
|
22
|
-
import { appDir, appWritable, inApp, installIntoApp, setCurrent } from './appinstall.js';
|
|
22
|
+
import { appDir, appWritable, currentVersion, inApp, installIntoApp, setCurrent } from './appinstall.js';
|
|
23
23
|
import { thisCliPath } from './invite.js';
|
|
24
24
|
import { CLIENT_PROTO, newerVersion, PKG_NAME, VERSION } from './version.js';
|
|
25
25
|
/** A restart-worthy exit: not 0 (systemd on-failure and launchd restart only a failure) and not 78 (key refused: do not restart). */
|
|
@@ -123,8 +123,17 @@ export async function preflight(kind, target, exec = defaultInstallExec) {
|
|
|
123
123
|
export async function installRelease(kind, target, exec = defaultInstallExec) {
|
|
124
124
|
if (kind.kind === 'other')
|
|
125
125
|
return { ok: false, detail: kind.why };
|
|
126
|
-
if (kind.kind === 'npx')
|
|
126
|
+
if (kind.kind === 'npx') {
|
|
127
|
+
// a home install already here (appinstall.ts): the restart may start its launcher instead of npx (the service was moved to it, or
|
|
128
|
+
// is moved at that start), and the launcher must not find an older release there
|
|
129
|
+
const app = appDir();
|
|
130
|
+
if (currentVersion(app)) {
|
|
131
|
+
const r = await installIntoApp(app, target, exec);
|
|
132
|
+
if (!r.ok)
|
|
133
|
+
return r;
|
|
134
|
+
}
|
|
127
135
|
return { ok: true, detail: 'npx fetches it on restart' };
|
|
136
|
+
}
|
|
128
137
|
if (kind.kind === 'app')
|
|
129
138
|
return installIntoApp(kind.dir, target, exec);
|
|
130
139
|
const r = await exec('npm', ['install', '-g', '--ignore-scripts', '--no-audit', '--no-fund', `${PKG_NAME}@${target}`], { timeoutMs: 5 * 60_000 });
|
package/dist/src/version.d.ts
CHANGED
package/dist/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koalaauto/agentchannel",
|
|
3
|
-
"version": "3.57.
|
|
3
|
+
"version": "3.57.2",
|
|
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",
|