feat: add skill health size check

This commit is contained in:
Codex
2026-06-26 07:52:14 +00:00
parent 6b689d9395
commit 6535e6d6a6
22 changed files with 2849 additions and 2280 deletions
+19
View File
@@ -25,6 +25,7 @@ import { isGhContentRoute, runGhContentRoute } from "./src/gh-route";
import { runGitToolsCommand } from "./src/git-tools";
import { runCommanderCommand } from "./src/commander";
import { isHelpToken, rootHelp, serverHelp, sshHelp, staticNamespaceHelp } from "./src/help";
import { healthHelp, runHealthCommand } from "./src/health";
import { runServerCleanupCommand } from "./src/server-cleanup";
import { runGcCommand } from "./src/gc";
import { runPlatformDbCommand } from "./src/platform-db";
@@ -245,6 +246,11 @@ async function main(): Promise<void> {
return;
}
if (top === "health" && isHelpToken(sub)) {
emitJson(commandName, healthHelp());
return;
}
if (top === "server" && (isHelpToken(sub) || args.slice(2).some(isHelpToken))) {
emitJson(commandName, serverHelp(isHelpToken(sub) ? undefined : sub));
return;
@@ -415,6 +421,19 @@ async function main(): Promise<void> {
return;
}
if (top === "health") {
const result = runHealthCommand(args.slice(1));
const ok = (result as { ok?: unknown }).ok !== false;
if (isRenderedCliResult(result)) {
emitText(result.renderedText, result.command || commandName);
if (!ok) process.exitCode = 1;
return;
}
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;
}
const config = readConfig();
const autoRemoteCiPublishPlan = autoRemoteCiPublishUserServiceDryRunPlan(config, args);
if (autoRemoteCiPublishPlan.enabled && autoRemoteCiPublishPlan.host !== null) {