feat(config): 实现有状态与无状态 (stateful/stateless) 运行模式无缝切换与企业解析

This commit is contained in:
gitea committed 2026-08-27 10:59:08 +08:00
1 parent e7aa8a86cc
commit 189415cdac
6 files changed
+293 -16

No files matched your search

+12 -1
View File
@@ -4,6 +4,7 @@ import { printHelp, printJson } from "./printer.js";
import { initCorpRuntime } from "./helpers.js";
import { handleAuthCommand } from "./commands/auth.js";
import { handleCorpsCommand } from "./commands/corps.js";
import { handleConfigCommand } from "./commands/config.js";
import { handleWorkflowCommand } from "./commands/workflow.js";
import { handlePlatformCommand } from "./commands/platform.js";
import { handleProbeCommand } from "./commands/probe.js";
@@ -26,8 +27,15 @@ export async function runCli(
const jsonMode = booleanOption(parsed.options, ["json", "j"]);
const corpIdOption = stringOption(parsed.options, ["corp", "c"]);
const statelessOption = booleanOption(parsed.options, ["stateless"]);
const statefulOption = booleanOption(parsed.options, ["stateful"]);
const runtime = initCorpRuntime(corpIdOption, jsonMode);
const runtime = initCorpRuntime({
corpId: corpIdOption,
stateless: statelessOption,
stateful: statefulOption,
jsonMode,
});
try {
switch (parsed.area) {
@@ -37,6 +45,9 @@ export async function runCli(
case "corps":
case "corp":
return await handleCorpsCommand(parsed, runtime);
case "config":
case "mode":
return await handleConfigCommand(parsed, runtime);
case "workflow":
case "workflows":
case "wf":