@paradow/ledge 0.25.1 → 0.27.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 (32) hide show
  1. package/dist/cli/{action-WNQ3NJGD.js → action-7SJJTIEA.js} +4 -4
  2. package/dist/cli/{attach-UHM7QQ4W.js → attach-V7UPHVB2.js} +8 -8
  3. package/dist/cli/{bridge-R37AHVXS.js → bridge-JK3PMG7T.js} +1 -1
  4. package/dist/cli/{chunk-RKV5KYKL.js → chunk-2N7PSP7C.js} +3 -3
  5. package/dist/cli/{chunk-ARB4BKZJ.js → chunk-37G5F75H.js} +755 -557
  6. package/dist/cli/{chunk-TZBI2RVU.js → chunk-7GIUG73R.js} +1 -1
  7. package/dist/cli/{chunk-RYUDIFSI.js → chunk-7JRQCKBP.js} +6 -2
  8. package/dist/cli/{chunk-5VFFJ3ZC.js → chunk-7OGFH6KJ.js} +2 -2
  9. package/dist/cli/{chunk-ZDEEHFU3.js → chunk-ADAGKOFO.js} +1 -1
  10. package/dist/cli/{chunk-KRFXWD5S.js → chunk-CVHX7GUB.js} +685 -89
  11. package/dist/cli/chunk-HMTOPOJG.js +6 -0
  12. package/dist/cli/{chunk-O6FTIYJV.js → chunk-IGAGJVRZ.js} +3 -3
  13. package/dist/cli/{chunk-7XMGYJTN.js → chunk-ISNHG5SJ.js} +5 -5
  14. package/dist/cli/{chunk-TOFVC6IV.js → chunk-RA3OIXEQ.js} +2 -2
  15. package/dist/cli/{chunk-PUJLMKZC.js → chunk-TOSPL5H2.js} +3 -3
  16. package/dist/cli/{chunk-AVKFQSRP.js → chunk-UPKJO3BZ.js} +45 -17
  17. package/dist/cli/{chunk-JNLARCUC.js → chunk-YLN3VOGV.js} +49 -19
  18. package/dist/cli/{daemon-ESBBZW7O.js → daemon-YUPB5NUG.js} +34 -15
  19. package/dist/cli/{decide-UWJMKDR4.js → decide-HFI2WQXI.js} +3 -3
  20. package/dist/cli/{handover-5JHFA5EF.js → handover-GKORMXZ2.js} +4 -4
  21. package/dist/cli/{hook-XBSMUMZ7.js → hook-TJJEFV54.js} +10 -10
  22. package/dist/cli/index.js +16 -16
  23. package/dist/cli/{launch-OVB66BZJ.js → launch-QKQZZSIM.js} +8 -8
  24. package/dist/cli/{send-Y2C3BIGK.js → send-RI7JOO5K.js} +4 -4
  25. package/dist/cli/{status-5YEORNTH.js → status-RQRS26S2.js} +2 -2
  26. package/dist/cli/{task-R44VWZHR.js → task-U2XHBUKW.js} +4 -4
  27. package/dist/cli/{team-F7B3IG3I.js → team-NFC4XEIA.js} +6 -6
  28. package/dist/cli/{tui-YK6TXFYX.js → tui-UWR7SDYF.js} +8 -8
  29. package/dist/cli/{version-NFURQHXH.js → version-YYNMMWKJ.js} +1 -1
  30. package/dist/cli/{who-YMSQI64I.js → who-WW6IL4KD.js} +3 -3
  31. package/package.json +1 -1
  32. package/dist/cli/chunk-PA2JU476.js +0 -6
@@ -0,0 +1,6 @@
1
+ // src/version.ts
2
+ var LEDGE_VERSION = true ? "0.27.0" : "0.0.0-dev";
3
+
4
+ export {
5
+ LEDGE_VERSION
6
+ };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-ZDEEHFU3.js";
3
+ } from "./chunk-ADAGKOFO.js";
4
4
  import {
5
5
  connect
6
- } from "./chunk-TZBI2RVU.js";
6
+ } from "./chunk-7GIUG73R.js";
7
7
  import {
8
8
  SESSION_KEY_VAR,
9
9
  actionById
10
- } from "./chunk-ARB4BKZJ.js";
10
+ } from "./chunk-37G5F75H.js";
11
11
 
