@koalaauto/agentchannel 3.30.1 → 3.30.3
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.d.ts +8 -0
- package/dist/src/cli.js +13 -3
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/dist/src/cli.d.ts
CHANGED
|
@@ -41,6 +41,14 @@ export declare function main(argv: string[], io?: Io): Promise<number>;
|
|
|
41
41
|
* with npx or `node dist/src/cli.js`). Returns the dir to prepend to PATH.
|
|
42
42
|
*/
|
|
43
43
|
export declare function writeAchShim(home: string): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* `ach run` where the agent's key is not stored: the key lives only on its own machine and the hub keeps a hash of it, so it
|
|
46
|
+
* cannot be read back. The way back is a new key (the panel: the agent's page, Settings or the stopped-runner card) and its join line.
|
|
47
|
+
*/
|
|
48
|
+
export declare const NO_KEY_MESSAGE: {
|
|
49
|
+
readonly en: "ach run: there is no key for this agent on this machine (deleted, or a new machine or directory).\nA key cannot be recovered: in the panel open the agent and rotate its key (an admin or its owner can), then run the new `join` line here, in the agent's project directory.";
|
|
50
|
+
readonly zh: "ach run:这台机器上没有这个智能体的密钥(被删除了,或是新机器、新目录)。\n密钥找不回,只能换新:在面板里打开这个智能体,点「换新密钥」(管理员或负责人可以),再到它的项目目录里运行新生成的 `join` 命令。";
|
|
51
|
+
};
|
|
44
52
|
/** B7: `ach run` exit code when the hub answers 401 (systemd: RestartPreventExitStatus=78). */
|
|
45
53
|
export declare const AUTH_EXIT_CODE = 78;
|
|
46
54
|
export declare const AUTH_EXIT_MESSAGE = "ach run: key rotated or agent deactivated \u2014 run ach join";
|
package/dist/src/cli.js
CHANGED
|
@@ -1566,8 +1566,10 @@ async function runCommand(p, io) {
|
|
|
1566
1566
|
if (env.ACH_RUN_TOKEN)
|
|
1567
1567
|
throw new UsageError('run: refusing to start a runner inside a spawned agent (ACH_RUN_TOKEN is set)');
|
|
1568
1568
|
const cfg = loadConfig(env);
|
|
1569
|
+
// No key on this machine (deleted, a new machine or directory). It exits like a refused key: a service that exits 2 here
|
|
1570
|
+
// would be restarted for ever, and `ach login` is no way back for someone who no longer has the key.
|
|
1569
1571
|
if (!cfg.key)
|
|
1570
|
-
|
|
1572
|
+
return authExit(io, NO_KEY_MESSAGE[isZh(env) ? 'zh' : 'en']);
|
|
1571
1573
|
// the hub names the newest release on every answer: the updater hears it at once instead of at its next 6-hourly check
|
|
1572
1574
|
let updater;
|
|
1573
1575
|
const c = clientFromConfig(cfg, { fetch: io.fetch, role: 'runner', onLatestClient: (latest) => void updater?.heardLatest(latest)?.catch(() => { }) });
|
|
@@ -1737,9 +1739,17 @@ async function runCommand(p, io) {
|
|
|
1737
1739
|
}
|
|
1738
1740
|
return 0;
|
|
1739
1741
|
}
|
|
1742
|
+
/**
|
|
1743
|
+
* `ach run` where the agent's key is not stored: the key lives only on its own machine and the hub keeps a hash of it, so it
|
|
1744
|
+
* cannot be read back. The way back is a new key (the panel: the agent's page, Settings or the stopped-runner card) and its join line.
|
|
1745
|
+
*/
|
|
1746
|
+
export const NO_KEY_MESSAGE = {
|
|
1747
|
+
en: 'ach run: there is no key for this agent on this machine (deleted, or a new machine or directory).\nA key cannot be recovered: in the panel open the agent and rotate its key (an admin or its owner can), then run the new `join` line here, in the agent\'s project directory.',
|
|
1748
|
+
zh: 'ach run:这台机器上没有这个智能体的密钥(被删除了,或是新机器、新目录)。\n密钥找不回,只能换新:在面板里打开这个智能体,点「换新密钥」(管理员或负责人可以),再到它的项目目录里运行新生成的 `join` 命令。',
|
|
1749
|
+
};
|
|
1740
1750
|
/** B7: print the rejoin hint and return the auth exit code (ACH_AUTH_EXIT_CODE overrides it). */
|
|
1741
|
-
function authExit(io) {
|
|
1742
|
-
io.err(
|
|
1751
|
+
function authExit(io, message = AUTH_EXIT_MESSAGE) {
|
|
1752
|
+
io.err(message);
|
|
1743
1753
|
const code = Number(io.env.ACH_AUTH_EXIT_CODE ?? AUTH_EXIT_CODE);
|
|
1744
1754
|
return Number.isInteger(code) && code >= 0 ? code : AUTH_EXIT_CODE;
|
|
1745
1755
|
}
|
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.30.
|
|
3
|
+
"version": "3.30.3",
|
|
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",
|