fix(boundary): restore compile and dm policy type paths

This commit is contained in:
Peter Steinberger
2026-04-07 13:28:49 +01:00
parent 59aea1e74d
commit 4ede1e4e3a
3 changed files with 18 additions and 6 deletions

View File

@@ -6,7 +6,14 @@ import {
resolveServicePrefixedAllowTarget,
resolveServicePrefixedTarget,
} from "openclaw/plugin-sdk/channel-targets";
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
function normalizeOptionalString(value: unknown): string | undefined {
if (typeof value !== "string") {
return undefined;
}
const trimmed = value.trim();
return trimmed || undefined;
}
export type BlueBubblesService = "imessage" | "sms" | "auto";

View File

@@ -16,6 +16,7 @@ import { resolveMemorySearchConfig } from "../agents/memory-search.js";
import { loadModelCatalog } from "../agents/model-catalog.js";
import { modelsAuthLoginCommand, modelsStatusCommand } from "../commands/models.js";
import { loadConfig } from "../config/config.js";
import { resolveAgentModelPrimaryValue } from "../config/model-input.js";
import { callGateway, randomIdempotencyKey } from "../gateway/call.js";
import { buildGatewayConnectionDetailsWithResolvers } from "../gateway/connection-details.js";
import { isLoopbackHost } from "../gateway/net.js";
@@ -581,7 +582,7 @@ async function buildModelProviders() {
const cfg = loadConfig();
const catalog = await loadModelCatalog({ config: cfg });
const selectedProvider = resolveSelectedProviderFromModelRef(
cfg.agents?.defaults?.model?.primary,
resolveAgentModelPrimaryValue(cfg.agents?.defaults?.model),
);
const grouped = new Map<
string,
@@ -619,7 +620,7 @@ async function runModelAuthStatus() {
{
log: (...args) => captured.push(args.join(" ")),
error: (message) => {
throw new Error(message);
throw message instanceof Error ? message : new Error(String(message));
},
exit: (code) => {
throw new Error(`exit ${code}`);
@@ -715,7 +716,7 @@ async function runImageGenerate(params: {
outputCount: result.images.length,
subdir: "generated",
});
const metadata = await getImageMetadata(written.path).catch(() => undefined);
const metadata = await getImageMetadata(image.buffer).catch(() => undefined);
return {
...written,
width: metadata?.width,
@@ -1392,7 +1393,7 @@ export function registerCapabilityCli(program: Command) {
await runCommandWithRuntime(defaultRuntime, async () => {
const cfg = loadConfig();
const selectedProvider = resolveSelectedProviderFromModelRef(
cfg.agents?.defaults?.imageGenerationModel?.primary,
resolveAgentModelPrimaryValue(cfg.agents?.defaults?.imageGenerationModel),
);
const result = listRuntimeImageGenerationProviders({ config: cfg }).map((provider) => ({
available: true,
@@ -1645,7 +1646,7 @@ export function registerCapabilityCli(program: Command) {
await runCommandWithRuntime(defaultRuntime, async () => {
const cfg = loadConfig();
const selectedGenerationProvider = resolveSelectedProviderFromModelRef(
cfg.agents?.defaults?.videoGenerationModel?.primary,
resolveAgentModelPrimaryValue(cfg.agents?.defaults?.videoGenerationModel),
);
const result = {
generation: listRuntimeVideoGenerationProviders({ config: cfg }).map((provider) => ({

View File

@@ -41,6 +41,10 @@ export function resolveWebFetchEnabled(params: {
return true;
}
function resolveFetchConfig(config: OpenClawConfig | undefined): WebFetchConfig | undefined {
return resolveWebProviderConfig<"fetch", NonNullable<WebFetchConfig>>(config, "fetch");
}
function hasEntryCredential(
provider: Pick<
PluginWebFetchProviderEntry,