docs: record sub2api timeout closeout and agentrun cli updates
This commit is contained in:
+17
-10
@@ -1,7 +1,7 @@
|
||||
import { readConfig } from "./src/config";
|
||||
import { debugDispatch, debugHealth, debugTask, isDebugDispatchCommand, type DebugDispatchCommand } from "./src/debug";
|
||||
import { isRebuildableService, rebuildService, stackLogs, stackStatus, startStack, stopStack, unsupportedRebuildService } from "./src/docker";
|
||||
import { emitError, emitJson } from "./src/output";
|
||||
import { emitError, emitJson, emitText, isRenderedCliResult } from "./src/output";
|
||||
import { cancelJob, jobWithTail, listJobs, listJobsSummary, readJob, runJob } from "./src/jobs";
|
||||
import { checkHelp, parseCheckOptions, runChecks, runRecoveryGuardrailsCheck } from "./src/check";
|
||||
import { runSsh } from "./src/ssh";
|
||||
@@ -232,6 +232,22 @@ async function main(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (top === "agentrun") {
|
||||
const { runAgentRunCommand } = await import("./src/agentrun");
|
||||
const agentRunArgs = args.slice(1);
|
||||
const config = agentRunArgs.length === 0 || agentRunArgs.some(isHelpToken) ? null : readConfig();
|
||||
const result = await runAgentRunCommand(config, agentRunArgs);
|
||||
const ok = (result as { ok?: unknown }).ok !== false;
|
||||
if (isRenderedCliResult(result)) {
|
||||
emitText(result.renderedText);
|
||||
if (!ok) process.exitCode = 1;
|
||||
return;
|
||||
}
|
||||
emitJson(commandName, result, ok);
|
||||
if (!ok) process.exitCode = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
const namespaceHelp = await staticNamespaceHelp(args);
|
||||
if (namespaceHelp !== null) {
|
||||
emitJson(commandName, namespaceHelp);
|
||||
@@ -313,15 +329,6 @@ async function main(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (top === "agentrun") {
|
||||
const { runAgentRunCommand } = await import("./src/agentrun");
|
||||
const result = await runAgentRunCommand(readConfig(), args.slice(1));
|
||||
const ok = (result as { ok?: unknown }).ok !== false;
|
||||
emitJson(commandName, result, ok);
|
||||
if (!ok) process.exitCode = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (top === "platform-infra") {
|
||||
const { runPlatformInfraCommand } = await import("./src/platform-infra");
|
||||
const result = await runPlatformInfraCommand(readConfig(), args.slice(1));
|
||||
|
||||
Reference in New Issue
Block a user