test(core): align tool contract expectations (#39172)
This commit is contained in:
parent
f15398efc3
commit
470e360942
13 changed files with 333 additions and 116 deletions
|
|
@ -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" },
|
||||
|
|
|
|||
|
|
@ -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([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue