sessionpipe-core 0.13.1 → 0.13.3

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/control.js CHANGED
@@ -1,4 +1,4 @@
1
- // sessionpipe-core 0.13.1 · Apache-2.0 · https://sessionpipe.org
1
+ // sessionpipe-core 0.13.3 · Apache-2.0 · https://sessionpipe.org
2
2
 
3
3
  // src/control/verify.ts
4
4
  var GRANT_MAX_MS = 24 * 36e5;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // sessionpipe-core 0.13.1 · Apache-2.0 · https://sessionpipe.org
1
+ // sessionpipe-core 0.13.3 · Apache-2.0 · https://sessionpipe.org
2
2
  var __defProp = Object.defineProperty;
3
3
  var __export = (target, all) => {
4
4
  for (var name in all)
@@ -1028,6 +1028,14 @@ function claudeAccounts(dirs, home = homeDir()) {
1028
1028
  }
1029
1029
  return out;
1030
1030
  }
1031
+ function claudeAccountDirs(dirs, home = homeDir()) {
1032
+ const out = [];
1033
+ for (const d of dirs) {
1034
+ const l = claudeLogin(d, home);
1035
+ if (l) out.push({ id: l.id, dir: d });
1036
+ }
1037
+ return out;
1038
+ }
1031
1039
  var LINK_RE = /^https:\/\/claude\.ai\/code\/session_[A-Za-z0-9]+$/;
1032
1040
  function transcriptLink(records) {
1033
1041
  for (let i = records.length - 1; i >= 0; i--) {
@@ -2723,7 +2731,8 @@ __export(claude_code_control_exports, {
2723
2731
  relaunchMode: () => relaunchMode,
2724
2732
  resolveHome: () => resolveHome,
2725
2733
  runClaude: () => runClaude,
2726
- sessionFolder: () => sessionFolder
2734
+ sessionFolder: () => sessionFolder,
2735
+ versionManagerBins: () => versionManagerBins
2727
2736
  });
2728
2737
  import { execFile, execFileSync as execFileSync3 } from "node:child_process";
2729
2738
  import { closeSync as closeSync2, openSync as openSync2, readdirSync as readdirSync4, readFileSync as readFileSync6, readSync as readSync2, statSync as statSync5 } from "node:fs";
@@ -2761,6 +2770,29 @@ var cmpVersion = (a, b) => {
2761
2770
  if ((pa[i] ?? 0) !== (pb[i] ?? 0)) return (pa[i] ?? 0) - (pb[i] ?? 0);
2762
2771
  return 0;
2763
2772
  };
2773
+ function versionManagerBins(env = process.env, home = os5.homedir()) {
2774
+ const out = [];
2775
+ const versions = (dir, tail) => {
2776
+ let names = [];
2777
+ try {
2778
+ names = readdirSync4(dir).filter((n) => /^v?\d+(\.\d+)*$/.test(n));
2779
+ } catch {
2780
+ return;
2781
+ }
2782
+ for (const n of names.sort((a, b) => cmpVersion(a.replace(/^v/, ""), b.replace(/^v/, ""))).reverse())
2783
+ out.push(path10.join(dir, n, ...tail));
2784
+ };
2785
+ versions(path10.join(env.NVM_DIR || path10.join(home, ".nvm"), "versions", "node"), ["bin"]);
2786
+ const fnmDirs = env.FNM_DIR ? [env.FNM_DIR] : [
2787
+ path10.join(home, "Library", "Application Support", "fnm"),
2788
+ path10.join(home, ".local", "share", "fnm"),
2789
+ path10.join(home, ".fnm")
2790
+ ];
2791
+ for (const d of fnmDirs) versions(path10.join(d, "node-versions"), ["installation", "bin"]);
2792
+ out.push(path10.join(env.VOLTA_HOME || path10.join(home, ".volta"), "bin"));
2793
+ versions(path10.join(env.ASDF_DATA_DIR || path10.join(home, ".asdf"), "installs", "nodejs"), ["bin"]);
2794
+ return out;
2795
+ }
2764
2796
  function findClaude(env = process.env, home = os5.homedir()) {
2765
2797
  if (env.SESSIONPIPE_CLAUDE && isExe(env.SESSIONPIPE_CLAUDE)) return env.SESSIONPIPE_CLAUDE;
2766
2798
  const names = process.platform === "win32" ? ["claude.exe", "claude.cmd"] : ["claude"];
@@ -2775,6 +2807,7 @@ function findClaude(env = process.env, home = os5.homedir()) {
2775
2807
  "/usr/local/bin/claude"
2776
2808
  ])
2777
2809
  if (isExe(p)) return p;
2810
+ for (const d of versionManagerBins(env, home)) if (isExe(path10.join(d, "claude"))) return path10.join(d, "claude");
2778
2811
  const app = path10.join(home, "Library", "Application Support", "Claude", "claude-code");
2779
2812
  let versions = [];
2780
2813
  try {
@@ -5181,7 +5214,7 @@ var DATA_ALLOW = {
5181
5214
  "attention.needed": { 0: ["attention_id", "kind"], 1: ["tool", "message", "agent_id"] },
5182
5215
  "attention.cleared": { 0: ["attention_id", "how"] },
5183
5216
  "subagent.started": { 1: ["agent_id", "agent_type"] },
5184
- "subagent.ended": { 1: ["agent_id", "agent_type"] },
5217
+ "subagent.ended": { 1: ["agent_id", "agent_type", "background"] },
5185
5218
  "context.compacted": { 1: ["trigger"] },
5186
5219
  "limits.observed": { 1: ["windows", "plan", "account_id"] },
5187
5220
  "delegation.started": { 0: ["ask_id", "via", "harness", "to"], 1: ["text"] },
@@ -5346,6 +5379,7 @@ export {
5346
5379
  antigravity_control_exports as antigravityControl,
5347
5380
  assertConfigWritable,
5348
5381
  capTail,
5382
+ claudeAccountDirs,
5349
5383
  claudeAccounts,
5350
5384
  claudeCode,
5351
5385
  claude_code_control_exports as claudeControl,