Skip to content

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.

fix(release): restore runtime and interface verification

Leggett1b17b470ac3f
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ddaa1b0d..2c81483d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -111,6 +111,12 @@ jobs:
- run: pnpm krillinai:test
- name: Prepare Electron for desktop tests
run: pnpm --filter @opencreator/desktop exec node -e "require('electron')"
+ - uses: actions/cache@v4
+ with:
+ path: apps/desktop/.cache/codex-runtime
+ key: codex-runtime-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('apps/desktop/scripts/prepare-codex-runtime.mjs', 'apps/desktop/scripts/codex-runtime-contract.mjs', 'resources/codex-runtime/**') }}
+ - name: Prepare pinned Runtime for gateway integration tests
+ run: node apps/desktop/scripts/prepare-codex-runtime.mjs
- run: pnpm test
- run: pnpm release:verify-scheduled-task-upgrade
diff --git a/apps/daemon/test/integration/creator-api.test.ts b/apps/daemon/test/integration/creator-api.test.ts
index 69350e15..7901100a 100644
--- a/apps/daemon/test/integration/creator-api.test.ts
+++ b/apps/daemon/test/integration/creator-api.test.ts
@@ -301,11 +301,18 @@ describe('creator api', () => {
});
});
- it('allows signed-out gateway users to browse presets without granting model access', async () => {
- await setupServer({ gatewayMode: true });
+ it('restores signed-out gateway users to manual services while keeping presets available', async () => {
+ await setupServer({ gatewayMode: true, llmConfigured: false });
const account = await request('GET', '/gateway/account');
expect(account.json()).toMatchObject({
- source: 'gateway', authState: 'signed_out', activationState: 'inactive'
+ source: 'manual', authState: 'signed_out', activationState: 'inactive'
+ });
+ expect(await createGatewayConfigStore(tempDir).readConfiguration())
+ .toMatchObject({ source: 'manual', bindingVersion: null });
+ const activation = await request('POST', '/gateway/auth/activate');
+ expect(activation.statusCode).toBe(401);
+ expect(activation.json()).toMatchObject({
+ error: { code: 'GATEWAY_AUTH_REQUIRED', details: { gatewayCode: 'auth_required' } }
});
const catalog = await request('GET', '/creator/presets?locale=zh-CN');
@@ -327,17 +334,16 @@ describe('creator api', () => {
expect(cover.rawPayload.byteLength).toBeGreaterThan(1_000);
const modelConfig = await request('GET', '/creator-services/config');
- expect(modelConfig.statusCode).toBe(401);
+ expect(modelConfig.statusCode).toBe(200);
const created = await request('POST', '/creator/jobs', {
projectId: 'project_signed_out',
preset: { module: imagePreset.module, id: imagePreset.id, version: imagePreset.version },
locale: 'zh-CN',
creationKey: 'signed-out-preset-creation'
});
- expect(created.statusCode).toBe(401);
- expect(created.json().code).toBe('auth_required');
+ expect(created.statusCode).toBe(201);
expect((await request('GET', '/creator/jobs?projectId=project_signed_out')).json().jobs)
- .toHaveLength(0);
+ .toHaveLength(1);
});
it('lists localized presets and creates a real preset job', async () => {
diff --git a/apps/daemon/test/integration/gateway-runtime-protocol.test.ts b/apps/daemon/test/integration/gateway-runtime-protocol.test.ts
index c324be92..b73e730a 100644
--- a/apps/daemon/test/integration/gateway-runtime-protocol.test.ts
+++ b/apps/daemon/test/integration/gateway-runtime-protocol.test.ts
@@ -8,8 +8,8 @@ import { createCodexAppServerHost, type CodexAppServerHost } from '../../src/cod
import { createGatewayRuntimeBindings } from '../../src/gateway/runtime-bindings.js';
import { createDirectRuntime } from '../../src/gateway/direct-runtime.js';
-const codexBin = resolve('../../apps/desktop/.pack/codex-runtime/bin/codex');
-const manifest = JSON.parse(readFileSync(resolve('../../resources/codex-runtime/darwin-arm64/manifest.json'), 'utf8'));
+const manifest = JSON.parse(readFileSync(resolve(`../../resources/codex-runtime/${process.platform}-${process.arch}/manifest.json`), 'utf8'));
+const codexBin = resolve('../../apps/desktop/.pack/codex-runtime', manifest.binary.relativePath);
const cleanup: Array<() => Promise<void> | void> = [];
afterEach(async () => {
for (const close of cleanup.splice(0).reverse()) await close();
diff --git a/apps/web/e2e/web-desktop-parity.spec.ts b/apps/web/e2e/web-desktop-parity.spec.ts
index a4be1318..a5c4b96a 100644
--- a/apps/web/e2e/web-desktop-parity.spec.ts
+++ b/apps/web/e2e/web-desktop-parity.spec.ts
@@ -463,9 +463,9 @@ test('所有设置 Tab 在 Browser/Desktop 下使用相同的页面留白', asyn
await runtime.openApp(page);
await page.getByRole('button', { name: '设置', exact: true }).click();
const nav = page.locator('.settings-nav > button');
- await expect(nav).toHaveCount(9);
+ await expect(nav).toHaveCount(10);
const tabs = [];
- for (let index = 0; index < 9; index += 1) {
+ for (let index = 0; index < 10; index += 1) {
await nav.nth(index).click();
const section = page.locator('.settings-content > .settings-section');
await expect(section).toBeVisible();
@@ -1067,7 +1067,7 @@ test('通用界面设置在 Browser/Desktop Bridge 下读取并写入相同 Runt
const lightButton = settings.getByRole('button', { name: '浅色' });
const permission = settings.getByRole('combobox', { name: '默认权限' });
const language = settings.getByRole('combobox', { name: '显示语言' });
- const storagePaths = settings.locator('.settings-directory-input');
+ const storagePaths = settings.locator('#settings-default-project-root, #settings-output-root');
await expect(lightButton).toHaveAttribute('aria-pressed', 'true');
await expect(permission).toHaveValue('workspace-write');
await expect(language).toHaveValue('zh-CN');
@@ -2182,6 +2182,7 @@ test('封面生成在桌面和移动视口保持可操作并从项目中心恢
await runtime.openApp(page);
await page.goto(`${runtime.origin}/#/workbench`);
await expect(page.getByRole('heading', { name: '工作台' })).toBeVisible();
+ await page.getByRole('tab', { name: '全部', exact: true }).click();
await page.getByRole('button', { name: /^封面生成/ }).click();
const workspace = page.getByRole('region', { name: '封面生成 操作区' });
diff --git a/apps/web/src/features/settings/CreatorServicesSettingsView.tsx b/apps/web/src/features/settings/CreatorServicesSettingsView.tsx
index 2657f9f5..b768eeb6 100644
--- a/apps/web/src/features/settings/CreatorServicesSettingsView.tsx
+++ b/apps/web/src/features/settings/CreatorServicesSettingsView.tsx
@@ -63,6 +63,7 @@ export function CreatorServicesSettingsView(props: {
service: CreatorServicesSettingsService | null;
modelService?: ModelSettingsService | null;
initialSection?: CreatorServicesSection;
+ modeControls?: ReactNode;
}) {
const l = useLocalizedCopy();
const confirm = useConfirmDialog();
@@ -357,6 +358,8 @@ export function CreatorServicesSettingsView(props: {
</span>
</header>
+ {props.modeControls}
+
<div className="creator-services-tabs" role="tablist" aria-label={l('AI 服务分类', 'AI service categories')}>
{sections.map(section => {
const Icon = section.icon;
diff --git a/apps/web/src/features/settings/OpenCreatorSettingsView.tsx b/apps/web/src/features/settings/OpenCreatorSettingsView.tsx
index 140f0799..98b3fb2b 100644
--- a/apps/web/src/features/settings/OpenCreatorSettingsView.tsx
+++ b/apps/web/src/features/settings/OpenCreatorSettingsView.tsx
@@ -145,6 +145,14 @@ export function OpenCreatorSettingsView(props: OpenCreatorSettingsViewProps) {
return () => { canceled = true; };
}, [props.gatewayAccountService, props.gatewayAccountState]);
+ const modeControls = props.gatewayAccountService && gatewayState ? (
+ <div className={`gateway-account ai-services-mode${officialMode ? ' ai-services-mode--official' : ''}`}>
+ <span className="ai-services-mode__label">{l('使用模式', 'Usage mode')}</span>
+ <strong>{officialMode ? l('官方服务', 'Official service') : l('自定义配置', 'Custom configuration')}</strong>
+ {!officialMode && props.onOpenPersonalCenter ? <button type="button" onClick={props.onOpenPersonalCenter}><UserRound size={15} aria-hidden="true"/>{l('登录 OpenCreator', 'Sign in to OpenCreator')}</button> : null}
+ </div>
+ ) : null;
+
return (
<div className="settings-page">
<aside className="settings-sidebar" aria-label={t('settings.navigation')}>
@@ -200,12 +208,7 @@ export function OpenCreatorSettingsView(props: OpenCreatorSettingsViewProps) {
) : null}
{activeTab === 'ai-services' ? (
<>
- {props.gatewayAccountService && gatewayState ? <div className={`gateway-account ai-services-mode${officialMode ? ' ai-services-mode--official' : ''}`}>
- <span className="ai-services-mode__label">{l('使用模式', 'Usage mode')}</span>
- <strong>{officialMode ? l('官方服务', 'Official service') : l('自定义配置', 'Custom configuration')}</strong>
- {!officialMode && props.onOpenPersonalCenter ? <button type="button" onClick={props.onOpenPersonalCenter}><UserRound size={15} aria-hidden="true"/>{l('登录 OpenCreator', 'Sign in to OpenCreator')}</button> : null}
- </div> : null}
- {officialMode && gatewayState ? <section className="gateway-account official-services-settings" aria-labelledby="official-services-title">
+ {officialMode && gatewayState ? <section className="settings-section gateway-account official-services-settings" aria-labelledby="official-services-title">
<header className="official-services-heading">
<div>
<h1 id="official-services-title">{l('AI 服务', 'AI services')}</h1>
@@ -216,17 +219,9 @@ export function OpenCreatorSettingsView(props: OpenCreatorSettingsViewProps) {
</div>
{props.onOpenPersonalCenter ? <button type="button" onClick={props.onOpenPersonalCenter}><UserRound size={15} aria-hidden="true"/>{l('账户', 'Account')}</button> : null}
</header>
+ {modeControls}
{props.gatewayAccountService ? <OfficialServicesSettingsView state={gatewayState} service={props.gatewayAccountService} onChange={next => { setGatewayState(next); props.onGatewayStateChange?.(next); }} /> : null}
</section> : null}
- {props.agentSetupNeeded && !officialMode && props.onOpenAgentSetup !== undefined ? (
- <div className="settings-inline-warning" role="status">
- {l('Agent 尚未配置,无法发送任务。', 'Agent is not configured; tasks cannot be sent.')}
- {' '}
- <button className="settings-secondary-button" type="button" onClick={props.onOpenAgentSetup}>
- {l('配置 Agent', 'Set up Agent')}
- </button>
- </div>
- ) : null}
<Suspense fallback={
<p role="status">{l('正在加载 AI 服务设置…', 'Loading AI service settings…')}</p>
}>
@@ -235,6 +230,18 @@ export function OpenCreatorSettingsView(props: OpenCreatorSettingsViewProps) {
service={props.creatorServicesService ?? null}
modelService={props.codexRuntimeService ?? null}
initialSection={props.initialSection}
+ modeControls={<>
+ {modeControls}
+ {props.agentSetupNeeded && props.onOpenAgentSetup !== undefined ? (
+ <div className="settings-inline-warning" role="status">
+ {l('Agent 尚未配置,无法发送任务。', 'Agent is not configured; tasks cannot be sent.')}
+ {' '}
+ <button className="settings-secondary-button" type="button" onClick={props.onOpenAgentSetup}>
+ {l('配置 Agent', 'Set up Agent')}
+ </button>
+ </div>
+ ) : null}
+ </>}
/> : null}
</Suspense>
</>
diff --git a/apps/web/src/features/settings/official-services-settings.css b/apps/web/src/features/settings/official-services-settings.css
index dbb6f935..837d4008 100644
--- a/apps/web/src/features/settings/official-services-settings.css
+++ b/apps/web/src/features/settings/official-services-settings.css
@@ -4,7 +4,7 @@
align-items: center;
flex-wrap: wrap;
gap: 12px 24px;
- margin: 0 auto 24px;
+ margin: 0 auto;
padding: 0 0 20px;
border-bottom: 1px solid var(--border);
}
@@ -73,8 +73,11 @@
}
.official-services-heading h1 {
+ min-height: var(--page-title-row-height);
+ display: flex;
+ align-items: center;
margin: 0;
- font-size: 24px;
+ font-size: 26px;
font-weight: 600;
line-height: 1.3;
}
diff --git a/resources/codex-runtime/linux-x64/manifest.json b/resources/codex-runtime/linux-x64/manifest.json
new file mode 100644
index 00000000..ad0a3fc9
--- /dev/null
+++ b/resources/codex-runtime/linux-x64/manifest.json
@@ -0,0 +1,58 @@
+{
+ "schemaVersion": 1,
+ "runtime": "codex",
+ "version": "0.149.0",
+ "tag": "rust-v0.149.0",
+ "commit": "758ef40f50c1a458425c7cfbf1eb12cbc07af0b0",
+ "platform": "linux",
+ "arch": "x64",
+ "officialAsset": "https://github.com/openai/codex/releases/download/rust-v0.149.0/codex-package-x86_64-unknown-linux-musl.tar.gz",
+ "sourcePackage": "npm:@openai/[email protected]",
+ "sourceArchive": {
+ "url": "https://registry.npmjs.org/@openai/codex/-/codex-0.149.0-linux-x64.tgz",
+ "integrity": "sha512-uZXaN9JPxu0/jjnqqJeTd4kRYPnjVZK3MiVndfG1mHhEaoDKL7ScWHfPqvAEOjwsSDEmQSlMfUkmvYp/CHciYw==",
+ "vendorPath": "package/vendor/x86_64-unknown-linux-musl"
+ },
+ "binary": {
+ "relativePath": "bin/codex",
+ "sha256": "bbc3341e44c9ead340ed9570c17be936e37870f570751a941699ffd04d672827"
+ },
+ "appServerProtocol": {
+ "sourceVersion": "v0_149_0",
+ "relativePath": "protocol/v0_149_0",
+ "schemaSha256": "6670c9dc6595e01472c7b7ec35e604bc132b9fb7fab4894ea78ebee50f36e1ac"
+ },
+ "resources": [
+ {
+ "path": "codex-package.json",
+ "sha256": "0b3f869f9fbd009f4d0c68c68ab50d53778855899b19106a607c6cd1861637a3",
+ "kind": "metadata"
+ },
+ {
+ "path": "bin/codex",
+ "sha256": "bbc3341e44c9ead340ed9570c17be936e37870f570751a941699ffd04d672827",
+ "kind": "executable"
+ },
+ {
+ "path": "bin/codex-code-mode-host",
+ "sha256": "ba0f620a1d242a7555750e96c30c4c03b8b89ec0d4cff987e21bcd79fa18a363",
+ "kind": "executable"
+ },
+ {
+ "path": "codex-path/rg",
+ "sha256": "e62198eb19b136b88c330af83647b5a962cb99b6b1f066758568f12de1974849",
+ "kind": "executable"
+ },
+ {
+ "path": "codex-resources/bwrap",
+ "sha256": "7df960565a0dece99240ea4b9d0e011307817f9f3b73176c7b71fda44fe84765",
+ "kind": "executable"
+ },
+ {
+ "path": "codex-resources/zsh/bin/zsh",
+ "sha256": "67faaaa89242c4a332e16e508a1977cffc24bf7fca31d4411cdfd101f3831ef3",
+ "kind": "executable"
+ }
+ ],
+ "builtAt": "2026-08-21T00:00:00.000Z"
+}