fix: 降级 D601 host compose status 入口

This commit is contained in:
AgentRun Artificer
2026-06-10 19:42:49 +00:00
parent 9e2dd375d7
commit 4fe6008ff0
4 changed files with 237 additions and 24 deletions
+89 -20
View File
@@ -595,6 +595,90 @@ function artifactRegistryHelp(): unknown {
};
}
function agentRunHelpSummary(): unknown {
return {
command: "agentrun v01 aipod-specs|queue|sessions|control-plane|git-mirror",
output: "json",
usage: [
"bun scripts/cli.ts agentrun v01 aipod-specs show Artificer",
"bun scripts/cli.ts agentrun v01 queue commander --reader-id cli",
"bun scripts/cli.ts agentrun v01 sessions trace <sessionId> --after-seq 0 --limit 100",
"bun scripts/cli.ts agentrun v01 control-plane status",
],
description: "Operate AgentRun v0.1 AipodSpec, queue, sessions, and G14 control-plane entrypoints.",
};
}
function platformInfraHelpSummary(): unknown {
return {
command: "platform-infra sub2api plan|apply|status|validate|codex-pool",
output: "json",
usage: [
"bun scripts/cli.ts platform-infra sub2api plan",
"bun scripts/cli.ts platform-infra sub2api status [--full|--raw]",
"bun scripts/cli.ts platform-infra sub2api codex-pool validate",
],
description: "Operate G14 platform-infra services such as Sub2API and the YAML-controlled Codex pool.",
};
}
function hwlabNodeHelpSummary(): unknown {
return {
command: "hwlab nodes control-plane|git-mirror|secret --node <node> --lane <lane>",
output: "json",
usage: [
"bun scripts/cli.ts hwlab nodes control-plane status --node G14 --lane v03",
"bun scripts/cli.ts hwlab nodes git-mirror status --node G14 --lane v03",
"bun scripts/cli.ts hwlab nodes secret status --node G14 --lane v03 --name <secret>",
],
description: "Operate HWLAB node/lane runtime prerequisites with node and lane passed as data.",
};
}
function hwlabG14HelpSummary(): unknown {
return {
command: "hwlab g14 monitor-prs|control-plane|git-mirror|tools-image|retirement",
output: "json",
usage: [
"bun scripts/cli.ts hwlab g14 control-plane status --lane v02",
"bun scripts/cli.ts hwlab g14 trigger-current --lane v02 --dry-run",
"bun scripts/cli.ts hwlab g14 monitor-prs --status",
],
description: "Operate the G14 HWLAB runtime lane control-plane and legacy retirement helpers.",
};
}
function hwlabHelpSummary(): unknown {
return {
command: "hwlab g14|nodes|cd",
output: "json",
usage: [
"bun scripts/cli.ts hwlab g14 control-plane status --lane v02",
"bun scripts/cli.ts hwlab nodes control-plane status --node G14 --lane v03",
"bun scripts/cli.ts hwlab cd audit --env dev",
],
description: "HWLAB operations. Current runtime work uses G14 lane commands; D601 cd is legacy diagnostics only.",
};
}
function helpFallback(help: unknown, error: unknown): unknown {
if (typeof help !== "object" || help === null || Array.isArray(help)) return help;
return {
...help,
degraded: true,
degradedReason: "help-module-load-failed",
error: error instanceof Error ? error.message : String(error),
};
}
async function loadHelp(loader: () => Promise<unknown>, fallback: unknown): Promise<unknown> {
try {
return await loader();
} catch (error) {
return helpFallback(fallback, error);
}
}
export async function staticNamespaceHelp(args: string[]): Promise<unknown | null> {
const [top, sub] = args;
if (!args.slice(1).some(isHelpToken)) return null;
@@ -614,25 +698,10 @@ export async function staticNamespaceHelp(args: string[]): Promise<unknown | nul
if (top === "artifact-registry") return artifactRegistryHelp();
if (top === "auth-broker") return authBrokerHelp();
if (top === "gh") return ghHelp();
if (top === "agentrun") {
const { agentRunHelp } = await import("./agentrun");
return agentRunHelp();
}
if (top === "platform-infra") {
const { platformInfraHelp } = await import("./platform-infra");
return platformInfraHelp();
}
if (top === "hwlab" && (sub === "node" || sub === "nodes")) {
const { hwlabNodeHelp } = await import("./hwlab-node");
return hwlabNodeHelp();
}
if (top === "hwlab" && sub === "g14") {
const { hwlabG14Help } = await import("./hwlab-g14");
return hwlabG14Help();
}
if (top === "hwlab") {
const { hwlabHelp } = await import("./hwlab-cd");
return hwlabHelp();
}
if (top === "agentrun") return loadHelp(async () => (await import("./agentrun")).agentRunHelp(), agentRunHelpSummary());
if (top === "platform-infra") return loadHelp(async () => (await import("./platform-infra")).platformInfraHelp(), platformInfraHelpSummary());
if (top === "hwlab" && (sub === "node" || sub === "nodes")) return loadHelp(async () => (await import("./hwlab-node")).hwlabNodeHelp(), hwlabNodeHelpSummary());
if (top === "hwlab" && sub === "g14") return loadHelp(async () => (await import("./hwlab-g14")).hwlabG14Help(), hwlabG14HelpSummary());
if (top === "hwlab") return loadHelp(async () => (await import("./hwlab-cd")).hwlabHelp(), hwlabHelpSummary());
return null;
}