12
12
  // src/cli/action.ts
13
13
  import { randomUUID } from "crypto";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  EFFORT_ARGS,
3
3
  MODEL_ARGS
4
- } from "./chunk-KRFXWD5S.js";
4
+ } from "./chunk-CVHX7GUB.js";
5
5
  import {
6
6
  findRole
7
- } from "./chunk-AVKFQSRP.js";
7
+ } from "./chunk-UPKJO3BZ.js";
8
8
  import {
9
9
  exitFile,
10
10
  spawnSession
11
- } from "./chunk-ZDEEHFU3.js";
11
+ } from "./chunk-ADAGKOFO.js";
12
12
  import {
13
13
  DaemonRefusedError,
14
14
  connect
15
- } from "./chunk-TZBI2RVU.js";
15
+ } from "./chunk-7GIUG73R.js";
16
16
  import {
17
17
  PROTOCOL_PORT,
18
18
  autonomyArgs
19
- } from "./chunk-ARB4BKZJ.js";
19
+ } from "./chunk-37G5F75H.js";
20
20
  import {
21
21
  realTmux
22
22
  } from "./chunk-NLL2EQJ2.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-ZDEEHFU3.js";
3
+ } from "./chunk-ADAGKOFO.js";
4
4
  import {
5
5
  connect,
6
6
  sendMessageAndAwaitAck
7
- } from "./chunk-TZBI2RVU.js";
7
+ } from "./chunk-7GIUG73R.js";
8
8
 
9
9
  // src/cli/send.ts
10
10
  import { randomUUID } from "crypto";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-ZDEEHFU3.js";
3
+ } from "./chunk-ADAGKOFO.js";
4
4
  import {
5
5
  connect
6
- } from "./chunk-TZBI2RVU.js";
6
+ } from "./chunk-7GIUG73R.js";
7
7
  import {
8
8
  LEDGE_GIVER,
9
9
  TASK_TEXT_MAX,
10
10
  TASK_TITLE_MAX
11
- } from "./chunk-ARB4BKZJ.js";
11
+ } from "./chunk-37G5F75H.js";
12
12
 
13
13
  // src/cli/task.ts
14
14
  import { randomUUID } from "crypto";
@@ -2,7 +2,7 @@ import {
2
2
  ROLE_LABEL_MAX,
3
3
  ROLE_PROMPT_MAX,
4
4
  RoleSchema
5
- } from "./chunk-ARB4BKZJ.js";
5
+ } from "./chunk-37G5F75H.js";
6
6
  import {
7
7
  log
8
8
  } from "./chunk-6IYPRUQG.js";
@@ -11,6 +11,7 @@ import {
11
11
  } from "./chunk-HOOHS3MX.js";
12
12
 
13
13
  // src/daemon/roles.ts
14
+ import { createHash } from "crypto";
14
15
  import { existsSync, readdirSync, readFileSync, statSync } from "fs";
15
16
  import { dirname, join, resolve } from "path";
16
17
  var FILE_MAX = 64 * 1024;
