feat: 白龙马数字意识框架 v2.2.0 - 3D意识空间、多技能协同、自我进化系统

This commit is contained in:
xiaoyuanda666-ship-it
2026-06-07 19:43:22 +08:00
commit bf73366e81
234 changed files with 219763 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
// 复刻 downloadGeneratedVideo按 task id 重新取 video_url 并下载到 sandbox/videos。
import fs from 'fs'
import path from 'path'
const CONFIG = path.join(process.env.APPDATA, 'Bailongma', 'config.json')
const seed = JSON.parse(fs.readFileSync(CONFIG, 'utf-8')).seedance || {}
const apiKey = String(seed.apiKey || '').trim()
const baseURL = String(seed.baseURL || '').trim() || 'https://ark.cn-beijing.volces.com/api/v3'
const taskId = process.argv[2]
if (!taskId) { console.error('usage: node probe-seedance-download.mjs <taskId>'); process.exit(1) }
const pRes = await fetch(`${baseURL}/contents/generations/tasks/${taskId}`, {
headers: { Authorization: `Bearer ${apiKey}` }, signal: AbortSignal.timeout(20000),
})
const pData = await pRes.json()
const videoUrl = pData?.content?.video_url
console.log('status :', pData.status)
console.log('video_url:', videoUrl ? videoUrl.slice(0, 80) + '...' : '(none)')
if (!videoUrl) process.exit(1)
const outDir = path.resolve(process.env.APPDATA, 'Bailongma', 'sandbox', 'videos')
fs.mkdirSync(outDir, { recursive: true })
const dRes = await fetch(videoUrl, { signal: AbortSignal.timeout(120000) })
console.log('download HTTP:', dRes.status, 'content-type:', dRes.headers.get('content-type'))
const buf = Buffer.from(await dRes.arrayBuffer())
const outFile = path.join(outDir, `${taskId}.mp4`)
fs.writeFileSync(outFile, buf)
// 校验 mp4 文件头:偏移 4 起应为 'ftyp'
const magic = buf.slice(4, 8).toString('ascii')
console.log('saved :', outFile)
console.log('size :', (buf.length / 1024 / 1024).toFixed(2), 'MB')
console.log('mp4 magic:', magic, magic === 'ftyp' ? '(✓ 合法 mp4)' : '(✗ 不是 mp4)')