agent build

This commit is contained in:
2026-08-28 12:21:44 +05:30
parent b6f8655909
commit f7df96c973
138 changed files with 24164 additions and 207 deletions

View File

@@ -15,11 +15,19 @@
*/
import { readFileSync, readdirSync, writeFileSync, statSync } from 'node:fs';
import { join, relative } from 'node:path';
import { fileURLToPath } from 'node:url';
/* The frontend checkout. Overridable so this runs anywhere the two repos are
checked out side by side, which is the layout it defaults to. */
/* fileURLToPath, not .pathname: a URL percent-encodes, so a checkout under a
directory with a space in it resolved to "/Users/.../Krow%20Project%20/..."
— a path that does not exist. Vite then started with a root pointing nowhere
and failed on the first import, which reads as a missing source file rather
than a broken path. The effect was that this script could not run at all on
such a checkout, and the conformance test went on passing against whatever
oracle happened to be committed. */
const FRONTEND = process.env.KROW_FRONTEND
|| new URL('../../krow-demo', import.meta.url).pathname;
|| fileURLToPath(new URL('../../krow-demo', import.meta.url));
const { createServer } = await import(join(FRONTEND, 'node_modules/vite/dist/node/index.js'));
const { CASES } = await import(new URL('./cases.mjs', import.meta.url).href);
@@ -70,6 +78,10 @@ const projectAgent = (a) => ({
trigger: a.trigger,
webSearch: a.webSearch,
skills: a.skills,
/* Capability, and the field the two parsers most need to agree on: the
backend resolves an agent's tools from exactly this list, so a divergence
here is an agent that can do something in one process and not the other. */
tools: a.tools,
subagents: a.subagents,
starters: a.starters,
permissions: a.permissions,