param( [string]$HostAddress = "127.0.0.1", [int]$Port = 8000 ) $workspaceRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path $canDevRoot = Join-Path $workspaceRoot ".codex_tmp\can-dev-runtime\Cognitive_Agent" $agentRoot = if ($env:COGNITIVE_AGENT_CAN_DEV_ROOT) { (Resolve-Path $env:COGNITIVE_AGENT_CAN_DEV_ROOT).Path } elseif (Test-Path (Join-Path $canDevRoot "src\cognitive_agent\server.py")) { $canDevRoot } else { $workspaceRoot } $env:PYTHONPATH = "$agentRoot\src;$agentRoot\domains\seat\src" $env:OPENAI_BASE_URL = "https://api.kendeji.fun/v1" $env:OPENAI_MODEL = "gpt-5.6-sol" $env:OPENAI_STREAM = "true" $env:DEMO_AUTH_ENABLED = "false" Push-Location $agentRoot try { python -m cognitive_agent.server --host $HostAddress --port $Port } finally { Pop-Location }