fix: re-add httpMcpPort CLI arg it is passed from chromium

This commit is contained in:
Felarof
2025-12-30 13:07:40 -08:00
parent f08513c109
commit 56686940b3

View File

@@ -111,6 +111,11 @@ function parseCli(argv: string[]): ConfigResult<CliResult> {
parsePortArg,
)
.option('--server-port <port>', 'Server HTTP port', parsePortArg)
.option(
'--http-mcp-port <port>',
'[DEPRECATED] Use --server-port',
parsePortArg,
)
.option(
'--agent-port <port>',
'[DEPRECATED] Use --server-port',
@@ -155,6 +160,10 @@ function parseCli(argv: string[]): ConfigResult<CliResult> {
)
}
if (opts.httpMcpPort !== undefined) {
console.warn('Warning: --http-mcp-port is deprecated. Use --server-port.')
}
if (opts.agentPort !== undefined) {
console.warn(
'Warning: --agent-port is deprecated and has no effect. Use --server-port.',
@@ -170,7 +179,7 @@ function parseCli(argv: string[]): ConfigResult<CliResult> {
cwd,
overrides: filterUndefined({
cdpPort: opts.cdpPort,
serverPort: opts.serverPort,
serverPort: opts.serverPort ?? opts.httpMcpPort,
extensionPort: opts.extensionPort,
resourcesDir: opts.resourcesDir
? resolvePath(opts.resourcesDir, cwd)