@koalaauto/agentchannel 3.52.0 → 3.52.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.
|
@@ -19,6 +19,8 @@ export interface RunnerOptions {
|
|
|
19
19
|
max?: number;
|
|
20
20
|
perm?: Perm;
|
|
21
21
|
intervalMs?: number;
|
|
22
|
+
/** How long to wait before trying to describe the agent again after a failure (default 5 minutes; 3 tries per start). */
|
|
23
|
+
describeRetryMs?: number;
|
|
22
24
|
/** The hub answered 426 client_too_old: this release is below its floor (the updater checks at once). */
|
|
23
25
|
onClientTooOld?: () => void;
|
|
24
26
|
heartbeatMs?: number;
|
|
@@ -206,6 +208,8 @@ export declare class Runner {
|
|
|
206
208
|
* the owner edits it like any other. Tried again at the next start when it could not be had. */
|
|
207
209
|
private describeDone;
|
|
208
210
|
private describeBusy;
|
|
211
|
+
private describeTries;
|
|
212
|
+
private describeNextAt;
|
|
209
213
|
private describeAgent;
|
|
210
214
|
/** Tell the hub how this runner runs tasks (its --perm, the tool, the names it passes with --pass-env), once, so the agent's
|
|
211
215
|
* owner sees on its page what a task sent to it can reach. Tried on every poll until the hub has it; an older hub (404) is left alone. */
|
|
@@ -402,9 +402,11 @@ export class Runner {
|
|
|
402
402
|
* the owner edits it like any other. Tried again at the next start when it could not be had. */
|
|
403
403
|
describeDone = false;
|
|
404
404
|
describeBusy = false;
|
|
405
|
+
describeTries = 0;
|
|
406
|
+
describeNextAt = 0;
|
|
405
407
|
async describeAgent() {
|
|
406
408
|
const { adapter, client, workspace } = this.o;
|
|
407
|
-
if (this.describeDone || this.describeBusy || adapter.remote || !client.reportDescription || !workspace.repoDirs)
|
|
409
|
+
if (this.describeDone || this.describeBusy || Date.now() < this.describeNextAt || adapter.remote || !client.reportDescription || !workspace.repoDirs)
|
|
408
410
|
return;
|
|
409
411
|
this.describeBusy = true;
|
|
410
412
|
try {
|
|
@@ -459,10 +461,18 @@ export class Runner {
|
|
|
459
461
|
this.log(`description: ${text.slice(0, 120)}`);
|
|
460
462
|
}
|
|
461
463
|
catch (e) {
|
|
462
|
-
//
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
464
|
+
// an older hub without /me/description (404) says nothing and is left alone; any other failure (a hub or network that was not
|
|
465
|
+
// reachable while many runners restarted at once, a model that said nothing) is tried again, three times in all per start
|
|
466
|
+
if (e instanceof HubError && e.status === 404)
|
|
467
|
+
this.describeDone = true;
|
|
468
|
+
else if (++this.describeTries >= 3) {
|
|
469
|
+
this.describeDone = true;
|
|
470
|
+
this.log(`description: ${String(e?.message ?? e).slice(0, 200)} (gave up until the next start)`);
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
this.describeNextAt = Date.now() + (this.o.describeRetryMs ?? 5 * 60_000);
|
|
474
|
+
this.log(`description: ${String(e?.message ?? e).slice(0, 200)} (trying again in ${Math.round((this.o.describeRetryMs ?? 5 * 60_000) / 60_000)} min)`);
|
|
475
|
+
}
|
|
466
476
|
}
|
|
467
477
|
finally {
|
|
468
478
|
this.describeBusy = false;
|
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.52.
|
|
3
|
+
"version": "3.52.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",
|