@@ -51,14 +52,31 @@ function frontMatter(text) {
51
52
  if (!m) return { fields: {}, body: src.trim() };
52
53
  const fields = {};
53
54
  for (const raw of m[1].split("\n")) {
54
- const line = raw.replace(/\s+#.*$/, "").trim();
55
+ const line = raw.trim();
55
56
  if (!line || line.startsWith("#")) continue;
56
57
  const i = line.indexOf(":");
57
- if (i <= 0) throw new Error(`front matter line without a key: ${line.slice(0, 60)}`);
58
- fields[line.slice(0, i).trim()] = unquote(line.slice(i + 1).trim());
58
+ if (i <= 0) throw new Error(`front matter line without a key: ${line.replace(/\s+#.*$/, "").slice(0, 60)}`);
59
+ fields[line.slice(0, i).trim()] = scalarValue(line.slice(i + 1));
59
60
  }
60
61
  return { fields, body: src.slice(m[0].length).trim() };
61
62
  }
63
+ function scalarValue(raw) {
64
+ const v = raw.trim();
65
+ const q = v[0];
66
+ if (q === '"' || q === "'") {
67
+ const end = v.indexOf(q, 1);
68
+ if (end > 0 && /^(\s+#.*)?$/.test(v.slice(end + 1))) return v.slice(1, end);
69
+ }
70
+ return unquote(v.replace(/(^|\s)#.*$/, "").trim());
71
+ }
72
+ function quoteScalar(v) {
73
+ if (/[\r\n]/.test(v)) return null;
74
+ if (/^[\w./@:+-]+$/.test(v) && !/^(true|false|null|yes|no|~)$/i.test(v)) return v;
75
+ if (!v.includes('"')) return `"${v}"`;
76
+ if (!v.includes("'")) return `'${v}'`;
77
+ return null;
78
+ }
79
+ var definitionHash = (text) => createHash("sha256").update(text).digest("hex").slice(0, 16);
62
80
  var unquote = (v) => v.length >= 2 && (v[0] === '"' || v[0] === "'") && v.at(-1) === v[0] ? v.slice(1, -1) : v;
63
81
  var ROLE_KEYS = /* @__PURE__ */ new Set(["label", "tool", "model", "effort", "autonomy"]);
64
82
  function parseRole(id, text, source, path) {
@@ -90,6 +108,22 @@ function parseRole(id, text, source, path) {
90
108
  }
91
109
  return r.data;
92
110
  }
111
+ function loadRole(id, path, source, problems) {
112
+ let r;
113
+ try {
114
+ const text = readSmall(path);
115
+ r = parseRole(id, text, source, path);
116
+ if (typeof r !== "string") r = { ...r, hash: definitionHash(text) };
117
+ } catch (e) {
118
+ r = e.message;
119
+ }
120
+ if (typeof r === "string") {
121
+ log(`role ${path} skipped: ${r}`);
122
+ problems.push({ path, reason: r });
123
+ return void 0;
124
+ }
125
+ return r;
126
+ }
93
127
  function listRoles(cwd) {
94
128
  const roles = /* @__PURE__ */ new Map();
95
129
  const problems = [];
@@ -101,18 +135,8 @@ function listRoles(cwd) {
101
135
  if (source === "home") roles.set(id, { ...won, shadows: path });
102
136
  continue;
103
137
  }
104
- let r;
105
- try {
106
- r = parseRole(id, readSmall(path), source, path);
107
- } catch (e) {
108
- r = e.message;
109
- }
110
- if (typeof r === "string") {
111
- log(`role ${path} skipped: ${r}`);
112
- problems.push({ path, reason: r });
113
- continue;
114
- }
115
- roles.set(id, r);
138
+ const r = loadRole(id, path, source, problems);
139
+ if (r) roles.set(id, r);
116
140
  }
117
141
  }
118
142
  return { roles: [...roles.values()].sort((a, b) => a.id.localeCompare(b.id)), problems };
@@ -122,10 +146,14 @@ function findRole(id, cwd) {
122
146
  }
123
147
 
124
148
  export {
149
+ repoRoot,
125
150
  definitionDirs,
126
151
  definitionFiles,
127
152
  readSmall,
128
- unquote,
153
+ scalarValue,
154
+ quoteScalar,
155
+ definitionHash,
156
+ loadRole,
129
157
  listRoles,
130
158
  findRole
131
159
  };
@@ -1,14 +1,16 @@
1
1
  import {
2
2
  definitionDirs,
3
3
  definitionFiles,
4
+ definitionHash,
4
5
  listRoles,
6
+ quoteScalar,
5
7
  readSmall,
6
- unquote
7
- } from "./chunk-AVKFQSRP.js";
8
+ scalarValue
9
+ } from "./chunk-UPKJO3BZ.js";
8
10
  import {
9
11
  SeatsSchema,
10
12
  TeamNameSchema
11
- } from "./chunk-ARB4BKZJ.js";
13
+ } from "./chunk-37G5F75H.js";
12
14
  import {
13
15
  log
14
16
  } from "./chunk-6IYPRUQG.js";
@@ -19,7 +21,7 @@ import {
19
21
  // src/daemon/teams.ts
20
22
  import { existsSync, writeFileSync, mkdirSync, renameSync } from "fs";
21
23
  import { join } from "path";
22
- var scalar = (raw) => unquote(raw.replace(/\s+#.*$/, "").trim());
24
+ var scalar = scalarValue;
23
25
  function flowMap(raw) {
24
26
  const inner = raw.trim().replace(/^\{/, "").replace(/\}$/, "");
25
27
  const out = {};
@@ -102,6 +104,22 @@ function parseTemplate(id, text, source, path) {
102
104
  }
103
105
  return { id, name: name.data, seats: seats.data, source, path };
104
106
  }
107
+ function loadTemplate(id, path, source, problems) {
108
+ let t;
109
+ try {
110
+ const text = readSmall(path);
111
+ t = parseTemplate(id, text, source, path);
112
+ if (typeof t !== "string") t = { ...t, hash: definitionHash(text) };
113
+ } catch (e) {
114
+ t = e.message;
115
+ }
116
+ if (typeof t === "string") {
117
+ log(`team ${path} skipped: ${t}`);
118
+ problems.push({ path, reason: t });
119
+ return void 0;
120
+ }
121
+ return t;
122
+ }
105
123
  function listTemplates(cwd) {
106
124
  const templates = /* @__PURE__ */ new Map();
107
125
  const problems = [];
@@ -109,18 +127,8 @@ function listTemplates(cwd) {
109
127
  for (const path of definitionFiles(dir, [".yaml", ".yml"])) {
110
128
  const id = path.slice(dir.length + 1).replace(/\.ya?ml$/, "");
111
129
  if (templates.has(id)) continue;
112
- let t;
113
- try {
114
- t = parseTemplate(id, readSmall(path), source, path);
115
- } catch (e) {
116
- t = e.message;
117
- }
118
- if (typeof t === "string") {
119
- log(`team ${path} skipped: ${t}`);
120
- problems.push({ path, reason: t });
121
- continue;
122
- }
123
- templates.set(id, t);
130
+ const t = loadTemplate(id, path, source, problems);
131
+ if (t) templates.set(id, t);
124
132
  }
125
133
  }
126
134
  return { templates: [...templates.values()].sort((a, b) => a.id.localeCompare(b.id)), problems };
@@ -147,22 +155,44 @@ function templateId(name) {
147
155
  const id = name.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64);
148
156
  return id || "team";
149
157
  }
150
- var yamlScalar = (v) => /^[\w./@:+-]+$/.test(v) && !/^(true|false|null|yes|no|~)$/i.test(v) ? v : JSON.stringify(v);
158
+ var SEAT_KEYS = ["role", "tool", "model", "effort", "name"];
159
+ function templateText(name, seats) {
160
+ const q = (v) => v.includes(" ") ? null : quoteScalar(v);
161
+ const head = q(name);
162
+ if (head === null) return null;
163
+ const lines = [`name: ${head}`, "seats:"];
164
+ for (const s of seats) {
165
+ let first = true;
166
+ for (const k of SEAT_KEYS) {
167
+ if (s[k] === void 0) continue;
168
+ const v = q(String(s[k]));
169
+ if (v === null) return null;
170
+ lines.push(`${first ? " - " : " "}${k}: ${v}`);
171
+ first = false;
172
+ }
173
+ }
174
+ return `${lines.join("\n")}
175
+ `;
176
+ }
151
177
  var templatePath = (name, dir) => join(dir, `${templateId(name)}.yaml`);
152
178
  var templateExists = (name, dir = join(ledgeDir(), "teams")) => existsSync(templatePath(name, dir));
153
179
  function saveTemplate(name, seats, dir = join(ledgeDir(), "teams")) {
154
180
  const path = templatePath(name, dir);
155
- const lines = [`name: ${yamlScalar(name)}`, "seats:", ...seats.map((s) => ` - { ${Object.entries(s).filter(([, v]) => v !== void 0).map(([k, v]) => `${k}: ${yamlScalar(String(v))}`).join(", ")} }`), ""];
181
+ const text = templateText(name, seats);
182
+ if (text === null) throw new Error("a team name or seat value cannot be written as YAML");
156
183
  mkdirSync(dir, { recursive: true });
157
184
  const tmp = `${path}.tmp`;
158
- writeFileSync(tmp, lines.join("\n"));
185
+ writeFileSync(tmp, text);
159
186
  renameSync(tmp, path);
160
187
  return path;
161
188
  }
162
189
 
163
190
  export {
191
+ loadTemplate,
164
192
  resolveSeats,
165
193
  listDefinitions,
194
+ templateId,
195
+ templateText,
166
196
  templateExists,
167
197
  saveTemplate
168
198
  };
@@ -9,9 +9,9 @@ import {
9
9
  startServer,
10
10
  tasksJournal,
11
11
  teamsJournal
12
- } from "./chunk-KRFXWD5S.js";
12
+ } from "./chunk-CVHX7GUB.js";
13
13
  import "./chunk-OLLQBK6N.js";
14
- import "./chunk-JNLARCUC.js";
14
+ import "./chunk-YLN3VOGV.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-RYUDIFSI.js";
30
- import "./chunk-AVKFQSRP.js";
29
+ } from "./chunk-7JRQCKBP.js";
30
+ import "./chunk-UPKJO3BZ.js";
31
31
  import {
32
32
  agentMessages
33
- } from "./chunk-ZDEEHFU3.js";
33
+ } from "./chunk-ADAGKOFO.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-ARB4BKZJ.js";
47
+ } from "./chunk-37G5F75H.js";
48
48
  import {
49
49
  LEDGE_VERSION
50
- } from "./chunk-PA2JU476.js";
50
+ } from "./chunk-HMTOPOJG.js";
51
51
  import {
52
52
  SERVICE,
53
53
  inDaemonService,
@@ -799,6 +799,16 @@ var npmEnv = (execPath, env) => ({ ...env, PATH: `${dirname3(execPath)}:${env.PA
799
799
  function createDaemonUpdater(deps) {
800
800
  let busy = false;
801
801
  let restarting = false;
802
+ const restartService = async (version, send) => {
803
+ send({ type: "update.progress", version, step: "restarting" });
804
+ await deps.save();
805
+ const code = await deps.restart();
806
+ if (code !== 0) {
807
+ log(`update: systemctl restart failed (${code})`);
808
+ return send({ type: "update.failed", version, reason: "no-systemd", command: RESTART_COMMAND });
809
+ }
810
+ restarting = true;
811
+ };
802
812
  return {
803
813
  running: () => busy,
804
814
  /** `reply` reaches only the asking client: a busy refusal must not fail the flow other overlays are following. */
@@ -820,20 +830,29 @@ function createDaemonUpdater(deps) {
820
830
  ${r.output}`);
821
831
  return send({ type: "update.failed", version, reason: "npm-failed", detail: lastLines(r.output), command: shown });
822
832
  }
823
- send({ type: "update.progress", version, step: "restarting" });
824
- await deps.save();
825
- const code = await deps.restart();
826
- if (code !== 0) {
827
- log(`update: systemctl restart failed (${code})`);
828
- return send({ type: "update.failed", version, reason: "no-systemd", command: RESTART_COMMAND });
829
- }
830
- restarting = true;
833
+ await restartService(version, send);
831
834
  } catch (e) {
832
835
  log(`update: ${e.stack ?? String(e)}`);
833
836
  send({ type: "update.failed", version, reason: "npm-failed", detail: e instanceof Error ? e.message : String(e) });
834
837
  } finally {
835
838
  if (!restarting) busy = false;
836
839
  }
840
+ },
841
+ /** The restart alone, for the phone (spec 2026-10-28 mobile daemon update): the update's guards but npm, then the same restart. */
842
+ async restart(send, reply = send) {
843
+ const version = deps.info().version;
844
+ if (busy) return reply({ type: "update.failed", version, reason: "busy" });
845
+ if (!deps.info().systemd) return send({ type: "update.failed", version, reason: "no-systemd", command: RESTART_COMMAND });
846
+ busy = true;
847
+ try {
848
+ if (await deps.atRisk()) return send({ type: "update.failed", version, reason: "sessions-at-risk" });
849
+ await restartService(version, send);
850
+ } catch (e) {
851
+ log(`restart: ${e.stack ?? String(e)}`);
852
+ send({ type: "update.failed", version, reason: "no-systemd", command: RESTART_COMMAND });
853
+ } finally {
854
+ if (!restarting) busy = false;
855
+ }
837
856
  }
838
857
  };
839
858
  }
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  CODEX_HOOK_VAR
3
- } from "./chunk-ZDEEHFU3.js";
3
+ } from "./chunk-ADAGKOFO.js";
4
4
  import {
5
5
  connect
6
- } from "./chunk-TZBI2RVU.js";
6
+ } from "./chunk-7GIUG73R.js";
7
7
  import {
8
8
  LEDGE_GIVER,
9
9
  TASK_TEXT_MAX
10
- } from "./chunk-ARB4BKZJ.js";
10
+ } from "./chunk-37G5F75H.js";
11
11
  import "./chunk-HOOHS3MX.js";
