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

推荐订阅源

C
Cisco Blogs
Schneier on Security
Schneier on Security
T
Tor Project blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tenable Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
Security Latest
Security Latest
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
NISL@THU
NISL@THU
L
Lohrmann on Cybersecurity
Scott Helme
Scott Helme
Webroot Blog
Webroot Blog
Project Zero
Project Zero
Google Online Security Blog
Google Online Security Blog
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
Hacker News: Ask HN
Hacker News: Ask HN
PCI Perspectives
PCI Perspectives
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News | PayPal Newsroom
Help Net Security
Help Net Security
The Hacker News
The Hacker News
H
Heimdal Security Blog
O
OpenAI News
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
Simon Willison's Weblog
Simon Willison's Weblog
G
GRAHAM CLULEY
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 叶小钗
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
I
Intezer
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
Security Affairs
P
Proofpoint News Feed
S
Secure Thoughts
腾讯CDC
Google DeepMind News
Google DeepMind News
量子位
罗磊的独立博客

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
perf(test): trim hot gateway and infra tests · openclaw/openclaw@7dd37bd
steipete · 2026-04-23 · via Recent Commits to openclaw:main

@@ -1035,6 +1035,48 @@ describe("gateway server sessions", () => {

10351035

"sessions.compact",

10361036

]),

10371037

);

1038+

const sessionsHandlers = await getSessionsHandlers();

1039+

const directContext = {

1040+

broadcastToConnIds: vi.fn(),

1041+

getSessionEventSubscriberConnIds: () => new Set<string>(),

1042+

loadGatewayModelCatalog: async () => piSdkMock.models,

1043+

} as never;

1044+

async function directSessionReq<TPayload = unknown>(

1045+

method: keyof typeof sessionsHandlers,

1046+

params: Record<string, unknown>,

1047+

coercePayload?: (payload: unknown) => TPayload,

1048+

): Promise<{ ok: boolean; payload?: TPayload; error?: unknown }> {

1049+

let result:

1050+

| {

1051+

ok: boolean;

1052+

payload?: TPayload;

1053+

error?: unknown;

1054+

}

1055+

| undefined;

1056+

await sessionsHandlers[method]({

1057+

req: {} as never,

1058+

params,

1059+

respond: (ok, payload, error) => {

1060+

result = {

1061+

ok,

1062+

payload:

1063+

payload === undefined

1064+

? undefined

1065+

: coercePayload

1066+

? coercePayload(payload)

1067+

: (payload as TPayload),

1068+

error,

1069+

};

1070+

},

1071+

context: directContext,

1072+

client: null,

1073+

isWebchatConnect: () => false,

1074+

});

1075+

if (!result) {

1076+

throw new Error(`${method} did not respond`);

1077+

}

1078+

return result;

1079+

}

1038108010391081

