@beatos/bridge-runner 0.10.0 → 0.10.1

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/README.md CHANGED
@@ -645,8 +645,16 @@ offers on beatos.app, see [Connect folders from beatos.app](#connect-folders-fro
645
645
  and the command, file path or search it uses (300 characters at most), for
646
646
  example `Read ~/projects/acme-app/README.md`.
647
647
 
648
- What never leaves: the output of tool calls, file contents, sessions in
649
- other folders, `claude -p` sessions the runner did not start, and keys: a
648
+ A session can use more than one of your project folders (it ran `cd` to
649
+ another repo, or it was continued in another folder). From runner 0.10.1 it
650
+ is shown when every folder it used lately (the folders its last lines name)
651
+ and the folder it started in are project folders the runner offers, and none
652
+ of them is protected (`protectPaths` or a key folder). Its folder on the card
653
+ is the one it runs in now when it is open, else the one it started in. A
654
+ session that touched any other folder stays hidden.
655
+
656
+ What never leaves: the output of tool calls, file contents, sessions that
657
+ used a folder the runner does not offer, `claude -p` sessions the runner did not start, and keys: a
650
658
  text that looks like a key or a token becomes `[hidden]`, and the home folder
651
659
  becomes `~`.
652
660
 
package/dist/runner.js CHANGED
@@ -50,7 +50,7 @@ import { decideAction } from "./policy.js";
50
50
  import { claudeArgs, comprehensionArgs, sessionSettings, agentEnv } from "./safety.js";
51
51
  import { processVideos, realVideoFs } from "./video.js";
52
52
  import { comprehensionLanguage, comprehensionPrompt, comprehensionTaskText, TASK_TEXT_FILE, useSavedVideos, VAULT_LIMITS, } from "./video-vault.js";
53
- export const RUNNER_VERSION = "0.10.0";
53
+ export const RUNNER_VERSION = "0.10.1";
54
54
  /** A model name from Bridge goes into argv: plain names only. */
55
55
  const MODEL_RE = /^[A-Za-z0-9._-]{1,64}$/;
56
56
  const CLAIM_REFRESH_MS = 5 * 60_000;
@@ -12,7 +12,9 @@
12
12
  *
13
13
  * Rules that never change:
14
14
  * - a session is shown only when its cwd is a folder of the runner's last
15
- * folder scan or inside one, and not under a denied path;
15
+ * folder scan or inside one, and not under a denied path. A session that
16
+ * moved (its tail names other folders) is shown only when every folder its
17
+ * tail names, and the folder it started in, pass the same test;
16
18
  * - `claude -p` sessions (entrypoint sdk-cli) are shown only when this runner
17
19
  * started them;
18
20
  * - links are never followed; a big transcript is read by its tail only
@@ -765,9 +767,19 @@ export class SessionScanner {
765
767
  const root = rootFor(cwd, input.folders, platform);
766
768
  if (!root || deniedFolder(cwd, input.cfg, home, platform))
767
769
  return null;
768
- // Every cwd the tail names must be in the same allowed folder too.
769
- if (item.tail.cwds.some((x) => !within(x, root, platform)))
770
+ // Every cwd the tail names must be in an allowed folder too, and not denied. It may be another
771
+ // allowed folder than the session's own: a session can move (a `cd` to another repo, or the
772
+ // session continued in another folder; Claude Code keeps its transcript where it started).
773
+ const elsewhere = item.tail.cwds.filter((x) => !within(x, root, platform));
774
+ const allowed = (x) => rootFor(x, input.folders, platform) !== null && !deniedFolder(x, input.cfg, home, platform);
775
+ if (!elsewhere.every(allowed))
770
776
  return null;
777
+ // A session that moved: the folder it started in (the one its transcript belongs to) must be allowed too.
778
+ if (elsewhere.length > 0) {
779
+ const start = head().firstCwd;
780
+ if (!start || !allowed(start))
781
+ return null;
782
+ }
771
783
  // `claude -p` sessions only when this runner started them.
772
784
  const entrypoint = live?.entrypoint ?? head().entrypoint ?? item.tail.entrypoint;
773
785
  // A session from the computer that this runner continues in place is still one from the computer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beatos/bridge-runner",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "description": "BeatOS Bridge runner: a small program on your own computer that takes BeatOS tasks for your agent and works them with Claude Code. It only dials out to beatos.app.",
6
6
  "license": "MIT",