@paradow/ledge 0.21.0 → 0.22.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.
Files changed (40) hide show
  1. package/dist/cli/action-WNQ3NJGD.js +27 -0
  2. package/dist/cli/{attach-IVICSJYB.js → attach-UHM7QQ4W.js} +9 -8
  3. package/dist/cli/{bridge-H3ZPGIUY.js → bridge-R37AHVXS.js} +2 -1
  4. package/dist/cli/{chunk-ZQON4EV7.js → chunk-5VFFJ3ZC.js} +2 -2
  5. package/dist/cli/{chunk-ALEZJFJ3.js → chunk-7XMGYJTN.js} +7 -7
  6. package/dist/cli/chunk-ARB4BKZJ.js +2302 -0
  7. package/dist/cli/{chunk-24AHC55Y.js → chunk-AVKFQSRP.js} +7 -21
  8. package/dist/cli/{chunk-2VSEIOGA.js → chunk-JNLARCUC.js} +7 -4
  9. package/dist/cli/{chunk-EKXZ45MQ.js → chunk-KRFXWD5S.js} +821 -201
  10. package/dist/cli/chunk-O6FTIYJV.js +85 -0
  11. package/dist/cli/chunk-ONFWK2WW.js +6 -0
  12. package/dist/cli/{chunk-EBBAOQ2Z.js → chunk-PUJLMKZC.js} +3 -3
  13. package/dist/cli/{chunk-ZZMZDAF6.js → chunk-RKV5KYKL.js} +3 -3
  14. package/dist/cli/{chunk-WRE3PUTV.js → chunk-RYUDIFSI.js} +2 -2
  15. package/dist/cli/{chunk-AJFC33TH.js → chunk-TOFVC6IV.js} +2 -2
  16. package/dist/cli/{chunk-KACRWFN3.js → chunk-TZBI2RVU.js} +1 -1
  17. package/dist/cli/chunk-U67V476Y.js +35 -0
  18. package/dist/cli/{chunk-35BPMR6P.js → chunk-ZDEEHFU3.js} +9 -4
  19. package/dist/cli/{daemon-5FPZG5R3.js → daemon-DLJCIC7L.js} +8 -7
  20. package/dist/cli/{decide-2ZKSX7O5.js → decide-UWJMKDR4.js} +4 -3
  21. package/dist/cli/{handover-AZ35QZRK.js → handover-5JHFA5EF.js} +5 -4
  22. package/dist/cli/{hook-KANGO46Y.js → hook-XBSMUMZ7.js} +10 -9
  23. package/dist/cli/index.js +25 -18
  24. package/dist/cli/{launch-DEKJ5HI4.js → launch-OVB66BZJ.js} +9 -8
  25. package/dist/cli/{send-BFPJBXXH.js → send-Y2C3BIGK.js} +5 -4
  26. package/dist/cli/{setup-47ODKJBM.js → setup-K42IVMHS.js} +1 -0
  27. package/dist/cli/{status-JPF4NZNI.js → status-5YEORNTH.js} +3 -2
  28. package/dist/cli/{task-UTRG4KA5.js → task-R44VWZHR.js} +5 -4
  29. package/dist/cli/team-F7B3IG3I.js +205 -0
  30. package/dist/cli/tui-GL6Q3KOX.js +19115 -0
  31. package/dist/cli/{uninstall-QNWRD27D.js → uninstall-4IMMR55T.js} +1 -0
  32. package/dist/cli/version-ZPC6END5.js +7 -0
  33. package/dist/cli/who-YMSQI64I.js +12 -0
  34. package/package.json +2 -1
  35. package/dist/cli/chunk-EX66KH66.js +0 -1856
  36. package/dist/cli/chunk-NFXFY5CT.js +0 -6
  37. package/dist/cli/team-SZJHGA7D.js +0 -101
  38. package/dist/cli/tui-GEJHBWP5.js +0 -4873
  39. package/dist/cli/version-YUO6SLAF.js +0 -6
  40. package/dist/cli/who-NYPVBO64.js +0 -11
