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

推荐订阅源

MyScale Blog
MyScale Blog
J
Java Code Geeks
Vercel News
Vercel News
A
About on SuperTechFans
G
Google Developers Blog
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
博客园 - 司徒正美
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园_首页
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
量子位
雷峰网
雷峰网
IT之家
IT之家
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
H
Help Net Security
宝玉的分享
宝玉的分享
博客园 - 叶小钗

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(agents): disclose scoped session list results (#86944...
ferminquant · 2026-05-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -49,10 +49,12 @@ effective tool list.

4949

token counts, and timestamps. Filter by kind (`main`, `group`, `cron`, `hook`,

5050

`node`), exact `label`, exact `agentId`, search text, or recency

5151

(`activeMinutes`). When you need mailbox-style triage, it can also ask for a

52-

visibility-scoped derived title, a last-message preview snippet, or bounded

53-

recent messages on each row. Derived titles and previews are produced only for

54-

sessions the caller can already see under the configured session tool

55-

visibility policy, so unrelated sessions stay hidden.

52+

visibility-scoped derived title, a last-message preview snippet, or bounded recent

53+

messages on each row. Derived titles and previews are produced only for sessions

54+

the caller can already see under the configured session tool visibility policy, so

55+

unrelated sessions stay hidden. When visibility is restricted, `sessions_list`

56+

returns optional `visibility` metadata showing the effective mode and a warning that

57+

results may be scope-limited.

5658
5759

`sessions_history` fetches the conversation transcript for a specific session.

5860

By default, tool results are excluded -- pass `includeTools: true` to see them.

Original file line numberDiff line numberDiff line change

@@ -357,6 +357,9 @@ Default: `tree` (current session + sessions spawned by it, such as subagents).

357357

- `agent`: any session belonging to the current agent id (can include other users if you run per-sender sessions under the same agent id).

358358

- `all`: any session. Cross-agent targeting still requires `tools.agentToAgent`.

359359

- Sandbox clamp: when the current session is sandboxed and `agents.defaults.sandbox.sessionToolsVisibility="spawned"`, visibility is forced to `tree` even if `tools.sessions.visibility="all"`.

360+

- When not `all`, `sessions_list` includes a compact `visibility` field

361+

describing the effective mode and a warning that some sessions may be

362+

omitted outside the current scope.

360363
361364

</Accordion>

362365

</AccordionGroup>

Original file line numberDiff line numberDiff line change

@@ -417,9 +417,19 @@ export function createSessionsListTool(opts?: {

417417

await Promise.all(Array.from({ length: maxConcurrent }, () => worker()));

418418

}

419419
420+

const visibilityMetadata =

421+

visibility === "all"

422+

? undefined

423+

: {

424+

mode: visibility,

425+

restricted: true,

426+

warning: `Session visibility is restricted (effective tools.sessions.visibility=${visibility}). Results may omit sessions outside the current scope. The count field reflects only sessions within the current scope.`,

427+

};

428+
420429

return jsonResult({

421430

count: rows.length,

422431

sessions: rows,

432+

...(visibilityMetadata ? { visibility: visibilityMetadata } : {}),

423433

});

424434

},

425435

};

Original file line numberDiff line numberDiff line change

@@ -514,12 +514,34 @@ describe("sessions_list gating", () => {

514514
515515

const details = requireDetails(result);

516516

expect(details.count).toBe(1);

517+

expect(details.visibility).toBeUndefined();

517518

const session = requireSessions(details)[0];

518519

expect(session?.key).toBe("agent:codex:acp:child-1");

519520

expect(session?.parentSessionKey).toBe(MAIN_AGENT_SESSION_KEY);

520521

expect(callGatewayMock).toHaveBeenCalledTimes(1);

521522

});

522523
524+

it("includes visibility metadata when session visibility is restricted", async () => {

525+

loadConfigMock.mockReturnValue({

526+

session: { scope: "per-sender", mainKey: "main" },

527+

tools: {

528+

agentToAgent: { enabled: true },

529+

sessions: { visibility: "tree" },

530+

},

531+

});

532+
533+

const result = await createMainSessionsListTool().execute("call1", {});

534+
535+

const details = requireDetails(result);

536+

expect(details.count).toBe(1);

537+

expect(details.visibility).toMatchObject({

538+

mode: "tree",

539+

restricted: true,

540+

warning:

541+

"Session visibility is restricted (effective tools.sessions.visibility=tree). Results may omit sessions outside the current scope. The count field reflects only sessions within the current scope.",

542+

});

543+

});

544+
523545

it("keeps literal current keys for message previews", async () => {

524546

callGatewayMock.mockReset();

525547

callGatewayMock