fix: make gateway token recovery usable from macOS onboarding (#118051)

* fix(gateway): add safe token recovery

Co-authored-by: 宇宙熊Yzx <53250620+849261680@users.noreply.github.com>

* chore: move gateway release note to PR

* test(cli): classify gateway token output

---------

Co-authored-by: 宇宙熊Yzx <53250620+849261680@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-08-02 10:06:50 -07:00
committed by GitHub
parent e47f9ba075
commit ad53d4419e
19 changed files with 383 additions and 41 deletions
+18
View File
@@ -1277,6 +1277,24 @@ describe("config cli", () => {
expect(mockWriteStdout).toHaveBeenCalledWith("__OPENCLAW_REDACTED__\n");
});
it("redacts sensitive values in JSON output", async () => {
const resolved: OpenClawConfig = {
gateway: {
auth: {
token: "super-secret-token",
},
},
};
setSnapshot(resolved, resolved);
await runConfigCommand(["config", "get", "gateway.auth.token", "--json"]);
expect(parseLastLogPayload()).toBe("__OPENCLAW_REDACTED__");
expect(mockWriteStdout).not.toHaveBeenCalledWith(
expect.stringContaining("super-secret-token"),
);
});
it("prints materialized subagent archive default", async () => {
const resolved: OpenClawConfig = {};
const config: OpenClawConfig = {