@@ -0,0 +1,85 @@
1
+ import {
2
+ CODEX_HOOK_VAR
3
+ } from "./chunk-ZDEEHFU3.js";
4
+ import {
5
+ connect
6
+ } from "./chunk-TZBI2RVU.js";
7
+ import {
8
+ SESSION_KEY_VAR,
9
+ actionById
10
+ } from "./chunk-ARB4BKZJ.js";
11
+
12
+ // src/cli/action.ts
13
+ import { randomUUID } from "crypto";
14
+ var CLOSE_USAGE = "ledge close <session>\u2026 [--json] fermer proprement des sessions (leur conversation reste reprenable)";
15
+ var DAEMON_DOWN = "daemon not running (start a session with `ledge claude`, or run `ledge daemon`)";
16
+ var RUN_MS = 6e4;
17
+ function actionArgs(id, args) {
18
+ const parsed = actionById(id).args.safeParse(args);
19
+ return parsed.success ? args : void 0;
20
+ }
21
+ function callerOf(env) {
22
+ const by = env[CODEX_HOOK_VAR] || env.LEDGE_SESSION;
23
+ const key = env[SESSION_KEY_VAR];
24
+ return by ? { by, ...key ? { key } : {} } : void 0;
25
+ }
26
+ async function runOnClient(client, action, args, opts = {}) {
27
+ const rid = randomUUID();
28
+ const by = opts.by;
29
+ client.send({ type: "action.run", rid, action, args, ...by ? { by: by.by, ...by.key ? { key: by.key } : {} } : {}, ...opts.confirmed ? { confirmed: true } : {} });
30
+ const deadline = Date.now() + (opts.ms ?? RUN_MS);
31
+ for (; ; ) {
32
+ const { type: _t, rid: got, ...r } = await client.next("action.result", Math.max(0, deadline - Date.now()));
33
+ if (got === rid) return r;
34
+ }
35
+ }
36
+ var plain = (s) => s.replace(/\*\*/g, "");
37
+ function resultLine(r, json = false) {
38
+ const ok = r.reason === void 0;
39
+ if (json) return { line: JSON.stringify({ ok, ...r }), code: ok ? 0 : 1 };
40
+ if (ok) return { line: [`fait : ${plain(r.row?.summary ?? r.action)}`, ...r.path ? [`mod\xE8le \xE9crit : ${r.path}`] : []].join("\n"), code: 0 };
41
+ if (r.code === "confirm_required") return { line: `${plain(r.row?.summary ?? r.action)} : irr\xE9versible ; relance avec --yes pour confirmer`, code: 1 };
42
+ return { line: `${r.code === "failed" ? "\xE9chec" : "refus\xE9"} : ${r.reason}`, code: 1 };
43
+ }
44
+ function closeArgs(args) {
45
+ const json = args.includes("--json");
46
+ const sessions = args.filter((a) => a !== "--json");
47
+ if (!sessions.length || sessions.some((s) => s.startsWith("--") || !actionArgs("session.close", { session: s }))) return void 0;
48
+ return { sessions, ...json ? { json: true } : {} };
49
+ }
50
+ async function runClose(args, opts = {}) {
51
+ const parsed = closeArgs(args);
52
+ if (!parsed) return { line: CLOSE_USAGE, code: args.length ? 1 : 0 };
53
+ let client;
54
+ try {
55
+ client = await connect({ port: opts.port, timeoutMs: 1500 });
56
+ } catch {
57
+ return { line: DAEMON_DOWN, code: 1 };
58
+ }
59
+ const by = callerOf(opts.env ?? process.env);
60
+ const lines = [];
61
+ try {
62
+ for (const session of parsed.sessions) {
63
+ const r = resultLine(await runOnClient(client, "session.close", { session }, { by }), parsed.json);
64
+ lines.push(r.line);
65
+ if (r.code) return { line: lines.join("\n"), code: 1 };
66
+ }
67
+ return { line: lines.join("\n"), code: 0 };
68
+ } catch (e) {
69
+ return { line: [...lines, `pas de r\xE9ponse de Ledge : ${e.message}`].join("\n"), code: 1 };
70
+ } finally {
71
+ await client.close();
72
+ }
73
+ }
74
+
75
+ export {
76
+ CLOSE_USAGE,
77
+ DAEMON_DOWN,
78
+ RUN_MS,
79
+ actionArgs,
80
+ callerOf,
81
+ runOnClient,
82
+ resultLine,
83
+ closeArgs,
84
+ runClose
85
+ };
@@ -0,0 +1,6 @@
1
+ // src/version.ts
2
+ var LEDGE_VERSION = true ? "0.22.1" : "0.0.0-dev";
3
+
4
+ export {
5
+ LEDGE_VERSION
6
+ };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-35BPMR6P.js";
3
+ } from "./chunk-ZDEEHFU3.js";
4
4
  import {
5
5
  connect
6
- } from "./chunk-KACRWFN3.js";
6
+ } from "./chunk-TZBI2RVU.js";
7
7
  import {
8
8
  LEDGE_GIVER,
9
9
  TASK_TEXT_MAX,
10
10
  TASK_TITLE_MAX
11
- } from "./chunk-EX66KH66.js";
11
+ } from "./chunk-ARB4BKZJ.js";
12
12
 
