Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.27.2",
"version": "0.27.3",
"type": "module",
"bin": {
"spawn": "cli.js"
Expand Down
21 changes: 21 additions & 0 deletions packages/cli/src/local/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

import type { CloudOrchestrator } from "../shared/orchestrate.js";

import * as p from "@clack/prompts";
import { getErrorMessage } from "@openrouter/spawn-shared";
import { runOrchestration } from "../shared/orchestrate.js";
import { logWarn } from "../shared/ui.js";
import { agents, resolveAgent } from "./agents.js";
import { downloadFile, interactiveSession, runLocal, uploadFile } from "./local.js";

Expand All @@ -19,6 +21,25 @@ async function main() {

const agent = resolveAgent(agentName);

// Warn about security implications of installing agents locally
if (process.env.SPAWN_NON_INTERACTIVE !== "1") {
process.stderr.write("\n");
logWarn("⚠ Local installation warning");
logWarn(` This will install ${agent.name} directly on your machine.`);
logWarn(" The agent will have full access to your filesystem, shell, and network.");
logWarn(" For isolation, consider running on a cloud VM instead.\n");

const confirmed = await p.confirm({
message: "Continue with local installation?",
initialValue: true,
});

if (p.isCancel(confirmed) || !confirmed) {
p.log.info("Installation cancelled.");
process.exit(0);
}
}

const cloud: CloudOrchestrator = {
cloudName: "local",
cloudLabel: "local machine",
Expand Down
Loading