From bb543f71d92c94e22f72ccadff1131e69b3b37c3 Mon Sep 17 00:00:00 2001 From: Gustavo Garcia Date: Sat, 11 Apr 2026 10:08:45 +0200 Subject: [PATCH] fix(talk): fix ensure permissions on first execution of Talk Mode in MacOS (#62459) * fix(talk): fix ensure permissions on first execution of Talk Mode in MacOS * macos: fix talk mode formatting * test: fix CI shard regressions * docs: add talk mode changelog --------- Co-authored-by: ImLukeF <92253590+ImLukeF@users.noreply.github.com> --- CHANGELOG.md | 1 + apps/macos/Sources/OpenClaw/TalkModeRuntime.swift | 5 +++-- extensions/memory-wiki/index.test.ts | 3 +++ src/config/config.pruning-defaults.test.ts | 8 +++----- src/infra/outbound/target-resolver.test.ts | 2 ++ 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6801a528b6..84991f0fa5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Docs: https://docs.openclaw.ai - WhatsApp: honor the configured default account when the active listener helper is used without an explicit account id, so named default accounts do not get registered under `default`. (#53918) Thanks @yhyatt. - QA/packaging: stop packaged CLI startup and completion cache generation from reading repo-only QA scenario markdown by routing QA command registration through a narrow facade. (#64648) Thanks @obviyus. - Control UI/webchat: persist agent-run TTS audio replies into webchat history before finalization so tool-generated audio reaches webchat clients again. (#63514) thanks @bittoby +- macOS/Talk Mode: after granting microphone permission on first enable, continue starting Talk Mode instead of requiring a second toggle. (#62459) Thanks @ggarber. ## 2026.4.10 diff --git a/apps/macos/Sources/OpenClaw/TalkModeRuntime.swift b/apps/macos/Sources/OpenClaw/TalkModeRuntime.swift index 57cf3bb3995..bcd8057f268 100644 --- a/apps/macos/Sources/OpenClaw/TalkModeRuntime.swift +++ b/apps/macos/Sources/OpenClaw/TalkModeRuntime.swift @@ -128,8 +128,9 @@ actor TalkModeRuntime { private func start() async { let gen = self.lifecycleGeneration guard voiceWakeSupported else { return } - guard PermissionManager.voiceWakePermissionsGranted() else { - self.logger.debug("talk runtime not starting: permissions missing") + + guard await PermissionManager.ensureVoiceWakePermissions(interactive: true) else { + self.logger.error("talk runtime not starting: permissions missing") return } await self.reloadConfig() diff --git a/extensions/memory-wiki/index.test.ts b/extensions/memory-wiki/index.test.ts index 3ef8d4a7924..af2a43a1994 100644 --- a/extensions/memory-wiki/index.test.ts +++ b/extensions/memory-wiki/index.test.ts @@ -21,6 +21,9 @@ describe("memory-wiki plugin", () => { expect(registerMemoryPromptSupplement).toHaveBeenCalledTimes(1); expect(registerGatewayMethod.mock.calls.map((call) => call[0])).toEqual([ "wiki.status", + "wiki.importRuns", + "wiki.importInsights", + "wiki.palace", "wiki.init", "wiki.doctor", "wiki.compile", diff --git a/src/config/config.pruning-defaults.test.ts b/src/config/config.pruning-defaults.test.ts index 51754944845..a5c7922ff4c 100644 --- a/src/config/config.pruning-defaults.test.ts +++ b/src/config/config.pruning-defaults.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { applyConfigDefaults as applyAnthropicConfigDefaults } from "../../extensions/anthropic/provider-policy-api.js"; import type { OpenClawConfig } from "./config.js"; +import { applyProviderConfigDefaultsForConfig } from "./provider-policy.js"; function expectAnthropicPruningDefaults(cfg: OpenClawConfig, heartbeatEvery = "30m") { expect(cfg.agents?.defaults?.contextPruning?.mode).toBe("cache-ttl"); @@ -8,10 +8,8 @@ function expectAnthropicPruningDefaults(cfg: OpenClawConfig, heartbeatEvery = "3 expect(cfg.agents?.defaults?.heartbeat?.every).toBe(heartbeatEvery); } -function applyAnthropicDefaultsForTest( - config: Parameters[0]["config"], -) { - return applyAnthropicConfigDefaults({ config, env: {} }); +function applyAnthropicDefaultsForTest(config: OpenClawConfig) { + return applyProviderConfigDefaultsForConfig({ provider: "anthropic", config, env: {} }); } describe("config pruning defaults", () => { diff --git a/src/infra/outbound/target-resolver.test.ts b/src/infra/outbound/target-resolver.test.ts index ffd65a70ac0..aba06db4457 100644 --- a/src/infra/outbound/target-resolver.test.ts +++ b/src/infra/outbound/target-resolver.test.ts @@ -23,6 +23,8 @@ vi.mock("../../channels/plugins/index.js", () => ({ })); vi.mock("../../plugins/runtime.js", () => ({ + getActivePluginChannelRegistry: () => null, + getActivePluginRegistry: () => null, getActivePluginChannelRegistryVersion: () => mocks.getActivePluginChannelRegistryVersion(), }));