12
12
  import "./chunk-U67V476Y.js";
13
13
 
@@ -3,10 +3,10 @@ import {
3
3
  handoverArgs,
4
4
  handoverOnClient,
5
5
  runHandover
6
- } from "./chunk-RKV5KYKL.js";
7
- import "./chunk-ZDEEHFU3.js";
8
- import "./chunk-TZBI2RVU.js";
9
- import "./chunk-ARB4BKZJ.js";
6
+ } from "./chunk-2N7PSP7C.js";
7
+ import "./chunk-ADAGKOFO.js";
8
+ import "./chunk-7GIUG73R.js";
9
+ import "./chunk-37G5F75H.js";
10
10
  import "./chunk-HOOHS3MX.js";
11
11
  import "./chunk-U67V476Y.js";
12
12
  export {
@@ -8,36 +8,36 @@ import {
8
8
  seatContext,
9
9
  takeImages,
10
10
  teammates
11
- } from "./chunk-RYUDIFSI.js";
11
+ } from "./chunk-7JRQCKBP.js";
12
12
  import {
13
13
  findRole
14
- } from "./chunk-AVKFQSRP.js";
14
+ } from "./chunk-UPKJO3BZ.js";
15
15
  import {
16
16
  parseLedgeCommand,
17
17
  readOnClient,
18
18
  sendOnClient
19
- } from "./chunk-TOFVC6IV.js";
19
+ } from "./chunk-RA3OIXEQ.js";
20
20
  import {
21
21
  taskOnClient
22
- } from "./chunk-PUJLMKZC.js";
22
+ } from "./chunk-TOSPL5H2.js";
23
23
  import {
24
24
  handoverOnClient
25
- } from "./chunk-RKV5KYKL.js";
25
+ } from "./chunk-2N7PSP7C.js";
26
26
  import {
27
27
  CODEX_ENV_VAR,
28
28
  CODEX_HOOK_VAR,
29
29
  codexPlan
30
- } from "./chunk-ZDEEHFU3.js";
30
+ } from "./chunk-ADAGKOFO.js";
31
31
  import {
32
32
  formatWho
33
- } from "./chunk-5VFFJ3ZC.js";
33
+ } from "./chunk-7OGFH6KJ.js";
34
34
  import {
35
35
  connect,
36
36
  sendMessageAndAwaitAck
37
- } from "./chunk-TZBI2RVU.js";
37
+ } from "./chunk-7GIUG73R.js";
38
38
  import {
39
39
  taskClosed
40
- } from "./chunk-ARB4BKZJ.js";
40
+ } from "./chunk-37G5F75H.js";
41
41
  import {
42
42
  log
43
43
  } from "./chunk-6IYPRUQG.js";
