chore: update dependencies

This commit is contained in:
Peter Steinberger
2026-05-04 23:06:49 +01:00
parent 43b5df7295
commit 8ee08b2b77
45 changed files with 552 additions and 476 deletions

View File

@@ -8,6 +8,7 @@ import type { MessagingToolSend } from "./pi-embedded-messaging.types.js";
import {
handleToolExecutionEnd,
handleToolExecutionStart,
handleToolExecutionUpdate,
} from "./pi-embedded-subscribe.handlers.tools.js";
import type {
ToolCallSummary,
@@ -713,6 +714,47 @@ describe("handleToolExecutionEnd exec approval prompts", () => {
});
describe("handleToolExecutionEnd derived tool events", () => {
it("emits command output deltas for exec update results", async () => {
const { ctx, onAgentEvent } = createTestContext();
await handleToolExecutionStart(
ctx as never,
{
type: "tool_execution_start",
toolName: "exec",
toolCallId: "tool-exec-update-output",
args: { command: "npm test" },
} as never,
);
handleToolExecutionUpdate(
ctx as never,
{
type: "tool_execution_update",
toolName: "exec",
toolCallId: "tool-exec-update-output",
partialResult: {
details: {
status: "running",
aggregated: "RUN src/example.test.ts",
},
},
} as never,
);
expect(onAgentEvent).toHaveBeenCalledWith(
expect.objectContaining({
stream: "command_output",
data: expect.objectContaining({
itemId: "command:tool-exec-update-output",
phase: "delta",
output: "RUN src/example.test.ts",
status: "running",
}),
}),
);
});
it("emits command output events for exec results", async () => {
const { ctx, onAgentEvent } = createTestContext();

View File

@@ -772,7 +772,11 @@ export function handleToolExecutionUpdate(
},
});
if (isExecToolName(toolName)) {
const output = extractToolResultText(sanitized);
const execDetails = readExecToolDetails(sanitized);
const output =
execDetails && "aggregated" in execDetails
? execDetails.aggregated
: extractToolResultText(sanitized);
const commandData: AgentItemEventData = {
itemId: buildCommandItemId(toolCallId),
phase: "update",