@koalaauto/agentchannel 3.85.0 → 3.86.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/args.js +1 -1
- package/dist/src/attention.d.ts +8 -1
- package/dist/src/attention.js +19 -3
- package/dist/src/cli.js +2 -2
- package/dist/src/client.d.ts +6 -0
- package/dist/src/guide-text.d.ts +57 -57
- package/dist/src/guide-text.js +57 -57
- package/dist/src/ids.d.ts +1 -1
- package/dist/src/ids.js +1 -1
- package/dist/src/invite.js +1 -1
- package/dist/src/mcp.js +7 -5
- package/dist/src/onboard.js +1 -1
- package/dist/src/prompts.d.ts +4 -3
- package/dist/src/prompts.js +6 -3
- package/dist/src/runner/runner.d.ts +3 -1
- package/dist/src/runner/runner.js +8 -3
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AdapterResult, type RuntimeAdapter } from '../adapters/types.js';
|
|
2
2
|
import { type Agent, type Client, type MentionItem, type MentionOutcome, type Message } from '../client.js';
|
|
3
3
|
import { type Perm } from '../perm.js';
|
|
4
|
-
import { RunnerState } from './state.js';
|
|
4
|
+
import { RunnerState, type RunRecord } from './state.js';
|
|
5
5
|
import { type Workspace } from './workspace.js';
|
|
6
6
|
import { TraceRecorder } from '../trace.js';
|
|
7
7
|
import { type SandboxStatus } from '../sandboxcheck.js';
|
|
@@ -119,6 +119,8 @@ export type Job = {
|
|
|
119
119
|
taskId: string;
|
|
120
120
|
};
|
|
121
121
|
export declare function jobKey(j: Job): string;
|
|
122
|
+
/** Is no run going or queued? Parked runs do not count: they wait for an event, they do not need the hub asked every few seconds. */
|
|
123
|
+
export declare const nothingGoing: (active: number, queued: number, runs: Pick<RunRecord, "phase">[]) => boolean;
|
|
122
124
|
/** What the hub is told about a mention run that ended: whether it worked, why not, its last words, the commands that failed. */
|
|
123
125
|
/**
|
|
124
126
|
* The flags of an `ach reply` that failed (refused, or the hub said no): `--escalate`, `--to`, `--ask`, `--evidence`, read from the
|
|
@@ -51,6 +51,8 @@ export function jobKey(j) {
|
|
|
51
51
|
}
|
|
52
52
|
/** How many post ids a thread's session remembers having been shown (the newest; an older one shown again costs a few lines). */
|
|
53
53
|
const THREAD_SEEN_MAX = 400;
|
|
54
|
+
/** Is no run going or queued? Parked runs do not count: they wait for an event, they do not need the hub asked every few seconds. */
|
|
55
|
+
export const nothingGoing = (active, queued, runs) => active === 0 && queued === 0 && runs.every((r) => r.phase === 'parked');
|
|
54
56
|
/** The thread a mention job answers in ('' for any other job). */
|
|
55
57
|
const threadOf = (j) => (j.kind === 'mention' ? String(j.item.mention.thread || j.item.thread?.id || '') : '');
|
|
56
58
|
/** What the hub is told about a mention run that ended: whether it worked, why not, its last words, the commands that failed. */
|
|
@@ -2057,9 +2059,12 @@ export class Runner {
|
|
|
2057
2059
|
}
|
|
2058
2060
|
if (this.stopped)
|
|
2059
2061
|
break;
|
|
2060
|
-
// nothing
|
|
2061
|
-
// and the runner asks anyway every quietMs. With a run going
|
|
2062
|
-
|
|
2062
|
+
// nothing going and the stream is up: the hub says when there is something (asked at once, a second apart at most),
|
|
2063
|
+
// and the runner asks anyway every quietMs. With a run going or queued, or without the stream: as ever. A parked run
|
|
2064
|
+
// (waiting for an answer or a decision, often for days) is not a run going: its answer arrives as a task event that names
|
|
2065
|
+
// this agent, and its lease lasts far longer than quietMs. 2026-11-24: three runners with a parked run each asked every
|
|
2066
|
+
// 3 s around the clock, most of the hub's inbox reads.
|
|
2067
|
+
const idle = nothingGoing(this.active.size, this.queue.length, Object.values(this.state.runs.runs));
|
|
2063
2068
|
if (this.feed?.mode === 'ws' && idle && wait === this.o.intervalMs)
|
|
2064
2069
|
wait = this.nudged ? Math.min(1000, wait) : (this.o.quietMs ?? 20_000);
|
|
2065
2070
|
this.nudged = 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.
|
|
3
|
+
"version": "3.86.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",
|