@koalaauto/agentchannel 3.63.1 → 3.64.0
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/README.md +31 -5
- package/dist/src/adapters/antigravity.d.ts +4 -2
- package/dist/src/adapters/antigravity.js +6 -4
- package/dist/src/adapters/claude.d.ts +15 -4
- package/dist/src/adapters/claude.js +17 -10
- package/dist/src/adapters/codex.d.ts +5 -4
- package/dist/src/adapters/codex.js +25 -10
- package/dist/src/adapters/fake.d.ts +1 -1
- package/dist/src/adapters/fake.js +2 -1
- package/dist/src/adapters/kiro.d.ts +1 -0
- package/dist/src/adapters/spec.d.ts +6 -0
- package/dist/src/adapters/spec.js +4 -0
- package/dist/src/adapters/types.d.ts +3 -3
- package/dist/src/args.js +5 -3
- package/dist/src/caps.d.ts +76 -11
- package/dist/src/caps.js +204 -25
- package/dist/src/capskills.d.ts +19 -0
- package/dist/src/capskills.js +76 -0
- package/dist/src/capsmcp.d.ts +36 -0
- package/dist/src/capsmcp.js +193 -0
- package/dist/src/cli.js +71 -5
- package/dist/src/guide-text.d.ts +39 -39
- package/dist/src/guide-text.js +39 -39
- package/dist/src/mcpauth.d.ts +53 -0
- package/dist/src/mcpauth.js +196 -0
- package/dist/src/runner/home.js +5 -0
- package/dist/src/runner/runner.d.ts +7 -3
- package/dist/src/runner/runner.js +41 -22
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,8 @@ import { join } from 'node:path';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { gitCommonDir } from '../adapters/index.js';
|
|
7
7
|
import { memoryIndex, ownerMemoryDir, projectInstructions } from './context.js';
|
|
8
|
-
import { capsPath, capsPromptText, capsServeArgs, loadCaps } from '../caps.js';
|
|
8
|
+
import { CAPS_SERVER, capsPath, capsPromptText, capsServeArgs, loadCaps } from '../caps.js';
|
|
9
|
+
import { copySkills } from '../capskills.js';
|
|
9
10
|
import { autorunPath, loadAutorun, ruleName, smallRule } from '../autorun.js';
|
|
10
11
|
import { toolchainReadRoots } from '../adapters/paths.js';
|
|
11
12
|
import { developerDir } from '../adapters/scope.js';
|
|
@@ -557,13 +558,21 @@ export class Runner {
|
|
|
557
558
|
runnerReported = false;
|
|
558
559
|
/** the capabilities file problems last logged (logged again only when they change) */
|
|
559
560
|
capsProblems = '';
|
|
560
|
-
/** the capabilities last told to the hub (decisions §34): an edit of the file is reported again on the next poll */
|
|
561
|
+
/** the capabilities last told to the hub (decisions §34, §38): an edit of the file is reported again on the next poll */
|
|
561
562
|
capsReported = '';
|
|
562
563
|
async reportRunner() {
|
|
563
564
|
if (!this.o.client.reportRunner)
|
|
564
565
|
return;
|
|
565
566
|
// the names and descriptions only, never the commands: teammates see them in the agent directory
|
|
566
|
-
|
|
567
|
+
// decisions §38: MCP servers with their tool names, skills by name; never a URL, a command or a credential
|
|
568
|
+
const decl = this.cloud ? undefined : loadCaps(this.o.capsFile ?? capsPath(this.o.home));
|
|
569
|
+
const capabilities = decl
|
|
570
|
+
? [
|
|
571
|
+
...decl.caps.map((c) => ({ kind: 'command', name: c.name, description: c.description.slice(0, 300) })),
|
|
572
|
+
...decl.mcp.map((m) => ({ kind: 'mcp', name: m.name, description: m.description.slice(0, 300), tools: m.tools.slice(0, 50) })),
|
|
573
|
+
...decl.skills.map((k) => ({ kind: 'skill', name: k.name, description: k.description.slice(0, 300) })),
|
|
574
|
+
].slice(0, 50)
|
|
575
|
+
: [];
|
|
567
576
|
const sig = JSON.stringify(capabilities);
|
|
568
577
|
if (this.runnerReported && sig === this.capsReported)
|
|
569
578
|
return;
|
|
@@ -1769,10 +1778,12 @@ export class Runner {
|
|
|
1769
1778
|
entry.controller.abort();
|
|
1770
1779
|
}
|
|
1771
1780
|
}, Math.max(10, Math.min(60_000, Math.floor(this.o.idleMs / 4))));
|
|
1772
|
-
// decisions §34: the
|
|
1773
|
-
//
|
|
1774
|
-
|
|
1775
|
-
|
|
1781
|
+
// decisions §34, §38: the commands, MCP servers and skills the owner declared on this machine, read for every run (an edit
|
|
1782
|
+
// applies to the next run). A read-ahead only reads the task and the checkout: the owner's tools (some of which change things
|
|
1783
|
+
// elsewhere) are for the work
|
|
1784
|
+
const tools = mode === 'prepare' ? undefined : this.toolsFor(taskId, rec.runId, realHome, env.TMPDIR);
|
|
1785
|
+
const toolsSaid = tools ? [...tools.servers.map((s) => `${s.name}=${s.tools.map((t) => t.name).join(',')}`), ...(tools.skills.length ? [`skills=${tools.skills.map((k) => k.name).join(',')}`] : [])].join(' ') : '';
|
|
1786
|
+
this.taskLog(taskId, `${mode} run start perm=${perm} resume=${resume ?? '-'} cwd=${rec.workdir}${toolsSaid ? ` tools: ${toolsSaid}` : ''}`);
|
|
1776
1787
|
let result;
|
|
1777
1788
|
// the model the agent's owner or an admin picked for its runs (the hub's setting, read for every run); none: the runner's
|
|
1778
1789
|
// --model, else the runtime's default
|
|
@@ -1783,8 +1794,8 @@ export class Runner {
|
|
|
1783
1794
|
const go = (m, e) => this.o.adapter.run({
|
|
1784
1795
|
...(m ? { model: m } : {}),
|
|
1785
1796
|
...(e ? { effort: e } : {}),
|
|
1786
|
-
prompt:
|
|
1787
|
-
...(
|
|
1797
|
+
prompt: tools ? `${prompt}\n\n${capsPromptText(tools, { skillPaths: this.o.adapter.spec.skills === 'prompt' })}` : prompt,
|
|
1798
|
+
...(tools ? { tools } : {}),
|
|
1788
1799
|
cwd: rec.workdir,
|
|
1789
1800
|
resume,
|
|
1790
1801
|
perm,
|
|
@@ -1893,26 +1904,34 @@ export class Runner {
|
|
|
1893
1904
|
await this.traces.add(target, rec.runId, mode, startedAt, result, recorder, !this.fatal);
|
|
1894
1905
|
return result;
|
|
1895
1906
|
}
|
|
1896
|
-
/**
|
|
1897
|
-
|
|
1907
|
+
/**
|
|
1908
|
+
* decisions §34, §38: what one run gets of the owner's declarations: the commands server, a proxy per MCP server, and a copy of
|
|
1909
|
+
* the skills in the run's TMPDIR. Undefined when nothing is declared, or the run is in the cloud (nothing of this machine
|
|
1910
|
+
* reaches it).
|
|
1911
|
+
*/
|
|
1912
|
+
toolsFor(taskId, runId, realHome, tmpDir) {
|
|
1898
1913
|
if (this.cloud)
|
|
1899
1914
|
return undefined;
|
|
1900
1915
|
const file = this.o.capsFile ?? capsPath(this.o.home);
|
|
1901
|
-
const { caps, problems } = loadCaps(file);
|
|
1902
|
-
const
|
|
1916
|
+
const { caps, mcp, skills, problems } = loadCaps(file);
|
|
1917
|
+
const copied = skills.length && tmpDir ? copySkills(skills, tmpDir) : undefined;
|
|
1918
|
+
const said = [...problems, ...(copied?.problems ?? []), ...(skills.length && !tmpDir ? ['skills: this run has no TMPDIR to copy them to'] : [])].join('; ');
|
|
1903
1919
|
if (said && said !== this.capsProblems)
|
|
1904
1920
|
this.log(`capabilities: ${said}`);
|
|
1905
1921
|
this.capsProblems = said;
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
return {
|
|
1922
|
+
const cli = this.o.cliPath ?? fileURLToPath(new URL('../cli.js', import.meta.url));
|
|
1923
|
+
const serve = (extra) => ({
|
|
1909
1924
|
command: process.execPath,
|
|
1910
|
-
args: [
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
],
|
|
1914
|
-
|
|
1915
|
-
|
|
1925
|
+
args: [cli, ...capsServeArgs({ file, home: this.o.home, realHome, outDir: tmpDir, log: join(this.o.home, 'logs', 'caps.log'), context: { task: taskId, run: runId }, ...extra })],
|
|
1926
|
+
});
|
|
1927
|
+
const servers = [
|
|
1928
|
+
...(caps.length ? [{ name: CAPS_SERVER, ...serve({}), tools: caps.map((c) => ({ name: c.name, description: c.description, ...(c.confirm ? { confirm: true } : {}) })), timeout: Math.max(...caps.map((c) => c.timeout ?? 120)) }] : []),
|
|
1929
|
+
...mcp.map((m) => ({ name: m.name, description: m.description, ...serve({ mcp: m.name }), tools: m.tools.map((t) => ({ name: t, description: '' })), timeout: m.timeout ?? 300 })),
|
|
1930
|
+
];
|
|
1931
|
+
const runSkills = copied?.skills ?? [];
|
|
1932
|
+
if (!servers.length && !runSkills.length)
|
|
1933
|
+
return undefined;
|
|
1934
|
+
return { servers, skills: runSkills, ...(runSkills.length ? { pluginDir: copied.pluginDir } : {}) };
|
|
1916
1935
|
}
|
|
1917
1936
|
// ---- the execution trace -------------------------------------------------------------------------------------------------
|
|
1918
1937
|
/** Polls until stop() or a 401 (B7: resolves 'unauthorized' after aborting every job). */
|
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.64.0",
|
|
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",
|