@paradow/ledge 0.32.0 → 0.34.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.
Files changed (42) hide show
  1. package/dist/cli/{action-HUKZUHQ7.js → action-K42H5BDA.js} +5 -5
  2. package/dist/cli/{attach-ILMHKRUI.js → attach-KEE4A5YP.js} +28 -15
  3. package/dist/cli/{bridge-LFKUCKQP.js → bridge-X327AZY4.js} +2 -2
  4. package/dist/cli/{chunk-VGAPV4DC.js → chunk-25RVT5MR.js} +3 -103
  5. package/dist/cli/{chunk-Q6RMLRPI.js → chunk-3OJCWJAA.js} +2 -2
  6. package/dist/cli/chunk-4OYVM4MT.js +49 -0
  7. package/dist/cli/{chunk-IE52REEI.js → chunk-4TCSADFR.js} +5 -23
  8. package/dist/cli/{chunk-HOOHS3MX.js → chunk-53ISXX2R.js} +1 -1
  9. package/dist/cli/{chunk-6IYPRUQG.js → chunk-54KF5RBY.js} +1 -1
  10. package/dist/cli/{chunk-CXZETRPA.js → chunk-7NHQGP6J.js} +1 -1
  11. package/dist/cli/{chunk-U7J2AN3F.js → chunk-G7XPEVCG.js} +5 -5
  12. package/dist/cli/{chunk-2BLPGRLO.js → chunk-IWY7DSSO.js} +835 -1030
  13. package/dist/cli/{chunk-SUBKKCGA.js → chunk-KPDTYX7F.js} +3 -3
  14. package/dist/cli/chunk-RPH773TY.js +6 -0
  15. package/dist/cli/{chunk-YHZIHIGI.js → chunk-RX5CJ7YH.js} +3 -5
  16. package/dist/cli/{chunk-NLL2EQJ2.js → chunk-T547FLQN.js} +38 -4
  17. package/dist/cli/{chunk-K7UEKSB2.js → chunk-UJ2WBGLW.js} +2 -2
  18. package/dist/cli/{chunk-OPUIV6PR.js → chunk-ULOMKEB6.js} +4 -4
  19. package/dist/cli/{chunk-5JNJFBKZ.js → chunk-V4XKKL6K.js} +13 -40
  20. package/dist/cli/{chunk-EGXOBQZI.js → daemon-RO43S3S5.js} +4655 -2964
  21. package/dist/cli/{decide-3B6LGVNN.js → decide-KZFYL3HY.js} +5 -5
  22. package/dist/cli/{handover-IX7EFDIP.js → handover-BWNMI2RA.js} +5 -5
  23. package/dist/cli/{hook-G7UA6MB6.js → hook-ZLWXI5EQ.js} +21 -71
  24. package/dist/cli/index.js +18 -25
  25. package/dist/cli/launch-GCX7TXOH.js +28 -0
  26. package/dist/cli/{send-55RWY4LZ.js → send-SXZAPVRH.js} +5 -5
  27. package/dist/cli/{setup-K42IVMHS.js → setup-TJ32FMVJ.js} +4 -4
  28. package/dist/cli/{status-NT5ZUYM6.js → status-YDVRES4E.js} +3 -3
  29. package/dist/cli/{task-GABQ4SKY.js → task-TUSOVJK7.js} +5 -5
  30. package/dist/cli/{tui-AMW2XAH5.js → tui-TCVIRZCQ.js} +1411 -1277
  31. package/dist/cli/{uninstall-4IMMR55T.js → uninstall-QO7YMSLA.js} +4 -4
  32. package/dist/cli/{version-35XLTEMX.js → version-BAYSYWFP.js} +1 -1
  33. package/dist/cli/who-6AZYSP7T.js +12 -0
  34. package/dist/ledge-guide.md +26 -49
  35. package/package.json +2 -1
  36. package/dist/cli/chunk-5FKHISVK.js +0 -160
  37. package/dist/cli/chunk-M7364G3S.js +0 -6
  38. package/dist/cli/chunk-QQVWFOPU.js +0 -290
  39. package/dist/cli/daemon-UJTMG3D4.js +0 -2322
  40. package/dist/cli/launch-2GZIRF3A.js +0 -36
  41. package/dist/cli/team-IK2RYXW2.js +0 -205
  42. package/dist/cli/who-4FRIGYVT.js +0 -12
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  runOnClient
3
- } from "./chunk-OPUIV6PR.js";
3
+ } from "./chunk-ULOMKEB6.js";
4
4
  import {
5
5
  CODEX_HOOK_VAR
6
- } from "./chunk-IE52REEI.js";
6
+ } from "./chunk-4TCSADFR.js";
7
7
  import {
8
8
  connect
9
- } from "./chunk-CXZETRPA.js";
9
+ } from "./chunk-7NHQGP6J.js";
10
10
  import {
11
11
  LEDGE_GIVER,
12
12
  TASK_TEXT_MAX
13
- } from "./chunk-2BLPGRLO.js";
14
- import "./chunk-HOOHS3MX.js";
13
+ } from "./chunk-IWY7DSSO.js";
14
+ import "./chunk-53ISXX2R.js";
15
15
  import "./chunk-U67V476Y.js";
