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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MongoDB | Blog
MongoDB | Blog
博客园_首页
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
B
Blog RSS Feed
D
Docker
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
V
V2EX
量子位
雷峰网
雷峰网
月光博客
月光博客
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog

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(ci): wire telegram user credential helper · openclaw/...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -3,14 +3,17 @@

33

import { spawn } from "node:child_process";

44

import { createHash } from "node:crypto";

55

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

6+

import {

7+

TELEGRAM_USER_QA_CREDENTIAL_KIND,

8+

parseTelegramUserQaCredentialPayload,

9+

} from "../../extensions/qa-lab/runtime-api.js";

610711

type JsonObject = Record<string, unknown>;

812913

const DEFAULT_USER_DRIVER_DIR = "~/.codex/skills/custom/telegram-e2e-bot-to-bot/user-driver";

1014

const DEFAULT_BOT_CREDENTIALS_FILE =

1115

"~/.codex/skills/custom/telegram-e2e-bot-to-bot/credentials.local.json";

1216

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

13-

const TELEGRAM_USER_KIND = "telegram-user";

1417

const CHUNKED_PAYLOAD_MARKER = "__openclawQaCredentialPayloadChunksV1";

15181619

function usage(): never {

@@ -165,7 +168,7 @@ async function tgzBase64(path: string) {

165168166169

async function writePrivateJson(path: string, payload: JsonObject) {

167170

const expanded = expandHome(path);

168-

await mkdir(expanded.substring(0, expanded.lastIndexOf("/")), { recursive: true });

171+

await mkdir(expanded.slice(0, expanded.lastIndexOf("/")), { recursive: true });

169172

await writeFile(expanded, `${JSON.stringify(payload, null, 2)}\n`, { mode: 0o600 });

170173

await chmodPrivate(expanded);

171174

}

@@ -325,7 +328,7 @@ async function hydratePayloadFromLease(params: {

325328

siteUrl: params.siteUrl,

326329

token: params.token,

327330

body: {

328-

kind: TELEGRAM_USER_KIND,

331+

kind: TELEGRAM_USER_QA_CREDENTIAL_KIND,

329332

ownerId: params.ownerId,

330333

actorRole: "ci",

331334

credentialId,

@@ -339,7 +342,7 @@ async function hydratePayloadFromLease(params: {

339342

if (serialized.length !== marker.byteLength) {

340343

throw new Error("Chunked payload length mismatch.");

341344

}

342-

return JSON.parse(serialized) as JsonObject;

345+

return parseTelegramUserQaCredentialPayload(JSON.parse(serialized)) as JsonObject;

343346

}

344347345348

async function createTelegramUserPayload(opts: Map<string, string>) {

@@ -411,7 +414,7 @@ async function createTelegramUserPayload(opts: Map<string, string>) {

411414

]);

412415

}

413416414-

await writePrivateJson(output, {

417+

const payload = parseTelegramUserQaCredentialPayload({

415418

groupId,

416419

sutToken,

417420

testerUserId: requireString(config, "testerUserId"),

@@ -424,6 +427,7 @@ async function createTelegramUserPayload(opts: Map<string, string>) {

424427

desktopTdataArchiveBase64: await tgzBase64(desktopArchive),

425428

desktopTdataArchiveSha256: await fileSha256(desktopArchive),

426429

});

430+

await writePrivateJson(output, payload);

427431

} finally {

428432

await rm(tempRoot, { force: true, recursive: true });

429433

}

@@ -451,7 +455,7 @@ async function restoreTelegramUserPayload(params: {

451455

if (!userDriverDir || !desktopWorkdir) {

452456

usage();

453457

}

454-

const payload = params.payload;

458+

const payload = parseTelegramUserQaCredentialPayload(params.payload);

455459

const tempRoot = `/tmp/openclaw-telegram-user-restore-${Date.now()}-${Math.random()

456460

.toString(16)

457461

.slice(2)}`;

@@ -507,7 +511,7 @@ async function leaseAndRestoreTelegramUser(opts: Map<string, string>) {

507511

siteUrl: config.siteUrl,

508512

token: config.token,

509513

body: {

510-

kind: TELEGRAM_USER_KIND,

514+

kind: TELEGRAM_USER_QA_CREDENTIAL_KIND,

511515

ownerId: config.ownerId,

512516

actorRole: "ci",

513517

leaseTtlMs: config.leaseTtlMs,

@@ -516,7 +520,7 @@ async function leaseAndRestoreTelegramUser(opts: Map<string, string>) {

516520

});

517521

const lease = {

518522

siteUrl: config.siteUrl,

519-

kind: TELEGRAM_USER_KIND,

523+

kind: TELEGRAM_USER_QA_CREDENTIAL_KIND,

520524

ownerId: config.ownerId,

521525

actorRole: "ci",

522526

credentialId: requireString(acquired, "credentialId"),