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

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

Recent Commits to openclaw:main

perf(secrets): propagate snapshots and eliminate esm side-effects in … test: stabilize main ci lanes · openclaw/openclaw@f327df8 perf(gateway): keep agent session working store active-only · openclaw/openclaw@54eca3f test(e2e): harden shell helper env assertions · openclaw/openclaw@e6937f9 fix(doctor): warn on unsupported active tool schemas · openclaw/openclaw@4976851 test: fix main ci expectations · openclaw/openclaw@3684696 perf(gateway): borrow agent session lookup safely · openclaw/openclaw@3b9fa16 fix(crabbox): prefer Azure for Windows targets (#87186) · openclaw/openclaw@6afe3e8 test(e2e): isolate shell helper env · openclaw/openclaw@b28f9e0 fix(e2e): bound MCP channel connect · openclaw/openclaw@aa40174 perf(gateway): borrow read-only session metadata · openclaw/openclaw@8c8162f fix(gateway): persist model auth profile suffixes · openclaw/openclaw@152f68d fix(googlechat): suppress thread sends in DMs · openclaw/openclaw@da822dd Fix embedded session file ownership race (#87159) · openclaw/openclaw@3349fe2 ci(ui): refresh raw copy baseline · openclaw/openclaw@ebe09be fix(pi-embedded): route Codex OAuth compaction through OpenAI-Codex · openclaw/openclaw@1710dac fix(commands): enforce /allowlist configWrites origin policy · openclaw/openclaw@ce64d74 fix(plugin-sdk): stop exporting vitest test helpers (#87120) · openclaw/openclaw@780bc79 perf(gateway): borrow session reads on turn hot paths · openclaw/openclaw@9c2a6a8 fix(reply): keep visible turn admission unbounded (#87044) · openclaw/openclaw@455d5e8 fix(e2e): bound Telegram proof Bot API calls · openclaw/openclaw@4b40197 fix(agents): quarantine unsupported tool schemas · openclaw/openclaw@8c644ee test(core): isolate provider and approval tests · openclaw/openclaw@e7214ef fix(agents): preserve sessions fallback errors · openclaw/openclaw@7986917 fix(prompt): route untrusted group prompts outside system prompt [AI]… · openclaw/openclaw@2c88547 feat: expose plugin approval action metadata · openclaw/openclaw@0c867ee docs(changelog): refresh 2026.5.26 notes · openclaw/openclaw@e74a039 fix: bind plugin command llm auth to host agent · openclaw/openclaw@b9f6abf fix(e2e): bound kitchen sink RPC probes · openclaw/openclaw@96bd939 ci: support native Windows Crabbox daemon hydration (#87175) · openclaw/openclaw@95c8fc9 fix: handle sessions_send active fallback failures (#86638) · openclaw/openclaw@81e7e8e fix(gateway): enable default auth rate limiting (#87148) · openclaw/openclaw@ae972fe test(media): isolate generation provider registry mocks (#87173) · openclaw/openclaw@9772cf2 perf(gateway): skip lifecycle session cache clone · openclaw/openclaw@0762aca fix(e2e): backstop Parallels update jobs · openclaw/openclaw@fdf58c1 fix(daemon): keep Windows Scheduled Task running on battery power (#5… · openclaw/openclaw@d92a333 fix(daemon): avoid workgroup schtasks user prompts · openclaw/openclaw@f348284 perf(gateway): avoid cloning live switch store reads · openclaw/openclaw@b75f70b fix(crabbox): use host-visible local work roots · openclaw/openclaw@586a6ce docs(changelog): refresh 2026.5.26 notes · openclaw/openclaw@15c0dfa fix(exec): hide unavailable durable approval actions (#86359) · openclaw/openclaw@42f0822 fix(reply): derive explicit control command turns · openclaw/openclaw@2899560 fix(e2e): check onboarding systemd noise · openclaw/openclaw@44c1cc8 test(agents): cover cold default model alias resolution · openclaw/openclaw@2e3b4b5 fix: keep plugin runtime fallback on startup root · openclaw/openclaw@2b9be22 fix: expand startup argv runtime fallback hints · openclaw/openclaw@e71b6f7 test: cover plugin runtime diagnostic context · openclaw/openclaw@78b2aee Fix runtime fallback startup argv default · openclaw/openclaw@66a8262 fix: prefer trusted argv runtime fallback roots · openclaw/openclaw@5371b96 Fix plugin runtime module resolution diagnostics · openclaw/openclaw@41fa603 fix(ui): show config open failure feedback (#87108) · openclaw/openclaw@8246e91 fix(e2e): bound Telegram RTT bot API calls · openclaw/openclaw@5981822 fix(install): bound finalization probes (#86997) · openclaw/openclaw@bf1a5c3 fix(memory): reject prompt-like memory stores (#87142) · openclaw/openclaw@119d235 fix(e2e): bound release user journey fixture probes · openclaw/openclaw@6b68d05 fix(e2e): bound bundled runtime HTTP probes · openclaw/openclaw@d886816 perf(gateway): skip duplicate turn session touch · openclaw/openclaw@8fa4fad test: avoid repeated module reloads in unit tests · openclaw/openclaw@1c8a112 fix(media): keep explicit workspace roots scoped · openclaw/openclaw@608fa52 fix(e2e): bound bundled runtime smoke commands · openclaw/openclaw@fca77dc test: route more command tests through light suite · openclaw/openclaw@bbfcdea fix(scripts): short-circuit helper help · openclaw/openclaw@4b23b36 test: harden docker smoke portability · openclaw/openclaw@10056c9 fix(agents): recover failed subagent lifecycle completions · openclaw/openclaw@4980c32 fix(e2e): hard kill timed out host commands · openclaw/openclaw@dd44a47 test: move lightweight command tests to light suite · openclaw/openclaw@2831d69 fix(scripts): handle helper cli help · openclaw/openclaw@2cc6871 fix(gateway): bound loopback preflight calls · openclaw/openclaw@6d5c15a fix(hooks): enforce default hook agent allowlist · openclaw/openclaw@e72621e fix(e2e): handle docker helper cli help · openclaw/openclaw@2814ab6 fix(codex): avoid native compaction on budget triggers (#86772) · openclaw/openclaw@eb8f9b4 test: speed up plugin test fixtures · openclaw/openclaw@05ff771 fix(e2e): bound openai chat tools client · openclaw/openclaw@de94217 fix(e2e): bound upgrade survivor probes · openclaw/openclaw@981ae13 fix(doctor): keep hooks model checks read-only (#86101) · openclaw/openclaw@371c4d6 fix(installer): tighten nonroot smoke node preflight · openclaw/openclaw@340f480 fix(e2e): bound HTTP readiness probes · openclaw/openclaw@d58f864 fix(daemon): keep node tasks off gateway listener cleanup · openclaw/openclaw@a4e0b6e perf(gateway): reuse prepared auth stores · openclaw/openclaw@d2711c9 test: speed up codex app server run attempts · openclaw/openclaw@1ce3637 build(codex): update Codex CLI to 0.134.0 · openclaw/openclaw@231a812 docs(skills): omit advisory ids from changelog notes · openclaw/openclaw@989a369 test: speed up test project routing · openclaw/openclaw@140892c Fix stale approval prompts in Control UI (#86270) · openclaw/openclaw@5297eeb fix(installer): reject stale cli node runtimes · openclaw/openclaw@49d605e test: harden e2e harness isolation · openclaw/openclaw@acbb06e fix: keep approval runtime token local-only · openclaw/openclaw@96c5766 perf(gateway): defer skipped-channel sidecars · openclaw/openclaw@145b57c docs(changelog): omit advisory id from release notes · openclaw/openclaw@d606881 docs(changelog): refresh 2026.5.26 notes · openclaw/openclaw@26c0c19 docs(skills): add release changelog update workflow · openclaw/openclaw@c8d20ae fix(e2e): bound upgrade survivor cli checks · openclaw/openclaw@c965b3a test: speed up doctor config flow tests · openclaw/openclaw@5177180 fix(events): sanitize queued system markers (#87094) · openclaw/openclaw@c1151ea fix(gateway): remove redundant unknown union · openclaw/openclaw@f393ebe test: speed up model fallback tests · openclaw/openclaw@e7f644c fix(imessage): stage remote media before understanding · openclaw/openclaw@ae52be9 fix(gateway): drop stale subagent announce history · openclaw/openclaw@982e888 fix: repair local approval resolution (#86771) · openclaw/openclaw@13cfb77 fix(e2e): bound codex media plugin setup · openclaw/openclaw@f89fcdd
fix(e2e): bound Telegram credential setup · openclaw/openclaw@9b28603
vincentkoc · 2026-05-27 · via Recent Commits to openclaw:main

@@ -1,12 +1,12 @@

11

#!/usr/bin/env -S node --import tsx

223-

import { spawn } from "node:child_process";

43

import { createHash } from "node:crypto";

54

import { copyFile, mkdir, mkdtemp, readFile, rm, unlink, writeFile } from "node:fs/promises";

65

import { tmpdir } from "node:os";

76

import path from "node:path";

87

import { pathToFileURL } from "node:url";

98

import { normalizeCredentialPayloadForKind } from "../../qa/convex-credential-broker/convex/payload-validation.js";

9+

import { fetchJsonWithTimeout, runCommand } from "./telegram-user-credential-io.ts";

1010

import { expandHome, writePrivateJson } from "./telegram-user-credential-paths.ts";

11111212

type JsonObject = Record<string, unknown>;

@@ -17,6 +17,14 @@ const DEFAULT_BOT_CREDENTIALS_FILE =

1717

const DEFAULT_CONVEX_ENV_FILE = "~/.codex/skills/custom/telegram-e2e-bot-to-bot/convex.local.env";

1818

const CHUNKED_PAYLOAD_MARKER = "__openclawQaCredentialPayloadChunksV1";

1919

const TELEGRAM_USER_QA_CREDENTIAL_KIND = "telegram-user";

20+

const COMMAND_TIMEOUT_MS = optionalPositiveInteger(

21+

process.env.OPENCLAW_TELEGRAM_USER_CREDENTIAL_COMMAND_TIMEOUT_MS?.trim(),

22+

120_000,

23+

);

24+

const BROKER_TIMEOUT_MS = optionalPositiveInteger(

25+

process.env.OPENCLAW_TELEGRAM_USER_CREDENTIAL_BROKER_TIMEOUT_MS?.trim(),

26+

30_000,

27+

);

20282129

function usage(): never {

2230

throw new Error(

@@ -162,32 +170,6 @@ async function tgzBase64(path: string) {

162170

return (await readFile(path)).toString("base64");

163171

}

164172165-

function runCommand(command: string, args: string[], cwd?: string) {

166-

return new Promise<void>((resolve, reject) => {

167-

const child = spawn(command, args, {

168-

cwd,

169-

stdio: ["ignore", "pipe", "pipe"],

170-

});

171-

let stdout = "";

172-

let stderr = "";

173-

child.stdout.on("data", (chunk: Buffer) => {

174-

stdout += chunk.toString();

175-

});

176-

child.stderr.on("data", (chunk: Buffer) => {

177-

stderr += chunk.toString();

178-

});

179-

child.on("error", reject);

180-

child.on("close", (code, signal) => {

181-

if (code === 0) {

182-

resolve();

183-

return;

184-

}

185-

const detail = signal ? `signal ${signal}` : `exit code ${code ?? "unknown"}`;

186-

reject(new Error(`${command} ${args.join(" ")} failed with ${detail}\n${stdout}${stderr}`));

187-

});

188-

});

189-

}

190-191173

function joinBrokerEndpoint(siteUrl: string, endpoint: string) {

192174

const normalized = siteUrl.replace(/\/+$/u, "");

193175

return `${normalized}/qa-credentials/v1/${endpoint}`;

@@ -210,15 +192,19 @@ async function postBroker(params: {

210192

siteUrl: string;

211193

token: string;

212194

}) {

213-

const response = await fetch(joinBrokerEndpoint(params.siteUrl, params.action), {

214-

method: "POST",

215-

headers: {

216-

authorization: `Bearer ${params.token}`,

217-

"content-type": "application/json",

195+

const { payload, response } = await fetchJsonWithTimeout({

196+

url: joinBrokerEndpoint(params.siteUrl, params.action),

197+

label: `credential broker ${params.action}`,

198+

timeoutMs: BROKER_TIMEOUT_MS,

199+

init: {

200+

method: "POST",

201+

headers: {

202+

authorization: `Bearer ${params.token}`,

203+

"content-type": "application/json",

204+

},

205+

body: JSON.stringify(params.body),

218206

},

219-

body: JSON.stringify(params.body),

220207

});

221-

const payload = (await response.json()) as JsonObject;

222208

if (!response.ok) {

223209

assertBrokerSuccess(payload, params.action);

224210

throw new Error(`${params.action} failed with HTTP ${response.status}.`);

@@ -371,29 +357,36 @@ async function createTelegramUserPayload(opts: Map<string, string>) {

371357

const tdlibArchive = path.join(tempRoot, "tdlib.tgz");

372358

const desktopArchive = path.join(tempRoot, "desktop-tdata.tgz");

373359

try {

374-

await runCommand("tar", ["-C", userDriverDir, "-czf", tdlibArchive, "db", "files"]);

360+

await runCommand("tar", ["-C", userDriverDir, "-czf", tdlibArchive, "db", "files"], undefined, {

361+

timeoutMs: COMMAND_TIMEOUT_MS,

362+

});

375363

if (desktopTdataArchiveInput) {

376364

await copyFile(expandHome(desktopTdataArchiveInput), desktopArchive);

377365

} else {

378-

await runCommand("tar", [

379-

"-C",

380-

path.dirname(expandHome(desktopTdataDir!)),

381-

"--exclude",

382-

"tdata/countries",

383-

"--exclude",

384-

"tdata/dictionaries",

385-

"--exclude",

386-

"tdata/dumps",

387-

"--exclude",

388-

"tdata/emoji",

389-

"--exclude",

390-

"tdata/user_data",

391-

"--exclude",

392-

"tdata/working",

393-

"-czf",

394-

desktopArchive,

395-

"tdata",

396-

]);

366+

await runCommand(

367+

"tar",

368+

[

369+

"-C",

370+

path.dirname(expandHome(desktopTdataDir!)),

371+

"--exclude",

372+

"tdata/countries",

373+

"--exclude",

374+

"tdata/dictionaries",

375+

"--exclude",

376+

"tdata/dumps",

377+

"--exclude",

378+

"tdata/emoji",

379+

"--exclude",

380+

"tdata/user_data",

381+

"--exclude",

382+

"tdata/working",

383+

"-czf",

384+

desktopArchive,

385+

"tdata",

386+

],

387+

undefined,

388+

{ timeoutMs: COMMAND_TIMEOUT_MS },

389+

);

397390

}

398391399392

const payload = parseTelegramUserQaCredentialPayload({

@@ -461,8 +454,12 @@ async function restoreTelegramUserPayload(params: {

461454

throw new Error("Telegram Desktop archive SHA-256 mismatch.");

462455

}

463456464-

await runCommand("tar", ["-C", expandHome(userDriverDir), "-xzf", tdlibArchive]);

465-

await runCommand("tar", ["-C", expandHome(desktopWorkdir), "-xzf", desktopArchive]);

457+

await runCommand("tar", ["-C", expandHome(userDriverDir), "-xzf", tdlibArchive], undefined, {

458+

timeoutMs: COMMAND_TIMEOUT_MS,

459+

});

460+

await runCommand("tar", ["-C", expandHome(desktopWorkdir), "-xzf", desktopArchive], undefined, {

461+

timeoutMs: COMMAND_TIMEOUT_MS,

462+

});

466463

await writePrivateJson(`${expandHome(userDriverDir)}/config.local.json`, {

467464

apiId: Number(requireString(payload, "telegramApiId")),

468465

apiHash: requireString(payload, "telegramApiHash"),