Fix Foundry validation fallout

This commit is contained in:
Nathan Flurry 2026-03-15 13:43:24 -07:00 committed by Nathan Flurry
parent 13fc9cb318
commit aa332307e5
11 changed files with 25 additions and 7 deletions

View file

@ -60,6 +60,7 @@ export type CreateTaskInput = z.infer<typeof CreateTaskInputSchema>;
export const WorkspacePullRequestSummarySchema = z.object({
number: z.number().int(),
status: z.enum(["draft", "ready"]),
title: z.string().min(1),
state: z.string().min(1),
url: z.string().min(1),

View file

@ -1,4 +1,4 @@
import { pino, type Logger, type LoggerOptions } from "pino";
import { pino, type LogFn, type Logger, type LoggerOptions } from "pino";
export interface FoundryLoggerOptions {
service: string;
@ -160,7 +160,7 @@ export function createFoundryLogger(options: FoundryLoggerOptions): Logger {
loggerOptions.timestamp = pino.stdTimeFunctions.isoTime;
if (options.format === "logfmt") {
loggerOptions.hooks = {
logMethod(this: Logger, args, _method, level) {
logMethod(this: Logger, args: Parameters<LogFn>, _method: LogFn, level: number) {
const levelLabel = this.levels.labels[level] ?? "info";
const record = buildLogRecord(levelLabel, this.bindings(), args);
writeLogfmtLine(formatLogfmtLine(record));