@@ -9,6 +9,8 @@ export const command = buildCommand({
99 "The agent command is spawned as a subprocess and communicates via stdin/stdout.\n\n" +
1010 "Use -- to pass arguments to the agent:\n" +
1111 " acp-link /path/to/agent -- --verbose --model gpt-4\n\n" +
12+ "Use --manager to start the Manager Web UI instead:\n" +
13+ " acp-link --manager\n\n" +
1214 "For remote access, set ACP_AUTH_TOKEN environment variable or let it auto-generate." ,
1315 } ,
1416 parameters : {
@@ -40,6 +42,11 @@ export const command = buildCommand({
4042 brief : "Enable HTTPS with auto-generated self-signed certificate" ,
4143 default : false ,
4244 } ,
45+ manager : {
46+ kind : "boolean" ,
47+ brief : "Start Manager Web UI (no proxy)" ,
48+ default : false ,
49+ } ,
4350 group : {
4451 kind : "parsed" ,
4552 parse : ( value : string ) => {
@@ -59,20 +66,34 @@ export const command = buildCommand({
5966 parse : String ,
6067 placeholder : "command" ,
6168 } ,
62- minimum : 1 ,
69+ minimum : 0 ,
6370 } ,
6471 } ,
6572 func : async function (
6673 this : LocalContext ,
67- flags : { port : number ; host : string ; debug : boolean ; "no-auth" : boolean ; https : boolean ; group : string | undefined } ,
74+ flags : { port : number ; host : string ; debug : boolean ; "no-auth" : boolean ; https : boolean ; manager : boolean ; group : string | undefined } ,
6875 ...args : readonly string [ ]
6976 ) {
7077 const port = flags . port ;
7178 const host = flags . host ;
7279 const debug = flags . debug ;
7380 const noAuth = flags [ "no-auth" ] ;
7481 const https = flags . https ;
82+ const manager = flags . manager ;
7583 const group = flags . group ;
84+
85+ // Manager mode: start web UI only, no proxy
86+ if ( manager ) {
87+ const { startManager } = await import ( "../manager/index.js" ) ;
88+ await startManager ( port ) ;
89+ return ;
90+ }
91+
92+ // Proxy mode: agent command is required
93+ if ( args . length === 0 ) {
94+ console . error ( "Error: agent command is required (or use --manager)" ) ;
95+ process . exit ( 1 ) ;
96+ }
7697 const [ command , ...agentArgs ] = args ;
7798 const cwd = process . cwd ( ) ;
7899
0 commit comments