13
13
  // src/cli/task.ts
14
14
  import { randomUUID } from "crypto";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-35BPMR6P.js";
3
+ } from "./chunk-ZDEEHFU3.js";
4
4
  import {
5
5
  connect
6
- } from "./chunk-KACRWFN3.js";
6
+ } from "./chunk-TZBI2RVU.js";
7
7
  import {
8
8
  BRIEF_MAX
9
- } from "./chunk-EX66KH66.js";
9
+ } from "./chunk-ARB4BKZJ.js";
10
10
 
11
11
  // src/cli/handover.ts
12
12
  import { randomUUID } from "crypto";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ledgeTitleRest
3
- } from "./chunk-35BPMR6P.js";
3
+ } from "./chunk-ZDEEHFU3.js";
4
4
  import {
5
5
  cleanTopic,
6
6
  isArchived,
7
7
  sessionTitle
8
- } from "./chunk-EX66KH66.js";
8
+ } from "./chunk-ARB4BKZJ.js";
9
9
 
10
10
  // src/daemon/seat.ts
11
11
  function teammates(team, sessions) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-35BPMR6P.js";
3
+ } from "./chunk-ZDEEHFU3.js";
4
4
  import {
5
5
  connect,
6
6
  sendMessageAndAwaitAck
7
- } from "./chunk-KACRWFN3.js";
7
+ } from "./chunk-TZBI2RVU.js";
8
8
 
9
9
  // src/cli/send.ts
10
10
  import { randomUUID } from "crypto";
@@ -4,7 +4,7 @@ import {
4
4
  SUMMARY_MAX,
5
5
  parseServerMessage,
6
6
  readDaemonToken
7
- } from "./chunk-EX66KH66.js";
7
+ } from "./chunk-ARB4BKZJ.js";
8
8
 
9
9
  // src/client.ts
10
10
  import WebSocket from "ws";
@@ -0,0 +1,35 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+
31
+ export {
32
+ __commonJS,
33
+ __export,
34
+ __toESM
35
+ };
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  NAMES,
3
- pickName
4
- } from "./chunk-EX66KH66.js";
3
+ SESSION_KEY_VAR,
4
+ pickName,
5
+ sessionKey
6
+ } from "./chunk-ARB4BKZJ.js";
5
7
  import {
6
8
  paths
7
9
  } from "./chunk-HOOHS3MX.js";
