@koalaauto/agentchannel 3.41.0 → 3.41.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.
|
@@ -1458,16 +1458,17 @@ export class Runner {
|
|
|
1458
1458
|
this.heartbeat(rec).catch((e) => {
|
|
1459
1459
|
this.log(`heartbeat ${taskId}: ${e?.message ?? e}`);
|
|
1460
1460
|
// C3: 409 = this run no longer owns the task; stop working on it.
|
|
1461
|
-
// Except when the
|
|
1462
|
-
//
|
|
1461
|
+
// Except when the agent finished it itself (`ach complete` / `ach fail`, which leaves
|
|
1462
|
+
// a task sent with review waiting for acceptance): let the turn end so its usage is recorded.
|
|
1463
1463
|
const st = e instanceof HubError ? String(e.body?.status ?? '') : '';
|
|
1464
|
-
|
|
1464
|
+
const finished = ['completed', 'failed', 'awaiting_acceptance', 'awaiting_merge'].includes(st);
|
|
1465
|
+
if (is409(e) && !entry.reason && !finished) {
|
|
1465
1466
|
entry.reason = 'lost';
|
|
1466
1467
|
this.taskLog(taskId, 'heartbeat 409: run lost the task; aborting');
|
|
1467
1468
|
entry.controller.abort();
|
|
1468
1469
|
}
|
|
1469
1470
|
// the task is finished (the agent's own complete / fail) but the run goes on: say so in the trace and stop beating for it
|
|
1470
|
-
if (is409(e) &&
|
|
1471
|
+
if (is409(e) && finished) {
|
|
1471
1472
|
recorder.mark(`task_${st}`);
|
|
1472
1473
|
if (hb)
|
|
1473
1474
|
clearInterval(hb);
|
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.41.
|
|
3
|
+
"version": "3.41.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",
|