@groupchatai/claude-runner 0.4.1 → 0.4.2

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/dist/index.js +15 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -782,9 +782,9 @@ Commands:
782
782
 
783
783
  Options:
784
784
  --work-dir <path> Repo directory for Claude Code to work in (default: cwd)
785
- --poll Use HTTP polling instead of WebSocket (default: websocket)
786
- --poll-interval <ms> Polling interval in milliseconds (default: 5000, only with --poll)
787
- --max-concurrent <n> Max concurrent tasks (default: 1)
785
+ --poll Use HTTP polling fallback (default: websocket, see below)
786
+ --poll-interval <ms> Polling interval in milliseconds (default: 30000, only with --poll)
787
+ --max-concurrent <n> Max concurrent tasks (default: 5)
788
788
  --model <model> Claude model to use (passed to claude CLI)
789
789
  --dry-run Poll and log runs without executing Claude Code
790
790
  --once Process one batch of pending runs and exit (implies --poll)
@@ -808,8 +808,8 @@ function parseArgs() {
808
808
  apiUrl: process.env.GCA_API_URL ?? API_URL,
809
809
  convexUrl: process.env.GCA_CONVEX_URL ?? CONVEX_URL,
810
810
  workDir: process.cwd(),
811
- pollInterval: 5e3,
812
- maxConcurrent: 1,
811
+ pollInterval: 3e4,
812
+ maxConcurrent: 5,
813
813
  poll: false,
814
814
  dryRun: false,
815
815
  once: false,
@@ -823,7 +823,7 @@ function parseArgs() {
823
823
  config.workDir = path.resolve(args[++i] ?? ".");
824
824
  break;
825
825
  case "--poll-interval":
826
- config.pollInterval = parseInt(args[++i] ?? "5000", 10);
826
+ config.pollInterval = parseInt(args[++i] ?? "30000", 10);
827
827
  break;
828
828
  case "--max-concurrent":
829
829
  config.maxConcurrent = parseInt(args[++i] ?? "1", 10);
@@ -984,6 +984,7 @@ async function runWithWebSocket(client, config, scheduler) {
984
984
  ({ anyApi } = await import("convex/server"));
985
985
  } catch {
986
986
  console.warn("\u26A0 convex package not found \u2014 falling back to HTTP polling.");
987
+ console.warn(" WebSocket mode is recommended for instant task pickup and zero idle cost.");
987
988
  console.warn(" Install convex for WebSocket mode: npm i convex\n");
988
989
  await runWithPolling(client, config, scheduler);
989
990
  return;
@@ -1009,8 +1010,14 @@ async function runWithWebSocket(client, config, scheduler) {
1009
1010
  });
1010
1011
  }
1011
1012
  async function runWithPolling(client, config, scheduler) {
1012
- console.log(`\u{1F4E1} Polling every ${config.pollInterval}ms \u2014 listening for tasks\u2026
1013
- `);
1013
+ console.log(`\u{1F4E1} Polling every ${config.pollInterval / 1e3}s \u2014 listening for tasks\u2026`);
1014
+ console.log(
1015
+ `${C.dim} Tip: WebSocket mode (default) picks up tasks instantly with zero idle cost.${C.reset}`
1016
+ );
1017
+ console.log(
1018
+ `${C.dim} Remove --poll unless your network blocks WebSocket connections.${C.reset}
1019
+ `
1020
+ );
1014
1021
  let running = true;
1015
1022
  const shutdown = () => {
1016
1023
  console.log("\n\u{1F6D1} Shutting down\u2026");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupchatai/claude-runner",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Run GroupChat AI agent tasks locally with Claude Code",
5
5
  "type": "module",
6
6
  "bin": {