@upstash/box-cli 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cli.d.ts +3 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +66 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/commands/init-demo.js +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1 -65
  9. package/dist/index.js.map +1 -1
  10. package/dist/repl/client.d.ts +10 -23
  11. package/dist/repl/client.d.ts.map +1 -1
  12. package/dist/repl/client.js +74 -84
  13. package/dist/repl/client.js.map +1 -1
  14. package/dist/repl/commands/console.d.ts +8 -0
  15. package/dist/repl/commands/console.d.ts.map +1 -0
  16. package/dist/repl/commands/console.js +11 -0
  17. package/dist/repl/commands/console.js.map +1 -0
  18. package/dist/repl/commands/delete.d.ts +3 -3
  19. package/dist/repl/commands/delete.d.ts.map +1 -1
  20. package/dist/repl/commands/delete.js +4 -4
  21. package/dist/repl/commands/delete.js.map +1 -1
  22. package/dist/repl/commands/exec.d.ts +2 -2
  23. package/dist/repl/commands/exec.d.ts.map +1 -1
  24. package/dist/repl/commands/exec.js +4 -4
  25. package/dist/repl/commands/exec.js.map +1 -1
  26. package/dist/repl/commands/files.d.ts +2 -2
  27. package/dist/repl/commands/files.d.ts.map +1 -1
  28. package/dist/repl/commands/files.js +10 -10
  29. package/dist/repl/commands/files.js.map +1 -1
  30. package/dist/repl/commands/git.d.ts +2 -2
  31. package/dist/repl/commands/git.d.ts.map +1 -1
  32. package/dist/repl/commands/git.js +7 -7
  33. package/dist/repl/commands/git.js.map +1 -1
  34. package/dist/repl/commands/pause.d.ts +3 -3
  35. package/dist/repl/commands/pause.d.ts.map +1 -1
  36. package/dist/repl/commands/pause.js +4 -4
  37. package/dist/repl/commands/pause.js.map +1 -1
  38. package/dist/repl/commands/run.d.ts +3 -3
  39. package/dist/repl/commands/run.d.ts.map +1 -1
  40. package/dist/repl/commands/run.js +7 -5
  41. package/dist/repl/commands/run.js.map +1 -1
  42. package/dist/repl/commands/snapshot.d.ts +2 -2
  43. package/dist/repl/commands/snapshot.d.ts.map +1 -1
  44. package/dist/repl/commands/snapshot.js +2 -2
  45. package/dist/repl/commands/snapshot.js.map +1 -1
  46. package/dist/repl/terminal.d.ts.map +1 -1
  47. package/dist/repl/terminal.js +89 -54
  48. package/dist/repl/terminal.js.map +1 -1
  49. package/dist/repl/types.d.ts +40 -0
  50. package/dist/repl/types.d.ts.map +1 -0
  51. package/dist/repl/types.js +2 -0
  52. package/dist/repl/types.js.map +1 -0
  53. package/package.json +7 -7
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import "dotenv/config";
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC"}
package/dist/cli.js ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ import "dotenv/config";
3
+ import { Command } from "commander";
4
+ import { createCommand } from "./commands/create.js";
5
+ import { connectCommand } from "./commands/connect.js";
6
+ import { fromSnapshotCommand } from "./commands/from-snapshot.js";
7
+ import { listCommand } from "./commands/list.js";
8
+ import { getCommand } from "./commands/get.js";
9
+ import { initDemoCommand } from "./commands/init-demo.js";
10
+ import { completionCommand } from "./commands/completion.js";
11
+ const program = new Command();
12
+ program
13
+ .name("box")
14
+ .description("CLI for Upstash Box — REPL-first interface for AI coding agents")
15
+ .version("0.1.0");
16
+ program
17
+ .command("create")
18
+ .description("Create a new box and enter the REPL")
19
+ .option("--token <token>", "Upstash Box API token")
20
+ .option("--runtime <runtime>", "Runtime environment (node, python, golang, ruby, rust)")
21
+ .option("--agent-model <model>", "Agent model identifier")
22
+ .option("--agent-api-key <key>", "Agent API key (Anthropic or OpenAI)")
23
+ .option("--git-token <token>", "GitHub personal access token")
24
+ .option("--env <KEY=VAL>", "Environment variable (repeatable)", (val, prev) => [...prev, val], [])
25
+ .action((opts) => createCommand(opts));
26
+ program
27
+ .command("connect [box-id]")
28
+ .description("Connect to an existing box (or most recent) and enter the REPL")
29
+ .option("--token <token>", "Upstash Box API token")
30
+ .action((boxId, opts) => connectCommand(boxId, opts));
31
+ program
32
+ .command("from-snapshot <snapshot-id>")
33
+ .description("Create a new box from a snapshot and enter the REPL")
34
+ .option("--token <token>", "Upstash Box API token")
35
+ .option("--runtime <runtime>", "Runtime environment")
36
+ .option("--agent-model <model>", "Agent model identifier")
37
+ .option("--agent-api-key <key>", "Agent API key")
38
+ .option("--git-token <token>", "GitHub personal access token")
39
+ .option("--env <KEY=VAL>", "Environment variable (repeatable)", (val, prev) => [...prev, val], [])
40
+ .action((snapshotId, opts) => fromSnapshotCommand(snapshotId, opts));
41
+ program
42
+ .command("list")
43
+ .description("List all boxes")
44
+ .option("--token <token>", "Upstash Box API token")
45
+ .action((opts) => listCommand(opts));
46
+ program
47
+ .command("get <box-id>")
48
+ .description("Get details about a box")
49
+ .option("--token <token>", "Upstash Box API token")
50
+ .action((boxId, opts) => getCommand(boxId, opts));
51
+ program
52
+ .command("init-demo")
53
+ .description("Scaffold a standalone demo project for @upstash/box")
54
+ .option("--token <token>", "Upstash Box API token")
55
+ .option("--agent-model <model>", "Agent model identifier")
56
+ .option("--agent-api-key <key>", "Agent API key (required if --agent-model is set)")
57
+ .option("--runtime <runtime>", "Runtime environment", "node")
58
+ .option("--git-token <token>", "GitHub personal access token")
59
+ .option("--directory <dir>", "Output directory", "box-demo")
60
+ .action((opts) => initDemoCommand(opts));
61
+ program
62
+ .command("completion")
63
+ .description('Output shell completion script (eval "$(box completion)")')
64
+ .action(() => completionCommand());
65
+ program.parse();
66
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"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qD,CAAC;KAClE,MAAM,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;KAClD,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC;KACzD,MAAM,CAAC,uBAAuB,EAAE,kDAAkD,CAAC;KACnF,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,CAAC;KAC5D,MAAM,CAAC,qBAAqB,EAAE,8BAA8B,CAAC;KAC7D,MAAM,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,UAAU,CAAC;KAC3D,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAE3C,OAAO;KACJ,OAAO,CAAC,YAAY,CAAC;KACrB,WAAW,CAAC,2DAA2D,CAAC;KACxE,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAErC,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -56,7 +56,7 @@ async function main() {
56
56
  // Execute a command
