@foldrun/core 17.0.0 → 17.1.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/dist/src/run-container.d.ts +8 -0
- package/dist/src/run-container.js +35 -7
- package/dist/src/scan.d.ts +3 -7
- package/dist/src/scan.js +13 -11
- package/dist/src/step-exec.js +5 -1
- package/package.json +1 -1
- package/src/run-container.ts +34 -6
- package/src/scan.ts +17 -11
- package/src/step-exec.ts +5 -1
|
@@ -456,6 +456,14 @@ export declare const ENTRY: string;
|
|
|
456
456
|
/** Which build target of the runner image (see DOCKERFILE). */
|
|
457
457
|
export type RunnerVariant = "full" | "slim";
|
|
458
458
|
export declare function runnerImageTag(variant?: RunnerVariant): string;
|
|
459
|
+
/**
|
|
460
|
+
* `npm pack` an installed, already built core into `dest`, running none of
|
|
461
|
+
* its scripts. Its `prepare` (npm run build: clear dist/, then tsc) used to
|
|
462
|
+
* run on every pack, and in an install with no TypeScript — every CLI from
|
|
463
|
+
* npm — it failed half way: each container step failed with "npm pack
|
|
464
|
+
* failed", and the first one deleted the install's own dist/.
|
|
465
|
+
*/
|
|
466
|
+
export declare function packInstalledCore(pkgDir: string, dest: string): void;
|
|
459
467
|
/**
|
|
460
468
|
* Build the runner image if this exact (core version, driver, dockerfile)
|
|
461
469
|
* has not been built before. `npm pack` of the installed core, so the image
|
|
@@ -1197,6 +1197,11 @@ export const DOCKERFILE = runnerDockerfile();
|
|
|
1197
1197
|
export const ENTRY = `#!/bin/sh
|
|
1198
1198
|
set +e
|
|
1199
1199
|
${ROOT_SHELL_GUARD_SH}
|
|
1200
|
+
# docker cp keeps the host's owner: from a non-root host (a laptop) the job
|
|
1201
|
+
# files arrive as uid 501, and root without CAP_DAC_OVERRIDE cannot read its
|
|
1202
|
+
# own 0600 root-env.sh. Root's first, before any of them is read; the agent
|
|
1203
|
+
# gets the folder below as before.
|
|
1204
|
+
chown -R 0:0 /opt/runner/job 2>/dev/null || true
|
|
1200
1205
|
# The runtime cache, when one is mounted. NOT recursive: a warm cache is tens
|
|
1201
1206
|
# of thousands of files and its contents are already agent-owned from the step
|
|
1202
1207
|
# that built them — only the mount point itself arrives owned by root. Before
|
|
@@ -1244,6 +1249,35 @@ export function runnerImageTag(variant = "full") {
|
|
|
1244
1249
|
}
|
|
1245
1250
|
return `foldrun-runner:${hash.digest("hex").slice(0, 12)}${variant === "slim" ? "-slim" : ""}`;
|
|
1246
1251
|
}
|
|
1252
|
+
/**
|
|
1253
|
+
* `npm pack` an installed, already built core into `dest`, running none of
|
|
1254
|
+
* its scripts. Its `prepare` (npm run build: clear dist/, then tsc) used to
|
|
1255
|
+
* run on every pack, and in an install with no TypeScript — every CLI from
|
|
1256
|
+
* npm — it failed half way: each container step failed with "npm pack
|
|
1257
|
+
* failed", and the first one deleted the install's own dist/.
|
|
1258
|
+
*/
|
|
1259
|
+
export function packInstalledCore(pkgDir, dest) {
|
|
1260
|
+
const out = path.dirname(dest);
|
|
1261
|
+
// A copy with no scripts, because npm 10 (Node 22's) runs `prepare` on a
|
|
1262
|
+
// pack even with --ignore-scripts; npm 11 does not. The copy leaves out
|
|
1263
|
+
// node_modules, which a pack never takes anyway.
|
|
1264
|
+
const copy = fs.mkdtempSync(path.join(out, ".core-pack-"));
|
|
1265
|
+
try {
|
|
1266
|
+
fs.cpSync(pkgDir, copy, { recursive: true, filter: (src) => path.basename(src) !== "node_modules" });
|
|
1267
|
+
const manifest = path.join(copy, "package.json");
|
|
1268
|
+
const pkg = JSON.parse(fs.readFileSync(manifest, "utf8"));
|
|
1269
|
+
delete pkg.scripts;
|
|
1270
|
+
fs.writeFileSync(manifest, JSON.stringify(pkg, null, 2) + "\n");
|
|
1271
|
+
const pack = spawnSync("npm", ["pack", copy, "--pack-destination", out, "--ignore-scripts"], { encoding: "utf8" });
|
|
1272
|
+
if (pack.status !== 0)
|
|
1273
|
+
throw new Error(`npm pack failed:\n${pack.stderr}`);
|
|
1274
|
+
const tarball = pack.stdout.trim().split("\n").at(-1);
|
|
1275
|
+
fs.renameSync(path.join(out, tarball), dest);
|
|
1276
|
+
}
|
|
1277
|
+
finally {
|
|
1278
|
+
fs.rmSync(copy, { recursive: true, force: true });
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1247
1281
|
/**
|
|
1248
1282
|
* Build the runner image if this exact (core version, driver, dockerfile)
|
|
1249
1283
|
* has not been built before. `npm pack` of the installed core, so the image
|
|
@@ -1290,13 +1324,7 @@ export function ensureRunnerImage(opts = {}) {
|
|
|
1290
1324
|
return { tag, log };
|
|
1291
1325
|
const build = fs.mkdtempSync(path.join(os.tmpdir(), "foldrun-runner-build-"));
|
|
1292
1326
|
try {
|
|
1293
|
-
|
|
1294
|
-
encoding: "utf8",
|
|
1295
|
-
});
|
|
1296
|
-
if (pack.status !== 0)
|
|
1297
|
-
throw new Error(`npm pack failed:\n${pack.stderr}`);
|
|
1298
|
-
const tarball = pack.stdout.trim().split("\n").at(-1);
|
|
1299
|
-
fs.renameSync(path.join(build, tarball), path.join(build, "foldrun-core.tgz"));
|
|
1327
|
+
packInstalledCore(corePackageDir(), path.join(build, "foldrun-core.tgz"));
|
|
1300
1328
|
fs.writeFileSync(path.join(build, "driver.mjs"), DRIVER);
|
|
1301
1329
|
fs.writeFileSync(path.join(build, "entry.sh"), ENTRY);
|
|
1302
1330
|
// The same text the tag hashed (runnerImageTag), base and all.
|
package/dist/src/scan.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export interface ScanRule {
|
|
|
10
10
|
help: string;
|
|
11
11
|
/** OWASP Top 10 for Agentic Applications (2026) ids it guards against. */
|
|
12
12
|
owasp?: string[];
|
|
13
|
+
/** Its anchor on docs.foldrun.io/checks, when it is not the id with "/"
|
|
14
|
+
* read as "-" — a rule documented as a row of a table, not a section. */
|
|
15
|
+
anchor?: string;
|
|
13
16
|
}
|
|
14
17
|
export interface ScanFile {
|
|
15
18
|
/** Relative to the workspace root (`agents/x/agent.md`), or `library/…`. */
|
|
@@ -59,13 +62,6 @@ export interface ScanOptions {
|
|
|
59
62
|
}
|
|
60
63
|
export declare const OWASP_URL = "https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026";
|
|
61
64
|
export declare const SCAN_RULES: readonly ScanRule[];
|
|
62
|
-
/**
|
|
63
|
-
* The rules `foldrun check` and the deploy have always had — "will this
|
|
64
|
-
* run?" — given ids so a finding from them can be filtered, ignored,
|
|
65
|
-
* baselined and carried in SARIF like the scanner's. Coarse on purpose, one
|
|
66
|
-
* per kind of file; the message says exactly what is wrong. Their level is
|
|
67
|
-
* each problem's own, so it is not fixed here.
|
|
68
|
-
*/
|
|
69
65
|
export declare const CHECK_RULES: readonly (Omit<ScanRule, "level"> & {
|
|
70
66
|
level?: ScanLevel;
|
|
71
67
|
})[];
|
package/dist/src/scan.js
CHANGED
|
@@ -315,18 +315,20 @@ export const SCAN_RULES = [
|
|
|
315
315
|
* per kind of file; the message says exactly what is wrong. Their level is
|
|
316
316
|
* each problem's own, so it is not fixed here.
|
|
317
317
|
*/
|
|
318
|
+
/** The checks page lists check's own rules in one table, under this heading. */
|
|
319
|
+
const OWN_RULES = "checks-own-rules";
|
|
318
320
|
export const CHECK_RULES = [
|
|
319
|
-
{ id: "agent/config", category: "config", title: "An agent's frontmatter or references are wrong", help: "A field foldrun cannot read, or a tool, skill, colleague or hook it names that does not exist. The message says which and what to write." },
|
|
320
|
-
{ id: "flow/config", category: "config", title: "A flow's steps or options are wrong", help: "A step naming no agent, an option value the parser cannot read, a verify: written as prose, or an arrangement that cannot have what its instruction asks for." },
|
|
321
|
+
{ id: "agent/config", anchor: OWN_RULES, category: "config", title: "An agent's frontmatter or references are wrong", help: "A field foldrun cannot read, or a tool, skill, colleague or hook it names that does not exist. The message says which and what to write." },
|
|
322
|
+
{ id: "flow/config", anchor: OWN_RULES, category: "config", title: "A flow's steps or options are wrong", help: "A step naming no agent, an option value the parser cannot read, a verify: written as prose, or an arrangement that cannot have what its instruction asks for." },
|
|
321
323
|
{ id: "flow/outward-ungated", category: "security", title: "A step that acts outside the workspace with no check and no approval", help: "Give the step a verify: that reads what it did, or an approval (`!`), so a wrong post or send is caught before it repeats.", owasp: ["ASI02", "ASI09"] },
|
|
322
|
-
{ id: "tool/config", category: "config", title: "A tool's definition or program is wrong", help: "A run: program that does not exist, a package it imports that nothing declares, or a leftover type: field." },
|
|
323
|
-
{ id: "skill/config", category: "config", title: "A skill does not follow the skill format", help: "SKILL.md needs a name and a description the model can choose it by." },
|
|
324
|
-
{ id: "eval/config", category: "config", title: "An eval names nothing, or has no cases", help: "An eval names one agent or flow that exists and holds at least one case." },
|
|
325
|
-
{ id: "hook/config", category: "config", title: "A hook is not a valid hook, or a hooks: name resolves to nothing", help: "hooks/<name>/hook.md with on:, and run.mjs beside it; a run refuses a step whose hook is missing rather than run it unguarded." },
|
|
326
|
-
{ id: "knowledge/okf", category: "config", title: "A knowledge or memory document is not a conformant OKF bundle entry", help: "Each document needs a type:; dates are YYYY-MM-DD; stale documents are flagged so an agent does not treat them as current." },
|
|
327
|
-
{ id: "workspace/config", category: "config", title: "A workspace or account setting cannot be read", help: "AGENTS.md defaults — limits:, network:, foldrun_version: — that would leave every agent on the level above, and paths a deploy refuses." },
|
|
328
|
-
{ id: "library/config", category: "config", title: "A library entry is wrong", help: "The same rules as in a workspace, for the account's shared library." },
|
|
329
|
-
{ id: "paths/workspace-spelling", category: "config", title: "An older spelling of a workspace path", help: "`../../storage/x` still works; `workspace/storage/x` reads the same in every tool, script and check." },
|
|
324
|
+
{ id: "tool/config", anchor: OWN_RULES, category: "config", title: "A tool's definition or program is wrong", help: "A run: program that does not exist, a package it imports that nothing declares, or a leftover type: field." },
|
|
325
|
+
{ id: "skill/config", anchor: OWN_RULES, category: "config", title: "A skill does not follow the skill format", help: "SKILL.md needs a name and a description the model can choose it by." },
|
|
326
|
+
{ id: "eval/config", anchor: OWN_RULES, category: "config", title: "An eval names nothing, or has no cases", help: "An eval names one agent or flow that exists and holds at least one case." },
|
|
327
|
+
{ id: "hook/config", anchor: OWN_RULES, category: "config", title: "A hook is not a valid hook, or a hooks: name resolves to nothing", help: "hooks/<name>/hook.md with on:, and run.mjs beside it; a run refuses a step whose hook is missing rather than run it unguarded." },
|
|
328
|
+
{ id: "knowledge/okf", anchor: OWN_RULES, category: "config", title: "A knowledge or memory document is not a conformant OKF bundle entry", help: "Each document needs a type:; dates are YYYY-MM-DD; stale documents are flagged so an agent does not treat them as current." },
|
|
329
|
+
{ id: "workspace/config", anchor: OWN_RULES, category: "config", title: "A workspace or account setting cannot be read", help: "AGENTS.md defaults — limits:, network:, foldrun_version: — that would leave every agent on the level above, and paths a deploy refuses." },
|
|
330
|
+
{ id: "library/config", anchor: OWN_RULES, category: "config", title: "A library entry is wrong", help: "The same rules as in a workspace, for the account's shared library." },
|
|
331
|
+
{ id: "paths/workspace-spelling", anchor: OWN_RULES, category: "config", title: "An older spelling of a workspace path", help: "`../../storage/x` still works; `workspace/storage/x` reads the same in every tool, script and check." },
|
|
330
332
|
];
|
|
331
333
|
/** The rule id of a check or deploy problem, from where it was found and
|
|
332
334
|
* the flow lint's tag when it has one. */
|
|
@@ -354,7 +356,7 @@ export function scanRule(id) {
|
|
|
354
356
|
}
|
|
355
357
|
/** Where a rule's docs live — one page, an anchor per rule. */
|
|
356
358
|
export function ruleDocsUrl(id) {
|
|
357
|
-
return `https://docs.foldrun.io/checks#${id.replace(/\//g, "-")}`;
|
|
359
|
+
return `https://docs.foldrun.io/checks#${RULE_BY_ID.get(id)?.anchor ?? id.replace(/\//g, "-")}`;
|
|
358
360
|
}
|
|
359
361
|
// ── fingerprints ───────────────────────────────────────────────────────────
|
|
360
362
|
/** rule + file + the text that was flagged, normalised. Not the line number:
|
package/dist/src/step-exec.js
CHANGED
|
@@ -1190,7 +1190,11 @@ export function modelProcessError(err, where) {
|
|
|
1190
1190
|
return new Error(`${head} — the model process failed`);
|
|
1191
1191
|
}
|
|
1192
1192
|
export function sdkEnv(base, extra = {}) {
|
|
1193
|
-
|
|
1193
|
+
// No telemetry, error reports, update checks or feature-flag fetches from
|
|
1194
|
+
// the model process: none of it is the step, and it held back the SDK's
|
|
1195
|
+
// start by ~0.85 s a step on an open network (FOL-49: init median 1.4 s →
|
|
1196
|
+
// 0.56 s, 9 runs each); behind the egress filter those hosts are refused.
|
|
1197
|
+
return { ...(base ?? process.env), ...extra, ENABLE_CLAUDEAI_MCP_SERVERS: "false", CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1" };
|
|
1194
1198
|
}
|
|
1195
1199
|
/** The text of a tool result, whichever shape it came in: a string, or a
|
|
1196
1200
|
* list of content blocks of which only the text ones say anything. */
|
package/package.json
CHANGED
package/src/run-container.ts
CHANGED
|
@@ -1404,6 +1404,11 @@ export const DOCKERFILE = runnerDockerfile();
|
|
|
1404
1404
|
export const ENTRY = `#!/bin/sh
|
|
1405
1405
|
set +e
|
|
1406
1406
|
${ROOT_SHELL_GUARD_SH}
|
|
1407
|
+
# docker cp keeps the host's owner: from a non-root host (a laptop) the job
|
|
1408
|
+
# files arrive as uid 501, and root without CAP_DAC_OVERRIDE cannot read its
|
|
1409
|
+
# own 0600 root-env.sh. Root's first, before any of them is read; the agent
|
|
1410
|
+
# gets the folder below as before.
|
|
1411
|
+
chown -R 0:0 /opt/runner/job 2>/dev/null || true
|
|
1407
1412
|
# The runtime cache, when one is mounted. NOT recursive: a warm cache is tens
|
|
1408
1413
|
# of thousands of files and its contents are already agent-owned from the step
|
|
1409
1414
|
# that built them — only the mount point itself arrives owned by root. Before
|
|
@@ -1454,6 +1459,34 @@ export function runnerImageTag(variant: RunnerVariant = "full"): string {
|
|
|
1454
1459
|
return `foldrun-runner:${hash.digest("hex").slice(0, 12)}${variant === "slim" ? "-slim" : ""}`;
|
|
1455
1460
|
}
|
|
1456
1461
|
|
|
1462
|
+
/**
|
|
1463
|
+
* `npm pack` an installed, already built core into `dest`, running none of
|
|
1464
|
+
* its scripts. Its `prepare` (npm run build: clear dist/, then tsc) used to
|
|
1465
|
+
* run on every pack, and in an install with no TypeScript — every CLI from
|
|
1466
|
+
* npm — it failed half way: each container step failed with "npm pack
|
|
1467
|
+
* failed", and the first one deleted the install's own dist/.
|
|
1468
|
+
*/
|
|
1469
|
+
export function packInstalledCore(pkgDir: string, dest: string): void {
|
|
1470
|
+
const out = path.dirname(dest);
|
|
1471
|
+
// A copy with no scripts, because npm 10 (Node 22's) runs `prepare` on a
|
|
1472
|
+
// pack even with --ignore-scripts; npm 11 does not. The copy leaves out
|
|
1473
|
+
// node_modules, which a pack never takes anyway.
|
|
1474
|
+
const copy = fs.mkdtempSync(path.join(out, ".core-pack-"));
|
|
1475
|
+
try {
|
|
1476
|
+
fs.cpSync(pkgDir, copy, { recursive: true, filter: (src) => path.basename(src) !== "node_modules" });
|
|
1477
|
+
const manifest = path.join(copy, "package.json");
|
|
1478
|
+
const pkg = JSON.parse(fs.readFileSync(manifest, "utf8")) as Record<string, unknown>;
|
|
1479
|
+
delete pkg.scripts;
|
|
1480
|
+
fs.writeFileSync(manifest, JSON.stringify(pkg, null, 2) + "\n");
|
|
1481
|
+
const pack = spawnSync("npm", ["pack", copy, "--pack-destination", out, "--ignore-scripts"], { encoding: "utf8" });
|
|
1482
|
+
if (pack.status !== 0) throw new Error(`npm pack failed:\n${pack.stderr}`);
|
|
1483
|
+
const tarball = pack.stdout.trim().split("\n").at(-1)!;
|
|
1484
|
+
fs.renameSync(path.join(out, tarball), dest);
|
|
1485
|
+
} finally {
|
|
1486
|
+
fs.rmSync(copy, { recursive: true, force: true });
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1457
1490
|
/**
|
|
1458
1491
|
* Build the runner image if this exact (core version, driver, dockerfile)
|
|
1459
1492
|
* has not been built before. `npm pack` of the installed core, so the image
|
|
@@ -1504,12 +1537,7 @@ export function ensureRunnerImage(
|
|
|
1504
1537
|
|
|
1505
1538
|
const build = fs.mkdtempSync(path.join(os.tmpdir(), "foldrun-runner-build-"));
|
|
1506
1539
|
try {
|
|
1507
|
-
|
|
1508
|
-
encoding: "utf8",
|
|
1509
|
-
});
|
|
1510
|
-
if (pack.status !== 0) throw new Error(`npm pack failed:\n${pack.stderr}`);
|
|
1511
|
-
const tarball = pack.stdout.trim().split("\n").at(-1)!;
|
|
1512
|
-
fs.renameSync(path.join(build, tarball), path.join(build, "foldrun-core.tgz"));
|
|
1540
|
+
packInstalledCore(corePackageDir(), path.join(build, "foldrun-core.tgz"));
|
|
1513
1541
|
fs.writeFileSync(path.join(build, "driver.mjs"), DRIVER);
|
|
1514
1542
|
fs.writeFileSync(path.join(build, "entry.sh"), ENTRY);
|
|
1515
1543
|
// The same text the tag hashed (runnerImageTag), base and all.
|
package/src/scan.ts
CHANGED
|
@@ -50,6 +50,9 @@ export interface ScanRule {
|
|
|
50
50
|
help: string;
|
|
51
51
|
/** OWASP Top 10 for Agentic Applications (2026) ids it guards against. */
|
|
52
52
|
owasp?: string[];
|
|
53
|
+
/** Its anchor on docs.foldrun.io/checks, when it is not the id with "/"
|
|
54
|
+
* read as "-" — a rule documented as a row of a table, not a section. */
|
|
55
|
+
anchor?: string;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
export interface ScanFile {
|
|
@@ -400,18 +403,21 @@ export const SCAN_RULES: readonly ScanRule[] = [
|
|
|
400
403
|
* per kind of file; the message says exactly what is wrong. Their level is
|
|
401
404
|
* each problem's own, so it is not fixed here.
|
|
402
405
|
*/
|
|
406
|
+
/** The checks page lists check's own rules in one table, under this heading. */
|
|
407
|
+
const OWN_RULES = "checks-own-rules";
|
|
408
|
+
|
|
403
409
|
export const CHECK_RULES: readonly (Omit<ScanRule, "level"> & { level?: ScanLevel })[] = [
|
|
404
|
-
{ id: "agent/config", category: "config", title: "An agent's frontmatter or references are wrong", help: "A field foldrun cannot read, or a tool, skill, colleague or hook it names that does not exist. The message says which and what to write." },
|
|
405
|
-
{ id: "flow/config", category: "config", title: "A flow's steps or options are wrong", help: "A step naming no agent, an option value the parser cannot read, a verify: written as prose, or an arrangement that cannot have what its instruction asks for." },
|
|
410
|
+
{ id: "agent/config", anchor: OWN_RULES, category: "config", title: "An agent's frontmatter or references are wrong", help: "A field foldrun cannot read, or a tool, skill, colleague or hook it names that does not exist. The message says which and what to write." },
|
|
411
|
+
{ id: "flow/config", anchor: OWN_RULES, category: "config", title: "A flow's steps or options are wrong", help: "A step naming no agent, an option value the parser cannot read, a verify: written as prose, or an arrangement that cannot have what its instruction asks for." },
|
|
406
412
|
{ id: "flow/outward-ungated", category: "security", title: "A step that acts outside the workspace with no check and no approval", help: "Give the step a verify: that reads what it did, or an approval (`!`), so a wrong post or send is caught before it repeats.", owasp: ["ASI02", "ASI09"] },
|
|
407
|
-
{ id: "tool/config", category: "config", title: "A tool's definition or program is wrong", help: "A run: program that does not exist, a package it imports that nothing declares, or a leftover type: field." },
|
|
408
|
-
{ id: "skill/config", category: "config", title: "A skill does not follow the skill format", help: "SKILL.md needs a name and a description the model can choose it by." },
|
|
409
|
-
{ id: "eval/config", category: "config", title: "An eval names nothing, or has no cases", help: "An eval names one agent or flow that exists and holds at least one case." },
|
|
410
|
-
{ id: "hook/config", category: "config", title: "A hook is not a valid hook, or a hooks: name resolves to nothing", help: "hooks/<name>/hook.md with on:, and run.mjs beside it; a run refuses a step whose hook is missing rather than run it unguarded." },
|
|
411
|
-
{ id: "knowledge/okf", category: "config", title: "A knowledge or memory document is not a conformant OKF bundle entry", help: "Each document needs a type:; dates are YYYY-MM-DD; stale documents are flagged so an agent does not treat them as current." },
|
|
412
|
-
{ id: "workspace/config", category: "config", title: "A workspace or account setting cannot be read", help: "AGENTS.md defaults — limits:, network:, foldrun_version: — that would leave every agent on the level above, and paths a deploy refuses." },
|
|
413
|
-
{ id: "library/config", category: "config", title: "A library entry is wrong", help: "The same rules as in a workspace, for the account's shared library." },
|
|
414
|
-
{ id: "paths/workspace-spelling", category: "config", title: "An older spelling of a workspace path", help: "`../../storage/x` still works; `workspace/storage/x` reads the same in every tool, script and check." },
|
|
413
|
+
{ id: "tool/config", anchor: OWN_RULES, category: "config", title: "A tool's definition or program is wrong", help: "A run: program that does not exist, a package it imports that nothing declares, or a leftover type: field." },
|
|
414
|
+
{ id: "skill/config", anchor: OWN_RULES, category: "config", title: "A skill does not follow the skill format", help: "SKILL.md needs a name and a description the model can choose it by." },
|
|
415
|
+
{ id: "eval/config", anchor: OWN_RULES, category: "config", title: "An eval names nothing, or has no cases", help: "An eval names one agent or flow that exists and holds at least one case." },
|
|
416
|
+
{ id: "hook/config", anchor: OWN_RULES, category: "config", title: "A hook is not a valid hook, or a hooks: name resolves to nothing", help: "hooks/<name>/hook.md with on:, and run.mjs beside it; a run refuses a step whose hook is missing rather than run it unguarded." },
|
|
417
|
+
{ id: "knowledge/okf", anchor: OWN_RULES, category: "config", title: "A knowledge or memory document is not a conformant OKF bundle entry", help: "Each document needs a type:; dates are YYYY-MM-DD; stale documents are flagged so an agent does not treat them as current." },
|
|
418
|
+
{ id: "workspace/config", anchor: OWN_RULES, category: "config", title: "A workspace or account setting cannot be read", help: "AGENTS.md defaults — limits:, network:, foldrun_version: — that would leave every agent on the level above, and paths a deploy refuses." },
|
|
419
|
+
{ id: "library/config", anchor: OWN_RULES, category: "config", title: "A library entry is wrong", help: "The same rules as in a workspace, for the account's shared library." },
|
|
420
|
+
{ id: "paths/workspace-spelling", anchor: OWN_RULES, category: "config", title: "An older spelling of a workspace path", help: "`../../storage/x` still works; `workspace/storage/x` reads the same in every tool, script and check." },
|
|
415
421
|
];
|
|
416
422
|
|
|
417
423
|
/** The rule id of a check or deploy problem, from where it was found and
|
|
@@ -439,7 +445,7 @@ export function scanRule(id: string): (Omit<ScanRule, "level"> & { level?: ScanL
|
|
|
439
445
|
|
|
440
446
|
/** Where a rule's docs live — one page, an anchor per rule. */
|
|
441
447
|
export function ruleDocsUrl(id: string): string {
|
|
442
|
-
return `https://docs.foldrun.io/checks#${id.replace(/\//g, "-")}`;
|
|
448
|
+
return `https://docs.foldrun.io/checks#${RULE_BY_ID.get(id)?.anchor ?? id.replace(/\//g, "-")}`;
|
|
443
449
|
}
|
|
444
450
|
|
|
445
451
|
// ── fingerprints ───────────────────────────────────────────────────────────
|
package/src/step-exec.ts
CHANGED
|
@@ -1400,7 +1400,11 @@ export function modelProcessError(err: unknown, where: string): Error {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
|
|
1402
1402
|
export function sdkEnv(base: Record<string, string | undefined> | undefined, extra: Record<string, string> = {}): Record<string, string | undefined> {
|
|
1403
|
-
|
|
1403
|
+
// No telemetry, error reports, update checks or feature-flag fetches from
|
|
1404
|
+
// the model process: none of it is the step, and it held back the SDK's
|
|
1405
|
+
// start by ~0.85 s a step on an open network (FOL-49: init median 1.4 s →
|
|
1406
|
+
// 0.56 s, 9 runs each); behind the egress filter those hosts are refused.
|
|
1407
|
+
return { ...(base ?? process.env), ...extra, ENABLE_CLAUDEAI_MCP_SERVERS: "false", CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1" };
|
|
1404
1408
|
}
|
|
1405
1409
|
|
|
1406
1410
|
/** The text of a tool result, whichever shape it came in: a string, or a
|