File tree Expand file tree Collapse file tree
extensions/codex/src/app-server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -714,6 +714,23 @@ allowed_sandbox_modes = ["read-only", "workspace-write"]
714714 marketplaceSource : "github:example/plugins" ,
715715 } ,
716716 ) ;
717+
718+ for ( const value of [ "0x10" , "1e3" ] ) {
719+ expectFields (
720+ resolveCodexComputerUseConfig ( {
721+ pluginConfig : { } ,
722+ env : {
723+ OPENCLAW_CODEX_COMPUTER_USE : "1" ,
724+ OPENCLAW_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS : value ,
725+ } ,
726+ } ) ,
727+ "computer use config" ,
728+ {
729+ enabled : true ,
730+ marketplaceDiscoveryTimeoutMs : 60_000 ,
731+ } ,
732+ ) ;
733+ }
717734 } ) ;
718735
719736 it ( "allows plugin config to opt in to guardian-reviewed local execution" , ( ) => {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const START_OPTIONS_KEY_SECRET_SYMBOL = Symbol.for("openclaw.codexAppServerStart
1010const START_OPTIONS_KEY_SECRET = getStartOptionsKeySecret ( ) ;
1111const UNIX_CODEX_REQUIREMENTS_PATH = "/etc/codex/requirements.toml" ;
1212const WINDOWS_CODEX_REQUIREMENTS_SUFFIX = "\\OpenAI\\Codex\\requirements.toml" ;
13+ const PLAIN_DECIMAL_NUMBER_RE = / ^ [ + - ] ? (?: (?: \d + \. ? \d * ) | (?: \. \d + ) ) $ / ;
1314
1415type CodexAppServerTransportMode = "stdio" | "websocket" ;
1516type CodexAppServerPolicyMode = "yolo" | "guardian" ;
@@ -1035,10 +1036,11 @@ function readBooleanEnv(value: string | undefined): boolean | undefined {
10351036}
10361037
10371038function readNumberEnv ( value : string | undefined ) : number | undefined {
1038- if ( value === undefined ) {
1039+ const trimmed = value ?. trim ( ) ;
1040+ if ( ! trimmed || ! PLAIN_DECIMAL_NUMBER_RE . test ( trimmed ) ) {
10391041 return undefined ;
10401042 }
1041- const parsed = Number ( value ) ;
1043+ const parsed = Number ( trimmed ) ;
10421044 return Number . isFinite ( parsed ) ? parsed : undefined ;
10431045}
10441046
You can’t perform that action at this time.
0 commit comments