test(core): align tool contract expectations (#39172)

This commit is contained in:
Kit Langton 2026-07-27 20:48:29 -04:00 committed by GitHub
commit 470e360942
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 333 additions and 116 deletions

View file

@ -244,7 +244,7 @@ describe("acp event behavior", () => {
sessionID: "ses_tools",
assistantMessageID: "msg_tools",
callID: "call_fail",
input: { filePath: "/workspace/missing.ts" },
input: { path: "/workspace/missing.ts" },
executed: false,
}),
)
@ -638,7 +638,7 @@ function replayFixtureMessages(): SessionMessageInfo[] {
time: { created: 2, completed: 3 },
state: {
status: "error",
input: { filePath: "/workspace/missing.ts" },
input: { path: "/workspace/missing.ts" },
metadata: { bytes: 0 },
content: [{ type: "text", text: "partial" }],
error: { type: "tool.error", message: "failed hard" },

View file

@ -49,7 +49,7 @@ describe("acp permission behavior", () => {
send(
permissionAsked("ses_allow", "perm_always", {
action: "read",
metadata: { filePath: "/workspace/file.ts" },
metadata: { path: "/workspace/file.ts" },
source: { type: "tool", messageID: "msg_allow", callID: "call_always" },
}),
)
@ -96,7 +96,7 @@ describe("acp permission behavior", () => {
title: "/workspace/file.ts",
kind: "read",
locations: [{ path: "/workspace/file.ts" }],
rawInput: { filePath: "/workspace/file.ts" },
rawInput: { path: "/workspace/file.ts" },
},
})
expect(permissionReplies(fixture)).toEqual([