@threadbase-sh/streamer 1.49.0 → 1.50.0

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.
package/dist/cli.cjs CHANGED
@@ -1490,6 +1490,10 @@ function isPermissionMode(value) {
1490
1490
  function isDangerousPermissionMode(mode) {
1491
1491
  return DANGEROUS_PERMISSION_MODES.includes(mode);
1492
1492
  }
1493
+ function effectivePermissionMode(flags, fallback) {
1494
+ const candidate = flags?.permissionMode ?? fallback;
1495
+ return isPermissionMode(candidate) ? candidate : void 0;
1496
+ }
1493
1497
  function isEffortLevel(value) {
1494
1498
  return typeof value === "string" && EFFORT_LEVELS.includes(value);
1495
1499
  }
@@ -157474,6 +157478,17 @@ program2.command("serve").description("Start the streamer server").option("-p, -
157474
157478
  takeoverProd2({ port: plan.port, repoToplevel });
157475
157479
  }
157476
157480
  }
157481
+ const spawnMode = effectivePermissionMode(
157482
+ claudeFlags,
157483
+ resolvedDefaultPermissionMode ?? loadDefaultPermissionMode()
157484
+ );
157485
+ if (spawnMode !== void 0 && isDangerousPermissionMode(spawnMode)) {
157486
+ log14.warn(
157487
+ `[WARN] permission mode is ${spawnMode} \u2014 spawned sessions run without confirmation prompts, so anyone holding the API key can execute arbitrary code on this machine. There is no spend limit.`,
157488
+ void 0,
157489
+ "console"
157490
+ );
157491
+ }
157477
157492
  const server = new StreamerServer({
157478
157493
  port: resolvedPort,
157479
157494
  apiKey,