@lightcone-ai/daemon 0.9.66 → 0.9.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,8 +10,8 @@ const REQUIREMENTS = {
|
|
|
10
10
|
max_text_length: 1000,
|
|
11
11
|
max_images: 9,
|
|
12
12
|
image_formats: ['jpg', 'jpeg', 'png', 'webp'],
|
|
13
|
-
required_fields: ['text'],
|
|
14
|
-
notes: '
|
|
13
|
+
required_fields: ['text', 'images'],
|
|
14
|
+
notes: '当前自动化支持上传图文,必须提供至少 1 张本地图片;标题建议 2-20 字;图片建议 3:4 竖版;话题标签写在正文末尾如 #话题名',
|
|
15
15
|
},
|
|
16
16
|
short_video: {
|
|
17
17
|
max_text_length: 1000,
|
|
@@ -146,6 +146,9 @@ function validateLocalFile(filePath, { kind, required = false, allowedExts = []
|
|
|
146
146
|
function validateMedia({ platform, contentType, images = [], video, cover }) {
|
|
147
147
|
const limits = MEDIA_LIMITS[platform] ?? MEDIA_LIMITS.xhs;
|
|
148
148
|
if (contentType === 'image_text') {
|
|
149
|
+
if (images.length === 0) {
|
|
150
|
+
throw new Error(`image_text requires at least 1 image on ${platform}. Provide absolute image paths inside the agent workspace artifacts directory.`);
|
|
151
|
+
}
|
|
149
152
|
if (images.length > limits.maxImages) throw new Error(`image_text supports at most ${limits.maxImages} images on ${platform}`);
|
|
150
153
|
return {
|
|
151
154
|
images: images.map(filePath => validateLocalFile(filePath, { kind: 'image', required: true, allowedExts: limits.imageExts })),
|