@koalaauto/agentchannel 3.86.1 → 3.87.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/dist/src/cli-run.js +10 -2
- package/dist/src/client.d.ts +9 -0
- package/dist/src/client.js +5 -0
- package/dist/src/ids.d.ts +1 -1
- package/dist/src/ids.js +1 -1
- package/dist/src/prompts.d.ts +0 -5
- package/dist/src/prompts.js +10 -2
- package/dist/src/runner/runner.d.ts +7 -1
- package/dist/src/runner/runner.js +42 -4
- package/dist/src/selfupdate.d.ts +18 -0
- package/dist/src/selfupdate.js +19 -0
- 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
|
@@ -11,7 +11,7 @@ import { Client, clientFromConfig, HubError, isZh } from './client.js';
|
|
|
11
11
|
import { achHome, defaultHome, loadConfig, readFileConfig, resolveClaimDelay, writeFileConfig } from './config.js';
|
|
12
12
|
import { isPerm } from './perm.js';
|
|
13
13
|
import { isRuntime, runtimePerm } from './adapters/spec.js';
|
|
14
|
-
import { bootGuard, markHealthy, SelfUpdater, superviseSelf, UPDATE_EXIT_CODE, UPDATE_HANDOFF_EXIT_CODE, waitForWindowsUpdate } from './selfupdate.js';
|
|
14
|
+
import { bootGuard, loadUpdateState, markHealthy, restartFromNpx, SelfUpdater, superviseSelf, UPDATE_EXIT_CODE, UPDATE_HANDOFF_EXIT_CODE, waitForWindowsUpdate } from './selfupdate.js';
|
|
15
15
|
import { inheritedEnv } from './env.js';
|
|
16
16
|
import { clearStopped, markStopped } from './watchdog.js';
|
|
17
17
|
import { parseNum, splitList, str } from './cli-shared.js';
|
|
@@ -355,8 +355,16 @@ async function runOnce(p, io) {
|
|
|
355
355
|
return UPDATE_HANDOFF_EXIT_CODE;
|
|
356
356
|
}
|
|
357
357
|
if (updater.restarting) {
|
|
358
|
+
const byHand = process.env.ACH_SUPERVISED !== '1' && !(await import('./servicefix.js')).startedByService(me.name, process.platform, process.env);
|
|
359
|
+
// started by hand through npx: npx would start the old release again, so the new one goes into the home install and runs from there
|
|
360
|
+
if (byHand && updater.installed === 'npx') {
|
|
361
|
+
const { appDir } = await import('./appinstall.js');
|
|
362
|
+
const code = await restartFromNpx({ target: loadUpdateState(home)?.target, app: appDir(env), argv: process.argv, log: io.err });
|
|
363
|
+
if (code !== undefined)
|
|
364
|
+
return code;
|
|
365
|
+
}
|
|
358
366
|
// started by hand (no systemd / launchd behind it) from a global or home install: nothing would start it again, so it does that itself
|
|
359
|
-
if ((updater.installed === 'global' || updater.installed === 'app') &&
|
|
367
|
+
if ((updater.installed === 'global' || updater.installed === 'app') && byHand) {
|
|
360
368
|
io.err('ach run: updated; starting the new release here');
|
|
361
369
|
// the install in the AgentChannel home: through its launcher (this process's argv names the old release's own file)
|
|
362
370
|
const { appDir, launcherPath } = await import('./appinstall.js');
|
package/dist/src/client.d.ts
CHANGED
|
@@ -194,6 +194,13 @@ export interface ConventionsLayer {
|
|
|
194
194
|
/** The agent's own rules, kept on the hub with their versions (docs/specs/agent-definition.md); version 0 and '' when it has none. */
|
|
195
195
|
export interface RulesLayer extends ConventionsLayer {
|
|
196
196
|
version: number;
|
|
197
|
+
/** its reference files (an older hub leaves them out) */
|
|
198
|
+
files?: {
|
|
199
|
+
name: string;
|
|
200
|
+
size: number;
|
|
201
|
+
}[];
|
|
202
|
+
/** set by the runner: where this machine keeps that version's files for its runs to read */
|
|
203
|
+
dir?: string;
|
|
197
204
|
}
|
|
198
205
|
export interface Judgment {
|
|
199
206
|
team?: ConventionsLayer;
|
|
@@ -578,6 +585,8 @@ export declare class Client {
|
|
|
578
585
|
/** All attachments on a task (handoff versions and messages), with hub download URLs. */
|
|
579
586
|
taskFiles(taskId: string): Promise<TaskFile[]>;
|
|
580
587
|
/** Download one attachment into `dir`; returns the local path. */
|
|
588
|
+
/** One reference file of an agent's rules (docs/specs/agent-definition.md), of that version. */
|
|
589
|
+
ruleFile(agent: string, file: string, version: number): Promise<string>;
|
|
581
590
|
download(a: Attachment, dir: string): Promise<string>;
|
|
582
591
|
/** Publish an artifact (one checked local .html file) or, with `artifact`, a new version of it. */
|
|
583
592
|
publishArtifact(file: string, o: {
|
package/dist/src/client.js
CHANGED
|
@@ -343,6 +343,11 @@ export class Client {
|
|
|
343
343
|
return taskFiles(await this.getTask(taskId));
|
|
344
344
|
}
|
|
345
345
|
/** Download one attachment into `dir`; returns the local path. */
|
|
346
|
+
/** One reference file of an agent's rules (docs/specs/agent-definition.md), of that version. */
|
|
347
|
+
async ruleFile(agent, file, version) {
|
|
348
|
+
const r = await this.ach('GET', `/agents/${encodeURIComponent(agent)}/rules/files/${encodeURIComponent(file)}?version=${version}`);
|
|
349
|
+
return String(r?.text ?? '');
|
|
350
|
+
}
|
|
346
351
|
async download(a, dir) {
|
|
347
352
|
const h = this.headers(false);
|
|
348
353
|
delete h.accept;
|
package/dist/src/ids.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const KIND: {
|
|
|
50
50
|
readonly wiki_versions: "X";
|
|
51
51
|
};
|
|
52
52
|
/** Tables without an `id` column of their own (keyed by the ids of other rows). */
|
|
53
|
-
export declare const NO_ID_TABLES: readonly ["ach_fts", "artifact_refs", "artifact_versions", "agent_rule_versions", "name_changes", "push_recalls", "rate_hits", "text_refs", "todos"];
|
|
53
|
+
export declare const NO_ID_TABLES: readonly ["ach_fts", "artifact_refs", "artifact_versions", "mechanism_versions", "agent_rule_files", "agent_rule_versions", "name_changes", "push_recalls", "rate_hits", "text_refs", "todos"];
|
|
54
54
|
export type IdTable = keyof typeof KIND;
|
|
55
55
|
export type IdKind = (typeof KIND)[IdTable];
|
|
56
56
|
/** Which format newId makes and normalizeId returns: 'legacy' before the cutover migrated the data (2026-11-24), 'kind' since. */
|
package/dist/src/ids.js
CHANGED
|
@@ -58,7 +58,7 @@ export const KIND = {
|
|
|
58
58
|
wiki_versions: 'X',
|
|
59
59
|
};
|
|
60
60
|
/** Tables without an `id` column of their own (keyed by the ids of other rows). */
|
|
61
|
-
export const NO_ID_TABLES = ['ach_fts', 'artifact_refs', 'artifact_versions', 'agent_rule_versions', 'name_changes', 'push_recalls', 'rate_hits', 'text_refs', 'todos'];
|
|
61
|
+
export const NO_ID_TABLES = ['ach_fts', 'artifact_refs', 'artifact_versions', 'mechanism_versions', 'agent_rule_files', 'agent_rule_versions', 'name_changes', 'push_recalls', 'rate_hits', 'text_refs', 'todos'];
|
|
62
62
|
/** Which format newId makes and normalizeId returns: 'legacy' before the cutover migrated the data (2026-11-24), 'kind' since. */
|
|
63
63
|
export const ID_FORMAT = 'kind';
|
|
64
64
|
const LETTERS = 'PMTHUGCDFKRSIX';
|
package/dist/src/prompts.d.ts
CHANGED
|
@@ -64,11 +64,6 @@ export declare function linkedDocsText(docs?: LinkedDoc[]): string[];
|
|
|
64
64
|
export declare function linkedTasksText(tasks?: LinkedTask[]): string[];
|
|
65
65
|
/** Trusted: the language the people on this hub read; the instructions around it stay English. Nothing for a hub that sends none. */
|
|
66
66
|
export declare function langText(lang?: 'en' | 'zh'): string[];
|
|
67
|
-
/**
|
|
68
|
-
* Trusted: the team's conventions (admins; they only tighten the default), the owner's own (for all their agents), then the
|
|
69
|
-
* agent's own rules (written by whoever looks after it; the hub keeps them, with versions), in that order, each with who wrote it.
|
|
70
|
-
* The repository's instructions follow (projectText).
|
|
71
|
-
*/
|
|
72
67
|
export declare function conventionsText(j?: Judgment, ownerName?: string): string[];
|
|
73
68
|
/**
|
|
74
69
|
* How an agent decides between doing it, asking another agent and asking a person (docs/specs/agent-autonomy.md). The same for
|
package/dist/src/prompts.js
CHANGED
|
@@ -31,14 +31,22 @@ export function langText(lang) {
|
|
|
31
31
|
* agent's own rules (written by whoever looks after it; the hub keeps them, with versions), in that order, each with who wrote it.
|
|
32
32
|
* The repository's instructions follow (projectText).
|
|
33
33
|
*/
|
|
34
|
+
/** The reference files of the rules: where to read each here, or (a cloud run, a failed fetch) that they are not in this run. */
|
|
35
|
+
function ruleFilesText(r) {
|
|
36
|
+
if (!r.files?.length)
|
|
37
|
+
return [];
|
|
38
|
+
if (!r.dir)
|
|
39
|
+
return [`Your reference files (${r.files.map((f) => f.name).join(', ')}) are not available in this run; say so if you need one.`];
|
|
40
|
+
return [`Your reference files (read the one your rules point to when you need it; read-only, kept in step with the rules):`, ...r.files.map((f) => `- ${r.dir}/${f.name} (${f.size} characters)`)];
|
|
41
|
+
}
|
|
34
42
|
export function conventionsText(j, ownerName) {
|
|
35
43
|
const out = [];
|
|
36
44
|
if (j?.team?.text)
|
|
37
45
|
out.push(`Team conventions (set by ${j.team.by_name || 'an admin'}; every agent follows them; they only tighten the list above):`, j.team.text, '');
|
|
38
46
|
if (j?.owner?.text)
|
|
39
47
|
out.push(`${j.owner.by_name || ownerName || 'Your owner'}'s conventions (for all their agents; within the team's conventions they may tighten or loosen the list above, never the system's limits):`, j.owner.text, '');
|
|
40
|
-
if (j?.rules?.text)
|
|
41
|
-
out.push(`Your rules (how you work; version ${j.rules.version}, saved by ${j.rules.by_name || 'an admin'}${j.rules.at ? ` on ${j.rules.at.slice(0, 10)}` : ''}; kept on the hub for the whole team to read; they never loosen the team's conventions or the system's limits):`, j.rules.text, '');
|
|
48
|
+
if (j?.rules?.text || j?.rules?.files?.length)
|
|
49
|
+
out.push(`Your rules (how you work; version ${j.rules.version}, saved by ${j.rules.by_name || 'an admin'}${j.rules.at ? ` on ${j.rules.at.slice(0, 10)}` : ''}; kept on the hub for the whole team to read; they never loosen the team's conventions or the system's limits):`, ...(j.rules.text ? [j.rules.text] : []), ...ruleFilesText(j.rules), '');
|
|
42
50
|
return out;
|
|
43
51
|
}
|
|
44
52
|
/**
|
|
@@ -7,7 +7,7 @@ import { TraceRecorder } from '../trace.js';
|
|
|
7
7
|
import { type SandboxStatus } from '../sandboxcheck.js';
|
|
8
8
|
export * from './home.js';
|
|
9
9
|
export * from './structured.js';
|
|
10
|
-
export type RunnerClient = Pick<Client, 'me' | 'inbox' | 'claim' | 'getTask' | 'postMessage' | 'complete' | 'fail' | 'usage' | 'heartbeat' | 'answerRun' | 'endRun'> & Partial<Pick<Client, 'readOnly' | 'download' | 'githubToken' | 'channelPosts' | 'mentionRun' | 'mentionEnd' | 'mentionUsage' | 'promptSize' | 'reportSetup' | 'reportRepos' | 'reportProfile' | 'reportRunner' | 'reportModels' | 'release' | 'putTrace' | 'putMentionTrace' | 'pushToken' | 'taskPr' | 'prepareRun' | 'prepared' | 'readDoc'>>;
|
|
10
|
+
export type RunnerClient = Pick<Client, 'me' | 'inbox' | 'claim' | 'getTask' | 'postMessage' | 'complete' | 'fail' | 'usage' | 'heartbeat' | 'answerRun' | 'endRun'> & Partial<Pick<Client, 'readOnly' | 'download' | 'githubToken' | 'channelPosts' | 'mentionRun' | 'mentionEnd' | 'mentionUsage' | 'promptSize' | 'ruleFile' | 'reportSetup' | 'reportRepos' | 'reportProfile' | 'reportRunner' | 'reportModels' | 'release' | 'putTrace' | 'putMentionTrace' | 'pushToken' | 'taskPr' | 'prepareRun' | 'prepared' | 'readDoc'>>;
|
|
11
11
|
export interface RunnerOptions {
|
|
12
12
|
client: RunnerClient;
|
|
13
13
|
adapter: RuntimeAdapter;
|
|
@@ -356,6 +356,12 @@ export declare class Runner {
|
|
|
356
356
|
private teamOwned;
|
|
357
357
|
/** What a full task prompt carries besides the task: the owner's memory for this project and the project's instructions. */
|
|
358
358
|
private runContext;
|
|
359
|
+
/**
|
|
360
|
+
* The judgment with the agent's reference files on this machine: each version's files are fetched once into
|
|
361
|
+
* <home>/rules/v<N>/ (readable by every run, not a secret), and older versions are removed. A cloud run reads nothing of this
|
|
362
|
+
* machine, so it gets the names only; a failed fetch leaves the dir out and the prompt says the files are not here.
|
|
363
|
+
*/
|
|
364
|
+
private withRuleFiles;
|
|
359
365
|
/** Where a task's attachments are downloaded for its agents (readable, outside the worktree). */
|
|
360
366
|
filesDir(taskId: string): string;
|
|
361
367
|
/** The task's attachments, downloaded into filesDir (best effort: a failed download is listed without a path). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomBytes } from 'node:crypto';
|
|
2
|
-
import { appendFileSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { appendFileSync, existsSync, mkdirSync, readdirSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { tmpdir } from 'node:os';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
@@ -1104,7 +1104,7 @@ export class Runner {
|
|
|
1104
1104
|
files: files.map(promptFile),
|
|
1105
1105
|
channel: await this.channelContext(claim.task),
|
|
1106
1106
|
wiki: claim.wiki,
|
|
1107
|
-
judgment: claim.judgment,
|
|
1107
|
+
judgment: await this.withRuleFiles(claim.judgment),
|
|
1108
1108
|
remote: !!this.cloud,
|
|
1109
1109
|
report: !this.o.adapter.spec.ach,
|
|
1110
1110
|
achTool: this.o.adapter.spec.achBy === 'tool',
|
|
@@ -1209,7 +1209,7 @@ export class Runner {
|
|
|
1209
1209
|
files: files.map(promptFile),
|
|
1210
1210
|
channel: await this.channelContext(bundle.task),
|
|
1211
1211
|
wiki: bundle.wiki,
|
|
1212
|
-
judgment: bundle.judgment,
|
|
1212
|
+
judgment: await this.withRuleFiles(bundle.judgment),
|
|
1213
1213
|
remote: !!this.cloud,
|
|
1214
1214
|
report: !this.o.adapter.spec.ach,
|
|
1215
1215
|
achTool: this.o.adapter.spec.achBy === 'tool',
|
|
@@ -1545,6 +1545,7 @@ export class Runner {
|
|
|
1545
1545
|
const material = [run.post?.body, run.thread?.body, ...(run.replies ?? []).map((p) => p.body), run.task?.handoff, ...(run.task?.messages ?? []).map((m) => m.body)];
|
|
1546
1546
|
const docs = structured ? await this.linkedDocs(material, key) : [];
|
|
1547
1547
|
const tasks = structured ? await this.linkedTasks([run.post?.body, run.thread?.body, ...(run.replies ?? []).map((p) => p.body)], key, run.task?.ref) : [];
|
|
1548
|
+
const judgment = await this.withRuleFiles(run.judgment);
|
|
1548
1549
|
const promptFor = (since) => buildMentionPrompt({
|
|
1549
1550
|
...(since ? { since } : {}),
|
|
1550
1551
|
docs,
|
|
@@ -1559,7 +1560,7 @@ export class Runner {
|
|
|
1559
1560
|
replies: run.replies ?? [],
|
|
1560
1561
|
recent: run.recent ?? [],
|
|
1561
1562
|
task: run.task,
|
|
1562
|
-
judgment
|
|
1563
|
+
judgment,
|
|
1563
1564
|
threadUrl: !this.o.publicUrl && typeof run.thread.url === 'string' && /^https?:\/\//.test(run.thread.url) ? run.thread.url : postUrl(this.base(), threadId),
|
|
1564
1565
|
structured,
|
|
1565
1566
|
});
|
|
@@ -1695,6 +1696,8 @@ export class Runner {
|
|
|
1695
1696
|
...[developerDir()].filter((d) => !!d),
|
|
1696
1697
|
...gitCommonDir(cwd),
|
|
1697
1698
|
join(this.o.home, 'bin'),
|
|
1699
|
+
// the reference files of the agent's rules, as the hub keeps them (withRuleFiles)
|
|
1700
|
+
join(this.o.home, 'rules'),
|
|
1698
1701
|
...readRepos.flatMap((r) => r.roots),
|
|
1699
1702
|
...(taskId ? [this.filesDir(taskId)] : []),
|
|
1700
1703
|
// the owner's Claude Code memory for this project, read-only (docs/specs/agent-autonomy.md); a team agent has no owner
|
|
@@ -1724,6 +1727,41 @@ export class Runner {
|
|
|
1724
1727
|
const ownerMemory = dir ? { dir, ...(this.o.adapter.spec.ownerMemory === 'native' ? {} : { index: memoryIndex(dir) }) } : undefined;
|
|
1725
1728
|
return { ownerMemory, project: projectInstructions(workdir, this.o.adapter.spec.ownFiles) };
|
|
1726
1729
|
}
|
|
1730
|
+
/**
|
|
1731
|
+
* The judgment with the agent's reference files on this machine: each version's files are fetched once into
|
|
1732
|
+
* <home>/rules/v<N>/ (readable by every run, not a secret), and older versions are removed. A cloud run reads nothing of this
|
|
1733
|
+
* machine, so it gets the names only; a failed fetch leaves the dir out and the prompt says the files are not here.
|
|
1734
|
+
*/
|
|
1735
|
+
async withRuleFiles(j) {
|
|
1736
|
+
const r = j?.rules;
|
|
1737
|
+
if (!r?.files?.length || !r.version || this.cloud || !this.o.client.ruleFile || !this.me?.name)
|
|
1738
|
+
return j;
|
|
1739
|
+
const root = join(this.o.home, 'rules');
|
|
1740
|
+
const dir = join(root, `v${r.version}`);
|
|
1741
|
+
try {
|
|
1742
|
+
if (!existsSync(join(dir, '.complete'))) {
|
|
1743
|
+
const tmp = `${dir}.tmp-${process.pid}`;
|
|
1744
|
+
rmSync(tmp, { recursive: true, force: true });
|
|
1745
|
+
mkdirSync(tmp, { recursive: true, mode: 0o755 });
|
|
1746
|
+
for (const f of r.files) {
|
|
1747
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.test(f.name))
|
|
1748
|
+
continue;
|
|
1749
|
+
writeFileSync(join(tmp, f.name), await this.o.client.ruleFile(this.me.name, f.name, r.version), { mode: 0o644 });
|
|
1750
|
+
}
|
|
1751
|
+
writeFileSync(join(tmp, '.complete'), '');
|
|
1752
|
+
rmSync(dir, { recursive: true, force: true });
|
|
1753
|
+
renameSync(tmp, dir);
|
|
1754
|
+
}
|
|
1755
|
+
for (const old of readdirSync(root))
|
|
1756
|
+
if (old !== `v${r.version}`)
|
|
1757
|
+
rmSync(join(root, old), { recursive: true, force: true });
|
|
1758
|
+
return { ...j, rules: { ...r, dir } };
|
|
1759
|
+
}
|
|
1760
|
+
catch (e) {
|
|
1761
|
+
this.log(`reference files of rules v${r.version}: ${e?.message ?? e}`);
|
|
1762
|
+
return j;
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1727
1765
|
/** Where a task's attachments are downloaded for its agents (readable, outside the worktree). */
|
|
1728
1766
|
filesDir(taskId) {
|
|
1729
1767
|
return join(this.o.home, 'files', taskId.replace(/[^A-Za-z0-9_-]/g, '_'));
|
package/dist/src/selfupdate.d.ts
CHANGED
|
@@ -204,6 +204,24 @@ export type SpawnSelf = (file: string, args: string[], env: NodeJS.ProcessEnv) =
|
|
|
204
204
|
exit: Promise<number>;
|
|
205
205
|
kill: (sig: NodeJS.Signals) => void;
|
|
206
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* A runner started by hand through npx, after an update: npx would start the old release again from its cache, and nothing else
|
|
209
|
+
* starts it at all (2026-11-24: hand-started npx runners on Windows stayed on 3.68 or stopped). The release goes into the install
|
|
210
|
+
* in the AgentChannel home, and this process starts it from there through the launcher and stays as its parent (superviseSelf);
|
|
211
|
+
* from then on the runner runs from that install and updates it in place. Undefined when it could not be installed: the caller
|
|
212
|
+
* exits as before.
|
|
213
|
+
*/
|
|
214
|
+
export declare function restartFromNpx(o: {
|
|
215
|
+
target: string | undefined;
|
|
216
|
+
app: string;
|
|
217
|
+
argv: string[];
|
|
218
|
+
install?: (app: string, version: string) => Promise<{
|
|
219
|
+
ok: boolean;
|
|
220
|
+
detail: string;
|
|
221
|
+
}>;
|
|
222
|
+
supervise?: (argv: string[]) => Promise<number>;
|
|
223
|
+
log: (s: string) => void;
|
|
224
|
+
}): Promise<number | undefined>;
|
|
207
225
|
/**
|
|
208
226
|
* After a global install replaced this CLI's files, run the same command line again (the new release) and stay as its parent: the
|
|
209
227
|
* terminal, the Startup script or whatever started the runner still sees one process. The child knows it is watched
|
package/dist/src/selfupdate.js
CHANGED
|
@@ -464,6 +464,25 @@ const defaultSpawnSelf = (file, args, env) => {
|
|
|
464
464
|
kill: (sig) => void child.kill(sig),
|
|
465
465
|
};
|
|
466
466
|
};
|
|
467
|
+
/**
|
|
468
|
+
* A runner started by hand through npx, after an update: npx would start the old release again from its cache, and nothing else
|
|
469
|
+
* starts it at all (2026-11-24: hand-started npx runners on Windows stayed on 3.68 or stopped). The release goes into the install
|
|
470
|
+
* in the AgentChannel home, and this process starts it from there through the launcher and stays as its parent (superviseSelf);
|
|
471
|
+
* from then on the runner runs from that install and updates it in place. Undefined when it could not be installed: the caller
|
|
472
|
+
* exits as before.
|
|
473
|
+
*/
|
|
474
|
+
export async function restartFromNpx(o) {
|
|
475
|
+
if (!o.target)
|
|
476
|
+
return undefined;
|
|
477
|
+
const r = await (o.install ?? ((app, v) => installIntoApp(app, v, defaultInstallExec)))(o.app, o.target);
|
|
478
|
+
if (!r.ok) {
|
|
479
|
+
o.log(`ach run: could not put ${o.target} into ${o.app} (${r.detail}); exiting: run it again to start the new release`);
|
|
480
|
+
return undefined;
|
|
481
|
+
}
|
|
482
|
+
o.log(`ach run: updated; ${o.target} is in ${o.app}, starting it here`);
|
|
483
|
+
const argv = [o.argv[0], join(o.app, 'ach.mjs'), ...o.argv.slice(2)];
|
|
484
|
+
return (o.supervise ?? ((a) => superviseSelf({ log: o.log, argv: a })))(argv);
|
|
485
|
+
}
|
|
467
486
|
/**
|
|
468
487
|
* After a global install replaced this CLI's files, run the same command line again (the new release) and stay as its parent: the
|
|
469
488
|
* terminal, the Startup script or whatever started the runner still sees one process. The child knows it is watched
|
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.
|
|
3
|
+
"version": "3.87.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",
|