feat(core,web,cli): add file tools and per-tool call descriptions (#62)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-26 21:37:51 +08:00
committed by GitHub
parent 1e23452f48
commit abd5b13d52
43 changed files with 3449 additions and 181 deletions
@@ -35,7 +35,13 @@ import type {
VaultUpdateRequest,
} from "../api/types.js";
import { HttpError } from "../http/errors.js";
import { badRequest, optionalEnum, optionalNumber, optionalString } from "../http/validate.js";
import {
badRequest,
optionalBoolean,
optionalEnum,
optionalNumber,
optionalString,
} from "../http/validate.js";
import { maskApiKey } from "./project-config-service.js";
const THINKING_LEVELS: readonly ThinkingLevelName[] = ["none", "low", "medium", "high", "xhigh"];
@@ -328,6 +334,7 @@ function validateToolsBuiltin(value: unknown): ToolDefinitionConfig[] {
if (t.forModel !== undefined && t.forModel !== "vision" && t.forModel !== "text-only") {
throw badRequest(`toolsBuiltin[${i}].forModel must be one of vision / text-only.`);
}
optionalBoolean(t, "call_description", `toolsBuiltin[${i}].call_description`);
optionalNumber(t, "timeoutMs", {
integer: true,
positiveOrMinusOne: true,