@paradow/ledge 0.10.0 → 0.11.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.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  attachEnv
3
- } from "./chunk-IC5RHOX6.js";
4
- import "./chunk-GMKS55KF.js";
3
+ } from "./chunk-47G477C7.js";
4
+ import "./chunk-TSA5LD4D.js";
5
5
  import {
6
6
  realTmux
7
- } from "./chunk-TO4XO2ML.js";
7
+ } from "./chunk-YV7BMEEB.js";
8
8
  import "./chunk-YUSY3E47.js";
9
9
  import {
10
10
  connect
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  exitFile,
3
3
  spawnSession
4
- } from "./chunk-GMKS55KF.js";
4
+ } from "./chunk-TSA5LD4D.js";
5
5
  import {
6
6
  realTmux
7
- } from "./chunk-TO4XO2ML.js";
7
+ } from "./chunk-YV7BMEEB.js";
8
8
  import {
9
9
  log
10
10
  } from "./chunk-YUSY3E47.js";
@@ -0,0 +1,6 @@
1
+ // src/version.ts
2
+ var LEDGE_VERSION = true ? "0.11.0" : "0.0.0-dev";
3
+
4
+ export {
5
+ LEDGE_VERSION
6
+ };
@@ -143,9 +143,22 @@ function claudeSessionId(tool, args) {
143
143
  function exitFile(id) {
144
144
  return join2(paths().dir, `exit-${id}`);
145
145
  }
146
+ var PARENT_AGENT_VARS = [
147
+ "CLAUDECODE",
148
+ "CLAUDE_CODE_CHILD_SESSION",
149
+ "CLAUDE_CODE_SESSION_ID",
150
+ "CLAUDE_CODE_SESSION_ATTENDED",
151
+ "CLAUDE_CODE_ENTRYPOINT",
152
+ "CLAUDE_CODE_EXECPATH",
153
+ "CLAUDE_CODE_MESSAGING_SOCKET",
154
+ "CLAUDE_CODE_MESSAGING_TOKEN",
155
+ "CLAUDE_PID",
156
+ "CLAUDE_EFFORT"
157
+ ];
158
+ var PARENT_AGENT = new Set(PARENT_AGENT_VARS);
146
159
  function agentEnv(base, extra) {
147
160
  const env = {};
148
- for (const [k, v] of Object.entries(base)) if (v !== void 0 && k !== "TMUX" && !k.startsWith("TMUX_")) env[k] = v;
161
+ for (const [k, v] of Object.entries(base)) if (v !== void 0 && k !== "TMUX" && !k.startsWith("TMUX_") && !PARENT_AGENT.has(k)) env[k] = v;
149
162
  return { ...env, ...extra };
150
163
  }
151
164
  async function spawnSession(opts) {
@@ -163,7 +176,7 @@ async function spawnSession(opts) {
163
176
  const env = opts.env ?? process.env;
164
177
  const transcriptPath = agentSessionId ? claudeTranscriptPath(opts.cwd, agentSessionId, env) : void 0;
165
178
  const command = opts.recordExit ? ["sh", "-c", '"$@"; echo $? > "$0"', exitFile(id), ...agent] : agent;
166
- await opts.tmux.newSession({ name: tmuxSession, cwd: opts.cwd, env: agentEnv(env, { LEDGE_SESSION: id, LEDGE_NAME: name, ...opts.tool === "codex" ? { [CODEX_ENV_VAR]: id } : {} }), command });
179
+ await opts.tmux.newSession({ name: tmuxSession, cwd: opts.cwd, env: agentEnv(env, { LEDGE_SESSION: id, LEDGE_NAME: name, ...opts.tool === "codex" ? { [CODEX_ENV_VAR]: id } : {} }), unset: PARENT_AGENT_VARS, command });
167
180
  const at = now();
168
181
  return { id, name, tool: opts.tool, cwd: opts.cwd, project, title: `${name} \xB7 ${project}`, tmuxSession, state: "starting", helpers: [], startedAt: at, lastActivityAt: at, source: "launcher", ...agentSessionId ? { agentSessionId } : {}, ...transcriptPath ? { transcriptPath } : {} };
169
182
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  run
3
- } from "./chunk-TO4XO2ML.js";
3
+ } from "./chunk-YV7BMEEB.js";
4
4
  import {
5
5
  ensureLedgeDir,
6
6
  paths
@@ -30,8 +30,9 @@ function realTmux(socket = "ledge", opts = {}) {
30
30
  const base = () => ["-L", socket, "-f", paths().tmuxConf];
31
31
  const t = (args, env) => run([...base(), ...args], env);
32
32
  return {
33
- async newSession({ name, cwd, env, command }) {
33
+ async newSession({ name, cwd, env, unset = [], command }) {
34
34
  const envArgs = Object.entries(env).flatMap(([k, v]) => ["-e", `${k}=${v}`]);
35
+ if (unset.length) command = ["env", ...unset.flatMap((v) => ["-u", v]), ...command];
35
36
  const clientEnv = env.PATH === void 0 ? void 0 : { ...process.env, PATH: env.PATH };
36
37
  const args = [...base(), "new-session", "-d", "-s", name, "-c", cwd, "-x", "200", "-y", "50", ...envArgs, "--", ...command];
37
38
  const serverUp = (await t(["list-sessions"])).code === 0;
@@ -19,19 +19,19 @@ import {
19
19
  claudePlan,
20
20
  claudeToolAnswered,
21
21
  spawnSession
22
- } from "./chunk-GMKS55KF.js";
22
+ } from "./chunk-TSA5LD4D.js";
23
23
  import {
24
24
  LEDGE_VERSION
25
- } from "./chunk-XOPH7YDV.js";
25
+ } from "./chunk-RVEGELWF.js";
26
26
  import {
27
27
  SERVICE,
28
28
  inDaemonService,
29
29
  tmuxServerAtRisk
30
- } from "./chunk-Q7RCYJ4X.js";
30
+ } from "./chunk-USGAFLXF.js";
31
31
  import {
32
32
  realTmux,
33
33
  runFile
34
- } from "./chunk-TO4XO2ML.js";
34
+ } from "./chunk-YV7BMEEB.js";
35
35
  import {
36
36
  log
37
37
  } from "./chunk-YUSY3E47.js";
@@ -6,7 +6,7 @@ import {
6
6
  CODEX_ENV_VAR,
7
7
  CODEX_HOOK_VAR,
8
8
  codexPlan
9
- } from "./chunk-GMKS55KF.js";
9
+ } from "./chunk-TSA5LD4D.js";
10
10
  import {
11
11
  log
12
12
  } from "./chunk-YUSY3E47.js";
package/dist/cli/index.js CHANGED
@@ -17,7 +17,7 @@ async function hookMain(args) {
17
17
  try {
18
18
  const chunks = [];
19
19
  for await (const c of process.stdin) chunks.push(c);
20
- const { runHook } = await import("./hook-W46IWB7I.js");
20
+ const { runHook } = await import("./hook-7V2GJUNO.js");
21
21
  const out = await runHook(event, Buffer.concat(chunks).toString("utf8"), { tool });
22
22
  if (out) process.stdout.write(`${out}
23
23
  `);
@@ -29,7 +29,7 @@ async function main(argv) {
29
29
  const [cmd, ...rest] = argv;
30
30
  switch (cmd) {
31
31
  case "daemon": {
32
- const { startDaemon } = await import("./daemon-RI47DJDX.js");
32
+ const { startDaemon } = await import("./daemon-YY66JWIB.js");
33
33
  await startDaemon();
34
34
  await new Promise(() => {
35
35
  });
@@ -37,17 +37,17 @@ async function main(argv) {
37
37
  }
38
38
  case "--version":
39
39
  case "version": {
40
- const { LEDGE_VERSION } = await import("./version-SO5OMPGD.js");
40
+ const { LEDGE_VERSION } = await import("./version-QSIZ47AV.js");
41
41
  console.log(LEDGE_VERSION);
42
42
  return 0;
43
43
  }
44
44
  case "setup": {
45
- const { runSetup } = await import("./setup-7AEH5DC3.js");
45
+ const { runSetup } = await import("./setup-SG43PPOZ.js");
46
46
  for (const l of await runSetup()) console.log(l);
47
47
  return 0;
48
48
  }
49
49
  case "uninstall": {
50
- const { runUninstall } = await import("./uninstall-7U7ENKOS.js");
50
+ const { runUninstall } = await import("./uninstall-SD736TBP.js");
51
51
  const r = await runUninstall({ purge: rest.includes("--purge") });
52
52
  for (const l of r.lines) console.log(l);
53
53
  return r.ok ? 0 : 1;
@@ -70,11 +70,11 @@ async function main(argv) {
70
70
  case "claude":
71
71
  case "codex":
72
72
  case "cursor": {
73
- const { launch } = await import("./launch-S6XFRSZA.js");
73
+ const { launch } = await import("./launch-2IQZPPTY.js");
74
74
  return launch(cmd, rest);
75
75
  }
76
76
  case "attach": {
77
- const { attach } = await import("./attach-2DEXQEC2.js");
77
+ const { attach } = await import("./attach-6JONTTMA.js");
78
78
  return attach(rest[0] ?? "");
79
79
  }
80
80
  default:
@@ -5,12 +5,12 @@ import {
5
5
  ensureDaemon,
6
6
  launch,
7
7
  parseLaunchArgs
8
- } from "./chunk-IC5RHOX6.js";
8
+ } from "./chunk-47G477C7.js";
9
9
  import {
10
10
  agentEnv,
11
11
  exitFile
12
- } from "./chunk-GMKS55KF.js";
13
- import "./chunk-TO4XO2ML.js";
12
+ } from "./chunk-TSA5LD4D.js";
13
+ import "./chunk-YV7BMEEB.js";
14
14
  import "./chunk-YUSY3E47.js";
15
15
  import "./chunk-TC3XJUJA.js";
16
16
  import "./chunk-JOCNCNRP.js";
@@ -13,8 +13,8 @@ import {
13
13
  runSetup,
14
14
  stopDetachedDaemon,
15
15
  systemdUnit
16
- } from "./chunk-Q7RCYJ4X.js";
17
- import "./chunk-TO4XO2ML.js";
16
+ } from "./chunk-USGAFLXF.js";
17
+ import "./chunk-YV7BMEEB.js";
18
18
  import "./chunk-YUSY3E47.js";
19
19
  import "./chunk-FGOFRWIB.js";
20
20
  export {
@@ -2,8 +2,8 @@ import {
2
2
  SERVICE,
3
3
  execRunner,
4
4
  stopDetachedDaemon
5
- } from "./chunk-Q7RCYJ4X.js";
6
- import "./chunk-TO4XO2ML.js";
5
+ } from "./chunk-USGAFLXF.js";
6
+ import "./chunk-YV7BMEEB.js";
7
7
  import "./chunk-YUSY3E47.js";
8
8
  import {
9
9
  paths
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LEDGE_VERSION
3
- } from "./chunk-XOPH7YDV.js";
3
+ } from "./chunk-RVEGELWF.js";
4
4
  export {
5
5
  LEDGE_VERSION
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paradow/ledge",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Follow and answer your WSL agent sessions (Claude Code, Codex, Cursor Agent) from the Ledge island on Windows.",
5
5
  "type": "module",
6
6
  "bin": { "ledge": "dist/cli/index.js" },
@@ -1,6 +0,0 @@
1
- // src/version.ts
2
- var LEDGE_VERSION = true ? "0.10.0" : "0.0.0-dev";
3
-
4
- export {
5
- LEDGE_VERSION
6
- };