@@ -355,7 +355,7 @@ function identityContext(s) {
355
355
  `Tu es ${s.name}, ${where} : une session lanc\xE9e par Ledge (${s.tool}). Les autres sessions Ledge te connaissent sous le nom ${s.name}.`,
356
356
  "Pour voir les autres sessions (nom, outil, \xE9tat, projet, branche, sujet), lance `ledge who`.",
357
357
  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.",
358
- "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>` te dit qu'un de tes messages n'a pas pu \xEAtre remis.",
358
+ "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).",
359
359
  '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.',
360
360
  ...s.seat ? [s.seat] : [],
361
361
  ...s.relieves ? [`Tu as pris la rel\xE8ve de ${s.relieves.name}, dont le contexte \xE9tait plein : relis son bilan avec \`ledge handover show\`.`] : [],
package/dist/cli/index.js CHANGED
@@ -25,7 +25,7 @@ async function hookMain(args) {
25
25
  try {
26
26
  const chunks = [];
27
27
  for await (const c of process.stdin) chunks.push(c);
28
- const { runHook } = await import("./hook-XBSMUMZ7.js");
28
+ const { runHook } = await import("./hook-TJJEFV54.js");
29
29
  const out = await runHook(event, Buffer.concat(chunks).toString("utf8"), { tool });
30
30
  if (out) process.stdout.write(`${out}
31
31
  `);
@@ -37,7 +37,7 @@ async function main(argv) {
37
37
  const [cmd, ...rest] = argv;
38
38
  switch (cmd) {
39
39
  case "daemon": {
40
- const { startDaemon } = await import("./daemon-ESBBZW7O.js");
40
+ const { startDaemon } = await import("./daemon-YUPB5NUG.js");
41
41
  await startDaemon();
42
42
  await new Promise(() => {
43
43
  });
@@ -45,7 +45,7 @@ async function main(argv) {
45
45
  }
46
46
  case "--version":
47
47
  case "version": {
48
- const { LEDGE_VERSION } = await import("./version-NFURQHXH.js");
48
+ const { LEDGE_VERSION } = await import("./version-YYNMMWKJ.js");
49
49
  console.log(LEDGE_VERSION);
50
50
  return 0;
51
51
  }
@@ -66,74 +66,74 @@ async function main(argv) {
66
66
  return r.ok ? 0 : 1;
67
67
  }
68
68
  case "status": {
69
- const { printStatus } = await import("./status-5YEORNTH.js");
69
+ const { printStatus } = await import("./status-RQRS26S2.js");
70
70
  console.log(await printStatus());
71
71
  return 0;
72
72
  }
73
73
  case "who": {
74
- const { printWho } = await import("./who-YMSQI64I.js");
74
+ const { printWho } = await import("./who-WW6IL4KD.js");
75
75
  console.log(await printWho());
76
76
  return 0;
77
77
  }
78
78
  case "send": {
79
- const { sendMessage } = await import("./send-Y2C3BIGK.js");
79
+ const { sendMessage } = await import("./send-RI7JOO5K.js");
80
80
  const r = await sendMessage(rest);
81
81
  console.log(r.line);
82
82
  return r.code;
83
83
  }
84
84
  case "read": {
85
- const { readMessage } = await import("./send-Y2C3BIGK.js");
85
+ const { readMessage } = await import("./send-RI7JOO5K.js");
86
86
  const r = await readMessage(rest);
87
87
  console.log(r.line);
88
88
  return r.code;
89
89
  }
90
90
  case "task": {
91
- const { runTask } = await import("./task-R44VWZHR.js");
91
+ const { runTask } = await import("./task-U2XHBUKW.js");
92
92
  const r = await runTask(rest);
93
93
  console.log(r.line);
94
94
  return r.code;
95
95
  }
96
96
  case "decide": {
97
- const { runDecide } = await import("./decide-UWJMKDR4.js");
97
+ const { runDecide } = await import("./decide-HFI2WQXI.js");
98
98
  const r = await runDecide(rest);
99
99
  console.log(r.line);
100
100
  return r.code;
101
101
  }
102
102
  case "handover": {
103
- const { runHandover } = await import("./handover-5JHFA5EF.js");
103
+ const { runHandover } = await import("./handover-GKORMXZ2.js");
104
104
  const r = await runHandover(rest);
105
105
  console.log(r.line);
106
106
  return r.code;
107
107
  }
108
108
  case "close": {
109
- const { runClose } = await import("./action-WNQ3NJGD.js");
109
+ const { runClose } = await import("./action-7SJJTIEA.js");
110
110
  const r = await runClose(rest);
111
111
  console.log(r.line);
112
112
  return r.code;
113
113
  }
114
114
  case "team": {
115
- const { runTeam } = await import("./team-F7B3IG3I.js");
115
+ const { runTeam } = await import("./team-NFC4XEIA.js");
116
116
  const r = await runTeam(rest);
117
117
  console.log(r.line);
118
118
  return r.code;
119
119
  }
120
120
  case "tui": {
121
- const { runTui } = await import("./tui-YK6TXFYX.js");
121
+ const { runTui } = await import("./tui-UWR7SDYF.js");
122
122
  return runTui(rest);
123
123
  }
124
124
  case "bridge": {
125
- const { bridge } = await import("./bridge-R37AHVXS.js");
125
+ const { bridge } = await import("./bridge-JK3PMG7T.js");
126
126
  await bridge();
127
127
  return 0;
128
128
  }
129
129
  case "claude":
130
130
  case "codex":
131
131
  case "cursor": {
132
- const { launch } = await import("./launch-OVB66BZJ.js");
132
+ const { launch } = await import("./launch-QKQZZSIM.js");
133
133
  return launch(cmd, rest);
134
134
  }
135
135
  case "attach": {
136
- const { attach } = await import("./attach-UHM7QQ4W.js");
136
+ const { attach } = await import("./attach-V7UPHVB2.js");
137
137
  return attach(rest.find((a) => !a.startsWith("--")) ?? "", { readOnly: rest.includes("--read-only") });
138
138
  }
139
139
  default:
@@ -6,18 +6,18 @@ import {
6
6
  launch,
7
7
  parseLaunchArgs,
8
8
  roleArgs
9
- } from "./chunk-7XMGYJTN.js";
10
- import "./chunk-KRFXWD5S.js";
9
+ } from "./chunk-ISNHG5SJ.js";
10
+ import "./chunk-CVHX7GUB.js";
11
11
  import "./chunk-OLLQBK6N.js";
12
- import "./chunk-JNLARCUC.js";
13
- import "./chunk-RYUDIFSI.js";
14
- import "./chunk-AVKFQSRP.js";
12
+ import "./chunk-YLN3VOGV.js";
13
+ import "./chunk-7JRQCKBP.js";
14
+ import "./chunk-UPKJO3BZ.js";
15
15
  import {
16
16
  agentEnv,
17
17
  exitFile
18
- } from "./chunk-ZDEEHFU3.js";
19
- import "./chunk-TZBI2RVU.js";
20
- import "./chunk-ARB4BKZJ.js";
18
+ } from "./chunk-ADAGKOFO.js";
19
+ import "./chunk-7GIUG73R.js";
20
+ import "./chunk-37G5F75H.js";
21
21
  import "./chunk-NLL2EQJ2.js";
22
22
  import "./chunk-6IYPRUQG.js";
23
23
  import "./chunk-HOOHS3MX.js";
@@ -4,10 +4,10 @@ import {
4
4
  readOnClient,
5
5
  sendMessage,
6
6
  sendOnClient
7
- } from "./chunk-TOFVC6IV.js";
8
- import "./chunk-ZDEEHFU3.js";
9
- import "./chunk-TZBI2RVU.js";
10
- import "./chunk-ARB4BKZJ.js";
7
+ } from "./chunk-RA3OIXEQ.js";
8
+ import "./chunk-ADAGKOFO.js";
9
+ import "./chunk-7GIUG73R.js";
10
+ import "./chunk-37G5F75H.js";
11
11
  import "./chunk-HOOHS3MX.js";
12
12
  import "./chunk-U67V476Y.js";
13
13
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-TZBI2RVU.js";
4
- import "./chunk-ARB4BKZJ.js";
3
+ } from "./chunk-7GIUG73R.js";
4
+ import "./chunk-37G5F75H.js";
5
5
  import "./chunk-HOOHS3MX.js";
6
6
  import "./chunk-U67V476Y.js";
7
7