evOo-local/packages/contracts/src/media-transcription.ts
Claude 6a450bb694
fix(media): use snake_case keys in every media tool input
The model saw edit_video and export_video with artifact_id next to
generate_image, generate_video, edit_image and transcribe with artifactId,
sourceArtifactId and negativePrompt. Mixed conventions in one tool list invite
wrong calls, so all media inputs now use snake_case like continue_after and the
other builtin tools: artifact_id, source_artifact_id, negative_prompt,
duration_seconds. Handlers, artifact checks, the media card's transcribe
action and the tests follow. Nothing has shipped, so stored job inputs need no
migration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
2026-10-03 14:39:36 +00:00

21 lines
632 B
TypeScript

import * as z from "zod";
import { Id } from "./ids.js";
export const TranscribeInputSchema = z.object({
artifact_id: Id.describe("Audio or video artifact to transcribe."),
language: z
.string()
.trim()
.regex(/^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/, "Use a language code such as en or de")
.optional()
.describe("Spoken language as a code such as en or de; detected when omitted."),
title: z
.string()
.trim()
.min(1)
.max(120)
.optional()
.describe("A few words in the user's language for the media card."),
});
export type TranscribeInput = z.infer<typeof TranscribeInputSchema>;