fix(agents): restore tool display summary typing

This commit is contained in:
Peter Steinberger
2026-04-05 13:54:27 +01:00
parent 79e5101a88
commit 4e550a873e
3 changed files with 14 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import fs from "node:fs/promises";
import path from "node:path";
import type { AgentTool, AgentToolResult } from "@mariozechner/pi-agent-core";
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
import { analyzeShellCommand } from "../infra/exec-approvals-analysis.js";
import {
type ExecHost,
@@ -53,7 +53,7 @@ import {
} from "./bash-tools.shared.js";
import { assertSandboxPath } from "./sandbox-paths.js";
import { EXEC_TOOL_DISPLAY_SUMMARY } from "./tool-description-presets.js";
import { failedTextResult, textResult } from "./tools/common.js";
import { type AgentToolWithMeta, failedTextResult, textResult } from "./tools/common.js";
export type { BashSandboxConfig } from "./bash-tools.shared.js";
export type {
@@ -1168,7 +1168,7 @@ export function describeExecTool(params?: { agentId?: string; hasCronTool?: bool
export function createExecTool(
defaults?: ExecToolDefaults,
// oxlint-disable-next-line typescript/no-explicit-any
): AgentTool<any, ExecToolDetails> {
): AgentToolWithMeta<any, ExecToolDetails> {
const defaultBackgroundMs = clampWithDefault(
defaults?.backgroundMs ?? readEnvInt("PI_BASH_YIELD_MS"),
10_000,