@@ -182,7 +184,9 @@ var AGENT_BIN = { claude: "claude", codex: "codex", cursor: "cursor-agent", omp:
182
184
  var CODEX_ENV_VAR = "LEDGE_CODEX_SESSION";
183
185
  var CODEX_HOOK_VAR = "LEDGE_CODEX_HOOK_SESSION";
184
186
  function agentIdArgs(tool, id) {
185
- return tool === "codex" ? ["-c", `shell_environment_policy.set.${CODEX_HOOK_VAR}="${id}"`] : [];
187
+ if (tool !== "codex") return [];
188
+ const key = sessionKey(id);
189
+ return ["-c", `shell_environment_policy.set.${CODEX_HOOK_VAR}="${id}"`, ...key ? ["-c", `shell_environment_policy.set.${SESSION_KEY_VAR}="${key}"`] : []];
186
190
  }
187
191
  var CLAUDE_OWN_SESSION = /^(--resume|-r|--continue|-c|--session-id|--fork-session)(=|$)/;
188
192
  function claudeSessionId(tool, args) {
@@ -224,7 +228,8 @@ async function spawnSession(opts) {
224
228
  const env = opts.env ?? process.env;
225
229
  const transcriptPath = agentSessionId ? claudeTranscriptPath(opts.cwd, agentSessionId, env) : void 0;
226
230
  const command = opts.recordExit ? ["sh", "-c", '"$@"; echo $? > "$0"', exitFile(id), ...agent] : agent;
227
- await opts.tmux.newSession({ name: tmuxSession, cwd: opts.cwd, env: agentEnv(env, { LEDGE_SESSION: id, LEDGE_NAME: name, ...opts.role ? { LEDGE_ROLE: opts.role.id } : {}, ...opts.team ? { LEDGE_TEAM: opts.team } : {}, ...opts.tool === "codex" ? { [CODEX_ENV_VAR]: id } : {} }), unset: PARENT_AGENT_VARS, command });
231
+ const key = sessionKey(id);
232
+ await opts.tmux.newSession({ name: tmuxSession, cwd: opts.cwd, env: agentEnv(env, { LEDGE_SESSION: id, ...key ? { [SESSION_KEY_VAR]: key } : {}, LEDGE_NAME: name, ...opts.role ? { LEDGE_ROLE: opts.role.id } : {}, ...opts.team ? { LEDGE_TEAM: opts.team } : {}, ...opts.tool === "codex" ? { [CODEX_ENV_VAR]: id } : {} }), unset: PARENT_AGENT_VARS, command });
228
233
  const at = now();
229
234
  return {
230
235
  id,
@@ -9,9 +9,9 @@ import {
9
9
  startServer,
10
10
  tasksJournal,
11
11
  teamsJournal
12
- } from "./chunk-EKXZ45MQ.js";
13
- import "./chunk-2VSEIOGA.js";
12
+ } from "./chunk-KRFXWD5S.js";
14
13
  import "./chunk-OLLQBK6N.js";
14
+ import "./chunk-JNLARCUC.js";
15
15
  import {
16
16
  QUESTION_TOOLS,
17
17
  crossSession,
@@ -26,11 +26,11 @@ import {
26
26
  readPeers,
27
27
  reduce,
28
28
  stripNote
29
- } from "./chunk-WRE3PUTV.js";
30
- import "./chunk-24AHC55Y.js";
29
+ } from "./chunk-RYUDIFSI.js";
30
+ import "./chunk-AVKFQSRP.js";
31
31
  import {
32
32
  agentMessages
33
- } from "./chunk-35BPMR6P.js";
33
+ } from "./chunk-ZDEEHFU3.js";
34
34
  import {
35
35
  DEFAULT_RELAY_URL,
36
36
  DevicePollResponseSchema,
@@ -44,10 +44,10 @@ import {
44
44
  SealedFrameSchema,
45
45
  SessionSchema,
46
46
  backendOf
47
- } from "./chunk-EX66KH66.js";
47
+ } from "./chunk-ARB4BKZJ.js";
48
48
  import {
49
49
  LEDGE_VERSION
50
- } from "./chunk-NFXFY5CT.js";
50
+ } from "./chunk-ONFWK2WW.js";
51
51
  import {
52
52
  SERVICE,
53
53
  inDaemonService,
@@ -64,6 +64,7 @@ import {
64
64
  ensureLedgeDir,
65
65
  paths
66
66
  } from "./chunk-HOOHS3MX.js";
67
+ import "./chunk-U67V476Y.js";
67
68
 
68
69
  // src/daemon/index.ts
69
70
  import { writeFile as writeFile3, rm as rm2 } from "fs/promises";
@@ -1,14 +1,15 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-35BPMR6P.js";
3
+ } from "./chunk-ZDEEHFU3.js";
4
4
  import {
5
5
  connect
6
- } from "./chunk-KACRWFN3.js";
6
+ } from "./chunk-TZBI2RVU.js";
7
7
  import {
8
8
  LEDGE_GIVER,
9
9
  TASK_TEXT_MAX
10
- } from "./chunk-EX66KH66.js";
10
+ } from "./chunk-ARB4BKZJ.js";
11
11
  import "./chunk-HOOHS3MX.js";
12
+ import "./chunk-U67V476Y.js";
12
13
 
13
14
  // src/cli/decide.ts
14
15
  import { randomUUID } from "crypto";
