@@ -14,7 +14,6 @@ import {
1414 type ProviderApprovalDecision ,
1515 type ProviderEvent ,
1616 type ProviderSession ,
17- type ProviderSessionStartInput ,
1817 type ProviderTurnStartResult ,
1918 RuntimeMode ,
2019 ProviderInteractionMode ,
@@ -132,7 +131,8 @@ export interface CodexAppServerStartSessionInput {
132131 readonly model ?: string ;
133132 readonly serviceTier ?: string ;
134133 readonly resumeCursor ?: unknown ;
135- readonly providerOptions ?: ProviderSessionStartInput [ "providerOptions" ] ;
134+ readonly binaryPath : string ;
135+ readonly homePath ?: string ;
136136 readonly runtimeMode : RuntimeMode ;
137137}
138138
@@ -543,9 +543,8 @@ export class CodexAppServerManager extends EventEmitter<CodexAppServerManagerEve
543543 updatedAt : now ,
544544 } ;
545545
546- const codexOptions = readCodexProviderOptions ( input ) ;
547- const codexBinaryPath = codexOptions . binaryPath ?? "codex" ;
548- const codexHomePath = codexOptions . homePath ;
546+ const codexBinaryPath = input . binaryPath ;
547+ const codexHomePath = input . homePath ;
549548 this . assertSupportedCodexCliVersion ( {
550549 binaryPath : codexBinaryPath ,
551550 cwd : resolvedCwd ,
@@ -1642,20 +1641,6 @@ function normalizeProviderThreadId(value: string | undefined): string | undefine
16421641 return brandIfNonEmpty ( value , ( normalized ) => normalized ) ;
16431642}
16441643
1645- function readCodexProviderOptions ( input : CodexAppServerStartSessionInput ) : {
1646- readonly binaryPath ?: string ;
1647- readonly homePath ?: string ;
1648- } {
1649- const options = input . providerOptions ?. codex ;
1650- if ( ! options ) {
1651- return { } ;
1652- }
1653- return {
1654- ...( options . binaryPath ? { binaryPath : options . binaryPath } : { } ) ,
1655- ...( options . homePath ? { homePath : options . homePath } : { } ) ,
1656- } ;
1657- }
1658-
16591644function assertSupportedCodexCliVersion ( input : {
16601645 readonly binaryPath : string ;
16611646 readonly cwd : string ;
@@ -1709,7 +1694,11 @@ function readResumeCursorThreadId(resumeCursor: unknown): string | undefined {
17091694 return typeof rawThreadId === "string" ? normalizeProviderThreadId ( rawThreadId ) : undefined ;
17101695}
17111696
1712- function readResumeThreadId ( input : CodexAppServerStartSessionInput ) : string | undefined {
1697+ function readResumeThreadId ( input : {
1698+ readonly resumeCursor ?: unknown ;
1699+ readonly threadId ?: ThreadId ;
1700+ readonly runtimeMode ?: RuntimeMode ;
1701+ } ) : string | undefined {
17131702 return readResumeCursorThreadId ( input . resumeCursor ) ;
17141703}
17151704
0 commit comments