import { describe, expect, it } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; import { isUpdatePlanToolEnabledForOpenClawTools } from "./openclaw-tools.registration.js"; import { createUpdatePlanTool } from "./tools/update-plan-tool.js";
type UpdatePlanGatingParams = Parameters<typeof isUpdatePlanToolEnabledForOpenClawTools>[0];
function expectUpdatePlanEnabled(params: UpdatePlanGatingParams, expected: boolean): void {
expect(isUpdatePlanToolEnabledForOpenClawTools(params)).toBe(expected);
}
function openAiGpt5Params(
config: OpenClawConfig,
overrides: Partial<UpdatePlanGatingParams> = {},
): UpdatePlanGatingParams { const params: UpdatePlanGatingParams = {
config,
agentSessionKey: "agent:main:main",
modelProvider: "openai",
modelId: "gpt-5.4",
...overrides,
}; if ("agentId" in overrides && !("agentSessionKey" in overrides)) { delete params.agentSessionKey;
} return params;
}
expectUpdatePlanEnabled({ config }, true);
expect(createUpdatePlanTool().displaySummary).toBe("Track a short structured work plan.");
});
it("auto-enables update_plan for unconfigured GPT-5 openai runs", () => { // Criterion 1 of the GPT-5.4 parity gate ("no stalls after planning") is // universal, not opt-in. Unspecified executionContract on a supported // provider/model auto-activates strict-agentic so unconfigured installs // get the same behavior as explicit opt-in. Explicit "default" still // opts out (see "respects explicit default contract opt-out" below). const cfg = {
agents: {
list: [{ id: "main" }],
},
} as OpenClawConfig;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.