@@ -3,11 +3,12 @@ import {
3
3
  handoverArgs,
4
4
  handoverOnClient,
5
5
  runHandover
6
- } from "./chunk-ZZMZDAF6.js";
7
- import "./chunk-35BPMR6P.js";
8
- import "./chunk-KACRWFN3.js";
9
- import "./chunk-EX66KH66.js";
6
+ } from "./chunk-RKV5KYKL.js";
7
+ import "./chunk-ZDEEHFU3.js";
8
+ import "./chunk-TZBI2RVU.js";
9
+ import "./chunk-ARB4BKZJ.js";
10
10
  import "./chunk-HOOHS3MX.js";
11
+ import "./chunk-U67V476Y.js";
11
12
  export {
12
13
  HANDOVER_USAGE,
13
14
  handoverArgs,
@@ -8,42 +8,43 @@ import {
8
8
  seatContext,
9
9
  takeImages,
10
10
  teammates
11
- } from "./chunk-WRE3PUTV.js";
11
+ } from "./chunk-RYUDIFSI.js";
12
12
  import {
13
13
  findRole
14
- } from "./chunk-24AHC55Y.js";
14
+ } from "./chunk-AVKFQSRP.js";
15
15
  import {
16
16
  parseLedgeCommand,
17
17
  readOnClient,
18
18
  sendOnClient
19
- } from "./chunk-AJFC33TH.js";
19
+ } from "./chunk-TOFVC6IV.js";
20
20
  import {
21
21
  taskOnClient
22
- } from "./chunk-EBBAOQ2Z.js";
22
+ } from "./chunk-PUJLMKZC.js";
23
23
  import {
24
24
  handoverOnClient
25
- } from "./chunk-ZZMZDAF6.js";
25
+ } from "./chunk-RKV5KYKL.js";
26
26
  import {
27
27
  CODEX_ENV_VAR,
28
28
  CODEX_HOOK_VAR,
29
29
  codexPlan
30
- } from "./chunk-35BPMR6P.js";
30
+ } from "./chunk-ZDEEHFU3.js";
31
31
  import {
32
32
  formatWho
33
- } from "./chunk-ZQON4EV7.js";
33
+ } from "./chunk-5VFFJ3ZC.js";
34
34
  import {
35
35
  connect,
36
36
  sendMessageAndAwaitAck
37
- } from "./chunk-KACRWFN3.js";
37
+ } from "./chunk-TZBI2RVU.js";
38
38
  import {
39
39
  taskClosed
40
- } from "./chunk-EX66KH66.js";
40
+ } from "./chunk-ARB4BKZJ.js";
41
41
  import {
42
42
  log
43
43
  } from "./chunk-6IYPRUQG.js";
44
44
  import {
45
45
  paths
46
46
  } from "./chunk-HOOHS3MX.js";
47
+ import "./chunk-U67V476Y.js";
47
48
 
48
49
  // src/cli/hook.ts
49
50
  import { randomUUID } from "crypto";
package/dist/cli/index.js CHANGED
@@ -14,7 +14,8 @@ 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> \u2026 start a team from a template, list templates, roles and live teams
17
+ ledge team <up|list|join|leave|resume|dissolve|save> \u2026 start, list and run teams (ledge team: details; --json for agents)
18
+ ledge close <session>\u2026 [--json] close sessions cleanly (their conversation stays resumable)
18
19
  ledge tui [--notify bell|osc9|off] [--here] follow and answer the sessions (in a Ledge tab of Windows Terminal unless --here)
19
20
  ledge bridge exchange Ledge messages over SSH stdio
20
21
  ledge --version print the installed version`;
@@ -24,7 +25,7 @@ async function hookMain(args) {
24
25
  try {
25
26
  const chunks = [];
26
27
  for await (const c of process.stdin) chunks.push(c);
27
- const { runHook } = await import("./hook-KANGO46Y.js");
28
+ const { runHook } = await import("./hook-XBSMUMZ7.js");
28
29
  const out = await runHook(event, Buffer.concat(chunks).toString("utf8"), { tool });
29
30
  if (out) process.stdout.write(`${out}
