From 4c160d2c3ad98a63531a644712afff69471e71bd Mon Sep 17 00:00:00 2001 From: scoootscooob Date: Tue, 17 Mar 2026 22:12:37 -0700 Subject: [PATCH 1/2] Signal: fix account config type import (#49470) Merged via squash. Prepared head SHA: fab2ef4c1f8fa4922bcf76fc34f04ad5786c56e4 Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com> Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com> Reviewed-by: @scoootscooob --- CHANGELOG.md | 1 + extensions/signal/runtime-api.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4a3b156ba..23f05fcaac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,6 +141,7 @@ Docs: https://docs.openclaw.ai - Secrets/exec refs: require explicit `--allow-exec` for `secrets apply` write plans that contain exec SecretRefs/providers, and align audit/configure/apply dry-run behavior to skip exec checks unless opted in to prevent unexpected command side effects. (#49417) Thanks @restriction and @joshavant. - Tools/image generation: add bundled fal image generation support so `image_generate` can target `fal/*` models with `FAL_KEY`, including single-image edit flows via FLUX image-to-image. Thanks @vincentkoc. - xAI/web search: add missing Grok credential metadata so the bundled provider registration type-checks again. (#49472) thanks @scoootscooob. +- Signal/runtime API: re-export `SignalAccountConfig` so Signal account resolution type-checks again. (#49470) Thanks @scoootscooob. ### Breaking diff --git a/extensions/signal/runtime-api.ts b/extensions/signal/runtime-api.ts index e258df15c9c..52ebf7ff363 100644 --- a/extensions/signal/runtime-api.ts +++ b/extensions/signal/runtime-api.ts @@ -1 +1,2 @@ export * from "./src/index.js"; +export type { SignalAccountConfig } from "../../src/config/types.signal.js"; From 4ca87fa4b0c606eee5b247bd3f7525f23c3ea17b Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Tue, 17 Mar 2026 22:14:56 -0700 Subject: [PATCH 2/2] fix: restore main build (#49478) * Build: restore main build * Config: align model compat schema --- extensions/signal/src/accounts.ts | 2 +- extensions/xai/web-search.ts | 7 ++++--- src/config/types.models.ts | 27 ++++++++++++++++----------- src/config/zod-schema.core.ts | 23 ++++++++++++++++++++++- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/extensions/signal/src/accounts.ts b/extensions/signal/src/accounts.ts index f167654ef3f..2cc323dd33d 100644 --- a/extensions/signal/src/accounts.ts +++ b/extensions/signal/src/accounts.ts @@ -4,7 +4,7 @@ import { resolveAccountEntry, type OpenClawConfig, } from "openclaw/plugin-sdk/account-resolution"; -import type { SignalAccountConfig } from "../runtime-api.js"; +import type { SignalAccountConfig } from "../../../src/config/types.signal.js"; export type ResolvedSignalAccount = { accountId: string; diff --git a/extensions/xai/web-search.ts b/extensions/xai/web-search.ts index ec69073e359..d1e3a03eb82 100644 --- a/extensions/xai/web-search.ts +++ b/extensions/xai/web-search.ts @@ -14,6 +14,7 @@ import { wrapWebContent, writeCache, } from "openclaw/plugin-sdk/provider-web-search"; +import type { WebSearchProviderPlugin } from "../../src/plugins/types.js"; const XAI_WEB_SEARCH_ENDPOINT = "https://api.x.ai/v1/responses"; const XAI_DEFAULT_WEB_SEARCH_MODEL = "grok-4-1-fast"; @@ -200,7 +201,7 @@ async function runXaiWebSearch(params: { return payload; } -export function createXaiWebSearchProvider() { +export function createXaiWebSearchProvider(): WebSearchProviderPlugin { return { id: "grok", label: "Grok (xAI)", @@ -210,8 +211,8 @@ export function createXaiWebSearchProvider() { signupUrl: "https://console.x.ai/", docsUrl: "https://docs.openclaw.ai/tools/web", autoDetectOrder: 30, - credentialPath: "tools.web.search.grok.apiKey", - inactiveSecretPaths: ["tools.web.search.grok.apiKey"], + credentialPath: "plugins.entries.xai.config.webSearch.apiKey", + inactiveSecretPaths: ["plugins.entries.xai.config.webSearch.apiKey"], getCredentialValue: (searchConfig?: Record) => getScopedCredentialValue(searchConfig, "grok"), setCredentialValue: (searchConfigTarget: Record, value: unknown) => diff --git a/src/config/types.models.ts b/src/config/types.models.ts index 3c8c5debd6a..bc79f24943f 100644 --- a/src/config/types.models.ts +++ b/src/config/types.models.ts @@ -1,3 +1,4 @@ +import type { OpenAICompletionsCompat } from "@mariozechner/pi-ai"; import type { SecretInput } from "./types.secrets.js"; export const MODEL_APIS = [ @@ -13,21 +14,25 @@ export const MODEL_APIS = [ export type ModelApi = (typeof MODEL_APIS)[number]; -export type ModelCompatConfig = { - supportsStore?: boolean; - supportsDeveloperRole?: boolean; - supportsReasoningEffort?: boolean; - supportsUsageInStreaming?: boolean; +type SupportedOpenAICompatFields = Pick< + OpenAICompletionsCompat, + | "supportsStore" + | "supportsDeveloperRole" + | "supportsReasoningEffort" + | "supportsUsageInStreaming" + | "supportsStrictMode" + | "maxTokensField" + | "thinkingFormat" + | "requiresToolResultName" + | "requiresAssistantAfterToolResult" + | "requiresThinkingAsText" +>; + +export type ModelCompatConfig = SupportedOpenAICompatFields & { supportsTools?: boolean; - supportsStrictMode?: boolean; toolSchemaProfile?: "xai"; nativeWebSearchTool?: boolean; toolCallArgumentsEncoding?: "html-entities"; - maxTokensField?: "max_completion_tokens" | "max_tokens"; - thinkingFormat?: "openai" | "zai" | "qwen"; - requiresToolResultName?: boolean; - requiresAssistantAfterToolResult?: boolean; - requiresThinkingAsText?: boolean; requiresMistralToolIds?: boolean; requiresOpenAiAnthropicToolPayload?: boolean; }; diff --git a/src/config/zod-schema.core.ts b/src/config/zod-schema.core.ts index 199637bba52..22c589c8490 100644 --- a/src/config/zod-schema.core.ts +++ b/src/config/zod-schema.core.ts @@ -6,6 +6,7 @@ import { isValidExecSecretRefId, isValidFileSecretRefId, } from "../secrets/ref-contract.js"; +import type { ModelCompatConfig } from "./types.models.js"; import { MODEL_APIS } from "./types.models.js"; import { createAllowDenyChannelRulesSchema } from "./zod-schema.allowdeny.js"; import { sensitive } from "./zod-schema.sensitive.js"; @@ -191,16 +192,36 @@ export const ModelCompatSchema = z maxTokensField: z .union([z.literal("max_completion_tokens"), z.literal("max_tokens")]) .optional(), - thinkingFormat: z.union([z.literal("openai"), z.literal("zai"), z.literal("qwen")]).optional(), + thinkingFormat: z + .union([ + z.literal("openai"), + z.literal("zai"), + z.literal("qwen"), + z.literal("qwen-chat-template"), + ]) + .optional(), requiresToolResultName: z.boolean().optional(), requiresAssistantAfterToolResult: z.boolean().optional(), requiresThinkingAsText: z.boolean().optional(), + toolSchemaProfile: z.literal("xai").optional(), + nativeWebSearchTool: z.boolean().optional(), + toolCallArgumentsEncoding: z.literal("html-entities").optional(), requiresMistralToolIds: z.boolean().optional(), requiresOpenAiAnthropicToolPayload: z.boolean().optional(), }) .strict() .optional(); +type AssertAssignable<_T extends U, U> = true; +type _ModelCompatSchemaAssignableToType = AssertAssignable< + z.infer, + ModelCompatConfig | undefined +>; +type _ModelCompatTypeAssignableToSchema = AssertAssignable< + ModelCompatConfig | undefined, + z.infer +>; + export const ModelDefinitionSchema = z .object({ id: z.string().min(1),