惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
雷峰网
雷峰网
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
P
Proofpoint News Feed
The Cloudflare Blog
D
Docker
大猫的无限游戏
大猫的无限游戏

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(qr): replace qrcode-terminal with qrcode-tui · opencl...
vincentkoc · 2026-04-24 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai

1010
1111

### Fixes

1212
13+

- Plugins/QR: replace legacy `qrcode-terminal` QR rendering with bounded `qrcode-tui` helpers for plugin login/setup flows. (#65969) Thanks @vincentkoc.

1314

- Auto-reply/system events: route async exec-event completion replies through the persisted session delivery context, so long-running command results return to the originating channel instead of being dropped when live origin metadata is missing. (#70258) Thanks @wzfukui.

1415

- OpenAI/image generation: send reference-image edits as guarded multipart uploads instead of JSON data URLs, restoring complex multi-reference `gpt-image-2` edits. Fixes #70642. Thanks @dashhuang.

1516

- QA channel/security: reject non-HTTP(S) inbound attachment URLs before media fetch, and log rejected schemes so suspicious or misconfigured payloads are visible during debugging. (#70708) Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -16,7 +16,7 @@ Feishu/Lark is an all-in-one collaboration platform where teams chat, share docu

1616
1717

## Quick start

1818
19-

> **Requires OpenClaw 2026.4.10 or above.** Run `openclaw --version` to check. Upgrade with `openclaw update`.

19+

> **Requires OpenClaw 2026.4.23 or above.** Run `openclaw --version` to check. Upgrade with `openclaw update`.

2020
2121

<Steps>

2222

<Step title="Run the channel setup wizard">

Original file line numberDiff line numberDiff line change

@@ -258,6 +258,11 @@ const kind = api.runtime.media.mediaKindFromMime("image/jpeg"); // "image"

258258

const isVoice = api.runtime.media.isVoiceCompatibleAudio(filePath);

259259

const metadata = await api.runtime.media.getImageMetadata(filePath);

260260

const resized = await api.runtime.media.resizeToJpeg(buffer, { maxWidth: 800 });

261+

const terminalQr = await api.runtime.media.renderQrTerminal("https://openclaw.ai");

262+

const pngQr = await api.runtime.media.renderQrPngBase64("https://openclaw.ai", {

263+

scale: 6, // 1-12

264+

marginModules: 4, // 0-16

265+

});

261266

```

262267
263268

### `api.runtime.config`

Original file line numberDiff line numberDiff line change

@@ -124,7 +124,7 @@ This script drives the interactive wizard via a pseudo-tty, verifies config/work

124124
125125

## QR import smoke (Docker)

126126
127-

Ensures `qrcode-terminal` loads under the supported Docker Node runtimes (Node 24 default, Node 22 compatible):

127+

Ensures the maintained QR runtime helper loads under the supported Docker Node runtimes (Node 24 default, Node 22 compatible):

128128
129129

```bash

130130

pnpm test:docker:qr

Original file line numberDiff line numberDiff line change

@@ -5,15 +5,14 @@

55

"type": "module",

66

"dependencies": {

77

"@larksuiteoapi/node-sdk": "^1.61.1",

8-

"qrcode-terminal": "^0.12.0",

98

"typebox": "1.1.28"

109

},

1110

"devDependencies": {

1211

"@openclaw/plugin-sdk": "workspace:*",

1312

"openclaw": "workspace:*"

1413

},

1514

"peerDependencies": {

16-

"openclaw": ">=2026.4.20"

15+

"openclaw": ">=2026.4.23"

1716

},

1817

"peerDependenciesMeta": {

1918

"openclaw": {

@@ -41,10 +40,10 @@

4140

"install": {

4241

"npmSpec": "@openclaw/feishu",

4342

"defaultChoice": "npm",

44-

"minHostVersion": ">=2026.4.10"

43+

"minHostVersion": ">=2026.4.23"

4544

},

4645

"compat": {

47-

"pluginApi": ">=2026.4.20"

46+

"pluginApi": ">=2026.4.23"

4847

},

4948

"build": {

5049

"openclawVersion": "2026.4.20"

Original file line numberDiff line numberDiff line change

@@ -5,8 +5,8 @@

55

* Replaces axios with native fetch, removes inquirer/ora/chalk in favor of

66

* the openclaw WizardPrompter surface.

77

*/

8-
98

import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";

9+

import { renderQrTerminal } from "./qr-terminal.js";

1010

import type { FeishuDomain } from "./types.js";

1111
1212

// ---------------------------------------------------------------------------

@@ -252,9 +252,8 @@ export async function pollAppRegistration(params: {

252252

* otherwise the pattern is corrupted and cannot be scanned.

253253

*/

254254

export async function printQrCode(url: string): Promise<void> {

255-

const mod = await import("qrcode-terminal");

256-

const qrcode = mod.default ?? mod;

257-

qrcode.generate(url, { small: true });

255+

const output = await renderQrTerminal(url, { small: true });

256+

process.stdout.write(output.endsWith("\n") ? output : `${output}\n`);

258257

}

259258
260259

/**

Original file line numberDiff line numberDiff line change

@@ -0,0 +1 @@

1+

export { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime";

Original file line numberDiff line numberDiff line change

@@ -6,7 +6,6 @@

66

"dependencies": {

77

"@whiskeysockets/baileys": "7.0.0-rc.9",

88

"jimp": "^1.6.1",

9-

"qrcode-terminal": "^0.12.0",

109

"typebox": "1.1.28",

1110

"undici": "8.1.0"

1211

},

@@ -15,7 +14,7 @@

1514

"openclaw": "workspace:*"

1615

},

1716

"peerDependencies": {

18-

"openclaw": ">=2026.4.20"

17+

"openclaw": ">=2026.4.23"

1918

},

2019

"peerDependenciesMeta": {

2120

"openclaw": {

@@ -54,10 +53,10 @@

5453

"install": {

5554

"npmSpec": "@openclaw/whatsapp",

5655

"defaultChoice": "npm",

57-

"minHostVersion": ">=2026.4.10"

56+

"minHostVersion": ">=2026.4.23"

5857

},

5958

"compat": {

60-

"pluginApi": ">=2026.4.20"

59+

"pluginApi": ">=2026.4.23"

6160

},

6261

"bundle": {

6362

"stageRuntimeDependencies": true

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,4 @@

11

import { EventEmitter } from "node:events";

2-

import { readFile } from "node:fs/promises";

3-

import { resolve } from "node:path";

42

import { resetLogger, setLoggerOverride } from "openclaw/plugin-sdk/runtime-env";

53

import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";

64

import { renderQrPngBase64 } from "./qr-image.js";

@@ -88,13 +86,4 @@ describe("renderQrPngBase64", () => {

8886

const buf = Buffer.from(b64, "base64");

8987

expect(buf.subarray(0, 8).toString("hex")).toBe("89504e470d0a1a0a");

9088

});

91-
92-

it("avoids dynamic require of qrcode-terminal vendor modules", async () => {

93-

const sourcePath = resolve(process.cwd(), "src/media/qr-image.ts");

94-

const source = await readFile(sourcePath, "utf-8");

95-

expect(source).not.toContain("createRequire(");

96-

expect(source).not.toContain('require("qrcode-terminal/vendor/QRCode")');

97-

expect(source).toContain("qrcode-terminal/vendor/QRCode/index.js");

98-

expect(source).toContain("qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js");

99-

});

10089

});