feat(*): 短剧创作工作台 - 完善章节分镜、资产管理、技能运行与生成任务恢复

This commit is contained in:
ddCat
2026-08-29 23:34:46 +08:00
parent 4f07daae9e
commit 2f6832f99c
113 changed files with 7016 additions and 723 deletions

View File

@@ -1,6 +1,7 @@
import path from "node:path";
import { createServer, type Server } from "node:http";
import type { Express } from "express";
import {
CONFIG_DIR,
@@ -25,6 +26,14 @@ export type StartLocalRuntimeOptions = {
persistConfig?: (config: LocalRuntimeConfig) => void;
};
export type LocalRuntimeHandle = {
app: Express;
server: Server;
sessions: LocalRuntimeSessionManager;
ready: Promise<void>;
close: () => Promise<void>;
};
export function createDefaultLocalRuntimeModules(config: LocalRuntimeConfig): LocalRuntimeModule[] {
return [
createCanvasAgentHttpModule(config),
@@ -40,7 +49,7 @@ export function createDefaultLocalRuntimeModules(config: LocalRuntimeConfig): Lo
];
}
export function startLocalRuntime(options: StartLocalRuntimeOptions = {}) {
export function startLocalRuntime(options: StartLocalRuntimeOptions = {}): LocalRuntimeHandle {
const config = options.config ?? loadConfig(true);
const persistConfig = options.persistConfig ?? saveConfig;
const requestedPort = options.port ?? (