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
+11
View File
@@ -187,6 +187,17 @@ export function optionalNumber(
return v;
}
export function optionalBoolean(
obj: Record<string, unknown>,
key: string,
label = key,
): boolean | undefined {
const v = obj[key];
if (v === undefined) return undefined;
if (typeof v !== "boolean") throw badRequest(`${label} must be a boolean.`);
return v;
}
/** Validate a yyyy-mm-dd query parameter (defaults to undefined). */
export function optionalDateParam(value: string | undefined, label: string): string | undefined {
if (value === undefined || value === "") return undefined;