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

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
D
DataBreaches.Net
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
腾讯CDC
博客园_首页
The Cloudflare Blog
S
SegmentFault 最新的问题
C
Check Point Blog
美团技术团队
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale

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
feat: expose mailbox session discovery in sessions_list ·...
dangoZhang · 2026-04-23 · via Recent Commits to openclaw:main

@@ -200,10 +200,15 @@ describe("sessions tools", () => {

200200

expect(schemaProp("sessions_list", "limit").type).toBe("number");

201201

expect(schemaProp("sessions_list", "activeMinutes").type).toBe("number");

202202

expect(schemaProp("sessions_list", "messageLimit").type).toBe("number");

203+

expect(schemaProp("sessions_list", "label").type).toBe("string");

204+

expect(schemaProp("sessions_list", "agentId").type).toBe("string");

205+

expect(schemaProp("sessions_list", "search").type).toBe("string");

206+

expect(schemaProp("sessions_list", "includeDerivedTitles").type).toBe("boolean");

207+

expect(schemaProp("sessions_list", "includeLastMessage").type).toBe("boolean");

203208

expect(schemaProp("sessions_send", "timeoutSeconds").type).toBe("number");

204209

});

205210206-

it("sessions_list filters kinds and includes messages", async () => {

211+

it("sessions_list forwards mailbox filters and includes messages", async () => {

207212

callGatewayMock.mockImplementation(async (opts: unknown) => {

208213

const request = opts as { method?: string };

209214

if (request.method === "sessions.list") {

@@ -216,6 +221,8 @@ describe("sessions tools", () => {

216221

sessionId: "s-main",

217222

updatedAt: 10,

218223

lastChannel: "whatsapp",

224+

derivedTitle: "Main mailbox",

225+

lastMessagePreview: "Latest assistant update",

219226

},

220227

{

221228

key: "discord:group:dev",

@@ -229,6 +236,8 @@ describe("sessions tools", () => {

229236

runtimeMs: 42,

230237

estimatedCostUsd: 0.0042,

231238

childSessions: ["agent:main:subagent:worker"],

239+

derivedTitle: "Dev room",

240+

lastMessagePreview: "Need review on the patch",

232241

},

233242

{

234243

key: "agent:main:dashboard:child",

@@ -275,11 +284,36 @@ describe("sessions tools", () => {

275284

throw new Error("missing sessions_list tool");

276285

}

277286278-

const result = await tool.execute("call1", { messageLimit: 1 });

287+

const result = await tool.execute("call1", {

288+

agentId: "main",

289+

label: "mailbox",

290+

search: "review",

291+

includeDerivedTitles: true,

292+

includeLastMessage: true,

293+

messageLimit: 1,

294+

});

295+

expect(callGatewayMock).toHaveBeenNthCalledWith(1, {

296+

method: "sessions.list",

297+

params: {

298+

activeMinutes: undefined,

299+

agentId: "main",

300+

includeDerivedTitles: true,

301+

includeGlobal: true,

302+

includeLastMessage: true,

303+

includeUnknown: true,

304+

label: "mailbox",

305+

limit: undefined,

306+

search: "review",

307+

spawnedBy: undefined,

308+

},

309+

});

279310

const details = result.details as {

280311

sessions?: Array<{

281312

key?: string;

313+

agentId?: string;

282314

channel?: string;

315+

derivedTitle?: string;

316+

lastMessagePreview?: string;

283317

spawnedBy?: string;

284318

status?: string;

285319

startedAt?: number;

@@ -292,7 +326,10 @@ describe("sessions tools", () => {

292326

};

293327

expect(details.sessions).toHaveLength(5);

294328

const main = details.sessions?.find((s) => s.key === "main");

329+

expect(main?.agentId).toBe("main");

295330

expect(main?.channel).toBe("whatsapp");

331+

expect(main?.derivedTitle).toBe("Main mailbox");

332+

expect(main?.lastMessagePreview).toBe("Latest assistant update");

296333

expect(main?.messages?.length).toBe(1);

297334

expect(main?.messages?.[0]?.role).toBe("assistant");

298335

@@ -302,6 +339,8 @@ describe("sessions tools", () => {

302339

expect(group?.runtimeMs).toBe(42);

303340

expect(group?.estimatedCostUsd).toBe(0.0042);

304341

expect(group?.childSessions).toEqual(["agent:main:subagent:worker"]);

342+

expect(group?.derivedTitle).toBe("Dev room");

343+

expect(group?.lastMessagePreview).toBe("Need review on the patch");

305344306345

const dashboardChild = details.sessions?.find((s) => s.key === "agent:main:dashboard:child");

307346

expect(dashboardChild?.parentSessionKey).toBe("agent:main:main");