SYMBOL INDEX (5296 symbols across 977 files) FILE: .tmp_check_task.ts function main (line 5) | async function main() { FILE: extract_chinese.py function extract_chinese_strings (line 10) | def extract_chinese_strings(file_path): function scan_directory (line 57) | def scan_directory(base_path,exclude_patterns=['test-ui']): FILE: lib/prompts/proxy.ts function setProxy (line 2) | async function setProxy() { FILE: scripts/billing-cleanup-pending-freezes.ts type CleanupStats (line 4) | type CleanupStats = { function hasApplyFlag (line 12) | function hasApplyFlag() { function parseHoursArg (line 16) | function parseHoursArg(defaultHours: number) { function writeJson (line 24) | function writeJson(payload: unknown) { function writeError (line 28) | function writeError(payload: unknown) { function main (line 32) | async function main() { FILE: scripts/billing-reconcile-ledger.ts type UserLedgerRow (line 4) | type UserLedgerRow = { function hasStrictFlag (line 13) | function hasStrictFlag() { function write (line 17) | function write(payload: unknown) { function main (line 21) | async function main() { FILE: scripts/bull-board.ts function unauthorized (line 17) | function unauthorized(res: Response) { function basicAuthMiddleware (line 22) | function basicAuthMiddleware(req: Request, res: Response, next: NextFunc... function shutdown (line 91) | async function shutdown(signal: string) { FILE: scripts/check-api-handler.ts constant ALLOWLIST (line 4) | const ALLOWLIST = new Set([ function main (line 10) | function main() { FILE: scripts/check-capability-catalog.mjs constant CATALOG_DIR (line 4) | const CATALOG_DIR = path.resolve(process.cwd(), 'standards/capabilities') constant CAPABILITY_NAMESPACES (line 5) | const CAPABILITY_NAMESPACES = new Set(['llm', 'image', 'video', 'audio',... constant CAPABILITY_NAMESPACE_ALLOWED_FIELDS (line 6) | const CAPABILITY_NAMESPACE_ALLOWED_FIELDS = { constant CAPABILITY_NAMESPACE_I18N_FIELDS (line 22) | const CAPABILITY_NAMESPACE_I18N_FIELDS = { constant MODEL_TYPES (line 35) | const MODEL_TYPES = new Set(['llm', 'image', 'video', 'audio', 'lipsync']) function isRecord (line 37) | function isRecord(value) { function isNonEmptyString (line 41) | function isNonEmptyString(value) { function isI18nKey (line 45) | function isI18nKey(value) { function isStringArray (line 49) | function isStringArray(value) { function isNumberArray (line 53) | function isNumberArray(value) { function isBooleanArray (line 57) | function isBooleanArray(value) { function parseModelKeyStrict (line 61) | function parseModelKeyStrict(value) { function pushIssue (line 72) | function pushIssue(issues, file, index, field, message) { function validateAllowedFields (line 76) | function validateAllowedFields(issues, file, index, namespace, namespace... function validateFieldI18nMap (line 89) | function validateFieldI18nMap(issues, file, index, namespace, namespaceV... function validateCapabilitiesForModelType (line 152) | function validateCapabilitiesForModelType(issues, file, index, modelType... function listCatalogFiles (line 263) | async function listCatalogFiles() { function readCatalog (line 270) | async function readCatalog(filePath) { function main (line 279) | async function main() { FILE: scripts/check-image-urls-contract.ts type AppearanceRow (line 5) | type AppearanceRow = { type DynamicModel (line 11) | type DynamicModel = { constant BATCH_SIZE (line 15) | const BATCH_SIZE = 500 constant MODELS (line 17) | const MODELS: Array<{ name: string; model: string }> = [ function print (line 24) | function print(message: string) { function checkModel (line 28) | async function checkModel(modelName: string, modelKey: string) { function main (line 91) | async function main() { FILE: scripts/check-log-semantic.ts type Rule (line 3) | type Rule = { constant RULES (line 8) | const RULES: Rule[] = [ function read (line 39) | function read(file: string) { function checkRules (line 43) | function checkRules() { function checkSubmitTaskRoutes (line 56) | function checkSubmitTaskRoutes() { function walk (line 76) | function walk(dir: string): string[] { function main (line 92) | function main() { FILE: scripts/check-media-normalization.ts constant TARGETS (line 3) | const TARGETS = ['src/app/api', 'src/lib'] constant EXTRACT_ALLOWLIST (line 5) | const EXTRACT_ALLOWLIST = new Set([ constant FETCH_MEDIA_ALLOWLIST (line 10) | const FETCH_MEDIA_ALLOWLIST = new Set([ function run (line 23) | function run(cmd: string): string { function parseLines (line 35) | function parseLines(output: string): string[] { function getFile (line 42) | function getFile(line: string): string { function getCode (line 46) | function getCode(line: string): string { function extractFetchArg (line 51) | function extractFetchArg(code: string): string { function isSafeFetchArg (line 56) | function isSafeFetchArg(arg: string): boolean { function isMediaLikeFetchArg (line 64) | function isMediaLikeFetchArg(arg: string): boolean { function main (line 68) | function main() { FILE: scripts/check-model-config-contract.mjs constant STRICT (line 3) | const STRICT = process.argv.includes('--strict') constant MODEL_FIELDS (line 4) | const MODEL_FIELDS = [ constant MAX_SAMPLES (line 12) | const MAX_SAMPLES = 200 constant CAPABILITY_NAMESPACES (line 13) | const CAPABILITY_NAMESPACES = new Set(['llm', 'image', 'video', 'audio',... constant MODEL_TYPES (line 14) | const MODEL_TYPES = new Set(['llm', 'image', 'video', 'audio', 'lipsync']) constant CAPABILITY_NAMESPACE_ALLOWED_FIELDS (line 15) | const CAPABILITY_NAMESPACE_ALLOWED_FIELDS = { constant CAPABILITY_NAMESPACE_I18N_FIELDS (line 30) | const CAPABILITY_NAMESPACE_I18N_FIELDS = { function isRecord (line 51) | function isRecord(value) { function isNonEmptyString (line 55) | function isNonEmptyString(value) { function isStringArray (line 59) | function isStringArray(value) { function isNumberArray (line 63) | function isNumberArray(value) { function parseModelKeyStrict (line 67) | function parseModelKeyStrict(value) { function addSample (line 82) | function addSample(summary, sample) { function pushIssue (line 87) | function pushIssue(issues, field, message) { function isI18nKey (line 91) | function isI18nKey(value) { function validateAllowedFields (line 95) | function validateAllowedFields(issues, namespace, namespaceValue) { function validateFieldI18nMap (line 108) | function validateFieldI18nMap(issues, namespace, namespaceValue) { function validateCapabilities (line 185) | function validateCapabilities(modelType, capabilities) { function main (line 290) | async function main() { FILE: scripts/check-no-console.ts constant ALLOWLIST (line 3) | const ALLOWLIST = new Set([ function run (line 17) | function run(cmd: string): string { function main (line 29) | function main() { FILE: scripts/check-outbound-image-runtime-sample.ts type AnyJson (line 4) | type AnyJson = unknown type Match (line 6) | type Match = { type Options (line 11) | type Options = { type FailureType (line 21) | type FailureType = 'normalize' | 'model' | 'cancelled' | 'other' constant MODEL_ERROR_CODES (line 23) | const MODEL_ERROR_CODES = new Set([ function parseNumberArg (line 31) | function parseNumberArg(name: string, fallback: number): number { function parseStringArg (line 38) | function parseStringArg(name: string): string | null { function parseBooleanArg (line 45) | function parseBooleanArg(name: string, fallback = false): boolean { function parseOptions (line 52) | function parseOptions(): Options { function toExcerpt (line 64) | function toExcerpt(value: string, max = 180): string { function findStringMatches (line 69) | function findStringMatches( function classifyFailure (line 93) | function classifyFailure(task: { function main (line 131) | async function main() { FILE: scripts/check-outbound-image-success-rate.ts type StatusCount (line 4) | type StatusCount = Record type WindowSummary (line 6) | type WindowSummary = { type Options (line 16) | type Options = { constant DEFAULT_MINUTES (line 27) | const DEFAULT_MINUTES = 60 * 24 * 7 constant DEFAULT_TOLERANCE_PCT (line 28) | const DEFAULT_TOLERANCE_PCT = 2 constant DEFAULT_MIN_FINISHED_SAMPLES (line 29) | const DEFAULT_MIN_FINISHED_SAMPLES = 20 function parseNumberArg (line 31) | function parseNumberArg(name: string, fallback: number): number { function parseBooleanArg (line 38) | function parseBooleanArg(name: string, fallback = false): boolean { function parseStringArg (line 45) | function parseStringArg(name: string): string | null { function parseOptions (line 52) | function parseOptions(): Options { function asPct (line 68) | function asPct(value: number | null): string { function getSuccessRate (line 72) | function getSuccessRate(completed: number, failed: number): number | null { function summarizeRows (line 78) | function summarizeRows( function fetchWindowSummary (line 103) | async function fetchWindowSummary(params: { function main (line 132) | async function main() { FILE: scripts/check-outbound-image-unification.ts type Rule (line 4) | type Rule = { function readFile (line 10) | function readFile(relativePath: string): string { function main (line 131) | function main() { FILE: scripts/check-pricing-catalog.mjs constant CATALOG_DIR (line 4) | const CATALOG_DIR = path.resolve(process.cwd(), 'standards/pricing') constant CAPABILITY_CATALOG_FILE (line 5) | const CAPABILITY_CATALOG_FILE = path.resolve(process.cwd(), 'standards/c... constant API_TYPES (line 6) | const API_TYPES = new Set(['text', 'image', 'video', 'voice', 'voice-des... constant PRICING_MODES (line 7) | const PRICING_MODES = new Set(['flat', 'capability']) constant TEXT_TOKEN_TYPES (line 8) | const TEXT_TOKEN_TYPES = new Set(['input', 'output']) function isRecord (line 10) | function isRecord(value) { function isNonEmptyString (line 14) | function isNonEmptyString(value) { function isCapabilityValue (line 18) | function isCapabilityValue(value) { function isFiniteNumber (line 22) | function isFiniteNumber(value) { function pushIssue (line 26) | function pushIssue(issues, file, index, field, message) { function getProviderKey (line 30) | function getProviderKey(providerId) { function buildModelKey (line 35) | function buildModelKey(modelType, provider, modelId) { function listCatalogFiles (line 39) | async function listCatalogFiles() { function readCatalog (line 46) | async function readCatalog(filePath) { function readCapabilityCatalog (line 55) | async function readCapabilityCatalog() { function extractCapabilityOptionFields (line 64) | function extractCapabilityOptionFields(modelType, capabilities) { function buildCapabilityOptionFieldMap (line 79) | function buildCapabilityOptionFieldMap(capabilityEntries) { function validateTier (line 99) | function validateTier(issues, file, index, tier, tierIndex) { function validateTextCapabilityTiers (line 126) | function validateTextCapabilityTiers(issues, file, index, tiers) { function validateMediaCapabilityTierFields (line 159) | function validateMediaCapabilityTierFields(issues, file, index, item, ti... function validateDuplicateCapabilityTiers (line 189) | function validateDuplicateCapabilityTiers(issues, file, index, tiers) { function validatePricing (line 203) | function validatePricing(issues, file, index, item, capabilityOptionFiel... function main (line 243) | async function main() { FILE: scripts/cleanup-remove-legacy-voice-data.ts type CharacterVoiceRecord (line 3) | type CharacterVoiceRecord = { type SpeakerVoiceConfig (line 8) | type SpeakerVoiceConfig = { type CleanupSummary (line 15) | type CleanupSummary = { function hasPlayableAudioUrl (line 23) | function hasPlayableAudioUrl(value: unknown) { function normalizeVoiceType (line 27) | function normalizeVoiceType(customVoiceUrl: string | null) { function cleanupCharacterTable (line 31) | async function cleanupCharacterTable(records: CharacterVoiceRecord[], ta... function normalizeSpeakerVoices (line 57) | function normalizeSpeakerVoices(payload: string): { function main (line 119) | async function main() { FILE: scripts/diagnose-project.ts function diagnoseProject (line 10) | async function diagnoseProject(projectId: string) { FILE: scripts/guards/api-route-contract-guard.mjs constant API_HANDLER_ALLOWLIST (line 11) | const API_HANDLER_ALLOWLIST = new Set([ constant PUBLIC_ROUTE_ALLOWLIST (line 17) | const PUBLIC_ROUTE_ALLOWLIST = new Set([ constant AUTH_CALL_PATTERNS (line 26) | const AUTH_CALL_PATTERNS = [ function fail (line 32) | function fail(title, details = []) { function walk (line 40) | function walk(dir, out = []) { function toRel (line 55) | function toRel(fullPath) { function hasApiHandlerWrapper (line 59) | function hasApiHandlerWrapper(content) { function hasRequiredAuth (line 63) | function hasRequiredAuth(content) { function inspectRouteContract (line 67) | function inspectRouteContract(relPath, content) { function findApiRouteContractViolations (line 81) | function findApiRouteContractViolations(scanRoot = root) { function main (line 92) | function main() { FILE: scripts/guards/changed-file-test-impact-guard.mjs constant RULES (line 6) | const RULES = [ function normalizeChangedFiles (line 39) | function normalizeChangedFiles(rawFiles) { function readGitChangedFiles (line 46) | function readGitChangedFiles() { function inspectChangedFiles (line 59) | function inspectChangedFiles(changedFiles) { function fail (line 76) | function fail(violations) { function runCli (line 84) | function runCli() { FILE: scripts/guards/file-line-count-guard.mjs constant ROOT (line 5) | const ROOT = process.cwd() constant RULES (line 7) | const RULES = [ FILE: scripts/guards/image-reference-normalization-guard.mjs constant NORMALIZATION_HELPER_ALLOWLIST (line 11) | const NORMALIZATION_HELPER_ALLOWLIST = new Set([ constant ACCEPTED_NORMALIZATION_MARKERS (line 15) | const ACCEPTED_NORMALIZATION_MARKERS = [ function fail (line 21) | function fail(title, details = []) { function walk (line 29) | function walk(dir, out = []) { function toRel (line 44) | function toRel(fullPath) { function usesGenerationReferenceImages (line 48) | function usesGenerationReferenceImages(content) { function hasNormalizationMarker (line 52) | function hasNormalizationMarker(content) { function inspectImageReferenceNormalization (line 56) | function inspectImageReferenceNormalization(relPath, content) { function findImageReferenceNormalizationViolations (line 65) | function findImageReferenceNormalizationViolations(scanRoot = root) { function main (line 76) | function main() { FILE: scripts/guards/locale-navigation-guard.mjs function toRel (line 19) | function toRel(fullPath) { function walk (line 23) | function walk(dir, out = []) { function gatherTargetFiles (line 40) | function gatherTargetFiles() { function findViolations (line 51) | function findViolations(content, relPath) { FILE: scripts/guards/no-api-direct-llm-call.mjs function fail (line 12) | function fail(title, details = []) { function toRel (line 20) | function toRel(fullPath) { function walk (line 24) | function walk(dir, out = []) { function isAllowedFile (line 42) | function isAllowedFile(relPath) { function collectViolations (line 46) | function collectViolations(fullPath) { FILE: scripts/guards/no-duplicate-endpoint-entry.mjs constant ROOT (line 5) | const ROOT = process.cwd() constant API_ROOT (line 6) | const API_ROOT = path.join(ROOT, 'src', 'app', 'api') constant KNOWN_DUPLICATE_GROUPS (line 8) | const KNOWN_DUPLICATE_GROUPS = [ FILE: scripts/guards/no-hardcoded-model-capabilities.mjs function fail (line 21) | function fail(title, details = []) { function toRel (line 29) | function toRel(fullPath) { function walk (line 33) | function walk(dir, out = []) { FILE: scripts/guards/no-internal-task-sync-fallback.mjs function fail (line 12) | function fail(title, details = []) { function toRel (line 20) | function toRel(fullPath) { function walk (line 24) | function walk(dir, out = []) { function isAllowedFile (line 41) | function isAllowedFile(relPath) { function collectViolations (line 45) | function collectViolations(fullPath) { FILE: scripts/guards/no-media-provider-bypass.mjs function fail (line 14) | function fail(title, details = []) { function toRel (line 22) | function toRel(fullPath) { function walk (line 26) | function walk(dir, out = []) { FILE: scripts/guards/no-model-key-downgrade.mjs function fail (line 19) | function fail(title, details = []) { function toRel (line 27) | function toRel(fullPath) { function walk (line 31) | function walk(dir, out = []) { function collectViolations (line 48) | function collectViolations(filePath) { function assertFileContains (line 69) | function assertFileContains(relativePath, requiredSnippets) { FILE: scripts/guards/no-multiple-sources-of-truth.mjs function fail (line 35) | function fail(title, details = []) { function toRel (line 43) | function toRel(fullPath) { function walk (line 47) | function walk(dir, out = []) { function collectLineViolations (line 62) | function collectLineViolations(fullPath) { function collectFileViolations (line 80) | function collectFileViolations(fullPath) { FILE: scripts/guards/no-provider-guessing.mjs function fail (line 12) | function fail(title, details = []) { function toRel (line 20) | function toRel(fullPath) { function walk (line 24) | function walk(dir, out = []) { FILE: scripts/guards/no-server-mirror-state.mjs function fail (line 28) | function fail(title, details = []) { function toRel (line 36) | function toRel(fullPath) { function walk (line 40) | function walk(dir, out = []) { function collectViolations (line 56) | function collectViolations(fullPath) { FILE: scripts/guards/prompt-ab-regression.mjs function fail (line 13) | function fail(title, details = []) { function parseCatalog (line 21) | function parseCatalog(text) { function extractPlaceholders (line 33) | function extractPlaceholders(template) { function replaceAll (line 44) | function replaceAll(template, variables) { function setDiff (line 53) | function setDiff(left, right) { FILE: scripts/guards/prompt-i18n-guard.mjs function fail (line 22) | function fail(title, details = []) { function toRel (line 30) | function toRel(fullPath) { function walk (line 34) | function walk(dir, out = []) { function listSourceFiles (line 49) | function listSourceFiles() { function collectDirectPromptReadViolations (line 55) | function collectDirectPromptReadViolations() { function collectLanguageDirectiveViolations (line 77) | function collectLanguageDirectiveViolations() { function collectLegacyPromptFiles (line 108) | function collectLegacyPromptFiles() { function verifyPromptCatalogCoverage (line 114) | function verifyPromptCatalogCoverage() { FILE: scripts/guards/prompt-json-canary-guard.mjs constant CANARY_FILES (line 9) | const CANARY_FILES = { constant TEMPLATE_TOKEN_REQUIREMENTS (line 16) | const TEMPLATE_TOKEN_REQUIREMENTS = { function fail (line 70) | function fail(title, details = []) { function isRecord (line 78) | function isRecord(value) { function isString (line 82) | function isString(value) { function isNumber (line 86) | function isNumber(value) { function readJson (line 90) | function readJson(relativePath) { function validateClipCanary (line 102) | function validateClipCanary(value) { function validateScreenplayCanary (line 118) | function validateScreenplayCanary(value) { function validateStoryboardPanelsCanary (line 164) | function validateStoryboardPanelsCanary(value) { function validateVoiceAnalysisCanary (line 191) | function validateVoiceAnalysisCanary(value) { function checkTemplateTokens (line 209) | function checkTemplateTokens(pathStem, requiredTokens) { FILE: scripts/guards/prompt-semantic-regression.mjs function fail (line 26) | function fail(title, details = []) { function parseCatalog (line 34) | function parseCatalog(text) { function extractPlaceholders (line 46) | function extractPlaceholders(template) { FILE: scripts/guards/task-loading-guard.mjs function walkFiles (line 10) | function walkFiles(dir, out = []) { function toPosixRelative (line 24) | function toPosixRelative(filePath) { function collectMatches (line 28) | function collectMatches(files, pattern) { function fail (line 44) | function fail(title, lines) { FILE: scripts/guards/task-submit-compensation-guard.mjs constant CREATE_PATTERN (line 10) | const CREATE_PATTERN = /\.\s*create\s*\(/ constant SUBMIT_TASK_PATTERN (line 11) | const SUBMIT_TASK_PATTERN = /\bsubmitTask\s*\(/ constant ROLLBACK_PATTERN (line 12) | const ROLLBACK_PATTERN = /rollback|compensat/i function fail (line 14) | function fail(title, details = []) { function walk (line 22) | function walk(dir, out = []) { function toRel (line 37) | function toRel(fullPath) { function inspectTaskSubmitCompensation (line 41) | function inspectTaskSubmitCompensation(relPath, content) { function findTaskSubmitCompensationViolations (line 50) | function findTaskSubmitCompensationViolations(scanRoot = root) { function main (line 61) | function main() { FILE: scripts/guards/task-target-states-no-polling-guard.mjs function fail (line 9) | function fail(title, details = []) { function readFile (line 17) | function readFile(relativePath) { function walk (line 25) | function walk(dir, out = []) { function toRel (line 39) | function toRel(fullPath) { function collectPattern (line 43) | function collectPattern(pattern) { FILE: scripts/guards/test-behavior-quality-guard.mjs function fail (line 15) | function fail(title, details = []) { function walk (line 23) | function walk(dir, out = []) { function toRel (line 38) | function toRel(fullPath) { FILE: scripts/guards/test-behavior-route-coverage-guard.mjs function fail (line 10) | function fail(title, details = []) { FILE: scripts/guards/test-behavior-tasktype-coverage-guard.mjs function fail (line 10) | function fail(title, details = []) { FILE: scripts/guards/test-route-coverage-guard.mjs function fail (line 10) | function fail(title, details = []) { function walk (line 18) | function walk(dir, out = []) { function toRel (line 33) | function toRel(fullPath) { FILE: scripts/guards/test-tasktype-coverage-guard.mjs function fail (line 10) | function fail(title, details = []) { FILE: scripts/media-archive-legacy-refs.ts constant BACKUP_ROOT (line 8) | const BACKUP_ROOT = path.join(process.cwd(), 'data', 'migration-backups') constant BATCH_SIZE (line 9) | const BATCH_SIZE = 500 type DynamicModel (line 10) | type DynamicModel = { function nowStamp (line 16) | function nowStamp() { function checksum (line 20) | function checksum(value: string) { function toSelect (line 24) | function toSelect(fields: string[]) { function main (line 30) | async function main() { FILE: scripts/media-backfill-refs.ts constant BATCH_SIZE (line 6) | const BATCH_SIZE = 200 type DynamicModel (line 7) | type DynamicModel = { function toSelect (line 13) | function toSelect(fields: string[]) { function backfillModel (line 19) | async function backfillModel(mapping: (typeof MEDIA_MODEL_MAPPINGS)[numb... function main (line 90) | async function main() { FILE: scripts/media-build-unreferenced-index.ts type StorageEntry (line 9) | type StorageEntry = { type CosBucketPage (line 14) | type CosBucketPage = { type DynamicModel (line 19) | type DynamicModel = { constant BACKUP_ROOT (line 24) | const BACKUP_ROOT = path.join(process.cwd(), 'data', 'migration-backups') function nowStamp (line 26) | function nowStamp() { function listLocalObjects (line 30) | async function listLocalObjects(): Promise { function listCosObjects (line 62) | async function listCosObjects(): Promise { function listStorageObjects (line 108) | async function listStorageObjects() { function buildReferencedKeySet (line 116) | async function buildReferencedKeySet() { function main (line 169) | async function main() { FILE: scripts/media-mapping.ts type MediaFieldMapping (line 1) | type MediaFieldMapping = { type MediaModelMapping (line 6) | type MediaModelMapping = { constant MEDIA_MODEL_MAPPINGS (line 12) | const MEDIA_MODEL_MAPPINGS: MediaModelMapping[] = [ FILE: scripts/media-restore-dry-run.ts constant BACKUP_ROOT (line 6) | const BACKUP_ROOT = path.join(process.cwd(), 'data', 'migration-backups') type CountMap (line 8) | type CountMap = Record function findLatestBackupDir (line 10) | async function findLatestBackupDir() { function readExpectedCounts (line 32) | async function readExpectedCounts(backupDir: string): Promise { function currentCounts (line 39) | async function currentCounts(): Promise { function printDiff (line 69) | function printDiff(expected: CountMap, actual: CountMap) { function main (line 85) | async function main() { FILE: scripts/media-safety-backup.ts type SnapshotTask (line 8) | type SnapshotTask = { type StorageIndexRow (line 13) | type StorageIndexRow = { type CosBucketPage (line 20) | type CosBucketPage = { constant BACKUP_ROOT (line 31) | const BACKUP_ROOT = path.join(process.cwd(), 'data', 'migration-backups') function nowStamp (line 33) | function nowStamp() { function toJson (line 37) | function toJson(value: unknown) { function writeJson (line 45) | async function writeJson(filePath: string, data: unknown) { function sha256Text (line 49) | function sha256Text(input: string) { function resolveDatabaseFilePath (line 53) | function resolveDatabaseFilePath(databaseUrl: string | undefined): strin... function listLocalFilesRecursively (line 63) | async function listLocalFilesRecursively(rootDir: string, prefix = ''): ... function listCosObjects (line 90) | async function listCosObjects(): Promise { function buildStorageIndex (line 136) | async function buildStorageIndex(): Promise<{ storageType: string; rows:... function snapshotTables (line 153) | async function snapshotTables(backupDir: string) { function writeChecksums (line 179) | async function writeChecksums(backupDir: string) { function backupDbFile (line 194) | async function backupDbFile(backupDir: string) { function main (line 207) | async function main() { FILE: scripts/migrate-cancelled-to-failed.ts constant OLD_STATUS (line 3) | const OLD_STATUS = 'cancelled' constant NEW_STATUS (line 4) | const NEW_STATUS = 'failed' constant OLD_EVENT_TYPE (line 5) | const OLD_EVENT_TYPE = 'task.cancelled' constant NEW_EVENT_TYPE (line 6) | const NEW_EVENT_TYPE = 'task.failed' constant MIGRATION_ERROR_CODE (line 7) | const MIGRATION_ERROR_CODE = 'USER_CANCELLED' constant MIGRATION_ERROR_MESSAGE (line 8) | const MIGRATION_ERROR_MESSAGE = '用户已停止任务。' function log (line 10) | function log(message: string) { function logError (line 14) | function logError(message: string) { function main (line 18) | async function main() { FILE: scripts/migrate-image-urls-contract.ts type AppearanceRow (line 5) | type AppearanceRow = { type DynamicModel (line 11) | type DynamicModel = { type FieldName (line 16) | type FieldName = 'imageUrls' | 'previousImageUrls' type NormalizeResult (line 18) | type NormalizeResult = { type ModelStats (line 24) | type ModelStats = { constant BATCH_SIZE (line 31) | const BATCH_SIZE = 200 constant APPLY (line 32) | const APPLY = process.argv.includes('--apply') constant MODELS (line 34) | const MODELS: Array<{ name: string; model: string }> = [ function print (line 41) | function print(message: string) { function normalizeField (line 45) | function normalizeField(raw: string | null): NormalizeResult { function migrateModel (line 97) | async function migrateModel(modelName: string, modelKey: string) { function main (line 205) | async function main() { FILE: scripts/migrate-local-to-minio.ts constant LOCAL_DIR (line 15) | const LOCAL_DIR = process.env.LOCAL_UPLOAD_DIR || './data/uploads' constant MINIO_ENDPOINT (line 16) | const MINIO_ENDPOINT = process.env.MINIO_ENDPOINT || 'http://127.0.0.1:1... constant MINIO_BUCKET (line 17) | const MINIO_BUCKET = process.env.MINIO_BUCKET || 'waoowaoo' constant MINIO_REGION (line 18) | const MINIO_REGION = process.env.MINIO_REGION || 'us-east-1' constant MINIO_ACCESS_KEY (line 19) | const MINIO_ACCESS_KEY = process.env.MINIO_ACCESS_KEY || 'minioadmin' constant MINIO_SECRET_KEY (line 20) | const MINIO_SECRET_KEY = process.env.MINIO_SECRET_KEY || 'minioadmin' constant CONCURRENCY (line 21) | const CONCURRENCY = parseInt(process.env.MIGRATE_CONCURRENCY || '10') constant DRY_RUN (line 22) | const DRY_RUN = process.env.MIGRATE_DRY_RUN === 'true' function guessContentType (line 36) | function guessContentType(filename: string): string { function formatBytes (line 55) | function formatBytes(bytes: number): string { function scanLocalFiles (line 64) | async function scanLocalFiles(dir: string, basePath = ''): Promise { function uploadFile (line 104) | async function uploadFile(file: { localPath: string; key: string; size: ... function runBatched (line 131) | async function runBatched(items: T[], concurrency: number, fn: (item:... function main (line 139) | async function main() { FILE: scripts/migrate-to-minio.ts constant CONFIG (line 20) | const CONFIG = { constant LOG_LEVELS (line 47) | const LOG_LEVELS = { debug: 0, info: 1, warn: 2, error: 3 } function log (line 48) | function log(level: string, message: string, ...args: unknown[]) { function scanLocalFiles (line 66) | async function scanLocalFiles(dir: string, basePath = ''): Promise { function loadProgress (line 109) | async function loadProgress(): Promise> { function saveProgress (line 122) | async function saveProgress(migratedKeys: Set) { function ensureBucket (line 131) | async function ensureBucket() { function uploadFile (line 157) | async function uploadFile(fileInfo: {localPath: string, key: string, siz... function guessContentType (line 198) | function guessContentType(filename: string): string { function formatBytes (line 217) | function formatBytes(bytes: number): string { function runWithConcurrency (line 226) | async function runWithConcurrency(tasks: Array<() => Promise>, con... function main (line 247) | async function main() { FILE: scripts/migrations/migrate-capability-selections.ts constant APPLY (line 9) | const APPLY = process.argv.includes('--apply') constant USER_IMAGE_MODEL_FIELDS (line 11) | const USER_IMAGE_MODEL_FIELDS = [ constant PROJECT_IMAGE_MODEL_FIELDS (line 18) | const PROJECT_IMAGE_MODEL_FIELDS = [ type UserImageModelField (line 25) | type UserImageModelField = typeof USER_IMAGE_MODEL_FIELDS[number] type ProjectImageModelField (line 26) | type ProjectImageModelField = typeof PROJECT_IMAGE_MODEL_FIELDS[number] type UserPreferenceRow (line 28) | interface UserPreferenceRow { type ProjectRow (line 39) | interface ProjectRow { type MigrationSummary (line 52) | interface MigrationSummary { function isRecord (line 67) | function isRecord(value: unknown): value is Record { function isCapabilityValue (line 71) | function isCapabilityValue(value: unknown): value is CapabilityValue { function normalizeSelections (line 75) | function normalizeSelections(raw: unknown): CapabilitySelections { function parseSelections (line 95) | function parseSelections(raw: string | null): CapabilitySelections { function serializeSelections (line 104) | function serializeSelections(selections: CapabilitySelections): string |... function getCapabilityResolutionOptions (line 109) | function getCapabilityResolutionOptions( function ensureModelResolutionSelection (line 126) | function ensureModelResolutionSelection(input: { function collectModelKeys (line 148) | function collectModelKeys( function migrateUserPreferences (line 163) | async function migrateUserPreferences(summary: MigrationSummary) { function migrateProjects (line 210) | async function migrateProjects(summary: MigrationSummary) { function main (line 271) | async function main() { FILE: scripts/migrations/migrate-custom-pricing-v2.ts constant APPLY (line 3) | const APPLY = process.argv.includes('--apply') type PreferenceRow (line 5) | type PreferenceRow = { type MigrationSummary (line 11) | type MigrationSummary = { function isRecord (line 19) | function isRecord(value: unknown): value is Record { function parseCustomModels (line 23) | function parseCustomModels(raw: string | null): unknown[] | null { function migrateLegacyCustomPricing (line 34) | function migrateLegacyCustomPricing(raw: unknown): { function migrateCustomModel (line 73) | function migrateCustomModel(rawModel: unknown): { changed: boolean; next... function main (line 92) | async function main() { FILE: scripts/migrations/migrate-gateway-route-openai-compat.ts constant APPLY (line 4) | const APPLY = process.argv.includes('--apply') type PreferenceRow (line 6) | type PreferenceRow = { type MigrationSummary (line 12) | type MigrationSummary = { function main (line 23) | async function main() { FILE: scripts/migrations/migrate-graph-artifacts-unique-index.ts constant APPLY (line 3) | const APPLY = process.argv.includes('--apply') constant REQUIRED_INDEX_NAME (line 4) | const REQUIRED_INDEX_NAME = 'graph_artifacts_runId_stepKey_artifactType_... constant REQUIRED_COLUMNS (line 5) | const REQUIRED_COLUMNS = ['runId', 'stepKey', 'artifactType', 'refId'] a... type IndexRow (line 7) | type IndexRow = { type DuplicateRow (line 14) | type DuplicateRow = { type MigrationSummary (line 22) | type MigrationSummary = { function parseIntSafe (line 37) | function parseIntSafe(value: number | string) { function hasRequiredUniqueIndex (line 42) | function hasRequiredUniqueIndex(rows: IndexRow[]) { function toNumber (line 70) | function toNumber(value: bigint | number) { function loadIndexRows (line 75) | async function loadIndexRows() { function loadDuplicateGroups (line 79) | async function loadDuplicateGroups() { function main (line 90) | async function main() { FILE: scripts/migrations/migrate-model-config-contract.ts type ModelField (line 12) | type ModelField = type PreferenceRow (line 20) | type PreferenceRow = { type ProjectRow (line 32) | type ProjectRow = { type MigrationIssue (line 46) | type MigrationIssue = { type MigrationReport (line 65) | type MigrationReport = { type NormalizedModel (line 82) | type NormalizedModel = { constant APPLY (line 93) | const APPLY = process.argv.includes('--apply') constant MAX_ISSUES (line 94) | const MAX_ISSUES = 500 constant MODEL_FIELDS (line 95) | const MODEL_FIELDS: readonly ModelField[] = [ constant LEGACY_MODEL_ID_MAP (line 104) | const LEGACY_MODEL_ID_MAP = new Map([ function parseReportPathArg (line 122) | function parseReportPathArg(): string { function isRecord (line 133) | function isRecord(value: unknown): value is Record { function toTrimmedString (line 137) | function toTrimmedString(value: unknown): string { function isUnifiedModelType (line 141) | function isUnifiedModelType(value: unknown): value is UnifiedModelType { function stableStringify (line 149) | function stableStringify(value: unknown): string { function parseCustomModels (line 153) | function parseCustomModels(raw: string | null): { ok: true; value: unkno... function normalizeModel (line 164) | function normalizeModel( function addIssue (line 263) | function addIssue(report: MigrationReport, issue: MigrationIssue) { function normalizeModelFieldValue (line 268) | function normalizeModelFieldValue( function main (line 315) | async function main() { FILE: scripts/migrations/migrate-qwen-to-bailian.ts constant APPLY (line 4) | const APPLY = process.argv.includes('--apply') type PreferenceRow (line 6) | type PreferenceRow = { type StoredProvider (line 21) | type StoredProvider = { type StoredModel (line 30) | type StoredModel = { type MigrationConflict (line 39) | type MigrationConflict = { type MigrationSummary (line 44) | type MigrationSummary = { type DefaultModelField (line 56) | type DefaultModelField = constant DEFAULT_MODEL_FIELDS (line 65) | const DEFAULT_MODEL_FIELDS: readonly DefaultModelField[] = [ function isRecord (line 75) | function isRecord(value: unknown): value is Record { function readTrimmedString (line 79) | function readTrimmedString(value: unknown): string { function parseProviders (line 83) | function parseProviders(raw: string | null): StoredProvider[] | null { function parseModels (line 107) | function parseModels(raw: string | null): StoredModel[] | null { function parseCapabilityDefaults (line 139) | function parseCapabilityDefaults(raw: string | null): CapabilitySelectio... function migrateProviderId (line 161) | function migrateProviderId(providerId: string): string { function migrateModelKey (line 172) | function migrateModelKey(rawModelKey: string): string { function migrateDefaultModel (line 179) | function migrateDefaultModel(rawValue: string | null): string | null { function hasProviderByKey (line 186) | function hasProviderByKey(providers: StoredProvider[], providerKey: stri... function main (line 194) | async function main() { FILE: scripts/migrations/migrate-release-blockers.ts type Mode (line 4) | type Mode = 'dry-run' | 'apply' type UserPreferenceRow (line 6) | type UserPreferenceRow = { type NovelProjectRow (line 22) | type NovelProjectRow = { type StoredProvider (line 34) | type StoredProvider = { type StoredModel (line 43) | type StoredModel = { type ParseResult (line 50) | type ParseResult = { type MigrationSummary (line 55) | type MigrationSummary = { type MysqlIndexRow (line 96) | type MysqlIndexRow = { type DuplicateGroupRow (line 103) | type DuplicateGroupRow = { type CountRow (line 111) | type CountRow = { type DefaultModelField (line 115) | type DefaultModelField = type ProjectModelField (line 125) | type ProjectModelField = type UserPreferenceUpdateData (line 133) | type UserPreferenceUpdateData = Partial { function readTrimmedString (line 171) | function readTrimmedString(value: unknown): string { function toNullableModelField (line 175) | function toNullableModelField(raw: string | null | undefined): string | ... function getProviderKey (line 180) | function getProviderKey(providerId: string): string { function migrateProviderId (line 185) | function migrateProviderId(providerId: string): string { function migrateModelKey (line 195) | function migrateModelKey(rawModelKey: string): string { function providerPriorityByOriginalKey (line 203) | function providerPriorityByOriginalKey(originalProviderId: string): numb... function normalizeGatewayRoute (line 210) | function normalizeGatewayRoute( function parseJsonArray (line 221) | function parseJsonArray(raw: string | null): ParseResult { function parseJsonRecord (line 232) | function parseJsonRecord(raw: string | null): ParseResult { function countGraphArtifactDuplicateGroups (line 587) | async function countGraphArtifactDuplicateGroups(): Promise { function sampleGraphArtifactDuplicateGroups (line 601) | async function sampleGraphArtifactDuplicateGroups(limit: number): Promis... function dedupeGraphArtifacts (line 612) | async function dedupeGraphArtifacts(): Promise { function addGraphArtifactUniqueIndex (line 628) | async function addGraphArtifactUniqueIndex(): Promise { function migrateUserPreferences (line 634) | async function migrateUserPreferences(summary: MigrationSummary): Promis... function migrateNovelProjects (line 719) | async function migrateNovelProjects(summary: MigrationSummary): Promise<... function migrateGraphArtifacts (line 776) | async function migrateGraphArtifacts(summary: MigrationSummary): Promise... function main (line 817) | async function main() { FILE: scripts/task-error-stats.ts function parseMinutesArg (line 4) | function parseMinutesArg() { function main (line 10) | async function main() { FILE: scripts/test-full-image-flow.ts function testFullImageFlow (line 13) | async function testFullImageFlow() { FILE: scripts/test-image-url-flow.ts function testImageUrlFlow (line 14) | async function testImageUrlFlow() { FILE: scripts/test-minio.ts function testMinio (line 11) | async function testMinio() { FILE: scripts/test-sign-api.ts function testSignApi (line 12) | async function testSignApi() { FILE: scripts/watchdog.ts constant INTERVAL_MS (line 10) | const INTERVAL_MS = Number.parseInt(process.env.WATCHDOG_INTERVAL_MS || ... constant HEARTBEAT_TIMEOUT_MS (line 11) | const HEARTBEAT_TIMEOUT_MS = Number.parseInt(process.env.TASK_HEARTBEAT_... constant TASK_TYPE_SET (line 12) | const TASK_TYPE_SET: ReadonlySet = new Set(Object.values(TASK_TY... constant LOG_CLEANUP_INTERVAL_TICKS (line 14) | const LOG_CLEANUP_INTERVAL_TICKS = Math.ceil(3600_000 / INTERVAL_MS) function toTaskType (line 21) | function toTaskType(value: string): TaskType | null { function toTaskPayload (line 28) | function toTaskPayload(value: unknown): Record | null { function recoverQueuedTasks (line 35) | async function recoverQueuedTasks() { function cleanupZombieProcessingTasks (line 128) | async function cleanupZombieProcessingTasks() { function tick (line 187) | async function tick() { FILE: src/app/[locale]/auth/signin/page.tsx function SignIn (line 9) | function SignIn() { FILE: src/app/[locale]/auth/signup/page.tsx function SignUp (line 10) | function SignUp() { FILE: src/app/[locale]/layout.tsx type SupportedLocale (line 24) | type SupportedLocale = (typeof locales)[number] function generateMetadata (line 27) | async function generateMetadata({ params }: { params: Promise<{ locale: ... function generateStaticParams (line 42) | function generateStaticParams() { function LocaleLayout (line 46) | async function LocaleLayout({ FILE: src/app/[locale]/page.tsx function Home (line 11) | function Home() { FILE: src/app/[locale]/profile/components/ApiConfigTab.tsx function ApiConfigTab (line 5) | function ApiConfigTab() { FILE: src/app/[locale]/profile/components/api-config-tab/ApiConfigProviderList.tsx type DefaultModels (line 25) | interface DefaultModels { type ApiConfigProviderListProps (line 36) | interface ApiConfigProviderListProps { function ApiConfigProviderList (line 66) | function ApiConfigProviderList({ type SortableProviderCardItemProps (line 228) | interface SortableProviderCardItemProps { function SortableProviderCardItem (line 234) | function SortableProviderCardItem({ providerId, dragLabel, children }: S... FILE: src/app/[locale]/profile/components/api-config-tab/ApiConfigTabContainer.tsx type TestStepStatus (line 21) | type TestStepStatus = 'pass' | 'fail' | 'skip' type TestStep (line 22) | interface TestStep { type TestStatus (line 29) | type TestStatus = 'idle' | 'testing' | 'passed' | 'failed' type CustomProviderType (line 31) | type CustomProviderType = 'gemini-compatible' | 'openai-compatible' function isRecord (line 59) | function isRecord(value: unknown): value is Record { function isCapabilityValue (line 63) | function isCapabilityValue(value: unknown): value is CapabilityValue { function extractCapabilityFieldsFromModel (line 67) | function extractCapabilityFieldsFromModel( function parseBySample (line 82) | function parseBySample(input: string, sample: CapabilityValue): Capabili... function toCapabilityFieldLabel (line 88) | function toCapabilityFieldLabel(field: string): string { function ApiConfigTabContainer (line 92) | function ApiConfigTabContainer() { FILE: src/app/[locale]/profile/components/api-config-tab/ApiConfigToolbar.tsx type ApiConfigToolbarProps (line 7) | interface ApiConfigToolbarProps { function ApiConfigToolbar (line 16) | function ApiConfigToolbar({ FILE: src/app/[locale]/profile/components/api-config-tab/DefaultModelCards.tsx type ModelType (line 10) | type ModelType = 'llm' | 'image' | 'video' | 'audio' | 'lipsync' | 'voic... type ModelOption (line 12) | interface ModelOption { type DefaultModelField (line 20) | type DefaultModelField = type DefaultModelCardsProps (line 31) | interface DefaultModelCardsProps { function isRecord (line 64) | function isRecord(value: unknown): value is Record { function isCapabilityValue (line 67) | function isCapabilityValue(value: unknown): value is CapabilityValue { function resolveModel (line 71) | function resolveModel( function computeCapabilityFields (line 87) | function computeCapabilityFields(current: ModelOption | null, modelType:... function SmartSelector (line 102) | function SmartSelector({ function DefaultModelCards (line 193) | function DefaultModelCards(allProps: DefaultModelCardsProps) { FILE: src/app/[locale]/profile/components/api-config-tab/hooks/useApiConfigFilters.ts type UseApiConfigFiltersParams (line 7) | interface UseApiConfigFiltersParams { type EnabledModelOption (line 12) | interface EnabledModelOption extends CustomModel { constant DYNAMIC_PROVIDER_PREFIXES (line 16) | const DYNAMIC_PROVIDER_PREFIXES = ['gemini-compatible', 'openai-compatib... constant ALWAYS_SHOW_PROVIDERS (line 17) | const ALWAYS_SHOW_PROVIDERS: string[] = [] constant HIDDEN_PROVIDER_KEYS (line 19) | const HIDDEN_PROVIDER_KEYS = new Set(['siliconflow']) constant PROVIDER_MODEL_TYPES (line 20) | const PROVIDER_MODEL_TYPES: Array<'llm' | 'image' | 'video' | 'audio' | ... constant DEFAULT_AUDIO_EXCLUDED_MODEL_IDS (line 21) | const DEFAULT_AUDIO_EXCLUDED_MODEL_IDS = new Set([ constant MODEL_PROVIDER_KEYS (line 24) | const MODEL_PROVIDER_KEYS = [ function isProviderModelType (line 36) | function isProviderModelType(type: CustomModel['type']): type is 'llm' |... function isDefaultModelType (line 40) | function isDefaultModelType(type: CustomModel['type']): type is 'llm' | ... function isAudioDefaultCandidate (line 44) | function isAudioDefaultCandidate(model: CustomModel): boolean { function hasProviderApiKey (line 49) | function hasProviderApiKey(provider: Provider | undefined): boolean { function useApiConfigFilters (line 56) | function useApiConfigFilters({ FILE: src/app/[locale]/profile/components/api-config/DefaultModelSection.tsx type DefaultModelSectionProps (line 8) | interface DefaultModelSectionProps { function DefaultModelSection (line 20) | function DefaultModelSection({ FILE: src/app/[locale]/profile/components/api-config/ProviderCard.tsx function ProviderCard (line 10) | function ProviderCard({ FILE: src/app/[locale]/profile/components/api-config/ProviderSection.tsx type ProviderSectionProps (line 8) | interface ProviderSectionProps { function ProviderSection (line 21) | function ProviderSection({ FILE: src/app/[locale]/profile/components/api-config/hooks.ts type DefaultModels (line 27) | interface DefaultModels { type WorkflowConcurrency (line 39) | interface WorkflowConcurrency { type UseProvidersReturn (line 45) | interface UseProvidersReturn { function mergeProvidersForDisplay (line 72) | function mergeProvidersForDisplay( function isRecord (line 123) | function isRecord(value: unknown): value is Record { function composePricingDisplayKey (line 127) | function composePricingDisplayKey(type: CustomModel['type'], provider: s... function parsePricingDisplayMap (line 131) | function parsePricingDisplayMap(raw: unknown): PricingDisplayMap { constant DEFAULT_WORKFLOW_CONCURRENCY (line 154) | const DEFAULT_WORKFLOW_CONCURRENCY: WorkflowConcurrency = { function parseWorkflowConcurrency (line 160) | function parseWorkflowConcurrency(raw: unknown): WorkflowConcurrency { constant PRICING_DISPLAY_ALIASES (line 181) | const PRICING_DISPLAY_ALIASES: Readonly> = { function resolvePricingDisplay (line 185) | function resolvePricingDisplay( function applyPricingDisplay (line 209) | function applyPricingDisplay(model: CustomModel, map: PricingDisplayMap)... function useProviders (line 238) | function useProviders(): UseProvidersReturn { FILE: src/app/[locale]/profile/components/api-config/provider-card/ModelTemplateAssistantModal.tsx type ModelTemplateAssistantModalProps (line 10) | interface ModelTemplateAssistantModalProps { function ModelTemplateAssistantModal (line 15) | function ModelTemplateAssistantModal({ t, state }: ModelTemplateAssistan... FILE: src/app/[locale]/profile/components/api-config/provider-card/ProviderAdvancedFields.tsx type ProviderAdvancedFieldsProps (line 14) | interface ProviderAdvancedFieldsProps { constant MODEL_TYPES (line 63) | const MODEL_TYPES: readonly ProviderCardModelType[] = ['llm', 'image', '... function getAddableModelTypesForProvider (line 65) | function getAddableModelTypesForProvider(providerId: string): ProviderCa... function shouldShowOpenAICompatVideoHint (line 71) | function shouldShowOpenAICompatVideoHint( function shouldShowDefaultTabs (line 78) | function shouldShowDefaultTabs(providerId: string): boolean { function getVisibleModelTypesForProvider (line 83) | function getVisibleModelTypesForProvider( function formatPriceAmount (line 98) | function formatPriceAmount(amount: number): string { function getModelPriceTexts (line 104) | function getModelPriceTexts(model: CustomModel, t: ProviderCardTranslato... function ProviderAdvancedFields (line 128) | function ProviderAdvancedFields({ type ModelRowProps (line 346) | interface ModelRowProps { function ModelRow (line 356) | function ModelRow({ FILE: src/app/[locale]/profile/components/api-config/provider-card/ProviderBaseFields.tsx type ProviderBaseFieldsProps (line 7) | interface ProviderBaseFieldsProps { function ProviderBaseFields (line 13) | function ProviderBaseFields({ provider, t, state }: ProviderBaseFieldsPr... FILE: src/app/[locale]/profile/components/api-config/provider-card/ProviderCardShell.tsx type ProviderCardShellProps (line 11) | interface ProviderCardShellProps { function getCompatibilityLayerBadgeLabel (line 23) | function getCompatibilityLayerBadgeLabel( function StatusIcon (line 34) | function StatusIcon({ connected }: { connected: boolean }) { function ProviderCardShell (line 43) | function ProviderCardShell({ FILE: src/app/[locale]/profile/components/api-config/provider-card/hooks/useProviderCardState.ts type KeyTestStepStatus (line 29) | type KeyTestStepStatus = 'pass' | 'fail' | 'skip' type KeyTestStep (line 30) | interface KeyTestStep { type KeyTestStatus (line 37) | type KeyTestStatus = 'idle' | 'testing' | 'passed' | 'failed' type UseProviderCardStateParams (line 41) | interface UseProviderCardStateParams { constant EMPTY_MODEL_FORM (line 54) | const EMPTY_MODEL_FORM: ModelFormState = { type AddModelCustomPricing (line 68) | type AddModelCustomPricing = { type BuildCustomPricingResult (line 74) | type BuildCustomPricingResult = type ProviderConnectionPayload (line 78) | interface ProviderConnectionPayload { type LlmProtocolType (line 85) | type LlmProtocolType = 'responses' | 'chat-completions' type ProbeModelLlmProtocolSuccessResponse (line 87) | type ProbeModelLlmProtocolSuccessResponse = { type ProbeModelLlmProtocolFailureResponse (line 93) | type ProbeModelLlmProtocolFailureResponse = { function isLlmProtocol (line 98) | function isLlmProtocol(value: unknown): value is LlmProtocolType { function readProbeFailureCode (line 102) | function readProbeFailureCode(value: unknown): string { function shouldProbeModelLlmProtocol (line 106) | function shouldProbeModelLlmProtocol(params: { function shouldReprobeModelLlmProtocol (line 113) | function shouldReprobeModelLlmProtocol(params: { function probeModelLlmProtocolViaApi (line 124) | async function probeModelLlmProtocolViaApi(params: { function pickConfiguredLlmModel (line 159) | function pickConfiguredLlmModel(params: { function buildProviderConnectionPayload (line 169) | function buildProviderConnectionPayload(params: { function buildCustomPricingFromModelForm (line 197) | function buildCustomPricingFromModelForm( function toProviderCardModelType (line 284) | function toProviderCardModelType(type: CustomModel['type']): ProviderCar... type UseProviderCardStateResult (line 290) | interface UseProviderCardStateResult { function getAssistantSavedModelLabel (line 346) | function getAssistantSavedModelLabel(event: AssistantSavedEvent): string { function useProviderCardState (line 354) | function useProviderCardState({ FILE: src/app/[locale]/profile/components/api-config/provider-card/types.ts type ProviderCardDefaultModels (line 4) | interface ProviderCardDefaultModels { type ProviderCardProps (line 16) | interface ProviderCardProps { type ModelFormState (line 35) | interface ModelFormState { type ProviderCardModelType (line 45) | type ProviderCardModelType = 'llm' | 'image' | 'video' | 'audio' type ProviderCardGroupedModels (line 47) | type ProviderCardGroupedModels = Partial type ApiConfig (line 78) | interface ApiConfig { type PresetModel (line 89) | type PresetModel = Omit constant PRESET_MODELS (line 92) | const PRESET_MODELS: PresetModel[] = [ constant PRESET_COMING_SOON_MODEL_KEYS (line 187) | const PRESET_COMING_SOON_MODEL_KEYS = new Set([ function isPresetComingSoonModel (line 191) | function isPresetComingSoonModel(provider: string, modelId: string): boo... function isPresetComingSoonModelKey (line 195) | function isPresetComingSoonModelKey(modelKey: string): boolean { constant PRESET_PROVIDERS (line 200) | const PRESET_PROVIDERS: Omit[] = [ constant ZH_PROVIDER_NAME_MAP (line 210) | const ZH_PROVIDER_NAME_MAP: Record = { function isZhLocale (line 218) | function isZhLocale(locale?: string): boolean { function resolvePresetProviderName (line 222) | function resolvePresetProviderName(providerId: string, fallbackName: str... function getProviderKey (line 230) | function getProviderKey(providerId?: string): string { function getProviderDisplayName (line 241) | function getProviderDisplayName(providerId?: string, locale?: string): s... function encodeModelKey (line 255) | function encodeModelKey(provider: string, modelId: string): string { function parseModelKey (line 264) | function parseModelKey(key: string | undefined | null): { provider: stri... function matchesModelKey (line 280) | function matchesModelKey(key: string | undefined | null, provider: strin... type TutorialStep (line 287) | interface TutorialStep { type ProviderTutorial (line 293) | interface ProviderTutorial { constant PROVIDER_TUTORIALS (line 300) | const PROVIDER_TUTORIALS: ProviderTutorial[] = [ function getProviderTutorial (line 400) | function getProviderTutorial(providerId: string): ProviderTutorial | und... function getGoogleCompatiblePresetModels (line 410) | function getGoogleCompatiblePresetModels(providerId: string): PresetMode... FILE: src/app/[locale]/profile/page.tsx function ProfilePage (line 10) | function ProfilePage() { FILE: src/app/[locale]/providers.tsx function Providers (line 7) | function Providers({ children }: { children: React.ReactNode }) { FILE: src/app/[locale]/workspace/[projectId]/components/Sidebar.tsx type Episode (line 8) | interface Episode { type SidebarProps (line 15) | interface SidebarProps { function Sidebar (line 28) | function Sidebar({ FILE: src/app/[locale]/workspace/[projectId]/episode-selection.ts type EpisodeLike (line 1) | interface EpisodeLike { function resolveSelectedEpisodeId (line 5) | function resolveSelectedEpisodeId( FILE: src/app/[locale]/workspace/[projectId]/hooks/useProject.ts type RefreshScope (line 12) | type RefreshScope = 'all' | 'project' | 'assets' type RefreshMode (line 19) | type RefreshMode = 'full' | 'silent' type RefreshOptions (line 24) | interface RefreshOptions { function useProject (line 37) | function useProject(projectId: string) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/NovelPromotionWorkspace.tsx function NovelPromotionWorkspaceContent (line 17) | function NovelPromotionWorkspaceContent(props: NovelPromotionWorkspacePr... function NovelPromotionWorkspace (line 175) | function NovelPromotionWorkspace(props: NovelPromotionWorkspaceProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/StageNavigation.tsx type StageNavigationProps (line 9) | interface StageNavigationProps { function StageNavigation (line 24) | function StageNavigation({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/WorkspaceProvider.tsx type RefreshScope (line 16) | type RefreshScope = 'all' | 'assets' | 'project' type RefreshOptions (line 17) | type RefreshOptions = { scope?: string; mode?: string } type TaskEventListener (line 18) | type TaskEventListener = (event: SSEEvent) => void type WorkspaceContextValue (line 20) | interface WorkspaceContextValue { type WorkspaceProviderProps (line 28) | interface WorkspaceProviderProps { function WorkspaceProvider (line 36) | function WorkspaceProvider({ projectId, episodeId, children }: Workspace... function useWorkspaceProvider (line 95) | function useWorkspaceProvider() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/WorkspaceStageRuntimeContext.tsx type WorkspaceStageVideoModelOption (line 8) | interface WorkspaceStageVideoModelOption { type WorkspaceStageRuntimeValue (line 17) | interface WorkspaceStageRuntimeValue { type WorkspaceStageRuntimeProviderProps (line 63) | interface WorkspaceStageRuntimeProviderProps { function WorkspaceStageRuntimeProvider (line 68) | function WorkspaceStageRuntimeProvider({ value, children }: WorkspaceSta... function useWorkspaceStageRuntime (line 76) | function useWorkspaceStageRuntime() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/AssetLibrary.tsx type AssetLibraryProps (line 19) | interface AssetLibraryProps { function AssetLibrary (line 24) | function AssetLibrary({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/AssetsStage.tsx type AssetsStageProps (line 47) | interface AssetsStageProps { function AssetsStage (line 57) | function AssetsStage({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/ConfigStage.tsx function ConfigStage (line 7) | function ConfigStage() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/NovelInputStage.tsx function RatioIcon (line 20) | function RatioIcon({ ratio, size = 24, selected = false }: { ratio: stri... function RatioSelector (line 28) | function RatioSelector({ function StyleSelector (line 115) | function StyleSelector({ type NovelInputStageProps (line 188) | interface NovelInputStageProps { function NovelInputStage (line 209) | function NovelInputStage({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/PanelEditForm.tsx type CharacterAppearance (line 10) | interface CharacterAppearance { type PanelEditData (line 16) | interface PanelEditData { type PanelEditFormProps (line 34) | interface PanelEditFormProps { function PanelEditForm (line 47) | function PanelEditForm({ type CharacterPickerModalProps (line 76) | interface CharacterPickerModalProps { function CharacterPickerModal (line 83) | function CharacterPickerModal({ type LocationPickerModalProps (line 137) | interface LocationPickerModalProps { function LocationPickerModal (line 144) | function LocationPickerModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/PromptsStage.tsx function PromptsStage (line 7) | function PromptsStage(props: PromptsStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/ScriptStage.tsx function ScriptStage (line 8) | function ScriptStage() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/SmartImportWizard.tsx type SmartImportWizardProps (line 14) | interface SmartImportWizardProps { function SmartImportWizard (line 21) | function SmartImportWizard({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/StoryboardStage.tsx function StoryboardStage (line 8) | function StoryboardStage() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/VideoStage.tsx function VideoStage (line 7) | function VideoStage(props: VideoStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/VideoStageRoute.tsx function VideoStageRoute (line 9) | function VideoStageRoute() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/VoiceStage.tsx function VoiceStage (line 7) | function VoiceStage(props: VoiceStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/VoiceStageRoute.tsx function VoiceStageRoute (line 7) | function VoiceStageRoute() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/WorkspaceAssetLibraryModal.tsx type WorkspaceAssetLibraryModalProps (line 8) | interface WorkspaceAssetLibraryModalProps { function WorkspaceAssetLibraryModal (line 23) | function WorkspaceAssetLibraryModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/WorkspaceHeaderShell.tsx type EpisodeSummary (line 9) | interface EpisodeSummary { type UserModelOption (line 20) | interface UserModelOption { type UserModelsPayload (line 28) | interface UserModelsPayload { type WorkspaceHeaderShellProps (line 35) | interface WorkspaceHeaderShellProps { function WorkspaceHeaderShell (line 82) | function WorkspaceHeaderShell({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/WorkspaceRunStreamConsoles.tsx type RunStreamStep (line 6) | type RunStreamStep = { type RunStreamState (line 13) | type RunStreamState = { type WorkspaceRunStreamConsolesProps (line 37) | interface WorkspaceRunStreamConsolesProps { function WorkspaceRunStreamConsoles (line 47) | function WorkspaceRunStreamConsoles({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/WorkspaceStageContent.tsx type WorkspaceStageContentProps (line 9) | interface WorkspaceStageContentProps { function WorkspaceStageContent (line 13) | function WorkspaceStageContent({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/WorkspaceTopActions.tsx type WorkspaceTopActionsProps (line 7) | interface WorkspaceTopActionsProps { function WorkspaceTopActions (line 16) | function WorkspaceTopActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/AddLocationModal.tsx type AddLocationModalProps (line 14) | interface AddLocationModalProps { function getErrorMessage (line 20) | function getErrorMessage(error: unknown, fallback: string): string { function getErrorStatus (line 29) | function getErrorStatus(error: unknown): number | null { function AddLocationModal (line 46) | function AddLocationModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/AssetToolbar.tsx type AssetToolbarProps (line 16) | interface AssetToolbarProps { function AssetToolbar (line 30) | function AssetToolbar({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/AssetsStageModals.tsx type EditingAppearanceState (line 17) | interface EditingAppearanceState { type EditingLocationState (line 26) | interface EditingLocationState { type LocationImageEditModalState (line 32) | interface LocationImageEditModalState { type CharacterImageEditModalState (line 36) | interface CharacterImageEditModalState { type VoiceDesignCharacterState (line 40) | interface VoiceDesignCharacterState { type EditingProfileState (line 45) | interface EditingProfileState { type AssetsStageModalsProps (line 51) | interface AssetsStageModalsProps { function AssetsStageModals (line 86) | function AssetsStageModals({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/AssetsStageStatusOverlays.tsx type ToastType (line 7) | type ToastType = 'success' | 'warning' | 'error' type ToastState (line 9) | interface ToastState { type AssetsStageStatusOverlaysProps (line 14) | interface AssetsStageStatusOverlaysProps { function AssetsStageStatusOverlays (line 24) | function AssetsStageStatusOverlays({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/CharacterCard.tsx type CharacterCardProps (line 27) | interface CharacterCardProps { function CharacterCard (line 53) | function CharacterCard({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/CharacterEditModal.tsx type CharacterEditModalProps (line 8) | interface CharacterEditModalProps { function CharacterEditModal (line 24) | function CharacterEditModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/CharacterProfileCard.tsx type CharacterProfileCardProps (line 14) | interface CharacterProfileCardProps { constant ROLE_LEVEL_COLORS (line 26) | const ROLE_LEVEL_COLORS = { constant ROLE_LEVELS (line 33) | const ROLE_LEVELS = ['S', 'A', 'B', 'C', 'D'] as const type RoleLevel (line 34) | type RoleLevel = (typeof ROLE_LEVELS)[number] function isRoleLevel (line 36) | function isRoleLevel(value: string): value is RoleLevel { function CharacterProfileCard (line 40) | function CharacterProfileCard({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/CharacterProfileDialog.tsx type CharacterProfileDialogProps (line 15) | interface CharacterProfileDialogProps { constant ROLE_LEVELS (line 24) | const ROLE_LEVELS: RoleLevel[] = ['S', 'A', 'B', 'C', 'D'] constant COSTUME_TIERS (line 25) | const COSTUME_TIERS: CostumeTier[] = [5, 4, 3, 2, 1] function CharacterProfileDialog (line 27) | function CharacterProfileDialog({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/CharacterSection.tsx type CharacterSectionProps (line 21) | interface CharacterSectionProps { function CharacterSection (line 52) | function CharacterSection({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/ImageEditModal.tsx type ImageEditModalProps (line 13) | interface ImageEditModalProps { function ImageEditModal (line 20) | function ImageEditModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/LocationCard.tsx type LocationCardProps (line 24) | interface LocationCardProps { function LocationCard (line 41) | function LocationCard({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/LocationEditModal.tsx type LocationEditModalProps (line 5) | interface LocationEditModalProps { function LocationEditModal (line 17) | function LocationEditModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/LocationSection.tsx type LocationSectionProps (line 17) | interface LocationSectionProps { function LocationSection (line 39) | function LocationSection({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/UnconfirmedProfilesSection.tsx type UnconfirmedProfilesSectionProps (line 9) | interface UnconfirmedProfilesSectionProps { function UnconfirmedProfilesSection (line 25) | function UnconfirmedProfilesSection({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/VoiceSettings.tsx type VoiceSettingsProps (line 14) | interface VoiceSettingsProps { function getErrorMessage (line 25) | function getErrorMessage(error: unknown, fallback: string): string { function VoiceSettings (line 34) | function VoiceSettings({ type UploadedVoiceResult (line 209) | type UploadedVoiceResult = { audioUrl?: string } FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/character-card/CharacterCardActions.tsx type CharacterCardActionsProps (line 11) | type CharacterCardActionsProps = function CharacterCardActions (line 35) | function CharacterCardActions(props: CharacterCardActionsProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/character-card/CharacterCardGallery.tsx type CharacterCardGalleryProps (line 11) | type CharacterCardGalleryProps = function CharacterCardGallery (line 39) | function CharacterCardGallery(props: CharacterCardGalleryProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/character-card/CharacterCardHeader.tsx type CharacterCardHeaderProps (line 6) | type CharacterCardHeaderProps = function CharacterCardHeader (line 22) | function CharacterCardHeader(props: CharacterCardHeaderProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useAssetModals.ts type EditingAppearance (line 15) | interface EditingAppearance { type EditingLocation (line 24) | interface EditingLocation { type ImageEditModal (line 30) | interface ImageEditModal { type CharacterImageEditModal (line 36) | interface CharacterImageEditModal { type UseAssetModalsProps (line 43) | interface UseAssetModalsProps { function useAssetModals (line 47) | function useAssetModals({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useAssetsCopyFromHub.ts type ToastType (line 8) | type ToastType = 'success' | 'warning' | 'error' type ShowToast (line 10) | type ShowToast = (message: string, type?: ToastType, duration?: number) ... type GlobalCopyTarget (line 12) | type GlobalCopyTarget = { type UseAssetsCopyFromHubParams (line 17) | interface UseAssetsCopyFromHubParams { function useAssetsCopyFromHub (line 25) | function useAssetsCopyFromHub({ projectId, onRefresh, showToast }: UseAs... FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useAssetsGlobalActions.ts type ToastType (line 8) | type ToastType = 'success' | 'warning' | 'error' type ShowToast (line 10) | type ShowToast = (message: string, type?: ToastType, duration?: number) ... type TranslateValues (line 11) | type TranslateValues = Record type Translate (line 12) | type Translate = (key: string, values?: TranslateValues) => string type UseAssetsGlobalActionsParams (line 14) | interface UseAssetsGlobalActionsParams { function useAssetsGlobalActions (line 25) | function useAssetsGlobalActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useAssetsImageEdit.ts type ToastType (line 15) | type ToastType = 'success' | 'warning' | 'error' type ShowToast (line 17) | type ShowToast = (message: string, type?: ToastType, duration?: number) ... type TranslateValues (line 18) | type TranslateValues = Record type Translate (line 19) | type Translate = (key: string, values?: TranslateValues) => string type EditingAppearanceState (line 21) | interface EditingAppearanceState { type EditingLocationState (line 27) | interface EditingLocationState { type LocationImageEditState (line 31) | interface LocationImageEditState { type CharacterImageEditState (line 37) | interface CharacterImageEditState { type UseAssetsImageEditParams (line 44) | interface UseAssetsImageEditParams { function useAssetsImageEdit (line 61) | function useAssetsImageEdit({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useBatchGeneration.helpers.ts constant MANUAL_REGENERATE_TIMEOUT_MS (line 4) | const MANUAL_REGENERATE_TIMEOUT_MS = 90_000 type ManualRegenerationBaseline (line 6) | type ManualRegenerationBaseline = { function createCharacterGroupSignature (line 11) | function createCharacterGroupSignature(appearance: CharacterAppearance) { function createLocationGroupSignature (line 19) | function createLocationGroupSignature(location: Location) { function createManualKeyBaseline (line 30) | function createManualKeyBaseline( function isAppearanceTaskRunning (line 78) | function isAppearanceTaskRunning(appearance: CharacterAppearance) { function shouldResolveManualKey (line 82) | function shouldResolveManualKey( FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useBatchGeneration.ts type UseBatchGenerationProps (line 24) | interface UseBatchGenerationProps { function useBatchGeneration (line 30) | function useBatchGeneration({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useCharacterActions.ts type UseCharacterActionsProps (line 28) | interface UseCharacterActionsProps { function getErrorMessage (line 33) | function getErrorMessage(error: unknown, fallback: string): string { function useCharacterActions (line 42) | function useCharacterActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useLocationActions.ts type UseLocationActionsProps (line 25) | interface UseLocationActionsProps { function getErrorMessage (line 30) | function getErrorMessage(error: unknown, fallback: string): string { function useLocationActions (line 39) | function useLocationActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useProfileManagement.ts type UseProfileManagementProps (line 21) | interface UseProfileManagementProps { function useProfileManagement (line 26) | function useProfileManagement({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/hooks/useTTSGeneration.ts type VoiceDesignCharacter (line 20) | interface VoiceDesignCharacter { type UseTTSGenerationProps (line 26) | interface UseTTSGenerationProps { function getErrorMessage (line 30) | function getErrorMessage(error: unknown, fallback: string): string { function useTTSGeneration (line 39) | function useTTSGeneration({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/location-card/LocationCardActions.tsx type LocationCardActionsProps (line 10) | type LocationCardActionsProps = function LocationCardActions (line 28) | function LocationCardActions(props: LocationCardActionsProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/location-card/LocationCardHeader.tsx type LocationCardHeaderProps (line 6) | type LocationCardHeaderProps = function LocationCardHeader (line 22) | function LocationCardHeader(props: LocationCardHeaderProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/assets/location-card/LocationImageList.tsx type SelectionImage (line 16) | type SelectionImage = { type LocationImageListProps (line 25) | type LocationImageListProps = function LocationImageList (line 52) | function LocationImageList(props: LocationImageListProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/PromptEditorPanel.tsx type PromptEditorPanelProps (line 5) | interface PromptEditorPanelProps { function PromptEditorPanel (line 9) | function PromptEditorPanel({ runtime }: PromptEditorPanelProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/PromptListCardView.tsx type PromptListCardViewProps (line 13) | interface PromptListCardViewProps { function PromptListCardView (line 16) | function PromptListCardView({ runtime }: PromptListCardViewProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/PromptListPanel.tsx type PromptListPanelProps (line 8) | interface PromptListPanelProps { function PromptListPanel (line 12) | function PromptListPanel({ runtime }: PromptListPanelProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/PromptListTableView.tsx type PromptListTableViewProps (line 10) | interface PromptListTableViewProps { function PromptListTableView (line 14) | function PromptListTableView({ runtime }: PromptListTableViewProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/PromptsStageLayout.tsx function PromptsStageLayout (line 10) | function PromptsStageLayout(props: PromptsStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/PromptsStageShell.tsx function PromptsStageShell (line 7) | function PromptsStageShell(props: PromptsStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/hooks/usePromptAiModifyFlow.ts type ModifyShotPromptResult (line 8) | interface ModifyShotPromptResult { type PromptAiModifier (line 12) | interface PromptAiModifier { type UsePromptAiModifyFlowParams (line 21) | interface UsePromptAiModifyFlowParams { function usePromptAiModifyFlow (line 33) | function usePromptAiModifyFlow({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/hooks/usePromptAppendFlow.ts type UsePromptAppendFlowParams (line 8) | interface UsePromptAppendFlowParams { function usePromptAppendFlow (line 13) | function usePromptAppendFlow({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/hooks/usePromptAssetMention.ts type UsePromptAssetMentionParams (line 10) | interface UsePromptAssetMentionParams { function usePromptAssetMention (line 17) | function usePromptAssetMention({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/hooks/usePromptDraftByShot.ts function usePromptDraftByShot (line 9) | function usePromptDraftByShot() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/hooks/usePromptEditorRuntime.ts type UsePromptEditorRuntimeParams (line 11) | interface UsePromptEditorRuntimeParams { function usePromptEditorRuntime (line 18) | function usePromptEditorRuntime({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/promptStageRuntime.types.ts type PromptsStageShellProps (line 5) | interface PromptsStageShellProps { type LocationAssetWithImages (line 22) | type LocationAssetWithImages = AssetLibraryLocation & { type PromptAssetReference (line 32) | interface PromptAssetReference { type PromptShotEditState (line 39) | interface PromptShotEditState { type PromptEditingTarget (line 46) | interface PromptEditingTarget { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/promptStageRuntime.utils.ts function getErrorMessage (line 5) | function getErrorMessage(error: unknown, fallback: string): string { function parseImagePrompt (line 9) | function parseImagePrompt(imagePrompt: string | null) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/prompts-stage/runtime/promptStageRuntimeCore.tsx function usePromptStageActions (line 22) | function usePromptStageActions({ type PromptStageRuntime (line 139) | type PromptStageRuntime = ReturnType FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/script-view/ScriptViewAssetsPanel.tsx type Clip (line 12) | interface Clip { type ScriptViewAssetsPanelProps (line 17) | interface ScriptViewAssetsPanelProps { function setsEqual (line 49) | function setsEqual(left: Set, right: Set): boolean { function parseAppearanceKey (line 57) | function parseAppearanceKey(key: string): { characterId: string; appeara... function parseLocationNames (line 66) | function parseLocationNames(raw: string | null | undefined): string[] { function fuzzyMatchLocationName (line 84) | function fuzzyMatchLocationName(clipLocName: string, libraryLocName: str... function readTrimmedLabel (line 94) | function readTrimmedLabel(value: string | undefined, fallback: string): ... function getAppearancePreviewUrl (line 99) | function getAppearancePreviewUrl(appearance: CharacterAppearance): strin... function ScriptViewAssetsPanel (line 116) | function ScriptViewAssetsPanel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/script-view/ScriptViewRuntime.tsx type Clip (line 24) | interface Clip { type Panel (line 34) | interface Panel { type Storyboard (line 40) | interface Storyboard { type ScriptViewProps (line 46) | interface ScriptViewProps { function toTranslationValues (line 60) | function toTranslationValues(values?: Record) { function ScriptView (line 64) | function ScriptView({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/script-view/ScriptViewScriptPanel.tsx type Clip (line 7) | interface Clip { type ScreenplayContentItem (line 17) | type ScreenplayContentItem = type ScreenplayScene (line 22) | interface ScreenplayScene { type ScreenplayData (line 33) | interface ScreenplayData { function parseScreenplay (line 37) | function parseScreenplay(value: string | null | undefined): ScreenplayDa... type ScriptViewScriptPanelProps (line 51) | interface ScriptViewScriptPanelProps { function EditableText (line 63) | function EditableText({ function ScriptViewScriptPanel (line 115) | function ScriptViewScriptPanel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/script-view/SpotlightCards.tsx type SpotlightCharCardProps (line 13) | type SpotlightCharCardProps = { function SpotlightCharCard (line 22) | function SpotlightCharCard({ function getSelectedLocationImage (line 179) | function getSelectedLocationImage(location: Location) { type SpotlightLocationCardProps (line 188) | type SpotlightLocationCardProps = { function SpotlightLocationCard (line 196) | function SpotlightLocationCard({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/script-view/asset-state-utils.ts type ClipLike (line 4) | interface ClipLike { function getPrimaryAppearance (line 9) | function getPrimaryAppearance(char: Character): CharacterAppearance | un... function getSelectedAppearances (line 13) | function getSelectedAppearances( function processCharacterInClip (line 37) | function processCharacterInClip(params: { function processLocationInClip (line 150) | function processLocationInClip(params: { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/script-view/clip-asset-utils.ts type ClipAssetSource (line 1) | type ClipAssetSource = { type ParsedClipAssets (line 6) | type ParsedClipAssets = { function fuzzyMatchLocation (line 12) | function fuzzyMatchLocation(clipLocName: string, libraryLocName: string)... function parseClipAssets (line 29) | function parseClipAssets(clip: ClipAssetSource): ParsedClipAssets { function getAllClipsAssets (line 86) | function getAllClipsAssets(clips: ClipAssetSource[]) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/smart-import/hooks/useWizardState.ts type TranslateValues (line 15) | type TranslateValues = Record type Translate (line 16) | type Translate = (key: string, values?: TranslateValues) => string type UseWizardStateParams (line 18) | interface UseWizardStateParams { function useWizardState (line 25) | function useWizardState({ projectId, importStatus, onImportComplete, t }... FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/smart-import/steps/StepConfirm.tsx type StepConfirmProps (line 8) | interface StepConfirmProps { function StepConfirm (line 17) | function StepConfirm({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/smart-import/steps/StepMapping.tsx type StepMappingProps (line 7) | interface StepMappingProps { function StepMapping (line 22) | function StepMapping({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/smart-import/steps/StepParse.tsx function StepParse (line 5) | function StepParse() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/smart-import/steps/StepSource.tsx type StepSourceProps (line 8) | interface StepSourceProps { function StepSource (line 21) | function StepSource({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/smart-import/types.ts type SplitEpisode (line 1) | interface SplitEpisode { type WizardStage (line 9) | type WizardStage = 'select' | 'analyzing' | 'preview' type DeleteConfirmState (line 11) | interface DeleteConfirmState { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/AIDataModal.tsx function AIDataModal (line 18) | function AIDataModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/AIDataModal.types.ts type PhotographyCharacter (line 3) | interface PhotographyCharacter { type PhotographyRules (line 10) | interface PhotographyRules { type ActingCharacter (line 22) | interface ActingCharacter { type ActingNotes (line 27) | interface ActingNotes { type AIDataSavePayload (line 32) | interface AIDataSavePayload { type AIDataModalProps (line 41) | interface AIDataModalProps { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/AIDataModalFormPane.tsx type AIDataModalFormPaneProps (line 9) | interface AIDataModalFormPaneProps { function AIDataModalFormPane (line 28) | function AIDataModalFormPane({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/AIDataModalPreviewPane.tsx type AIDataModalPreviewPaneProps (line 5) | interface AIDataModalPreviewPaneProps { function AIDataModalPreviewPane (line 10) | function AIDataModalPreviewPane({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/CandidateSelector.tsx type CandidateSelectorProps (line 10) | interface CandidateSelectorProps { function CandidateSelector (line 22) | function CandidateSelector({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/ImageEditModal.tsx type ImageEditModalProps (line 13) | interface ImageEditModalProps { function ImageEditModal (line 20) | function ImageEditModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/ImageEditModalAssetPicker.tsx type ImageEditModalAssetPickerProps (line 10) | interface ImageEditModalAssetPickerProps { function ImageEditModalAssetPicker (line 21) | function ImageEditModalAssetPicker({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/ImageEditModalSelectedAssets.tsx type ImageEditModalSelectedAssetsProps (line 9) | interface ImageEditModalSelectedAssetsProps { function ImageEditModalSelectedAssets (line 16) | function ImageEditModalSelectedAssets({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/ImageSection.tsx type PanelCandidateData (line 13) | interface PanelCandidateData { type ImageSectionProps (line 18) | interface ImageSectionProps { function ImageSection (line 41) | function ImageSection({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/ImageSectionActionButtons.tsx type ImageSectionActionButtonsProps (line 11) | interface ImageSectionActionButtonsProps { function ImageSectionActionButtons (line 24) | function ImageSectionActionButtons({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/ImageSectionCandidateMode.tsx type PanelCandidateData (line 10) | interface PanelCandidateData { type ImageSectionCandidateModeProps (line 15) | interface ImageSectionCandidateModeProps { function ImageSectionCandidateMode (line 25) | function ImageSectionCandidateMode({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/InsertPanelButton.tsx type InsertPanelButtonProps (line 10) | interface InsertPanelButtonProps { function InsertPanelButton (line 15) | function InsertPanelButton({ onClick, disabled }: InsertPanelButtonProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/InsertPanelModal.tsx type PanelInfo (line 16) | interface PanelInfo { type InsertPanelModalProps (line 23) | interface InsertPanelModalProps { function InsertPanelModal (line 32) | function InsertPanelModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/PanelActionButtons.tsx type PanelActionButtonsProps (line 12) | interface PanelActionButtonsProps { function PanelActionButtons (line 19) | function PanelActionButtons({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/PanelCard.tsx type PanelCandidateData (line 11) | interface PanelCandidateData { type PanelCardProps (line 16) | interface PanelCardProps { function PanelCard (line 53) | function PanelCard({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/PanelVariantModal.tsx type PanelVariantModalProps (line 14) | interface PanelVariantModalProps { function PanelVariantModal (line 26) | function PanelVariantModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/PanelVariantModal.types.ts type ShotVariantSuggestion (line 1) | interface ShotVariantSuggestion { type PanelInfo (line 11) | interface PanelInfo { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/PanelVariantModalCustomOptions.tsx type PanelVariantModalCustomOptionsProps (line 4) | interface PanelVariantModalCustomOptionsProps { function PanelVariantModalCustomOptions (line 14) | function PanelVariantModalCustomOptions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/PanelVariantModalSuggestionList.tsx type PanelVariantModalSuggestionListProps (line 7) | interface PanelVariantModalSuggestionListProps { function PanelVariantModalSuggestionList (line 19) | function PanelVariantModalSuggestionList({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/ScreenplayDisplay.tsx type ScreenplayScene (line 7) | interface ScreenplayScene { type Screenplay (line 25) | interface Screenplay { type ScreenplayDisplayProps (line 31) | interface ScreenplayDisplayProps { function ScreenplayDisplay (line 36) | function ScreenplayDisplay({ screenplay, originalContent }: ScreenplayDi... FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardCanvas.tsx type StoryboardCanvasProps (line 13) | interface StoryboardCanvasProps { function StoryboardCanvas (line 75) | function StoryboardCanvas({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardGroup.tsx function StoryboardGroup (line 19) | function StoryboardGroup({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardGroup.types.ts type StoryboardGroupProps (line 7) | interface StoryboardGroupProps { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardGroupActions.tsx type StoryboardGroupActionsProps (line 10) | interface StoryboardGroupActionsProps { function StoryboardGroupActions (line 22) | function StoryboardGroupActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardGroupDialogs.tsx type PanelRuntimeSnapshot (line 7) | interface PanelRuntimeSnapshot { type VariantPanelRuntimeSnapshot (line 14) | interface VariantPanelRuntimeSnapshot extends PanelRuntimeSnapshot { type StoryboardGroupDialogsProps (line 18) | interface StoryboardGroupDialogsProps { function StoryboardGroupDialogs (line 32) | function StoryboardGroupDialogs({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardGroupFailedAlert.tsx type StoryboardGroupFailedAlertProps (line 5) | interface StoryboardGroupFailedAlertProps { function StoryboardGroupFailedAlert (line 12) | function StoryboardGroupFailedAlert({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardGroupHeader.tsx type StoryboardGroupHeaderProps (line 7) | interface StoryboardGroupHeaderProps { function StoryboardGroupHeader (line 18) | function StoryboardGroupHeader({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardHeader.tsx type StoryboardHeaderProps (line 8) | interface StoryboardHeaderProps { function StoryboardHeader (line 20) | function StoryboardHeader({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardPanelList.tsx type StoryboardPanelListProps (line 11) | interface StoryboardPanelListProps { function StoryboardPanelList (line 46) | function StoryboardPanelList({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardStageShell.tsx type StoryboardStageShellProps (line 8) | interface StoryboardStageShellProps { function StoryboardStageShell (line 16) | function StoryboardStageShell({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/StoryboardToolbar.tsx type StoryboardToolbarProps (line 10) | interface StoryboardToolbarProps { function StoryboardToolbar (line 25) | function StoryboardToolbar({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/contracts.ts type StoryboardPanelUpdateContract (line 4) | interface StoryboardPanelUpdateContract { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/image-generation-runtime.ts type StoryboardImageMutationResult (line 3) | interface StoryboardImageMutationResult { function isAbortError (line 8) | function isAbortError(error: unknown): boolean { function getStoryboardPanels (line 13) | function getStoryboardPanels(storyboard: NovelPromotionStoryboard): Nove... function updatePanelImageUrlInStoryboards (line 17) | function updatePanelImageUrlInStoryboards( function createPanelMap (line 33) | function createPanelMap(storyboards: NovelPromotionStoryboard[]): Map & { function isEpisodeDataCache (line 12) | function isEpisodeDataCache(value: unknown): value is EpisodeDataCache { type UsePanelEpisodeCachePatchParams (line 16) | interface UsePanelEpisodeCachePatchParams { function usePanelEpisodeCachePatch (line 21) | function usePanelEpisodeCachePatch({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/usePanelImageDownload.ts type DownloadImagesMutationLike (line 8) | interface DownloadImagesMutationLike { type UsePanelImageDownloadParams (line 12) | interface UsePanelImageDownloadParams { function usePanelImageDownload (line 18) | function usePanelImageDownload({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/usePanelImageModification.ts type ModifyPanelMutationLike (line 16) | interface ModifyPanelMutationLike { type UsePanelImageModificationParams (line 26) | interface UsePanelImageModificationParams { function usePanelImageModification (line 36) | function usePanelImageModification({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/usePanelImageRegeneration.ts type RegeneratePanelMutationLike (line 12) | interface RegeneratePanelMutationLike { type UsePanelImageRegenerationParams (line 16) | interface UsePanelImageRegenerationParams { function usePanelImageRegeneration (line 28) | function usePanelImageRegeneration({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/usePanelInsertActions.ts type UsePanelInsertActionsProps (line 10) | interface UsePanelInsertActionsProps { function usePanelInsertActions (line 15) | function usePanelInsertActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/usePanelOperations.ts type UsePanelOperationsProps (line 9) | interface UsePanelOperationsProps { function usePanelOperations (line 15) | function usePanelOperations({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/usePanelVariant.ts type VariantData (line 16) | interface VariantData { type VariantOptions (line 24) | interface VariantOptions { type VariantModalState (line 29) | interface VariantModalState { type UsePanelVariantProps (line 37) | interface UsePanelVariantProps { function usePanelVariant (line 44) | function usePanelVariant({ projectId, episodeId, setLocalStoryboards }: ... FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardAiDataRuntime.ts type AIDataPanelRef (line 10) | interface AIDataPanelRef { type PhotographyPlanMutation (line 15) | interface PhotographyPlanMutation { type ActingNotesMutation (line 19) | interface ActingNotesMutation { type UseStoryboardAiDataRuntimeParams (line 23) | interface UseStoryboardAiDataRuntimeParams { function parseJsonSafely (line 34) | function parseJsonSafely(value: unknown, logLabel: string) { function useStoryboardAiDataRuntime (line 44) | function useStoryboardAiDataRuntime({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardBatchPanelGeneration.ts type UseStoryboardBatchPanelGenerationProps (line 10) | interface UseStoryboardBatchPanelGenerationProps { function useStoryboardBatchPanelGeneration (line 18) | function useStoryboardBatchPanelGeneration({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardGroupActions.ts type UseStoryboardGroupActionsProps (line 15) | interface UseStoryboardGroupActionsProps { function useStoryboardGroupActions (line 21) | function useStoryboardGroupActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardGroupTaskErrors.ts type UseStoryboardGroupTaskErrorsParams (line 8) | interface UseStoryboardGroupTaskErrorsParams { function useStoryboardGroupTaskErrors (line 17) | function useStoryboardGroupTaskErrors({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardInsertVariantRuntime.ts type PanelRuntimeSnapshot (line 7) | interface PanelRuntimeSnapshot { type VariantPanelRuntimeSnapshot (line 14) | interface VariantPanelRuntimeSnapshot extends PanelRuntimeSnapshot { type UseStoryboardInsertVariantRuntimeParams (line 18) | interface UseStoryboardInsertVariantRuntimeParams { function useStoryboardInsertVariantRuntime (line 31) | function useStoryboardInsertVariantRuntime({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardModalRuntime.ts type AssetPickerPanelRef (line 10) | interface AssetPickerPanelRef { type AIDataPanelRef (line 15) | interface AIDataPanelRef { type PhotographyPlanMutation (line 20) | interface PhotographyPlanMutation { type ActingNotesMutation (line 24) | interface ActingNotesMutation { type UseStoryboardModalRuntimeParams (line 28) | interface UseStoryboardModalRuntimeParams { type StoryboardPanelReference (line 52) | interface StoryboardPanelReference { function findPanelById (line 57) | function findPanelById( function useStoryboardModalRuntime (line 74) | function useStoryboardModalRuntime({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardPanelAssetActions.ts type UseStoryboardPanelAssetActionsProps (line 11) | interface UseStoryboardPanelAssetActionsProps { function useStoryboardPanelAssetActions (line 61) | function useStoryboardPanelAssetActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardStageController.ts type UseStoryboardStageControllerProps (line 24) | interface UseStoryboardStageControllerProps { function useStoryboardStageController (line 32) | function useStoryboardStageController({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardStageStatus.ts type UseStoryboardStageStatusProps (line 6) | interface UseStoryboardStageStatusProps { function useStoryboardStageStatus (line 11) | function useStoryboardStageStatus({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardStageUiState.ts function useStoryboardStageUiState (line 5) | function useStoryboardStageUiState() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardState.ts type StoryboardPanel (line 16) | interface StoryboardPanel { type UseStoryboardStateProps (line 36) | interface UseStoryboardStateProps { function useStoryboardState (line 43) | function useStoryboardState({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/hooks/useStoryboardTaskAwareStoryboards.ts type TaskTarget (line 7) | interface TaskTarget { type UseStoryboardTaskAwareStoryboardsProps (line 16) | interface UseStoryboardTaskAwareStoryboardsProps { function buildStoryboardTextTargets (line 22) | function buildStoryboardTextTargets(storyboards: NovelPromotionStoryboar... function buildPanelTargets (line 49) | function buildPanelTargets(storyboards: NovelPromotionStoryboard[], type... function useStoryboardTaskAwareStoryboards (line 88) | function useStoryboardTaskAwareStoryboards({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/storyboard/index.tsx type StoryboardStageProps (line 14) | interface StoryboardStageProps { function StoryboardStage (line 25) | function StoryboardStage({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video-stage/VideoRenderPanel.tsx type VideoRenderPanelProps (line 7) | interface VideoRenderPanelProps { function VideoRenderPanel (line 74) | function VideoRenderPanel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video-stage/VideoStageLayout.tsx function VideoStageLayout (line 7) | function VideoStageLayout(props: VideoStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video-stage/VideoStageShell.tsx function VideoStageShell (line 7) | function VideoStageShell(props: VideoStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video-stage/VideoTimelinePanel.tsx type VoiceLineSummary (line 5) | interface VoiceLineSummary { type VideoTimelinePanelProps (line 9) | interface VideoTimelinePanelProps { function VideoTimelinePanel (line 20) | function VideoTimelinePanel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/FirstLastFramePanel.tsx type FirstLastFramePanelProps (line 12) | interface FirstLastFramePanelProps { function FirstLastFramePanel (line 49) | function FirstLastFramePanel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/VideoPanelCard.tsx function VideoPanelCard (line 8) | function VideoPanelCard(props: VideoPanelCardShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/VideoPromptModal.tsx type VideoPromptModalProps (line 7) | interface VideoPromptModalProps { function VideoPromptModal (line 16) | function VideoPromptModal({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/VideoToolbar.tsx type VideoToolbarProps (line 7) | interface VideoToolbarProps { function VideoToolbar (line 21) | function VideoToolbar({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/VideoPanelCardBody.tsx type VideoPanelCardBodyProps (line 8) | interface VideoPanelCardBodyProps { function VideoPanelCardBody (line 12) | function VideoPanelCardBody({ runtime }: VideoPanelCardBodyProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/VideoPanelCardFooter.tsx type VideoPanelCardFooterProps (line 4) | interface VideoPanelCardFooterProps { function VideoPanelCardFooter (line 8) | function VideoPanelCardFooter({ runtime }: VideoPanelCardFooterProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/VideoPanelCardHeader.tsx type VideoPanelCardHeaderProps (line 8) | interface VideoPanelCardHeaderProps { function VideoPanelCardHeader (line 12) | function VideoPanelCardHeader({ runtime }: VideoPanelCardHeaderProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/VideoPanelCardLayout.tsx function VideoPanelCardLayout (line 11) | function VideoPanelCardLayout(props: VideoPanelCardShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/hooks/usePanelLipSync.ts type UsePanelLipSyncParams (line 6) | interface UsePanelLipSyncParams { function usePanelLipSync (line 12) | function usePanelLipSync({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/hooks/usePanelPlayer.ts type UsePanelPlayerParams (line 4) | interface UsePanelPlayerParams { function usePanelPlayer (line 13) | function usePanelPlayer({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/hooks/usePanelPromptEditor.ts type UsePanelPromptEditorParams (line 3) | interface UsePanelPromptEditorParams { function usePanelPromptEditor (line 9) | function usePanelPromptEditor({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/hooks/usePanelTaskStatus.ts type UsePanelTaskStatusParams (line 5) | interface UsePanelTaskStatusParams { function usePanelTaskStatus (line 11) | function usePanelTaskStatus({ panel, hasVisibleBaseVideo, tCommon }: Use... FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/hooks/usePanelVideoModel.ts type UsePanelVideoModelParams (line 11) | interface UsePanelVideoModelParams { type CapabilityField (line 17) | interface CapabilityField { function toFieldLabel (line 28) | function toFieldLabel(field: string): string { function parseByOptionType (line 32) | function parseByOptionType( function isRecord (line 41) | function isRecord(value: unknown): value is Record { function isGenerationOptionValue (line 45) | function isGenerationOptionValue(value: unknown): value is VideoGenerati... function readSelectionForModel (line 49) | function readSelectionForModel( function usePanelVideoModel (line 66) | function usePanelVideoModel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/hooks/usePanelVoiceManager.ts type UsePanelVoiceManagerParams (line 11) | interface UsePanelVoiceManagerParams { function usePanelVoiceManager (line 19) | function usePanelVoiceManager({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/shared.ts constant EMPTY_RUNNING_VOICE_LINE_IDS (line 1) | const EMPTY_RUNNING_VOICE_LINE_IDS: Set = new Set() function getErrorMessage (line 3) | function getErrorMessage(error: unknown): string { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/runtime/videoPanelRuntimeCore.tsx function useVideoPanelActions (line 13) | function useVideoPanelActions({ type VideoPanelRuntime (line 164) | type VideoPanelRuntime = ReturnType FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/panel-card/types.ts type VideoPanelCardShellProps (line 4) | interface VideoPanelCardShellProps { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/video/types.ts type VideoModelOption (line 6) | interface VideoModelOption { type VideoGenerationMode (line 16) | type VideoGenerationMode = 'normal' | 'firstlastframe' type TextPanel (line 18) | interface TextPanel { type Panel (line 32) | interface Panel { type Storyboard (line 63) | interface Storyboard { type Clip (line 74) | interface Clip { type VideoPanel (line 81) | interface VideoPanel { type MatchedVoiceLine (line 104) | interface MatchedVoiceLine { type FirstLastFrameParams (line 114) | interface FirstLastFrameParams { type VideoGenerationOptionValue (line 121) | type VideoGenerationOptionValue = string | number | boolean type VideoGenerationOptions (line 122) | type VideoGenerationOptions = Record type BatchVideoGenerationParams (line 124) | interface BatchVideoGenerationParams { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice-stage/VoiceControlPanel.tsx type BindablePanelOption (line 10) | interface BindablePanelOption { type VoiceControlPanelProps (line 17) | interface VoiceControlPanelProps { function VoiceControlPanel (line 55) | function VoiceControlPanel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice-stage/VoiceLineList.tsx type VoiceLineListProps (line 6) | interface VoiceLineListProps { function VoiceLineList (line 24) | function VoiceLineList({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice-stage/VoiceStageLayout.tsx function VoiceStageLayout (line 7) | function VoiceStageLayout(props: VoiceStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice-stage/VoiceStageShell.tsx function VoiceStageShell (line 7) | function VoiceStageShell(props: VoiceStageShellProps) { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/EmbeddedVoiceToolbar.tsx type EmbeddedVoiceToolbarProps (line 6) | interface EmbeddedVoiceToolbarProps { function EmbeddedVoiceToolbar (line 20) | function EmbeddedVoiceToolbar({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/EmotionSettingsPanel.tsx type EmotionSettingsPanelProps (line 7) | interface EmotionSettingsPanelProps { function EmotionSettingsPanel (line 16) | function EmotionSettingsPanel({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/EmptyVoiceState.tsx type EmptyVoiceStateProps (line 7) | interface EmptyVoiceStateProps { function EmptyVoiceState (line 12) | function EmptyVoiceState({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/SpeakerVoiceBindingDialog.tsx type BindingTab (line 12) | type BindingTab = 'select' | 'upload' | 'design' type SpeakerVoiceBindingDialogProps (line 14) | interface SpeakerVoiceBindingDialogProps { function SpeakerVoiceBindingDialog (line 28) | function SpeakerVoiceBindingDialog({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/SpeakerVoiceStatus.tsx type SpeakerVoiceStatusProps (line 4) | interface SpeakerVoiceStatusProps { function SpeakerVoiceStatus (line 16) | function SpeakerVoiceStatus({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/VoiceDesignDialog.tsx type VoiceDesignDialogProps (line 9) | interface VoiceDesignDialogProps { function VoiceDesignDialog (line 18) | function VoiceDesignDialog({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/VoiceLineCard.tsx type VoiceLine (line 9) | interface VoiceLine { type VoiceLineCardProps (line 24) | interface VoiceLineCardProps { function VoiceLineCard (line 40) | function VoiceLineCard({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/components/voice/VoiceToolbar.tsx type VoiceToolbarProps (line 6) | interface VoiceToolbarProps { function VoiceToolbar (line 22) | function VoiceToolbar({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useNovelPromotionWorkspaceController.ts function useNovelPromotionWorkspaceController (line 23) | function useNovelPromotionWorkspaceController({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useRebuildConfirm.ts type RebuildActionType (line 6) | type RebuildActionType = 'storyToScript' | 'scriptToStoryboard' type RebuildConfirmContext (line 8) | interface RebuildConfirmContext { type DownstreamCheckResult (line 14) | interface DownstreamCheckResult { type StoryboardStats (line 20) | type StoryboardStats = { function hasDownstreamStoryboardData (line 25) | function hasDownstreamStoryboardData(stats: StoryboardStats): boolean { type StoryboardLike (line 29) | interface StoryboardLike { type UseRebuildConfirmParams (line 33) | interface UseRebuildConfirmParams { function useRebuildConfirm (line 40) | function useRebuildConfirm({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceAssetLibraryShell.ts type RefreshOptions (line 5) | type RefreshOptions = { scope?: string; mode?: string } type RouterLike (line 7) | interface RouterLike { type SearchParamsLike (line 11) | interface SearchParamsLike { type UseWorkspaceAssetLibraryShellParams (line 16) | interface UseWorkspaceAssetLibraryShellParams { function useWorkspaceAssetLibraryShell (line 23) | function useWorkspaceAssetLibraryShell({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceConfigActions.ts type UseWorkspaceConfigActionsParams (line 11) | interface UseWorkspaceConfigActionsParams { function useWorkspaceConfigActions (line 17) | function useWorkspaceConfigActions({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceEpisodeStageData.ts type EpisodeStagePayload (line 7) | interface EpisodeStagePayload { function useWorkspaceEpisodeStageData (line 14) | function useWorkspaceEpisodeStageData() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceExecution.ts type UseWorkspaceExecutionParams (line 11) | interface UseWorkspaceExecutionParams { function isAbortError (line 24) | function isAbortError(err: unknown): boolean { function getErrorMessage (line 29) | function getErrorMessage(err: unknown): string { function isRunStreamTimeoutMessage (line 34) | function isRunStreamTimeoutMessage(message: string): boolean { function readSessionBoolean (line 38) | function readSessionBoolean(key: string): boolean { function writeSessionBoolean (line 47) | function writeSessionBoolean(key: string, value: boolean) { function useWorkspaceExecution (line 60) | function useWorkspaceExecution({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceModalEscape.ts type UseWorkspaceModalEscapeParams (line 5) | interface UseWorkspaceModalEscapeParams { function useWorkspaceModalEscape (line 14) | function useWorkspaceModalEscape({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceProjectSnapshot.ts function parseCapabilitySelections (line 7) | function parseCapabilitySelections(raw: unknown): CapabilitySelections { function useWorkspaceProjectSnapshot (line 22) | function useWorkspaceProjectSnapshot({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceStageNavigation.ts type EpisodeLike (line 5) | interface EpisodeLike { type StoryboardLike (line 10) | interface StoryboardLike { type CapsuleNavItem (line 14) | interface CapsuleNavItem { type UseWorkspaceStageNavigationParams (line 23) | interface UseWorkspaceStageNavigationParams { function useWorkspaceStageNavigation (line 31) | function useWorkspaceStageNavigation({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceStageRuntime.ts type UseWorkspaceStageRuntimeParams (line 9) | interface UseWorkspaceStageRuntimeParams { function useWorkspaceStageRuntime (line 59) | function useWorkspaceStageRuntime({ FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceUserModels.ts type UserModelOption (line 9) | interface UserModelOption { type UserModelsPayload (line 18) | interface UserModelsPayload { function useWorkspaceUserModels (line 26) | function useWorkspaceUserModels() { FILE: src/app/[locale]/workspace/[projectId]/modes/novel-promotion/hooks/useWorkspaceVideoActions.ts type UseWorkspaceVideoActionsParams (line 8) | interface UseWorkspaceVideoActionsParams { function isAbortError (line 14) | function isAbortError(err: unknown): boolean { function getErrorMessage (line 19) | function getErrorMessage(err: unknown): string { function assertClipUpdateData (line 24) | function assertClipUpdateData(data: unknown): asserts data is Record FILE: src/app/[locale]/workspace/asset-hub/page.tsx function AssetHubPage (line 34) | function AssetHubPage() { FILE: src/app/[locale]/workspace/page.tsx type ProjectStats (line 15) | interface ProjectStats { type Project (line 23) | interface Project { type Pagination (line 33) | interface Pagination { constant PAGE_SIZE (line 40) | const PAGE_SIZE = 7 // 加上新建项目按钮正好8个,4列布局下2行 constant DEFAULT_BILLING_CURRENCY (line 41) | const DEFAULT_BILLING_CURRENCY = 'CNY' function formatProjectCost (line 43) | function formatProjectCost(amount: number, currency = DEFAULT_BILLING_CU... function WorkspacePage (line 48) | function WorkspacePage() { FILE: src/app/api/admin/download-logs/route.ts constant GET (line 9) | const GET = apiHandler(async () => { FILE: src/app/api/asset-hub/ai-design-character/route.ts constant POST (line 12) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/ai-design-location/route.ts constant POST (line 12) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/ai-modify-character/route.ts constant POST (line 13) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/ai-modify-location/route.ts constant POST (line 13) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/appearances/route.ts type AppearanceBody (line 9) | interface AppearanceBody { type GlobalCharacterAppearanceSummary (line 17) | interface GlobalCharacterAppearanceSummary { type GlobalCharacterRecord (line 25) | interface GlobalCharacterRecord { type AssetHubAppearancesDb (line 29) | interface AssetHubAppearancesDb { constant POST (line 45) | const POST = apiHandler(async (request: NextRequest) => { constant PATCH (line 103) | const PATCH = apiHandler(async (request: NextRequest) => { constant DELETE (line 175) | const DELETE = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/character-voice/route.ts type VoiceDesignPayload (line 7) | interface VoiceDesignPayload { type CharacterVoiceJsonBody (line 12) | interface CharacterVoiceJsonBody { type AssetHubCharacterVoiceDb (line 20) | interface AssetHubCharacterVoiceDb { constant POST (line 31) | const POST = apiHandler(async (request: NextRequest) => { constant PATCH (line 133) | const PATCH = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/characters/[characterId]/appearances/[appearanceIndex]/route.ts constant PATCH (line 9) | const PATCH = apiHandler(async ( constant POST (line 88) | const POST = apiHandler(async ( constant DELETE (line 148) | const DELETE = apiHandler(async ( FILE: src/app/api/asset-hub/characters/[characterId]/route.ts constant GET (line 11) | const GET = apiHandler(async ( constant PATCH (line 35) | const PATCH = apiHandler(async ( constant DELETE (line 88) | const DELETE = apiHandler(async ( FILE: src/app/api/asset-hub/characters/route.ts function toObject (line 13) | function toObject(value: unknown): Record { constant GET (line 19) | const GET = apiHandler(async (request: NextRequest) => { constant POST (line 49) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/folders/[folderId]/route.ts constant PATCH (line 7) | const PATCH = apiHandler(async ( constant DELETE (line 43) | const DELETE = apiHandler(async ( FILE: src/app/api/asset-hub/folders/route.ts constant GET (line 7) | const GET = apiHandler(async () => { constant POST (line 22) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/generate-image/route.ts function toNumber (line 19) | function toNumber(value: unknown) { function toObject (line 24) | function toObject(value: unknown): Record { function normalizeString (line 29) | function normalizeString(value: unknown): string { function resolveRequestedArtStyle (line 33) | function resolveRequestedArtStyle(body: Record): string... function resolveStoredArtStyle (line 45) | async function resolveStoredArtStyle(input: { constant POST (line 93) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/locations/[locationId]/route.ts constant GET (line 7) | const GET = apiHandler(async ( constant PATCH (line 31) | const PATCH = apiHandler(async ( constant DELETE (line 78) | const DELETE = apiHandler(async ( FILE: src/app/api/asset-hub/locations/route.ts constant GET (line 10) | const GET = apiHandler(async (request: NextRequest) => { constant POST (line 40) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/modify-image/route.ts function toNumber (line 17) | function toNumber(value: unknown) { function toObject (line 22) | function toObject(value: unknown): Record { constant POST (line 27) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/picker/route.ts constant GET (line 16) | const GET = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/reference-to-character/route.ts function parseReferenceImages (line 8) | function parseReferenceImages(body: Record): string[] { constant POST (line 20) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/select-image/route.ts type SelectImageBody (line 11) | interface SelectImageBody { constant POST (line 23) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/undo-image/route.ts type UndoImageBody (line 8) | interface UndoImageBody { type GlobalCharacterAppearanceRecord (line 14) | interface GlobalCharacterAppearanceRecord { type GlobalLocationImageRecord (line 25) | interface GlobalLocationImageRecord { type GlobalLocationRecord (line 33) | interface GlobalLocationRecord { type AssetHubUndoDb (line 37) | interface AssetHubUndoDb { constant POST (line 54) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/update-asset-label/route.ts constant POST (line 16) | const POST = apiHandler(async (request: NextRequest) => { function updateImageLabel (line 120) | async function updateImageLabel(imageUrl: string, newLabelText: string):... FILE: src/app/api/asset-hub/upload-image/route.ts type GlobalCharacterAppearanceRecord (line 10) | interface GlobalCharacterAppearanceRecord { type GlobalLocationImageRecord (line 19) | interface GlobalLocationImageRecord { type GlobalLocationRecord (line 25) | interface GlobalLocationRecord { type AssetHubUploadDb (line 29) | interface AssetHubUploadDb { constant POST (line 47) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/upload-temp/route.ts constant POST (line 11) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/voice-design/route.ts constant POST (line 15) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/voices/[id]/route.ts constant DELETE (line 7) | const DELETE = apiHandler(async ( constant PATCH (line 38) | const PATCH = apiHandler(async ( FILE: src/app/api/asset-hub/voices/route.ts constant GET (line 9) | const GET = apiHandler(async (request: NextRequest) => { constant POST (line 38) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/asset-hub/voices/upload/route.ts constant POST (line 11) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/auth/[...nextauth]/route.ts function handlePost (line 19) | async function handlePost(req: NextRequest, ctx: { params: Promise<{ nex... function handleGet (line 46) | function handleGet(req: NextRequest, ctx: { params: Promise<{ nextauth: ... FILE: src/app/api/auth/register/route.ts constant POST (line 8) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/cos/image/route.ts constant GET (line 4) | const GET = apiHandler(async (request: NextRequest) => { FILE: src/app/api/files/[...path]/route.ts constant UPLOAD_DIR (line 13) | const UPLOAD_DIR = process.env.UPLOAD_DIR || './data/uploads' constant MIME_TYPES (line 16) | const MIME_TYPES: Record = { function getMimeType (line 32) | function getMimeType(filePath: string): string { function GET (line 37) | async function GET( FILE: src/app/api/novel-promotion/[projectId]/ai-create-character/route.ts constant POST (line 9) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/ai-create-location/route.ts constant POST (line 9) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/ai-modify-appearance/route.ts constant POST (line 7) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/ai-modify-location/route.ts constant POST (line 7) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/ai-modify-shot-prompt/route.ts constant POST (line 7) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/analyze-global/route.ts constant POST (line 10) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/analyze-shot-variants/route.ts constant POST (line 7) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/analyze/route.ts constant POST (line 7) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/assets/route.ts constant GET (line 11) | const GET = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/character-profile/batch-confirm/route.ts constant POST (line 11) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/character-profile/confirm/route.ts constant POST (line 11) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/character-voice/route.ts constant PATCH (line 13) | const PATCH = apiHandler(async ( constant POST (line 49) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/character/appearance/route.ts constant POST (line 14) | const POST = apiHandler(async ( constant PATCH (line 80) | const PATCH = apiHandler(async ( constant DELETE (line 154) | const DELETE = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/character/confirm-selection/route.ts constant POST (line 19) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/character/route.ts function toObject (line 15) | function toObject(value: unknown): Record { function normalizeString (line 20) | function normalizeString(value: unknown): string { constant PATCH (line 25) | const PATCH = apiHandler(async ( constant DELETE (line 61) | const DELETE = apiHandler(async ( constant POST (line 117) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/cleanup-unselected-images/route.ts constant POST (line 14) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/clips/[clipId]/route.ts constant PATCH (line 11) | const PATCH = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/clips/route.ts constant POST (line 11) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/copy-from-global/route.ts type GlobalCharacterAppearanceSource (line 9) | interface GlobalCharacterAppearanceSource { type GlobalCharacterSource (line 19) | interface GlobalCharacterSource { type GlobalLocationImageSource (line 27) | interface GlobalLocationImageSource { type GlobalLocationSource (line 34) | interface GlobalLocationSource { type GlobalVoiceSource (line 40) | interface GlobalVoiceSource { type CopyFromGlobalDb (line 47) | interface CopyFromGlobalDb { constant POST (line 65) | const POST = apiHandler(async ( function copyCharacterFromGlobal (line 98) | async function copyCharacterFromGlobal(db: CopyFromGlobalDb, userId: str... function copyLocationFromGlobal (line 192) | async function copyLocationFromGlobal(db: CopyFromGlobalDb, userId: stri... function copyVoiceFromGlobal (line 283) | async function copyVoiceFromGlobal(db: CopyFromGlobalDb, userId: string,... FILE: src/app/api/novel-promotion/[projectId]/download-images/route.ts type PanelData (line 10) | interface PanelData { type StoryboardData (line 16) | interface StoryboardData { type ClipData (line 21) | interface ClipData { type EpisodeData (line 25) | interface EpisodeData { constant GET (line 30) | const GET = apiHandler(async ( type ImageItem (line 93) | interface ImageItem { method start (line 151) | start(controller) { function processImages (line 159) | async function processImages() { FILE: src/app/api/novel-promotion/[projectId]/download-videos/route.ts type PanelData (line 10) | interface PanelData { type StoryboardData (line 17) | interface StoryboardData { type ClipData (line 23) | interface ClipData { type EpisodeData (line 27) | interface EpisodeData { constant POST (line 32) | const POST = apiHandler(async ( type VideoItem (line 100) | interface VideoItem { FILE: src/app/api/novel-promotion/[projectId]/download-voices/route.ts constant GET (line 10) | const GET = apiHandler(async ( method start (line 57) | start(controller) { function processVoices (line 65) | async function processVoices() { FILE: src/app/api/novel-promotion/[projectId]/editor/route.ts constant GET (line 10) | const GET = apiHandler(async ( constant PUT (line 49) | const PUT = apiHandler(async ( constant DELETE (line 102) | const DELETE = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/episodes/[episodeId]/route.ts constant GET (line 13) | const GET = apiHandler(async ( constant PATCH (line 65) | const PATCH = apiHandler(async ( constant DELETE (line 100) | const DELETE = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/episodes/batch/route.ts type BatchEpisode (line 10) | interface BatchEpisode { constant POST (line 16) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/episodes/route.ts constant GET (line 9) | const GET = apiHandler(async ( constant POST (line 31) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/episodes/split-by-markers/route.ts constant POST (line 14) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/episodes/split/route.ts constant POST (line 10) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/generate-character-image/route.ts function toObject (line 10) | function toObject(value: unknown): Record { function normalizeString (line 15) | function normalizeString(value: unknown): string { constant POST (line 24) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/generate-image/route.ts function toObject (line 19) | function toObject(value: unknown): Record { function toNumber (line 24) | function toNumber(value: unknown) { function normalizeString (line 29) | function normalizeString(value: unknown): string { function resolveArtStyle (line 33) | function resolveArtStyle(body: Record): ArtStyleValue |... constant POST (line 45) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/generate-video/route.ts function isRecord (line 19) | function isRecord(value: unknown): value is Record { function toVideoRuntimeSelections (line 23) | function toVideoRuntimeSelections(value: unknown): Record { function normalizeString (line 12) | function normalizeString(value: unknown): string { constant DELETE (line 17) | const DELETE = apiHandler(async ( constant POST (line 43) | const POST = apiHandler(async ( constant PATCH (line 107) | const PATCH = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/modify-asset-image/route.ts function toNumber (line 16) | function toNumber(value: unknown) { function toObject (line 21) | function toObject(value: unknown): Record { constant POST (line 26) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/modify-storyboard-image/route.ts function toObject (line 14) | function toObject(value: unknown): Record { constant POST (line 19) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/panel-link/route.ts constant POST (line 7) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/panel-variant/route.ts function createPanelVariantId (line 11) | function createPanelVariantId(): string { function rollbackCreatedVariantPanel (line 18) | async function rollbackCreatedVariantPanel(params: { constant POST (line 69) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/panel/route.ts function parseNullableNumberField (line 7) | function parseNullableNumberField(value: unknown): number | null { function toStructuredJsonField (line 17) | function toStructuredJsonField(value: unknown, fieldName: string): strin... constant POST (line 30) | const POST = apiHandler(async ( constant DELETE (line 115) | const DELETE = apiHandler(async ( constant PATCH (line 213) | const PATCH = apiHandler(async ( constant PUT (line 309) | const PUT = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/panel/select-candidate/route.ts type PanelHistoryEntry (line 9) | interface PanelHistoryEntry { function parseUnknownArray (line 14) | function parseUnknownArray(jsonValue: string | null): unknown[] { function parsePanelHistory (line 24) | function parsePanelHistory(jsonValue: string | null): PanelHistoryEntry[] { constant POST (line 39) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/photography-plan/route.ts constant PUT (line 11) | const PUT = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/reference-to-character/route.ts function parseReferenceImages (line 8) | function parseReferenceImages(body: Record): string[] { constant POST (line 20) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/regenerate-group/route.ts constant POST (line 18) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/regenerate-panel-image/route.ts constant DEFAULT_CANDIDATE_COUNT (line 14) | const DEFAULT_CANDIDATE_COUNT = 1 constant POST (line 16) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/regenerate-single-image/route.ts function toNumber (line 15) | function toNumber(value: unknown) { constant POST (line 20) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/regenerate-storyboard-text/route.ts constant POST (line 10) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/route.ts constant MODEL_FIELDS (line 18) | const MODEL_FIELDS = [ constant MODEL_FIELD_TO_TYPE (line 28) | const MODEL_FIELD_TO_TYPE: Record { function normalizeCapabilitySelectionsInput (line 44) | function normalizeCapabilitySelectionsInput( function parseStoredCapabilitySelections (line 87) | function parseStoredCapabilitySelections(raw: string | null | undefined)... function serializeCapabilitySelections (line 96) | function serializeCapabilitySelections(selections: CapabilitySelections)... function validateModelKeyField (line 101) | function validateModelKeyField(field: typeof MODEL_FIELDS[number], value... function validateArtStyleField (line 116) | function validateArtStyleField(value: unknown): string { function getNextProjectModelMap (line 135) | function getNextProjectModelMap( function resolveCapabilityContext (line 164) | function resolveCapabilityContext( function sanitizeCapabilityOverrides (line 180) | function sanitizeCapabilityOverrides( function validateCapabilityOverrides (line 209) | function validateCapabilityOverrides( constant GET (line 225) | const GET = apiHandler(async ( constant PATCH (line 266) | const PATCH = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/screenplay-conversion/route.ts constant POST (line 11) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/script-to-storyboard-stream/route.ts constant POST (line 9) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/select-character-image/route.ts constant POST (line 13) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/select-location-image/route.ts constant POST (line 12) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/speaker-voice/route.ts function readTrimmedString (line 13) | function readTrimmedString(input: unknown): string | null { function signUrlIfNeeded (line 19) | function signUrlIfNeeded(url: string): string { constant GET (line 28) | const GET = apiHandler(async ( constant PATCH (line 81) | const PATCH = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/story-to-script-stream/route.ts constant POST (line 9) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/storyboard-group/route.ts constant POST (line 11) | const POST = apiHandler(async ( constant PUT (line 118) | const PUT = apiHandler(async ( constant DELETE (line 199) | const DELETE = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/storyboards/route.ts constant GET (line 11) | const GET = apiHandler(async ( constant PATCH (line 48) | const PATCH = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/undo-regenerate/route.ts type CharacterAppearanceRecord (line 15) | interface CharacterAppearanceRecord { type LocationImageRecord (line 27) | interface LocationImageRecord { type LocationRecord (line 35) | interface LocationRecord { type PanelRecord (line 39) | interface PanelRecord { type UndoRegenerateTx (line 45) | interface UndoRegenerateTx { type UndoRegenerateDb (line 54) | interface UndoRegenerateDb extends UndoRegenerateTx { constant POST (line 69) | const POST = apiHandler(async ( function undoCharacterRegenerate (line 109) | async function undoCharacterRegenerate(db: UndoRegenerateDb, appearanceI... function undoLocationRegenerate (line 166) | async function undoLocationRegenerate(db: UndoRegenerateDb, locationId: ... function undoPanelRegenerate (line 218) | async function undoPanelRegenerate(db: UndoRegenerateDb, panelId: string) { FILE: src/app/api/novel-promotion/[projectId]/update-appearance/route.ts constant POST (line 6) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/update-asset-label/route.ts constant POST (line 16) | const POST = apiHandler(async ( function updateImageLabel (line 143) | async function updateImageLabel(imageUrl: string, newLabelText: string):... FILE: src/app/api/novel-promotion/[projectId]/update-location/route.ts constant POST (line 7) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/update-prompt/route.ts constant POST (line 6) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/upload-asset-image/route.ts type CharacterAppearanceRecord (line 10) | interface CharacterAppearanceRecord { type LocationImageRecord (line 16) | interface LocationImageRecord { type LocationRecord (line 21) | interface LocationRecord { type UploadAssetImageDb (line 26) | interface UploadAssetImageDb { constant POST (line 45) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/video-proxy/route.ts constant GET (line 11) | const GET = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/video-urls/route.ts type PanelData (line 6) | interface PanelData { type StoryboardData (line 13) | interface StoryboardData { type ClipData (line 19) | interface ClipData { type EpisodeData (line 23) | interface EpisodeData { constant POST (line 32) | const POST = apiHandler(async ( type VideoItem (line 100) | interface VideoItem { type VideoCandidate (line 115) | interface VideoCandidate extends VideoItem { FILE: src/app/api/novel-promotion/[projectId]/voice-analyze/route.ts constant POST (line 11) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/voice-design/route.ts constant POST (line 15) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/voice-generate/route.ts type VoiceLineRow (line 21) | type VoiceLineRow = { type CharacterRow (line 27) | type CharacterRow = CharacterVoiceFields & { type VoiceBindingValidationResult (line 31) | type VoiceBindingValidationResult = function matchCharacterBySpeaker (line 35) | function matchCharacterBySpeaker(speaker: string, characters: CharacterR... function validateSpeakerVoiceForProvider (line 40) | function validateSpeakerVoiceForProvider( function hasSpeakerVoiceForProvider (line 79) | function hasSpeakerVoiceForProvider( constant POST (line 94) | const POST = apiHandler(async ( FILE: src/app/api/novel-promotion/[projectId]/voice-lines/route.ts function resolveMatchedPanelData (line 8) | async function resolveMatchedPanelData( function withVoiceLineMedia (line 52) | async function withVoiceLineMedia>(lin... constant GET (line 80) | const GET = apiHandler(async ( constant POST (line 159) | const POST = apiHandler(async ( constant PATCH (line 246) | const PATCH = apiHandler(async ( constant DELETE (line 352) | const DELETE = apiHandler(async ( FILE: src/app/api/projects/[projectId]/assets/route.ts constant GET (line 11) | const GET = apiHandler(async ( FILE: src/app/api/projects/[projectId]/costs/route.ts constant GET (line 12) | const GET = apiHandler(async ( FILE: src/app/api/projects/[projectId]/data/route.ts constant GET (line 12) | const GET = apiHandler(async ( FILE: src/app/api/projects/[projectId]/route.ts constant GET (line 15) | const GET = apiHandler(async ( constant PATCH (line 55) | const PATCH = apiHandler(async ( function collectProjectCOSKeys (line 100) | async function collectProjectCOSKeys(projectId: string): Promise { constant POST (line 166) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/runs/[runId]/cancel/route.ts constant POST (line 9) | const POST = apiHandler(async ( FILE: src/app/api/runs/[runId]/events/route.ts constant GET (line 6) | const GET = apiHandler(async ( FILE: src/app/api/runs/[runId]/route.ts constant GET (line 6) | const GET = apiHandler(async ( FILE: src/app/api/runs/[runId]/steps/[stepKey]/retry/route.ts constant RETRY_SUPPORTED_TASK_TYPES (line 9) | const RETRY_SUPPORTED_TASK_TYPES: ReadonlySet = new Set([ function toObject (line 14) | function toObject(value: unknown): Record { function readString (line 19) | function readString(value: unknown): string { function resolveTaskType (line 23) | function resolveTaskType(run: { constant POST (line 37) | const POST = apiHandler(async ( FILE: src/app/api/runs/route.ts function readString (line 7) | function readString(value: unknown): string | null { function normalizeStatus (line 13) | function normalizeStatus(value: string | null): RunStatus | null { function normalizeStatuses (line 26) | function normalizeStatuses(values: string[]): RunStatus[] { constant GET (line 38) | const GET = apiHandler(async (request: NextRequest) => { constant POST (line 64) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/sse/route.ts function parseReplayCursorId (line 11) | function parseReplayCursorId(value: string | null): number { function formatSSE (line 19) | function formatSSE(event: SSEEvent) { function formatHeartbeat (line 27) | function formatHeartbeat() { function asObject (line 31) | function asObject(value: unknown): Record | null { function listActiveLifecycleSnapshot (line 36) | async function listActiveLifecycleSnapshot(params: { constant GET (line 92) | const GET = apiHandler(async (request: NextRequest) => { method start (line 114) | async start(controller) { method cancel (line 196) | cancel() { FILE: src/app/api/storage/sign/route.ts constant DEFAULT_EXPIRES_SECONDS (line 5) | const DEFAULT_EXPIRES_SECONDS = 3600 constant GET (line 7) | const GET = apiHandler(async (request: NextRequest) => { FILE: src/app/api/system/boot-id/route.ts function GET (line 8) | async function GET() { FILE: src/app/api/task-target-states/route.ts function normalizeTarget (line 10) | function normalizeTarget(input: unknown): TaskTargetQuery { constant POST (line 28) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/tasks/[taskId]/route.ts function toObject (line 10) | function toObject(value: unknown): Record { constant GET (line 15) | const GET = apiHandler(async ( constant DELETE (line 42) | const DELETE = apiHandler(async ( FILE: src/app/api/tasks/dismiss/route.ts constant POST (line 6) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/tasks/route.ts function withTaskError (line 8) | function withTaskError(task: Awaited>[numb... constant GET (line 16) | const GET = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user-preference/route.ts function validateArtStyleField (line 7) | function validateArtStyleField(value: unknown): string { constant GET (line 27) | const GET = apiHandler(async () => { constant PATCH (line 44) | const PATCH = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/api-config/assistant/probe-media-template/route.ts type RequestBody (line 8) | type RequestBody = { function readRequiredString (line 16) | function readRequiredString(value: unknown, field: string): string { constant POST (line 26) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/api-config/assistant/validate-media-template/route.ts type RequestBody (line 7) | type RequestBody = { function readRequiredString (line 12) | function readRequiredString(value: unknown, field: string): string { constant POST (line 22) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/api-config/probe-model-llm-protocol/route.ts type ProbeRequestBody (line 7) | type ProbeRequestBody = { function readRequiredString (line 12) | function readRequiredString(value: unknown, field: string): string { constant POST (line 22) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/api-config/route.ts type ApiModeType (line 45) | type ApiModeType = 'gemini-sdk' | 'openai-official' type GatewayRouteType (line 46) | type GatewayRouteType = 'official' | 'openai-compat' type LlmProtocolType (line 47) | type LlmProtocolType = 'responses' | 'chat-completions' type DefaultModelField (line 48) | type DefaultModelField = type StoredProvider (line 59) | interface StoredProvider { type StoredModelLlmCustomPricing (line 69) | interface StoredModelLlmCustomPricing { type StoredModelMediaCustomPricing (line 74) | interface StoredModelMediaCustomPricing { type StoredModelCustomPricing (line 79) | interface StoredModelCustomPricing { type StoredModel (line 85) | interface StoredModel { type PricingDisplayItem (line 107) | interface PricingDisplayItem { type PricingDisplayMap (line 115) | type PricingDisplayMap = Record type DefaultModelsPayload (line 117) | interface DefaultModelsPayload { type WorkflowConcurrencyPayload (line 129) | interface WorkflowConcurrencyPayload { type ApiConfigPutBody (line 135) | interface ApiConfigPutBody { constant DEFAULT_MODEL_FIELDS (line 143) | const DEFAULT_MODEL_FIELDS: DefaultModelField[] = [ constant CAPABILITY_MODEL_TYPES (line 154) | const CAPABILITY_MODEL_TYPES: readonly UnifiedModelType[] = [ constant BILLABLE_MODEL_TYPE_TO_PRICING_API_TYPE (line 161) | const BILLABLE_MODEL_TYPE_TO_PRICING_API_TYPE: Readonly> = { constant OPTIONAL_PRICING_PROVIDER_KEYS (line 188) | const OPTIONAL_PRICING_PROVIDER_KEYS = new Set([ constant OFFICIAL_ONLY_PROVIDER_KEYS (line 194) | const OFFICIAL_ONLY_PROVIDER_KEYS = new Set(['bailian', 'siliconflow']) constant RETIRED_PROVIDER_KEYS (line 195) | const RETIRED_PROVIDER_KEYS = new Set(['qwen']) constant MINIMAX_OFFICIAL_BASE_URL (line 196) | const MINIMAX_OFFICIAL_BASE_URL = 'https://api.minimaxi.com/v1' function isRecord (line 198) | function isRecord(value: unknown): value is Record { function readTrimmedString (line 202) | function readTrimmedString(value: unknown): string { function normalizeMinimaxProviderBaseUrl (line 206) | function normalizeMinimaxProviderBaseUrl(input: { function formatPriceAmount (line 224) | function formatPriceAmount(amount: number): string { function pricingApiTypeToModelType (line 230) | function pricingApiTypeToModelType(apiType: PricingApiType): UnifiedMode... function composePricingDisplayKey (line 239) | function composePricingDisplayKey(modelType: UnifiedModelType, provider:... function resolveVideoDurationRangeFromCapabilities (line 243) | function resolveVideoDurationRangeFromCapabilities( function applyVideoDurationRangeIfNeeded (line 259) | function applyVideoDurationRangeIfNeeded(input: { function buildPricingDisplayMap (line 287) | function buildPricingDisplayMap(): PricingDisplayMap { function resolvePricingDisplayItem (line 343) | function resolvePricingDisplayItem( function withDisplayPricing (line 367) | function withDisplayPricing(model: StoredModel, map: PricingDisplayMap):... function getProviderKey (line 437) | function getProviderKey(providerId: string): string { function isUnifiedModelType (line 442) | function isUnifiedModelType(value: unknown): value is UnifiedModelType { function isApiMode (line 452) | function isApiMode(value: unknown): value is ApiModeType { function isGatewayRoute (line 456) | function isGatewayRoute(value: unknown): value is GatewayRouteType { function isLlmProtocol (line 460) | function isLlmProtocol(value: unknown): value is LlmProtocolType { function isMediaTemplateSource (line 464) | function isMediaTemplateSource(value: unknown): value is OpenAICompatMed... function resolveProviderGatewayRoute (line 468) | function resolveProviderGatewayRoute( function resolveProviderByIdOrKey (line 512) | function resolveProviderByIdOrKey(providers: StoredProvider[], providerI... function withBuiltinCapabilities (line 529) | function withBuiltinCapabilities(model: StoredModel): StoredModel { function readNonNegativeNumber (line 544) | function readNonNegativeNumber(value: unknown): number | undefined { function parseNonNegativeNumberStrict (line 551) | function parseNonNegativeNumberStrict(value: unknown, field: string): nu... function validateAllowedObjectKeys (line 561) | function validateAllowedObjectKeys( function normalizeOptionPrices (line 576) | function normalizeOptionPrices( function normalizeMediaCustomPricing (line 623) | function normalizeMediaCustomPricing( function normalizeCustomPricing (line 655) | function normalizeCustomPricing( function normalizeStoredModel (line 735) | function normalizeStoredModel(raw: unknown, index: number, options?: { s... function normalizeProvidersInput (line 834) | function normalizeProvidersInput(rawProviders: unknown): StoredProvider[] { function normalizeModelList (line 928) | function normalizeModelList(rawModels: unknown): StoredModel[] { function validateModelProviderConsistency (line 940) | function validateModelProviderConsistency(models: StoredModel[], provide... function validateModelProviderTypeSupport (line 953) | function validateModelProviderTypeSupport(models: StoredModel[], provide... function isOpenAICompatibleLlmModel (line 969) | function isOpenAICompatibleLlmModel(model: StoredModel): boolean { function isOpenAICompatibleMediaTemplateModel (line 973) | function isOpenAICompatibleMediaTemplateModel(model: StoredModel): boole... function getDefaultMediaTemplate (line 978) | function getDefaultMediaTemplate(type: 'image' | 'video'): OpenAICompatM... function resolveStoredLlmProtocols (line 1040) | function resolveStoredLlmProtocols( function resolveStoredMediaTemplates (line 1090) | function resolveStoredMediaTemplates( function validateCustomPricingCapabilityMappings (line 1144) | function validateCustomPricingCapabilityMappings(models: StoredModel[]) { function hasBuiltinPricingForModel (line 1186) | function hasBuiltinPricingForModel(apiType: PricingApiType, provider: st... function hasCustomPricingForType (line 1191) | function hasCustomPricingForType(model: StoredModel): boolean { function validateBillableModelPricing (line 1216) | function validateBillableModelPricing(models: StoredModel[]) { function validateDefaultModelKey (line 1237) | function validateDefaultModelKey(field: DefaultModelField, value: unknow... function normalizeDefaultModelsInput (line 1252) | function normalizeDefaultModelsInput(rawDefaultModels: unknown): Default... function normalizeWorkflowConcurrencyInput (line 1271) | function normalizeWorkflowConcurrencyInput(rawWorkflowConcurrency: unkno... function validateDefaultModelPricing (line 1327) | function validateDefaultModelPricing(defaultModels: DefaultModelsPayload) { function isModelPricedForBilling (line 1348) | function isModelPricedForBilling(model: StoredModel): boolean { function sanitizeModelsForBilling (line 1356) | function sanitizeModelsForBilling(models: StoredModel[]): StoredModel[] { function sanitizeDefaultModelsForBilling (line 1360) | function sanitizeDefaultModelsForBilling(defaultModels: DefaultModelsPay... function parseStoredProviders (line 1391) | function parseStoredProviders(rawProviders: string | null | undefined): ... function parseStoredModels (line 1485) | function parseStoredModels(rawModels: string | null | undefined): Stored... function normalizeCapabilitySelectionsInput (line 1509) | function normalizeCapabilitySelectionsInput( function parseStoredCapabilitySelections (line 1556) | function parseStoredCapabilitySelections(raw: string | null | undefined,... function serializeCapabilitySelections (line 1572) | function serializeCapabilitySelections(selections: CapabilitySelections)... function buildStoredModelMap (line 1577) | function buildStoredModelMap(models: StoredModel[]): Map { constant PUT (line 1764) | const PUT = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/api-config/test-connection/route.ts constant POST (line 6) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/api-config/test-provider/route.ts constant POST (line 6) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/assistant/chat/route.ts type RequestBody (line 10) | type RequestBody = { function readAssistantId (line 16) | function readAssistantId(value: unknown): 'api-config-template' | 'tutor... function mapAssistantError (line 27) | function mapAssistantError(error: AssistantPlatformError): ApiError { constant POST (line 55) | const POST = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/balance/route.ts constant GET (line 11) | const GET = apiHandler(async () => { FILE: src/app/api/user/costs/details/route.ts constant GET (line 11) | const GET = apiHandler(async (request: NextRequest) => { FILE: src/app/api/user/costs/route.ts constant GET (line 12) | const GET = apiHandler(async () => { FILE: src/app/api/user/models/route.ts type StoredModelType (line 23) | type StoredModelType = UnifiedModelType | string type StoredModel (line 25) | interface StoredModel { type StoredProvider (line 33) | interface StoredProvider { type UserModelOption (line 39) | interface UserModelOption { type UserModelsPayload (line 48) | interface UserModelsPayload { constant AUDIO_MODEL_EXCLUDED_IDS (line 56) | const AUDIO_MODEL_EXCLUDED_IDS = new Set([ function isUnifiedModelType (line 60) | function isUnifiedModelType(type: unknown): type is UnifiedModelType { function toModelKey (line 70) | function toModelKey(model: StoredModel): string { function toProvider (line 82) | function toProvider(model: StoredModel): string | undefined { function toModelId (line 88) | function toModelId(model: StoredModel): string { function toDisplayLabel (line 96) | function toDisplayLabel(model: StoredModel, fallbackModelId: string): st... function dedupeByModelKey (line 101) | function dedupeByModelKey(items: UserModelOption[]): UserModelOption[] { function cloneVideoPricingTiers (line 110) | function cloneVideoPricingTiers(rawTiers: Array<{ when: Record { FILE: src/app/api/user/transactions/route.ts constant ACTION_KEY_PATTERN (line 10) | const ACTION_KEY_PATTERN = /^[a-z][a-z0-9_]*$/ function extractActionFromDescription (line 19) | function extractActionFromDescription(description: string | null): strin... constant GET (line 31) | const GET = apiHandler(async (request: NextRequest) => { FILE: src/app/m/[publicId]/route.ts function buildEtag (line 7) | function buildEtag(media: { sha256?: string | null; id: string; updatedA... function GET (line 12) | async function GET( function HEAD (line 74) | async function HEAD( FILE: src/components/ConfirmDialog.tsx type ConfirmDialogProps (line 6) | interface ConfirmDialogProps { function ConfirmDialog (line 17) | function ConfirmDialog({ FILE: src/components/LanguageSwitcher.tsx constant LANGUAGE_LABELS (line 10) | const LANGUAGE_LABELS: Record = { constant SWITCH_CONFIRM_COPY (line 15) | const SWITCH_CONFIRM_COPY: Record): string { function computeIsAtBottom (line 37) | function computeIsAtBottom(element: HTMLDivElement): boolean { type ConversationProps (line 42) | type ConversationProps = HTMLAttributes; type ConversationContentProps (line 89) | type ConversationContentProps = HTMLAttributes; type ConversationScrollButtonProps (line 125) | type ConversationScrollButtonProps = HTMLAttributes; FILE: src/components/ai-elements/message.tsx type MessageProps (line 6) | type MessageProps = HTMLAttributes & { function joinClassName (line 10) | function joinClassName(...values: Array): string { type MessageContentProps (line 25) | type MessageContentProps = HTMLAttributes; type MessageResponseProps (line 43) | type MessageResponseProps = HTMLAttributes; FILE: src/components/ai-elements/reasoning.tsx type ReasoningContextValue (line 6) | interface ReasoningContextValue { function useReasoningContext (line 15) | function useReasoningContext(): ReasoningContextValue { type ReasoningProps (line 23) | type ReasoningProps = HTMLAttributes & { function joinClassName (line 31) | function joinClassName(...values: Array): string { type ReasoningTriggerProps (line 71) | type ReasoningTriggerProps = HTMLAttributes & { type ReasoningContentProps (line 105) | type ReasoningContentProps = HTMLAttributes & { FILE: src/components/ai-elements/tool.tsx type ToolPart (line 7) | type ToolPart = ToolUIPart | DynamicToolUIPart; type ToolContextValue (line 9) | interface ToolContextValue { function useToolContext (line 16) | function useToolContext(): ToolContextValue { function joinClassName (line 22) | function joinClassName(...values: Array): string { type ToolProps (line 26) | type ToolProps = HTMLAttributes & { type ToolHeaderProps (line 47) | type ToolHeaderProps = HTMLAttributes & { type ToolContentProps (line 87) | type ToolContentProps = HTMLAttributes; function formatJson (line 103) | function formatJson(value: unknown): string { type ToolInputProps (line 111) | type ToolInputProps = HTMLAttributes & { type ToolOutputProps (line 124) | type ToolOutputProps = HTMLAttributes & { FILE: src/components/assistant/AssistantChatModal.tsx type AssistantChatModalProps (line 11) | interface AssistantChatModalProps { type ParsedMessageContent (line 37) | interface ParsedMessageContent { type ParsedToolPart (line 42) | type ParsedToolPart = type RenderableMessage (line 59) | interface RenderableMessage { type MessageCacheEntry (line 67) | interface MessageCacheEntry { function isRecord (line 72) | function isRecord(value: unknown): value is Record { function readTrimmedString (line 76) | function readTrimmedString(value: unknown): string { function joinClassNames (line 80) | function joinClassNames(...values: Array): string { function isToolState (line 84) | function isToolState(value: string): value is ToolPart['state'] { function isToolPartType (line 94) | function isToolPartType(value: string): value is ToolPart['type'] { function splitThinkTaggedContent (line 99) | function splitThinkTaggedContent(input: string): { text: string; reasoni... function parseToolPart (line 139) | function parseToolPart(part: unknown): ParsedToolPart | null { function buildMessageSignature (line 169) | function buildMessageSignature(message: UIMessage): string { function extractMessageContent (line 191) | function extractMessageContent(message: UIMessage): ParsedMessageContent { function buildRenderableMessage (line 248) | function buildRenderableMessage(message: UIMessage): RenderableMessage { function onEnterSubmit (line 263) | function onEnterSubmit(event: KeyboardEvent, submit: (... function AssistantChatModal (line 270) | function AssistantChatModal({ FILE: src/components/assistant/useAssistantChat.ts type AssistantChatId (line 8) | type AssistantChatId = 'api-config-template' | 'tutorial' type AssistantDraftModel (line 10) | interface AssistantDraftModel { type AssistantSavedEvent (line 18) | interface AssistantSavedEvent { type UseAssistantChatParams (line 23) | interface UseAssistantChatParams { function isRecord (line 33) | function isRecord(value: unknown): value is Record { function readTrimmedString (line 37) | function readTrimmedString(value: unknown): string { function readNonEmptyStringArray (line 41) | function readNonEmptyStringArray(value: unknown): string[] { function parseDraftModel (line 48) | function parseDraftModel(value: unknown): AssistantDraftModel | undefined { function readSavedEventsFromPart (line 66) | function readSavedEventsFromPart(part: unknown): AssistantSavedEvent[] { function collectSavedEvents (line 107) | function collectSavedEvents(messages: UIMessage[]): AssistantSavedEvent[] { type UseAssistantChatResult (line 117) | interface UseAssistantChatResult { function useAssistantChat (line 128) | function useAssistantChat(params: UseAssistantChatParams): UseAssistantC... FILE: src/components/auth/PasswordStrengthIndicator.tsx type PasswordStrengthIndicatorProps (line 6) | interface PasswordStrengthIndicatorProps { type StrengthLevel (line 10) | type StrengthLevel = 'weak' | 'fair' | 'good' | 'strong' type StrengthResult (line 12) | interface StrengthResult { function evaluateStrength (line 32) | function evaluateStrength(password: string): StrengthResult { constant LEVEL_STYLES (line 74) | const LEVEL_STYLES: Record { type SegmentedControlProps (line 12) | interface SegmentedControlProps { function SegmentedControl (line 29) | function SegmentedControl({ FILE: src/components/ui/SharedComponents.tsx function AnimatedBackground (line 7) | function AnimatedBackground() { function GlassPanel (line 23) | function GlassPanel({ function Button (line 43) | function Button({ FILE: src/components/ui/ai-edit-style.ts constant AI_EDIT_BUTTON_CLASS (line 1) | const AI_EDIT_BUTTON_CLASS = 'bg-[var(--glass-bg-surface-strong)] border... constant AI_EDIT_ICON_CLASS (line 3) | const AI_EDIT_ICON_CLASS = '' FILE: src/components/ui/config-modals/ConfigConfirmModal.tsx type ConfigConfirmModalProps (line 5) | interface ConfigConfirmModalProps { function ConfigConfirmModal (line 17) | function ConfigConfirmModal({ FILE: src/components/ui/config-modals/ConfigDeleteModal.tsx type ConfigDeleteModalProps (line 6) | interface ConfigDeleteModalProps { function ConfigDeleteModal (line 17) | function ConfigDeleteModal({ FILE: src/components/ui/config-modals/ConfigEditModal.tsx type ModelOption (line 19) | interface ModelOption { type UserModels (line 27) | interface UserModels { type CapabilityFieldDefinition (line 34) | interface CapabilityFieldDefinition { type SettingsModalProps (line 40) | interface SettingsModalProps { function isRecord (line 71) | function isRecord(value: unknown): value is Record { function isCapabilityValue (line 75) | function isCapabilityValue(value: unknown): value is CapabilityValue { function toFieldLabel (line 79) | function toFieldLabel(field: string): string { function parseBySample (line 83) | function parseBySample(input: string, sample: CapabilityValue): Capabili... function extractCapabilityFields (line 89) | function extractCapabilityFields( function readCapabilitySelectionForModel (line 108) | function readCapabilitySelectionForModel( function SettingsModal (line 125) | function SettingsModal({ FILE: src/components/ui/config-modals/ModelCapabilityDropdown.tsx type ModelCapabilityOption (line 21) | interface ModelCapabilityOption { type CapabilityFieldDefinition (line 34) | interface CapabilityFieldDefinition { type CapabilityBooleanToggle (line 41) | interface CapabilityBooleanToggle { type ModelCapabilityDropdownProps (line 50) | interface ModelCapabilityDropdownProps { constant DEFAULT_PANEL_MAX_HEIGHT (line 73) | const DEFAULT_PANEL_MAX_HEIGHT = 520 constant VIEWPORT_EDGE_GAP (line 74) | const VIEWPORT_EDGE_GAP = 16 function RatioIcon (line 78) | function RatioIcon({ ratio, size = 12, selected = false }: { ratio: stri... function isRatioLike (line 89) | function isRatioLike(field: string, options: CapabilityValue[]): boolean { function isValidRatioText (line 95) | function isValidRatioText(value: string): boolean { function shouldUseSelectControl (line 99) | function shouldUseSelectControl(field: string, options: CapabilityValue[... function isOptionDisabled (line 107) | function isOptionDisabled(def: CapabilityFieldDefinition, option: Capabi... function ModelCapabilityDropdown (line 114) | function ModelCapabilityDropdown({ FILE: src/components/ui/config-modals/WorldContextModal.tsx type WorldContextModalProps (line 7) | interface WorldContextModalProps { function WorldContextModal (line 14) | function WorldContextModal({ isOpen, onClose, text, onChange }: WorldCon... FILE: src/components/ui/config-modals/config-modal-selectors.tsx type RatioIconProps (line 6) | interface RatioIconProps { type RatioSelectorProps (line 12) | interface RatioSelectorProps { type StyleSelectorProps (line 18) | interface StyleSelectorProps { function RatioIcon (line 24) | function RatioIcon({ ratio, size = 24, selected = false }: RatioIconProp... function RatioSelector (line 36) | function RatioSelector({ value, onChange, options }: RatioSelectorProps) { function StyleSelector (line 107) | function StyleSelector({ value, onChange, options }: StyleSelectorProps) { FILE: src/components/ui/icons/AISparklesIcon.tsx type AISparklesIconProps (line 4) | interface AISparklesIconProps { function AISparklesIcon (line 8) | function AISparklesIcon({ className }: AISparklesIconProps) { FILE: src/components/ui/icons/AppIcon.tsx type AppIconProps (line 4) | interface AppIconProps extends Omit { function AppIcon (line 8) | function AppIcon({ name, ...props }: AppIconProps) { FILE: src/components/ui/icons/RatioPreviewIcon.tsx type RatioPreviewVariant (line 3) | type RatioPreviewVariant = 'surface' | 'surfaceStrong' type RatioPreviewIconProps (line 5) | interface RatioPreviewIconProps { function resolveUnselectedClass (line 13) | function resolveUnselectedClass(variant: RatioPreviewVariant): string { function RatioPreviewIcon (line 20) | function RatioPreviewIcon({ FILE: src/components/ui/icons/custom.tsx type CustomIconComponent (line 4) | type CustomIconComponent = ForwardRefExoticComponent void,... function resolveParamSummary (line 86) | function resolveParamSummary(fields: CapabilityFieldDefinition[], overri... function ModelInnovativeV6 (line 99) | function ModelInnovativeV6(props: ModelDropdownTestProps) { function ModelInnovativeV7 (line 195) | function ModelInnovativeV7(props: ModelDropdownTestProps) { function ModelInnovativeV8 (line 282) | function ModelInnovativeV8(props: ModelDropdownTestProps) { function ModelInnovativeV9 (line 386) | function ModelInnovativeV9(props: ModelDropdownTestProps) { function ModelInnovativeV10 (line 494) | function ModelInnovativeV10(props: ModelDropdownTestProps) { FILE: src/components/ui/model-dropdown-ios.tsx type ModelDropdownTestProps (line 9) | interface ModelDropdownTestProps { constant VIEWPORT_EDGE_GAP (line 19) | const VIEWPORT_EDGE_GAP = 8 constant DEFAULT_MAX_HEIGHT (line 20) | const DEFAULT_MAX_HEIGHT = 450 function useDropdown (line 22) | function useDropdown(isOpen: boolean, setIsOpen: (val: boolean) => void) { function resolveParamSummary (line 81) | function resolveParamSummary(fields: CapabilityFieldDefinition[], overri... function DefaultParamsRenderer (line 88) | function DefaultParamsRenderer({ fields, overrides, onChange, className ... function IOSVariant1 (line 137) | function IOSVariant1(props: ModelDropdownTestProps) { function IOSVariant2 (line 181) | function IOSVariant2(props: ModelDropdownTestProps) { function IOSVariant3 (line 226) | function IOSVariant3(props: ModelDropdownTestProps) { function IOSVariant4 (line 275) | function IOSVariant4(props: ModelDropdownTestProps) { function IOSVariant5 (line 325) | function IOSVariant5(props: ModelDropdownTestProps) { FILE: src/components/ui/model-dropdown-variants.tsx type ModelDropdownTestProps (line 8) | interface ModelDropdownTestProps { constant VIEWPORT_EDGE_GAP (line 18) | const VIEWPORT_EDGE_GAP = 8 constant DEFAULT_MAX_HEIGHT (line 19) | const DEFAULT_MAX_HEIGHT = 400 function useDropdown (line 21) | function useDropdown(isOpen: boolean, setIsOpen: (val: boolean) => void) { function resolveParamSummary (line 80) | function resolveParamSummary(fields: CapabilityFieldDefinition[], overri... function ModelDropdownV1 (line 92) | function ModelDropdownV1(props: ModelDropdownTestProps) { function ModelDropdownV2 (line 178) | function ModelDropdownV2(props: ModelDropdownTestProps) { function ModelDropdownV3 (line 261) | function ModelDropdownV3(props: ModelDropdownTestProps) { function ModelDropdownV4 (line 349) | function ModelDropdownV4(props: ModelDropdownTestProps) { function ModelDropdownV5 (line 459) | function ModelDropdownV5(props: ModelDropdownTestProps) { FILE: src/components/ui/patterns/PanelCardV2.tsx type PanelCandidateData (line 11) | interface PanelCandidateData { type PanelCardV2Props (line 16) | interface PanelCardV2Props { function PanelCardV2 (line 43) | function PanelCardV2({ FILE: src/components/ui/patterns/PanelEditFormV2.tsx type PanelEditFormV2Props (line 14) | interface PanelEditFormV2Props { function PanelEditFormV2 (line 28) | function PanelEditFormV2({ FILE: src/components/ui/patterns/StoryboardHeaderV2.tsx type StoryboardHeaderV2Props (line 7) | interface StoryboardHeaderV2Props { function StoryboardHeaderV2 (line 20) | function StoryboardHeaderV2({ FILE: src/components/ui/patterns/types.ts type UiPatternMode (line 1) | type UiPatternMode = 'flow' FILE: src/components/ui/primitives/GlassButton.tsx type GlassButtonProps (line 5) | interface GlassButtonProps extends ButtonHTMLAttributes) { FILE: src/components/ui/primitives/GlassChip.tsx type UiTone (line 4) | type UiTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' type GlassChipProps (line 6) | interface GlassChipProps { function cx (line 14) | function cx(...names: Array) { function GlassChip (line 18) | function GlassChip({ tone = 'neutral', icon, onRemove, children, classNa... FILE: src/components/ui/primitives/GlassField.tsx type GlassFieldProps (line 3) | interface GlassFieldProps { function cx (line 14) | function cx(...names: Array) { function GlassField (line 18) | function GlassField({ FILE: src/components/ui/primitives/GlassInput.tsx type GlassInputProps (line 3) | interface GlassInputProps extends InputHTMLAttributes { function cx (line 7) | function cx(...names: Array) { FILE: src/components/ui/primitives/GlassModalShell.tsx type GlassModalShellProps (line 7) | interface GlassModalShellProps { function cx (line 20) | function cx(...names: Array) { function GlassModalShell (line 24) | function GlassModalShell({ FILE: src/components/ui/primitives/GlassSurface.tsx type UiDensity (line 3) | type UiDensity = 'compact' | 'default' type GlassSurfaceProps (line 5) | interface GlassSurfaceProps { function cx (line 14) | function cx(...names: Array) { function GlassSurface (line 18) | function GlassSurface({ FILE: src/components/ui/primitives/GlassTextarea.tsx type GlassTextareaProps (line 3) | interface GlassTextareaProps extends TextareaHTMLAttributes) { FILE: src/components/ui/select-variants.tsx constant VIEWPORT_EDGE_GAP (line 9) | const VIEWPORT_EDGE_GAP = 8 constant DEFAULT_MAX_HEIGHT (line 10) | const DEFAULT_MAX_HEIGHT = 280 type SelectOption (line 12) | interface SelectOption { type CustomSelectProps (line 20) | interface CustomSelectProps { function SelectVariantCard (line 32) | function SelectVariantCard({ function SelectVariantMinimal (line 184) | function SelectVariantMinimal({ function SelectVariantGhost (line 322) | function SelectVariantGhost({ FILE: src/components/voice/VoiceDesignDialogBase.tsx type VoiceDesignDialogBaseProps (line 19) | interface VoiceDesignDialogBaseProps { function VoiceDesignDialogBase (line 28) | function VoiceDesignDialogBase({ FILE: src/components/voice/VoiceDesignGeneratorSection.tsx constant VOICE_PRESET_KEYS (line 15) | const VOICE_PRESET_KEYS = [ type VoicePresetKey (line 24) | type VoicePresetKey = (typeof VOICE_PRESET_KEYS)[number] type VoiceDesignGeneratorSectionProps (line 26) | interface VoiceDesignGeneratorSectionProps { function VoiceDesignGeneratorSection (line 45) | function VoiceDesignGeneratorSection({ FILE: src/components/voice/voice-design-shared.ts constant DEFAULT_VOICE_SCHEME_COUNT (line 1) | const DEFAULT_VOICE_SCHEME_COUNT = 3 constant MIN_VOICE_SCHEME_COUNT (line 2) | const MIN_VOICE_SCHEME_COUNT = 1 constant MAX_VOICE_SCHEME_COUNT (line 3) | const MAX_VOICE_SCHEME_COUNT = 10 type VoiceDesignMutationPayload (line 5) | type VoiceDesignMutationPayload = { type VoiceDesignMutationResult (line 12) | type VoiceDesignMutationResult = { type GeneratedVoice (line 18) | type GeneratedVoice = { function normalizeVoiceSchemeCount (line 24) | function normalizeVoiceSchemeCount(input: string | number | undefined): ... function createVoiceDesignPreferredName (line 30) | function createVoiceDesignPreferredName(index: number, now: () => number... type GenerateVoiceDesignOptionsParams (line 34) | interface GenerateVoiceDesignOptionsParams { function generateVoiceDesignOptions (line 44) | async function generateVoiceDesignOptions({ FILE: src/contexts/ToastContext.tsx type Toast (line 32) | interface Toast { type ToastContextValue (line 39) | interface ToastContextValue { function ToastProvider (line 56) | function ToastProvider({ children }: { children: ReactNode }) { function useToast (line 132) | function useToast(): ToastContextValue { function ToastContainer (line 144) | function ToastContainer({ function getToastStyle (line 192) | function getToastStyle(type: Toast['type']): string { function getToastIcon (line 206) | function getToastIcon(type: Toast['type']) { FILE: src/features/video-editor/components/Preview/RemotionPreview.tsx type RemotionPreviewProps (line 11) | interface RemotionPreviewProps { FILE: src/features/video-editor/components/Timeline/Timeline.tsx type TimelineProps (line 24) | interface TimelineProps { type SortableClipProps (line 284) | interface SortableClipProps { FILE: src/features/video-editor/components/TransitionPicker.tsx type TransitionType (line 8) | type TransitionType = 'none' | 'dissolve' | 'fade' | 'slide' type TransitionPickerProps (line 10) | interface TransitionPickerProps { constant TRANSITION_OPTIONS (line 17) | const TRANSITION_OPTIONS: { type: TransitionType; labelKey: string; icon... constant DURATION_OPTIONS (line 24) | const DURATION_OPTIONS = [ FILE: src/features/video-editor/components/VideoEditorStage.tsx type VideoEditorStageProps (line 15) | interface VideoEditorStageProps { function VideoEditorStage (line 37) | function VideoEditorStage({ FILE: src/features/video-editor/hooks/useEditorActions.ts type UseEditorActionsProps (line 7) | interface UseEditorActionsProps { type PanelData (line 15) | interface PanelData { function createProjectFromPanels (line 27) | function createProjectFromPanels( function useEditorActions (line 81) | function useEditorActions({ projectId, episodeId }: UseEditorActionsProp... FILE: src/features/video-editor/hooks/useEditorState.ts type UseEditorStateProps (line 13) | interface UseEditorStateProps { function useEditorState (line 18) | function useEditorState({ episodeId, initialProject }: UseEditorStatePro... FILE: src/features/video-editor/remotion/VideoComposition.tsx type VideoCompositionProps (line 6) | interface VideoCompositionProps { type BgmRendererProps (line 65) | interface BgmRendererProps { type ClipRendererProps (line 97) | interface ClipRendererProps { type SubtitleOverlayProps (line 197) | interface SubtitleOverlayProps { FILE: src/features/video-editor/remotion/transitions/index.tsx type TransitionWrapperProps (line 4) | interface TransitionWrapperProps { FILE: src/features/video-editor/types/editor.types.ts type VideoEditorProject (line 9) | interface VideoEditorProject { type EditorConfig (line 26) | interface EditorConfig { type VideoClip (line 35) | interface VideoClip { type ClipAttachment (line 59) | interface ClipAttachment { type ClipTransition (line 74) | interface ClipTransition { type ClipMetadata (line 82) | interface ClipMetadata { type BgmClip (line 91) | interface BgmClip { type TimelineState (line 105) | interface TimelineState { type ComputedClip (line 116) | interface ComputedClip extends VideoClip { type SaveEditorProjectRequest (line 125) | interface SaveEditorProjectRequest { type RenderRequest (line 129) | interface RenderRequest { type RenderStatus (line 135) | interface RenderStatus { FILE: src/features/video-editor/utils/migration.ts function migrateProjectData (line 8) | function migrateProjectData(data: unknown): VideoEditorProject { function validateProjectData (line 32) | function validateProjectData(data: unknown): { valid: boolean; errors: s... FILE: src/features/video-editor/utils/time-utils.ts function calculateTimelineDuration (line 7) | function calculateTimelineDuration(clips: VideoClip[]): number { function computeClipPositions (line 27) | function computeClipPositions(clips: VideoClip[]): ComputedClip[] { function framesToTime (line 52) | function framesToTime(frames: number, fps: number): string { function timeToFrames (line 64) | function timeToFrames(time: string, fps: number): number { function generateClipId (line 74) | function generateClipId(): string { function createDefaultProject (line 81) | function createDefaultProject(episodeId: string): VideoEditorProject { FILE: src/hooks/common/useCandidateSystem.ts type CandidateState (line 17) | interface CandidateState { function useCandidateSystem (line 24) | function useCandidateSystem() { FILE: src/hooks/common/useGithubReleaseUpdate.ts constant ONE_HOUR_IN_MS (line 11) | const ONE_HOUR_IN_MS = 60 * 60 * 1000 constant MUTED_UPDATE_VERSION_KEY (line 12) | const MUTED_UPDATE_VERSION_KEY = 'waoowaoo:update:muted-version' type ReleaseUpdateInfo (line 14) | interface ReleaseUpdateInfo { type UseGithubReleaseUpdateResult (line 21) | interface UseGithubReleaseUpdateResult { function readMutedUpdateVersion (line 33) | function readMutedUpdateVersion(): string | null { function writeMutedUpdateVersion (line 38) | function writeMutedUpdateVersion(version: string): void { function useGithubReleaseUpdate (line 43) | function useGithubReleaseUpdate(): UseGithubReleaseUpdateResult { FILE: src/i18n/routing.ts type Locale (line 4) | type Locale = (typeof locales)[number]; FILE: src/instrumentation.ts function register (line 4) | async function register() { FILE: src/lib/ai-runtime/client.ts function toInt (line 16) | function toInt(value: unknown): number { function extractUsage (line 21) | function extractUsage(completion: AiStepExecutionResult['completion']) { function extractTextAndReasoning (line 32) | function extractTextAndReasoning(completion: OpenAI.Chat.Completions.Cha... function executeAiTextStep (line 49) | async function executeAiTextStep(input: AiStepExecutionInput): Promise { type ProjectAuthIncludes (line 62) | type ProjectAuthIncludes = { type AuthCharacterLike (line 68) | interface AuthCharacterLike { type AuthLocationLike (line 74) | interface AuthLocationLike { type AuthEpisodeLike (line 79) | interface AuthEpisodeLike { type NovelDataBase (line 87) | interface NovelDataBase { type NovelDataWithIncludes (line 95) | type NovelDataWithIncludes = NovelDataBase type ProjectAuthContextWithIncludes (line 103) | interface ProjectAuthContextWithIncludes { function requireAuth (line 184) | async function requireAuth(): Promise { function requireProjectAuth (line 214) | async function requireProjectAuth { function readTrimmedString (line 91) | function readTrimmedString(value: unknown): string { function isUnifiedModelType (line 95) | function isUnifiedModelType(value: unknown): value is UnifiedModelType { function isGatewayRoute (line 105) | function isGatewayRoute(value: unknown): value is GatewayRouteType { function isLlmProtocol (line 109) | function isLlmProtocol(value: unknown): value is LlmProtocolType { function assertModelKey (line 113) | function assertModelKey(value: string, field: string): { provider: strin... function parseCustomProviders (line 121) | function parseCustomProviders(rawProviders: string | null | undefined): ... function normalizeStoredModel (line 193) | function normalizeStoredModel(raw: unknown, index: number): CustomModel { function parseCustomModels (line 259) | function parseCustomModels(rawModels: string | null | undefined): Custom... function pickProviderStrict (line 281) | function pickProviderStrict( function readUserConfig (line 291) | async function readUserConfig(userId: string): Promise<{ models: CustomM... function findModelByKey (line 306) | function findModelByKey(models: CustomModel[], modelKey: string): Custom... function getProviderKey (line 314) | function getProviderKey(providerId?: string): string { function resolveModelSelection (line 323) | async function resolveModelSelection( function resolveSingleModelSelection (line 354) | async function resolveSingleModelSelection( function resolveModelSelectionOrSingle (line 388) | async function resolveModelSelectionOrSingle( type ProviderConfig (line 409) | interface ProviderConfig { function getProviderConfig (line 418) | async function getProviderConfig(userId: string, providerId: string): Pr... function getUserModels (line 439) | async function getUserModels(userId: string): Promise { function getModelProvider (line 447) | async function getModelProvider(userId: string, model: string): Promise<... function getModelsByType (line 456) | async function getModelsByType(userId: string, type: ModelMediaType): Pr... function resolveModelId (line 464) | async function resolveModelId(userId: string, model: string): Promise { FILE: src/lib/api-errors.ts type RouteParamValue (line 15) | type RouteParamValue = string | string[] | undefined type RouteParams (line 16) | type RouteParams = Record type ApiHandler (line 18) | type ApiHandler = ( constant REQUEST_ID_SYMBOL (line 23) | const REQUEST_ID_SYMBOL = Symbol.for('waoowaoo.request_id') constant MUTATION_METHODS (line 24) | const MUTATION_METHODS = new Set(['POST', 'PUT', 'PATCH', 'DELETE']) constant GENERATION_OPERATION_PATTERNS (line 25) | const GENERATION_OPERATION_PATTERNS = [ function isGenerationOperationPath (line 40) | function isGenerationOperationPath(pathname: string): boolean { function shouldAuditUserOperation (line 45) | function shouldAuditUserOperation(method: string, status: number, pathna... function createRequestId (line 52) | function createRequestId() { function parseTrueFlag (line 59) | function parseTrueFlag(value: string | null): boolean { function buildInternalLLMStreamCallbacks (line 65) | function buildInternalLLMStreamCallbacks(req: NextRequest): InternalLLMS... function setRequestId (line 329) | function setRequestId(req: NextRequest, requestId: string) { function getRequestId (line 333) | function getRequestId(req: NextRequest): string | undefined { function getIdempotencyKey (line 341) | function getIdempotencyKey(req: NextRequest): string | undefined { function extractRouteContext (line 350) | async function extractRouteContext( constant API_ERROR_CODES (line 371) | const API_ERROR_CODES = { type ApiErrorCode (line 393) | type ApiErrorCode = UnifiedErrorCode class ApiError (line 395) | class ApiError extends Error { method constructor (line 403) | constructor(code: ApiErrorCode, details?: Record) { function normalizeError (line 421) | function normalizeError(error: unknown): ApiError { function apiHandler (line 439) | function apiHandler(handler: ApiHandler { function isNonEmptyString (line 111) | function isNonEmptyString(value: unknown): value is string { function isInteger (line 115) | function isInteger(value: unknown): value is number { function validateArkVideoTaskRequest (line 119) | function validateArkVideoTaskRequest(request: ArkVideoTaskRequest) { function fetchWithTimeout (line 257) | async function fetchWithTimeout( function fetchWithRetry (line 287) | async function fetchWithRetry( function arkImageGeneration (line 359) | async function arkImageGeneration( function arkCreateVideoTask (line 419) | async function arkCreateVideoTask( function arkQueryVideoTask (line 473) | async function arkQueryVideoTask( function fetchWithTimeoutAndRetry (line 520) | async function fetchWithTimeoutAndRetry( constant ARK_API_TIMEOUT_MS (line 539) | const ARK_API_TIMEOUT_MS = DEFAULT_TIMEOUT_MS constant ARK_API_MAX_RETRIES (line 540) | const ARK_API_MAX_RETRIES = MAX_RETRIES FILE: src/lib/ark-llm.ts type ArkResponsesOptions (line 5) | interface ArkResponsesOptions { type ArkResponsesResult (line 14) | interface ArkResponsesResult { function asRecord (line 24) | function asRecord(value: unknown): Record | null { function collectText (line 28) | function collectText(node: unknown, acc: string[]) { function collectReasoning (line 51) | function collectReasoning(node: unknown, acc: string[]) { function extractArkText (line 74) | function extractArkText(data: unknown): string { function extractArkReasoning (line 84) | function extractArkReasoning(data: unknown): string { function extractArkUsage (line 93) | function extractArkUsage(data: unknown): { promptTokens: number; complet... function arkResponsesCompletion (line 104) | async function arkResponsesCompletion(options: ArkResponsesOptions): Pro... type ChatMessage (line 146) | type ChatMessage = { role: 'user' | 'assistant' | 'system'; content: str... type ArkResponsesInputItem (line 148) | interface ArkResponsesInputItem { function convertChatMessagesToArkInput (line 158) | function convertChatMessagesToArkInput(messages: ChatMessage[]): ArkResp... function buildArkThinkingParam (line 197) | function buildArkThinkingParam( type ArkStreamDelta (line 210) | interface ArkStreamDelta { type ArkStreamResult (line 215) | interface ArkStreamResult { function arkResponsesStream (line 224) | function arkResponsesStream(options: ArkResponsesOptions & { temperature... FILE: src/lib/asset-utils/ai-design.ts type AssetType (line 12) | type AssetType = 'character' | 'location' type AIDesignOptions (line 14) | interface AIDesignOptions { type AIDesignResult (line 26) | interface AIDesignResult { function aiDesign (line 36) | async function aiDesign(options: AIDesignOptions): Promise = { function getAssistantSkill (line 10) | function getAssistantSkill(id: AssistantId): AssistantSkillDefinition { function isAssistantId (line 14) | function isAssistantId(value: unknown): value is AssistantId { FILE: src/lib/assistant-platform/runtime.ts function normalizeAssistantContext (line 16) | function normalizeAssistantContext(raw: unknown): AssistantContext { function toModelMessages (line 27) | async function toModelMessages(messages: UIMessage[]): Promise = { function loadPromptTemplate (line 13) | function loadPromptTemplate(promptId: AssistantPromptId): string { function replacePromptVariables (line 32) | function replacePromptVariables(template: string, vars: Record function asRecord (line 20) | function asRecord(value: unknown): UnknownRecord | null { function getErrorMessage (line 24) | function getErrorMessage(error: unknown): string { function getErrorStatus (line 31) | function getErrorStatus(error: unknown): number | undefined { type GeminiBatchClient (line 37) | interface GeminiBatchClient { function queryBananaTaskStatus (line 48) | async function queryBananaTaskStatus(requestId: string, apiKey: string):... function queryGeminiBatchStatus (line 106) | async function queryGeminiBatchStatus(batchName: string, apiKey: string)... function queryGoogleVideoStatus (line 175) | async function queryGoogleVideoStatus(operationName: string, apiKey: str... function querySeedanceVideoStatus (line 284) | async function querySeedanceVideoStatus(taskId: string, apiKey: string):... FILE: src/lib/async/map-with-concurrency.ts function mapWithConcurrency (line 1) | async function mapWithConcurrency( FILE: src/lib/auth.ts method authorize (line 22) | async authorize(credentials) { method jwt (line 64) | async jwt({ token, user }: any) { method session (line 71) | async session({ session, token }: any) { FILE: src/lib/billing/cost.ts constant USD_TO_CNY (line 22) | const USD_TO_CNY = 7.2 constant MARKUP (line 24) | const MARKUP = { type MarkupCategory (line 34) | type MarkupCategory = keyof typeof MARKUP type ApiType (line 36) | type ApiType = 'text' | 'image' | 'video' | 'voice' | 'voice-design' | '... type UsageUnit (line 37) | type UsageUnit = 'token' | 'image' | 'video' | 'second' | 'call' type LlmCustomPricing (line 39) | interface LlmCustomPricing { type MediaCustomPricing (line 44) | interface MediaCustomPricing { type ModelCustomPricing (line 49) | interface ModelCustomPricing { constant DEFAULT_VOICE_MODEL_ID (line 55) | const DEFAULT_VOICE_MODEL_ID = 'index-tts2' constant DEFAULT_VOICE_DESIGN_MODEL_ID (line 56) | const DEFAULT_VOICE_DESIGN_MODEL_ID = 'bailian-voice-design' constant DEFAULT_LIP_SYNC_MODEL_ID (line 57) | const DEFAULT_LIP_SYNC_MODEL_ID = 'kling' function getMarkup (line 59) | function getMarkup(category: MarkupCategory): number { function parseModelId (line 63) | function parseModelId(model: string): string { function normalizeCapabilitySelections (line 68) | function normalizeCapabilitySelections( function resolveModelPriceStrict (line 82) | function resolveModelPriceStrict(input: { function resolveTextUnitPrice (line 138) | function resolveTextUnitPrice(model: string, tokenType: 'input' | 'outpu... function resolveVideoCapabilities (line 147) | function resolveVideoCapabilities(model: string): ModelCapabilities | un... function videoCapabilitySupportsField (line 160) | function videoCapabilitySupportsField( function resolveVideoDurationRangeFromCapabilities (line 177) | function resolveVideoDurationRangeFromCapabilities( function resolveVideoDefaultGenerateAudioFromCapabilities (line 193) | function resolveVideoDefaultGenerateAudioFromCapabilities(model: string)... function validateVideoSelectionsAgainstCapabilitiesOrThrow (line 202) | function validateVideoSelectionsAgainstCapabilitiesOrThrow( function applyVideoDurationScaling (line 253) | function applyVideoDurationScaling(input: { function calcText (line 276) | function calcText( function resolveCustomMediaPrice (line 293) | function resolveCustomMediaPrice(input: { function calcImage (line 330) | function calcImage( function calcVideo (line 404) | function calcVideo( function calcVoice (line 527) | function calcVoice(durationSeconds: number): number { function calcVoiceDesign (line 536) | function calcVoiceDesign(): number { function calcLipSync (line 544) | function calcLipSync(model = DEFAULT_LIP_SYNC_MODEL_ID): number { FILE: src/lib/billing/currency.ts constant BILLING_CURRENCY (line 1) | const BILLING_CURRENCY = 'CNY' as const type BillingCurrency (line 3) | type BillingCurrency = typeof BILLING_CURRENCY FILE: src/lib/billing/errors.ts class InsufficientBalanceError (line 1) | class InsufficientBalanceError extends Error { method constructor (line 5) | constructor(required: number, available: number) { type BillingOperationErrorCode (line 13) | type BillingOperationErrorCode = class BillingOperationError (line 31) | class BillingOperationError extends Error { method constructor (line 36) | constructor( FILE: src/lib/billing/ledger.ts type LedgerRecordParams (line 9) | type LedgerRecordParams = { type FreezeSnapshot (line 21) | type FreezeSnapshot = { type BalanceSnapshot (line 28) | type BalanceSnapshot = { constant MONEY_SCALE (line 38) | const MONEY_SCALE = 6 constant MONEY_EPSILON (line 39) | const MONEY_EPSILON = 1e-9 function normalizeMoney (line 41) | function normalizeMoney(value: number): number { function toBalanceSnapshot (line 45) | function toBalanceSnapshot(balance: { function getBalance (line 65) | async function getBalance(userId: string) { function getFreezeByIdempotencyKey (line 80) | async function getFreezeByIdempotencyKey(idempotencyKey: string): Promis... function checkBalance (line 100) | async function checkBalance(userId: string, requiredAmount: number): Pro... function freezeBalance (line 105) | async function freezeBalance( function confirmChargeWithRecord (line 191) | async function confirmChargeWithRecord( function rollbackFreeze (line 283) | async function rollbackFreeze(freezeId: string): Promise { function increasePendingFreezeAmount (line 329) | async function increasePendingFreezeAmount(freezeId: string, delta: numb... function recordShadowUsage (line 399) | async function recordShadowUsage( type AddBalanceOptions (line 449) | type AddBalanceOptions = { function resolveAddBalanceOptions (line 457) | function resolveAddBalanceOptions(reasonOrOptions?: string | AddBalanceO... function addBalance (line 470) | async function addBalance(userId: string, amount: number, reasonOrOption... FILE: src/lib/billing/mode.ts constant VALID_MODES (line 3) | const VALID_MODES: BillingMode[] = ['OFF', 'SHADOW', 'ENFORCE'] function normalizeMode (line 5) | function normalizeMode(input: unknown): BillingMode | null { function getModeFromEnv (line 12) | function getModeFromEnv(): BillingMode { function getBillingMode (line 16) | async function getBillingMode(): Promise { function getBootBillingEnabled (line 20) | function getBootBillingEnabled() { FILE: src/lib/billing/money.ts type MoneyValue (line 3) | type MoneyValue = Prisma.Decimal | number | string | null | undefined function toMoneyNumber (line 5) | function toMoneyNumber(value: MoneyValue): number { function roundMoney (line 29) | function roundMoney(value: number, scale = 6): number { FILE: src/lib/billing/reporting.ts type RecordParams (line 8) | interface RecordParams { type PureRecordParams (line 15) | interface PureRecordParams extends RecordParams { constant VIRTUAL_PROJECT_IDS (line 27) | const VIRTUAL_PROJECT_IDS = new Set(['asset-hub', 'global-asset-hub', 's... function isProjectScoped (line 29) | function isProjectScoped(projectId: string): boolean { function buildBillingMeta (line 42) | function buildBillingMeta(params: { function recordUsageCostOnly (line 83) | async function recordUsageCostOnly( function getProjectTotalCost (line 138) | async function getProjectTotalCost(projectId: string): Promise { function getProjectCostDetails (line 151) | async function getProjectCostDetails(projectId: string) { function getUserCostSummary (line 199) | async function getUserCostSummary(userId: string) { function getUserCostDetails (line 232) | async function getUserCostDetails(userId: string, page = 1, pageSize = 2... FILE: src/lib/billing/runtime-usage.ts type TextUsageEntry (line 3) | interface TextUsageEntry { type TextUsageStore (line 9) | type TextUsageStore = { function withTextUsageCollection (line 15) | async function withTextUsageCollection( function recordTextUsage (line 28) | function recordTextUsage(entry: TextUsageEntry) { FILE: src/lib/billing/service.ts type CostInput (line 36) | type CostInput = { type SyncBillingParams (line 47) | type SyncBillingParams = { type ResolvedActual (line 62) | type ResolvedActual = { type UsageByModel (line 68) | type UsageByModel = Record( function clampChargedCost (line 203) | function clampChargedCost(actualCost: number, freezeCost: number) { function ensureFreezeCoverage (line 217) | async function ensureFreezeCoverage(params: { function resolveActualForSync (line 243) | function resolveActualForSync( function resolveTaskActual (line 286) | function resolveTaskActual( function buildSyncBillingKey (line 344) | function buildSyncBillingKey(params: SyncBillingParams, recordPara... function withSyncBillingCore (line 367) | async function withSyncBillingCore( function loadUserCustomPricing (line 523) | async function loadUserCustomPricing( function withTextBilling (line 611) | async function withTextBilling( function withImageBilling (line 643) | async function withImageBilling( function withVideoBilling (line 668) | async function withVideoBilling( function withVoiceBilling (line 694) | async function withVoiceBilling( function withVoiceDesignBilling (line 724) | async function withVoiceDesignBilling( function withLipSyncBilling (line 745) | async function withLipSyncBilling( function handleBillingError (line 767) | function handleBillingError(error: unknown): NextResponse | null { function prepareTaskBilling (line 782) | async function prepareTaskBilling(task: { function settleTaskBilling (line 864) | async function settleTaskBilling(task: { function rollbackTaskBilling (line 1045) | async function rollbackTaskBilling(task: { FILE: src/lib/billing/task-policy.ts type AnyPayload (line 14) | type AnyPayload = Record | null | undefined constant BILLABLE_TASK_TYPES (line 16) | const BILLABLE_TASK_TYPES = new Set([ function toNumber (line 56) | function toNumber(value: unknown, fallback: number) { function readString (line 62) | function readString(value: unknown): string | null { function readNumber (line 68) | function readNumber(value: unknown): number | null { function toRecord (line 73) | function toRecord(value: unknown): Record { function pickFirstString (line 78) | function pickFirstString(values: unknown[]): string | null { function buildTextTaskInfo (line 86) | function buildTextTaskInfo(taskType: TaskType, payload: AnyPayload): Tas... function buildImageTaskInfo (line 116) | function buildImageTaskInfo(taskType: TaskType, payload: AnyPayload): Ta... function buildVideoTaskInfo (line 149) | function buildVideoTaskInfo(taskType: TaskType, payload: AnyPayload): Ta... function buildVoiceTaskInfo (line 198) | function buildVoiceTaskInfo(taskType: TaskType, payload: AnyPayload): Ta... function buildVoiceDesignTaskInfo (line 216) | function buildVoiceDesignTaskInfo(taskType: TaskType): TaskBillingInfo { function isBillableTaskType (line 232) | function isBillableTaskType(taskType: TaskType) { function buildDefaultTaskBillingInfo (line 236) | function buildDefaultTaskBillingInfo(taskType: TaskType, payload: AnyPay... FILE: src/lib/billing/types.ts type BillingMode (line 4) | type BillingMode = 'OFF' | 'SHADOW' | 'ENFORCE' type BillingStatus (line 6) | type BillingStatus = type BillingRecordParams (line 14) | interface BillingRecordParams { type AnyTaskBillingInfo (line 22) | type AnyTaskBillingInfo = TaskBillingInfo | { billable: false; source?: ... type BillingQuote (line 24) | interface BillingQuote { FILE: src/lib/config-service.ts type ParsedModelKey (line 23) | type ParsedModelKey = { provider: string, modelId: string } function parseModelKey (line 28) | function parseModelKey(key: string | null | undefined): ParsedModelKey |... function composeModelKey (line 40) | function composeModelKey(provider: string, modelId: string): string { function extractModelId (line 47) | function extractModelId(key: string | null | undefined): string | null { function extractModelKey (line 55) | function extractModelKey(key: string | null | undefined): string | null { function isRecord (line 61) | function isRecord(value: unknown): value is Record { function isCapabilityValue (line 65) | function isCapabilityValue(value: unknown): value is CapabilityValue { function normalizeCapabilitySelections (line 69) | function normalizeCapabilitySelections(raw: unknown): CapabilitySelectio... function parseCapabilitySelections (line 91) | function parseCapabilitySelections(raw: string | null | undefined): Capa... type ProjectModelConfig (line 100) | interface ProjectModelConfig { type UserModelConfig (line 114) | interface UserModelConfig { function getUserWorkflowConcurrencyConfig (line 125) | async function getUserWorkflowConcurrencyConfig( function getProjectModelConfig (line 147) | async function getProjectModelConfig( function getUserModelConfig (line 174) | async function getUserModelConfig(userId: string): Promise function isApiKeyObject (line 18) | function isApiKeyObject(value: unknown): value is ApiKeyObject { function deriveEncryptionKey (line 27) | function deriveEncryptionKey(): Buffer { function encryptApiKey (line 50) | function encryptApiKey(plaintext: string): string { function decryptApiKey (line 85) | function decryptApiKey(ciphertext: string): string { function encryptApiKeyObject (line 125) | function encryptApiKeyObject(apiKeys: ApiKeyObject): string { function decryptApiKeyObject (line 154) | function decryptApiKeyObject(encryptedJson: string): ApiKeyObject { FILE: src/lib/env.ts function getPublicBaseUrl (line 6) | function getPublicBaseUrl(): string { function getInternalBaseUrl (line 14) | function getInternalBaseUrl(): string { function getBaseUrl (line 24) | function getBaseUrl(): string { function getApiUrl (line 32) | function getApiUrl(path: string): string { FILE: src/lib/episode-marker-detector.ts type EpisodeMarkerMatch (line 8) | interface EpisodeMarkerMatch { type PreviewSplit (line 14) | interface PreviewSplit { type EpisodeMarkerResult (line 23) | interface EpisodeMarkerResult { constant CHINESE_NUMBERS (line 33) | const CHINESE_NUMBERS: Record = { function chineseToNumber (line 52) | function chineseToNumber(chinese: string): number { type DetectionPattern (line 85) | interface DetectionPattern { constant DETECTION_PATTERNS (line 93) | const DETECTION_PATTERNS: DetectionPattern[] = [ function detectEpisodeMarkers (line 188) | function detectEpisodeMarkers(content: string): EpisodeMarkerResult { function splitByMarkers (line 320) | function splitByMarkers(content: string, markerResult: EpisodeMarkerResu... FILE: src/lib/error-handler.ts constant ERROR_CODES (line 4) | const ERROR_CODES = { type ErrorCode (line 10) | type ErrorCode = typeof ERROR_CODES[keyof typeof ERROR_CODES] type ApiErrorPayload (line 12) | type ApiErrorPayload = { type ParsedApiErrorPayload (line 28) | type ParsedApiErrorPayload = { function toUnifiedErrorCode (line 34) | function toUnifiedErrorCode(code: ErrorCode | UnifiedErrorCode): Unified... function parseApiErrorPayload (line 39) | function parseApiErrorPayload(payload: ApiErrorPayload | null): ParsedAp... function readApiErrorPayload (line 52) | async function readApiErrorPayload(res: Response): Promise = { function isKnownErrorCode (line 191) | function isKnownErrorCode(code: unknown): code is UnifiedErrorCode { function resolveUnifiedErrorCode (line 195) | function resolveUnifiedErrorCode(code: unknown): UnifiedErrorCode | null { function getErrorSpec (line 202) | function getErrorSpec(code: UnifiedErrorCode) { FILE: src/lib/errors/display.ts function extractProviderDetail (line 6) | function extractProviderDetail(raw: string | null | undefined): string |... function resolveErrorDisplay (line 20) | function resolveErrorDisplay(input?: { FILE: src/lib/errors/extract.ts function extractErrorMessage (line 1) | function extractErrorMessage(error: unknown, fallback = 'Unknown error')... function extractErrorStatus (line 12) | function extractErrorStatus(error: unknown): number | null { FILE: src/lib/errors/normalize.ts type NormalizeOptions (line 6) | type NormalizeOptions = { type ErrorLike (line 12) | type ErrorLike = { function toMessage (line 20) | function toMessage(value: unknown): string { function toLowerMessage (line 30) | function toLowerMessage(value: unknown): string { function containsAny (line 34) | function containsAny(haystack: string, needles: string[]) { function isModelNotOpenCode (line 41) | function isModelNotOpenCode(code: unknown): boolean { function isModelNotOpenMessage (line 47) | function isModelNotOpenMessage(message: string): boolean { function isModelNotRegisteredMessage (line 56) | function isModelNotRegisteredMessage(message: string): boolean { function isModelNotConfiguredMessage (line 67) | function isModelNotConfiguredMessage(message: string): boolean { function isEmptyResponseMessage (line 89) | function isEmptyResponseMessage(message: string): boolean { function isVideoApiFormatUnsupportedMessage (line 98) | function isVideoApiFormatUnsupportedMessage(message: string): boolean { function buildNormalizedError (line 120) | function buildNormalizedError( function inferCodeFromMessage (line 139) | function inferCodeFromMessage(message: string): UnifiedErrorCode | null { function inferCodeFromPrismaCode (line 188) | function inferCodeFromPrismaCode(prismaCode: string): UnifiedErrorCode { function normalizeAnyError (line 195) | function normalizeAnyError(input: unknown, options: NormalizeOptions = {... function normalizeTaskError (line 293) | function normalizeTaskError( FILE: src/lib/errors/types.ts type ErrorContext (line 3) | type ErrorContext = 'api' | 'worker' type NormalizedErrorDetails (line 5) | type NormalizedErrorDetails = Record | null type NormalizedError (line 7) | type NormalizedError = { FILE: src/lib/errors/user-messages.ts constant USER_ERROR_MESSAGES_ZH (line 3) | const USER_ERROR_MESSAGES_ZH: Record = { function getUserMessageByCode (line 30) | function getUserMessageByCode(code: UnifiedErrorCode) { FILE: src/lib/fonts.ts constant POSSIBLE_FONT_PATHS (line 8) | const POSSIBLE_FONT_PATHS = [ function loadFontData (line 20) | function loadFontData(): Buffer | null { function initializeFonts (line 43) | async function initializeFonts(): Promise { function getFontFamily (line 55) | function getFontFamily(): string { function createLabelSVG (line 64) | async function createLabelSVG( function createFallbackImage (line 134) | async function createFallbackImage(width: number, height: number): Promi... FILE: src/lib/gemini-batch-utils.ts type UnknownRecord (line 17) | type UnknownRecord = Record function asRecord (line 19) | function asRecord(value: unknown): UnknownRecord | null { function getErrorMessage (line 23) | function getErrorMessage(error: unknown): string { type GeminiBatchClient (line 30) | interface GeminiBatchClient { function submitGeminiBatch (line 51) | async function submitGeminiBatch( function queryGeminiBatchStatus (line 171) | async function queryGeminiBatchStatus(batchName: string, apiKey: string)... FILE: src/lib/generator-api.ts constant OFFICIAL_ONLY_PROVIDER_KEYS (line 24) | const OFFICIAL_ONLY_PROVIDER_KEYS = new Set(['bailian', 'siliconflow']) function aspectRatioToOpenAISize (line 29) | function aspectRatioToOpenAISize(aspectRatio: string | undefined): strin... function generateImage (line 51) | async function generateImage( function generateVideo (line 179) | async function generateVideo( function generateAudio (line 288) | async function generateAudio( FILE: src/lib/generators/ark.ts type ArkImageOptions (line 29) | interface ArkImageOptions { type ArkVideoOptions (line 38) | interface ArkVideoOptions { type ArkVideoContentItem (line 57) | type ArkVideoContentItem = type ArkSeedanceModelSpec (line 61) | interface ArkSeedanceModelSpec { constant ARK_SEEDANCE_MODEL_SPECS (line 71) | const ARK_SEEDANCE_MODEL_SPECS: Record = { constant ARK_VIDEO_ALLOWED_RATIOS (line 110) | const ARK_VIDEO_ALLOWED_RATIOS = new Set(['16:9', '4:3', '1:1', '3:4', '... function isInteger (line 112) | function isInteger(value: unknown): value is number { constant SIZE_MAP_4K (line 121) | const SIZE_MAP_4K: Record = { constant SIZE_MAP_3K (line 134) | const SIZE_MAP_3K: Record = { function isSeedream5Model (line 147) | function isSeedream5Model(modelId: string): boolean { function getSizeMapForModel (line 151) | function getSizeMapForModel(modelId: string): Record { class ArkImageGenerator (line 159) | class ArkImageGenerator extends BaseImageGenerator { method doGenerate (line 160) | protected async doGenerate(params: ImageGenerateParams): Promise { method generate (line 133) | async generate(params: VideoGenerateParams): Promise { method generate (line 159) | async generate(params: AudioGenerateParams): Promise { FILE: src/lib/generators/factory.ts function createImageGenerator (line 36) | function createImageGenerator(provider: string, modelId?: string): Image... function createVideoGenerator (line 78) | function createVideoGenerator(provider: string): VideoGenerator { function createAudioGenerator (line 107) | function createAudioGenerator(provider: string): AudioGenerator { FILE: src/lib/generators/fal.ts constant FAL_IMAGE_ENDPOINTS (line 34) | const FAL_IMAGE_ENDPOINTS: Record = { class FalImageGenerator (line 56) | class FalImageGenerator extends BaseImageGenerator { method doGenerate (line 57) | protected async doGenerate(params: ImageGenerateParams): Promise) { class GeminiCompatibleImageGenerator (line 66) | class GeminiCompatibleImageGenerator extends BaseImageGenerator { method constructor (line 70) | constructor(modelId?: string, providerId?: string) { method doGenerate (line 76) | protected async doGenerate(params: ImageGenerateParams): Promise = { function isNonEmptyString (line 90) | function isNonEmptyString(value: unknown): value is string { function getVideoModelSpec (line 94) | function getVideoModelSpec(modelId: string): MinimaxVideoModelSpec { function normalizeGenerationMode (line 102) | function normalizeGenerationMode(raw: unknown): MinimaxVideoGenerationMo... function normalizeResolution (line 108) | function normalizeResolution(raw: string): MinimaxResolution { function pickRulesByMode (line 117) | function pickRulesByMode( function validateResolutionAndDuration (line 129) | function validateResolutionAndDuration(input: { class MinimaxVideoGenerator (line 163) | class MinimaxVideoGenerator extends BaseVideoGenerator { method doGenerate (line 164) | protected async doGenerate(params: VideoGenerateParams): Promise stri... function adaptVideoResolution (line 121) | function adaptVideoResolution( function getSupportedResolutions (line 143) | function getSupportedResolutions(provider: string): string[] { function isResolutionSupported (line 161) | function isResolutionSupported(provider: string, resolution: string): bo... FILE: src/lib/generators/video/google.ts type GoogleVeoOptions (line 10) | interface GoogleVeoOptions { function dataUrlToInlineData (line 18) | function dataUrlToInlineData(dataUrl: string): { mimeType: string; image... function asRecord (line 26) | function asRecord(value: unknown): Record | null { function extractOperationName (line 30) | function extractOperationName(response: unknown): string | null { class GoogleVeoVideoGenerator (line 41) | class GoogleVeoVideoGenerator extends BaseVideoGenerator { method constructor (line 44) | constructor(providerId?: string) { method doGenerate (line 49) | protected async doGenerate(params: VideoGenerateParams): Promise(...values: Array): T | undef... function buildUniformModeSpec (line 129) | function buildUniformModeSpec(input: { function buildVidu20ModeSpec (line 150) | function buildVidu20ModeSpec(): ViduModeSpec { constant Q3_DURATIONS (line 167) | const Q3_DURATIONS = range(1, 16) constant Q2_NORMAL_DURATIONS (line 168) | const Q2_NORMAL_DURATIONS = range(1, 10) constant Q2_FIRSTLAST_DURATIONS (line 169) | const Q2_FIRSTLAST_DURATIONS = range(1, 8) constant VIDU_MODEL_SPECS (line 171) | const VIDU_MODEL_SPECS: Record = { function isQ3Model (line 311) | function isQ3Model(modelId: string): boolean { function resolveGenerationMode (line 315) | function resolveGenerationMode(lastFrameImageUrl: string | undefined): V... function normalizeGenerationMode (line 319) | function normalizeGenerationMode(raw: unknown): ViduGenerationMode | und... function resolveViduEndpoint (line 325) | function resolveViduEndpoint(mode: ViduGenerationMode): string { function resolveModeSpec (line 329) | function resolveModeSpec(modelSpec: ViduModelSpec, mode: ViduGenerationM... function resolveResolutionRule (line 338) | function resolveResolutionRule(modeSpec: ViduModeSpec, duration: number)... function isRatioAllowedByProfile (line 346) | function isRatioAllowedByProfile(profile: ViduAspectRatioProfile, ratio:... function normalizeOptionalString (line 358) | function normalizeOptionalString(raw: unknown): string | undefined { function normalizeOptionalBoolean (line 366) | function normalizeOptionalBoolean(raw: unknown, field: string): boolean ... class ViduVideoGenerator (line 374) | class ViduVideoGenerator extends BaseVideoGenerator { method doGenerate (line 375) | protected async doGenerate(params: VideoGenerateParams): Promise(slots: readon... function hasImageSlotError (line 20) | function hasImageSlotError(slot: DisplayableImageSlotLike): boolean { function resolveDisplayImageSlots (line 24) | function resolveDisplayImageSlots( function resolveImageSlotPhase (line 39) | function resolveImageSlotPhase(slot: ImageSlotLike, isRunning: boolean):... function resolveGroupedImageSlotPhase (line 46) | function resolveGroupedImageSlotPhase( type ShowSlotGridInput (line 65) | interface ShowSlotGridInput { function shouldShowImageSlotGrid (line 72) | function shouldShowImageSlotGrid(input: ShowSlotGridInput): boolean { FILE: src/lib/image-generation/use-image-generation-count.ts function useImageGenerationCount (line 10) | function useImageGenerationCount(scope: ImageGenerationCountScope) { FILE: src/lib/image-label.ts function updateImageLabel (line 21) | async function updateImageLabel( function updateCharacterAppearanceLabels (line 84) | async function updateCharacterAppearanceLabels( function updateLocationImageLabels (line 143) | async function updateLocationImageLabels( FILE: src/lib/json-repair.ts function stripMarkdownFence (line 6) | function stripMarkdownFence(input: string): string { function extractJsonSubstring (line 20) | function extractJsonSubstring(input: string): string { function safeParseJson (line 58) | function safeParseJson(input: string): unknown { function safeParseJsonObject (line 79) | function safeParseJsonObject(input: string): Record { function safeParseJsonArray (line 91) | function safeParseJsonArray( FILE: src/lib/lipsync/index.ts function createSubmitContext (line 9) | function createSubmitContext( function resolveProviderKey (line 21) | function resolveProviderKey(value: string): LipSyncProviderKey { function generateLipSync (line 29) | async function generateLipSync( FILE: src/lib/lipsync/preprocess.ts constant LIPSYNC_MIN_AUDIO_DURATION_MS (line 7) | const LIPSYNC_MIN_AUDIO_DURATION_MS = 2000 type LipSyncProviderKey (line 9) | type LipSyncProviderKey = 'fal' | 'vidu' | 'bailian' type LoadedBinary (line 11) | interface LoadedBinary { type WavInfo (line 16) | interface WavInfo { type Mp4Box (line 23) | interface Mp4Box { type LipSyncPreprocessContext (line 30) | interface LipSyncPreprocessContext { type LipSyncPreprocessResult (line 34) | interface LipSyncPreprocessResult { function readTrimmedString (line 40) | function readTrimmedString(value: unknown): string { function normalizeDurationMs (line 44) | function normalizeDurationMs(value: number | null | undefined): number |... function parseDataUrl (line 51) | function parseDataUrl(input: string): LoadedBinary { function loadBinaryFromInput (line 69) | async function loadBinaryFromInput(input: string): Promise { function parseWavInfo (line 96) | function parseWavInfo(buffer: Buffer): WavInfo | null { function getWavDurationMs (line 139) | function getWavDurationMs(buffer: Buffer): number | null { function toBlockAlignedByteLength (line 145) | function toBlockAlignedByteLength(byteLength: number, blockAlign: number... function padWavToMinDuration (line 150) | function padWavToMinDuration(buffer: Buffer, targetDurationMs: number): ... function trimWavToDuration (line 186) | function trimWavToDuration(buffer: Buffer, targetDurationMs: number): Bu... function readUint64BE (line 220) | function readUint64BE(buffer: Buffer, offset: number): number { function readMp4Box (line 226) | function readMp4Box(buffer: Buffer, offset: number, limit: number): Mp4B... function parseMp4DurationMs (line 252) | function parseMp4DurationMs(buffer: Buffer): number { function resolveVideoDurationMs (line 302) | async function resolveVideoDurationMs(params: LipSyncParams): Promise = { function readTrimmedString (line 72) | function readTrimmedString(value: unknown): string { function readContentType (line 76) | function readContentType(value: string | null | undefined): string { function parseDataUrl (line 83) | function parseDataUrl(dataUrl: string): { contentType: string; buffer: B... function readPathExt (line 104) | function readPathExt(urlLike: string): string { function inferInputFileName (line 115) | function inferInputFileName(kind: LipSyncInputType, sourceHint: string, ... function resolveLipSyncInputAsset (line 127) | async function resolveLipSyncInputAsset(rawInput: string, kind: LipSyncI... function parseBailianUploadPolicyResponse (line 171) | async function parseBailianUploadPolicyResponse(response: Response): Pro... function resolveBailianUploadPolicy (line 185) | function resolveBailianUploadPolicy(data: BailianUploadPolicyResponse): ... function getBailianUploadPolicy (line 210) | async function getBailianUploadPolicy(apiKey: string, modelId: string): ... function uploadToBailianTempStorage (line 230) | async function uploadToBailianTempStorage( function parseBailianLipSyncSubmitResponse (line 264) | async function parseBailianLipSyncSubmitResponse(response: Response): Pr... function submitBailianLipSync (line 278) | async function submitBailianLipSync( FILE: src/lib/lipsync/providers/fal.ts function submitFalLipSync (line 6) | async function submitFalLipSync( FILE: src/lib/lipsync/providers/vidu.ts type ViduLipSyncSubmitResponse (line 4) | interface ViduLipSyncSubmitResponse { function readTrimmedString (line 10) | function readTrimmedString(value: unknown): string { function toAbsoluteHttpUrl (line 14) | function toAbsoluteHttpUrl(rawUrl: string): string { function isPrivateHost (line 28) | function isPrivateHost(hostname: string): boolean { function normalizeProviderPullUrl (line 53) | function normalizeProviderPullUrl(inputUrl: string, field: 'video_url' |... function submitViduLipSync (line 73) | async function submitViduLipSync( FILE: src/lib/lipsync/types.ts type LipSyncResult (line 1) | interface LipSyncResult { type LipSyncParams (line 8) | interface LipSyncParams { type LipSyncSubmitContext (line 15) | interface LipSyncSubmitContext { FILE: src/lib/llm-observe/config.ts type LLMObserveDisplayMode (line 1) | type LLMObserveDisplayMode = 'loading' | 'detail' function parseBoolean (line 3) | function parseBoolean(value: string | undefined, fallback: boolean) { function parseNumber (line 11) | function parseNumber(value: string | undefined, fallback: number) { function parseMode (line 17) | function parseMode(value: string | undefined, fallback: LLMObserveDispla... constant LLM_OBSERVE_ENABLED (line 22) | const LLM_OBSERVE_ENABLED = parseBoolean( constant LLM_OBSERVE_DEFAULT_MODE (line 26) | const LLM_OBSERVE_DEFAULT_MODE = parseMode( constant LLM_OBSERVE_LONG_TASK_THRESHOLD_MS (line 30) | const LLM_OBSERVE_LONG_TASK_THRESHOLD_MS = parseNumber( constant LLM_OBSERVE_REASONING_VISIBLE (line 34) | const LLM_OBSERVE_REASONING_VISIBLE = parseBoolean( constant INTERNAL_TASK_TOKEN (line 38) | const INTERNAL_TASK_TOKEN = process.env.INTERNAL_TASK_TOKEN || '' constant INTERNAL_TASK_API_BASE_URL (line 39) | const INTERNAL_TASK_API_BASE_URL = FILE: src/lib/llm-observe/internal-stream-context.ts type InternalLLMStreamStepMeta (line 4) | type InternalLLMStreamStepMeta = { type InternalLLMStreamCallbacks (line 12) | type InternalLLMStreamCallbacks = { function withInternalLLMStreamCallbacks (line 32) | async function withInternalLLMStreamCallbacks( function getInternalLLMStreamCallbacks (line 39) | function getInternalLLMStreamCallbacks(): InternalLLMStreamCallbacks | n... FILE: src/lib/llm-observe/internal-task.ts function isInternalTaskExecution (line 7) | function isInternalTaskExecution(request: NextRequest): boolean { FILE: src/lib/llm-observe/route-task.ts function toObject (line 13) | function toObject(value: unknown): Record { function parseSyncFlag (line 18) | function parseSyncFlag(value: unknown): boolean { function resolveDisplayMode (line 25) | function resolveDisplayMode(value: unknown, fallback: LLMObserveDisplayM... function resolvePositiveInteger (line 30) | function resolvePositiveInteger(value: unknown, fallback: number): number { function shouldRunSyncTask (line 43) | function shouldRunSyncTask(request: NextRequest, body?: unknown) { function shouldRunAsyncTask (line 51) | function shouldRunAsyncTask(request: NextRequest, body?: unknown) { function maybeSubmitLLMTask (line 58) | async function maybeSubmitLLMTask(params: { FILE: src/lib/llm-observe/stage-pipeline.ts type LLMTaskPipelineStage (line 4) | type LLMTaskPipelineStage = { type LLMTaskPipeline (line 10) | type LLMTaskPipeline = { type LLMTaskFlowMeta (line 15) | type LLMTaskFlowMeta = { type LLMTaskFlowDefinition (line 22) | type LLMTaskFlowDefinition = { constant FLOW_DEFINITIONS (line 27) | const FLOW_DEFINITIONS: ReadonlyArray = [ constant FLOW_BY_ID (line 85) | const FLOW_BY_ID: Record = FLOW_DEFINITIO... constant FLOW_META_BY_TASK_TYPE (line 93) | const FLOW_META_BY_TASK_TYPE: Record = FLOW_DEF... function createSingleStageMeta (line 108) | function createSingleStageMeta(taskType: string): LLMTaskFlowMeta { function createSingleStagePipeline (line 117) | function createSingleStagePipeline(taskType: string): LLMTaskPipeline { function clonePipeline (line 131) | function clonePipeline(pipeline: LLMTaskPipeline): LLMTaskPipeline { function getTaskFlowMeta (line 138) | function getTaskFlowMeta(taskType: string | null | undefined): LLMTaskFl... function getTaskPipelineByFlowId (line 143) | function getTaskPipelineByFlowId( function getTaskPipeline (line 155) | function getTaskPipeline(taskType: string | null | undefined): LLMTaskPi... FILE: src/lib/llm-observe/task-policy.ts type LLMTaskPolicy (line 4) | type LLMTaskPolicy = { constant DEFAULT_POLICY (line 12) | const DEFAULT_POLICY: LLMTaskPolicy = { constant LONG_FLOW_POLICY (line 20) | const LONG_FLOW_POLICY: LLMTaskPolicy = { constant LONG_FLOW_HIGH_POLICY (line 28) | const LONG_FLOW_HIGH_POLICY: LLMTaskPolicy = { constant LLM_STANDARD_POLICY (line 33) | const LLM_STANDARD_POLICY: LLMTaskPolicy = { constant POLICY_BY_TASK_TYPE (line 41) | const POLICY_BY_TASK_TYPE: Partial> = { function getLLMTaskPolicy (line 68) | function getLLMTaskPolicy(taskType: string | null | undefined): LLMTaskP... FILE: src/lib/llm-observe/types.ts type LLMStreamKind (line 3) | type LLMStreamKind = 'text' | 'reasoning' type LLMStreamChunk (line 5) | type LLMStreamChunk = { type LLMObserveMeta (line 12) | type LLMObserveMeta = { type LLMObservePayload (line 19) | type LLMObservePayload = { FILE: src/lib/llm/chat-completion.ts constant OFFICIAL_ONLY_PROVIDER_KEYS (line 40) | const OFFICIAL_ONLY_PROVIDER_KEYS = new Set(['bailian', 'siliconflow']) function toRecord (line 42) | function toRecord(value: unknown): Record | null { function errorMessage (line 46) | function errorMessage(error: unknown): string { function chatCompletion (line 55) | async function chatCompletion( FILE: src/lib/llm/chat-stream.ts constant OFFICIAL_ONLY_PROVIDER_KEYS (line 43) | const OFFICIAL_ONLY_PROVIDER_KEYS = new Set(['bailian', 'siliconflow']) type GoogleModelClient (line 45) | type GoogleModelClient = { type GoogleChunk (line 49) | type GoogleChunk = { type AISdkStreamChunk (line 53) | type AISdkStreamChunk = { type OpenAIStreamWithFinal (line 58) | type OpenAIStreamWithFinal = AsyncIterable & { function chatCompletionStream (line 64) | async function chatCompletionStream( FILE: src/lib/llm/completion-parts.ts function getCompletionContent (line 5) | function getCompletionContent(completion: OpenAI.Chat.Completions.ChatCo... function getCompletionParts (line 9) | function getCompletionParts(completion: OpenAI.Chat.Completions.ChatComp... FILE: src/lib/llm/providers/google.ts type GoogleTextPart (line 1) | interface GoogleTextPart { type GoogleUsageLike (line 7) | interface GoogleUsageLike { type GoogleResponseLike (line 18) | interface GoogleResponseLike { function toNumber (line 25) | function toNumber(value: unknown): number | null { function isThoughtPart (line 29) | function isThoughtPart(part: GoogleTextPart): boolean { class GoogleEmptyResponseError (line 42) | class GoogleEmptyResponseError extends Error { method constructor (line 43) | constructor(finishReason?: unknown) { function extractGoogleParts (line 50) | function extractGoogleParts(response: unknown, throwOnEmpty = false): { ... function extractGoogleText (line 86) | function extractGoogleText(response: unknown): string { function extractGoogleReasoning (line 90) | function extractGoogleReasoning(response: unknown): string { function extractGoogleUsage (line 94) | function extractGoogleUsage(response: unknown): { promptTokens: number; ... FILE: src/lib/llm/providers/openai-compat.ts function buildOpenAIChatCompletion (line 3) | function buildOpenAIChatCompletion( FILE: src/lib/llm/reasoning-capability.ts type ProviderApiMode (line 1) | type ProviderApiMode = 'gemini-sdk' | 'openai-official' | undefined function normalizeModelId (line 3) | function normalizeModelId(modelId: string): string { function isLikelyOpenAIReasoningModel (line 7) | function isLikelyOpenAIReasoningModel(modelId: string): boolean { function shouldUseOpenAIReasoningProviderOptions (line 17) | function shouldUseOpenAIReasoningProviderOptions(input: { FILE: src/lib/llm/runtime-shared.ts type LlmRawMessage (line 15) | type LlmRawMessage = { type LlmUsage (line 20) | type LlmUsage = { function completionUsageSummary (line 25) | function completionUsageSummary( function logLlmRawInput (line 39) | function logLlmRawInput(params: { function logLlmRawOutput (line 76) | function logLlmRawOutput(params: { function isRetryableError (line 119) | function isRetryableError(error: unknown): boolean { function recordCompletionUsage (line 129) | function recordCompletionUsage(model: string, completion: OpenAI.Chat.Co... type ResolvedLlmRuntimeModel (line 140) | interface ResolvedLlmRuntimeModel { function resolveLlmRuntimeModel (line 147) | async function resolveLlmRuntimeModel( FILE: src/lib/llm/stream-helpers.ts function resolveStreamStepMeta (line 5) | function resolveStreamStepMeta(options: ChatCompletionOptions): Internal... function emitStreamStage (line 28) | function emitStreamStage( function emitStreamChunk (line 37) | function emitStreamChunk( function emitChunkedText (line 53) | function emitChunkedText( FILE: src/lib/llm/stream-timeout.ts constant DEFAULT_STREAM_CHUNK_TIMEOUT_MS (line 12) | const DEFAULT_STREAM_CHUNK_TIMEOUT_MS = 3 * 60 * 1000 class StreamChunkTimeoutError (line 14) | class StreamChunkTimeoutError extends Error { method constructor (line 15) | constructor(timeoutMs: number) { FILE: src/lib/llm/types.ts type ChatCompletionOptions (line 4) | interface ChatCompletionOptions { type ChatCompletionStreamCallbacks (line 22) | interface ChatCompletionStreamCallbacks { type ChatMessage (line 39) | type ChatMessage = { role: 'user' | 'assistant' | 'system'; content: str... FILE: src/lib/llm/utils.ts function splitThinkTaggedContent (line 3) | function splitThinkTaggedContent(input: string): { text: string; reasoni... function collectTextValue (line 28) | function collectTextValue(value: unknown): string { function extractCompletionPartsFromContent (line 46) | function extractCompletionPartsFromContent(content: unknown): { text: st... function extractStreamDeltaParts (line 83) | function extractStreamDeltaParts(part: unknown): { textDelta: string; re... function getSystemPrompt (line 118) | function getSystemPrompt(messages: ChatMessage[]) { function getConversationMessages (line 127) | function getConversationMessages(messages: ChatMessage[]) { function mapReasoningEffort (line 136) | function mapReasoningEffort(effort: 'minimal' | 'low' | 'medium' | 'high... function buildReasoningAwareContent (line 142) | function buildReasoningAwareContent(text: string, reasoning: string) { FILE: src/lib/llm/vision.ts type GoogleVisionPart (line 27) | type GoogleVisionPart = { inlineData: { mimeType: string; data: string }... type ArkVisionContentItem (line 28) | type ArkVisionContentItem = { type: 'input_image'; image_url: string } |... type OpenAiVisionContentItem (line 29) | type OpenAiVisionContentItem = { type: 'text'; text: string } | { type: ... function getErrorMessage (line 31) | function getErrorMessage(error: unknown): string { function getErrorBody (line 40) | function getErrorBody(error: unknown): { message?: unknown; code?: unkno... function chatCompletionWithVision (line 49) | async function chatCompletionWithVision( function chatCompletionWithVisionStream (line 306) | async function chatCompletionWithVisionStream( FILE: src/lib/logging/config.ts constant LEVEL_WEIGHT (line 3) | const LEVEL_WEIGHT: Record = { function parseLevel (line 10) | function parseLevel(value?: string | null): LogLevel { function parseBoolean (line 18) | function parseBoolean(value?: string | null, fallback = false): boolean { constant LOG_CONFIG (line 24) | const LOG_CONFIG = { function shouldLogLevel (line 37) | function shouldLogLevel(level: LogLevel): boolean { FILE: src/lib/logging/context.ts type AsyncStorageLike (line 2) | type AsyncStorageLike = { function createLogContextStorage (line 8) | function createLogContextStorage(): AsyncStorageLike | null { function getCurrentContext (line 32) | function getCurrentContext(): LogContext { function withLogContext (line 38) | function withLogContext(context: LogContext, fn: () => T | Promise... function getLogContext (line 56) | function getLogContext(): LogContext { function setLogContext (line 60) | function setLogContext(context: Partial): void { FILE: src/lib/logging/core.ts type FileWriterModule (line 6) | type FileWriterModule = typeof import('./file-writer') constant SUPPRESSED_LOG_ACTIONS (line 10) | const SUPPRESSED_LOG_ACTIONS = new Set(['worker.progress.stream']) function shouldSuppressLogEvent (line 12) | function shouldSuppressLogEvent(event: Pick): boolean { function writeProjectLogLine (line 17) | function writeProjectLogLine(line: string, projectId: string | undefined... function serializeError (line 34) | function serializeError(error: unknown): ErrorFields | undefined { function normalizeDetails (line 56) | function normalizeDetails(args: unknown[]): Record | un... function parseLogArgs (line 64) | function parseLogArgs(args: unknown[]): { message: string; details: Reco... function nowChinaISOString (line 88) | function nowChinaISOString(): string { function write (line 97) | function write(level: LogLevel, event: Omit & { level: LogLevel; message:... function logWithLevel (line 154) | function logWithLevel(level: LogLevel, context: Partial | un... type ScopedLogInput (line 171) | type ScopedLogInput = { type ScopedLogFn (line 188) | type ScopedLogFn = (...args: unknown[]) => void function isScopedLogInput (line 190) | function isScopedLogInput(value: unknown): value is ScopedLogInput { function logScoped (line 194) | function logScoped(level: LogLevel, baseContext: Partial, ...args: unknown[]): ... function logInfoCtx (line 255) | function logInfoCtx(context: Partial, ...args: unknown[]): v... function logWarnCtx (line 259) | function logWarnCtx(context: Partial, ...args: unknown[]): v... function logErrorCtx (line 263) | function logErrorCtx(context: Partial, ...args: unknown[]): ... type ScopedLogger (line 267) | type ScopedLogger = { function createScopedLogger (line 276) | function createScopedLogger(baseContext: Partial): Scop... FILE: src/lib/logging/file-writer.ts function isEdgeOrBrowser (line 17) | function isEdgeOrBrowser(): boolean { type NodeModules (line 26) | type NodeModules = { function getNodeModules (line 34) | async function getNodeModules(): Promise { function registerProjectName (line 74) | function registerProjectName(projectId: string, projectName: string): vo... function resolveProjectName (line 84) | async function resolveProjectName(projectId: string): Promise { function getPrefix (line 189) | function getPrefix(module?: string): string { function flushBuffer (line 199) | async function flushBuffer(projectId: string, projectName: string): Prom... function writeLogToProjectFile (line 226) | async function writeLogToProjectFile( function onProjectNameAvailable (line 268) | function onProjectNameAvailable(projectId: string, projectName: string):... constant GLOBAL_LOG_MAX_BYTES (line 275) | const GLOBAL_LOG_MAX_BYTES = 10 * 1024 * 1024 // 10 MB function writeGlobalLogLine (line 281) | async function writeGlobalLogLine(line: string): Promise { type LogFileInfo (line 311) | interface LogFileInfo { function getLogFilesList (line 320) | async function getLogFilesList(): Promise { function readAllLogs (line 347) | async function readAllLogs(): Promise { function cleanupAllProjectLogs (line 371) | async function cleanupAllProjectLogs(): Promise { FILE: src/lib/logging/redact.ts constant MAX_DEPTH (line 1) | const MAX_DEPTH = 6 function isPlainObject (line 3) | function isPlainObject(value: unknown): value is Record { function shouldRedact (line 9) | function shouldRedact(key: string, redactKeys: string[]): boolean { function redactValue (line 14) | function redactValue(value: unknown, redactKeys: string[], depth = 0): u... FILE: src/lib/logging/semantic.ts function maybeRegisterProject (line 4) | function maybeRegisterProject(projectId?: string, projectName?: string):... type AnyRecord (line 10) | type AnyRecord = Record type SemanticLevel (line 11) | type SemanticLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' function toDetails (line 15) | function toDetails(input: unknown): AnyRecord | unknown[] | null { function resolveMessage (line 22) | function resolveMessage(value: unknown, fallback: string): string { function resolveDetails (line 26) | function resolveDetails(messageOrDetails: unknown, details: unknown): un... function createSemanticLogger (line 35) | function createSemanticLogger(module: string) { function logInternal (line 39) | function logInternal( function logUserAction (line 55) | function logUserAction( function logAIAnalysis (line 95) | function logAIAnalysis( function logProjectAction (line 165) | function logProjectAction( function logAuthAction (line 218) | function logAuthAction( FILE: src/lib/logging/types.ts type LogLevel (line 1) | type LogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' type ErrorFields (line 3) | interface ErrorFields { type LogContext (line 11) | interface LogContext { type SemanticContext (line 21) | interface SemanticContext extends LogContext { type LogEvent (line 27) | interface LogEvent { FILE: src/lib/media-process.ts type ProcessMediaOptions (line 3) | interface ProcessMediaOptions { constant MIME_BY_EXT (line 11) | const MIME_BY_EXT: Record = { function resolveContentType (line 25) | function resolveContentType(ext: string): string { function processMediaResult (line 32) | async function processMediaResult(options: ProcessMediaOptions): Promise... FILE: src/lib/media/attach.ts function parseStringArray (line 5) | function parseStringArray(value: unknown): string[] { function resolveAppearanceImageArray (line 17) | async function resolveAppearanceImageArray(raw: unknown, fieldName: stri... function attachMediaFieldsToAppearance (line 26) | async function attachMediaFieldsToAppearance... function attachMediaFieldsToVoiceLine (line 192) | async function attachMediaFieldsToVoiceLine = { function getStorageHelpers (line 88) | async function getStorageHelpers(): Promise { function normalizeInput (line 98) | function normalizeInput(input: string): string { function isDataUrl (line 111) | function isDataUrl(value: string): boolean { function isHttpUrl (line 115) | function isHttpUrl(value: string): boolean { function isAbsoluteOrRootPath (line 119) | function isAbsoluteOrRootPath(value: string): boolean { function isStorageKey (line 123) | function isStorageKey(value: string): boolean { function isNextImagePath (line 127) | function isNextImagePath(pathname: string): boolean { function decodeRepeatedly (line 131) | function decodeRepeatedly(raw: string): string { function normalizeUnwrappedTarget (line 147) | function normalizeUnwrappedTarget(raw: string): string { function toUrlMaybe (line 156) | function toUrlMaybe(value: string): URL | null { function detectMimeFromBuffer (line 166) | function detectMimeFromBuffer(buffer: Uint8Array): string | null { function guessContentType (line 270) | function guessContentType(input: string, contentTypeHeader: string | nul... function signStorageKey (line 281) | async function signStorageKey(storageKey: string): Promise { function toFetchableAbsoluteUrl (line 286) | async function toFetchableAbsoluteUrl(value: string): Promise { function unwrapNextImageInternal (line 291) | function unwrapNextImageInternal(input: string): string { function normalizeMediaRouteUrl (line 311) | async function normalizeMediaRouteUrl(input: string): Promise = { function normalizeStorageKey (line 43) | function normalizeStorageKey(value: string): string { function isLikelyExternalUrl (line 47) | function isLikelyExternalUrl(value: string): boolean { function guessMimeTypeFromStorageKey (line 51) | function guessMimeTypeFromStorageKey(storageKey: string): string | null { function mediaUrl (line 56) | function mediaUrl(publicId: string): string { function extractPublicIdFromMediaRoute (line 60) | function extractPublicIdFromMediaRoute(value: string): string | null { function mapMediaObjectToRef (line 72) | function mapMediaObjectToRef(row: MediaObjectRow): MediaRef { function ensureMediaObjectFromStorageKey (line 88) | async function ensureMediaObjectFromStorageKey( function getMediaObjectByPublicId (line 136) | async function getMediaObjectByPublicId(publicId: string) { function getMediaObjectById (line 142) | async function getMediaObjectById(id: string) { function resolveStorageKeyFromMediaValue (line 152) | async function resolveStorageKeyFromMediaValue(value: unknown): Promise<... function extractStorageKeyFromLegacyValue (line 173) | function extractStorageKeyFromLegacyValue(value: unknown): string | null { function resolveMediaRefFromLegacyValue (line 185) | async function resolveMediaRefFromLegacyValue(value: unknown): Promise { function readTrimmedString (line 53) | function readTrimmedString(value: unknown): string { function getProviderKey (line 57) | function getProviderKey(providerId: string): string { function migrateProviderEntry (line 62) | function migrateProviderEntry(rawProvider: unknown): ProviderMigrationRe... function migrateGatewayRoutePayload (line 116) | function migrateGatewayRoutePayload(rawProviders: string | null | undefi... FILE: src/lib/model-capabilities/catalog.ts type BuiltinCapabilityCatalogEntry (line 10) | interface BuiltinCapabilityCatalogEntry { type CatalogCache (line 17) | interface CatalogCache { constant CATALOG_DIR (line 24) | const CATALOG_DIR = path.resolve(process.cwd(), 'standards/capabilities') function isRecord (line 27) | function isRecord(value: unknown): value is Record { function isUnifiedModelType (line 31) | function isUnifiedModelType(value: unknown): value is UnifiedModelType { function readTrimmedString (line 39) | function readTrimmedString(value: unknown): string { function getProviderKey (line 43) | function getProviderKey(providerId: string): string { function cloneCapabilities (line 48) | function cloneCapabilities(capabilities: ModelCapabilities | undefined):... function normalizeEntry (line 53) | function normalizeEntry(raw: unknown, filePath: string, index: number): ... function buildCache (line 88) | function buildCache(entries: BuiltinCapabilityCatalogEntry[], signature:... function resolveCatalogFiles (line 112) | function resolveCatalogFiles(): string[] { function buildCatalogSignature (line 120) | function buildCatalogSignature(files: string[]): string { function loadCatalog (line 129) | function loadCatalog(): CatalogCache { function listBuiltinCapabilityCatalog (line 154) | function listBuiltinCapabilityCatalog(): BuiltinCapabilityCatalogEntry[] { constant CAPABILITY_PROVIDER_ALIASES (line 165) | const CAPABILITY_PROVIDER_ALIASES: Readonly> = { function findBuiltinCapabilityCatalogEntry (line 169) | function findBuiltinCapabilityCatalogEntry( function findBuiltinCapabilities (line 213) | function findBuiltinCapabilities( function resetBuiltinCapabilityCatalogCacheForTest (line 221) | function resetBuiltinCapabilityCatalogCacheForTest() { FILE: src/lib/model-capabilities/lookup.ts type CapabilitySelectionValidationCode (line 11) | type CapabilitySelectionValidationCode = type CapabilitySelectionValidationIssue (line 18) | interface CapabilitySelectionValidationIssue { type CapabilityModelContext (line 25) | interface CapabilityModelContext { function isRecord (line 30) | function isRecord(value: unknown): value is Record { function isCapabilityValue (line 34) | function isCapabilityValue(value: unknown): value is CapabilityValue { function getNamespaceCapabilities (line 38) | function getNamespaceCapabilities( function getCapabilityOptionFields (line 48) | function getCapabilityOptionFields( function hasCapabilityOptions (line 67) | function hasCapabilityOptions( function normalizeSelectionRecord (line 74) | function normalizeSelectionRecord( function validateCapabilitySelectionForModel (line 106) | function validateCapabilitySelectionForModel(input: { function validateCapabilitySelectionsPayload (line 166) | function validateCapabilitySelectionsPayload( function mergeSelectionRecords (line 221) | function mergeSelectionRecords(...records: Array { function isCapabilityValue (line 22) | function isCapabilityValue(value: unknown): value is CapabilityValue { function isCapabilityValueArray (line 26) | function isCapabilityValueArray(value: unknown): value is CapabilityValu... function parseFieldI18n (line 30) | function parseFieldI18n(raw: unknown): CapabilityFieldI18n | null { function pushUnique (line 49) | function pushUnique(target: CapabilityValue[], value: CapabilityValue) { function collectFieldI18nMap (line 55) | function collectFieldI18nMap( function buildDefinitionsFromPricingTiers (line 66) | function buildDefinitionsFromPricingTiers( function buildDefinitionsFromCapabilities (line 99) | function buildDefinitionsFromCapabilities( function hasTierMatch (line 120) | function hasTierMatch( function getCompatibleOptionsForField (line 133) | function getCompatibleOptionsForField(input: { function filterSelectionByDefinitions (line 148) | function filterSelectionByDefinitions( function resolveEffectiveVideoCapabilityDefinitions (line 163) | function resolveEffectiveVideoCapabilityDefinitions(input: { function normalizeVideoGenerationSelections (line 183) | function normalizeVideoGenerationSelections(input: { function resolveEffectiveVideoCapabilityFields (line 235) | function resolveEffectiveVideoCapabilityFields(input: { FILE: src/lib/model-capabilities/video-model-options.ts type VideoModelCapabilityCarrier (line 3) | interface VideoModelCapabilityCarrier { function readGenerationModeOptions (line 7) | function readGenerationModeOptions(model: VideoModelCapabilityCarrier): ... function supportsFirstLastFrame (line 13) | function supportsFirstLastFrame(model: VideoModelCapabilityCarrier): boo... function isFirstLastFrameOnlyModel (line 17) | function isFirstLastFrameOnlyModel(model: VideoModelCapabilityCarrier): ... function filterNormalVideoModelOptions (line 23) | function filterNormalVideoModelOptions> type CapabilityValidationCode (line 6) | type CapabilityValidationCode = type CapabilityValidationIssue (line 12) | interface CapabilityValidationIssue { type CapabilityFieldI18n (line 19) | interface CapabilityFieldI18n { type CapabilityFieldI18nMap (line 25) | type CapabilityFieldI18nMap = Record type LLMCapabilities (line 27) | interface LLMCapabilities { type ImageCapabilities (line 32) | interface ImageCapabilities { type VideoCapabilities (line 37) | interface VideoCapabilities { type AudioCapabilities (line 48) | interface AudioCapabilities { type LipSyncCapabilities (line 54) | interface LipSyncCapabilities { type ModelCapabilities (line 59) | interface ModelCapabilities { type ParsedModelKey (line 67) | interface ParsedModelKey { constant CAPABILITY_NAMESPACES (line 73) | const CAPABILITY_NAMESPACES = new Set([ constant LLM_ALLOWED_FIELDS (line 81) | const LLM_ALLOWED_FIELDS = new Set([ constant IMAGE_ALLOWED_FIELDS (line 86) | const IMAGE_ALLOWED_FIELDS = new Set([ constant VIDEO_ALLOWED_FIELDS (line 91) | const VIDEO_ALLOWED_FIELDS = new Set([ constant AUDIO_ALLOWED_FIELDS (line 102) | const AUDIO_ALLOWED_FIELDS = new Set([ constant LIPSYNC_ALLOWED_FIELDS (line 108) | const LIPSYNC_ALLOWED_FIELDS = new Set([ function isRecord (line 113) | function isRecord(value: unknown): value is Record { function isNonEmptyString (line 117) | function isNonEmptyString(value: unknown): value is string { function isStringArray (line 121) | function isStringArray(value: unknown): value is string[] { function isNumberArray (line 125) | function isNumberArray(value: unknown): value is number[] { function isBooleanArray (line 129) | function isBooleanArray(value: unknown): value is boolean[] { function makeAllowedIssue (line 133) | function makeAllowedIssue( function validateFieldI18nMap (line 146) | function validateFieldI18nMap( function validateNamespaceShape (line 229) | function validateNamespaceShape( function validateNamespaceAllowedFields (line 244) | function validateNamespaceAllowedFields( function validateLLMCapabilities (line 263) | function validateLLMCapabilities(issues: CapabilityValidationIssue[], ra... function validateImageCapabilities (line 279) | function validateImageCapabilities(issues: CapabilityValidationIssue[], ... function validateVideoCapabilities (line 296) | function validateVideoCapabilities(issues: CapabilityValidationIssue[], ... function validateAudioCapabilities (line 369) | function validateAudioCapabilities(issues: CapabilityValidationIssue[], ... function validateLipSyncCapabilities (line 396) | function validateLipSyncCapabilities(issues: CapabilityValidationIssue[]... function validateOptionFieldValue (line 412) | function validateOptionFieldValue( function validateOptionValueAgainstAllowed (line 423) | function validateOptionValueAgainstAllowed( function composeModelKey (line 432) | function composeModelKey(provider: string, modelId: string): string { function parseModelKeyStrict (line 439) | function parseModelKeyStrict(key: string | null | undefined): ParsedMode... function isModelKey (line 455) | function isModelKey(value: string | null | undefined): boolean { function validateModelCapabilities (line 459) | function validateModelCapabilities( FILE: src/lib/model-gateway/llm.ts type ChatMessage (line 6) | type ChatMessage = { role: 'user' | 'assistant' | 'system'; content: str... function runModelGatewayTextCompletion (line 8) | async function runModelGatewayTextCompletion(input: { function runModelGatewayVisionCompletion (line 23) | async function runModelGatewayVisionCompletion(input: { FILE: src/lib/model-gateway/openai-compat/chat.ts function runOpenAICompatChatCompletion (line 10) | async function runOpenAICompatChatCompletion(input: OpenAICompatChatRequ... type OpenAIStreamWithFinal (line 20) | type OpenAIStreamWithFinal = AsyncIterable & { function runOpenAICompatChatCompletionStream (line 24) | async function runOpenAICompatChatCompletionStream( FILE: src/lib/model-gateway/openai-compat/common.ts function toAbsoluteUrlIfNeeded (line 7) | function toAbsoluteUrlIfNeeded(value: string): string { function parseDataUrl (line 13) | function parseDataUrl(value: string): { mimeType: string; base64: string... function readStringOption (line 23) | function readStringOption(value: unknown, optionName: string): string | ... function resolveOpenAICompatClientConfig (line 35) | async function resolveOpenAICompatClientConfig(userId: string, providerI... function createOpenAICompatClient (line 47) | function createOpenAICompatClient(config: OpenAICompatClientConfig): Ope... function toUploadFile (line 54) | async function toUploadFile(imageSource: string, index: number): Promise... FILE: src/lib/model-gateway/openai-compat/image.ts type OpenAIImageResponseFormat (line 10) | type OpenAIImageResponseFormat = 'url' | 'b64_json' type OpenAIImageOutputFormat (line 11) | type OpenAIImageOutputFormat = 'png' | 'jpeg' | 'webp' type OpenAIImageGenerateQuality (line 12) | type OpenAIImageGenerateQuality = 'standard' | 'hd' | 'low' | 'medium' |... type OpenAIImageGenerateSize (line 13) | type OpenAIImageGenerateSize = constant OPENAI_IMAGE_OPTION_KEYS (line 23) | const OPENAI_IMAGE_OPTION_KEYS = new Set([ function assertAllowedOptions (line 34) | function assertAllowedOptions(options: Record) { function normalizeResponseFormat (line 43) | function normalizeResponseFormat(value: unknown): OpenAIImageResponseFor... function normalizeOutputFormat (line 50) | function normalizeOutputFormat(value: unknown): OpenAIImageOutputFormat ... function normalizeGenerateQuality (line 57) | function normalizeGenerateQuality(value: unknown): OpenAIImageGenerateQu... function normalizeOpenAIImageSize (line 73) | function normalizeOpenAIImageSize(value: string | undefined): OpenAIImag... function resolveRawSize (line 90) | function resolveRawSize(options: Record): string | unde... function resolveModelId (line 99) | function resolveModelId(modelId: string | undefined, options: Record | null { function toEndpoint (line 17) | function toEndpoint(baseUrl: string, path: string): string { function collectText (line 21) | function collectText(node: unknown, acc: string[]) { function collectReasoning (line 42) | function collectReasoning(node: unknown, acc: string[]) { function extractResponsesText (line 64) | function extractResponsesText(payload: unknown): string { function extractResponsesReasoning (line 74) | function extractResponsesReasoning(payload: unknown): string { function extractResponsesUsage (line 83) | function extractResponsesUsage(payload: unknown): ResponsesUsage { function runOpenAICompatResponsesCompletion (line 97) | async function runOpenAICompatResponsesCompletion(input: OpenAICompatCha... FILE: src/lib/model-gateway/openai-compat/template-image.ts constant OPENAI_COMPAT_PROVIDER_PREFIX (line 13) | const OPENAI_COMPAT_PROVIDER_PREFIX = 'openai-compatible:' constant PROVIDER_UUID_PATTERN (line 14) | const PROVIDER_UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}... function encodeProviderToken (line 16) | function encodeProviderToken(providerId: string): string { function encodeModelRef (line 27) | function encodeModelRef(modelRef: string): string { function resolveModelRef (line 31) | function resolveModelRef(request: OpenAICompatImageRequest): string { function readTemplateOutputUrls (line 39) | function readTemplateOutputUrls(value: unknown): string[] { function generateImageViaOpenAICompatTemplate (line 56) | async function generateImageViaOpenAICompatTemplate( FILE: src/lib/model-gateway/openai-compat/template-video.ts constant OPENAI_COMPAT_PROVIDER_PREFIX (line 13) | const OPENAI_COMPAT_PROVIDER_PREFIX = 'openai-compatible:' constant PROVIDER_UUID_PATTERN (line 14) | const PROVIDER_UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}... function buildUnsupportedVideoFormatError (line 16) | function buildUnsupportedVideoFormatError(detail: string): Error { function encodeProviderToken (line 20) | function encodeProviderToken(providerId: string): string { function encodeModelRef (line 31) | function encodeModelRef(modelRef: string): string { function resolveModelRef (line 35) | function resolveModelRef(request: OpenAICompatVideoRequest): string { function generateVideoViaOpenAICompatTemplate (line 43) | async function generateVideoViaOpenAICompatTemplate( FILE: src/lib/model-gateway/openai-compat/video.ts type OpenAIVideoSize (line 7) | type OpenAIVideoSize = '720x1280' | '1280x720' | '1024x1792' | '1792x1024' type OpenAIVideoSeconds (line 8) | type OpenAIVideoSeconds = '4' | '8' | '12' type OpenAIVideoAspectRatio (line 9) | type OpenAIVideoAspectRatio = constant OPENAI_COMPAT_VIDEO_OPTION_KEYS (line 21) | const OPENAI_COMPAT_VIDEO_OPTION_KEYS = new Set([ function assertAllowedOptions (line 34) | function assertAllowedOptions(options: Record) { function normalizeDuration (line 43) | function normalizeDuration(value: unknown): OpenAIVideoSeconds | undefin... function normalizeAspectRatio (line 51) | function normalizeAspectRatio(value: unknown): OpenAIVideoAspectRatio | ... function resolveAspectRatio (line 75) | function resolveAspectRatio(options: Record): OpenAIVid... function normalizeModel (line 84) | function normalizeModel(value: unknown): string { function resolveSizeOrientation (line 96) | function resolveSizeOrientation(aspectRatio: OpenAIVideoAspectRatio | un... function normalizeSize (line 108) | function normalizeSize(value: unknown, aspectRatio: OpenAIVideoAspectRat... function resolveFinalSize (line 124) | function resolveFinalSize(options: Record): OpenAIVideo... function encodeProviderId (line 134) | function encodeProviderId(providerId: string): string { function toUploadFileFromImageUrl (line 138) | async function toUploadFileFromImageUrl(imageUrl: string): Promise { function generateVideoViaOpenAICompat (line 148) | async function generateVideoViaOpenAICompat(request: OpenAICompatVideoRe... FILE: src/lib/model-gateway/router.ts constant COMPATIBLE_PROVIDER_KEYS (line 4) | const COMPATIBLE_PROVIDER_KEYS = new Set([ constant OFFICIAL_ONLY_PROVIDER_KEYS (line 7) | const OFFICIAL_ONLY_PROVIDER_KEYS = new Set([ function isCompatibleProvider (line 12) | function isCompatibleProvider(providerId: string): boolean { function resolveModelGatewayRoute (line 17) | function resolveModelGatewayRoute(providerId: string): ModelGatewayRoute { FILE: src/lib/model-gateway/types.ts type ModelGatewayRoute (line 1) | type ModelGatewayRoute = 'official' | 'openai-compat' type CompatibleProviderKey (line 3) | type CompatibleProviderKey = 'openai-compatible' type OpenAICompatImageProfile (line 5) | type OpenAICompatImageProfile = CompatibleProviderKey type OpenAICompatVideoProfile (line 7) | type OpenAICompatVideoProfile = 'openai-compatible' type OpenAICompatClientConfig (line 9) | interface OpenAICompatClientConfig { type OpenAICompatImageRequest (line 15) | interface OpenAICompatImageRequest { type OpenAICompatVideoRequest (line 27) | interface OpenAICompatVideoRequest { type OpenAICompatChatRequest (line 39) | interface OpenAICompatChatRequest { FILE: src/lib/model-pricing/catalog.ts type PricingApiType (line 5) | type PricingApiType = type BuiltinPricingTier (line 13) | interface BuiltinPricingTier { type BuiltinPricingDefinition (line 18) | interface BuiltinPricingDefinition { type BuiltinPricingCatalogEntry (line 24) | interface BuiltinPricingCatalogEntry { type PricingCatalogCache (line 31) | interface PricingCatalogCache { constant PRICING_CATALOG_DIR (line 37) | const PRICING_CATALOG_DIR = path.resolve(process.cwd(), 'standards/prici... function isRecord (line 41) | function isRecord(value: unknown): value is Record { function isPricingApiType (line 45) | function isPricingApiType(value: unknown): value is PricingApiType { function isCapabilityValue (line 54) | function isCapabilityValue(value: unknown): value is CapabilityValue { function readTrimmedString (line 58) | function readTrimmedString(value: unknown): string { function readFiniteNumber (line 62) | function readFiniteNumber(value: unknown): number | null { function normalizePricingTier (line 66) | function normalizePricingTier(raw: unknown, filePath: string, index: num... function normalizePricing (line 95) | function normalizePricing(raw: unknown, filePath: string, index: number)... function normalizePricingEntry (line 130) | function normalizePricingEntry(raw: unknown, filePath: string, index: nu... function buildCache (line 156) | function buildCache(entries: BuiltinPricingCatalogEntry[]): PricingCatal... function cloneEntry (line 180) | function cloneEntry(entry: BuiltinPricingCatalogEntry): BuiltinPricingCa... function loadPricingCatalog (line 184) | function loadPricingCatalog(): PricingCatalogCache { function listBuiltinPricingCatalog (line 213) | function listBuiltinPricingCatalog(): BuiltinPricingCatalogEntry[] { constant PROVIDER_ALIASES (line 222) | const PROVIDER_ALIASES: Readonly> = { function findBuiltinPricingCatalogEntry (line 226) | function findBuiltinPricingCatalogEntry( function findBuiltinPricingCatalogEntriesByModelId (line 256) | function findBuiltinPricingCatalogEntriesByModelId( function resetBuiltinPricingCatalogCacheForTest (line 265) | function resetBuiltinPricingCatalogCacheForTest() { FILE: src/lib/model-pricing/lookup.ts type PricingResolutionResolved (line 12) | interface PricingResolutionResolved { type PricingResolutionNotConfigured (line 19) | interface PricingResolutionNotConfigured { type PricingResolutionAmbiguousModel (line 23) | interface PricingResolutionAmbiguousModel { type PricingResolutionMissingCapabilityMatch (line 30) | interface PricingResolutionMissingCapabilityMatch { type PricingResolution (line 36) | type PricingResolution = function cloneSelections (line 42) | function cloneSelections( function matchTier (line 55) | function matchTier( function resolveEntryByModel (line 67) | function resolveEntryByModel(apiType: PricingApiType, model: string): Pr... function resolveBuiltinPricing (line 99) | function resolveBuiltinPricing(input: { FILE: src/lib/model-pricing/version.ts constant BUILTIN_PRICING_VERSION (line 5) | const BUILTIN_PRICING_VERSION = '2026-02-19' FILE: src/lib/model-pricing/video-tier.ts type VideoPricingTier (line 3) | interface VideoPricingTier { function matchesFixedSelections (line 7) | function matchesFixedSelections( function projectVideoPricingTiersByFixedSelections (line 20) | function projectVideoPricingTiersByFixedSelections(input: { FILE: src/lib/modes.ts type ModeConfig (line 6) | interface ModeConfig { constant PROJECT_MODE (line 15) | const PROJECT_MODE: ModeConfig = { constant PROJECT_MODES (line 25) | const PROJECT_MODES: ModeConfig[] = [PROJECT_MODE] function getModeConfig (line 27) | function getModeConfig(mode: ProjectMode): ModeConfig | undefined { FILE: src/lib/novel-promotion/insert-panel.ts constant DEFAULT_INSERT_PANEL_USER_INPUT (line 1) | const DEFAULT_INSERT_PANEL_USER_INPUT = { function readTrimmedString (line 6) | function readTrimmedString(value: unknown): string { function isZhLocale (line 10) | function isZhLocale(locale: string | undefined): boolean { function resolveInsertPanelUserInput (line 14) | function resolveInsertPanelUserInput(payload: Record, l... FILE: src/lib/novel-promotion/panel-ai-data-sync.ts type PanelCharacterRef (line 1) | interface PanelCharacterRef { type JsonRecord (line 6) | type JsonRecord = Record function isJsonRecord (line 8) | function isJsonRecord(value: unknown): value is JsonRecord { function assert (line 12) | function assert(condition: boolean, message: string): asserts condition { function parseStructuredJsonFromString (line 18) | function parseStructuredJsonFromString(raw: string, fieldName: string): ... function normalizeStructuredJsonInput (line 37) | function normalizeStructuredJsonInput(value: unknown, fieldName: string)... function assertStructuredJsonValue (line 45) | function assertStructuredJsonValue(value: unknown, fieldName: string): a... function assertNameRecord (line 51) | function assertNameRecord(value: unknown, fieldName: string): asserts va... function filterNamedRecordsBySet (line 56) | function filterNamedRecordsBySet( function syncActingNotesJson (line 69) | function syncActingNotesJson( function syncPhotographyRulesJson (line 97) | function syncPhotographyRulesJson( function serializeStructuredJsonField (line 120) | function serializeStructuredJsonField(value: unknown, fieldName: string)... type SyncPanelCharacterDependentJsonInput (line 126) | interface SyncPanelCharacterDependentJsonInput { type SyncPanelCharacterDependentJsonResult (line 133) | interface SyncPanelCharacterDependentJsonResult { function syncPanelCharacterDependentJson (line 139) | function syncPanelCharacterDependentJson({ FILE: src/lib/novel-promotion/run-stream/types.ts type RunStreamLane (line 1) | type RunStreamLane = 'text' | 'reasoning' type RunStreamEventType (line 3) | type RunStreamEventType = type RunStreamStatus (line 12) | type RunStreamStatus = 'idle' | 'running' | 'completed' | 'failed' type RunStepStatus (line 13) | type RunStepStatus = 'pending' | 'running' | 'completed' | 'failed' | 'b... type RunStreamEvent (line 15) | type RunStreamEvent = { FILE: src/lib/novel-promotion/script-to-storyboard/orchestrator.ts type JsonRecord (line 23) | type JsonRecord = Record type ScriptToStoryboardStepMeta (line 26) | type ScriptToStoryboardStepMeta = { type ScriptToStoryboardStepOutput (line 39) | type ScriptToStoryboardStepOutput = { type ClipInput (line 44) | type ClipInput = { type ScriptToStoryboardPromptTemplates (line 52) | type ScriptToStoryboardPromptTemplates = { type ClipStoryboardPanels (line 59) | type ClipStoryboardPanels = { type ScriptToStoryboardOrchestratorInput (line 65) | type ScriptToStoryboardOrchestratorInput = { type ScriptToStoryboardOrchestratorResult (line 81) | type ScriptToStoryboardOrchestratorResult = { class JsonParseError (line 95) | class JsonParseError extends Error { method constructor (line 97) | constructor(message: string, rawText: string) { function parseJsonArray (line 104) | function parseJsonArray(responseText: string, labe... function parseClipCharacters (line 113) | function parseClipCharacters(raw: string | null): ClipCharacterRef[] { function parseScreenplay (line 126) | function parseScreenplay(raw: string | null): unknown { function withStepMeta (line 135) | function withStepMeta( function mergePanelsWithRules (line 151) | function mergePanelsWithRules(params: { constant MAX_STEP_ATTEMPTS (line 181) | const MAX_STEP_ATTEMPTS = 3 constant MAX_RETRY_DELAY_MS (line 182) | const MAX_RETRY_DELAY_MS = 10_000 function wait (line 184) | function wait(ms: number) { function computeRetryDelayMs (line 188) | function computeRetryDelayMs(attempt: number) { function shouldRetryStepError (line 194) | function shouldRetryStepError(error: unknown, message: string, retryable... function runStepWithRetry (line 208) | async function runStepWithRetry( function runScriptToStoryboardOrchestrator (line 264) | async function runScriptToStoryboardOrchestrator( FILE: src/lib/novel-promotion/stages/contracts/video-stage-contract.ts type VideoStageContract (line 3) | type VideoStageContract = VideoStageShellProps FILE: src/lib/novel-promotion/stages/contracts/voice-stage-contract.ts type VoiceStageContract (line 3) | type VoiceStageContract = VoiceStageShellProps FILE: src/lib/novel-promotion/stages/video-stage-runtime-core.tsx type BatchCapabilityDefinition (line 51) | type BatchCapabilityDefinition = EffectiveVideoCapabilityDefinition type BatchCapabilityField (line 53) | interface BatchCapabilityField { function toFieldLabel (line 62) | function toFieldLabel(field: string): string { function useVideoStageRuntime (line 66) | function useVideoStageRuntime({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/immediate-video-submission.ts constant VIDEO_SUBMISSION_TIMEOUT_MS (line 1) | const VIDEO_SUBMISSION_TIMEOUT_MS = 90_000 type VideoSubmissionPanelSnapshot (line 3) | interface VideoSubmissionPanelSnapshot { type VideoSubmissionBaseline (line 12) | interface VideoSubmissionBaseline { function buildVideoSubmissionKey (line 17) | function buildVideoSubmissionKey(panel: Pick { type UseVideoDownloadAllParams (line 13) | interface UseVideoDownloadAllParams { function useVideoDownloadAll (line 25) | function useVideoDownloadAll({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoFirstLastFrameFlow.ts type FirstLastFrameCapabilityField (line 17) | interface FirstLastFrameCapabilityField { type VideoGenerationOptionValue (line 25) | type VideoGenerationOptionValue = string | number | boolean function parseByOptionType (line 27) | function parseByOptionType( function toFieldLabel (line 36) | function toFieldLabel(field: string): string { type UseVideoFirstLastFrameFlowParams (line 40) | interface UseVideoFirstLastFrameFlowParams { function useVideoFirstLastFrameFlow (line 60) | function useVideoFirstLastFrameFlow({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoPanelLinking.ts type MutationLike (line 7) | interface MutationLike { type UseVideoPanelLinkingParams (line 11) | interface UseVideoPanelLinkingParams { function useVideoPanelLinking (line 20) | function useVideoPanelLinking({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoPanelViewport.ts function useVideoPanelViewport (line 5) | function useVideoPanelViewport() { FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoPanelsProjection.ts type TaskStateLike (line 10) | interface TaskStateLike { type TaskPresentationLike (line 15) | interface TaskPresentationLike { type UseVideoPanelsProjectionParams (line 19) | interface UseVideoPanelsProjectionParams { function useVideoPanelsProjection (line 26) | function useVideoPanelsProjection({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoPromptState.ts type PromptField (line 7) | type PromptField = 'videoPrompt' | 'firstLastFramePrompt' type UseVideoPromptStateParams (line 9) | interface UseVideoPromptStateParams { function buildPromptStateKey (line 19) | function buildPromptStateKey(panelKey: string, field: PromptField): stri... function useVideoPromptState (line 23) | function useVideoPromptState({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoStageUiState.ts function useVideoStageUiState (line 5) | function useVideoStageUiState() { FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoTaskStates.ts type UseVideoTaskStatesParams (line 8) | interface UseVideoTaskStatesParams { function useVideoTaskStates (line 13) | function useVideoTaskStates({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/useVideoVoiceLines.ts type MatchedVoiceLinesQueryLike (line 10) | interface MatchedVoiceLinesQueryLike { type UseVideoVoiceLinesParams (line 26) | interface UseVideoVoiceLinesParams { function useVideoVoiceLines (line 31) | function useVideoVoiceLines({ FILE: src/lib/novel-promotion/stages/video-stage-runtime/utils.ts function getErrorMessage (line 5) | function getErrorMessage(error: unknown): string { FILE: src/lib/novel-promotion/stages/voice-stage-runtime-core.tsx function useVoiceStageRuntime (line 40) | function useVoiceStageRuntime({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/types.ts type VoiceLine (line 8) | interface VoiceLine { type PendingVoiceTaskStatus (line 23) | type PendingVoiceTaskStatus = 'queued' | 'processing' | 'completed' | 'f... type PendingVoiceGenerationState (line 25) | interface PendingVoiceGenerationState { type PendingVoiceGenerationMap (line 33) | type PendingVoiceGenerationMap = Record { type UseVoiceGenerationActionsParams (line 21) | interface UseVoiceGenerationActionsParams { function useVoiceGenerationActions (line 44) | function useVoiceGenerationActions({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoiceLineBindings.ts type UseVoiceLineBindingsParams (line 6) | interface UseVoiceLineBindingsParams { function useVoiceLineBindings (line 12) | function useVoiceLineBindings({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoiceLineCrudActions.ts type MutationLike (line 8) | interface MutationLike { type UseVoiceLineCrudActionsParams (line 12) | interface UseVoiceLineCrudActionsParams { function useVoiceLineCrudActions (line 31) | function useVoiceLineCrudActions({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoiceLineEditorState.ts type UseVoiceLineEditorStateParams (line 7) | interface UseVoiceLineEditorStateParams { function useVoiceLineEditorState (line 11) | function useVoiceLineEditorState({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoicePlayback.ts function useVoicePlayback (line 5) | function useVoicePlayback() { FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoiceRuntimeSync.ts type UseVoiceRuntimeSyncParams (line 12) | interface UseVoiceRuntimeSyncParams { constant TASK_STATUS_POLL_INTERVAL_MS (line 26) | const TASK_STATUS_POLL_INTERVAL_MS = 1200 constant PENDING_RESULT_POLL_INTERVAL_MS (line 27) | const PENDING_RESULT_POLL_INTERVAL_MS = 1500 function resolvePendingBaseline (line 29) | function resolvePendingBaseline(pending: PendingVoiceGenerationState) { function hasLineGenerationSettled (line 38) | function hasLineGenerationSettled(line: VoiceLine | undefined, pending: ... function fetchTaskStatus (line 54) | async function fetchTaskStatus(taskId: string): Promise<{ function useVoiceRuntimeSync (line 87) | function useVoiceRuntimeSync({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoiceSpeakerState.ts type UseVoiceSpeakerStateParams (line 7) | interface UseVoiceSpeakerStateParams { function useVoiceSpeakerState (line 14) | function useVoiceSpeakerState({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoiceStageDataLoader.ts type UseVoiceStageDataLoaderParams (line 8) | interface UseVoiceStageDataLoaderParams { type VoiceStageDataPayload (line 13) | interface VoiceStageDataPayload { function useVoiceStageDataLoader (line 19) | function useVoiceStageDataLoader({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/useVoiceTaskState.ts type UseVoiceTaskStateParams (line 8) | interface UseVoiceTaskStateParams { function useVoiceTaskState (line 14) | function useVoiceTaskState({ FILE: src/lib/novel-promotion/stages/voice-stage-runtime/utils.ts function getErrorMessage (line 5) | function getErrorMessage(error: unknown): string { function getErrorStatus (line 9) | function getErrorStatus(error: unknown): number | null { FILE: src/lib/novel-promotion/story-to-script/clip-matching.ts type ClipMatchLevel (line 1) | type ClipMatchLevel = 'L1' | 'L2' | 'L3' type TextMatchLevel (line 2) | type TextMatchLevel = ClipMatchLevel type TextMarkerMatch (line 4) | type TextMarkerMatch = { type ClipBoundaryMatch (line 11) | type ClipBoundaryMatch = { type ClipContentMatcher (line 18) | type ClipContentMatcher = { type TextMarkerMatcher (line 22) | type TextMarkerMatcher = { type NormalizedContent (line 26) | type NormalizedContent = { type ApproximateNormMatch (line 32) | type ApproximateNormMatch = { constant APPROX_CONFIDENCE_THRESHOLD (line 38) | const APPROX_CONFIDENCE_THRESHOLD = 0.9 constant APPROX_MAX_CANDIDATES (line 39) | const APPROX_MAX_CANDIDATES = 240 constant PUNCTUATION_MAP (line 41) | const PUNCTUATION_MAP: Record = { function normalizeChar (line 66) | function normalizeChar(ch: string): string { function isWhitespace (line 78) | function isWhitespace(ch: string): boolean { function buildNormalizedContent (line 82) | function buildNormalizedContent(raw: string): NormalizedContent { function normalizeQuery (line 105) | function normalizeQuery(text: string): string { function findNormIndexForRaw (line 109) | function findNormIndexForRaw(normalized: NormalizedContent, rawIndex: nu... function tryExactRawMatch (line 124) | function tryExactRawMatch(content: string, startText: string, endText: s... function tryExactRawMarkerMatch (line 143) | function tryExactRawMarkerMatch(content: string, markerText: string, fro... function tryExactNormalizedMatch (line 154) | function tryExactNormalizedMatch( function tryExactNormalizedMarkerMatch (line 193) | function tryExactNormalizedMarkerMatch( function buildLengthCandidates (line 214) | function buildLengthCandidates(baseLength: number): number[] { function collectApproximateStarts (line 228) | function collectApproximateStarts(haystack: string, query: string, fromN... function levenshteinDistance (line 275) | function levenshteinDistance(a: string, b: string, maxDistance: number):... function scoreApproximateSimilarity (line 305) | function scoreApproximateSimilarity(query: string, candidate: string): n... function findApproximateMatch (line 315) | function findApproximateMatch( function tryApproximateNormalizedMatch (line 346) | function tryApproximateNormalizedMatch( function tryApproximateNormalizedMarkerMatch (line 373) | function tryApproximateNormalizedMarkerMatch( function createTextMarkerMatcher (line 394) | function createTextMarkerMatcher(content: string): TextMarkerMatcher { function createClipContentMatcher (line 419) | function createClipContentMatcher(content: string): ClipContentMatcher { FILE: src/lib/novel-promotion/story-to-script/orchestrator.ts type StoryToScriptStepMeta (line 12) | type StoryToScriptStepMeta = { type StoryToScriptStepOutput (line 25) | type StoryToScriptStepOutput = { type StoryToScriptClipCandidate (line 30) | type StoryToScriptClipCandidate = { type StoryToScriptScreenplayResult (line 42) | type StoryToScriptScreenplayResult = { type StoryToScriptPromptTemplates (line 50) | type StoryToScriptPromptTemplates = { type StoryToScriptOrchestratorInput (line 57) | type StoryToScriptOrchestratorInput = { type StoryToScriptOrchestratorResult (line 74) | type StoryToScriptOrchestratorResult = { function applyTemplate (line 98) | function applyTemplate(template: string, replacements: Record[] { function parseScreenplayObject (line 110) | function parseScreenplayObject(responseText: string): Record[] { function extractAnalyzedCharacters (line 130) | function extractAnalyzedCharacters(obj: Record): Record... function extractAnalyzedLocations (line 136) | function extractAnalyzedLocations(obj: Record): Record<... constant MAX_STEP_ATTEMPTS (line 140) | const MAX_STEP_ATTEMPTS = 3 constant MAX_SPLIT_BOUNDARY_ATTEMPTS (line 141) | const MAX_SPLIT_BOUNDARY_ATTEMPTS = 2 constant MAX_RETRY_DELAY_MS (line 142) | const MAX_RETRY_DELAY_MS = 10_000 constant CLIP_BOUNDARY_SUFFIX (line 143) | const CLIP_BOUNDARY_SUFFIX = ` function wait (line 150) | function wait(ms: number) { function computeRetryDelayMs (line 154) | function computeRetryDelayMs(attempt: number) { function isRecoverableJsonParseError (line 160) | function isRecoverableJsonParseError(error: unknown, normalizedMessage: ... function runStepWithRetry (line 173) | async function runStepWithRetry( function runStoryToScriptOrchestrator (line 232) | async function runStoryToScriptOrchestrator( FILE: src/lib/novel-promotion/story-to-script/types.ts type StoryToScriptLane (line 9) | type StoryToScriptLane = RunStreamLane type StoryToScriptRunEventType (line 10) | type StoryToScriptRunEventType = RunStreamEventType type StoryToScriptRunStatus (line 11) | type StoryToScriptRunStatus = RunStreamStatus type StoryToScriptStepStatus (line 12) | type StoryToScriptStepStatus = RunStepStatus type StoryToScriptStreamEvent (line 13) | type StoryToScriptStreamEvent = RunStreamEvent FILE: src/lib/openai-compat-media-template.ts type TemplateHttpMethod (line 1) | type TemplateHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' type TemplateContentType (line 3) | type TemplateContentType = type TemplateHeaderMap (line 8) | type TemplateHeaderMap = Record type TemplateBodyValue (line 10) | type TemplateBodyValue = type TemplateEndpoint (line 18) | interface TemplateEndpoint { type TemplateResponseMap (line 27) | interface TemplateResponseMap { type TemplatePollingConfig (line 35) | interface TemplatePollingConfig { type OpenAICompatMediaTemplate (line 42) | interface OpenAICompatMediaTemplate { type OpenAICompatMediaTemplateSource (line 53) | type OpenAICompatMediaTemplateSource = 'ai' | 'manual' constant TEMPLATE_PLACEHOLDER_ALLOWLIST (line 55) | const TEMPLATE_PLACEHOLDER_ALLOWLIST = new Set([ FILE: src/lib/openai-compat-template-runtime.ts type TemplateVariableMap (line 9) | type TemplateVariableMap = Record function isRecord (line 11) | function isRecord(value: unknown): value is Record { function cloneTemplateBodyValue (line 15) | function cloneTemplateBodyValue(value: TemplateBodyValue): TemplateBodyV... function stringifyVariable (line 29) | function stringifyVariable(value: TemplateBodyValue | undefined): string { function resolvePlaceholderValue (line 37) | function resolvePlaceholderValue( function resolvePlaceholderText (line 47) | function resolvePlaceholderText( function matchExactPlaceholder (line 54) | function matchExactPlaceholder(value: string): string | null { function toSnakeCase (line 59) | function toSnakeCase(value: string): string { function toTemplateVariableValue (line 66) | function toTemplateVariableValue(value: unknown): TemplateBodyValue | un... function appendTemplateOptionVariables (line 90) | function appendTemplateOptionVariables( function setHeaderIfMissing (line 108) | function setHeaderIfMissing(headers: Record, key: string... function deleteHeader (line 115) | function deleteHeader(headers: Record, key: string) { function isMultipartFileField (line 123) | function isMultipartFileField( function appendMultipartFileValue (line 130) | async function appendMultipartFileValue( function appendMultipartValue (line 151) | async function appendMultipartValue( function buildMultipartBody (line 209) | async function buildMultipartBody( function appendUrlEncodedValue (line 234) | function appendUrlEncodedValue( function buildRequestBody (line 255) | async function buildRequestBody( function renderTemplateString (line 278) | function renderTemplateString( function renderTemplateValue (line 287) | function renderTemplateValue( function resolveTemplateEndpointUrl (line 310) | function resolveTemplateEndpointUrl(baseUrl: string, path: string): stri... function renderTemplateHeaders (line 335) | function renderTemplateHeaders( function parsePathSegments (line 347) | function parsePathSegments(path: string): Array { function readJsonPath (line 364) | function readJsonPath(payload: unknown, path: string | undefined): unkno... type RenderedTemplateRequest (line 381) | type RenderedTemplateRequest = { function buildRenderedTemplateRequest (line 388) | async function buildRenderedTemplateRequest(input: { function normalizeResponseJson (line 415) | function normalizeResponseJson(rawText: string): unknown { function buildTemplateVariables (line 425) | function buildTemplateVariables(input: { function extractTemplateError (line 452) | function extractTemplateError( FILE: src/lib/prisma-error.ts type PrismaLikeError (line 1) | type PrismaLikeError = { constant PRISMA_CODE_PATTERN (line 6) | const PRISMA_CODE_PATTERN = /^P\d{4}$/i constant RETRYABLE_PRISMA_CODES (line 8) | const RETRYABLE_PRISMA_CODES = new Set([ function toMessage (line 17) | function toMessage(value: unknown): string { function isPrismaErrorCode (line 22) | function isPrismaErrorCode(value: unknown): value is string { function getPrismaErrorCode (line 26) | function getPrismaErrorCode(error: unknown): string | null { function isPrismaRetryableCode (line 33) | function isPrismaRetryableCode(code: string): boolean { function isLikelyPrismaDisconnectError (line 37) | function isLikelyPrismaDisconnectError(error: unknown): boolean { function isRetryablePrismaError (line 49) | function isRetryablePrismaError(error: unknown): boolean { FILE: src/lib/prisma-retry.ts type PrismaRetryOptions (line 3) | type PrismaRetryOptions = { function sleep (line 8) | function sleep(ms: number): Promise { function toRetryCount (line 14) | function toRetryCount(value: number | undefined, fallback: number): numb... function toDelay (line 21) | function toDelay(value: number | undefined, fallback: number): number { function withPrismaRetry (line 28) | async function withPrismaRetry( FILE: src/lib/prompt-i18n/build-prompt.ts constant SINGLE_PLACEHOLDER_PATTERN (line 6) | const SINGLE_PLACEHOLDER_PATTERN = /\{([A-Za-z0-9_]+)\}/g constant DOUBLE_PLACEHOLDER_PATTERN (line 7) | const DOUBLE_PLACEHOLDER_PATTERN = /\{\{([A-Za-z0-9_]+)\}\}/g function extractPlaceholders (line 9) | function extractPlaceholders(template: string): string[] { function escapeRegex (line 24) | function escapeRegex(raw: string) { function replaceAllPlaceholders (line 28) | function replaceAllPlaceholders(template: string, key: string, value: st... function buildPrompt (line 34) | function buildPrompt(input: BuildPromptInput): string { FILE: src/lib/prompt-i18n/catalog.ts constant PROMPT_CATALOG (line 4) | const PROMPT_CATALOG: Record = { FILE: src/lib/prompt-i18n/errors.ts type PromptI18nErrorCode (line 3) | type PromptI18nErrorCode = class PromptI18nError (line 11) | class PromptI18nError extends Error { method constructor (line 16) | constructor( FILE: src/lib/prompt-i18n/prompt-ids.ts constant PROMPT_IDS (line 1) | const PROMPT_IDS = { type PromptId (line 31) | type PromptId = (typeof PROMPT_IDS)[keyof typeof PROMPT_IDS] FILE: src/lib/prompt-i18n/template-store.ts function buildCacheKey (line 10) | function buildCacheKey(promptId: PromptId, locale: PromptLocale) { function getPromptTemplate (line 14) | function getPromptTemplate(promptId: PromptId, locale: PromptLocale): st... FILE: src/lib/prompt-i18n/types.ts type PromptLocale (line 4) | type PromptLocale = Locale type PromptVariables (line 6) | type PromptVariables = Record type PromptCatalogEntry (line 8) | type PromptCatalogEntry = { type BuildPromptInput (line 13) | type BuildPromptInput = { FILE: src/lib/providers/bailian/audio.ts type BailianAudioGenerateParams (line 11) | interface BailianAudioGenerateParams { function assertRegistered (line 19) | function assertRegistered(modelId: string): void { function readTrimmedString (line 28) | function readTrimmedString(value: unknown): string { function generateBailianAudio (line 32) | async function generateBailianAudio(params: BailianAudioGenerateParams):... FILE: src/lib/providers/bailian/catalog.ts constant BAILIAN_CATALOG (line 4) | const BAILIAN_CATALOG: Readonly { FILE: src/lib/providers/bailian/tts.ts constant BAILIAN_TTS_MODEL_ID (line 3) | const BAILIAN_TTS_MODEL_ID = 'qwen3-tts-vd-2026-01-26' constant BAILIAN_TTS_ENDPOINT (line 4) | const BAILIAN_TTS_ENDPOINT = 'https://dashscope.aliyuncs.com/api/v1/serv... constant BAILIAN_TTS_MAX_CHARS (line 5) | const BAILIAN_TTS_MAX_CHARS = 600 type BailianTTSInput (line 7) | interface BailianTTSInput { type BailianTTSResult (line 14) | interface BailianTTSResult { type BailianTTSResponse (line 24) | interface BailianTTSResponse { type WavFormat (line 41) | interface WavFormat { type WavDecoded (line 50) | interface WavDecoded { type BailianTTSSegmentResult (line 55) | interface BailianTTSSegmentResult { function readTrimmedString (line 62) | function readTrimmedString(value: unknown): string { function getWavDurationFromBuffer (line 66) | function getWavDurationFromBuffer(buffer: Buffer): number { function decodeWavBuffer (line 76) | function decodeWavBuffer(buffer: Buffer): WavDecoded { function buildWavBuffer (line 126) | function buildWavBuffer(format: WavFormat, pcmData: Buffer): Buffer { function isWavFormatEqual (line 146) | function isWavFormatEqual(left: WavFormat, right: WavFormat): boolean { function mergeWavBuffers (line 155) | function mergeWavBuffers(buffers: Buffer[]): Buffer { constant SPLIT_HINT_CHARS (line 174) | const SPLIT_HINT_CHARS = new Set([ function splitTextByLimit (line 180) | function splitTextByLimit(text: string, maxChars: number): string[] { function parseBailianTTSResponse (line 218) | async function parseBailianTTSResponse(response: Response): Promise { function readTextField (line 34) | function readTextField(payload: Record, key: string): s... function readStepField (line 39) | function readStepField(payload: Record, key: string): n... function readStringArrayField (line 44) | function readStringArrayField(payload: Record, key: str... function readBoolField (line 57) | function readBoolField(payload: Record, key: string): b... function normalizeLifecycleType (line 64) | function normalizeLifecycleType(value: unknown): string | null { function stageLooksCompleted (line 78) | function stageLooksCompleted(stage: string | undefined) { function stageLooksFailed (line 89) | function stageLooksFailed(stage: string | undefined) { function resolveTaskErrorMessage (line 94) | function resolveTaskErrorMessage(payload: Record, fallb... function extractTerminalPayload (line 98) | function extractTerminalPayload(payload: Record) { function mapTaskSSEEventToRunEvents (line 106) | function mapTaskSSEEventToRunEvents(event: SSEEvent): RunStreamEvent[] { function toTerminalRunResult (line 327) | function toTerminalRunResult(event: RunStreamEvent): RunResult | null { FILE: src/lib/query/hooks/run-stream/recovered-run-subscription.ts constant POLL_INTERVAL_MS (line 6) | const POLL_INTERVAL_MS = 1500 constant RUN_TERMINAL_RECONCILE_EMPTY_POLLS (line 7) | const RUN_TERMINAL_RECONCILE_EMPTY_POLLS = 2 function toObject (line 9) | function toObject(value: unknown): Record { function readText (line 14) | function readText(value: unknown): string { function reconcileRunTerminalState (line 18) | async function reconcileRunTerminalState(runId: string): Promise<{ type SubscribeRecoveredRunArgs (line 50) | type SubscribeRecoveredRunArgs = { type Cleanup (line 57) | type Cleanup = () => void function subscribeRecoveredRun (line 59) | function subscribeRecoveredRun(args: SubscribeRecoveredRunArgs): Cleanup { FILE: src/lib/query/hooks/run-stream/run-event-adapter.ts type JsonRecord (line 4) | type JsonRecord = Record type RunApiEvent (line 6) | type RunApiEvent = { function toObject (line 16) | function toObject(value: unknown): JsonRecord { function readText (line 21) | function readText(value: unknown): string { function readStringArray (line 25) | function readStringArray(value: unknown): string[] { function readBool (line 37) | function readBool(value: unknown): boolean | undefined { function resolveErrorMessage (line 43) | function resolveErrorMessage(payload: JsonRecord, fallback: string): str... function parseRunApiEventsPayload (line 50) | function parseRunApiEventsPayload(payload: unknown): RunApiEvent[] { function toRunStreamEventFromRunApi (line 80) | function toRunStreamEventFromRunApi(params: { function fetchRunEventsPage (line 260) | async function fetchRunEventsPage(params: { FILE: src/lib/query/hooks/run-stream/run-request-executor.ts type RunRequestExecutorArgs (line 11) | type RunRequestExecutorArgs = { constant POLL_INTERVAL_MS (line 20) | const POLL_INTERVAL_MS = 1500 constant RUN_EVENTS_LIMIT (line 21) | const RUN_EVENTS_LIMIT = 500 constant RUN_TERMINAL_RECONCILE_EMPTY_POLLS (line 22) | const RUN_TERMINAL_RECONCILE_EMPTY_POLLS = 2 function readText (line 24) | function readText(value: unknown): string { function reconcileRunTerminalState (line 28) | async function reconcileRunTerminalState(runId: string): Promise, parsedEvent: strin... function streamSSEBody (line 47) | async function streamSSEBody(args: { FILE: src/lib/query/hooks/run-stream/run-stream-state-runtime.ts constant TASK_STREAM_TIMEOUT_MS (line 20) | const TASK_STREAM_TIMEOUT_MS = 1000 * 60 * 30 constant PROBE_COOLDOWN_MS (line 21) | const PROBE_COOLDOWN_MS = 60_000 function useRunStreamState (line 24) | function useRunStreamState>( FILE: src/lib/query/hooks/run-stream/run-stream-view.ts type DerivedRunStreamView (line 4) | type DerivedRunStreamView = { function deriveRunStreamView (line 15) | function deriveRunStreamView(args: { FILE: src/lib/query/hooks/run-stream/snapshot.ts constant SNAPSHOT_TTL_MS (line 3) | const SNAPSHOT_TTL_MS = 1000 * 60 * 60 * 6 type RunSnapshot (line 5) | type RunSnapshot = { function loadRunSnapshot (line 10) | function loadRunSnapshot(storageKey: string): RunState | null { function saveRunSnapshot (line 38) | function saveRunSnapshot(storageKey: string, runState: RunState | null) { function clearRunSnapshot (line 53) | function clearRunSnapshot(storageKey: string) { FILE: src/lib/query/hooks/run-stream/state-machine.ts function toTimestamp (line 13) | function toTimestamp(ts: string | undefined, fallback: number): number { function rankStepStatus (line 19) | function rankStepStatus(status: RunStepStatus): number { function rankRunStatus (line 26) | function rankRunStatus(status: RunStreamStatus): number { function lockForwardStepStatus (line 33) | function lockForwardStepStatus(prev: RunStepStatus, next: RunStepStatus)... function lockForwardRunStatus (line 40) | function lockForwardRunStatus(prev: RunStreamStatus, next: RunStreamStat... function normalizeLane (line 45) | function normalizeLane(value: unknown): RunStreamLane { function splitThinkTaggedContent (line 49) | function splitThinkTaggedContent(input: string): { text: string; reasoni... function mergeReasoningText (line 74) | function mergeReasoningText(current: string, incoming: string): string { function normalizeThinkTaggedStepOutput (line 83) | function normalizeThinkTaggedStepOutput(step: RunStepState) { function parseStepIdentity (line 91) | function parseStepIdentity(rawStepId: string): { function normalizeStepStatus (line 116) | function normalizeStepStatus(value: unknown): RunStepStatus { function normalizeRunStatus (line 129) | function normalizeRunStatus(value: unknown): RunStreamStatus { function toStageViewStatus (line 134) | function toStageViewStatus(status: RunStepStatus): StageViewStatus { function readStringArray (line 143) | function readStringArray(value: unknown): string[] { function mergeStringArray (line 155) | function mergeStringArray(base: string[], incoming: string[]): string[] { function readBool (line 167) | function readBool(value: unknown): boolean | null { function buildDefaultStep (line 173) | function buildDefaultStep(event: RunStreamEvent, now: number): RunStepSt... function resetStepForRetry (line 215) | function resetStepForRetry(step: RunStepState, attempt: number) { function createInitialRunState (line 231) | function createInitialRunState(runId: string, now: number): RunState { function computeStepDependencyLevel (line 248) | function computeStepDependencyLevel(params: { function applyRunStreamEvent (line 279) | function applyRunStreamEvent(prev: RunState | null, event: RunStreamEven... function getStageOutput (line 577) | function getStageOutput(step: RunStepState | null) { FILE: src/lib/query/hooks/run-stream/types.ts type RunStepState (line 3) | type RunStepState = { type RunState (line 25) | type RunState = { type RunResult (line 40) | type RunResult = { type StageViewStatus (line 48) | type StageViewStatus = 'pending' | 'queued' | 'processing' | 'completed'... type RunStageView (line 50) | type RunStageView = { type UseRunStreamStateOptions (line 60) | type UseRunStreamStateOptions> = { type RunStreamView (line 70) | type RunStreamView = { FILE: src/lib/query/hooks/useGlobalAssets.ts type GlobalCharacterAppearance (line 12) | interface GlobalCharacterAppearance { type GlobalCharacter (line 32) | interface GlobalCharacter { type GlobalLocationImage (line 41) | interface GlobalLocationImage { type GlobalLocation (line 54) | interface GlobalLocation { type GlobalVoice (line 63) | interface GlobalVoice { type GlobalFolder (line 77) | interface GlobalFolder { constant GLOBAL_ASSET_PROJECT_ID (line 82) | const GLOBAL_ASSET_PROJECT_ID = 'global-asset-hub' constant GLOBAL_IMAGE_TASK_TYPES (line 83) | const GLOBAL_IMAGE_TASK_TYPES = ['asset_hub_image'] constant GLOBAL_MODIFY_TASK_TYPES (line 84) | const GLOBAL_MODIFY_TASK_TYPES = ['asset_hub_modify'] function isRunningPhase (line 86) | function isRunningPhase(phase: string | null | undefined) { function useGlobalCharacters (line 95) | function useGlobalCharacters(folderId?: string | null) { function useGlobalLocations (line 191) | function useGlobalLocations(folderId?: string | null) { function useGlobalVoices (line 271) | function useGlobalVoices(folderId?: string | null) { function useGlobalFolders (line 288) | function useGlobalFolders() { function useCreateFolder (line 305) | function useCreateFolder() { function useUpdateFolder (line 330) | function useUpdateFolder() { function useDeleteFolder (line 355) | function useDeleteFolder() { function useRefreshGlobalAssets (line 379) | function useRefreshGlobalAssets() { FILE: src/lib/query/hooks/useProjectAssets.ts type ProjectAssetsData (line 12) | interface ProjectAssetsData { constant CHARACTER_TASK_TYPES (line 17) | const CHARACTER_TASK_TYPES = ['image_character', 'modify_asset_image', '... constant CHARACTER_PROFILE_TASK_TYPES (line 18) | const CHARACTER_PROFILE_TASK_TYPES = ['character_profile_confirm', 'char... constant LOCATION_TASK_TYPES (line 19) | const LOCATION_TASK_TYPES = ['image_location', 'modify_asset_image', 're... function isRunningPhase (line 21) | function isRunningPhase(phase: string | null | undefined) { function useProjectAssets (line 30) | function useProjectAssets(projectId: string | null) { function useProjectCharacters (line 156) | function useProjectCharacters(projectId: string | null) { function useProjectLocations (line 173) | function useProjectLocations(projectId: string | null) { function useRefreshProjectAssets (line 193) | function useRefreshProjectAssets(projectId: string | null) { FILE: src/lib/query/hooks/useProjectData.ts type ProjectDataResponse (line 11) | interface ProjectDataResponse { function useProjectData (line 19) | function useProjectData(projectId: string | null) { function useRefreshProjectData (line 40) | function useRefreshProjectData(projectId: string | null) { type Episode (line 52) | interface Episode { type VoiceLine (line 67) | interface VoiceLine { type StoryboardData (line 76) | interface StoryboardData { function useEpisodeData (line 83) | function useEpisodeData(projectId: string | null, episodeId: string | nu... function useEpisodes (line 104) | function useEpisodes(projectId: string | null) { function useRefreshEpisodeData (line 114) | function useRefreshEpisodeData(projectId: string | null, episodeId: stri... function useRefreshAll (line 129) | function useRefreshAll(projectId: string | null, episodeId: string | nul... FILE: src/lib/query/hooks/useSSE.ts type UseSSEOptions (line 11) | type UseSSEOptions = { function useSSE (line 18) | function useSSE({ projectId, episodeId, enabled = true, onEvent }: UseSS... FILE: src/lib/query/hooks/useScriptToStoryboardRunStream.ts type ScriptToStoryboardRunParams (line 7) | type ScriptToStoryboardRunParams = { type ScriptToStoryboardRunResult (line 15) | type ScriptToStoryboardRunResult = RunResult type UseScriptToStoryboardRunStreamOptions (line 17) | type UseScriptToStoryboardRunStreamOptions = { function useScriptToStoryboardRunStream (line 22) | function useScriptToStoryboardRunStream({ projectId, episodeId }: UseScr... FILE: src/lib/query/hooks/useStoryToScriptRunStream.ts type StoryToScriptRunParams (line 7) | type StoryToScriptRunParams = { type StoryToScriptRunResult (line 16) | type StoryToScriptRunResult = RunResult type UseStoryToScriptRunStreamOptions (line 18) | type UseStoryToScriptRunStreamOptions = { function useStoryToScriptRunStream (line 23) | function useStoryToScriptRunStream({ projectId, episodeId }: UseStoryToS... FILE: src/lib/query/hooks/useStoryboards.ts type PanelCandidate (line 12) | interface PanelCandidate { type StoryboardPanel (line 20) | interface StoryboardPanel { type StoryboardGroup (line 42) | interface StoryboardGroup { type StoryboardData (line 48) | interface StoryboardData { type VideoGenerationOptionValue (line 52) | type VideoGenerationOptionValue = string | number | boolean type VideoGenerationOptions (line 53) | type VideoGenerationOptions = Record type BatchVideoGenerationParams (line 55) | interface BatchVideoGenerationParams { function useStoryboards (line 65) | function useStoryboards(episodeId: string | null) { function useRegeneratePanelImage (line 84) | function useRegeneratePanelImage(projectId: string | null, episodeId: st... function useModifyPanelImage (line 116) | function useModifyPanelImage(projectId: string | null, episodeId: string... function useGenerateVideo (line 152) | function useGenerateVideo(projectId: string | null, episodeId: string | ... function useBatchGenerateVideos (line 241) | function useBatchGenerateVideos(projectId: string | null, episodeId: str... function useSelectPanelCandidate (line 288) | function useSelectPanelCandidate(episodeId: string | null) { function useRefreshStoryboards (line 315) | function useRefreshStoryboards(episodeId: string | null) { function useLipSync (line 328) | function useLipSync(projectId: string | null, episodeId: string | null) { FILE: src/lib/query/hooks/useTaskPresentation.ts type TaskPresentationTarget (line 15) | type TaskPresentationTarget = { type TaskPresentationOptions (line 24) | type TaskPresentationOptions = type TaskPresentationResult (line 32) | type TaskPresentationResult = { function useTaskPresentationInternal (line 40) | function useTaskPresentationInternal( function useAssetTaskPresentation (line 114) | function useAssetTaskPresentation( function useStoryboardTaskPresentation (line 122) | function useStoryboardTaskPresentation( function useVideoTaskPresentation (line 130) | function useVideoTaskPresentation( function useVoiceTaskPresentation (line 138) | function useVoiceTaskPresentation( FILE: src/lib/query/hooks/useTaskStatus.ts type TaskItem (line 8) | type TaskItem = { constant ACTIVE_STATUS (line 30) | const ACTIVE_STATUS = ['queued', 'processing'] as const constant SNAPSHOT_STATUS (line 31) | const SNAPSHOT_STATUS = ['queued', 'processing', 'completed', 'failed'] ... function buildTaskSearch (line 33) | function buildTaskSearch(params: { function useTaskList (line 57) | function useTaskList(params: { function useActiveTasks (line 99) | function useActiveTasks(params: { function useTaskSnapshot (line 132) | function useTaskSnapshot(params: { function useTaskStatus (line 164) | function useTaskStatus(params: { FILE: src/lib/query/hooks/useTaskTargetStateMap.ts type TaskTargetStateQuery (line 11) | type TaskTargetStateQuery = { type TaskTargetState (line 17) | type TaskTargetState = { type TaskTargetStateBatchSubscriber (line 35) | type TaskTargetStateBatchSubscriber = { type TaskTargetStateBatch (line 41) | type TaskTargetStateBatch = { constant TARGET_STATE_BATCH_WINDOW_MS (line 47) | const TARGET_STATE_BATCH_WINDOW_MS = 120 constant TARGET_STATE_CHUNK_SIZE (line 48) | const TARGET_STATE_CHUNK_SIZE = 500 function traceFrontend (line 55) | function traceFrontend(event: string, details: Record) { function stateKey (line 60) | function stateKey(targetType: string, targetId: string) { function targetQueryKey (line 64) | function targetQueryKey(target: TaskTargetStateQuery) { function normalizeTargets (line 69) | function normalizeTargets(targets: TaskTargetStateQuery[]) { function buildIdleState (line 90) | function buildIdleState(target: TaskTargetStateQuery): TaskTargetState { function matchesTaskTypeWhitelist (line 107) | function matchesTaskTypeWhitelist( function shouldTraceMergeTarget (line 117) | function shouldTraceMergeTarget(targetType: string) { function logMergeDecision (line 121) | function logMergeDecision(params: { function chunkArray (line 174) | function chunkArray(arr: T[], size: number): T[][] { function fetchTargetStatesChunk (line 183) | async function fetchTargetStatesChunk( function flushTaskTargetStateBatch (line 199) | async function flushTaskTargetStateBatch(projectId: string) { function fetchTaskTargetStatesBatched (line 241) | function fetchTaskTargetStatesBatched( function useTaskTargetStateMap (line 274) | function useTaskTargetStateMap( FILE: src/lib/query/hooks/useUserModels.ts type UserModelOption (line 9) | interface UserModelOption { type UserModelsPayload (line 18) | interface UserModelsPayload { function useUserModels (line 26) | function useUserModels() { FILE: src/lib/query/hooks/useVoiceLines.ts type VoiceLine (line 9) | interface VoiceLine { type VoiceLinesData (line 20) | interface VoiceLinesData { type MatchedVoiceLine (line 24) | interface MatchedVoiceLine { type MatchedVoiceLinesData (line 35) | interface MatchedVoiceLinesData { function useVoiceLines (line 44) | function useVoiceLines(episodeId: string | null) { function useMatchedVoiceLines (line 61) | function useMatchedVoiceLines(projectId: string | null, episodeId: strin... function useGenerateVoice (line 80) | function useGenerateVoice(projectId: string | null, episodeId: string | ... function useBatchGenerateVoices (line 108) | function useBatchGenerateVoices(projectId: string | null, episodeId: str... function useUpdateVoiceText (line 136) | function useUpdateVoiceText(episodeId: string | null) { function useRefreshVoiceLines (line 180) | function useRefreshVoiceLines(episodeId: string | null) { FILE: src/lib/query/keys.ts type QueryKeys (line 94) | type QueryKeys = typeof queryKeys FILE: src/lib/query/mutations/asset-hub-character-mutations.ts type SelectCharacterImageContext (line 18) | interface SelectCharacterImageContext { type DeleteCharacterContext (line 27) | interface DeleteCharacterContext { function applyCharacterSelection (line 34) | function applyCharacterSelection( function captureCharacterQuerySnapshots (line 61) | function captureCharacterQuerySnapshots(queryClient: ReturnType( function requestVoidWithError (line 46) | async function requestVoidWithError( function requestTaskResponseWithError (line 57) | async function requestTaskResponseWithError( function requestBlobWithError (line 68) | async function requestBlobWithError( function invalidateQueryTemplates (line 82) | async function invalidateQueryTemplates( FILE: src/lib/query/mutations/storyboard-panel-mutations.ts function useRegenerateProjectPanelImage (line 16) | function useRegenerateProjectPanelImage(projectId: string) { function useModifyProjectStoryboardImage (line 64) | function useModifyProjectStoryboardImage(projectId: string) { function useDownloadProjectImages (line 97) | function useDownloadProjectImages(projectId: string) { function useUpdateProjectPanel (line 114) | function useUpdateProjectPanel(projectId: string) { function useCreateProjectPanel (line 138) | function useCreateProjectPanel(projectId: string) { function useDeleteProjectPanel (line 158) | function useDeleteProjectPanel(projectId: string) { function useDeleteProjectStoryboardGroup (line 176) | function useDeleteProjectStoryboardGroup(projectId: string) { function useRegenerateProjectStoryboardText (line 196) | function useRegenerateProjectStoryboardText(projectId: string) { function useCreateProjectStoryboardGroup (line 217) | function useCreateProjectStoryboardGroup(projectId: string) { function useMoveProjectStoryboardGroup (line 237) | function useMoveProjectStoryboardGroup(projectId: string) { function useInsertProjectPanel (line 257) | function useInsertProjectPanel(projectId: string) { function useCreateProjectPanelVariant (line 277) | function useCreateProjectPanelVariant(projectId: string) { function useClearProjectStoryboardError (line 309) | function useClearProjectStoryboardError(projectId: string) { FILE: src/lib/query/mutations/storyboard-prompt-mutations.ts function useAiModifyProjectShotPrompt (line 10) | function useAiModifyProjectShotPrompt(projectId: string) { function useAnalyzeProjectShotVariants (line 50) | function useAnalyzeProjectShotVariants(projectId: string) { function useUpdateProjectPhotographyPlan (line 87) | function useUpdateProjectPhotographyPlan(projectId: string) { function useUpdateProjectPanelActingNotes (line 109) | function useUpdateProjectPanelActingNotes(projectId: string) { function useSelectProjectPanelCandidate (line 132) | function useSelectProjectPanelCandidate(projectId: string) { FILE: src/lib/query/mutations/task-mutations.ts function useDismissFailedTasks (line 7) | function useDismissFailedTasks(projectId: string) { FILE: src/lib/query/mutations/useEpisodeMutations.ts function useListProjectEpisodes (line 15) | function useListProjectEpisodes(projectId: string) { function useSplitProjectEpisodes (line 32) | function useSplitProjectEpisodes(projectId: string) { function useSplitProjectEpisodesByMarkers (line 60) | function useSplitProjectEpisodesByMarkers(projectId: string) { function useSaveProjectEpisodesBatch (line 86) | function useSaveProjectEpisodesBatch(projectId: string) { function useUpdateProjectEpisodeField (line 113) | function useUpdateProjectEpisodeField(projectId: string) { function useUpdateProjectClip (line 191) | function useUpdateProjectClip(projectId: string) { function useDownloadRemoteBlob (line 248) | function useDownloadRemoteBlob() { FILE: src/lib/query/mutations/useProjectConfigMutations.ts function useAnalyzeProjectGlobalAssets (line 11) | function useAnalyzeProjectGlobalAssets(projectId: string) { function useCopyProjectAssetFromGlobal (line 37) | function useCopyProjectAssetFromGlobal(projectId: string) { function useUpdateProjectConfig (line 66) | function useUpdateProjectConfig(projectId: string) { function useAnalyzeProjectAssets (line 113) | function useAnalyzeProjectAssets(projectId: string) { function useGetProjectStoryboardStats (line 142) | function useGetProjectStoryboardStats(projectId: string) { FILE: src/lib/query/mutations/useVideoMutations.ts function useListProjectEpisodeVideoUrls (line 8) | function useListProjectEpisodeVideoUrls(projectId: string) { function useUpdateProjectPanelLink (line 29) | function useUpdateProjectPanelLink(projectId: string) { function useUpdateProjectPanelVideoPrompt (line 51) | function useUpdateProjectPanelVideoPrompt(projectId: string) { FILE: src/lib/query/mutations/useVoiceMutations.ts type ProjectVoiceLine (line 11) | type ProjectVoiceLine = { type GenerateProjectVoiceResponse (line 26) | type GenerateProjectVoiceResponse = { function useDesignProjectVoice (line 36) | function useDesignProjectVoice(projectId: string) { function useFetchProjectVoiceStageData (line 68) | function useFetchProjectVoiceStageData(projectId: string) { function useAnalyzeProjectVoice (line 106) | function useAnalyzeProjectVoice(projectId: string) { function useGenerateProjectVoice (line 127) | function useGenerateProjectVoice(projectId: string) { function useCreateProjectVoiceLine (line 154) | function useCreateProjectVoiceLine(projectId: string) { function useUpdateProjectVoiceLine (line 178) | function useUpdateProjectVoiceLine(projectId: string) { function useDeleteProjectVoiceLine (line 197) | function useDeleteProjectVoiceLine(projectId: string) { function useDownloadProjectVoices (line 214) | function useDownloadProjectVoices(projectId: string) { function useUpdateSpeakerVoice (line 229) | function useUpdateSpeakerVoice(projectId: string) { FILE: src/lib/query/task-target-overlay.ts constant TASK_TARGET_OVERLAY_TTL_MS (line 6) | const TASK_TARGET_OVERLAY_TTL_MS = 30_000 type TaskTargetOverlayPhase (line 8) | type TaskTargetOverlayPhase = 'queued' | 'processing' type TaskTargetOverlayState (line 10) | type TaskTargetOverlayState = { type TaskTargetOverlayMap (line 26) | type TaskTargetOverlayMap = Record function toOverlayKey (line 28) | function toOverlayKey(targetType: string, targetId: string) { function normalizeOptionalString (line 32) | function normalizeOptionalString(value: unknown): string | null { function buildOptimisticTaskId (line 38) | function buildOptimisticTaskId(targetType: string, targetId: string, now... function pruneExpiredOverlay (line 42) | function pruneExpiredOverlay(prev: TaskTargetOverlayMap | undefined, now... function upsertTaskTargetOverlay (line 52) | function upsertTaskTargetOverlay( function clearTaskTargetOverlay (line 101) | function clearTaskTargetOverlay( function applyTaskLifecycleToOverlay (line 121) | function applyTaskLifecycleToOverlay( FILE: src/lib/rate-limit.ts type RateLimitConfig (line 15) | interface RateLimitConfig { type RateLimitResult (line 22) | interface RateLimitResult { constant AUTH_LOGIN_LIMIT (line 36) | const AUTH_LOGIN_LIMIT: RateLimitConfig = { constant AUTH_REGISTER_LIMIT (line 42) | const AUTH_REGISTER_LIMIT: RateLimitConfig = { function checkRateLimit (line 58) | async function checkRateLimit( function getClientIp (line 128) | function getClientIp(req: NextRequest): string { FILE: src/lib/redis.ts type RedisSingleton (line 4) | type RedisSingleton = { constant REDIS_HOST (line 13) | const REDIS_HOST = process.env.REDIS_HOST || '127.0.0.1' constant REDIS_PORT (line 14) | const REDIS_PORT = Number.parseInt(process.env.REDIS_PORT || '6379', 10)... constant REDIS_USERNAME (line 15) | const REDIS_USERNAME = process.env.REDIS_USERNAME constant REDIS_PASSWORD (line 16) | const REDIS_PASSWORD = process.env.REDIS_PASSWORD constant REDIS_TLS (line 17) | const REDIS_TLS = process.env.REDIS_TLS === 'true' constant IS_TEST_ENV (line 18) | const IS_TEST_ENV = process.env.NODE_ENV === 'test' function buildBaseConfig (line 20) | function buildBaseConfig() { function onConnectLog (line 36) | function onConnectLog(scope: string, client: Redis) { function createAppRedis (line 41) | function createAppRedis() { function createQueueRedis (line 50) | function createQueueRedis() { function createSubscriber (line 68) | function createSubscriber() { FILE: src/lib/run-runtime/publisher.ts constant RUN_CHANNEL_PREFIX (line 5) | const RUN_CHANNEL_PREFIX = 'run-events:project:' function getProjectRunChannel (line 7) | function getProjectRunChannel(projectId: string) { function publishRunEvent (line 11) | async function publishRunEvent(input: RunEventInput) { FILE: src/lib/run-runtime/service.ts type JsonRecord (line 16) | type JsonRecord = Record type GraphRunRow (line 18) | type GraphRunRow = { type GraphStepRow (line 46) | type GraphStepRow = { type GraphArtifactRow (line 63) | type GraphArtifactRow = { type GraphEventRow (line 74) | type GraphEventRow = { type GraphRunModel (line 88) | type GraphRunModel = { type GraphStepModel (line 96) | type GraphStepModel = { type GraphStepAttemptModel (line 104) | type GraphStepAttemptModel = { type GraphEventModel (line 108) | type GraphEventModel = { type GraphCheckpointModel (line 113) | type GraphCheckpointModel = { type GraphArtifactModel (line 126) | type GraphArtifactModel = { type GraphRuntimeTx (line 132) | type GraphRuntimeTx = { type GraphRuntimeClient (line 141) | type GraphRuntimeClient = GraphRuntimeTx & { function toObject (line 147) | function toObject(value: unknown): JsonRecord { function asRunStatus (line 152) | function asRunStatus(value: string): RunStatus { function toIso (line 166) | function toIso(value: Date | null): string | null { function readString (line 170) | function readString(payload: JsonRecord, key: string): string | null { function readInt (line 177) | function readInt(payload: JsonRecord, key: string): number | null { function resolveErrorMessage (line 189) | function resolveErrorMessage(payload: JsonRecord): string | null { function normalizeLane (line 196) | function normalizeLane(lane: string | null): 'text' | 'reasoning' | null { function mapEventRow (line 202) | function mapEventRow(row: GraphEventRow): RunEvent { function mapRunRow (line 218) | function mapRunRow(run: GraphRunRow) { function mapStepRow (line 248) | function mapStepRow(step: GraphStepRow) { function mapArtifactRow (line 272) | function mapArtifactRow(row: GraphArtifactRow) { type MysqlIndexRow (line 285) | type MysqlIndexRow = { constant REQUIRED_GRAPH_ARTIFACT_UNIQUE_COLUMNS (line 292) | const REQUIRED_GRAPH_ARTIFACT_UNIQUE_COLUMNS = ['runId', 'stepKey', 'art... function toIndexNumber (line 295) | function toIndexNumber(value: number | string) { function hasRequiredGraphArtifactUniqueIndex (line 300) | function hasRequiredGraphArtifactUniqueIndex(rows: MysqlIndexRow[]) { function ensureGraphArtifactUniqueIndex (line 329) | async function ensureGraphArtifactUniqueIndex() { function upsertArtifactStrict (line 353) | async function upsertArtifactStrict(params: { function buildStepProjection (line 387) | function buildStepProjection(input: RunEventInput) { function buildArtifactProjection (line 405) | function buildArtifactProjection(params: { function applyRunProjection (line 449) | async function applyRunProjection(tx: GraphRuntimeTx, input: RunEventInp... function createRun (line 657) | async function createRun(input: CreateRunInput) { function attachTaskToRun (line 681) | async function attachTaskToRun(runId: string, taskId: string) { function getRunById (line 691) | async function getRunById(runId: string) { function findReusableActiveRun (line 699) | async function findReusableActiveRun(params: { function claimRunLease (line 727) | async function claimRunLease(params: { function renewRunLease (line 761) | async function renewRunLease(params: { function releaseRunLease (line 789) | async function releaseRunLease(params: { function getRunSnapshot (line 805) | async function getRunSnapshot(runId: string) { function listRuns (line 825) | async function listRuns(input: ListRunsInput) { function requestRunCancel (line 848) | async function requestRunCancel(params: { function appendRunEventWithSeq (line 871) | async function appendRunEventWithSeq(input: RunEventInput): Promise function toObject (line 6) | function toObject(value: unknown): JsonRecord { function readString (line 11) | function readString(payload: JsonRecord, key: string): string | null { function readInt (line 18) | function readInt(payload: JsonRecord, key: string): number | null { function resolveRunId (line 28) | function resolveRunId(payload: JsonRecord): string | null { function normalizeLifecycleType (line 35) | function normalizeLifecycleType(value: string | null): string | null { function stageLooksCompleted (line 49) | function stageLooksCompleted(stage: string | null): boolean { function stageLooksFailed (line 60) | function stageLooksFailed(stage: string | null): boolean { function mapTaskSSEEventToRunEvents (line 65) | function mapTaskSSEEventToRunEvents(event: SSEEvent): RunEventInput[] { FILE: src/lib/run-runtime/types.ts constant RUN_STATUS (line 1) | const RUN_STATUS = { type RunStatus (line 10) | type RunStatus = (typeof RUN_STATUS)[keyof typeof RUN_STATUS] constant RUN_STEP_STATUS (line 12) | const RUN_STEP_STATUS = { type RunStepStatus (line 20) | type RunStepStatus = (typeof RUN_STEP_STATUS)[keyof typeof RUN_STEP_STATUS] constant RUN_EVENT_TYPE (line 22) | const RUN_EVENT_TYPE = { type RunEventType (line 33) | type RunEventType = (typeof RUN_EVENT_TYPE)[keyof typeof RUN_EVENT_TYPE] type RunEventInput (line 35) | type RunEventInput = { type RunEvent (line 46) | type RunEvent = { type CreateRunInput (line 60) | type CreateRunInput = { type RunLeaseState (line 72) | type RunLeaseState = { type ListRunsInput (line 79) | type ListRunsInput = { type StateRef (line 90) | type StateRef = { constant RUN_STATE_MAX_BYTES (line 98) | const RUN_STATE_MAX_BYTES = 64 * 1024 FILE: src/lib/run-runtime/workflow-lease.ts constant DEFAULT_RUN_LEASE_MS (line 5) | const DEFAULT_RUN_LEASE_MS = 30_000 function getDefaultRunLeaseMs (line 7) | function getDefaultRunLeaseMs() { function assertWorkflowRunActive (line 11) | async function assertWorkflowRunActive(params: { function withWorkflowRunLease (line 33) | async function withWorkflowRunLease(params: { FILE: src/lib/run-runtime/workflow.ts constant AI_TASK_TYPES (line 3) | const AI_TASK_TYPES: ReadonlySet = new Set(Object.va... function isAiTaskType (line 5) | function isAiTaskType(type: TaskType): boolean { function workflowTypeFromTaskType (line 9) | function workflowTypeFromTaskType(type: TaskType): string { FILE: src/lib/server-boot.ts constant SERVER_BOOT_ID (line 4) | const SERVER_BOOT_ID = `boot-${Date.now()}-${Math.random().toString(36).... FILE: src/lib/srt.ts type SRTEntry (line 4) | interface SRTEntry { function parseSRT (line 16) | function parseSRT(srtText: string): SRTEntry[] { function sliceSRT (line 52) | function sliceSRT(srtText: string, start: number, end: number): string { function calculateSRTDuration (line 69) | function calculateSRTDuration(srtText: string): number { function timeToSeconds (line 87) | function timeToSeconds(timeStr: string): number { function isValidSRT (line 105) | function isValidSRT(text: string): boolean { function extractTextFromSRT (line 119) | function extractTextFromSRT(srtText: string): string { FILE: src/lib/sse/shared-subscriber.ts type MessageHandler (line 5) | type MessageHandler = (message: string) => void class SharedSubscriber (line 7) | class SharedSubscriber { method constructor (line 12) | constructor() { method addChannelListener (line 33) | async addChannelListener(channel: string, handler: MessageHandler): Pr... type GlobalSharedSubscriber (line 70) | type GlobalSharedSubscriber = typeof globalThis & { function getSharedSubscriber (line 76) | function getSharedSubscriber() { FILE: src/lib/storage/bootstrap.ts constant DEFAULT_MINIO_REGION (line 6) | const DEFAULT_MINIO_REGION = 'us-east-1' type StorageBootstrapResult (line 8) | type StorageBootstrapResult = 'skipped' | 'existing' | 'created' type BucketErrorShape (line 10) | type BucketErrorShape = { function isMissingBucketError (line 19) | function isMissingBucketError(error: unknown): boolean { function ensureMinioBucket (line 35) | async function ensureMinioBucket(): Promise { function deleteObjects (line 58) | async function deleteObjects(keys: string[]): Promise { function getSignedObjectUrl (line 70) | async function getSignedObjectUrl(key: string, expiresInSeconds: number ... function getSignedUrl (line 77) | function getSignedUrl(key: string, expiresInSeconds: number = DEFAULT_SI... function getSignedUrls (line 86) | function getSignedUrls(keys: string[], expiresInSeconds: number = DEFAUL... function downloadAndUploadImage (line 90) | async function downloadAndUploadImage( function downloadAndUploadVideo (line 118) | async function downloadAndUploadVideo( FILE: src/lib/storage/init.ts function main (line 4) | async function main() { FILE: src/lib/storage/providers/cos.ts class CosStorageProvider (line 4) | class CosStorageProvider implements StorageProvider { method constructor (line 7) | constructor() { method uploadObject (line 11) | async uploadObject(_params: UploadObjectParams): Promise { method deleteObjects (line 19) | async deleteObjects(_keys: string[]): Promise { method getSignedObjectUrl (line 23) | async getSignedObjectUrl(_params: SignedUrlParams): Promise { method getObjectBuffer (line 27) | async getObjectBuffer(_key: string): Promise { method extractStorageKey (line 31) | extractStorageKey(_input: string | null | undefined): string | null { method toFetchableUrl (line 35) | toFetchableUrl(_inputUrl: string): string { method generateUniqueKey (line 39) | generateUniqueKey(_params: { prefix: string; ext: string }): string { FILE: src/lib/storage/providers/local.ts constant UPLOAD_DIR (line 6) | const UPLOAD_DIR = process.env.UPLOAD_DIR || './data/uploads' function resolveUploadPath (line 8) | function resolveUploadPath(key: string): string { class LocalStorageProvider (line 12) | class LocalStorageProvider implements StorageProvider { method uploadObject (line 15) | async uploadObject(params: UploadObjectParams): Promise { method deleteObjects (line 34) | async deleteObjects(keys: string[]): Promise { method getSignedObjectUrl (line 51) | async getSignedObjectUrl(params: SignedUrlParams): Promise { method getObjectBuffer (line 56) | async getObjectBuffer(key: string): Promise { method extractStorageKey (line 60) | extractStorageKey(input: string | null | undefined): string | null { method toFetchableUrl (line 77) | toFetchableUrl(inputUrl: string): string { method generateUniqueKey (line 81) | generateUniqueKey(params: { prefix: string; ext: string }): string { FILE: src/lib/storage/providers/minio.ts constant DEFAULT_MINIO_REGION (line 4) | const DEFAULT_MINIO_REGION = 'us-east-1' type S3ClientLike (line 6) | type S3ClientLike = { type S3SdkModule (line 10) | type S3SdkModule = { type PresignerModule (line 18) | type PresignerModule = { class MinioStorageProvider (line 22) | class MinioStorageProvider implements StorageProvider { method constructor (line 33) | constructor() { method loadSdk (line 42) | private async loadSdk(): Promise { method loadPresigner (line 46) | private async loadPresigner(): Promise { method getClient (line 50) | private async getClient(): Promise { method uploadObject (line 68) | async uploadObject(params: UploadObjectParams): Promise { method deleteObjects (line 90) | async deleteObjects(keys: string[]): Promise { method getSignedObjectUrl (line 111) | async getSignedObjectUrl(params: SignedUrlParams): Promise { method getObjectBuffer (line 128) | async getObjectBuffer(key: string): Promise { method extractStorageKey (line 138) | extractStorageKey(input: string | null | undefined): string | null { method toFetchableUrl (line 161) | toFetchableUrl(inputUrl: string): string { method generateUniqueKey (line 165) | generateUniqueKey(params: { prefix: string; ext: string }): string { FILE: src/lib/storage/signed-urls.ts type UnknownRecord (line 5) | type UnknownRecord = Record type AppLike (line 7) | interface AppLike { type CharacterLike (line 14) | interface CharacterLike { type LocationImageLike (line 20) | interface LocationImageLike { type LocationLike (line 25) | interface LocationLike { type ShotLike (line 30) | interface ShotLike { type PanelLike (line 36) | interface PanelLike { type StoryboardLike (line 47) | interface StoryboardLike { type ProjectLike (line 54) | interface ProjectLike { function keyToSignedUrl (line 68) | function keyToSignedUrl(key: string | null, expires: number = 24 * 60 * ... function addSignedUrlsToCharacter (line 76) | function addSignedUrlsToCharacter(character: CharacterLike) { function addSignedUrlToLocation (line 106) | function addSignedUrlToLocation(location: LocationLike) { function addSignedUrlsToShot (line 118) | function addSignedUrlsToShot(shot: ShotLike) { function addSignedUrlToAssetCharacter (line 126) | function addSignedUrlToAssetCharacter(character: { imageUrl: string | nu... function addSignedUrlToAssetLocation (line 133) | function addSignedUrlToAssetLocation(location: { imageUrl: string | null... function addSignedUrlsToStoryboard (line 140) | function addSignedUrlsToStoryboard(storyboard: StoryboardLike) { function addSignedUrlsToProject (line 206) | function addSignedUrlsToProject(project: ProjectLike) { FILE: src/lib/storage/types.ts type StorageType (line 1) | type StorageType = 'minio' | 'local' | 'cos' type UploadObjectParams (line 3) | interface UploadObjectParams { type UploadObjectResult (line 9) | interface UploadObjectResult { type DeleteObjectsResult (line 13) | interface DeleteObjectsResult { type SignedUrlParams (line 18) | interface SignedUrlParams { type StorageProvider (line 23) | interface StorageProvider { type StorageFactoryOptions (line 35) | interface StorageFactoryOptions { FILE: src/lib/storage/utils.ts constant DEFAULT_SIGNED_URL_EXPIRES_SECONDS (line 4) | const DEFAULT_SIGNED_URL_EXPIRES_SECONDS = 24 * 60 * 60 function resolveBaseUrl (line 6) | function resolveBaseUrl(): string { function toFetchableUrl (line 10) | function toFetchableUrl(inputUrl: string): string { function requireEnv (line 20) | function requireEnv(name: string): string { function isHttpUrl (line 28) | function isHttpUrl(value: string): boolean { function normalizeKey (line 32) | function normalizeKey(raw: string): string { function withRetry (line 36) | async function withRetry( function streamToBuffer (line 57) | async function streamToBuffer(body: unknown): Promise { FILE: src/lib/storyboard-phases.ts type StoryboardPhase (line 16) | type StoryboardPhase = 1 | '2-cinematography' | '2-acting' | 3 type JsonRecord (line 18) | type JsonRecord = Record type ClipCharacterRef (line 20) | type ClipCharacterRef = string | { name?: string | null } type CharacterAppearance (line 22) | type CharacterAppearance = { type CharacterAsset (line 29) | type CharacterAsset = { type LocationAsset (line 34) | type LocationAsset = { type ClipAsset (line 42) | type ClipAsset = { type SessionAsset (line 54) | type SessionAsset = { type NovelPromotionAssetData (line 61) | type NovelPromotionAssetData = { type StoryboardPanel (line 67) | type StoryboardPanel = JsonRecord & { type PhotographyRule (line 83) | type PhotographyRule = JsonRecord & { type ActingDirection (line 92) | type ActingDirection = JsonRecord & { function isJsonRecord (line 97) | function isJsonRecord(value: unknown): value is JsonRecord { function parseClipCharacters (line 101) | function parseClipCharacters(raw: string | null | undefined): ClipCharac... function parseScreenplay (line 111) | function parseScreenplay(raw: string | null | undefined): unknown { function parseDescriptions (line 120) | function parseDescriptions(raw: string | null | undefined): string[] { constant PHASE_PROGRESS (line 132) | const PHASE_PROGRESS: Record(responseText: string, c... function executePhase1 (line 257) | async function executePhase1( function executePhase2 (line 391) | async function executePhase2( function executePhase2Acting (line 477) | async function executePhase2Acting( function executePhase3 (line 563) | async function executePhase3( FILE: src/lib/task/client.ts type TaskStatus (line 4) | type TaskStatus = 'queued' | 'processing' | 'completed' | 'failed' | 'ca... type TaskSnapshot (line 6) | type TaskSnapshot = { type TaskSnapshotResponse (line 14) | type TaskSnapshotResponse = { type WaitTaskOptions (line 19) | type WaitTaskOptions = { function sleep (line 25) | function sleep(ms: number) { function isAsyncTaskResponse (line 29) | function isAsyncTaskResponse(data: unknown): data is { async: true; task... function waitForTaskResult (line 35) | async function waitForTaskResult(taskId: string, options: WaitTaskOption... function resolveTaskResponse (line 77) | async function resolveTaskResponse>(response... FILE: src/lib/task/error-message.ts type TaskErrorSummary (line 5) | type TaskErrorSummary = { function asObject (line 11) | function asObject(value: unknown): Record | null { function asString (line 16) | function asString(value: unknown): string | null { function asBoolean (line 22) | function asBoolean(value: unknown): boolean { function looksCancelledMessage (line 26) | function looksCancelledMessage(value: string | null): boolean { function resolveTaskErrorSummary (line 38) | function resolveTaskErrorSummary(payload: unknown, fallbackMessage = 'Ta... function resolveTaskErrorMessage (line 104) | function resolveTaskErrorMessage(payload: unknown, fallbackMessage = 'Ta... FILE: src/lib/task/errors.ts class TaskTerminatedError (line 1) | class TaskTerminatedError extends Error { method constructor (line 4) | constructor(taskId: string, message = 'Task terminated') { FILE: src/lib/task/has-output.ts function isNonEmptyString (line 3) | function isNonEmptyString(value: unknown): value is string { function parseJsonStringArray (line 7) | function parseJsonStringArray(raw: string | null | undefined): string[] { function hasUrlList (line 18) | function hasUrlList(raw: string | null | undefined) { function parseCompositeTargetId (line 22) | function parseCompositeTargetId(targetId: string): string[] { function hasCharacterAppearanceOutput (line 26) | async function hasCharacterAppearanceOutput(params: { function hasLocationImageOutput (line 62) | async function hasLocationImageOutput(params: { function hasPanelImageOutput (line 94) | async function hasPanelImageOutput(panelId: string | null | undefined) { function hasPanelVideoOutput (line 107) | async function hasPanelVideoOutput(panelId: string | null | undefined) { function hasPanelLipSyncOutput (line 120) | async function hasPanelLipSyncOutput(panelId: string | null | undefined) { function hasVoiceLineAudioOutput (line 133) | async function hasVoiceLineAudioOutput(lineId: string | null | undefined) { function hasGlobalCharacterOutput (line 146) | async function hasGlobalCharacterOutput(params: { function hasGlobalLocationOutput (line 172) | async function hasGlobalLocationOutput(params: { function hasGlobalCharacterAppearanceOutput (line 191) | async function hasGlobalCharacterAppearanceOutput(params: { function hasGlobalLocationImageOutput (line 235) | async function hasGlobalLocationImageOutput(params: { FILE: src/lib/task/intent.ts type TaskIntent (line 3) | type TaskIntent = constant TASK_INTENTS (line 12) | const TASK_INTENTS: TaskIntent[] = [ constant TASK_INTENT_SET (line 22) | const TASK_INTENT_SET = new Set(TASK_INTENTS) constant TASK_INTENT_BY_TYPE (line 24) | const TASK_INTENT_BY_TYPE: Record = { function resolveTaskIntent (line 64) | function resolveTaskIntent(taskType: string | null | undefined): TaskInt... function isTaskIntent (line 72) | function isTaskIntent(value: unknown): value is TaskIntent { function coerceTaskIntent (line 76) | function coerceTaskIntent(value: unknown, fallbackTaskType?: string | nu... FILE: src/lib/task/presentation.ts type TaskPresentationPhase (line 3) | type TaskPresentationPhase = 'idle' | 'queued' | 'processing' | 'complet... type TaskPresentationResource (line 4) | type TaskPresentationResource = 'image' | 'video' | 'audio' | 'text' type TaskPresentationMode (line 5) | type TaskPresentationMode = 'none' | 'overlay' | 'placeholder' type TaskPresentationState (line 7) | type TaskPresentationState = { function isRunningPhase (line 18) | function isRunningPhase(phase: string | null | undefined): phase is 'que... function resolveTaskPresentationState (line 22) | function resolveTaskPresentationState(input: { FILE: src/lib/task/progress-message.ts constant TASK_TYPE_LABELS (line 3) | const TASK_TYPE_LABELS: Record = { constant STAGE_LABELS (line 43) | const STAGE_LABELS: Record = { function asString (line 75) | function asString(value: unknown): string | null { function getTaskTypeLabel (line 79) | function getTaskTypeLabel(taskType?: string | null) { function getTaskStageLabel (line 84) | function getTaskStageLabel(stage?: string | null) { function buildTaskProgressMessage (line 89) | function buildTaskProgressMessage(params: { FILE: src/lib/task/publisher.ts constant CHANNEL_PREFIX (line 15) | const CHANNEL_PREFIX = 'task-events:project:' constant STREAM_EPHEMERAL_ENABLED (line 16) | const STREAM_EPHEMERAL_ENABLED = process.env.LLM_STREAM_EPHEMERAL_ENABLE... constant TASK_TYPES_WITH_DIRECT_RUN_EVENTS (line 17) | const TASK_TYPES_WITH_DIRECT_RUN_EVENTS = new Set([ type TaskEventRow (line 22) | type TaskEventRow = { type TaskMeta (line 32) | type TaskMeta = { type TaskEventModel (line 40) | type TaskEventModel = { type TaskModel (line 45) | type TaskModel = { function createEphemeralId (line 52) | function createEphemeralId() { function isLifecycleEventType (line 56) | function isLifecycleEventType(value: string): value is TaskLifecycleEven... function normalizeLifecycleType (line 63) | function normalizeLifecycleType(type: TaskEventType): TaskLifecycleEvent... function isStreamEventType (line 68) | function isStreamEventType(type: string) { function shouldReplayLifecycleRow (line 72) | function shouldReplayLifecycleRow(type: string) { function shouldReplayTaskRow (line 76) | function shouldReplayTaskRow(type: string) { function normalizeLifecyclePayload (line 80) | function normalizeLifecyclePayload( function buildLifecycleEvent (line 96) | function buildLifecycleEvent(params: { function normalizeStreamPayload (line 124) | function normalizeStreamPayload( function buildStreamEvent (line 134) | function buildStreamEvent(params: { function mapRowsToReplayEvents (line 161) | async function mapRowsToReplayEvents(rows: TaskEventRow[]): Promise([ constant VIDEO_TYPES (line 55) | const VIDEO_TYPES = new Set([TASK_TYPE.VIDEO_PANEL, TASK_TYPE.... constant VOICE_TYPES (line 56) | const VOICE_TYPES = new Set([ constant SINGLE_ATTEMPT_TASK_TYPES (line 62) | const SINGLE_ATTEMPT_TASK_TYPES = new Set([ function getQueueTypeByTaskType (line 67) | function getQueueTypeByTaskType(type: TaskType): QueueType { function getQueueByType (line 74) | function getQueueByType(type: QueueType) { function addTaskJob (line 88) | async function addTaskJob(data: TaskJobData, opts?: JobsOptions) { function removeTaskJob (line 103) | async function removeTaskJob(taskId: string) { FILE: src/lib/task/reconcile.ts constant ACTIVE_STATUSES (line 25) | const ACTIVE_STATUSES = [TASK_STATUS.QUEUED, TASK_STATUS.PROCESSING] constant WATCHDOG_INTERVAL_MS (line 28) | const WATCHDOG_INTERVAL_MS = 60_000 constant PROCESSING_TIMEOUT_MS (line 31) | const PROCESSING_TIMEOUT_MS = 5 * 60_000 constant RECONCILE_BATCH_SIZE (line 34) | const RECONCILE_BATCH_SIZE = 200 constant TERMINAL_RECONCILE_GRACE_MS (line 37) | const TERMINAL_RECONCILE_GRACE_MS = 90_000 constant MISSING_RECONCILE_GRACE_MS (line 40) | const MISSING_RECONCILE_GRACE_MS = 30_000 type JobState (line 44) | type JobState = 'alive' | 'terminal' | 'missing' constant ALL_QUEUES (line 46) | const ALL_QUEUES = [imageQueue, videoQueue, voiceQueue, textQueue] function getJobState (line 54) | async function getJobState(taskId: string): Promise { function isJobAlive (line 77) | async function isJobAlive(taskId: string): Promise { function failOrphanedTask (line 87) | async function failOrphanedTask( function reconcileActiveTasks (line 155) | async function reconcileActiveTasks(): Promise { function startTaskWatchdog (line 219) | function startTaskWatchdog() { FILE: src/lib/task/resolve-locale.ts function toObject (line 5) | function toObject(value: unknown): Record { function normalizeCandidate (line 10) | function normalizeCandidate(raw: string): Locale | null { function readLocaleFromPayload (line 22) | function readLocaleFromPayload(body?: unknown): Locale | null { function readLocaleFromHeader (line 34) | function readLocaleFromHeader(request: NextRequest): Locale | null { function resolveTaskLocaleFromBody (line 42) | function resolveTaskLocaleFromBody(body?: unknown): Locale | null { function resolveTaskLocale (line 46) | function resolveTaskLocale(request: NextRequest, body?: unknown): Locale... function resolveRequiredTaskLocale (line 52) | function resolveRequiredTaskLocale(request: NextRequest, body?: unknown)... FILE: src/lib/task/service.ts constant ACTIVE_STATUSES (line 8) | const ACTIVE_STATUSES: TaskStatus[] = [TASK_STATUS.QUEUED, TASK_STATUS.P... function verifyJobAlive (line 15) | async function verifyJobAlive(taskId: string): Promise { function isPrismaKnownError (line 25) | function isPrismaKnownError(error: unknown): error is { code?: string } { function isActiveStatus (line 29) | function isActiveStatus(status: string) { function toObject (line 33) | function toObject(value: unknown): Record { function normalizeLocale (line 38) | function normalizeLocale(value: unknown): string | null { function hasTaskLocale (line 50) | function hasTaskLocale(payload: unknown): boolean { function toNullableJson (line 57) | function toNullableJson(value?: Prisma.InputJsonValue | Record | null { function asNonEmptyString (line 42) | function asNonEmptyString(value: unknown): string | null { function asBoolean (line 48) | function asBoolean(value: unknown): boolean | null { function toProgress (line 53) | function toProgress(value: unknown): number | null { function extractTaskStateFields (line 61) | function extractTaskStateFields(task: { function normalizeFailedError (line 77) | function normalizeFailedError(task: { function buildIdleState (line 89) | function buildIdleState(target: TaskTargetQuery): TaskTargetState { function resolveTargetState (line 106) | function resolveTargetState( constant QUERY_BATCH_SIZE (line 191) | const QUERY_BATCH_SIZE = 50 function queryTaskTargetStates (line 193) | async function queryTaskTargetStates(params: { FILE: src/lib/task/submitter.ts constant RUN_CENTRIC_TASK_TYPES (line 28) | const RUN_CENTRIC_TASK_TYPES = new Set([ function isRunCentricTaskType (line 33) | function isRunCentricTaskType(type: TaskType): boolean { function toObject (line 37) | function toObject(value: unknown): Record { function resolveRunIdFromPayload (line 42) | function resolveRunIdFromPayload(payload: unknown): string | null { function normalizeTaskPayload (line 51) | function normalizeTaskPayload(type: TaskType, payload?: Record | null { function withTaskUiPayload (line 6) | function withTaskUiPayload( FILE: src/lib/update-check.ts type ParsedSemver (line 1) | interface ParsedSemver { type GithubRelease (line 7) | interface GithubRelease { type UpdateCheckResult (line 14) | type UpdateCheckResult = constant SEMVER_PATTERN (line 25) | const SEMVER_PATTERN = /^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/i function isRecord (line 27) | function isRecord(value: unknown): value is Record { function normalizeSemverTag (line 31) | function normalizeSemverTag(value: string): string { function parseSemver (line 49) | function parseSemver(value: string): ParsedSemver { function compareSemver (line 60) | function compareSemver(left: string, right: string): number { function shouldPulseUpdate (line 70) | function shouldPulseUpdate(latestVersion: string, mutedVersion: string |... function parseGithubReleasePayload (line 74) | function parseGithubReleasePayload(payload: unknown): GithubRelease { type CheckGithubReleaseUpdateInput (line 108) | interface CheckGithubReleaseUpdateInput { function checkGithubReleaseUpdate (line 115) | async function checkGithubReleaseUpdate({ FILE: src/lib/user-api/llm-test-connection.ts type SupportedProvider (line 4) | type SupportedProvider = type TestConnectionPayload (line 15) | type TestConnectionPayload = { type LlmConnectionTestResult (line 23) | type LlmConnectionTestResult = { function normalizeProvider (line 30) | function normalizeProvider(payload: TestConnectionPayload): SupportedPro... function requireApiKey (line 53) | function requireApiKey(payload: TestConnectionPayload): string { function requireBaseUrl (line 61) | function requireBaseUrl(payload: TestConnectionPayload): string { function testGoogleAI (line 69) | async function testGoogleAI(apiKey: string): Promise { function testOpenAICompatibleConnection (line 80) | async function testOpenAICompatibleConnection(params: { function testBailianProbe (line 111) | async function testBailianProbe(apiKey: string): Promise<{ model?: strin... function testSiliconFlowProbe (line 125) | async function testSiliconFlowProbe(apiKey: string): Promise<{ model?: s... function testLlmConnection (line 160) | async function testLlmConnection(payload: TestConnectionPayload): Promis... FILE: src/lib/user-api/model-llm-protocol-probe.ts constant PROBE_TIMEOUT_MS (line 4) | const PROBE_TIMEOUT_MS = 15_000 type ProbeEndpoint (line 6) | type ProbeEndpoint = 'responses' | 'chat-completions' type ProbeOutcome (line 7) | type ProbeOutcome = type ModelLlmProtocolProbeTrace (line 17) | interface ModelLlmProtocolProbeTrace { type ModelLlmProtocolProbeInput (line 26) | interface ModelLlmProtocolProbeInput { type ModelLlmProtocolProbeSuccess (line 32) | interface ModelLlmProtocolProbeSuccess { type ModelLlmProtocolProbeFailure (line 39) | interface ModelLlmProtocolProbeFailure { type ModelLlmProtocolProbeResult (line 46) | type ModelLlmProtocolProbeResult = type EndpointProbeResult (line 50) | type EndpointProbeResult = { function isRecord (line 57) | function isRecord(value: unknown): value is Record { function trimString (line 61) | function trimString(value: unknown): string { function toEndpoint (line 65) | function toEndpoint(baseUrl: string, path: string): string { function toBodySnippet (line 69) | function toBodySnippet(bodyText: string): string | undefined { function inferKeywordUnsupported (line 75) | function inferKeywordUnsupported(bodyText: string): boolean { function isAbortLikeError (line 91) | function isAbortLikeError(error: unknown): boolean { function probeEndpoint (line 99) | async function probeEndpoint(params: { function toTrace (line 205) | function toTrace( function probeModelLlmProtocol (line 220) | async function probeModelLlmProtocol( FILE: src/lib/user-api/model-template/probe.ts type MediaTemplateProbeTrace (line 11) | interface MediaTemplateProbeTrace { type MediaTemplateProbeResult (line 20) | type MediaTemplateProbeResult = function toSnippet (line 36) | function toSnippet(raw: string): string | undefined { function probeMediaTemplate (line 42) | async function probeMediaTemplate(input: { FILE: src/lib/user-api/model-template/save.ts type StoredModelType (line 6) | type StoredModelType = 'llm' | 'image' | 'video' | 'audio' | 'lipsync' type StoredModelRecord (line 8) | type StoredModelRecord = Record & { type SaveModelTemplateInput (line 16) | interface SaveModelTemplateInput { function isRecord (line 26) | function isRecord(value: unknown): value is Record { function readTrimmedString (line 30) | function readTrimmedString(value: unknown): string { function isStoredModelType (line 34) | function isStoredModelType(value: string): value is StoredModelType { function parseStoredModels (line 38) | function parseStoredModels(raw: string | null | undefined): StoredModelR... function hasProvider (line 75) | function hasProvider(rawProviders: string | null | undefined, providerId... function saveModelTemplateConfiguration (line 87) | async function saveModelTemplateConfiguration(input: SaveModelTemplateIn... FILE: src/lib/user-api/model-template/schema.ts type ValidationCode (line 10) | type ValidationCode = type ModelTemplateValidationIssue (line 14) | interface ModelTemplateValidationIssue { function isRecord (line 20) | function isRecord(value: unknown): value is Record { function readTrimmedString (line 24) | function readTrimmedString(value: unknown): string { function isFiniteInteger (line 28) | function isFiniteInteger(value: unknown): value is number { function isTemplateHttpMethod (line 32) | function isTemplateHttpMethod(value: unknown): value is TemplateEndpoint... function isTemplateContentType (line 36) | function isTemplateContentType(value: unknown): value is NonNullable { function sanitizeBaseUrl (line 68) | function sanitizeBaseUrl(baseUrl: string): string { function buildCompatibleProbeUrls (line 72) | function buildCompatibleProbeUrls(baseUrl: string, paths: string[]): str... function toAttemptDetail (line 91) | function toAttemptDetail(attempts: ProbeAttempt[]): string { function parseModelCount (line 102) | function parseModelCount(payload: unknown): number | null { function parseCreditsMessage (line 113) | function parseCreditsMessage(payload: unknown): string | null { function runCompatibleGetProbe (line 143) | async function runCompatibleGetProbe(params: { function runCompatibleLlmFallback (line 256) | async function runCompatibleLlmFallback(baseUrl: string, apiKey: string,... function testCompatibleProvider (line 286) | async function testCompatibleProvider(baseUrl: string, apiKey: string, l... type GeminiInlineData (line 339) | interface GeminiInlineData { type GeminiPart (line 345) | interface GeminiPart { type GeminiGenerateContentResponse (line 351) | interface GeminiGenerateContentResponse { function testArkProvider (line 367) | async function testArkProvider(apiKey: string): Promise Promise type CharacterVoiceProfile (line 17) | type CharacterVoiceProfile = CharacterVoiceFields & { name: string } function normalizeBailianVoiceGenerationError (line 19) | function normalizeBailianVoiceGenerationError(errorMessage: string | nul... function getWavDurationFromBuffer (line 34) | function getWavDurationFromBuffer(buffer: Buffer): number { function generateVoiceWithIndexTTS2 (line 67) | async function generateVoiceWithIndexTTS2(params: { function matchCharacterBySpeaker (line 125) | function matchCharacterBySpeaker( function resolveReferenceAudioUrl (line 134) | async function resolveReferenceAudioUrl(referenceAudioUrl: string): Prom... function downloadAudioData (line 152) | async function downloadAudioData(audioUrl: string): Promise { function generateVoiceLine (line 160) | async function generateVoiceLine(params: { function estimateVoiceLineMaxSeconds (line 290) | function estimateVoiceLineMaxSeconds(content: string | null | undefined) { FILE: src/lib/voice/provider-voice-binding.ts type VoiceSource (line 1) | type VoiceSource = 'character' | 'speaker' type SupportedAudioProviderKey (line 3) | type SupportedAudioProviderKey = 'fal' | 'bailian' type CharacterVoiceFields (line 5) | interface CharacterVoiceFields { type RawSpeakerVoiceEntry (line 10) | interface RawSpeakerVoiceEntry { type FalSpeakerVoiceEntry (line 18) | type FalSpeakerVoiceEntry = { type BailianSpeakerVoiceEntry (line 24) | type BailianSpeakerVoiceEntry = { type SpeakerVoiceEntry (line 31) | type SpeakerVoiceEntry = FalSpeakerVoiceEntry | BailianSpeakerVoiceEntry type SpeakerVoiceMap (line 32) | type SpeakerVoiceMap = Record type FalVoiceGenerationBinding (line 34) | type FalVoiceGenerationBinding = { type BailianVoiceGenerationBinding (line 40) | type BailianVoiceGenerationBinding = { type VoiceGenerationBinding (line 46) | type VoiceGenerationBinding = FalVoiceGenerationBinding | BailianVoiceGe... type SpeakerVoicePatch (line 48) | type SpeakerVoicePatch = function readTrimmedString (line 61) | function readTrimmedString(input: unknown): string | null { function normalizeRawSpeakerVoiceEntry (line 67) | function normalizeRawSpeakerVoiceEntry(raw: unknown, speaker: string): S... function parseSpeakerVoiceMap (line 128) | function parseSpeakerVoiceMap(raw: string | null | undefined): SpeakerVo... function normalizeProviderKey (line 153) | function normalizeProviderKey(providerKey: string): SupportedAudioProvid... function toFalBinding (line 160) | function toFalBinding(source: VoiceSource, referenceAudioUrl: string | n... function toBailianBinding (line 169) | function toBailianBinding(source: VoiceSource, voiceId: string | null): ... function resolveVoiceBindingForProvider (line 178) | function resolveVoiceBindingForProvider(params: { function hasVoiceBindingForProvider (line 202) | function hasVoiceBindingForProvider(params: { function hasAnyVoiceBinding (line 210) | function hasAnyVoiceBinding(params: { function getSpeakerVoicePreviewUrl (line 225) | function getSpeakerVoicePreviewUrl(speakerVoice?: SpeakerVoiceEntry | nu... FILE: src/lib/word-count.ts function countWords (line 16) | function countWords(text: string): number { function countCharacters (line 42) | function countCharacters(text: string): number { function countCharactersNoSpaces (line 52) | function countCharactersNoSpaces(text: string): number { FILE: src/lib/workers/handlers/analyze-global-parse.ts constant CHUNK_SIZE (line 3) | const CHUNK_SIZE = 3000 constant INVALID_LOCATION_KEYWORDS (line 4) | const INVALID_LOCATION_KEYWORDS = ['幻想', '抽象', '无明确', '空间锚点', '未说明', '不明确'] type CharacterBrief (line 6) | type CharacterBrief = { type AnalyzeGlobalCharactersData (line 13) | type AnalyzeGlobalCharactersData = { type AnalyzeGlobalLocationsData (line 19) | type AnalyzeGlobalLocationsData = { function chunkContent (line 23) | function chunkContent(text: string, maxSize = CHUNK_SIZE): string[] { function parseJsonResponse (line 40) | function parseJsonResponse(responseText: string): Record { function readText (line 44) | function readText(value: unknown): string { function toStringArray (line 48) | function toStringArray(value: unknown): string[] { function parseAliases (line 53) | function parseAliases(raw: string | null): string[] { function buildCharactersLibInfo (line 63) | function buildCharactersLibInfo(characters: CharacterBrief[]): string { function isInvalidLocation (line 74) | function isInvalidLocation(name: string, summary: string): boolean { function safeParseCharactersResponse (line 78) | function safeParseCharactersResponse(responseText: string): AnalyzeGloba... function safeParseLocationsResponse (line 90) | function safeParseLocationsResponse(responseText: string): AnalyzeGlobal... FILE: src/lib/workers/handlers/analyze-global-persist.ts type AnalyzeGlobalStats (line 12) | type AnalyzeGlobalStats = { function createAnalyzeGlobalStats (line 22) | function createAnalyzeGlobalStats(totalChunks: number): AnalyzeGlobalSta... function persistAnalyzeGlobalChunk (line 34) | async function persistAnalyzeGlobalChunk(params: { FILE: src/lib/workers/handlers/analyze-global-prompt.ts type AnalyzeGlobalPromptTemplates (line 5) | type AnalyzeGlobalPromptTemplates = { function loadAnalyzeGlobalPromptTemplates (line 10) | function loadAnalyzeGlobalPromptTemplates(locale: Locale): AnalyzeGlobal... function buildAnalyzeGlobalPrompts (line 17) | function buildAnalyzeGlobalPrompts(params: { FILE: src/lib/workers/handlers/analyze-global.ts function handleAnalyzeGlobalTask (line 22) | async function handleAnalyzeGlobalTask(job: Job) { FILE: src/lib/workers/handlers/analyze-novel.ts function readText (line 14) | function readText(value: unknown): string { function toStringArray (line 18) | function toStringArray(value: unknown): string[] { function nameMatchesWithAlias (line 26) | function nameMatchesWithAlias(existingName: string, newName: string): bo... function parseJsonResponse (line 35) | function parseJsonResponse(responseText: string): Record { function handleAnalyzeNovelTask (line 39) | async function handleAnalyzeNovelTask(job: Job) { FILE: src/lib/workers/handlers/asset-hub-ai-design.ts function resolveUserInstruction (line 8) | function resolveUserInstruction(payload: Record) { function handleAssetHubAIDesignTask (line 13) | async function handleAssetHubAIDesignTask(job: Job) { FILE: src/lib/workers/handlers/asset-hub-ai-modify.ts function readRequiredString (line 13) | function readRequiredString(value: unknown, field: string): string { function parseJsonPrompt (line 22) | function parseJsonPrompt(responseText: string): string { function handleAssetHubAIModifyTask (line 31) | async function handleAssetHubAIModifyTask(job: Job) { FILE: src/lib/workers/handlers/asset-hub-image-task-handler.ts type GlobalCharacterAppearanceRecord (line 18) | interface GlobalCharacterAppearanceRecord { type GlobalCharacterRecord (line 26) | interface GlobalCharacterRecord { type GlobalLocationImageRecord (line 32) | interface GlobalLocationImageRecord { type GlobalLocationRecord (line 37) | interface GlobalLocationRecord { type AssetHubImageDb (line 43) | interface AssetHubImageDb { function handleAssetHubImageTask (line 58) | async function handleAssetHubImageTask(job: Job) { FILE: src/lib/workers/handlers/asset-hub-modify-task-handler.ts type GlobalCharacterAppearanceRecord (line 31) | interface GlobalCharacterAppearanceRecord { type GlobalCharacterRecord (line 44) | interface GlobalCharacterRecord { type GlobalLocationImageRecord (line 50) | interface GlobalLocationImageRecord { type GlobalLocationRecord (line 58) | interface GlobalLocationRecord { type AssetHubModifyDb (line 64) | interface AssetHubModifyDb { function readModifyInstruction (line 79) | function readModifyInstruction(value: unknown): string { function handleAssetHubModifyTask (line 83) | async function handleAssetHubModifyTask(job: Job) { FILE: src/lib/workers/handlers/character-image-task-handler.ts function resolvePayloadArtStyle (line 22) | function resolvePayloadArtStyle(payload: AnyObj): ArtStyleValue | undefi... type CharacterAppearanceRecord (line 31) | interface CharacterAppearanceRecord { type CharacterAppearanceWithCharacter (line 43) | interface CharacterAppearanceWithCharacter extends CharacterAppearanceRe... type CharacterRecord (line 49) | interface CharacterRecord { type PrimaryAppearanceRecord (line 55) | interface PrimaryAppearanceRecord { type CharacterImageDb (line 60) | interface CharacterImageDb { function handleCharacterImageTask (line 71) | async function handleCharacterImageTask(job: Job) { FILE: src/lib/workers/handlers/character-profile-helpers.ts type AnyObj (line 4) | type AnyObj = Record function readText (line 6) | function readText(value: unknown): string { function readRequiredString (line 10) | function readRequiredString(value: unknown, field: string): string { function parseVisualResponse (line 18) | function parseVisualResponse(responseText: string): AnyObj { function resolveProjectModel (line 22) | async function resolveProjectModel(projectId: string) { FILE: src/lib/workers/handlers/character-profile.ts type ConfirmProfileOptions (line 20) | type ConfirmProfileOptions = { function handleConfirmProfile (line 24) | async function handleConfirmProfile( function handleBatchConfirmProfile (line 174) | async function handleBatchConfirmProfile(job: Job) { function handleCharacterProfileTask (line 232) | async function handleCharacterProfileTask(job: Job) { FILE: src/lib/workers/handlers/clips-build.ts function parseClipArrayResponse (line 15) | function parseClipArrayResponse(responseText: string): Array) { FILE: src/lib/workers/handlers/episode-split.ts type EpisodeSplit (line 15) | type EpisodeSplit = { type SplitResponse (line 25) | type SplitResponse = { constant MAX_EPISODE_SPLIT_ATTEMPTS (line 29) | const MAX_EPISODE_SPLIT_ATTEMPTS = 2 constant EPISODE_SPLIT_BOUNDARY_SUFFIX (line 30) | const EPISODE_SPLIT_BOUNDARY_SUFFIX = ` function parseSplitResponse (line 37) | function parseSplitResponse(aiResponse: string): SplitResponse { function readBoundaryMarker (line 45) | function readBoundaryMarker(value: unknown): string | null { function toValidBoundaryIndex (line 51) | function toValidBoundaryIndex(value: unknown, textLength: number): numbe... function handleEpisodeSplitTask (line 58) | async function handleEpisodeSplitTask(job: Job) { FILE: src/lib/workers/handlers/image-task-handler-shared.ts type AnyObj (line 12) | type AnyObj = Record type CharacterAppearanceLike (line 14) | interface CharacterAppearanceLike { type CharacterLike (line 24) | interface CharacterLike { type LocationImageLike (line 29) | interface LocationImageLike { type LocationLike (line 36) | interface LocationLike { type NovelProjectData (line 41) | interface NovelProjectData { type PanelLike (line 47) | interface PanelLike { type PanelCharacterReference (line 53) | interface PanelCharacterReference { type NovelDataDb (line 58) | interface NovelDataDb { function parseJsonStringArray (line 64) | function parseJsonStringArray(value: unknown): string[] { function parseImageUrls (line 79) | function parseImageUrls(value: string | null | undefined, fieldName: str... function clampCount (line 83) | function clampCount(value: unknown, min: number, max: number, fallback: ... function pickFirstString (line 89) | function pickFirstString(...values: unknown[]) { function generateLabeledImageToCos (line 96) | async function generateLabeledImageToCos(params: { function resolveNovelData (line 122) | async function resolveNovelData(projectId: string) { function parsePanelCharacterReferences (line 139) | function parsePanelCharacterReferences(value: string | null | undefined)... function findCharacterByName (line 168) | function findCharacterByName(characters: T[]... function collectPanelReferenceImages (line 187) | async function collectPanelReferenceImages(projectData: NovelProjectData... FILE: src/lib/workers/handlers/image-task-handlers-core.ts type LocationImageRecord (line 34) | interface LocationImageRecord { function handleModifyAssetImageTask (line 45) | async function handleModifyAssetImageTask(job: Job) { FILE: src/lib/workers/handlers/llm-proxy.ts constant LLM_PROXY_ROUTES (line 7) | const LLM_PROXY_ROUTES: Record) => string... function getRouteByTaskType (line 9) | function getRouteByTaskType(type: TaskType, job: Job) { function toObject (line 17) | function toObject(value: unknown): Record { function toAbsoluteUrl (line 22) | function toAbsoluteUrl(pathname: string) { function toErrorMessage (line 26) | function toErrorMessage(status: number, body: unknown) { function handleLLMProxyTask (line 39) | async function handleLLMProxyTask(job: Job) { function isLLMProxyTaskType (line 116) | function isLLMProxyTaskType(type: TaskType) { FILE: src/lib/workers/handlers/llm-stream.ts type WorkerLLMStreamContext (line 10) | type WorkerLLMStreamContext = { type WorkerInternalLLMStreamCallbacks (line 15) | type WorkerInternalLLMStreamCallbacks = InternalLLMStreamCallbacks & { type WorkerLLMActiveController (line 19) | type WorkerLLMActiveController = { function createWorkerLLMStreamContext (line 24) | function createWorkerLLMStreamContext(job: Job, label = 'wo... function nextWorkerStreamSeq (line 31) | function nextWorkerStreamSeq(streamContext: WorkerLLMStreamContext, step... function createWorkerLLMStreamCallbacks (line 38) | function createWorkerLLMStreamCallbacks( FILE: src/lib/workers/handlers/location-image-task-handler.ts function resolvePayloadArtStyle (line 17) | function resolvePayloadArtStyle(payload: AnyObj): ArtStyleValue | undefi... type LocationImageRecord (line 26) | interface LocationImageRecord { type LocationWithImages (line 34) | interface LocationWithImages { type LocationImageTaskDb (line 40) | interface LocationImageTaskDb { function resolveRequestedLocationCount (line 51) | function resolveRequestedLocationCount(payload: AnyObj): number | null { function handleLocationImageTask (line 56) | async function handleLocationImageTask(job: Job) { FILE: src/lib/workers/handlers/modify-description-sync.ts type SyncedAssetType (line 11) | type SyncedAssetType = 'character' | 'location' function trimText (line 13) | function trimText(value: string | null | undefined): string { function buildImageContext (line 17) | function buildImageContext(type: SyncedAssetType, hasReferenceImages: bo... function parseModifiedDescription (line 25) | function parseModifiedDescription(responseText: string): string { function generateModifiedAssetDescription (line 36) | async function generateModifiedAssetDescription(params: { FILE: src/lib/workers/handlers/panel-image-task-handler.ts function parseJsonUnknown (line 25) | function parseJsonUnknown(raw: string | null | undefined): unknown | null { function parseDescriptionList (line 34) | function parseDescriptionList(raw: string | null | undefined): string[] { function pickAppearanceDescription (line 45) | function pickAppearanceDescription(appearance: { function buildPanelPromptContext (line 62) | function buildPanelPromptContext(params: { function buildPanelPrompt (line 134) | function buildPanelPrompt(params: { function handlePanelImageTask (line 153) | async function handlePanelImageTask(job: Job) { FILE: src/lib/workers/handlers/panel-variant-task-handler.ts type VariantPromptParams (line 25) | interface VariantPromptParams { function buildVariantPrompt (line 43) | function buildVariantPrompt(params: VariantPromptParams): string { function buildCharactersInfo (line 67) | function buildCharactersInfo( function buildCharacterAssetsDescription (line 82) | function buildCharacterAssetsDescription( function buildLocationAssetDescription (line 97) | function buildLocationAssetDescription(params: { function buildVariantReferenceImages (line 109) | function buildVariantReferenceImages(params: { type PanelVariantPayload (line 163) | interface PanelVariantPayload { function handlePanelVariantTask (line 173) | async function handlePanelVariantTask(job: Job) { FILE: src/lib/workers/handlers/reference-to-character-helpers.ts constant MAX_REFERENCE_IMAGES (line 1) | const MAX_REFERENCE_IMAGES = 5 function readString (line 3) | function readString(value: unknown): string { function readBoolean (line 7) | function readBoolean(value: unknown): boolean { function parseReferenceImages (line 15) | function parseReferenceImages(payload: Record): string[] { FILE: src/lib/workers/handlers/reference-to-character.ts constant POLL_MAX_ATTEMPTS (line 28) | const POLL_MAX_ATTEMPTS = 60 constant POLL_INTERVAL_MS (line 29) | const POLL_INTERVAL_MS = 2000 function generateLabeledImage (line 30) | async function generateLabeledImage(params: { function handleReferenceToCharacterTask (line 121) | async function handleReferenceToCharacterTask(job: Job) { FILE: src/lib/workers/handlers/resolve-analysis-model.ts type ResolveAnalysisModelInput (line 4) | type ResolveAnalysisModelInput = { function normalizeModelKey (line 10) | function normalizeModelKey(value: unknown): string | null { function resolveAnalysisModel (line 19) | async function resolveAnalysisModel(input: ResolveAnalysisModelInput): P... FILE: src/lib/workers/handlers/screenplay-convert-helpers.ts type AnyObj (line 3) | type AnyObj = Record function readText (line 5) | function readText(value: unknown): string { function parseScreenplayPayload (line 9) | function parseScreenplayPayload(responseText: string): AnyObj { FILE: src/lib/workers/handlers/screenplay-convert.ts constant MAX_SCREENPLAY_ATTEMPTS (line 21) | const MAX_SCREENPLAY_ATTEMPTS = 2 function handleScreenplayConvertTask (line 23) | async function handleScreenplayConvertTask(job: Job) { FILE: src/lib/workers/handlers/script-to-storyboard-atomic-retry.ts type StoryboardClipInput (line 24) | type StoryboardClipInput = { type StoryboardRetryPhase (line 32) | type StoryboardRetryPhase = 'phase1' | 'phase2_cinematography' | 'phase2... type StoryboardRetryTarget (line 34) | type StoryboardRetryTarget = { type ScriptToStoryboardAtomicRetryResult (line 40) | type ScriptToStoryboardAtomicRetryResult = { type StepRunner (line 50) | type StepRunner = ( constant MAX_STEP_ATTEMPTS (line 57) | const MAX_STEP_ATTEMPTS = 3 constant MAX_RETRY_DELAY_MS (line 58) | const MAX_RETRY_DELAY_MS = 10_000 function asObject (line 60) | function asObject(value: unknown): Record | null { function asObjectArray (line 65) | function asObjectArray(value: unknown): JsonRecord[] { function parseClipCharacters (line 70) | function parseClipCharacters(raw: string | null): ClipCharacterRef[] { function parseScreenplay (line 83) | function parseScreenplay(raw: string | null): unknown { function parseJsonArray (line 92) | function parseJsonArray(responseText: string, labe... function shouldRetryStepError (line 100) | function shouldRetryStepError(error: unknown, message: string, retryable... function computeRetryDelayMs (line 106) | function computeRetryDelayMs(attempt: number) { function wait (line 112) | function wait(ms: number) { function extractArtifactRows (line 116) | function extractArtifactRows(payload: unknown, key... function readArtifactRows (line 122) | async function readArtifactRows(params: { function getStepNumbers (line 139) | function getStepNumbers(params: { function buildStepMeta (line 167) | function buildStepMeta(params: { function runStepWithRetry (line 230) | async function runStepWithRetry(params: { function mergePanelsWithRules (line 263) | function mergePanelsWithRules(params: { function requireRows (line 292) | function requireRows(rows: T[], label: string) { function parseStoryboardRetryTarget (line 299) | function parseStoryboardRetryTarget(stepKey: string): StoryboardRetryTar... function runScriptToStoryboardAtomicRetry (line 314) | async function runScriptToStoryboardAtomicRetry(params: { FILE: src/lib/workers/handlers/script-to-storyboard-helpers.ts type JsonRecord (line 5) | type JsonRecord = Record type ClipPanelsResult (line 7) | type ClipPanelsResult = { type PersistedStoryboard (line 13) | type PersistedStoryboard = { function parseEffort (line 25) | function parseEffort(value: unknown): 'minimal' | 'low' | 'medium' | 'hi... function parseTemperature (line 30) | function parseTemperature(value: unknown): number { function toPositiveInt (line 35) | function toPositiveInt(value: unknown): number | null { function parsePanelCharacters (line 41) | function parsePanelCharacters(raw: string | null): string[] { function parseVoiceLinesJson (line 52) | function parseVoiceLinesJson(responseText: string): JsonRecord[] { function asJsonRecord (line 64) | function asJsonRecord(value: unknown): JsonRecord | null { function buildStoryboardJson (line 68) | function buildStoryboardJson(storyboards: PersistedStoryboard[]) { function persistStoryboardsAndPanels (line 93) | async function persistStoryboardsAndPanels(params: { FILE: src/lib/workers/handlers/script-to-storyboard.ts type AnyObj (line 42) | type AnyObj = Record constant MAX_VOICE_ANALYZE_ATTEMPTS (line 43) | const MAX_VOICE_ANALYZE_ATTEMPTS = 2 function buildWorkflowWorkerId (line 45) | function buildWorkflowWorkerId(job: Job, label: string) { function isReasoningEffort (line 49) | function isReasoningEffort(value: unknown): value is 'minimal' | 'low' |... function handleScriptToStoryboardTask (line 53) | async function handleScriptToStoryboardTask(job: Job) { FILE: src/lib/workers/handlers/shot-ai-persist.ts function normalizeModelKey (line 4) | function normalizeModelKey(value: unknown): string | null { function resolveAnalysisModel (line 13) | async function resolveAnalysisModel(projectId: string, userId: string): ... function requireProjectLocation (line 38) | async function requireProjectLocation(locationId: string, projectInterna... function persistLocationDescription (line 53) | async function persistLocationDescription(params: { FILE: src/lib/workers/handlers/shot-ai-prompt-appearance.ts function handleModifyAppearanceTask (line 11) | async function handleModifyAppearanceTask(job: Job, payload... FILE: src/lib/workers/handlers/shot-ai-prompt-location.ts function handleModifyLocationTask (line 15) | async function handleModifyLocationTask(job: Job, payload: ... FILE: src/lib/workers/handlers/shot-ai-prompt-runtime.ts function runShotPromptCompletion (line 7) | async function runShotPromptCompletion(params: { FILE: src/lib/workers/handlers/shot-ai-prompt-shot.ts function handleModifyShotPromptTask (line 15) | async function handleModifyShotPromptTask(job: Job, payload... FILE: src/lib/workers/handlers/shot-ai-prompt-utils.ts type AnyObj (line 3) | type AnyObj = Record function readText (line 5) | function readText(value: unknown): string { function readRequiredString (line 9) | function readRequiredString(value: unknown, field: string): string { function parseJsonObject (line 17) | function parseJsonObject(responseText: string): AnyObj { function parseShotPromptResponse (line 21) | function parseShotPromptResponse(responseText: string): { FILE: src/lib/workers/handlers/shot-ai-tasks.ts function handleShotAITask (line 11) | async function handleShotAITask(job: Job) { FILE: src/lib/workers/handlers/shot-ai-variants.ts function readText (line 15) | function readText(value: unknown): string { function readRequiredString (line 19) | function readRequiredString(value: unknown, field: string): string { function parseJsonArrayResponse (line 27) | function parseJsonArrayResponse(responseText: string): AnyObj[] { function parsePanelCharacters (line 31) | function parsePanelCharacters(value: string | null): string { function handleAnalyzeShotVariantsTask (line 52) | async function handleAnalyzeShotVariantsTask(job: Job, payl... FILE: src/lib/workers/handlers/story-to-script-helpers.ts type AnyObj (line 5) | type AnyObj = Record function parseEffort (line 7) | function parseEffort(value: unknown): 'minimal' | 'low' | 'medium' | 'hi... function parseTemperature (line 12) | function parseTemperature(value: unknown): number { function asString (line 17) | function asString(value: unknown): string { function toStringArray (line 21) | function toStringArray(value: unknown): string[] { function resolveClipRecordId (line 28) | function resolveClipRecordId(clipMap: Map, clipId: strin... function persistAnalyzedCharacters (line 32) | async function persistAnalyzedCharacters(params: { function persistAnalyzedLocations (line 82) | async function persistAnalyzedLocations(params: { function persistClips (line 138) | async function persistClips(params: { FILE: src/lib/workers/handlers/story-to-script.ts function isReasoningEffort (line 37) | function isReasoningEffort(value: unknown): value is 'minimal' | 'low' |... function resolveRetryClipId (line 41) | function resolveRetryClipId(retryStepKey: string): string | null { function buildWorkflowWorkerId (line 47) | function buildWorkflowWorkerId(job: Job, label: string) { function handleStoryToScriptTask (line 51) | async function handleStoryToScriptTask(job: Job) { FILE: src/lib/workers/handlers/voice-analyze-helpers.ts type StoryboardPanelLike (line 3) | interface StoryboardPanelLike { type StoryboardLike (line 10) | interface StoryboardLike { type VoiceLineMatchedPanel (line 15) | interface VoiceLineMatchedPanel { type VoiceLinePayload (line 20) | interface VoiceLinePayload { function parseVoiceLinePayload (line 28) | function parseVoiceLinePayload(value: unknown): VoiceLinePayload | null { function buildStoryboardJson (line 49) | function buildStoryboardJson(storyboards: StoryboardLike[]): string { function parseVoiceLinesJson (line 78) | function parseVoiceLinesJson(responseText: string): VoiceLinePayload[] { FILE: src/lib/workers/handlers/voice-analyze.ts constant MAX_VOICE_ANALYZE_ATTEMPTS (line 18) | const MAX_VOICE_ANALYZE_ATTEMPTS = 2 function handleVoiceAnalyzeTask (line 20) | async function handleVoiceAnalyzeTask(job: Job) { FILE: src/lib/workers/handlers/voice-design.ts function readRequiredString (line 13) | function readRequiredString(value: unknown, field: string): string { function readLanguage (line 20) | function readLanguage(value: unknown): 'zh' | 'en' { function handleVoiceDesignTask (line 24) | async function handleVoiceDesignTask(job: Job) { FILE: src/lib/workers/image.worker.ts type AnyObj (line 18) | type AnyObj = Record function processImageTask (line 20) | async function processImageTask(job: Job) { function createImageWorker (line 50) | function createImageWorker() { FILE: src/lib/workers/index.ts function shutdown (line 31) | async function shutdown(signal: string) { FILE: src/lib/workers/shared.ts function toObject (line 27) | function toObject(value: unknown): Record { function readStringField (line 32) | function readStringField(payload: Record, key: string):... function readPositiveIntField (line 39) | function readPositiveIntField(payload: Record, key: str... function extractFlowFields (line 53) | function extractFlowFields(jobData: TaskJobData): Record { function withFlowFields (line 71) | function withFlowFields(jobData: TaskJobData, payload?: Record([ constant DIRECT_RUN_EVENT_TASK_TYPES (line 103) | const DIRECT_RUN_EVENT_TASK_TYPES = new Set([ function shouldPersistRunStreamReplay (line 108) | function shouldPersistRunStreamReplay(taskType: string): boolean { function shouldDirectPublishRunEvents (line 112) | function shouldDirectPublishRunEvents(taskType: string): boolean { function publishMirroredRunEvents (line 116) | async function publishMirroredRunEvents(params: { function publishLifecycleEvent (line 148) | async function publishLifecycleEvent(params: { function publishStreamEvent (line 192) | async function publishStreamEvent(params: { function resolveQueueAttempts (line 228) | function resolveQueueAttempts(job: Job): number { function resolveAttemptsMade (line 234) | function resolveAttemptsMade(job: Job): number { function resolveNextBackoffMs (line 240) | function resolveNextBackoffMs(job: Job, failedAttempt: numb... function shouldRetryInQueue (line 261) | function shouldRetryInQueue(params: { function buildErrorCauseChain (line 281) | function buildErrorCauseChain(input: unknown): Array<{ name: string; mes... function resolveProjectNameForLogging (line 305) | async function resolveProjectNameForLogging(projectId: string): Promise<... function withTaskLifecycle (line 319) | async function withTaskLifecycle(job: Job, handler: (job: J... function reportTaskProgress (line 648) | async function reportTaskProgress(job: Job, progress: numbe... function reportTaskStreamChunk (line 701) | async function reportTaskStreamChunk( FILE: src/lib/workers/text.worker.ts type AnyObj (line 38) | type AnyObj = Record type JsonRecord (line 39) | type JsonRecord = Record type WorkerLLMStreamContext (line 41) | type WorkerLLMStreamContext = { type WorkerInternalLLMStreamCallbacks (line 46) | type WorkerInternalLLMStreamCallbacks = InternalLLMStreamCallbacks & { function createWorkerLLMStreamContext (line 50) | function createWorkerLLMStreamContext(job: Job, label = 'wo... function nextWorkerStreamSeq (line 57) | function nextWorkerStreamSeq(streamContext: WorkerLLMStreamContext, step... function createWorkerLLMStreamCallbacks (line 64) | function createWorkerLLMStreamCallbacks( function asJsonRecord (line 180) | function asJsonRecord(value: unknown): JsonRecord | null { function parseJsonObjectResponse (line 184) | function parseJsonObjectResponse(responseText: string): JsonRecord { function parsePanelCharacters (line 202) | function parsePanelCharacters(panel: { characters: string | null } | nul... function runStoryboardPhasesForClip (line 221) | async function runStoryboardPhasesForClip(params: { function handleRegenerateStoryboardTextTask (line 306) | async function handleRegenerateStoryboardTextTask(job: Job) { function handleInsertPanelTask (line 400) | async function handleInsertPanelTask(job: Job) { function processTextTask (line 606) | async function processTextTask(job: Job) { function createTextWorker (line 654) | function createTextWorker() { FILE: src/lib/workers/user-concurrency-gate.ts type ConcurrencyScope (line 1) | type ConcurrencyScope = 'image' | 'video' type GateState (line 3) | interface GateState { function getGateState (line 10) | function getGateState(key: string): GateState { function cleanupGateStateIfIdle (line 18) | function cleanupGateStateIfIdle(key: string) { function acquireSlot (line 26) | async function acquireSlot(key: string, limit: number): Promise { function releaseSlot (line 42) | function releaseSlot(key: string) { function withUserConcurrencyGate (line 56) | async function withUserConcurrencyGate(input: { FILE: src/lib/workers/utils.ts constant DEFAULT_POLL_TIMEOUT_MS (line 22) | const DEFAULT_POLL_TIMEOUT_MS = Number.parseInt(process.env.WORKER_EXTER... constant DEFAULT_POLL_INTERVAL_MS (line 23) | const DEFAULT_POLL_INTERVAL_MS = Number.parseInt(process.env.WORKER_EXTE... function getTaskExistingExternalId (line 28) | async function getTaskExistingExternalId(taskId: string): Promise, action: string) { function parseJsonArray (line 52) | function parseJsonArray(value: unknown): string[] { function sleep (line 64) | async function sleep(ms: number) { function assertTaskActive (line 68) | async function assertTaskActive(job: Job, stage: string) { function normalizeExternalId (line 74) | function normalizeExternalId(result: { function waitExternalResult (line 86) | async function waitExternalResult( function resolveImageSourceFromGeneration (line 163) | async function resolveImageSourceFromGeneration( function resolveImageSourcesFromGeneration (line 289) | async function resolveImageSourcesFromGeneration( function resolveVideoSourceFromGeneration (line 403) | async function resolveVideoSourceFromGeneration( function resolveLipSyncVideoSource (line 529) | async function resolveLipSyncVideoSource( function stripLabelBar (line 609) | async function stripLabelBar(imageSource: string): Promise { function withLabelBar (line 630) | async function withLabelBar(imageSource: string, labelText: string): Pro... function uploadImageSourceToCos (line 654) | async function uploadImageSourceToCos(source: string | Buffer, keyPrefix... function uploadVideoSourceToCos (line 663) | async function uploadVideoSourceToCos( function uploadAudioSourceToCos (line 678) | async function uploadAudioSourceToCos(source: string | Buffer, keyPrefix... function toSignedUrlIfCos (line 687) | function toSignedUrlIfCos(keyOrUrl: string | null | undefined, ttlSecond... function getProjectModels (line 694) | async function getProjectModels(projectId: string, userId: string) { function getUserModels (line 698) | async function getUserModels(userId: string) { FILE: src/lib/workers/video.worker.ts type AnyObj (line 22) | type AnyObj = Record type VideoOptionValue (line 23) | type VideoOptionValue = string | number | boolean type VideoOptionMap (line 24) | type VideoOptionMap = Record type VideoGenerationMode (line 25) | type VideoGenerationMode = 'normal' | 'firstlastframe' type PanelRecord (line 26) | type PanelRecord = NonNullable) { function generateVideoForPanel (line 80) | async function generateVideoForPanel( function handleVideoPanelTask (line 177) | async function handleVideoPanelTask(job: Job) { function handleLipSyncTask (line 217) | async function handleLipSyncTask(job: Job) { function processVideoTask (line 286) | async function processVideoTask(job: Job) { function createVideoWorker (line 299) | function createVideoWorker() { FILE: src/lib/workers/voice.worker.ts type AnyObj (line 9) | type AnyObj = Record function handleVoiceLineTask (line 11) | async function handleVoiceLineTask(job: Job) { function processVoiceTask (line 40) | async function processVoiceTask(job: Job) { function createVoiceWorker (line 54) | function createVoiceWorker() { FILE: src/lib/workflow-concurrency.ts constant DEFAULT_ANALYSIS_WORKFLOW_CONCURRENCY (line 1) | const DEFAULT_ANALYSIS_WORKFLOW_CONCURRENCY = 5 constant DEFAULT_IMAGE_WORKFLOW_CONCURRENCY (line 2) | const DEFAULT_IMAGE_WORKFLOW_CONCURRENCY = 5 constant DEFAULT_VIDEO_WORKFLOW_CONCURRENCY (line 3) | const DEFAULT_VIDEO_WORKFLOW_CONCURRENCY = 5 type WorkflowConcurrencyConfig (line 5) | interface WorkflowConcurrencyConfig { function toPositiveInt (line 11) | function toPositiveInt(value: unknown): number | null { function normalizeWorkflowConcurrencyValue (line 19) | function normalizeWorkflowConcurrencyValue(value: unknown, fallback: num... function normalizeWorkflowConcurrencyConfig (line 25) | function normalizeWorkflowConcurrencyConfig( FILE: src/lib/workflow-engine/dependencies.ts constant STORY_TO_SCRIPT_WORKFLOW (line 1) | const STORY_TO_SCRIPT_WORKFLOW = 'story_to_script_run' constant SCRIPT_TO_STORYBOARD_WORKFLOW (line 2) | const SCRIPT_TO_STORYBOARD_WORKFLOW = 'script_to_storyboard_run' function uniqueStepKeys (line 4) | function uniqueStepKeys(stepKeys: Iterable): string[] { function resolveStoryToScriptInvalidation (line 8) | function resolveStoryToScriptInvalidation(params: { type StoryboardPhase (line 32) | type StoryboardPhase = 'phase1' | 'phase2_cinematography' | 'phase2_acti... function parseStoryboardStepKey (line 34) | function parseStoryboardStepKey(stepKey: string): { clipId: string; phas... function resolveScriptToStoryboardInvalidation (line 43) | function resolveScriptToStoryboardInvalidation(params: { function resolveRetryInvalidationStepKeys (line 76) | function resolveRetryInvalidationStepKeys(params: { FILE: src/lib/workspace/model-setup.ts type PreferenceRecord (line 1) | interface PreferenceRecord { type UserPreferencePayload (line 5) | interface UserPreferencePayload { function isNonEmptyString (line 9) | function isNonEmptyString(value: unknown): value is string { function isObjectLike (line 13) | function isObjectLike(value: unknown): value is Record { function hasConfiguredAnalysisModel (line 17) | function hasConfiguredAnalysisModel(payload: unknown): boolean { function readConfiguredAnalysisModel (line 21) | function readConfiguredAnalysisModel(payload: unknown): string | null { function shouldGuideToModelSetup (line 31) | function shouldGuideToModelSetup(payload: unknown): boolean { FILE: src/pages/_document.tsx function Document (line 3) | function Document() { FILE: src/types/character-profile.ts type RoleLevel (line 6) | type RoleLevel = 'S' | 'A' | 'B' | 'C' | 'D' type CostumeTier (line 8) | type CostumeTier = 1 | 2 | 3 | 4 | 5 type CharacterProfileData (line 10) | interface CharacterProfileData { function parseProfileData (line 51) | function parseProfileData(profileDataJson: string | null): CharacterProf... function stringifyProfileData (line 63) | function stringifyProfileData(profileData: CharacterProfileData): string { function validateProfileData (line 70) | function validateProfileData(data: unknown): data is CharacterProfileData { FILE: src/types/next-auth.d.ts type Session (line 2) | interface Session { type User (line 10) | interface User { type JWT (line 18) | interface JWT { FILE: src/types/project.ts type ProjectMode (line 6) | type ProjectMode = 'novel-promotion' type BaseProject (line 11) | interface BaseProject { type MediaRef (line 25) | interface MediaRef { type CharacterAppearance (line 38) | interface CharacterAppearance { type Character (line 64) | interface Character { type LocationImage (line 84) | interface LocationImage { type Location (line 102) | interface Location { type AssetLibraryCharacter (line 110) | interface AssetLibraryCharacter { type AssetLibraryLocation (line 118) | interface AssetLibraryLocation { type WorkflowMode (line 131) | type WorkflowMode = 'srt' | 'agent' type NovelPromotionClip (line 134) | interface NovelPromotionClip { type NovelPromotionPanel (line 155) | interface NovelPromotionPanel { type NovelPromotionStoryboard (line 193) | interface NovelPromotionStoryboard { type NovelPromotionShot (line 208) | interface NovelPromotionShot { type NovelPromotionProject (line 232) | interface NovelPromotionProject { type Project (line 276) | interface Project extends BaseProject { FILE: src/types/storyboard-types.ts type StoryboardWithPanels (line 12) | interface StoryboardWithPanels extends NovelPromotionStoryboard { function hasLoadedPanels (line 19) | function hasLoadedPanels( function getPanels (line 29) | function getPanels(storyboard: NovelPromotionStoryboard): NovelPromotion... function getPanelCandidates (line 40) | function getPanelCandidates(panel: NovelPromotionPanel): string[] { FILE: tests/contracts/requirements-matrix.test.ts function fileExists (line 6) | function fileExists(repoPath: string) { FILE: tests/contracts/requirements-matrix.ts type RequirementPriority (line 1) | type RequirementPriority = 'P0' | 'P1' | 'P2' type RequirementCoverageEntry (line 3) | type RequirementCoverageEntry = { constant REQUIREMENTS_MATRIX (line 12) | const REQUIREMENTS_MATRIX: ReadonlyArray = [ FILE: tests/contracts/route-behavior-matrix.ts type RouteBehaviorMatrixEntry (line 3) | type RouteBehaviorMatrixEntry = { constant CONTRACT_TEST_BY_GROUP (line 10) | const CONTRACT_TEST_BY_GROUP: Record = R... constant ROUTE_BEHAVIOR_COUNT (line 50) | const ROUTE_BEHAVIOR_COUNT = ROUTE_BEHAVIOR_MATRIX.length FILE: tests/contracts/route-catalog.ts type RouteCategory (line 1) | type RouteCategory = type RouteContractGroup (line 11) | type RouteContractGroup = type RouteCatalogEntry (line 21) | type RouteCatalogEntry = { constant ROUTE_FILES (line 27) | const ROUTE_FILES = [ function resolveCategory (line 159) | function resolveCategory(routeFile: string): RouteCategory { function resolveContractGroup (line 176) | function resolveContractGroup(routeFile: string): RouteContractGroup { constant ROUTE_CATALOG (line 226) | const ROUTE_CATALOG: ReadonlyArray = ROUTE_FILES.map(... constant ROUTE_COUNT (line 232) | const ROUTE_COUNT = ROUTE_CATALOG.length FILE: tests/contracts/task-type-catalog.ts type TaskTestLayer (line 3) | type TaskTestLayer = 'unit-helper' | 'worker-unit' | 'api-contract' | 'c... type TaskTypeCoverageEntry (line 5) | type TaskTypeCoverageEntry = { constant TASK_TYPE_OWNER_MAP (line 11) | const TASK_TYPE_OWNER_MAP = { constant TASK_TYPE_CATALOG (line 51) | const TASK_TYPE_CATALOG: ReadonlyArray = (Object.... constant TASK_TYPE_COUNT (line 58) | const TASK_TYPE_COUNT = TASK_TYPE_CATALOG.length FILE: tests/contracts/tasktype-behavior-matrix.ts type TaskTypeBehaviorMatrixEntry (line 4) | type TaskTypeBehaviorMatrixEntry = { function resolveChainTestByTaskType (line 12) | function resolveChainTestByTaskType(taskType: TaskType): string { function resolveApiContractByTaskType (line 48) | function resolveApiContractByTaskType(taskType: TaskType): string { constant TASKTYPE_BEHAVIOR_MATRIX (line 97) | const TASKTYPE_BEHAVIOR_MATRIX: ReadonlyArray} ${string}` type RouteScenario (line 28) | type RouteScenario = { function routeKey (line 36) | function routeKey(method: string, path: string): RouteKey { function normalizeHeaders (line 40) | function normalizeHeaders(headers: IncomingMessage['headers']): Record = T | ((previous: T | undefined) => T | undefined) type StoredQueryEntry (line 10) | interface StoredQueryEntry { function isPrefixQueryKey (line 15) | function isPrefixQueryKey(target: QueryKey, prefix: QueryKey): boolean { function keyOf (line 20) | function keyOf(queryKey: QueryKey): string { class MockQueryClient (line 24) | class MockQueryClient { method cancelQueries (line 27) | async cancelQueries(filters: QueryFilter): Promise { method seedQuery (line 31) | seedQuery(queryKey: QueryKey, data: T | undefined) { method getQueryData (line 38) | getQueryData(queryKey: QueryKey): T | undefined { method setQueryData (line 43) | setQueryData(queryKey: QueryKey, updater: Updater) { method getQueriesData (line 51) | getQueriesData(filters: QueryFilter): Array<[QueryKey, T | undefine... method setQueriesData (line 63) | setQueriesData( FILE: tests/helpers/request.ts type HeaderMap (line 3) | type HeaderMap = Record type QueryMap (line 4) | type QueryMap = Record function toJsonBody (line 6) | function toJsonBody(body: unknown): string | undefined { function appendQuery (line 11) | function appendQuery(url: URL, query?: QueryMap) { function buildMockRequest (line 18) | function buildMockRequest(params: { function callRoute (line 43) | async function callRoute( FILE: tests/integration/api/contract/crud-routes.test.ts type RouteMethod (line 5) | type RouteMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE' type AuthState (line 7) | type AuthState = { type RouteContext (line 11) | type RouteContext = { function toModuleImportPath (line 82) | function toModuleImportPath(routeFile: string): string { function resolveParamValue (line 86) | function resolveParamValue(paramName: string): string { function toApiPath (line 101) | function toApiPath(routeFile: string): { path: string; params: Record = [ function invokePostRoute (line 464) | async function invokePostRoute(routeCase: DirectRouteCase): Promise { FILE: tests/integration/api/contract/llm-observe-routes.test.ts type AuthState (line 6) | type AuthState = { type LLMRouteCase (line 11) | type LLMRouteCase = { type RouteContext (line 20) | type RouteContext = { function toApiPath (line 101) | function toApiPath(routeFile: string): string { function toModuleImportPath (line 108) | function toModuleImportPath(routeFile: string): string { constant ROUTE_CASES (line 112) | const ROUTE_CASES: ReadonlyArray = [ function invokePostRoute (line 309) | async function invokePostRoute(routeCase: LLMRouteCase): Promise type HeaderMap (line 5) | type HeaderMap = Record type RouteHandler (line 7) | type RouteHandler = ( function callRoute (line 12) | async function callRoute( FILE: tests/integration/api/specific/panel-variant-route.test.ts type PanelRecord (line 4) | type PanelRecord = { type StoryboardRecord (line 18) | type StoryboardRecord = { function buildPanel (line 157) | function buildPanel(id: string, storyboardId: string, panelIndex: number... function invokeRoute (line 173) | async function invokeRoute(body: Record): Promise> { FILE: tests/integration/billing/service.integration.test.ts function expectBillableInfo (line 11) | function expectBillableInfo(info: TaskBillingInfo | null | undefined): E... FILE: tests/integration/billing/worker-lifecycle.integration.test.ts function createPreparedVoiceTask (line 18) | async function createPreparedVoiceTask() { FILE: tests/integration/chain/image.chain.test.ts type AddCall (line 5) | type AddCall = { method constructor (line 47) | constructor(queueName: string) { method add (line 51) | async add(jobName: string, data: TaskJobData, options: Record { FILE: tests/integration/chain/text.chain.test.ts type AddCall (line 5) | type AddCall = { method constructor (line 52) | constructor(queueName: string) { method add (line 56) | async add(jobName: string, data: TaskJobData, options: Record { FILE: tests/integration/chain/video.chain.test.ts type AddCall (line 5) | type AddCall = { method constructor (line 60) | constructor(queueName: string) { method add (line 64) | async add(jobName: string, data: TaskJobData, options: Record) => Promise... function toJob (line 104) | function toJob(data: TaskJobData): Job { FILE: tests/integration/chain/voice.chain.test.ts type AddCall (line 5) | type AddCall = { method constructor (line 36) | constructor(queueName: string) { method add (line 40) | async add(jobName: string, data: TaskJobData, options: Record) => Promise... function toJob (line 70) | function toJob(data: TaskJobData): Job { FILE: tests/integration/provider/openai-compat-provider.contract.test.ts function encode (line 14) | function encode(value: string): string { FILE: tests/setup/env.ts function parseEnvLine (line 6) | function parseEnvLine(line: string) { function loadTestEnv (line 22) | function loadTestEnv() { FILE: tests/setup/global-setup.ts function parseDbUrl (line 8) | function parseDbUrl(dbUrl: string) { function waitForMysql (line 19) | async function waitForMysql(maxAttempts = 180) { function waitForRedis (line 43) | async function waitForRedis(maxAttempts = 60) { function globalSetup (line 70) | async function globalSetup() { FILE: tests/setup/global-teardown.ts function runGlobalTeardown (line 4) | async function runGlobalTeardown() { FILE: tests/system/generate-video.system.test.ts type PollState (line 10) | type PollState = { FILE: tests/system/helpers/seed.ts function nextSuffix (line 10) | function nextSuffix() { function seedMinimalDomainState (line 14) | async function seedMinimalDomainState() { FILE: tests/system/helpers/tasks.ts type WaitTaskOptions (line 5) | type WaitTaskOptions = { constant TERMINAL_STATUSES (line 10) | const TERMINAL_STATUSES = new Set([ function sleep (line 17) | function sleep(ms: number): Promise { function waitForTaskTerminalState (line 21) | async function waitForTaskTerminalState(taskId: string, options: WaitTas... function listTaskEventTypes (line 39) | async function listTaskEventTypes(taskId: string): Promise, term... FILE: tests/system/helpers/workers.ts type SystemWorkerScope (line 4) | type SystemWorkerScope = 'image' | 'video' | 'voice' | 'text' type SystemWorkers (line 6) | type SystemWorkers = Partial { FILE: tests/system/text-workflow.system.test.ts type FakeAiResult (line 11) | type FakeAiResult = { type FakeVoiceLineRow (line 16) | type FakeVoiceLineRow = { function seedScriptToStoryboardState (line 152) | async function seedScriptToStoryboardState() { FILE: tests/unit/api-config/assistant-chat-modal-content.test.ts function createAssistantMessage (line 5) | function createAssistantMessage(parts: Array>): ... FILE: tests/unit/api-config/provider-card-tutorial-modal.test.ts function createState (line 27) | function createState(tutorial: ProviderTutorial): UseProviderCardStateRe... function ProviderCardShellWithBody (line 110) | function ProviderCardShellWithBody( FILE: tests/unit/assistant-platform/skills-api-config-template.test.ts function buildRuntimeContext (line 14) | function buildRuntimeContext(): AssistantRuntimeContext { FILE: tests/unit/async-poll-ocompat.test.ts function encode (line 19) | function encode(value: string): string { FILE: tests/unit/billing/ledger-extra.test.ts function buildTxStub (line 18) | function buildTxStub() { FILE: tests/unit/billing/service.test.ts function buildTaskInfo (line 217) | function buildTaskInfo(overrides: Partial boolean, timeoutMs = 10... FILE: tests/unit/helpers/route-task-helpers.test.ts function buildRequest (line 10) | function buildRequest(path: string, headers?: Record) { FILE: tests/unit/helpers/run-request-executor.run-events.test.ts function jsonResponse (line 5) | function jsonResponse(payload: unknown, status = 200) { FILE: tests/unit/helpers/run-stream-state-machine.test.ts function applySequence (line 5) | function applySequence(events: RunStreamEvent[]) { FILE: tests/unit/helpers/run-stream-view.test.ts function buildStep (line 5) | function buildStep(overrides: Partial = {}): RunStepState { function buildRunState (line 33) | function buildRunState(overrides: Partial = {}): RunState { FILE: tests/unit/lipsync-bailian.test.ts constant POLICY_ENDPOINT (line 45) | const POLICY_ENDPOINT = 'https://dashscope.aliyuncs.com/api/v1/uploads' constant SUBMIT_ENDPOINT (line 46) | const SUBMIT_ENDPOINT = 'https://dashscope.aliyuncs.com/api/v1/services/... constant UPLOAD_HOST (line 47) | const UPLOAD_HOST = 'https://upload.example.com' function buildJsonResponse (line 49) | function buildJsonResponse(payload: unknown, status = 200): Response { function buildBinaryResponse (line 60) | function buildBinaryResponse(contentType: string, data: string): Response { FILE: tests/unit/lipsync-preprocess.test.ts function buildWav (line 34) | function buildWav(durationMs: number, sampleRate = 16000): Buffer { function buildMp4WithDuration (line 57) | function buildMp4WithDuration(durationMs: number): Buffer { function readWavDurationMs (line 89) | function readWavDurationMs(buffer: Buffer): number { function buildBinaryResponse (line 95) | function buildBinaryResponse(buffer: Buffer, contentType: string): Respo... FILE: tests/unit/llm/chat-completion-openai-compatible-protocol.test.ts type MockRuntimeModel (line 3) | type MockRuntimeModel = { FILE: tests/unit/llm/chat-stream-openai-compatible-protocol.test.ts type MockRuntimeModel (line 3) | type MockRuntimeModel = { FILE: tests/unit/llm/completion-parts-think-tag.test.ts function buildCompletion (line 5) | function buildCompletion(content: string): OpenAI.Chat.Completions.ChatC... FILE: tests/unit/model-capabilities/video-effective.test.ts constant GOOGLE_VEO_TIERS (line 9) | const GOOGLE_VEO_TIERS: VideoPricingTier[] = [ FILE: tests/unit/novel-promotion/character-voice-mutations.test.ts type UpdateVoiceMutation (line 31) | interface UpdateVoiceMutation { FILE: tests/unit/novel-promotion/video-panel-card-body.test.ts function createRuntime (line 19) | function createRuntime(overrides: Partial = {}): Vide... FILE: tests/unit/novel-promotion/voice-runtime-sync.test.ts function buildVoiceLine (line 28) | function buildVoiceLine(overrides: Partial): VoiceLine { FILE: tests/unit/optimistic/asset-hub-mutations.test.ts type SelectCharacterMutation (line 50) | interface SelectCharacterMutation { type DeleteLocationMutation (line 59) | interface DeleteLocationMutation { function buildGlobalCharacter (line 64) | function buildGlobalCharacter(selectedIndex: number | null): GlobalChara... function buildGlobalLocation (line 87) | function buildGlobalLocation(id: string): GlobalLocation { FILE: tests/unit/optimistic/panel-save-coordinator.test.ts function buildSnapshot (line 8) | function buildSnapshot(description: string): PanelEditData { FILE: tests/unit/optimistic/project-asset-mutations.test.ts type SelectProjectCharacterMutation (line 41) | interface SelectProjectCharacterMutation { type DeleteProjectCharacterMutation (line 50) | interface DeleteProjectCharacterMutation { function buildCharacter (line 55) | function buildCharacter(selectedIndex: number | null): Character { function buildAssets (line 76) | function buildAssets(selectedIndex: number | null): ProjectAssetsData { function buildProject (line 83) | function buildProject(selectedIndex: number | null): Project { FILE: tests/unit/optimistic/sse-invalidation.test.ts type InvalidateArg (line 5) | type InvalidateArg = { queryKey?: readonly unknown[]; exact?: boolean } type EffectCleanup (line 7) | type EffectCleanup = (() => void) | void | null class FakeEventSource (line 21) | class FakeEventSource { method constructor (line 31) | constructor(url: string) { method addEventListener (line 36) | addEventListener(type: string, handler: EventListener) { method removeEventListener (line 42) | removeEventListener(type: string, handler: EventListener) { method emit (line 48) | emit(type: string, payload: unknown) { method close (line 58) | close() { function hasInvalidation (line 81) | function hasInvalidation(predicate: (arg: InvalidateArg) => boolean) { FILE: tests/unit/optimistic/task-target-overlay.test.ts function getOverlay (line 11) | function getOverlay( FILE: tests/unit/providers/bailian-tts.test.ts function buildWavBuffer (line 4) | function buildWavBuffer(durationMs: number): Buffer { FILE: tests/unit/run-runtime/task-bridge.test.ts function buildEvent (line 6) | function buildEvent(input: Partial): SSEEvent { FILE: tests/unit/storage/bootstrap.test.ts type MockCommand (line 4) | type MockCommand = { FILE: tests/unit/task/async-poll-openai.test.ts constant PROVIDER_TOKEN (line 15) | const PROVIDER_TOKEN = Buffer.from('openai-compatible:oa-1', 'utf8').toS... FILE: tests/unit/task/publisher.direct-run-events.test.ts type TaskEventRow (line 3) | type TaskEventRow = { FILE: tests/unit/task/publisher.replay.test.ts type TaskEventRow (line 3) | type TaskEventRow = { type TaskMeta (line 13) | type TaskMeta = { FILE: tests/unit/user-api/model-template-save.test.ts function readSavedModelsFromUpsert (line 16) | function readSavedModelsFromUpsert(): Array> { FILE: tests/unit/worker/analyze-global.test.ts function buildJob (line 81) | function buildJob(): Job { FILE: tests/unit/worker/analyze-novel.test.ts function buildJob (line 58) | function buildJob(): Job { FILE: tests/unit/worker/asset-hub-ai-design.test.ts function buildJob (line 29) | function buildJob(type: TaskJobData['type'], payload: Record): Job { function countOccurrences (line 64) | function countOccurrences(input: string, target: string) { FILE: tests/unit/worker/character-image-task-handler.test.ts function buildJob (line 50) | function buildJob(payload: Record, targetId = 'appearan... FILE: tests/unit/worker/character-profile.test.ts function buildJob (line 73) | function buildJob(type: TaskJobData['type'], payload: Record, episodeId: string | ... FILE: tests/unit/worker/episode-split.test.ts function buildJob (line 82) | function buildJob(content: string): Job { FILE: tests/unit/worker/image-task-handlers-core.test.ts function buildJob (line 62) | function buildJob(payload: Record): Job { function readUpdateData (line 77) | function readUpdateData(arg: unknown): Record { FILE: tests/unit/worker/image-worker.test.ts type WorkerProcessor (line 5) | type WorkerProcessor = (job: Job) => Promise method constructor (line 42) | constructor(_name: string) {} method add (line 44) | async add() { method getJob (line 48) | async getJob() { method constructor (line 53) | constructor(_name: string, processor: WorkerProcessor) { function buildJob (line 65) | function buildJob(type: TaskJobData['type']): Job { FILE: tests/unit/worker/llm-proxy.test.ts function buildJob (line 6) | function buildJob(type: TaskJobData['type']): Job { FILE: tests/unit/worker/llm-stream.test.ts function buildJob (line 25) | function buildJob(): Job { FILE: tests/unit/worker/location-image-task-handler.test.ts function buildJob (line 41) | function buildJob(payload: Record, targetId = 'location... FILE: tests/unit/worker/modify-image-reference-description.test.ts function buildJob (line 85) | function buildJob(type: TaskType, payload: Record): Job... function getUpdateData (line 100) | function getUpdateData(callArg: unknown): Record { FILE: tests/unit/worker/panel-image-task-handler.test.ts function buildJob (line 64) | function buildJob(payload: Record, targetId = 'panel-1'... FILE: tests/unit/worker/panel-variant-task-handler.test.ts function buildJob (line 66) | function buildJob(payload: Record): Job { FILE: tests/unit/worker/reference-to-character.test.ts function buildJob (line 120) | function buildJob(payload: Record, type: TaskType): Job... function readGenerateCall (line 135) | function readGenerateCall(index: number) { FILE: tests/unit/worker/screenplay-convert.test.ts function buildJob (line 59) | function buildJob(payload: Record, episodeId: string | ... FILE: tests/unit/worker/script-to-storyboard.test.ts type VoiceLineInput (line 5) | type VoiceLineInput = { method constructor (line 126) | constructor(message: string, rawText: string) { function buildJob (line 180) | function buildJob(payload: Record, episodeId: string | ... function baseVoiceRows (line 208) | function baseVoiceRows(): VoiceLineInput[] { FILE: tests/unit/worker/shared.direct-run-events.test.ts function buildJob (line 93) | function buildJob(taskType: TaskJobData['type']): Job { FILE: tests/unit/worker/shot-ai-prompt-appearance.test.ts function buildJob (line 32) | function buildJob(payload: Record): Job { FILE: tests/unit/worker/shot-ai-prompt-location.test.ts function buildJob (line 34) | function buildJob(payload: Record): Job { FILE: tests/unit/worker/shot-ai-prompt-shot.test.ts function buildJob (line 32) | function buildJob(payload: Record): Job { FILE: tests/unit/worker/shot-ai-tasks.test.ts function buildJob (line 24) | function buildJob(type: TaskJobData['type'], payload: Record): Job { FILE: tests/unit/worker/story-to-script.test.ts function buildJob (line 89) | function buildJob(payload: Record, episodeId: string | ... FILE: tests/unit/worker/user-concurrency-gate.test.ts function deferred (line 4) | function deferred() { FILE: tests/unit/worker/video-generation-resume.test.ts function buildJob (line 44) | function buildJob(): Job { FILE: tests/unit/worker/video-worker.test.ts type WorkerProcessor (line 5) | type WorkerProcessor = (job: Job) => Promise type PanelRow (line 7) | type PanelRow = { method constructor (line 60) | constructor(name: string) { method add (line 64) | async add() { method getJob (line 68) | async getJob() { method constructor (line 73) | constructor(name: string, processor: WorkerProcessor) { function buildPanel (line 102) | function buildPanel(overrides?: Partial): PanelRow { function buildJob (line 115) | function buildJob(params: { FILE: tests/unit/worker/voice-analyze.test.ts function buildJob (line 63) | function buildJob(payload: Record, episodeId: string | ... FILE: tests/unit/worker/voice-design.test.ts function buildJob (line 31) | function buildJob(type: TaskJobData['type'], payload: Record) => Promise method constructor (line 20) | constructor(_name: string) {} method add (line 22) | async add() { method getJob (line 26) | async getJob() { method constructor (line 31) | constructor(_name: string, processor: WorkerProcessor) { function buildJob (line 54) | function buildJob(params: { FILE: tests/unit/workspace/rebuild-confirm.test.ts function createDeferred (line 37) | function createDeferred() {