@threadbase-sh/streamer 1.49.0 → 1.51.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
  }
@@ -6223,6 +6227,12 @@ var init_feature_flags = __esm({
6223
6227
  default: true,
6224
6228
  env: "THREADBASE_FEATURE_SESSION_REHYDRATION"
6225
6229
  },
6230
+ {
6231
+ id: "liveActivityPush",
6232
+ description: "Drive iOS Live Activity surfaces for running sessions. Off by default: the streamer half needs an APNs p8 and a registered push-to-start token, and without both, mobile falls back to starting the activity locally \u2014 which freezes the moment the app backgrounds and expires silently after ~8h. Mobile reads this flag and skips its local path too, so one switch turns the whole surface off.",
6233
+ default: false,
6234
+ env: "THREADBASE_FEATURE_LIVE_ACTIVITY_PUSH"
6235
+ },
6226
6236
  {
6227
6237
  id: "ptyHost",
6228
6238
  description: "Keep live PTYs in a separate host process so a streamer restart can reconnect without restarting the agents. Off by default until cross-platform behavior is qualified.",
@@ -149553,6 +149563,13 @@ var StreamerServer = class {
149553
149563
  * on disk; neither it nor any device token is ever logged.
149554
149564
  */
149555
149565
  initLiveActivityPush(pushRepo) {
149566
+ if (!this.featureFlags.liveActivityPush) {
149567
+ this.log.info(
149568
+ "Live Activity push is disabled by the liveActivityPush feature flag. Enable it with THREADBASE_FEATURE_LIVE_ACTIVITY_PUSH=1, --feature liveActivityPush=true, or feature_flags: in server.yaml.",
149569
+ { event: "live_activity.disabled" }
149570
+ );
149571
+ return;
149572
+ }
149556
149573
  const creds = readApnsCredentialsFromEnv();
149557
149574
  if (!creds) {
149558
149575
  const why = describeMissingApnsCredentials();
@@ -157474,6 +157491,17 @@ program2.command("serve").description("Start the streamer server").option("-p, -
157474
157491
  takeoverProd2({ port: plan.port, repoToplevel });
157475
157492
  }
157476
157493
  }
157494
+ const spawnMode = effectivePermissionMode(
157495
+ claudeFlags,
157496
+ resolvedDefaultPermissionMode ?? loadDefaultPermissionMode()
157497
+ );
157498
+ if (spawnMode !== void 0 && isDangerousPermissionMode(spawnMode)) {
157499
+ log14.warn(
157500
+ `[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.`,
157501
+ void 0,
157502
+ "console"
157503
+ );
157504
+ }
157477
157505
  const server = new StreamerServer({
157478
157506
  port: resolvedPort,
157479
157507
  apiKey,