Release v0.10.39: Standardize 0-based 00xx rule codes, draft-default rules CLI, and documents domain

This commit is contained in:
gitea committed 2026-09-28 11:49:31 +08:00
1 parent f8e083f3b2
commit 69fe2415a1
33 files changed
+1377 -777

No files matched your search

+2 -10
View File
@@ -1,4 +1,3 @@
import { isReadOnlySealTool } from "../domains/seal/tools.js";
import { parseArgs } from "./parser.js";
/**
@@ -29,7 +28,8 @@ const AREA_ALIASES: Record<string, string> = {
*/
const READ_ONLY_COMMANDS: Record<string, string[]> = {
corps: ["list", "search", "get", "current"],
rules: ["count", "list", "versions", "version", "diff", "diff-one", "get", "search", "lint", "linters", "pull", "map"],
rules: ["count", "list", "versions", "version", "diff", "get", "search", "lint", "linters", "pull", "map"],
documents: ["list", "get", "search"],
webhook: ["ready", "status", "list", "get", "resource-pack export", "resource-pack preview"],
"approval-runs": [
"summary",
@@ -78,7 +78,6 @@ const READ_ONLY_COMMANDS: Record<string, string[]> = {
// mutation despite reading like a query. See SEAL_MUTATING_TOOLS.
analytics: ["insight", "risks", "performance", "export"],
source: ["config"],
tools: ["list"],
skill: ["dump", "status"],
service: ["status", "logs"],
doctor: ["", "guide", "paths", "tenant", "auth"],
@@ -112,13 +111,6 @@ export function isReadOnlyCliCommand(argv: string[]): boolean {
if (actionTokens.length === 0 && TOP_LEVEL_READ_ONLY.has(area)) return true;
// `seal-use tool <name>` reaches the internal tool registry, which carries its own exhaustive
// read/write classification. Delegating to it keeps the two from drifting apart.
if (area === "tool") {
const toolName = actionTokens[0];
return toolName !== undefined && isReadOnlySealTool(toolName);
}
const allowed = READ_ONLY_COMMANDS[area];
if (!allowed) return false;