feat(agent): prevent exposing screenshot and analyze_image tools and executing autofill/embeddings for audio files

This commit is contained in:
yiling
2026-07-05 16:26:48 +08:00
parent cee4142936
commit 73aa374b2b
4 changed files with 104 additions and 6 deletions
@@ -65,6 +65,14 @@ export async function agentAutofillMedia(task: WorkflowTask): Promise<void> {
// 2. Prepare Data (Images)
const isImage = asset.mediaType?.startsWith('image/') || false
const isVideo = asset.mediaType?.startsWith('video/') || false
if (!isImage && !isVideo) {
throw ApplicationFailure.create({
message: `unsupported media type for autofill: ${asset.mediaType}`,
nonRetryable: true,
})
}
const download = await executeActivity(transcodeWorkerQueue, downloadMediaToTmpActivity, {
assetKey: key,