16
16
 
17
17
  // src/cli/decide.ts
@@ -3,11 +3,11 @@ import {
3
3
  handoverArgs,
4
4
  handoverOnClient,
5
5
  runHandover
6
- } from "./chunk-SUBKKCGA.js";
7
- import "./chunk-IE52REEI.js";
8
- import "./chunk-CXZETRPA.js";
9
- import "./chunk-2BLPGRLO.js";
10
- import "./chunk-HOOHS3MX.js";
6
+ } from "./chunk-KPDTYX7F.js";
7
+ import "./chunk-4TCSADFR.js";
8
+ import "./chunk-7NHQGP6J.js";
9
+ import "./chunk-IWY7DSSO.js";
10
+ import "./chunk-53ISXX2R.js";
11
11
  import "./chunk-U67V476Y.js";
12
12
  export {
13
13
  HANDOVER_USAGE,
@@ -3,51 +3,43 @@ import {
3
3
  gitInfo,
4
4
  messageNote,
5
5
  readPeers,
6
- resolveRoleAddress,
7
6
  resolveTarget,
8
- seatContext,
9
- seatKey,
10
- seatView,
11
- takeImages,
12
- teamChangeLine,
13
- teammates
14
- } from "./chunk-VGAPV4DC.js";
15
- import {
16
- findRole
17
- } from "./chunk-5FKHISVK.js";
7
+ takeImages
8
+ } from "./chunk-25RVT5MR.js";
18
9
  import {
19
10
  parseLedgeCommand,
20
11
  readOnClient,
21
12
  sendOnClient
22
- } from "./chunk-Q6RMLRPI.js";
13
+ } from "./chunk-3OJCWJAA.js";
23
14
  import {
24
15
  taskOnClient
25
- } from "./chunk-U7J2AN3F.js";
16
+ } from "./chunk-G7XPEVCG.js";
26
17
  import {
27
18
  handoverOnClient
28
- } from "./chunk-SUBKKCGA.js";
19
+ } from "./chunk-KPDTYX7F.js";
29
20
  import {
30
21
  CODEX_ENV_VAR,
31
22
  CODEX_HOOK_VAR,
32
23
  codexPlan
33
- } from "./chunk-IE52REEI.js";
24
+ } from "./chunk-4TCSADFR.js";
34
25
  import {
35
26
  formatWho
36
- } from "./chunk-YHZIHIGI.js";
27
+ } from "./chunk-RX5CJ7YH.js";
37
28
  import {
38
29
  connect,
39
30
  sendMessageAndAwaitAck
40
- } from "./chunk-CXZETRPA.js";
31
+ } from "./chunk-7NHQGP6J.js";
41
32
  import {
42
33
  MESSAGE_MAX,
34
+ RigSeatNameSchema,
43
35
  taskClosed
44
- } from "./chunk-2BLPGRLO.js";
36
+ } from "./chunk-IWY7DSSO.js";
45
37
  import {
46
38
  log
47
- } from "./chunk-6IYPRUQG.js";
39
+ } from "./chunk-54KF5RBY.js";
48
40
  import {
49
41
  paths
50
- } from "./chunk-HOOHS3MX.js";
42
+ } from "./chunk-53ISXX2R.js";
51
43
  import "./chunk-U67V476Y.js";
