📦 deps(thirdparty): update snapshots

This commit is contained in:
ci[bot]
2026-09-03 08:57:39 +00:00
parent 0b2b056032
commit 3294e63c9f
98 changed files with 3411 additions and 467 deletions
+4 -2
View File
@@ -13,7 +13,7 @@
# ./scripts/install.sh <platform> [--project]
# curl -fsSL https://raw.githubusercontent.com/hyhmrright/brooks-lint/main/scripts/install.sh | bash -s -- <platform>
#
# Platforms: opencode cursor windsurf antigravity pi kiro copilot droid dsh gemini codex claude agents
# Platforms: opencode cursor windsurf antigravity pi kiro copilot droid dsh gemini codex claude agents bob
# agents = the vendor-neutral ~/.agents/skills folder (read by Cursor, Copilot, pi, Gemini,
# Codex, and DeepSeek Harness)
#
@@ -25,7 +25,7 @@
set -euo pipefail
REPO_URL="https://github.com/hyhmrright/brooks-lint.git"
PLATFORMS="opencode cursor windsurf antigravity pi kiro copilot droid dsh gemini codex claude agents"
PLATFORMS="opencode cursor windsurf antigravity pi kiro copilot droid dsh gemini codex claude agents bob"
err() { printf '\033[31merror:\033[0m %s\n' "$*" >&2; }
info() { printf '\033[36m\033[0m %s\n' "$*"; }
@@ -66,6 +66,7 @@ global_dir() {
codex) printf '%s' "$HOME/.codex/skills" ;;
claude) printf '%s' "$HOME/.claude/skills" ;;
agents) printf '%s' "$HOME/.agents/skills" ;;
bob) printf '%s' "$HOME/.bob/skills" ;;
*) return 1 ;;
esac
}
@@ -85,6 +86,7 @@ project_dir() {
codex) printf '%s' "$PWD/.codex/skills" ;;
claude) printf '%s' "$PWD/.claude/skills" ;;
agents) printf '%s' "$PWD/.agents/skills" ;;
bob) printf '%s' "$PWD/.bob/skills" ;;
*) return 1 ;;
esac
}
+23
View File
@@ -42,6 +42,29 @@ export function linkedSetupGuides(text) {
return [...new Set([...links].map((match) => match[1]))].sort();
}
/**
* The `<platform> = …` line that tells a reader what `install.sh` accepts, plus
* the line after it, since the getting-started copy wraps mid-list. Returns ""
* when the document has no such line.
*
* This is the one place a platform has to be spelled out; a mere mention
* anywhere in the document is worthless as a check, because most platforms are
* named by their own install path (`~/.bob/skills` contains "bob") in a table
* row that checkPlatformDocs already requires.
*/
export function platformEnumeration(text) {
return text.match(/^.*<(?:platform|平台)>.*?[=∈].*(?:\n.*)?/m)?.[0] ?? "";
}
/**
* Whether some text names a platform as a whole token rather than a substring,
* so `pi` does not match "piper" and `bob` does not match "bob-setup.md". Splits
* rather than building a regex out of PLATFORMS, which is unvalidated text.
*/
export function namesPlatform(text, platform) {
return text.split(/[^a-z0-9-]+/).includes(platform);
}
/**
* The installer's platform list plus the platforms each directory-mapping
* function actually handles. A platform in PLATFORMS with no case arm fails
+26 -4
View File
@@ -15,7 +15,14 @@ import {
} from "./frontmatter.mjs";
import { GUIDE_BY_MODE, VALID_MODES } from "./assemble-prompt.mjs";
import { versionRefs } from "./version-refs.mjs";
import { platformDocs, setupGuides, linkedSetupGuides, parseInstallerPlatforms } from "./platforms.mjs";
import {
platformDocs,
setupGuides,
linkedSetupGuides,
parseInstallerPlatforms,
platformEnumeration,
namesPlatform,
} from "./platforms.mjs";
import { render as renderStarHistory, readStamps as readStarStamps } from "./gen-star-history.mjs";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -328,20 +335,35 @@ function checkAgentsDocs() {
}
// Every docs/<name>-setup.md must be linked from all six READMEs and the
// getting-started table. A platform added to one language and forgotten in the
// others was previously caught only by hand.
// getting-started table, and every platform the installer accepts must appear in
// each document's `<platform> = …` list. Linking alone was not enough: IBM Bob
// arrived with its setup guide linked everywhere and its name missing from every
// enumeration but the English one.
function checkPlatformDocs() {
const guides = setupGuides(root);
const { declared } = parseInstallerPlatforms(readText("scripts/install.sh"));
check(guides.length > 0, "docs/ should contain at least one <platform>-setup.md guide");
for (const file of platformDocs(root)) {
const linked = linkedSetupGuides(readText(file));
const text = readText(file);
const linked = linkedSetupGuides(text);
for (const guide of guides) {
check(linked.includes(guide), `${file} is missing an install-table link to docs/${guide}`);
}
for (const link of linked) {
check(guides.includes(link), `${file} links to docs/${link}, which does not exist`);
}
const enumeration = platformEnumeration(text);
if (enumeration === "") {
check(false, `${file} has no '<platform> = …' list of the installer's platforms`);
continue;
}
for (const platform of declared) {
check(
namesPlatform(enumeration, platform),
`${file} omits '${platform}' from its '<platform> = …' list, which scripts/install.sh accepts`,
);
}
}
}
+40 -1
View File
@@ -31,7 +31,12 @@ import { reportToSarif } from "./sarif.mjs";
import { severityBreached, isRegression } from "./ci-gate.mjs";
import { summarize } from "./benchmark.mjs";
import { versionRefs } from "./version-refs.mjs";
import { linkedSetupGuides, parseInstallerPlatforms } from "./platforms.mjs";
import {
linkedSetupGuides,
parseInstallerPlatforms,
platformEnumeration,
namesPlatform,
} from "./platforms.mjs";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -922,6 +927,40 @@ test("returns an empty array when no guide is linked", () => {
assert.deepEqual(linkedSetupGuides("no links here"), []);
});
console.log("\nplatformEnumeration");
test("picks the enumeration line, not the earlier <platform> placeholder", () => {
const text = "bash -s -- <platform>\n# <platform> = opencode · kiro\n```";
assert.equal(platformEnumeration(text), "# <platform> = opencode · kiro\n```");
});
test("keeps the continuation line, since getting-started wraps mid-list", () => {
const text = "`<platform>` ∈ `opencode · dsh ·\ngemini · agents`. Add `--project` to …";
assert.ok(platformEnumeration(text).includes("agents"));
});
test("matches the localized <平台> form", () => {
assert.ok(platformEnumeration("# <平台> = opencode · kiro").includes("kiro"));
});
test("returns an empty string when the document has no enumeration", () => {
assert.equal(platformEnumeration("bash -s -- <platform>\n"), "");
});
console.log("\nnamesPlatform");
test("matches a platform delimited by list separators", () => {
assert.ok(namesPlatform("opencode · bob · agents", "bob"));
});
test("does not match a platform buried in a hyphenated filename", () => {
assert.equal(namesPlatform("[setup](docs/bob-setup.md)", "bob"), false);
});
test("does not match a platform that is only a substring", () => {
assert.equal(namesPlatform("opencode · piper", "pi"), false);
});
console.log("\nparseInstallerPlatforms");
const INSTALLER_FIXTURE = [