@koalaauto/agentchannel 3.53.3 → 3.53.4
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/envcheck.d.ts
CHANGED
|
@@ -40,5 +40,13 @@ export declare function accountProblem(s: string): AccountProblem | null;
|
|
|
40
40
|
/** The runtime refused the effort level it was asked for (one the model does not take). */
|
|
41
41
|
export declare function effortRejected(s: string | undefined): boolean;
|
|
42
42
|
export declare function modelRejected(s: string | undefined): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The runtime's own program was not where its SDK looks: Claude Code's "Native CLI binary for darwin-arm64 not found", Codex's
|
|
45
|
+
* "Unable to locate Codex CLI binaries". npx installs every ach that starts with the same spec into one cache directory and, on a
|
|
46
|
+
* new release, the first one to restart installs it again in place: for those seconds the platform package is gone, so a run
|
|
47
|
+
* that starts then on another agent of the same machine fails this way although nothing is wrong with the install. The same
|
|
48
|
+
* words as the hub's 'install' cause (worker fail-cause.ts), minus the spawn ENOENT of a program that is not installed at all.
|
|
49
|
+
*/
|
|
50
|
+
export declare function programMissing(s: string | undefined): boolean;
|
|
43
51
|
/** Does a run's error say the tool is not logged in (or its key was refused)? */
|
|
44
52
|
export declare function looksLikeLoginError(s: string): boolean;
|
package/dist/src/envcheck.js
CHANGED
|
@@ -118,6 +118,18 @@ export function modelRejected(s) {
|
|
|
118
118
|
return false;
|
|
119
119
|
return /issue with the selected model|failed to set model|\bmodel\b[^\n]{0,80}\b(does not exist|not found|not available|not supported|is not (a )?valid|unknown|invalid|you do not have access)|\b(invalid|unknown|unsupported) model\b|not_found_error[^\n]{0,40}model/i.test(s);
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* The runtime's own program was not where its SDK looks: Claude Code's "Native CLI binary for darwin-arm64 not found", Codex's
|
|
123
|
+
* "Unable to locate Codex CLI binaries". npx installs every ach that starts with the same spec into one cache directory and, on a
|
|
124
|
+
* new release, the first one to restart installs it again in place: for those seconds the platform package is gone, so a run
|
|
125
|
+
* that starts then on another agent of the same machine fails this way although nothing is wrong with the install. The same
|
|
126
|
+
* words as the hub's 'install' cause (worker fail-cause.ts), minus the spawn ENOENT of a program that is not installed at all.
|
|
127
|
+
*/
|
|
128
|
+
export function programMissing(s) {
|
|
129
|
+
if (!s)
|
|
130
|
+
return false;
|
|
131
|
+
return /unable to locate codex cli|codex cli binaries|claude code (?:executable|native binary) not found|native cli binary for \S+ not found/i.test(s);
|
|
132
|
+
}
|
|
121
133
|
/** Does a run's error say the tool is not logged in (or its key was refused)? */
|
|
122
134
|
export function looksLikeLoginError(s) {
|
|
123
135
|
return /\b401\b|unauthori[sz]ed|not logged in|please (run|log)[^.\n]*login|invalid (api )?key|authentication (failed|required|error)|credentials? (expired|missing|invalid)/i.test(s);
|
|
@@ -24,6 +24,8 @@ export interface RunnerOptions {
|
|
|
24
24
|
/** The hub answered 426 client_too_old: this release is below its floor (the updater checks at once). */
|
|
25
25
|
onClientTooOld?: () => void;
|
|
26
26
|
heartbeatMs?: number;
|
|
27
|
+
/** How long a run whose runtime program was missing waits before it is tried once more (default 30 s: see programMissing). */
|
|
28
|
+
programRetryMs?: number;
|
|
27
29
|
/** Keep execution traces on this machine (`ach run --no-trace`, ACH_NO_TRACE=1): the task's readers see results, not commands and output. */
|
|
28
30
|
noTrace?: boolean;
|
|
29
31
|
/** How often a parked run is looked at on the hub (default 12 s; tests that drive the runner by hand use 0). */
|
|
@@ -18,7 +18,7 @@ import { effectivePerm } from '../perm.js';
|
|
|
18
18
|
import { ANSWER_SCHEMA, MENTION_SCHEMA, buildAnswerPrompt, buildMentionPrompt, buildPreparePrompt, buildResumePrompt, buildTaskPrompt, postUrl, refOf, REMOTE_FAILED_PREFIX, taskUrl } from '../prompts.js';
|
|
19
19
|
import { RunnerState } from './state.js';
|
|
20
20
|
import { isGitRepo } from './workspace.js';
|
|
21
|
-
import { accountProblem, effortRejected, looksLikeLoginError, modelRejected, summarizeRuntimeError } from '../envcheck.js';
|
|
21
|
+
import { accountProblem, effortRejected, looksLikeLoginError, modelRejected, programMissing, summarizeRuntimeError } from '../envcheck.js';
|
|
22
22
|
import { redact } from '../redact.js';
|
|
23
23
|
import { TraceRecorder } from '../trace.js';
|
|
24
24
|
import { detectHost, looksLikeSandboxError, sandboxFix } from '../sandboxcheck.js';
|
|
@@ -1749,6 +1749,20 @@ export class Runner {
|
|
|
1749
1749
|
let m = model;
|
|
1750
1750
|
let ef = effort;
|
|
1751
1751
|
result = await go(m, ef);
|
|
1752
|
+
// the runtime's program was not there: most often another ach on this machine is installing a new release into the npx
|
|
1753
|
+
// cache they share, which takes seconds. Once more after a wait; only a second miss reaches the hub as a broken install.
|
|
1754
|
+
if (!result.ok && !toolsRan && !entry.controller.signal.aborted && programMissing(result.error)) {
|
|
1755
|
+
const wait = this.o.programRetryMs ?? 30_000;
|
|
1756
|
+
const note = `the runtime's program was not found (${summarizeRuntimeError(result.error ?? '').slice(0, 160)}); trying once more in ${Math.round(wait / 1000)} s`;
|
|
1757
|
+
recorder.event({ type: 'error', data: note });
|
|
1758
|
+
this.taskLog(taskId, note);
|
|
1759
|
+
await new Promise((res) => {
|
|
1760
|
+
const t = setTimeout(res, wait);
|
|
1761
|
+
entry.controller.signal.addEventListener('abort', () => (clearTimeout(t), res()), { once: true });
|
|
1762
|
+
});
|
|
1763
|
+
if (!entry.controller.signal.aborted)
|
|
1764
|
+
result = await go(m, ef);
|
|
1765
|
+
}
|
|
1752
1766
|
// a model or an effort level the runtime does not take (a typo, one the account cannot use, a level the model lacks) must
|
|
1753
1767
|
// not stop the agent: run again on the default, and say so in the trace (the run's chip then shows what really answered)
|
|
1754
1768
|
for (let i = 0; i < 2 && !result.ok && !toolsRan && !entry.controller.signal.aborted; i++) {
|
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.53.
|
|
3
|
+
"version": "3.53.4",
|
|
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",
|