From 16df7ef4a973c86339774dcd9c851c3210cd0ff2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 2 Mar 2026 18:12:03 +0000 Subject: [PATCH] feat(onboarding)!: default tools profile to messaging --- CHANGELOG.md | 1 + src/commands/onboard-config.test.ts | 13 +++++++++++++ src/commands/onboard-config.ts | 6 ++++++ .../onboard-non-interactive.gateway.test.ts | 2 ++ 4 files changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 025305b34..616b5d7e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Docs: https://docs.openclaw.ai ### Breaking - **BREAKING:** Zalo Personal plugin (`@openclaw/zalouser`) no longer depends on external `zca`-compatible CLI binaries (`openzca`, `zca-cli`) for runtime send/listen/login; operators should use `openclaw channels login --channel zalouser` after upgrade to refresh sessions in the new JS-native path. +- **BREAKING:** Onboarding now defaults `tools.profile` to `messaging` for new local installs (interactive + non-interactive). New setups no longer start with broad coding/system tools unless explicitly configured. - **BREAKING:** Node exec approval payloads now require `systemRunPlan`. `host=node` approval requests without that plan are rejected. - **BREAKING:** Node `system.run` execution now pins path-token commands to the canonical executable path (`realpath`) in both allowlist and approval execution flows. Integrations/tests that asserted token-form argv (for example `tr`) must now accept canonical paths (for example `/usr/bin/tr`). - **BREAKING:** Plugin SDK removed `api.registerHttpHandler(...)`. Plugins must register explicit HTTP routes via `api.registerHttpRoute({ path, auth, match, handler })`, and dynamic webhook lifecycles should use `registerPluginHttpRoute(...)`. diff --git a/src/commands/onboard-config.test.ts b/src/commands/onboard-config.test.ts index ac98bdc4f..076f98a02 100644 --- a/src/commands/onboard-config.test.ts +++ b/src/commands/onboard-config.test.ts @@ -3,6 +3,7 @@ import type { OpenClawConfig } from "../config/config.js"; import { applyOnboardingLocalWorkspaceConfig, ONBOARDING_DEFAULT_DM_SCOPE, + ONBOARDING_DEFAULT_TOOLS_PROFILE, } from "./onboard-config.js"; describe("applyOnboardingLocalWorkspaceConfig", () => { @@ -13,6 +14,7 @@ describe("applyOnboardingLocalWorkspaceConfig", () => { expect(result.session?.dmScope).toBe(ONBOARDING_DEFAULT_DM_SCOPE); expect(result.gateway?.mode).toBe("local"); expect(result.agents?.defaults?.workspace).toBe("/tmp/workspace"); + expect(result.tools?.profile).toBe(ONBOARDING_DEFAULT_TOOLS_PROFILE); }); it("preserves existing dmScope when already configured", () => { @@ -36,4 +38,15 @@ describe("applyOnboardingLocalWorkspaceConfig", () => { expect(result.session?.dmScope).toBe("per-account-channel-peer"); }); + + it("preserves an explicit tools.profile when already configured", () => { + const baseConfig: OpenClawConfig = { + tools: { + profile: "full", + }, + }; + const result = applyOnboardingLocalWorkspaceConfig(baseConfig, "/tmp/workspace"); + + expect(result.tools?.profile).toBe("full"); + }); }); diff --git a/src/commands/onboard-config.ts b/src/commands/onboard-config.ts index 3fb6e7308..f2ae89911 100644 --- a/src/commands/onboard-config.ts +++ b/src/commands/onboard-config.ts @@ -1,7 +1,9 @@ import type { OpenClawConfig } from "../config/config.js"; import type { DmScope } from "../config/types.base.js"; +import type { ToolProfileId } from "../config/types.tools.js"; export const ONBOARDING_DEFAULT_DM_SCOPE: DmScope = "per-channel-peer"; +export const ONBOARDING_DEFAULT_TOOLS_PROFILE: ToolProfileId = "messaging"; export function applyOnboardingLocalWorkspaceConfig( baseConfig: OpenClawConfig, @@ -24,5 +26,9 @@ export function applyOnboardingLocalWorkspaceConfig( ...baseConfig.session, dmScope: baseConfig.session?.dmScope ?? ONBOARDING_DEFAULT_DM_SCOPE, }, + tools: { + ...baseConfig.tools, + profile: baseConfig.tools?.profile ?? ONBOARDING_DEFAULT_TOOLS_PROFILE, + }, }; } diff --git a/src/commands/onboard-non-interactive.gateway.test.ts b/src/commands/onboard-non-interactive.gateway.test.ts index 5709c41ec..eaf6b2f7a 100644 --- a/src/commands/onboard-non-interactive.gateway.test.ts +++ b/src/commands/onboard-non-interactive.gateway.test.ts @@ -141,9 +141,11 @@ describe("onboard (non-interactive): gateway and remote auth", () => { const cfg = await readJsonFile<{ gateway?: { auth?: { mode?: string; token?: string } }; agents?: { defaults?: { workspace?: string } }; + tools?: { profile?: string }; }>(configPath); expect(cfg?.agents?.defaults?.workspace).toBe(workspace); + expect(cfg?.tools?.profile).toBe("messaging"); expect(cfg?.gateway?.auth?.mode).toBe("token"); expect(cfg?.gateway?.auth?.token).toBe(token); });