mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
guard local codex startup by version
This commit is contained in:
@@ -6,6 +6,7 @@ import type { CommandDefinition } from './types'
|
||||
import { CODEX_PERMISSION_MODES } from '@hapi/protocol/modes'
|
||||
import type { CodexPermissionMode } from '@hapi/protocol/types'
|
||||
import type { ReasoningEffort } from '@/codex/appServerTypes'
|
||||
import { assertCodexLocalSupported } from '@/codex/utils/codexVersion'
|
||||
|
||||
function parseReasoningEffort(value: string): ReasoningEffort {
|
||||
switch (value) {
|
||||
@@ -83,6 +84,10 @@ export const codexCommand: CommandDefinition = {
|
||||
options.codexArgs = unknownArgs
|
||||
}
|
||||
|
||||
if (options.startedBy !== 'runner') {
|
||||
assertCodexLocalSupported()
|
||||
}
|
||||
|
||||
await initializeToken()
|
||||
await maybeAutoStartServer()
|
||||
await authAndSetupMachineIfNeeded()
|
||||
|
||||
Reference in New Issue
Block a user