52
44
 
53
45
  // src/cli/hook.ts
@@ -358,14 +350,13 @@ function identityContext(s) {
358
350
  `Tu es ${s.name}, ${where} : une session lanc\xE9e par Ledge (${s.tool}). Les autres sessions Ledge te connaissent sous le nom ${s.name}.`,
359
351
  "Pour voir les autres sessions (nom, outil, \xE9tat, projet, branche, sujet), lance `ledge who`.",
360
352
  s.tool === "claude" ? "Pour \xE9crire \xE0 une autre session Ledge, Claude ou Codex, utilise son nom Ledge (donn\xE9 par `ledge who`) comme adresse SendMessage : Ledge le transmet. `ListAgents` montre les noms internes de Claude, pas les noms Ledge." : "Pour \xE9crire \xE0 une autre session Ledge, lance `ledge send <nom> \"<message>\"` (seul, sans && ni |). Ledge ex\xE9cute lui-m\xEAme `ledge send`, `ledge read`, `ledge task` et `ledge who` : leur r\xE9sultat t'arrive comme \xAB Command blocked by PreToolUse hook: \u2026 \xBB, c'est la r\xE9ponse, pas une erreur.",
361
- "Un long message d'une autre session t'arrive en aper\xE7u avec son id : lance `ledge read <id>` pour le lire en entier. Une `<ledge-notice>` vient de Ledge : soit un de tes messages n'a pas pu \xEAtre remis, soit un changement te concerne (ta consigne de r\xF4le, ton \xE9quipe).",
353
+ "Un long message d'une autre session t'arrive en aper\xE7u avec son id : lance `ledge read <id>` pour le lire en entier. Une `<ledge-notice>` vient de Ledge : un de tes messages n'a pas pu \xEAtre remis.",
362
354
  'Un message sert \xE0 pr\xE9venir ; pour confier un travail qui ne doit pas se perdre, lance plut\xF4t `ledge task give <nom> "<titre>" "<d\xE9tail>"` (`ledge task` pour le reste). Une `<ledge-task>` t\'en confie une, ou te dit comment une des tiennes a fini : quand on t\'en confie une, prends-la (`ledge task take <id>`) et termine-la toujours (`ledge task done <id> "<r\xE9sultat>"`, ou `refuse`). Une d\xE9cision qui revient \xE0 l\'utilisateur se pose avec `ledge task give ledge "<question>" "<options, ta recommandation>"` : sa r\xE9ponse te r\xE9veille, inutile d\'attendre la fin pour la poser.',
363
- ...s.seat ? [s.seat] : [],
364
355
  ...s.relieves ? [`Tu as pris la rel\xE8ve de ${s.relieves.name}, dont le contexte \xE9tait plein : relis son bilan avec \`ledge handover show\`.`] : [],
365
356
  ...s.tasks ? [tasksContext(s.tasks) ?? ""].filter(Boolean) : []
366
357
  ].join("\n");
367
358
  }
