





















@@ -50,6 +50,37 @@ describe("command-execution-startup", () => {
5050});
5151});
525253+it("skips local plugin bootstrap for JSON gateway agent calls", () => {
54+expect(
55+mod.resolveCliExecutionStartupContext({
56+argv: ["node", "openclaw", "agent", "--agent", "main", "--message", "hi", "--json"],
57+jsonOutputMode: true,
58+}).startupPolicy.loadPlugins,
59+).toBe(false);
60+expect(
61+mod.resolveCliExecutionStartupContext({
62+argv: [
63+"node",
64+"openclaw",
65+"agent",
66+"--agent",
67+"main",
68+"--message",
69+"hi",
70+"--json",
71+"--local",
72+],
73+jsonOutputMode: true,
74+}).startupPolicy.loadPlugins,
75+).toBe(true);
76+expect(
77+mod.resolveCliExecutionStartupContext({
78+argv: ["node", "openclaw", "agent", "--agent", "main", "--message", "hi"],
79+jsonOutputMode: false,
80+}).startupPolicy.loadPlugins,
81+).toBe(true);
82+});
83+5384it("routes logs to stderr and emits banner only when allowed", async () => {
5485await mod.applyCliExecutionStartupPresentation({
5586startupPolicy: {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。