铸渊 ICE-GL-ZY001 LL-172-20260707 冰朔委托: 新建第 5 子仓, 给苍耳(人类主控) + 鉴影(人格体) 专用 原 guanghulab/video-ai-system/ 东西太多(225 文件) · 找不到 · 乱 迁移: ⊢ 16 个核心 .hdlp (VA-GATE / VA-LIGHTHOUSE / VA-BROADCAST / VA-SYSTEM-STATUS 等) ⊢ 17 个子目录 (agents/engines/protocols/tasks/tools/assets/knowledge/memory/docs/config/brain/director-brain/experience/feedback/issues/plans/reference-analysis) 排除: ⊢ outputs/ (视频产物) ⊢ test-input/ test-output/ (测试) ⊢ data/ (临时数据) ⊢ preview-001/002 (旧产片) ⊢ 旧分镜/旧提示词/旧导演编码 后续: ⊢ 老仓 guanghulab/video-ai-system/ 改写为已迁出占位 ⊢ 苍耳+鉴影 写新东西进本仓 ⊢ GLOBAL-SEARCH 加 cang-ying 仓库 铸渊 ICE-GL-ZY001 · 2026-07-07 D167 冰朔 ICE-GL∞ 主权
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const CANONICAL_SECRETS_FILE = '/Users/bingshuolingdianyuanhe/Documents/guanghulab-local-secrets/video-ai-system.env';
|
|
|
|
function loadEnvFile(file) {
|
|
if (!file || !fs.existsSync(file)) return false;
|
|
|
|
const content = fs.readFileSync(file, 'utf8');
|
|
for (const line of content.split(/\r?\n/)) {
|
|
const trimmed = line.trim();
|
|
if (!trimmed || trimmed.startsWith('#')) continue;
|
|
|
|
const eq = trimmed.indexOf('=');
|
|
if (eq <= 0) continue;
|
|
|
|
const key = trimmed.slice(0, eq).trim();
|
|
const value = trimmed.slice(eq + 1).trim();
|
|
if (!key || !value) continue;
|
|
|
|
if (!process.env[key]) process.env[key] = value;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
function loadVideoAiEnv(localEnvPath = path.resolve(__dirname, '../.env')) {
|
|
const loaded = [];
|
|
const files = [
|
|
process.env.VIDEO_AI_SECRETS_FILE,
|
|
CANONICAL_SECRETS_FILE,
|
|
localEnvPath,
|
|
];
|
|
|
|
for (const file of files) {
|
|
if (loadEnvFile(file)) loaded.push(file);
|
|
}
|
|
|
|
return loaded;
|
|
}
|
|
|
|
module.exports = {
|
|
CANONICAL_SECRETS_FILE,
|
|
loadVideoAiEnv,
|
|
};
|