44
55import type { CloudOrchestrator } from "../shared/orchestrate.js" ;
66
7+ import * as p from "@clack/prompts" ;
78import { getErrorMessage } from "@openrouter/spawn-shared" ;
89import { runOrchestration } from "../shared/orchestrate.js" ;
10+ import { logWarn } from "../shared/ui.js" ;
911import { agents , resolveAgent } from "./agents.js" ;
1012import { downloadFile , interactiveSession , runLocal , uploadFile } from "./local.js" ;
1113
@@ -19,6 +21,25 @@ async function main() {
1921
2022 const agent = resolveAgent ( agentName ) ;
2123
24+ // Warn about security implications of installing agents locally
25+ if ( process . env . SPAWN_NON_INTERACTIVE !== "1" ) {
26+ process . stderr . write ( "\n" ) ;
27+ logWarn ( "⚠ Local installation warning" ) ;
28+ logWarn ( ` This will install ${ agent . name } directly on your machine.` ) ;
29+ logWarn ( " The agent will have full access to your filesystem, shell, and network." ) ;
30+ logWarn ( " For isolation, consider running on a cloud VM instead.\n" ) ;
31+
32+ const confirmed = await p . confirm ( {
33+ message : "Continue with local installation?" ,
34+ initialValue : true ,
35+ } ) ;
36+
37+ if ( p . isCancel ( confirmed ) || ! confirmed ) {
38+ p . log . info ( "Installation cancelled." ) ;
39+ process . exit ( 0 ) ;
40+ }
41+ }
42+
2243 const cloud : CloudOrchestrator = {
2344 cloudName : "local" ,
2445 cloudLabel : "local machine" ,
0 commit comments