30
31
  `);
@@ -36,7 +37,7 @@ async function main(argv) {
36
37
  const [cmd, ...rest] = argv;
37
38
  switch (cmd) {
38
39
  case "daemon": {
39
- const { startDaemon } = await import("./daemon-5FPZG5R3.js");
40
+ const { startDaemon } = await import("./daemon-DLJCIC7L.js");
40
41
  await startDaemon();
41
42
  await new Promise(() => {
42
43
  });
@@ -44,17 +45,17 @@ async function main(argv) {
44
45
  }
45
46
  case "--version":
46
47
  case "version": {
47
- const { LEDGE_VERSION } = await import("./version-YUO6SLAF.js");
48
+ const { LEDGE_VERSION } = await import("./version-ZPC6END5.js");
48
49
  console.log(LEDGE_VERSION);
49
50
  return 0;
50
51
  }
51
52
  case "setup": {
52
- const { runSetup } = await import("./setup-47ODKJBM.js");
53
+ const { runSetup } = await import("./setup-K42IVMHS.js");
53
54
  for (const l of await runSetup()) console.log(l);
54
55
  return 0;
55
56
  }
56
57
  case "uninstall": {
57
- const { runUninstall, uninstallArgs } = await import("./uninstall-QNWRD27D.js");
58
+ const { runUninstall, uninstallArgs } = await import("./uninstall-4IMMR55T.js");
58
59
  const args = uninstallArgs(rest);
59
60
  if (!args) {
60
61
  console.log(USAGE);
@@ -65,68 +66,74 @@ async function main(argv) {
65
66
  return r.ok ? 0 : 1;
66
67
  }
67
68
  case "status": {
68
- const { printStatus } = await import("./status-JPF4NZNI.js");
69
+ const { printStatus } = await import("./status-5YEORNTH.js");
69
70
  console.log(await printStatus());
70
71
  return 0;
71
72
  }
72
73
  case "who": {
73
- const { printWho } = await import("./who-NYPVBO64.js");
74
+ const { printWho } = await import("./who-YMSQI64I.js");
74
75
  console.log(await printWho());
75
76
  return 0;
76
77
  }
77
78
  case "send": {
78
- const { sendMessage } = await import("./send-BFPJBXXH.js");
79
+ const { sendMessage } = await import("./send-Y2C3BIGK.js");
79
80
  const r = await sendMessage(rest);
80
81
  console.log(r.line);
81
82
  return r.code;
82
83
  }
83
84
  case "read": {
84
- const { readMessage } = await import("./send-BFPJBXXH.js");
85
+ const { readMessage } = await import("./send-Y2C3BIGK.js");
85
86
  const r = await readMessage(rest);
86
87
  console.log(r.line);
87
88
  return r.code;
88
89
  }
89
90
  case "task": {
90
- const { runTask } = await import("./task-UTRG4KA5.js");
91
+ const { runTask } = await import("./task-R44VWZHR.js");
91
92
  const r = await runTask(rest);
92
93
  console.log(r.line);
93
94
  return r.code;
94
95
  }
95
96
  case "decide": {
96
- const { runDecide } = await import("./decide-2ZKSX7O5.js");
97
+ const { runDecide } = await import("./decide-UWJMKDR4.js");
97
98
  const r = await runDecide(rest);
98
99
  console.log(r.line);
99
100
  return r.code;
100
101
  }
101
102
  case "handover": {
102
- const { runHandover } = await import("./handover-AZ35QZRK.js");
103
+ const { runHandover } = await import("./handover-5JHFA5EF.js");
103
104
  const r = await runHandover(rest);
104
105
  console.log(r.line);
105
106
  return r.code;
106
107
  }
108
+ case "close": {
109
+ const { runClose } = await import("./action-WNQ3NJGD.js");
110
+ const r = await runClose(rest);
111
+ console.log(r.line);
112
+ return r.code;
113
+ }
107
114
  case "team": {
108
- const { runTeam } = await import("./team-SZJHGA7D.js");
115
+ const { runTeam } = await import("./team-F7B3IG3I.js");
109
116
  const r = await runTeam(rest);
110
117
  console.log(r.line);
111
118
  return r.code;
112
119
  }
113
120
  case "tui": {
114
- const { runTui } = await import("./tui-GEJHBWP5.js");
121
+ const { runTui } = await import("./tui-GL6Q3KOX.js");
115
122
  return runTui(rest);
116
123
  }
117
124
  case "bridge": {
118
- const { bridge } = await import("./bridge-H3ZPGIUY.js");
125
+ const { bridge } = await import("./bridge-R37AHVXS.js");
119
126
  await bridge();
120
127
  return 0;
121
128
  }
122
129
  case "claude":
123
130
  case "codex":
124
131
  case "cursor": {
125
- const { launch } = await import("./launch-DEKJ5HI4.js");
132
+ const { launch } = await import("./launch-OVB66BZJ.js");
126
133
  return launch(cmd, rest);
127
134
  }
128
135
  case "attach": {
129
- const { attach } = await import("./attach-IVICSJYB.js");
136
+ const { attach } = await import("./attach-UHM7QQ4W.js");
130
137
  return attach(rest.find((a) => !a.startsWith("--")) ?? "", { readOnly: rest.includes("--read-only") });
131
138
  }
132
139
  default:
@@ -6,21 +6,22 @@ import {
6
6
  launch,
7
7
  parseLaunchArgs,
8
8
  roleArgs
9
- } from "./chunk-ALEZJFJ3.js";
10
- import "./chunk-EKXZ45MQ.js";
11
- import "./chunk-2VSEIOGA.js";
9
+ } from "./chunk-7XMGYJTN.js";
10
+ import "./chunk-KRFXWD5S.js";
12
11
  import "./chunk-OLLQBK6N.js";
13
- import "./chunk-WRE3PUTV.js";
14
- import "./chunk-24AHC55Y.js";
12
+ import "./chunk-JNLARCUC.js";
13
+ import "./chunk-RYUDIFSI.js";
14
+ import "./chunk-AVKFQSRP.js";
15
15
  import {
16
16
  agentEnv,
17
17
  exitFile
18
- } from "./chunk-35BPMR6P.js";
19
- import "./chunk-KACRWFN3.js";
20
- import "./chunk-EX66KH66.js";
18
+ } from "./chunk-ZDEEHFU3.js";
19
+ import "./chunk-TZBI2RVU.js";
20
+ import "./chunk-ARB4BKZJ.js";
21
21
  import "./chunk-NLL2EQJ2.js";
22
22
  import "./chunk-6IYPRUQG.js";
23
23
  import "./chunk-HOOHS3MX.js";
24
+ import "./chunk-U67V476Y.js";
24
25
  export {
25
26
  DaemonError,
26
27
  agentEnv,
@@ -4,11 +4,12 @@ import {
4
4
  readOnClient,
5
5
  sendMessage,
6
6
  sendOnClient
7
- } from "./chunk-AJFC33TH.js";
8
- import "./chunk-35BPMR6P.js";
9
- import "./chunk-KACRWFN3.js";
10
- import "./chunk-EX66KH66.js";
7
+ } from "./chunk-TOFVC6IV.js";
8
+ import "./chunk-ZDEEHFU3.js";
9
+ import "./chunk-TZBI2RVU.js";
10
+ import "./chunk-ARB4BKZJ.js";
11
11
  import "./chunk-HOOHS3MX.js";
12
+ import "./chunk-U67V476Y.js";
12
13
  export {
13
14
  parseLedgeCommand,
14
15
  readMessage,
@@ -18,6 +18,7 @@ import {
18
18
  import "./chunk-NLL2EQJ2.js";
19
19
  import "./chunk-6IYPRUQG.js";
20
20
  import "./chunk-HOOHS3MX.js";
21
+ import "./chunk-U67V476Y.js";
21
22
  export {
22
23
  BIN_MARK,
23
24
  CLAUDE_EVENTS,
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-KACRWFN3.js";
4
- import "./chunk-EX66KH66.js";
3
+ } from "./chunk-TZBI2RVU.js";
4
+ import "./chunk-ARB4BKZJ.js";
5
5
  import "./chunk-HOOHS3MX.js";
6
+ import "./chunk-U67V476Y.js";
6
7
 
7
8
  // src/cli/status.ts
8
9
  async function printStatus(opts = {}) {
@@ -4,11 +4,12 @@ import {
4
4
  runTask,
5
5
  taskArgs,
6
6
  taskOnClient
7
- } from "./chunk-EBBAOQ2Z.js";
8
- import "./chunk-35BPMR6P.js";
9
- import "./chunk-KACRWFN3.js";
10
- import "./chunk-EX66KH66.js";
7
+ } from "./chunk-PUJLMKZC.js";
8
+ import "./chunk-ZDEEHFU3.js";
9
+ import "./chunk-TZBI2RVU.js";
10
+ import "./chunk-ARB4BKZJ.js";
11
11
  import "./chunk-HOOHS3MX.js";
12
+ import "./chunk-U67V476Y.js";
12
13
  export {
13
14
  TASK_USAGE,
14
15
  formatTask,