feat(admin-http-rpc): allow web QR login methods (#83259)

* feat(admin-http-rpc): allow web QR login methods

* docs(changelog): note admin HTTP RPC web login methods

* test(codex): refresh prompt snapshots for code mode config

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Lior Balmas
2026-05-18 14:24:27 +03:00
committed by GitHub
parent 57c952f679
commit 81f20d8464
7 changed files with 36 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ Docs: https://docs.openclaw.ai
- Docker/Podman: add `OPENCLAW_IMAGE_APT_PACKAGES` as the runtime-neutral image build arg for extra apt packages while keeping `OPENCLAW_DOCKER_APT_PACKAGES` as a legacy fallback. (#62431) Thanks @urtabajev.
- Gateway/ACPX: attribute startup probe, config, runtime, and resource-count costs in restart traces without changing readiness behavior. (#83300) Thanks @samzong.
- Gateway: overlap startup logging and plugin-service startup with channel sidecars to reduce restart ready latency while preserving `/readyz` sidecar gating. (#83301) Thanks @samzong.
- Plugins/admin-http-rpc: allow trusted admin HTTP RPC clients to start and wait for web QR login flows. (#83259) Thanks @liorb-mountapps.
- Mac app: redesign Settings pages with consistent card layouts, cached navigation, cleaner permissions/voice/skills/cron/exec/debug panes, and steadier spacing around the native sidebar.
- Skills: rename the repo-local Codex closeout review skill and helper to `autoreview` while preserving the Codex-first fallback behavior.
- Skills: add a meme-maker skill for curated template search, local SVG/PNG rendering, Imgflip hosted rendering, and Know Your Meme provenance links.

View File

@@ -171,6 +171,7 @@ HTTP status follows the Gateway error when possible. For example, `INVALID_REQUE
- gateway: `health`, `status`, `logs.tail`, `usage.status`, `usage.cost`, `gateway.restart.request`
- config: `config.get`, `config.schema`, `config.schema.lookup`, `config.set`, `config.patch`, `config.apply`
- channels: `channels.status`, `channels.start`, `channels.stop`, `channels.logout`
- web: `web.login.start`, `web.login.wait`
- models: `models.list`, `models.authStatus`
- agents: `agents.list`, `agents.create`, `agents.update`, `agents.delete`
- approvals: `exec.approvals.get`, `exec.approvals.set`, `exec.approvals.node.get`, `exec.approvals.node.set`

View File

@@ -105,6 +105,33 @@ describe("admin-http-rpc plugin handler", () => {
});
});
it.each([
["web.login.start", { force: true, timeoutMs: 1000 }],
["web.login.wait", { timeoutMs: 1000 }],
] as const)(
"allows web QR login method %s through the authenticated plugin request scope",
async (method, params) => {
dispatchGatewayMethod.mockResolvedValueOnce({
ok: true,
payload: { status: "ok" },
});
const result = await invoke({
id: "web-login",
method,
params,
});
expect(dispatchGatewayMethod).toHaveBeenCalledWith(method, params);
expect(result.captured.statusCode).toBe(200);
expect(result.json).toEqual({
id: "web-login",
ok: true,
payload: { status: "ok" },
});
},
);
it("rejects methods outside the admin HTTP RPC allowlist", async () => {
const result = await invoke({ id: "bad", method: "sessions.send" });

View File

@@ -17,6 +17,7 @@ const ADMIN_HTTP_RPC_ALLOWED_METHOD_GROUPS = {
"config.apply",
],
channels: ["channels.status", "channels.start", "channels.stop", "channels.logout"],
web: ["web.login.start", "web.login.wait"],
models: ["models.list", "models.authStatus"],
agents: ["agents.list", "agents.create", "agents.update", "agents.delete"],
approvals: [

View File

@@ -77,7 +77,7 @@
"approvalsReviewer": "user",
"config": {
"features.code_mode": true,
"features.code_mode_only": true,
"features.code_mode_only": false,
"instructions": "OpenClaw loaded these user-editable workspace files. Treat them as project/user context. Codex loads AGENTS.md natively, so AGENTS.md is not repeated here.\n\n# Project Context\n\nThe following project context files have been loaded:\nSOUL.md: persona/tone. Follow it unless higher-priority instructions override.\n\n## /tmp/openclaw-happy-path/workspace/SOUL.md\n\n<SOUL.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/TOOLS.md\n\n<TOOLS.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/HEARTBEAT.md\n\n<HEARTBEAT.md contents will be here>"
},
"cwd": "/tmp/openclaw-happy-path/workspace",
@@ -115,7 +115,7 @@
"approvalsReviewer": "user",
"config": {
"features.code_mode": true,
"features.code_mode_only": true,
"features.code_mode_only": false,
"instructions": "OpenClaw loaded these user-editable workspace files. Treat them as project/user context. Codex loads AGENTS.md natively, so AGENTS.md is not repeated here.\n\n# Project Context\n\nThe following project context files have been loaded:\nSOUL.md: persona/tone. Follow it unless higher-priority instructions override.\n\n## /tmp/openclaw-happy-path/workspace/SOUL.md\n\n<SOUL.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/TOOLS.md\n\n<TOOLS.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/HEARTBEAT.md\n\n<HEARTBEAT.md contents will be here>"
},
"developerInstructions": "<see Reconstructed Model-Bound Prompt Layers>",

View File

@@ -77,7 +77,7 @@
"approvalsReviewer": "user",
"config": {
"features.code_mode": true,
"features.code_mode_only": true,
"features.code_mode_only": false,
"instructions": "OpenClaw loaded these user-editable workspace files. Treat them as project/user context. Codex loads AGENTS.md natively, so AGENTS.md is not repeated here.\n\n# Project Context\n\nThe following project context files have been loaded:\nSOUL.md: persona/tone. Follow it unless higher-priority instructions override.\n\n## /tmp/openclaw-happy-path/workspace/SOUL.md\n\n<SOUL.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/TOOLS.md\n\n<TOOLS.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/HEARTBEAT.md\n\n<HEARTBEAT.md contents will be here>"
},
"cwd": "/tmp/openclaw-happy-path/workspace",
@@ -115,7 +115,7 @@
"approvalsReviewer": "user",
"config": {
"features.code_mode": true,
"features.code_mode_only": true,
"features.code_mode_only": false,
"instructions": "OpenClaw loaded these user-editable workspace files. Treat them as project/user context. Codex loads AGENTS.md natively, so AGENTS.md is not repeated here.\n\n# Project Context\n\nThe following project context files have been loaded:\nSOUL.md: persona/tone. Follow it unless higher-priority instructions override.\n\n## /tmp/openclaw-happy-path/workspace/SOUL.md\n\n<SOUL.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/TOOLS.md\n\n<TOOLS.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/HEARTBEAT.md\n\n<HEARTBEAT.md contents will be here>"
},
"developerInstructions": "<see Reconstructed Model-Bound Prompt Layers>",

View File

@@ -77,7 +77,7 @@
"approvalsReviewer": "user",
"config": {
"features.code_mode": true,
"features.code_mode_only": true,
"features.code_mode_only": false,
"instructions": "OpenClaw loaded these user-editable workspace files. Treat them as project/user context. Codex loads AGENTS.md natively, so AGENTS.md is not repeated here.\n\n# Project Context\n\nThe following project context files have been loaded:\nSOUL.md: persona/tone. Follow it unless higher-priority instructions override.\n\n## /tmp/openclaw-happy-path/workspace/SOUL.md\n\n<SOUL.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/TOOLS.md\n\n<TOOLS.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/HEARTBEAT.md\n\n<HEARTBEAT.md contents will be here>"
},
"cwd": "/tmp/openclaw-happy-path/workspace",
@@ -116,7 +116,7 @@
"approvalsReviewer": "user",
"config": {
"features.code_mode": true,
"features.code_mode_only": true,
"features.code_mode_only": false,
"instructions": "OpenClaw loaded these user-editable workspace files. Treat them as project/user context. Codex loads AGENTS.md natively, so AGENTS.md is not repeated here.\n\n# Project Context\n\nThe following project context files have been loaded:\nSOUL.md: persona/tone. Follow it unless higher-priority instructions override.\n\n## /tmp/openclaw-happy-path/workspace/SOUL.md\n\n<SOUL.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/TOOLS.md\n\n<TOOLS.md contents will be here>\n\n## /tmp/openclaw-happy-path/workspace/HEARTBEAT.md\n\n<HEARTBEAT.md contents will be here>"
},
"developerInstructions": "<see Reconstructed Model-Bound Prompt Layers>",