@@ -25,7 +25,9 @@ enum Commands {
2525 Init ( InitCommand ) ,
2626 Pty ( PtyCommand ) ,
2727 Headless ( HeadlessCommand ) ,
28- AppServer ( AppServerCommand ) ,
28+ /// Internal: headless worker shim for app-server-backed harnesses.
29+ #[ command( name = "app-server" , hide = true ) ]
30+ HeadlessAppServer ( HeadlessAppServerCommand ) ,
2931 /// Compute MCP injection args and side-effect config file paths for a CLI
3032 /// without spawning it. Outputs JSON to stdout.
3133 McpArgs ( McpArgsCommand ) ,
@@ -53,7 +55,7 @@ impl Commands {
5355 Commands :: Init ( _) => "init" ,
5456 Commands :: Pty ( _) => "pty" ,
5557 Commands :: Headless ( _) => "headless" ,
56- Commands :: AppServer ( _) => "app_server" ,
58+ Commands :: HeadlessAppServer ( _) => "app_server" ,
5759 Commands :: McpArgs ( _) => "mcp_args" ,
5860 Commands :: Swarm ( _) => "swarm" ,
5961 Commands :: DumpPty ( _) => "dump_pty" ,
@@ -88,8 +90,8 @@ impl Commands {
8890 }
8991 Commands :: Headless ( cmd) => non_empty_name ( cmd. agent_name . as_deref ( ) )
9092 . unwrap_or_else ( || format ! ( "headless-{pid}" ) ) ,
91- Commands :: AppServer ( cmd) => non_empty_name ( cmd. agent_name . as_deref ( ) )
92- . unwrap_or_else ( || format ! ( "app_server -{pid}" ) ) ,
93+ Commands :: HeadlessAppServer ( cmd) => non_empty_name ( cmd. agent_name . as_deref ( ) )
94+ . unwrap_or_else ( || format ! ( "headless-app-server -{pid}" ) ) ,
9395 Commands :: Wrap { cli, .. } => format ! ( "wrap-{cli}-{pid}" ) ,
9496 Commands :: McpArgs ( _) => format ! ( "mcp_args-{pid}" ) ,
9597 Commands :: DumpPty ( cmd) => format ! ( "dump_pty-{}-{}" , cmd. name, pid) ,
@@ -118,7 +120,7 @@ pub(crate) async fn run() -> Result<()> {
118120 Commands :: Init ( cmd) => runtime:: run_init ( cmd, telemetry) . await ,
119121 Commands :: Pty ( cmd) => pty_worker:: run_pty_worker ( cmd) . await ,
120122 Commands :: Headless ( cmd) => runtime:: run_headless_worker ( cmd) . await ,
121- Commands :: AppServer ( cmd) => runtime:: run_app_server_worker ( cmd) . await ,
123+ Commands :: HeadlessAppServer ( cmd) => runtime:: run_headless_app_server_worker ( cmd) . await ,
122124 Commands :: McpArgs ( cmd) => cli_mcp_args:: run_mcp_args ( cmd) . await ,
123125 Commands :: Swarm ( args) => swarm:: run_swarm ( args) . await ,
124126 Commands :: DumpPty ( cmd) => runtime:: run_dump_pty ( cmd) . await ,
@@ -277,7 +279,7 @@ pub(crate) struct HeadlessCommand {
277279}
278280
279281#[ derive( Debug , clap:: Args , Clone ) ]
280- pub ( crate ) struct AppServerCommand {
282+ pub ( crate ) struct HeadlessAppServerCommand {
281283 #[ arg( long) ]
282284 pub ( crate ) protocol : String ,
283285
0 commit comments