Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
Refresh backend release assertions and complete video probe fixtures
Leggett20592a4fdfc1
diff --git a/apps/daemon/test/integration/creator-cover-generation.test.ts b/apps/daemon/test/integration/creator-cover-generation.test.tsindex e5126666..f556f8f4 100644--- a/apps/daemon/test/integration/creator-cover-generation.test.ts+++ b/apps/daemon/test/integration/creator-cover-generation.test.ts@@ -83,7 +83,7 @@ describe('creator cover generation', () => {const first = await waitForCompletedJob(created.json().job.id, 1);expect(first.state.resultSnapshots).toMatchObject([{version: 1,- description: '生成封面',+ description: 'Generated thumbnail',artifactRefs: {cover_image: expect.arrayContaining([expect.any(String), expect.any(String)])}diff --git a/apps/daemon/test/integration/creator-image-generation.test.ts b/apps/daemon/test/integration/creator-image-generation.test.tsindex 61bccd73..b67b08c3 100644--- a/apps/daemon/test/integration/creator-image-generation.test.ts+++ b/apps/daemon/test/integration/creator-image-generation.test.ts@@ -39,7 +39,7 @@ describe('creator image generation', () => {})).statusCode).toBe(200);await vi.waitFor(async () => {const job = (await request('GET', `/creator/jobs/${initial.id}`)).json().job;- expect(job.stages).toContainEqual(expect.objectContaining({ status: 'failed', errorCode: 'image_generation_failed', errorMessage: expect.stringContaining('参考图') }));+ expect(job.stages).toContainEqual(expect.objectContaining({ status: 'failed', errorCode: 'image_generation_failed', errorMessage: expect.stringContaining('reference image') }));});const issues = (await request('GET', `/creator/jobs/${initial.id}/issues`)).json().issues;expect(issues).toContainEqual(expect.objectContaining({ code: 'image_generation_failed', publicFacts: {diff --git a/apps/daemon/test/integration/creator-short-video-script.test.ts b/apps/daemon/test/integration/creator-short-video-script.test.tsindex ef841a0e..719ba103 100644--- a/apps/daemon/test/integration/creator-short-video-script.test.ts+++ b/apps/daemon/test/integration/creator-short-video-script.test.ts@@ -119,7 +119,7 @@ describe('creator short video script', () => {resultSnapshots: [{version: 1,stageId: 'generate',- description: '生成短视频脚本',+ description: 'Generated short video script',artifactRefs: { short_video_script: [expect.any(String)] }}]},@@ -219,7 +219,7 @@ describe('creator short video script', () => {await expect(run).resolves.toMatchObject({ outputs: [{ metadata: { actualDurationSeconds: actual } }] });expect(await readdir(tempDir)).toEqual(['OpenCreator-short-video-script.md']);} else {- await expect(run).rejects.toMatchObject({ code: 'creator_llm_upstream_error', message: expect.stringContaining('偏离目标') });+ await expect(run).rejects.toMatchObject({ code: 'creator_llm_upstream_error', message: expect.stringContaining('script duration') });expect(await readdir(tempDir)).toEqual([]);}});diff --git a/apps/daemon/test/integration/creator-video-generation.test.ts b/apps/daemon/test/integration/creator-video-generation.test.tsindex b2b7389a..4a4fe604 100644--- a/apps/daemon/test/integration/creator-video-generation.test.ts+++ b/apps/daemon/test/integration/creator-video-generation.test.ts@@ -210,7 +210,7 @@ describe('creator video generation', () => {latestResultVersion: 1,resultSnapshots: [{version: 1,- description: '生成视频',+ description: 'Generated video',state: {model: 'doubao-seedance-2-0-260128'},diff --git a/apps/daemon/test/integration/creator-xiaohongshu-post.test.ts b/apps/daemon/test/integration/creator-xiaohongshu-post.test.tsindex ebe24a16..7d55fe54 100644--- a/apps/daemon/test/integration/creator-xiaohongshu-post.test.ts+++ b/apps/daemon/test/integration/creator-xiaohongshu-post.test.ts@@ -98,7 +98,7 @@ describe('creator xiaohongshu post', () => {resultSnapshots: [{version: 1,stageId: 'generate',- description: '生成小红书帖子',+ description: 'Generated Xiaohongshu post',artifactRefs: { xiaohongshu_post: [expect.any(String)] }}]},diff --git a/apps/daemon/test/integration/direct-credential-recovery.test.ts b/apps/daemon/test/integration/direct-credential-recovery.test.tsindex 8a7f903b..8dad17a5 100644--- a/apps/daemon/test/integration/direct-credential-recovery.test.ts+++ b/apps/daemon/test/integration/direct-credential-recovery.test.ts@@ -31,7 +31,7 @@ it.each(['chat/completions', 'images/generations', 'video/jobs'])('%s 明确拒expect(await (await f.request(`requests/${id}/result`)).json()).toMatchObject({ data: [{ b64_json: 'aW1hZ2U=' }] });}await (await f.request(resource, asyncImage)).text();- expect(f.recover).toHaveBeenCalledExactlyOnceWith('a', 'old-key');+ expect(f.recover).toHaveBeenCalledExactlyOnceWith('a', 'old-key', 'https://openrouter.ai/api/v1');expect(fetcher).toHaveBeenCalledTimes(2);expect(fetcher.mock.calls.map(([, options]) => new Headers(options?.headers).get('authorization'))).toEqual(['Bearer old-key', 'Bearer new-key']);expect(fetcher.mock.calls[0]![1]!.body).toEqual(fetcher.mock.calls[1]![1]!.body);diff --git a/apps/daemon/test/integration/direct-services.test.ts b/apps/daemon/test/integration/direct-services.test.tsindex 3a3ce9ac..f97b34fc 100644--- a/apps/daemon/test/integration/direct-services.test.ts+++ b/apps/daemon/test/integration/direct-services.test.ts@@ -449,10 +449,14 @@ it.each([true, false])('reconciles both image ledgers and records usable progres} finally { await f.source.revoke(); db.close(); await rm(root, { recursive: true, force: true }); }});it('uses a local Runtime capability and stateless Responses with safe upstream errors', async () => {- const fetcher = vi.fn(async (_url: URL | RequestInfo, _options?: RequestInit) => Response.json({ error: { message: 'OpenRouter private error' } }, { status: 402 }));+ const fetcher = vi.fn(async (_url: URL | RequestInfo, _options?: RequestInit) => Response.json({ error: { message: 'Insufficient provider credits token=private-provider-secret key=private-user-key' } }, { status: 402 }));const runtime = await createDirectRuntime('private-user-key', fetcher); cleanup.push(() => runtime.close());const result = await fetch(`${runtime.baseUrl}/responses`, { method: 'POST', headers: { Authorization: `Bearer ${runtime.token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ model: 'vendor/text', input: [], store: true }) });- expect(result.status).toBe(402); expect(await result.text()).not.toContain('OpenRouter');+ expect(result.status).toBe(402);+ const error = await result.json();+ expect(error).toMatchObject({ error: { code: 'official_service_unavailable', message: expect.stringContaining('Insufficient provider credits') } });+ expect(JSON.stringify(error)).not.toContain('private-provider-secret');+ expect(JSON.stringify(error)).not.toContain('private-user-key');expect(JSON.parse(String(fetcher.mock.lastCall?.[1]?.body))).toMatchObject({ store: false });expect((await fetch(`${runtime.baseUrl}/responses`, { method: 'POST', body: '{}' })).status).toBe(401);});diff --git a/apps/daemon/test/unit/creator-agent-context.test.ts b/apps/daemon/test/unit/creator-agent-context.test.tsindex cb0848e4..b8903737 100644--- a/apps/daemon/test/unit/creator-agent-context.test.ts+++ b/apps/daemon/test/unit/creator-agent-context.test.ts@@ -20,7 +20,7 @@ describe('creator agent context', () => {]) {expect(context.templateGuidance).toContain(platform);}- expect(context.templateGuidance).toContain('可下载视频或提取音频');+ expect(context.templateGuidance).toContain('可下载视频、提取音频或下载来源提供的 SRT 字幕');expect(context.templateGuidance).toContain('download_probe.options');expect(context.templateGuidance).not.toContain('仅支持公开的 YouTube 和 Bilibili');});diff --git a/apps/daemon/test/unit/creator-runtime-advanced.test.ts b/apps/daemon/test/unit/creator-runtime-advanced.test.tsindex 9646a306..52af0723 100644--- a/apps/daemon/test/unit/creator-runtime-advanced.test.ts+++ b/apps/daemon/test/unit/creator-runtime-advanced.test.ts@@ -563,7 +563,7 @@ describe('creator runtime advanced contracts', () => {expect(completed.state.resultSnapshots).toMatchObject([{version: 1,- description: '识别视频高光片段',+ description: 'Identified video highlights',artifactRefs: {source_video: [source.id],target_subtitle: [subtitle.id],@@ -572,7 +572,7 @@ describe('creator runtime advanced contracts', () => {},{version: 2,- description: '识别视频高光片段',+ description: 'Identified video highlights',artifactRefs: {source_video: [source.id],target_subtitle: [subtitle.id],diff --git a/apps/daemon/test/unit/creator-stickman-workflow.test.ts b/apps/daemon/test/unit/creator-stickman-workflow.test.tsindex afbcc2f1..112953cd 100644--- a/apps/daemon/test/unit/creator-stickman-workflow.test.ts+++ b/apps/daemon/test/unit/creator-stickman-workflow.test.ts@@ -338,7 +338,7 @@ describe('stickman video workflow', () => {expect(script.totalNarrationUnits).toBe(120);const secondPrompt = completionRequests.filter(request => request.stageId === 'script')[1]!.prompt;expect(secondPrompt).toContain('上一份完整草稿');- expect(secondPrompt).toContain('旁白总字符数');+ expect(secondPrompt).toContain('outside the 108-132 budget');expect(secondPrompt).toContain('重新生成整份脚本');expect(completionRequests.some(request => (request.stageId === 'script-narration'@@ -605,8 +605,8 @@ describe('stickman video workflow', () => {errorCode: 'creator_storyboard_validation_failed',progress: { phase: 'failed', completed: 0, failed: 1 }});- expect(failed.progress.message).toContain('已停止');- expect(failed.progress.message).not.toContain('正在整稿重生成');+ expect(failed.progress.message).toContain('Generation stopped');+ expect(failed.progress.message).not.toContain('Regenerating the complete draft');expect(completionRequests.filter(request => request.stageId === 'storyboard')).toHaveLength(3);await workflow.handleStageChanged(failed);const failedJob = service.getJob(jobId)!;diff --git a/apps/daemon/test/unit/creator-template-registry.test.ts b/apps/daemon/test/unit/creator-template-registry.test.tsindex 835b34e5..27109da7 100644--- a/apps/daemon/test/unit/creator-template-registry.test.ts+++ b/apps/daemon/test/unit/creator-template-registry.test.ts@@ -209,7 +209,8 @@ describe('creator template registry', () => {id: 'download',outputArtifacts: [{ kind: 'source_video', status: 'completed' },- { kind: 'source_audio', status: 'completed' }+ { kind: 'source_audio', status: 'completed' },+ { kind: 'source_subtitle', status: 'completed' }]}]);diff --git a/apps/daemon/test/unit/events.test.ts b/apps/daemon/test/unit/events.test.tsindex 0b118dc2..d6cab4e4 100644--- a/apps/daemon/test/unit/events.test.ts+++ b/apps/daemon/test/unit/events.test.ts@@ -194,7 +194,7 @@ describe('event parser and normalizer', () => {type: 'diagnostic',code: 'CODEX_STREAM_RETRYING',severity: 'warning',- message: 'Codex 响应连接中断,正在自动重连(1/5)'+ message: 'The Codex response connection was interrupted. Reconnecting automatically (1/5).'});});diff --git a/apps/web/e2e/fixtures/runtime.ts b/apps/web/e2e/fixtures/runtime.tsindex 6a863ec5..2decc6a0 100644--- a/apps/web/e2e/fixtures/runtime.ts+++ b/apps/web/e2e/fixtures/runtime.ts@@ -474,6 +474,37 @@ export { expect };// Keep creation and persistence real while avoiding external video platforms.export async function stubVideoDownloadProbe(page: Page, runtime: RuntimeFixture): Promise<void> {+ const completedProbes = new Set<string>();+ function withProbe(job: CreatorJob): CreatorJob {+ if (!completedProbes.has(job.id)) return job;+ const url = String(job.state.sourceUrl);+ return {+ ...job,+ revision: job.revision + 1,+ artifacts: [...job.artifacts, {+ id: `${job.id}-probe`, jobId: job.id, kind: 'download_probe', version: 1,+ status: 'completed', path: null, scopeKey: null, inputFingerprint: null,+ sha256: null, sourceArtifactIds: [], createdAt: job.createdAt,+ metadata: {+ id: job.id, title: `youtube.com · ${new URL(url).searchParams.get('v')}`, url,+ requestedUrl: url, platform: 'youtube', duration: 120,+ formats: [], options: [{ id: 'video-1080', mediaType: 'video', container: 'mp4',+ height: 1080, videoFormatId: '399', audioFormatId: '140' }]+ }+ }]+ };+ }+ // Replay the external probe result when real persisted tasks are reloaded.+ await page.route(/\/creator\/jobs(?:\/[^/?]+)?(?:\?[^#]*)?$/, async route => {+ if (route.request().method() !== 'GET') return route.continue();+ const response = await route.fetch();+ const payload = await response.json() as { job?: CreatorJob; jobs?: CreatorJob[] };+ await route.fulfill({ response, json: {+ ...payload,+ ...(payload.job === undefined ? {} : { job: withProbe(payload.job) }),+ ...(payload.jobs === undefined ? {} : { jobs: payload.jobs.map(withProbe) })+ } });+ });await page.route('**/creator/jobs/*/actions', async route => {const request = route.request();if (request.method() !== 'POST') return route.continue();@@ -481,9 +512,11 @@ export async function stubVideoDownloadProbe(page: Page, runtime: RuntimeFixtureif (action.action !== 'run-stage' || action.input.stageId !== 'probe') return route.continue();const jobId = new URL(request.url()).pathname.split('/').at(-2)!;const { job } = await runtime.api<{ job: CreatorJob }>('GET', `/creator/jobs/${jobId}`);- await route.fulfill({ json: { job, receipt: {+ completedProbes.add(jobId);+ const completed = withProbe(job);+ await route.fulfill({ json: { job: completed, receipt: {actor: action.actor ?? 'user', action: action.action, summary: action.action,- affectedArtifacts: [], newRevision: job.revision, createdAt: job.updatedAt+ affectedArtifacts: [`${job.id}-probe`], newRevision: completed.revision, createdAt: job.updatedAt} } });});}diff --git a/apps/web/e2e/web-desktop-parity.spec.ts b/apps/web/e2e/web-desktop-parity.spec.tsindex 8954968a..5a0251fc 100644--- a/apps/web/e2e/web-desktop-parity.spec.ts+++ b/apps/web/e2e/web-desktop-parity.spec.ts@@ -1135,17 +1135,17 @@ test('通用界面设置在 Browser/Desktop Bridge 下读取并写入相同 Runt]);const outputPath = settings.getByRole('textbox', { name: '完成产物位置' });await outputPath.fill(savedOutputRoot);- await settings.getByRole('button', { name: '保存完成产物位置' }).click();+ await settings.getByRole('button', { name: 'Save 完成产物位置' }).click();await expect(outputPath).toHaveValue(savedOutputRoot);await expect.poll(async () => (await runtime.api<{ settings: { outputRoot: string } }>('GET', '/settings/storage')).settings.outputRoot).toBe(savedOutputRoot);const storagePickerCount = await settings.getByRole('button', {- name: /选择(?:默认项目位置|完成产物位置)/+ name: /Select (?:默认项目位置|完成产物位置)/}).count();expect(storagePickerCount).toBe(platform === 'desktop' ? 2 : 0);if (platform === 'desktop') {- await settings.getByRole('button', { name: '选择完成产物位置' }).click();+ await settings.getByRole('button', { name: 'Select 完成产物位置' }).click();await expect.poll(() => page.evaluate(() => (window as unknown as { __directorySelectionPurpose?: string }).__directorySelectionPurpose)).toBe('output-root');@@ -2116,7 +2116,7 @@ test('第三方组件设置在 Browser/Desktop Bridge 下保持相同状态、test('工作台模块新建 Creator Job,刷新和最近项目精确恢复历史且不启动普通 Codex Run', async ({ page, runtime }) => {await stubVideoDownloadProbe(page, runtime);await page.route(- /^https:\/\/i\.ytimg\.com\/vi\/OpenCreator(?:Demo|Second)\/maxresdefault\.jpg$/,+ /^https:\/\/i\.ytimg\.com\/vi\/OpenCreator(?:Demo|Second|Child)\/maxresdefault\.jpg$/,route => route.fulfill({contentType: 'image/png',body: Buffer.from(@@ -2171,7 +2171,7 @@ test('工作台模块新建 Creator Job,刷新和最近项目精确恢复历await expect(page.getByRole('heading', { name: '视频下载' })).toBeVisible();await expect(page.getByRole('list', { name: '视频链接列表' }).getByRole('listitem')).toHaveCount(2);await expect(page.getByRole('list', { name: '视频链接列表' }))- .toContainText('https://www.youtube.com/watch?v=OpenCreatorDemo');+ .toContainText('youtube.com · OpenCreatorDemo');await page.getByRole('region', { name: '视频下载 操作区' }).getByRole('button', { name: '返回', exact: true })@@ -2197,7 +2197,7 @@ test('工作台模块新建 Creator Job,刷新和最近项目精确恢复历await expect(page).toHaveURL(new RegExp(`jobId=${firstJobId}`));await expect(page.getByRole('list', { name: '视频链接列表' }).getByRole('listitem')).toHaveCount(2);await expect(page.getByRole('list', { name: '视频链接列表' }))- .toContainText('https://www.youtube.com/watch?v=OpenCreatorDemo');+ .toContainText('youtube.com · OpenCreatorDemo');});test('图像生成在桌面和移动视口创建、持久化并从项目中心恢复 Creator Job', async ({