@renoise/video-maker 0.1.3 → 0.2.0
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.
- package/.claude-plugin/marketplace.json +15 -0
- package/.claude-plugin/plugin.json +17 -3
- package/README.md +20 -33
- package/hooks/check-api-key.sh +28 -0
- package/hooks/hooks.json +3 -3
- package/openclaw.plugin.json +5 -3
- package/package.json +4 -9
- package/skills/director/SKILL.md +4 -7
- package/skills/file-upload/SKILL.md +79 -0
- package/skills/file-upload/scripts/upload.mjs +103 -0
- package/skills/gemini-gen/SKILL.md +232 -0
- package/skills/gemini-gen/scripts/gemini.mjs +220 -0
- package/skills/renoise-gen/SKILL.md +3 -1
- package/skills/short-film-editor/SKILL.md +23 -24
- package/skills/short-film-editor/references/continuity-guide.md +2 -2
- package/skills/tiktok-content-maker/SKILL.md +78 -81
- package/skills/tiktok-content-maker/examples/dress-demo.md +42 -42
- package/skills/tiktok-content-maker/references/ecom-prompt-guide.md +157 -152
- package/skills/video-download/SKILL.md +1 -1
- package/hooks/session-start.sh +0 -17
- package/lib/gemini.ts +0 -49
- package/skills/short-film-editor/scripts/generate-storyboard-html.ts +0 -714
- package/skills/tiktok-content-maker/scripts/analyze-images.ts +0 -122
package/lib/gemini.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared Gemini API client utilities.
|
|
3
|
-
* All scripts use this module to avoid duplicating API setup.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { GoogleGenerativeAI, type Part } from '@google/generative-ai'
|
|
7
|
-
import fs from 'fs/promises'
|
|
8
|
-
import path from 'path'
|
|
9
|
-
|
|
10
|
-
export function getGeminiClient(): GoogleGenerativeAI {
|
|
11
|
-
const apiKey = process.env.GEMINI_API_KEY
|
|
12
|
-
if (!apiKey) {
|
|
13
|
-
throw new Error('GEMINI_API_KEY not set. Get one at: https://aistudio.google.com/apikey')
|
|
14
|
-
}
|
|
15
|
-
return new GoogleGenerativeAI(apiKey)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function getMimeType(filePath: string): string {
|
|
19
|
-
const ext = path.extname(filePath).toLowerCase()
|
|
20
|
-
const mimeMap: Record<string, string> = {
|
|
21
|
-
'.jpg': 'image/jpeg',
|
|
22
|
-
'.jpeg': 'image/jpeg',
|
|
23
|
-
'.png': 'image/png',
|
|
24
|
-
'.webp': 'image/webp',
|
|
25
|
-
'.gif': 'image/gif',
|
|
26
|
-
'.bmp': 'image/bmp',
|
|
27
|
-
'.svg': 'image/svg+xml',
|
|
28
|
-
'.mp4': 'video/mp4',
|
|
29
|
-
'.mov': 'video/quicktime',
|
|
30
|
-
'.avi': 'video/x-msvideo',
|
|
31
|
-
'.mkv': 'video/x-matroska',
|
|
32
|
-
'.webm': 'video/webm',
|
|
33
|
-
}
|
|
34
|
-
return mimeMap[ext] ?? 'application/octet-stream'
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export async function fileToInlinePart(filePath: string): Promise<Part> {
|
|
38
|
-
const data = await fs.readFile(filePath)
|
|
39
|
-
return {
|
|
40
|
-
inlineData: {
|
|
41
|
-
mimeType: getMimeType(filePath),
|
|
42
|
-
data: data.toString('base64'),
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export async function ensureDir(filePath: string): Promise<void> {
|
|
48
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true })
|
|
49
|
-
}
|