feat(onboarding)!: default tools profile to messaging

This commit is contained in:
Peter Steinberger
2026-03-02 18:12:03 +00:00
parent 9b8e642475
commit 16df7ef4a9
4 changed files with 22 additions and 0 deletions

View File

@@ -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(...)`.

View File

@@ -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");
});
});

View File

@@ -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,
},
};
}

View File

@@ -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);
});