368
- async function identity(agent, cwd, known, deadline, live = { sessions: [], teams: [] }) {
359
+ async function identity(agent, cwd, known, deadline) {
369
360
  const name = known?.name ?? process.env.LEDGE_NAME;
370
361
  const dir = known?.cwd ?? cwd;
371
362
  if (!name || !dir) return void 0;
@@ -377,36 +368,9 @@ async function identity(agent, cwd, known, deadline, live = { sessions: [], team
377
368
  project: known?.project ?? (basename(dir) || dir),
378
369
  ...known?.repo ?? git?.repo ? { repo: known?.repo ?? git.repo } : {},
379
370
  ...known?.branch ?? git?.branch ? { branch: known?.branch ?? git.branch } : {},
380
- ...known?.worktree ?? git?.worktree ? { worktree: true } : {},
381
- ...seatOf(known, dir, live)
371
+ ...known?.worktree ?? git?.worktree ? { worktree: true } : {}
382
372
  };
383
373
  }
384
- function seatOf(known, dir, live) {
385
- const roleId = known?.role ?? process.env.LEDGE_ROLE;
386
- if (!roleId) return {};
387
- let role;
388
- try {
389
- role = findRole(roleId, dir);
390
- } catch {
391
- role = void 0;
392
- }
393
- const team = known?.team ? live.teams.find((t) => t.id === known.team && t.state !== "dissolved") : void 0;
394
- const seat = seatContext({ ...role ? { role } : {}, roleId, roleLabel: known?.roleLabel, ...team ? { team: { name: team.name, members: teammates(team, live.sessions).filter((m) => m.name !== known?.name) } } : {} });
395
- return seat ? { seat } : {};
396
- }
397
- var SEAT_REFRESH_MS = 500;
398
- async function seatChange(client, id, deadline) {
399
- const left = () => Math.max(0, deadline - Date.now());
400
- const snapshot = await client.next("snapshot", left()).catch(() => void 0);
401
- const me = snapshot?.sessions.find((s) => s.id === id);
402
- if (!snapshot || !me || !me.team && !me.teamSeen) return void 0;
403
- const teams = me.team ? (await client.next("teams", left()).catch(() => void 0))?.teams : [];
404
- if (!teams) return void 0;
405
- const key = seatKey(seatView(id, snapshot.sessions, teams));
406
- if (key === me.teamSeen) return void 0;
407
- client.send({ type: "seat.seen", id, key });
408
- return teamChangeLine(me.teamSeen, key);
409
- }
410
374
  var SEND_MESSAGE_MS = 1500;
411
375
  var deny = (reason) => JSON.stringify({ hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny", permissionDecisionReason: reason } });
412
376
  async function relayMessage(client, from, toolUseId, input, deadline) {
@@ -416,14 +380,7 @@ async function relayMessage(client, from, toolUseId, input, deadline) {
416
380
  const snapshot = await client.next("snapshot", left());
417
381
  const sender = snapshot.sessions.find((s) => s.id === from);
418
382
  if (sender?.source !== "launcher") return void 0;
419
- let address = to;
420
- if (to.startsWith("@")) {
421
- const teams = sender.team ? (await client.next("teams", left()).catch(() => void 0))?.teams ?? [] : [];
422
- const role = resolveRoleAddress(to, from, snapshot.sessions, teams);
423
- if ("reason" in role) return deny(`Ledge n'a pas pu transmettre le message \xE0 ${to} : ${role.reason}`);
424
- address = role.to;
425
- }
426
- const r = resolveTarget(address, snapshot.sessions, readPeers());
383
+ const r = resolveTarget(to, snapshot.sessions, readPeers());
427
384
  if (r.outcome === "unknown") return void 0;
428
385
  if (r.outcome === "refused") return deny(`Ledge n'a pas pu transmettre le message \xE0 ${to} : ${r.reason}`);
429
386
  if (r.outcome === "native") {
@@ -434,7 +391,7 @@ async function relayMessage(client, from, toolUseId, input, deadline) {
434
391
  }
435
392
  const tool = r.target.tool;
436
393
  const summary = str(input.summary);
437
- const ack = await sendMessageAndAwaitAck(client, { type: "session.message", rid: toolUseId, from, to: address, text: input.message, ...summary ? { summary } : {}, intercept: true }, left());
394
+ const ack = await sendMessageAndAwaitAck(client, { type: "session.message", rid: toolUseId, from, to, text: input.message, ...summary ? { summary } : {}, intercept: true }, left());
438
395
  const target = `${to} (${tool})`;
439
396
  const reason = ack.outcome === "accepted" ? `Message transmis par Ledge \xE0 ${target} : il le re\xE7oit maintenant.` : ack.outcome === "queued" ? `Message transmis par Ledge \xE0 ${target} : il le recevra d\xE8s qu'il sera libre.` : ack.outcome === "refused" ? `Ledge n'a pas pu transmettre le message \xE0 ${to} : ${ack.reason ?? "raison inconnue"}` : void 0;
440
397
  return reason ? deny(reason) : void 0;
@@ -459,10 +416,8 @@ async function runHook(eventName, stdin, opts = {}) {
459
416
  let mapped = null;
460
417
  let identify = false;
461
418
  let known;
462
- let live = { sessions: [], teams: [] };
463
419
  let deadline = Date.now() + (opts.timeoutMs ?? 100);
464
420
  let relayed;
465
- let seatLine;
466
421
  let held = [];
467
422
  try {
468
423
  const payload = JSON.parse(stdin || "{}");
@@ -473,25 +428,21 @@ async function runHook(eventName, stdin, opts = {}) {
473
428
  }
474
429
  const launchedId = agent === "codex" ? codexLedgeId() : agent === "claude" ? process.env.LEDGE_SESSION : void 0;
475
430
  identify = eventName === "SessionStart" && !!launchedId && mapped.id === launchedId;
476
- const refresh = eventName === "UserPromptSubmit" && agent !== "cursor" && !!launchedId && mapped.id === launchedId;
477
431
  const input = payload.tool_input ?? {};
478
432
  const intercept = agent === "claude" && eventName === "PreToolUse" && str(payload.tool_name) === "SendMessage" && typeof input.to === "string" && typeof input.message === "string" && !!input.message;
479
433
  const command = agent === "codex" && eventName === "PreToolUse" && str(payload.tool_name) === "Bash" && typeof input.command === "string" ? parseLedgeCommand(input.command) : void 0;
480
- const timeoutMs = opts.timeoutMs ?? (identify ? 1e3 : intercept || command ? SEND_MESSAGE_MS : refresh ? SEAT_REFRESH_MS : 100);
434
+ const timeoutMs = opts.timeoutMs ?? (identify ? 1e3 : intercept || command ? SEND_MESSAGE_MS : 100);
481
435
  deadline = Date.now() + timeoutMs;
482
436
  const client = await connect({ port: opts.port, timeoutMs });
483
- client.send({ type: "session.event", id: mapped.id, event: mapped.event, agent: mapped.agent, ...mapped.cwd ? { cwd: mapped.cwd } : {} });
437
+ const seat = RigSeatNameSchema.safeParse(process.env.OPENRIG_SESSION_NAME);
438
+ client.send({ type: "session.event", id: mapped.id, event: mapped.event, agent: mapped.agent, ...mapped.cwd ? { cwd: mapped.cwd } : {}, ...seat.success ? { rigSeat: seat.data } : {} });
484
439
  if (identify) {
485
440
  const snapshot = await client.next("snapshot", Math.max(0, deadline - Date.now())).catch(() => void 0);
486
441
  known = snapshot?.sessions.find((s) => s.id === mapped.id);
487
- const teamList = known?.team ? (await client.next("teams", Math.max(0, deadline - Date.now())).catch(() => void 0))?.teams : void 0;
488
- live = { sessions: snapshot?.sessions ?? [], teams: teamList ?? [] };
489
- if (snapshot && known && (!known.team || teamList)) client.send({ type: "seat.seen", id: known.id, key: seatKey(seatView(known.id, live.sessions, live.teams)) });
490
442
  client.send({ type: "task.cmd", rid: randomUUID(), by: mapped.id, op: "list" });
491
443
  const listed = await client.next("task.result", Math.max(0, deadline - Date.now())).catch(() => void 0);
492
444
  held = (listed?.tasks ?? []).filter((t) => t.owner === mapped.id && !taskClosed(t));
493
445
  }
494
- if (refresh) seatLine = await seatChange(client, mapped.id, deadline);
495
446
  if (intercept) relayed = await relayMessage(client, mapped.id, str(payload.tool_use_id), input, deadline);
496
447
  if (command) relayed = await runLedgeCommand(client, command, mapped.id, deadline);
497
448
  await Promise.race([client.close(), new Promise((r) => setTimeout(r, Math.max(0, deadline - Date.now())))]);
@@ -499,9 +450,8 @@ async function runHook(eventName, stdin, opts = {}) {
499
450
  log(`hook ${label} dropped: ${e.message}`);
500
451
  }
501
452
  if (relayed) return relayed;
502
- if (seatLine) return JSON.stringify({ hookSpecificOutput: { hookEventName: "UserPromptSubmit", additionalContext: seatLine } });
503
453
  if (!identify || !mapped) return void 0;
504
- const found = await identity(agent, mapped.cwd, known, deadline, live);
454
+ const found = await identity(agent, mapped.cwd, known, deadline);
505
455
  const who = found ? { ...found, ...held.length ? { tasks: held } : {}, ...known?.relieves ? { relieves: known.relieves } : {} } : void 0;
506
456
  return who ? JSON.stringify({ hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: identityContext(who) } }) : void 0;
507
457
  }
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/cli/index.ts
4
- var USAGE = `ledge <claude|codex|cursor> [--name <bot>] [--role <id>] [-- agent args] start an agent in a tracked session (--role: .ledge/roles/<id>.md)
4
+ var USAGE = `ledge <claude|codex|cursor> [--name <bot>] [-- agent args] start an agent in a tracked session
5
5
  ledge attach [--read-only] <id> put this terminal on a running session
6
6
  ledge daemon run the daemon in the foreground
7
7
  ledge hook [codex|cursor] <Event> receive a hook (reads JSON on stdin)
@@ -14,7 +14,6 @@ ledge read <id> print a long messag
14
14
  ledge task <give|list|show|take|done|refuse|pass> \u2026 give another session work, take it, close it (ledge task: details)
15
15
  ledge decide [<id> "<r\xE9ponse>"] the decisions sessions wait for from you; answer one
16
16
  ledge handover "<bilan>" | show the relief brief, when Ledge asks for it; show: read your predecessor's
17
- ledge team <up|list|join|leave|resume|dissolve|save> \u2026 start, list and run teams (ledge team: details; --json for agents)
18
17
  ledge close <session>\u2026 [--json] close sessions cleanly (their conversation stays resumable)
19
18
  ledge tui [--notify bell|osc9|off] [--here] follow and answer the sessions (in a Ledge tab of Windows Terminal unless --here)
20
19
  ledge bridge exchange Ledge messages over SSH stdio
@@ -25,7 +24,7 @@ async function hookMain(args) {
25
24
  try {
26
25
  const chunks = [];
27
26
  for await (const c of process.stdin) chunks.push(c);
28
- const { runHook } = await import("./hook-G7UA6MB6.js");
27
+ const { runHook } = await import("./hook-ZLWXI5EQ.js");
29
28
  const out = await runHook(event, Buffer.concat(chunks).toString("utf8"), { tool });
30
29
  if (out) process.stdout.write(`${out}
31
30
  `);
@@ -37,7 +36,7 @@ async function main(argv) {
37
36
  const [cmd, ...rest] = argv;
38
37
  switch (cmd) {
39
38
  case "daemon": {
40
- const { startDaemon } = await import("./daemon-UJTMG3D4.js");
39
+ const { startDaemon } = await import("./daemon-RO43S3S5.js");
41
40
  await startDaemon();
42
41
  await new Promise(() => {
43
42
  });
@@ -45,17 +44,17 @@ async function main(argv) {
45
44
  }
46
45
  case "--version":
47
46
  case "version": {
48
- const { LEDGE_VERSION } = await import("./version-35XLTEMX.js");
47
+ const { LEDGE_VERSION } = await import("./version-BAYSYWFP.js");
49
48
  console.log(LEDGE_VERSION);
50
49
  return 0;
51
50
  }
52
51
  case "setup": {
53
- const { runSetup } = await import("./setup-K42IVMHS.js");
52
+ const { runSetup } = await import("./setup-TJ32FMVJ.js");
54
53
  for (const l of await runSetup()) console.log(l);
55
54
  return 0;
56
55
  }
57
56
  case "uninstall": {
58
- const { runUninstall, uninstallArgs } = await import("./uninstall-4IMMR55T.js");
57
+ const { runUninstall, uninstallArgs } = await import("./uninstall-QO7YMSLA.js");
59
58
  const args = uninstallArgs(rest);
60
59
  if (!args) {
61
60
  console.log(USAGE);
@@ -66,74 +65,68 @@ async function main(argv) {
66
65
  return r.ok ? 0 : 1;
67
66
  }
68
67
  case "status": {
69
- const { printStatus } = await import("./status-NT5ZUYM6.js");
68
+ const { printStatus } = await import("./status-YDVRES4E.js");
70
69
  console.log(await printStatus());
71
70
  return 0;
72
71
  }
73
72
  case "who": {
74
- const { printWho } = await import("./who-4FRIGYVT.js");
73
+ const { printWho } = await import("./who-6AZYSP7T.js");
75
74
  console.log(await printWho());
76
75
  return 0;
77
76
  }
78
77
  case "send": {
79
- const { sendMessage } = await import("./send-55RWY4LZ.js");
78
+ const { sendMessage } = await import("./send-SXZAPVRH.js");
80
79
  const r = await sendMessage(rest);
81
80
  console.log(r.line);
82
81
  return r.code;
83
82
  }
84
83
  case "read": {
85
- const { readMessage } = await import("./send-55RWY4LZ.js");
84
+ const { readMessage } = await import("./send-SXZAPVRH.js");
86
85
  const r = await readMessage(rest);
87
86
  console.log(r.line);
88
87
  return r.code;
89
88
  }
90
89
  case "task": {
91
- const { runTask } = await import("./task-GABQ4SKY.js");
90
+ const { runTask } = await import("./task-TUSOVJK7.js");
92
91
  const r = await runTask(rest);
93
92
  console.log(r.line);
94
93
  return r.code;
95
94
  }
96
95
  case "decide": {
97
- const { runDecide } = await import("./decide-3B6LGVNN.js");
96
+ const { runDecide } = await import("./decide-KZFYL3HY.js");
98
97
  const r = await runDecide(rest);
99
98
  console.log(r.line);
100
99
  return r.code;
101
100
  }
102
101
  case "handover": {
103
- const { runHandover } = await import("./handover-IX7EFDIP.js");
102
+ const { runHandover } = await import("./handover-BWNMI2RA.js");
104
103
  const r = await runHandover(rest);
105
104
  console.log(r.line);
106
105
  return r.code;
107
106
  }
108
107
  case "close": {
109
- const { runClose } = await import("./action-HUKZUHQ7.js");
108
+ const { runClose } = await import("./action-K42H5BDA.js");
110
109
  const r = await runClose(rest);
111
110
  console.log(r.line);
112
111
  return r.code;
113
112
  }
114
- case "team": {
115
- const { runTeam } = await import("./team-IK2RYXW2.js");
116
- const r = await runTeam(rest);
117
- console.log(r.line);
118
- return r.code;
119
- }
120
113
  case "tui": {
121
- const { runTui } = await import("./tui-AMW2XAH5.js");
114
+ const { runTui } = await import("./tui-TCVIRZCQ.js");
122
115
  return runTui(rest);
123
116
  }
124
117
  case "bridge": {
125
- const { bridge } = await import("./bridge-LFKUCKQP.js");
118
+ const { bridge } = await import("./bridge-X327AZY4.js");
126
119
  await bridge();
127
120
  return 0;
128
121
  }
129
122
  case "claude":
130
123
  case "codex":
131
124
  case "cursor": {
132
- const { launch } = await import("./launch-2GZIRF3A.js");
125
+ const { launch } = await import("./launch-GCX7TXOH.js");
133
126
  return launch(cmd, rest);
134
127
  }
135
128
  case "attach": {
136
- const { attach } = await import("./attach-ILMHKRUI.js");
129
+ const { attach } = await import("./attach-KEE4A5YP.js");
137
130
  return attach(rest.find((a) => !a.startsWith("--")) ?? "", { readOnly: rest.includes("--read-only") });
138
131
  }
139
132
  default:
@@ -0,0 +1,28 @@
1
+ import {
2
+ DaemonError,
3
+ attachEnv,
4
+ createSession,
5
+ ensureDaemon,
6
+ launch,
7
+ parseLaunchArgs
8
+ } from "./chunk-V4XKKL6K.js";
9
+ import {
10
+ agentEnv,
11
+ exitFile
12
+ } from "./chunk-4TCSADFR.js";
13
+ import "./chunk-7NHQGP6J.js";
14
+ import "./chunk-IWY7DSSO.js";
15
+ import "./chunk-T547FLQN.js";
16
+ import "./chunk-54KF5RBY.js";
17
+ import "./chunk-53ISXX2R.js";
18
+ import "./chunk-U67V476Y.js";
19
+ export {
20
+ DaemonError,
21
+ agentEnv,
22
+ attachEnv,
23
+ createSession,
24
+ ensureDaemon,
25
+ exitFile,
26
+ launch,
27
+ parseLaunchArgs
28
+ };
@@ -4,11 +4,11 @@ import {
4
4
  readOnClient,
5
5
  sendMessage,
6
6
  sendOnClient
7
- } from "./chunk-Q6RMLRPI.js";
8
- import "./chunk-IE52REEI.js";
9
- import "./chunk-CXZETRPA.js";
10
- import "./chunk-2BLPGRLO.js";
11
- import "./chunk-HOOHS3MX.js";
7
+ } from "./chunk-3OJCWJAA.js";
8
+ import "./chunk-4TCSADFR.js";
9
+ import "./chunk-7NHQGP6J.js";
10
+ import "./chunk-IWY7DSSO.js";
11
+ import "./chunk-53ISXX2R.js";
12
12
  import "./chunk-U67V476Y.js";
13
13
  export {
14
14
  parseLedgeCommand,
@@ -14,10 +14,10 @@ import {
14
14
  stopDetachedDaemon,
15
15
  systemdUnit,
16
16
  writeBin
17
- } from "./chunk-K7UEKSB2.js";
18
- import "./chunk-NLL2EQJ2.js";
19
- import "./chunk-6IYPRUQG.js";
20
- import "./chunk-HOOHS3MX.js";
17
+ } from "./chunk-UJ2WBGLW.js";
18
+ import "./chunk-T547FLQN.js";
19
+ import "./chunk-54KF5RBY.js";
20
+ import "./chunk-53ISXX2R.js";
21
21
  import "./chunk-U67V476Y.js";
22
22
  export {
23
23
  BIN_MARK,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-CXZETRPA.js";
4
- import "./chunk-2BLPGRLO.js";
5
- import "./chunk-HOOHS3MX.js";
3
+ } from "./chunk-7NHQGP6J.js";
4
+ import "./chunk-IWY7DSSO.js";
5
+ import "./chunk-53ISXX2R.js";
6
6
  import "./chunk-U67V476Y.js";
7
7
 
8
8
  // src/cli/status.ts
@@ -4,11 +4,11 @@ import {
4
4
  runTask,
5
5
  taskArgs,
6
6
  taskOnClient
7
- } from "./chunk-U7J2AN3F.js";
8
- import "./chunk-IE52REEI.js";
9
- import "./chunk-CXZETRPA.js";
10
- import "./chunk-2BLPGRLO.js";
11
- import "./chunk-HOOHS3MX.js";
7
+ } from "./chunk-G7XPEVCG.js";
8
+ import "./chunk-4TCSADFR.js";
9
+ import "./chunk-7NHQGP6J.js";
10
+ import "./chunk-IWY7DSSO.js";
11
+ import "./chunk-53ISXX2R.js";
12
12
  import "./chunk-U67V476Y.js";
13
13
  export {
14
14
  TASK_USAGE,