diff --git a/src/cli/App.tsx b/src/cli/App.tsx index cce5658..b12b91b 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -6471,7 +6471,7 @@ export default function App({ } // Special handling for /listen command - start listener mode - if (trimmed === "/listen" || trimmed.startsWith("/listen ")) { + if (trimmed === "/remote" || trimmed.startsWith("/remote ")) { // Tokenize with quote support: --name "my laptop" const parts = Array.from( trimmed.matchAll( diff --git a/src/cli/commands/listen.ts b/src/cli/commands/listen.ts index 8a4e3cd..c224582 100644 --- a/src/cli/commands/listen.ts +++ b/src/cli/commands/listen.ts @@ -101,7 +101,7 @@ export async function handleListen( opts: ListenOptions = {}, ): Promise { // Handle /listen off - stop the listener - if (msg.trim() === "/listen off") { + if (msg.trim() === "/remote off") { const { stopListenerClient, isListenerActive } = await import( "../../websocket/listen-client" ); @@ -134,17 +134,17 @@ export async function handleListen( ctx.buffersRef, ctx.refreshDerived, msg, - "Usage: /listen [--env-name ]\n" + - " /listen off\n\n" + + "Usage: /remote [--env-name ]\n" + + " /remote off\n\n" + "Register this letta-code instance to receive messages from Letta Cloud.\n\n" + "Options:\n" + " --env-name Friendly name for this environment (uses hostname if not provided)\n" + " off Stop the active listener connection\n" + " -h, --help Show this help message\n\n" + "Examples:\n" + - " /listen # Start listener with hostname\n" + - ' /listen --env-name "work-laptop" # Start with custom name\n' + - " /listen off # Stop listening\n\n" + + " /remote # Start listener with hostname\n" + + ' /remote --env-name "work-laptop" # Start with custom name\n' + + " /remote off # Stop listening\n\n" + "Once connected, this instance will listen for incoming messages from cloud agents.\n" + "Messages will be executed locally using your letta-code environment.", true, @@ -222,7 +222,7 @@ export async function handleListen( } // Call register endpoint - const registerUrl = `${serverUrl}/v1/listeners/register`; + const registerUrl = `${serverUrl}/v1/environments/register`; const registerResponse = await fetch(registerUrl, { method: "POST", headers: { diff --git a/src/cli/commands/registry.ts b/src/cli/commands/registry.ts index 9f055f5..0f2c98f 100644 --- a/src/cli/commands/registry.ts +++ b/src/cli/commands/registry.ts @@ -118,7 +118,7 @@ export const commands: Record = { return "Opening provider connection..."; }, }, - // "/listen": { + // "/remote": { // desc: "Connect to Letta Cloud (device connect mode)", // args: "[--env-name ]", // order: 17.5, diff --git a/src/cli/subcommands/listen.tsx b/src/cli/subcommands/listen.tsx index fb10954..61d59c3 100644 --- a/src/cli/subcommands/listen.tsx +++ b/src/cli/subcommands/listen.tsx @@ -123,7 +123,7 @@ export async function runListenSubcommand(argv: string[]): Promise { // Register with cloud const serverUrl = getServerUrl(); - const registerUrl = `${serverUrl}/v1/listeners/register`; + const registerUrl = `${serverUrl}/v1/environments/register`; const registerResponse = await fetch(registerUrl, { method: "POST", diff --git a/src/cli/subcommands/router.ts b/src/cli/subcommands/router.ts index 63e7efb..edd3abe 100644 --- a/src/cli/subcommands/router.ts +++ b/src/cli/subcommands/router.ts @@ -20,7 +20,7 @@ export async function runSubcommand(argv: string[]): Promise { return runMessagesSubcommand(rest); case "blocks": return runBlocksSubcommand(rest); - case "listen": + case "remote": return runListenSubcommand(rest); default: return null;