const resolvedByKey = await rpcReq<{ ok: true; key: string }>(ws, "sessions.resolve", {

10401082

key: "main",

@@ -1047,8 +1089,9 @@ describe("gateway server sessions", () => {

10471089

});

10481090

expect(resolvedBySessionId.ok).toBe(true);

10491091

expect(resolvedBySessionId.payload?.key).toBe("agent:main:discord:group:dev");

1092+

ws.close();

105010931051-

const list1 = await rpcReq<{

1094+

const list1 = await directSessionReq<{

10521095

path: string;

10531096

defaults?: { model?: string | null; modelProvider?: string | null };

10541097

sessions: Array<{

@@ -1060,7 +1103,7 @@ describe("gateway server sessions", () => {

10601103

lastAccountId?: string;

10611104

deliveryContext?: { channel?: string; to?: string; accountId?: string };

10621105

}>;

1063-

}>(ws, "sessions.list", { includeGlobal: false, includeUnknown: false });

1106+

}>("sessions.list", { includeGlobal: false, includeUnknown: false });

1064110710651108

expect(list1.ok).toBe(true);

10661109

expect(list1.payload?.path).toBe(storePath);

@@ -1079,19 +1122,19 @@ describe("gateway server sessions", () => {

10791122

threadId: "1737500000.123456",

10801123

});

108111241082-

const active = await rpcReq<{

1125+

const active = await directSessionReq<{

10831126

sessions: Array<{ key: string }>;

1084-

}>(ws, "sessions.list", {

1127+

}>("sessions.list", {

10851128

includeGlobal: false,

10861129

includeUnknown: false,

10871130

activeMinutes: 5,

10881131

});

10891132

expect(active.ok).toBe(true);

10901133

expect(active.payload?.sessions.map((s) => s.key)).toEqual(["agent:main:main"]);

109111341092-

const limited = await rpcReq<{

1135+

const limited = await directSessionReq<{

10931136

sessions: Array<{ key: string }>;

1094-

}>(ws, "sessions.list", {

1137+

}>("sessions.list", {

10951138

includeGlobal: true,

10961139

includeUnknown: false,

10971140

limit: 1,

@@ -1100,7 +1143,7 @@ describe("gateway server sessions", () => {

11001143

expect(limited.payload?.sessions).toHaveLength(1);

11011144

expect(limited.payload?.sessions[0]?.key).toBe("global");

110211451103-

const patched = await rpcReq<{ ok: true; key: string }>(ws, "sessions.patch", {

1146+

const patched = await directSessionReq<{ ok: true; key: string }>("sessions.patch", {

11041147

key: "agent:main:main",

11051148

thinkingLevel: "medium",

11061149

verboseLevel: "off",

@@ -1109,30 +1152,30 @@ describe("gateway server sessions", () => {

11091152

expect(patched.payload?.ok).toBe(true);

11101153

expect(patched.payload?.key).toBe("agent:main:main");

111111541112-

const sendPolicyPatched = await rpcReq<{

1155+

const sendPolicyPatched = await directSessionReq<{

11131156

ok: true;

11141157

entry: { sendPolicy?: string };

1115-

}>(ws, "sessions.patch", { key: "agent:main:main", sendPolicy: "deny" });

1158+

}>("sessions.patch", { key: "agent:main:main", sendPolicy: "deny" });

11161159

expect(sendPolicyPatched.ok).toBe(true);

11171160

expect(sendPolicyPatched.payload?.entry.sendPolicy).toBe("deny");

111811611119-

const labelPatched = await rpcReq<{

1162+

const labelPatched = await directSessionReq<{

11201163

ok: true;

11211164

entry: { label?: string };

1122-

}>(ws, "sessions.patch", {

1165+

}>("sessions.patch", {

11231166

key: "agent:main:subagent:one",

11241167

label: "Briefing",

11251168

});

11261169

expect(labelPatched.ok).toBe(true);

11271170

expect(labelPatched.payload?.entry.label).toBe("Briefing");

112811711129-

const labelPatchedDuplicate = await rpcReq(ws, "sessions.patch", {

1172+

const labelPatchedDuplicate = await directSessionReq("sessions.patch", {

11301173

key: "agent:main:discord:group:dev",

11311174

label: "Briefing",

11321175

});

11331176

expect(labelPatchedDuplicate.ok).toBe(false);

113411771135-

const list2 = await rpcReq<{

1178+

const list2 = await directSessionReq<{

11361179

sessions: Array<{

11371180

key: string;

11381181

thinkingLevel?: string;

@@ -1141,7 +1184,7 @@ describe("gateway server sessions", () => {

11411184

label?: string;

11421185

displayName?: string;

11431186

}>;

1144-

}>(ws, "sessions.list", {});

1187+

}>("sessions.list", {});

11451188

expect(list2.ok).toBe(true);

11461189

const main2 = list2.payload?.sessions.find((s) => s.key === "agent:main:main");

11471190

expect(main2?.thinkingLevel).toBe("medium");

@@ -1151,63 +1194,63 @@ describe("gateway server sessions", () => {

11511194

expect(subagent?.label).toBe("Briefing");

11521195

expect(subagent?.displayName).toBe("Briefing");

115311961154-

const clearedVerbose = await rpcReq<{ ok: true; key: string }>(ws, "sessions.patch", {

1197+

const clearedVerbose = await directSessionReq<{ ok: true; key: string }>("sessions.patch", {

11551198

key: "agent:main:main",

11561199

verboseLevel: null,

11571200

});

11581201

expect(clearedVerbose.ok).toBe(true);

115912021160-

const list3 = await rpcReq<{

1203+

const list3 = await directSessionReq<{

11611204

sessions: Array<{

11621205

key: string;

11631206

verboseLevel?: string;

11641207

}>;

1165-

}>(ws, "sessions.list", {});

1208+

}>("sessions.list", {});

11661209

expect(list3.ok).toBe(true);

11671210

const main3 = list3.payload?.sessions.find((s) => s.key === "agent:main:main");

11681211

expect(main3?.verboseLevel).toBeUndefined();

116912121170-

const listByLabel = await rpcReq<{

1213+

const listByLabel = await directSessionReq<{

11711214

sessions: Array<{ key: string }>;

1172-

}>(ws, "sessions.list", {

1215+

}>("sessions.list", {

11731216

includeGlobal: false,

11741217

includeUnknown: false,

11751218

label: "Briefing",

11761219

});

11771220

expect(listByLabel.ok).toBe(true);

11781221

expect(listByLabel.payload?.sessions.map((s) => s.key)).toEqual(["agent:main:subagent:one"]);

117912221180-

const resolvedByLabel = await rpcReq<{ ok: true; key: string }>(ws, "sessions.resolve", {

1223+

const resolvedByLabel = await directSessionReq<{ ok: true; key: string }>("sessions.resolve", {

11811224

label: "Briefing",

11821225

agentId: "main",

11831226

});

11841227

expect(resolvedByLabel.ok).toBe(true);

11851228

expect(resolvedByLabel.payload?.key).toBe("agent:main:subagent:one");

118612291187-

const spawnedOnly = await rpcReq<{

1230+

const spawnedOnly = await directSessionReq<{

11881231

sessions: Array<{ key: string }>;

1189-

}>(ws, "sessions.list", {

1232+

}>("sessions.list", {

11901233

includeGlobal: true,

11911234

includeUnknown: true,

11921235

spawnedBy: "agent:main:main",

11931236

});

11941237

expect(spawnedOnly.ok).toBe(true);

11951238

expect(spawnedOnly.payload?.sessions.map((s) => s.key)).toEqual(["agent:main:subagent:one"]);

119612391197-

const spawnedPatched = await rpcReq<{

1240+

const spawnedPatched = await directSessionReq<{

11981241

ok: true;

11991242

entry: { spawnedBy?: string };

1200-

}>(ws, "sessions.patch", {

1243+

}>("sessions.patch", {

12011244

key: "agent:main:subagent:two",

12021245

spawnedBy: "agent:main:main",

12031246

});

12041247

expect(spawnedPatched.ok).toBe(true);

12051248

expect(spawnedPatched.payload?.entry.spawnedBy).toBe("agent:main:main");

120612491207-

const acpPatched = await rpcReq<{

1250+

const acpPatched = await directSessionReq<{

12081251

ok: true;

12091252

entry: { spawnedBy?: string; spawnDepth?: number };

1210-

}>(ws, "sessions.patch", {

1253+

}>("sessions.patch", {

12111254

key: "agent:main:acp:child",

12121255

spawnedBy: "agent:main:main",

12131256

spawnDepth: 1,

@@ -1216,15 +1259,15 @@ describe("gateway server sessions", () => {

12161259

expect(acpPatched.payload?.entry.spawnedBy).toBe("agent:main:main");

12171260

expect(acpPatched.payload?.entry.spawnDepth).toBe(1);

121812611219-

const spawnedPatchedInvalidKey = await rpcReq(ws, "sessions.patch", {

1262+

const spawnedPatchedInvalidKey = await directSessionReq("sessions.patch", {

12201263

key: "agent:main:main",

12211264

spawnedBy: "agent:main:main",

12221265

});

12231266

expect(spawnedPatchedInvalidKey.ok).toBe(false);

1224126712251268

piSdkMock.enabled = true;

12261269

piSdkMock.models = [{ id: "gpt-test-a", name: "A", provider: "openai" }];

1227-

const modelPatched = await rpcReq<{

1270+

const modelPatched = await directSessionReq<{

12281271

ok: true;

12291272

entry: {

12301273

modelOverride?: string;

@@ -1233,7 +1276,7 @@ describe("gateway server sessions", () => {

12331276

modelProvider?: string;

12341277

};

12351278

resolved?: { model?: string; modelProvider?: string };

1236-

}>(ws, "sessions.patch", {

1279+

}>("sessions.patch", {

12371280

key: "agent:main:main",

12381281

model: "openai/gpt-test-a",

12391282

});

@@ -1245,17 +1288,17 @@ describe("gateway server sessions", () => {

12451288

expect(modelPatched.payload?.resolved?.modelProvider).toBe("openai");

12461289

expect(modelPatched.payload?.resolved?.model).toBe("gpt-test-a");

124712901248-

const listAfterModelPatch = await rpcReq<{

1291+

const listAfterModelPatch = await directSessionReq<{

12491292

sessions: Array<{ key: string; modelProvider?: string; model?: string }>;

1250-

}>(ws, "sessions.list", {});

1293+

}>("sessions.list", {});

12511294

expect(listAfterModelPatch.ok).toBe(true);

12521295

const mainAfterModelPatch = listAfterModelPatch.payload?.sessions.find(

12531296

(session) => session.key === "agent:main:main",

12541297

);

12551298

expect(mainAfterModelPatch?.modelProvider).toBe("openai");

12561299

expect(mainAfterModelPatch?.model).toBe("gpt-test-a");

125713001258-

const compacted = await rpcReq<{ ok: true; compacted: boolean }>(ws, "sessions.compact", {

1301+

const compacted = await directSessionReq<{ ok: true; compacted: boolean }>("sessions.compact", {

12591302

key: "agent:main:main",

12601303

maxLines: 3,

12611304

});

@@ -1268,22 +1311,22 @@ describe("gateway server sessions", () => {

12681311

const filesAfterCompact = await fs.readdir(dir);

12691312

expect(filesAfterCompact.some((f) => f.startsWith("sess-main.jsonl.bak."))).toBe(true);

127013131271-

const deleted = await rpcReq<{ ok: true; deleted: boolean }>(ws, "sessions.delete", {

1314+

const deleted = await directSessionReq<{ ok: true; deleted: boolean }>("sessions.delete", {

12721315

key: "agent:main:discord:group:dev",

12731316

});

12741317

expect(deleted.ok).toBe(true);

12751318

expect(deleted.payload?.deleted).toBe(true);

1276-

const listAfterDelete = await rpcReq<{

1319+

const listAfterDelete = await directSessionReq<{

12771320

sessions: Array<{ key: string }>;

1278-

}>(ws, "sessions.list", {});

1321+

}>("sessions.list", {});

12791322

expect(listAfterDelete.ok).toBe(true);

12801323

expect(

12811324

listAfterDelete.payload?.sessions.some((s) => s.key === "agent:main:discord:group:dev"),

12821325

).toBe(false);

12831326

const filesAfterDelete = await fs.readdir(dir);

12841327

expect(filesAfterDelete.some((f) => f.startsWith("sess-group.jsonl.deleted."))).toBe(true);

128513281286-

const reset = await rpcReq<{

1329+

const reset = await directSessionReq<{

12871330

ok: true;

12881331

key: string;

12891332

entry: {

@@ -1293,7 +1336,7 @@ describe("gateway server sessions", () => {

12931336

lastAccountId?: string;

12941337

lastThreadId?: string | number;

12951338

};

1296-

}>(ws, "sessions.reset", { key: "agent:main:main" });

1339+

}>("sessions.reset", { key: "agent:main:main" });

12971340

expect(reset.ok).toBe(true);

12981341

expect(reset.payload?.key).toBe("agent:main:main");

12991342

expect(reset.payload?.entry.sessionId).not.toBe("sess-main");

@@ -1310,16 +1353,14 @@ describe("gateway server sessions", () => {

13101353

const filesAfterReset = await fs.readdir(dir);

13111354

expect(filesAfterReset.some((f) => f.startsWith("sess-main.jsonl.reset."))).toBe(true);

131213551313-

const badThinking = await rpcReq(ws, "sessions.patch", {

1356+

const badThinking = await directSessionReq("sessions.patch", {

13141357

key: "agent:main:main",

13151358

thinkingLevel: "banana",

13161359

});

13171360

expect(badThinking.ok).toBe(false);

13181361

expect((badThinking.error as { message?: unknown } | undefined)?.message ?? "").toMatch(

13191362

/invalid thinkinglevel/i,

13201363

);

1321-1322-

ws.close();

13231364

});

1324136513251366

test("sessions.compaction.* lists checkpoints and branches or restores from pre-compaction snapshots", async () => {