refactor(agent): dedupe harness and command workflows

This commit is contained in:
Peter Steinberger
2026-02-16 14:52:09 +00:00
parent 04892ee230
commit f717a13039
204 changed files with 7366 additions and 11540 deletions

View File

@@ -1,5 +1,6 @@
import type { OpenClawConfig } from "../config/config.js";
import { OPENCODE_ZEN_DEFAULT_MODEL_REF } from "../agents/opencode-zen-models.js";
import { applyAgentDefaultModelPrimary } from "./onboard-auth.config-shared.js";
export function applyOpencodeZenProviderConfig(cfg: OpenClawConfig): OpenClawConfig {
// Use the built-in opencode provider from pi-ai; only seed the allowlist alias.
@@ -23,22 +24,5 @@ export function applyOpencodeZenProviderConfig(cfg: OpenClawConfig): OpenClawCon
export function applyOpencodeZenConfig(cfg: OpenClawConfig): OpenClawConfig {
const next = applyOpencodeZenProviderConfig(cfg);
return {
...next,
agents: {
...next.agents,
defaults: {
...next.agents?.defaults,
model: {
...(next.agents?.defaults?.model &&
"fallbacks" in (next.agents.defaults.model as Record<string, unknown>)
? {
fallbacks: (next.agents.defaults.model as { fallbacks?: string[] }).fallbacks,
}
: undefined),
primary: OPENCODE_ZEN_DEFAULT_MODEL_REF,
},
},
},
};
return applyAgentDefaultModelPrimary(next, OPENCODE_ZEN_DEFAULT_MODEL_REF);
}