57
57
  console.log("\\nRunning: ls -la");
58
58
  const run = await box.exec("ls -la");
59
- const output = await run.result();
59
+ const output = run.result;
60
60
  console.log(output);
61
61
 
62
62
  // List files
@@ -80,7 +80,7 @@ async function main() {
80
80
  if (process.env.GIT_TOKEN) {
81
81
  console.log("\\nGit status:");
82
82
  const gitRun = await box.exec("git status");
83
- const gitOutput = await gitRun.result();
83
+ const gitOutput = gitRun.result;
84
84
  console.log(gitOutput);
85
85
  }
86
86
  } finally {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- #!/usr/bin/env node
2
- import "dotenv/config";
1
+ export { BoxREPLClient, COMMAND_NAMES, COMMAND_DESCRIPTIONS } from "./repl/client.js";
2
+ export type { BoxREPLEvent, BoxREPLCommand, BoxREPLCommandHandler, BoxREPLCommandName } from "./repl/types.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACtF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,66 +1,2 @@
1
- #!/usr/bin/env node
2
- import "dotenv/config";
3
- import { Command } from "commander";
4
- import { createCommand } from "./commands/create.js";
5
- import { connectCommand } from "./commands/connect.js";
6
- import { fromSnapshotCommand } from "./commands/from-snapshot.js";
7
- import { listCommand } from "./commands/list.js";
8
- import { getCommand } from "./commands/get.js";
9
- import { initDemoCommand } from "./commands/init-demo.js";
10
- import { completionCommand } from "./commands/completion.js";
11
- const program = new Command();
12
- program
13
- .name("box")
14
- .description("CLI for Upstash Box — REPL-first interface for AI coding agents")
15
- .version("0.1.0");
16
- program
17
- .command("create")
18
- .description("Create a new box and enter the REPL")
19
- .option("--token <token>", "Upstash Box API token")
20
- .option("--runtime <runtime>", "Runtime environment (node, python, golang, ruby, rust)")
21
- .option("--agent-model <model>", "Agent model identifier")
22
- .option("--agent-api-key <key>", "Agent API key (Anthropic or OpenAI)")
23
- .option("--git-token <token>", "GitHub personal access token")
24
- .option("--env <KEY=VAL>", "Environment variable (repeatable)", (val, prev) => [...prev, val], [])
25
- .action((opts) => createCommand(opts));
26
- program
27
- .command("connect [box-id]")
28
- .description("Connect to an existing box (or most recent) and enter the REPL")
29
- .option("--token <token>", "Upstash Box API token")
30
- .action((boxId, opts) => connectCommand(boxId, opts));
31
- program
32
- .command("from-snapshot <snapshot-id>")
33
- .description("Create a new box from a snapshot and enter the REPL")
34
- .option("--token <token>", "Upstash Box API token")
35
- .option("--runtime <runtime>", "Runtime environment")
36
- .option("--agent-model <model>", "Agent model identifier")
37
- .option("--agent-api-key <key>", "Agent API key")
38
- .option("--git-token <token>", "GitHub personal access token")
39
- .option("--env <KEY=VAL>", "Environment variable (repeatable)", (val, prev) => [...prev, val], [])
40
- .action((snapshotId, opts) => fromSnapshotCommand(snapshotId, opts));
41
- program
42
- .command("list")
43
- .description("List all boxes")
44
- .option("--token <token>", "Upstash Box API token")
45
- .action((opts) => listCommand(opts));
46
- program
47
- .command("get <box-id>")
48
- .description("Get details about a box")
49
- .option("--token <token>", "Upstash Box API token")
50
- .action((boxId, opts) => getCommand(boxId, opts));
51
- program
52
- .command("init-demo")
53
- .description("Scaffold a standalone demo project for @upstash/box")
54
- .option("--token <token>", "Upstash Box API token")
55
- .option("--agent-model <model>", "Agent model identifier")
56
- .option("--agent-api-key <key>", "Agent API key (required if --agent-model is set)")
57
- .option("--runtime <runtime>", "Runtime environment", "node")
58
- .option("--git-token <token>", "GitHub personal access token")
59
- .option("--directory <dir>", "Output directory", "box-demo")
60
- .action((opts) => initDemoCommand(opts));
61
- program
62
- .command("completion")
63
- .description('Output shell completion script (eval "$(box completion)")')
64
- .action(() => completionCommand());
65
- program.parse();
1
+ export { BoxREPLClient, COMMAND_NAMES, COMMAND_DESCRIPTIONS } from "./repl/client.js";
66
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MA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CAAC,CAAC;AAE3C,OAAO;KACJ,OAAO,CAAC,YAAY,CAAC;KACrB,WAAW,CAAC,2DAA2D,CAAC;KACxE,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAErC,OAAO,CAAC,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,30 +1,17 @@
1
1
  import type { Box } from "@upstash/box";
2
- export type REPLHooks = {
3
- onLog: (message: string) => void;
4
- onError: (message: string) => void;
5
- onStream: (message: string) => void;
6
- /** Loading indicator. Return a stop() function. */
7
- onLoadingStart?: () => () => void;
8
- /** Post-command suggestion (e.g. "try: /snapshot"). */
9
- onSuggestion?: (text: string) => void;
10
- /** Timing info after each command. */
11
- onCommandComplete?: (command: string, durationMs: number) => void;
12
- /** Unknown /command with fuzzy suggestions. Falls back to onError if absent. */
13
- onCommandNotFound?: (typed: string, suggestions: string[]) => void;
14
- };
2
+ import type { BoxREPLEvent, BoxREPLCommand, BoxREPLCommandName } from "./types.js";
15
3
  /** All available command names (without / prefix). */
16
- export declare const COMMAND_NAMES: string[];
4
+ export declare const COMMAND_NAMES: BoxREPLCommandName[];
17
5
  /** Command descriptions for completer/preview. */
18
- export declare const COMMAND_DESCRIPTIONS: Record<string, string>;
6
+ export declare const COMMAND_DESCRIPTIONS: Record<BoxREPLCommandName, string>;
19
7
  export declare class BoxREPLClient {
20
8
  readonly box: Box;
21
- readonly promptUser: (prompt: string) => Promise<string>;
22
- private readonly hooks;
23
- constructor({ box, promptUser, hooks, }: {
24
- box: Box;
25
- promptUser: (prompt: string) => Promise<string>;
26
- hooks: REPLHooks;
27
- });
28
- startLoop(): Promise<void>;
9
+ constructor(box: Box);
10
+ /** Parse input and return the matching command + args, or null. */
11
+ private getCommand;
12
+ /** Return commands whose name starts with the given prefix. */
13
+ static suggestCommands(prefix: string): BoxREPLCommand[];
14
+ /** Process a single line of input and yield events. */
15
+ handleInput(input: string): AsyncGenerator<BoxREPLEvent>;
29
16
  }
30
17
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/repl/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAUxC,MAAM,MAAM,SAAS,GAAG;IAEtB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAIpC,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,MAAM,IAAI,CAAC;IAElC,uDAAuD;IACvD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAElE,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACpE,CAAC;AAeF,sDAAsD;AACtD,eAAO,MAAM,aAAa,UAAwB,CAAC;AAEnD,kDAAkD;AAClD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQvD,CAAC;AAoBF,qBAAa,aAAa;IACxB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAY;gBAEtB,EACV,GAAG,EACH,UAAU,EACV,KAAK,GACN,EAAE;QACD,GAAG,EAAE,GAAG,CAAC;QACT,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;QAChD,KAAK,EAAE,SAAS,CAAC;KAClB;IAMK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAuEjC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/repl/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAsBnF,sDAAsD;AACtD,eAAO,MAAM,aAAa,EAA4B,kBAAkB,EAAE,CAAC;AAE3E,kDAAkD;AAClD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAE7B,CAAC;AAoBxC,qBAAa,aAAa;IACxB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;gBAEN,GAAG,EAAE,GAAG;IAIpB,mEAAmE;IACnE,OAAO,CAAC,UAAU;IAelB,+DAA+D;IAC/D,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE;IAOxD,uDAAuD;IAChD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,YAAY,CAAC;CA8ChE"}
@@ -5,30 +5,24 @@ import { handleGit } from "./commands/git.js";
5
5
  import { handleSnapshot } from "./commands/snapshot.js";
6
6
  import { handlePause } from "./commands/pause.js";
7
7
  import { handleDelete } from "./commands/delete.js";
8
+ import { handleConsole } from "./commands/console.js";
8
9
  import { fuzzyMatch } from "../utils/fuzzy.js";
9
10
  const COMMANDS = {
10
- run: handleRun,
11
- exec: handleExec,
12
- files: handleFiles,
13
- git: handleGit,
14
- snapshot: handleSnapshot,
15
- pause: handlePause,
16
- delete: handleDelete,
11
+ run: { description: "Run the agent with a prompt", handler: handleRun },
12
+ exec: { description: "Execute a shell command", handler: handleExec },
13
+ files: { description: "File operations (read, write, list, upload, download)", handler: handleFiles },
14
+ git: { description: "Git operations (clone, diff, create-pr)", handler: handleGit },
15
+ snapshot: { description: "Create a snapshot of the current box", handler: handleSnapshot },
16
+ pause: { description: "Pause the box and exit", handler: handlePause },
17
+ delete: { description: "Delete the box and exit", handler: handleDelete },
18
+ console: { description: "Open the box in Upstash console", handler: handleConsole },
17
19
  };
18
20
  /** All available command names (without / prefix). */
19
21
  export const COMMAND_NAMES = Object.keys(COMMANDS);
20
22
  /** Command descriptions for completer/preview. */
21
- export const COMMAND_DESCRIPTIONS = {
22
- run: "Run the agent with a prompt",
23
- exec: "Execute a shell command",
24
- files: "File operations (read, write, list, upload, download)",
25
- git: "Git operations (clone, diff, create-pr)",
26
- snapshot: "Create a snapshot of the current box",
27
- pause: "Pause the box and exit",
28
- delete: "Delete the box and exit",
29
- };
23
+ export const COMMAND_DESCRIPTIONS = Object.fromEntries(COMMAND_NAMES.map((name) => [name, COMMANDS[name].description]));
30
24
  /** Context-aware suggestion after a command completes. */
31
- function getSuggestion(cmdName) {
25
+ function getNextCommandSuggestion(cmdName) {
32
26
  switch (cmdName) {
33
27
  case "exec":
34
28
  return "/files list .";
@@ -46,82 +40,78 @@ function getSuggestion(cmdName) {
46
40
  }
47
41
  export class BoxREPLClient {
48
42
  box;
49
- promptUser;
50
- hooks;
51
- constructor({ box, promptUser, hooks, }) {
43
+ constructor(box) {
52
44
  this.box = box;
53
- this.promptUser = promptUser;
54
- this.hooks = hooks;
55
45
  }
56
- async startLoop() {
57
- const { hooks } = this;
58
- hooks.onLog(`\nConnected to box ${this.box.id}`);
59
- hooks.onLog(`Type a prompt to run the agent, or use commands: ${COMMAND_NAMES.map((c) => `/${c}`).join(", ")}, /exit\n`);
60
- while (true) {
61
- const input = await this.promptUser(`${this.box.id}> `);
62
- const trimmed = input.trim();
63
- if (!trimmed)
64
- continue;
65
- if (trimmed === "exit" || trimmed === "/exit") {
66
- hooks.onLog("Goodbye.");
67
- break;
68
- }
69
- // Commands require / prefix
70
- if (trimmed.startsWith("/")) {
71
- const withoutSlash = trimmed.slice(1);
72
- const spaceIdx = withoutSlash.indexOf(" ");
73
- const cmdName = spaceIdx === -1 ? withoutSlash : withoutSlash.slice(0, spaceIdx);
74
- const args = spaceIdx === -1 ? "" : withoutSlash.slice(spaceIdx + 1).trim();
75
- const handler = COMMANDS[cmdName];
76
- if (handler) {
77
- const start = Date.now();
78
- const stopLoading = hooks.onLoadingStart?.();
79
- try {
80
- const shouldExit = await handler(this.box, args, hooks);
81
- stopLoading?.();
82
- const durationMs = Date.now() - start;
83
- hooks.onCommandComplete?.(cmdName, durationMs);
84
- const suggestion = getSuggestion(cmdName);
85
- if (suggestion)
86
- hooks.onSuggestion?.(suggestion);
87
- if (shouldExit === true)
88
- break;
89
- }
90
- catch (err) {
91
- stopLoading?.();
92
- hooks.onError(`Error: ${err instanceof Error ? err.message : err}`);
93
- }
94
- }
95
- else {
96
- // Unknown command — fuzzy match
97
- const suggestions = fuzzyMatch(cmdName, COMMAND_NAMES);
98
- if (hooks.onCommandNotFound) {
99
- hooks.onCommandNotFound(cmdName, suggestions);
100
- }
101
- else {
102
- const msg = suggestions.length > 0
103
- ? `Unknown command: /${cmdName}. Did you mean: ${suggestions.map((s) => `/${s}`).join(", ")}?`
104
- : `Unknown command: /${cmdName}. Available: ${COMMAND_NAMES.map((c) => `/${c}`).join(", ")}`;
105
- hooks.onError(msg);
106
- }
107
- }
108
- }
109
- else {
110
- // No / prefix — treat as agent prompt
46
+ /** Parse input and return the matching command + args, or null. */
47
+ getCommand(input) {
48
+ const trimmed = input.trim();
49
+ if (!trimmed.startsWith("/"))
50
+ return null;
51
+ const withoutSlash = trimmed.slice(1);
52
+ const spaceIdx = withoutSlash.indexOf(" ");
53
+ const cmdName = spaceIdx === -1 ? withoutSlash : withoutSlash.slice(0, spaceIdx);
54
+ const args = spaceIdx === -1 ? "" : withoutSlash.slice(spaceIdx + 1).trim();
55
+ const entry = COMMANDS[cmdName];
56
+ if (!entry)
57
+ return null;
58
+ return { command: { name: cmdName, ...entry }, args };
59
+ }
60
+ /** Return commands whose name starts with the given prefix. */
61
+ static suggestCommands(prefix) {
62
+ return COMMAND_NAMES.filter((name) => name.startsWith(prefix)).map((name) => ({
63
+ name,
64
+ ...COMMANDS[name],
65
+ }));
66
+ }
67
+ /** Process a single line of input and yield events. */
68
+ async *handleInput(input) {
69
+ const trimmed = input.trim();
70
+ if (!trimmed)
71
+ return;
72
+ if (trimmed === "exit" || trimmed === "/exit") {
73
+ yield { type: "exit", message: "Goodbye." };
74
+ return;
75
+ }
76
+ if (trimmed.startsWith("/")) {
77
+ const parsed = this.getCommand(trimmed);
78
+ if (parsed) {
79
+ const { command, args } = parsed;
80
+ yield { type: "command:start", command: command.name, args };
111
81
  const start = Date.now();
112
- const stopLoading = hooks.onLoadingStart?.();
113
82
  try {
114
- await handleRun(this.box, trimmed, hooks);
115
- stopLoading?.();
83
+ yield* command.handler(this.box, args);
116
84
  const durationMs = Date.now() - start;
117
- hooks.onCommandComplete?.("run", durationMs);
118
- hooks.onSuggestion?.("/snapshot");
85
+ yield { type: "command:complete", command: command.name, durationMs };
86
+ const suggestion = getNextCommandSuggestion(command.name);
87
+ if (suggestion)
88
+ yield { type: "suggestion", text: suggestion };
119
89
  }
120
90
  catch (err) {
121
- stopLoading?.();
122
- hooks.onError(`Error: ${err instanceof Error ? err.message : err}`);
91
+ yield { type: "error", message: `Error: ${err instanceof Error ? err.message : err}` };
123
92
  }
124
93
  }
94
+ else {
95
+ const withoutSlash = trimmed.slice(1);
96
+ const spaceIdx = withoutSlash.indexOf(" ");
97
+ const cmdName = spaceIdx === -1 ? withoutSlash : withoutSlash.slice(0, spaceIdx);
98
+ const suggestions = fuzzyMatch(cmdName, COMMAND_NAMES);
99
+ yield { type: "command:not-found", typed: cmdName, suggestions };
100
+ }
101
+ }
102
+ else {
103
+ // No / prefix — treat as agent prompt
104
+ yield { type: "command:start", command: "run", args: trimmed };
105
+ const start = Date.now();
106
+ try {
107
+ yield* handleRun(this.box, trimmed);
108
+ const durationMs = Date.now() - start;
109
+ yield { type: "command:complete", command: "run", durationMs };
110
+ yield { type: "suggestion", text: "/snapshot" };
111
+ }
112
+ catch (err) {
113
+ yield { type: "error", message: `Error: ${err instanceof Error ? err.message : err}` };
114
+ }
125
115
  }
126
116
  }
127
117
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/repl/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAuB/C,MAAM,QAAQ,GAGV;IACF,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,WAAW;IAClB,GAAG,EAAE,SAAS;IACd,QAAQ,EAAE,cAAc;IACxB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;CACrB,CAAC;AAEF,sDAAsD;AACtD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAEnD,kDAAkD;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAA2B;IAC1D,GAAG,EAAE,6BAA6B;IAClC,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,uDAAuD;IAC9D,GAAG,E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ACH,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import type { Box } from "@upstash/box";
2
+ import type { BoxREPLEvent } from "../types.js";
3
+ /**
4
+ * Open the Upstash console for the current box in the default browser.
5
+ * Yields an open-url event; the consumer handles actually opening the browser.
6
+ */
7
+ export declare function handleConsole(box: Box, _args: string): AsyncGenerator<BoxREPLEvent>;
8
+ //# sourceMappingURL=console.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/console.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD;;;GAGG;AACH,wBAAuB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,YAAY,CAAC,CAI1F"}
@@ -0,0 +1,11 @@
1
+ const UPSTASH_CONSOLE_URL = "https://console.upstash.com/box/resolve";
2
+ /**
3
+ * Open the Upstash console for the current box in the default browser.
4
+ * Yields an open-url event; the consumer handles actually opening the browser.
5
+ */
6
+ export async function* handleConsole(box, _args) {
7
+ const url = `${UPSTASH_CONSOLE_URL}/${box.id}`;
8
+ yield { type: "open-url", url };
9
+ yield { type: "log", message: `Opening ${url}` };
10
+ }
11
+ //# sourceMappingURL=console.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console.js","sourceRoot":"","sources":["../../../src/repl/commands/console.ts"],"names":[],"mappings":"AAGA,MAAM,mBAAmB,GAAG,yCAAyC,CAAC;AAEtE;;;GAGG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,aAAa,CAAC,GAAQ,EAAE,KAAa;IAC1D,MAAM,GAAG,GAAG,GAAG,mBAAmB,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;IAC/C,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC;IAChC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,GAAG,EAAE,EAAE,CAAC;AACnD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Box } from "@upstash/box";
2
- import type { REPLHooks } from "../client.js";
2
+ import type { BoxREPLEvent } from "../types.js";
3
3
  /**
4
- * Delete the box. Returns true to signal the REPL to exit.
4
+ * Delete the box. Yields an exit event to signal the REPL to stop.
5
5
  */
6
- export declare function handleDelete(box: Box, _args: string, hooks: REPLHooks): Promise<boolean>;
6
+ export declare function handleDelete(box: Box, _args: string): AsyncGenerator<BoxREPLEvent>;
7
7
  //# sourceMappingURL=delete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;GAEG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAI9F"}
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,wBAAuB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,YAAY,CAAC,CAIzF"}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Delete the box. Returns true to signal the REPL to exit.
2
+ * Delete the box. Yields an exit event to signal the REPL to stop.
3
3
  */
4
- export async function handleDelete(box, _args, hooks) {
4
+ export async function* handleDelete(box, _args) {
5
5
  await box.delete();
6
- hooks.onLog(`Box ${box.id} deleted.`);
7
- return true;
6
+ yield { type: "log", message: `Box ${box.id} deleted.` };
7
+ yield { type: "exit", message: `Box ${box.id} deleted.` };
8
8
  }
9
9
  //# sourceMappingURL=delete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/repl/commands/delete.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAQ,EAAE,KAAa,EAAE,KAAgB;IAC1E,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,WAAW,CAAC,CAAC;IACtC,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/repl/commands/delete.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,YAAY,CAAC,GAAQ,EAAE,KAAa;IACzD,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC;IACzD,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC;AAC5D,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Box } from "@upstash/box";
2
- import type { REPLHooks } from "../client.js";
2
+ import type { BoxREPLEvent } from "../types.js";
3
3
  /**
4
4
  * Execute a shell command in the box.
5
5
  */
6
- export declare function handleExec(box: Box, command: string, hooks: REPLHooks): Promise<void>;
6
+ export declare function handleExec(box: Box, command: string): AsyncGenerator<BoxREPLEvent>;
7
7
  //# sourceMappingURL=exec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/exec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ3F"}
1
+ {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/exec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,wBAAuB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAAC,YAAY,CAAC,CAQzF"}
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * Execute a shell command in the box.
3
3
  */
4
- export async function handleExec(box, command, hooks) {
4
+ export async function* handleExec(box, command) {
5
5
  if (!command) {
6
- hooks.onLog("Usage: exec <command>");
6
+ yield { type: "log", message: "Usage: exec <command>" };
7
7
  return;
8
8
  }
9
9
  const run = await box.exec(command);
10
- const result = await run.result();
10
+ const result = run.result;
11
11
  if (result)
12
- hooks.onLog(result);
12
+ yield { type: "log", message: result };
13
13
  }
14
14
  //# sourceMappingURL=exec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exec.js","sourceRoot":"","sources":["../../../src/repl/commands/exec.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAQ,EAAE,OAAe,EAAE,KAAgB;IAC1E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,KAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACrC,OAAO;IACT,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;IAClC,IAAI,MAAM;QAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC"}
1
+ {"version":3,"file":"exec.js","sourceRoot":"","sources":["../../../src/repl/commands/exec.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,UAAU,CAAC,GAAQ,EAAE,OAAe;IACzD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;QACxD,OAAO;IACT,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,IAAI,MAAM;QAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AACrD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Box } from "@upstash/box";
2
- import type { REPLHooks } from "../client.js";
2
+ import type { BoxREPLEvent } from "../types.js";
3
3
  /**
4
4
  * Handle file subcommands: read, write, list, upload, download.
5
5
  */
6
- export declare function handleFiles(box: Box, args: string, hooks: REPLHooks): Promise<void>;
6
+ export declare function handleFiles(box: Box, args: string): AsyncGenerator<BoxREPLEvent>;
7
7
  //# sourceMappingURL=files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;GAEG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAuDzF"}
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/repl/commands/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;GAEG;AACH,wBAAuB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC,YAAY,CAAC,CAuDvF"}