@@ -15,7 +15,7 @@ import { ensureDir, fileExists, readJson, readText, removePath, writeTextAtomic
1515import { appDir , helloagentsRoot , toPosix } from '../kernel/paths.mjs'
1616import { injectKernel , readKernelText , removeKernel } from '../hosts/carriers.mjs'
1717import { backupCodexConfig , removeCodexBackups } from '../hosts/codex-backup.mjs'
18- import { installCodexManagedConfig , syncCodexHookTrust , uninstallCodexManagedConfig } from '../hosts/codex-config.mjs'
18+ import { installCodexManagedConfig , uninstallCodexManagedConfig } from '../hosts/codex-config.mjs'
1919import { installCodexHooks , uninstallCodexHooks } from '../hosts/codex-hooks.mjs'
2020import { removeCursorHooks , removeSettingsHooks , upsertCursorHooks , upsertSettingsHooks } from '../hosts/hooks-config.mjs'
2121import {
@@ -167,7 +167,7 @@ function installHostStandard(ctx, host, kernel) {
167167 backupCodexConfig ( ctx . home , configPath )
168168 const hooksPath = join ( ctx . home , '.codex' , 'hooks.json' )
169169 const hooksData = readJson ( hooksPath )
170- installCodexManagedConfig ( configPath , hooksPath , hooksData , join ( helloagentsRoot ( ctx . home ) , 'backups' , 'codex' ) )
170+ installCodexManagedConfig ( configPath , join ( helloagentsRoot ( ctx . home ) , 'backups' , 'codex' ) )
171171 } catch ( error ) {
172172 ctx . log ( ctx . t ( 'install.codexExtrasFailed' , { message : error instanceof Error ? error . message : String ( error ) } ) )
173173 }
@@ -350,13 +350,7 @@ export function runUpdate(ctx, allHosts) {
350350
351351 // 更新 Codex 信任哈希
352352 if ( host . id === 'codex' && state . hosts [ host . id ] ?. mode === 'standard' ) {
353- try {
354- const hooksPath = join ( ctx . home , '.codex' , 'hooks.json' )
355- const hooksData = readJson ( hooksPath )
356- if ( hooksData ) {
357- syncCodexHookTrust ( String ( host . codexConfigPath ( ctx . home ) ) , hooksPath , hooksData )
358- }
359- } catch { /* 非关键 */ }
353+ // Codex 0.145.0 起信任由内部数据库管理,不再需要写入 config.toml
360354 }
361355
362356 if ( state . hosts [ host . id ] ?. mode === 'global' ) {
0 commit comments