cueloop 0.1.0-alpha.60 → 0.1.0-alpha.62

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 (2) hide show
  1. package/package.json +5 -5
  2. package/src/main.ts +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cueloop",
3
- "version": "0.1.0-alpha.60",
3
+ "version": "0.1.0-alpha.62",
4
4
  "description": "Terminal review surface for coding agents: annotate plans and diffs, return a verdict, send structured feedback back",
5
5
  "homepage": "https://github.com/mmurakaru/cueloop#readme",
6
6
  "bugs": {
@@ -30,10 +30,10 @@
30
30
  "build:binary": "bun build --compile --external cpu-features ./src/main.ts --outfile dist/cueloop"
31
31
  },
32
32
  "dependencies": {
33
- "@cueloop/adapters": "0.1.0-alpha.60",
34
- "@cueloop/client": "0.1.0-alpha.60",
35
- "@cueloop/daemon": "0.1.0-alpha.60",
36
- "@cueloop/schema": "0.1.0-alpha.60"
33
+ "@cueloop/adapters": "0.1.0-alpha.62",
34
+ "@cueloop/client": "0.1.0-alpha.62",
35
+ "@cueloop/daemon": "0.1.0-alpha.62",
36
+ "@cueloop/schema": "0.1.0-alpha.62"
37
37
  },
38
38
  "engines": {
39
39
  "bun": ">=1.3.0"
package/src/main.ts CHANGED
@@ -30,9 +30,15 @@ import { openReview, resolveWorkspace } from "@cueloop/daemon/review";
30
30
  const argv = process.argv.slice(2);
31
31
  const cmd = argv[0];
32
32
 
33
- async function daemonCommand(): Promise<number> {
33
+ async function daemonCommand(argv: string[]): Promise<number> {
34
34
  const { DaemonServer } = await import("@cueloop/daemon");
35
- const server = new DaemonServer({ idleExitMs: 0 });
35
+ // Explicit foreground never idle-exits; --autostart (a re-exec from the client)
36
+ // takes the normal idle-exit, matching the source main.ts entry.
37
+ const envIdle = process.env.CUELOOP_IDLE_EXIT_MS;
38
+ let idleExitMs: number | undefined = 0;
39
+
40
+ if (argv.includes("--autostart")) idleExitMs = envIdle ? Number(envIdle) : undefined;
41
+ const server = new DaemonServer({ idleExitMs });
36
42
  const path = server.start();
37
43
 
38
44
  if (path === null) {
@@ -94,7 +100,7 @@ type CommandHandler = (rest: string[]) => number | Promise<number>;
94
100
 
95
101
  const commandHandlers: Record<string, CommandHandler> = {
96
102
  session: (rest) => sessionCommand(rest),
97
- daemon: () => daemonCommand(),
103
+ daemon: (rest) => daemonCommand(rest),
98
104
  plan: (rest) => planCommand(rest),
99
105
  reply: (rest) => replyCommand(rest),
100
106
  diff: (rest) => diffCommand(rest),