@runeya/runeya 2.0.137 → 2.0.138

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,11 +1,11 @@
1
1
  import {
2
2
  agentManager
3
- } from "./chunk-J4GLFY7G.js";
3
+ } from "./chunk-ALWA4K5L.js";
4
4
  import "./chunk-BDQOBEZ3.js";
5
5
  import "./chunk-5EMEJNVU.js";
6
6
  import "./chunk-ZFELQG4B.js";
7
- import "./chunk-NURPXHLB.js";
7
+ import "./chunk-OZBSOSAS.js";
8
8
  export {
9
9
  agentManager
10
10
  };
11
- //# sourceMappingURL=agent-manager-FUU72VGH.js.map
11
+ //# sourceMappingURL=agent-manager-2AZVCQRI.js.map
@@ -3,19 +3,19 @@ import {
3
3
  startClaudeCodeSession,
4
4
  startCliSession,
5
5
  startCodexSession
6
- } from "./chunk-P65BO7WZ.js";
6
+ } from "./chunk-GUIONCNA.js";
7
7
  import "./chunk-I7JHF5FE.js";
8
- import "./chunk-FJLMXLMK.js";
8
+ import "./chunk-C6LIGJFX.js";
9
9
  import "./chunk-MD3VW4HQ.js";
10
- import "./chunk-J4GLFY7G.js";
10
+ import "./chunk-ALWA4K5L.js";
11
11
  import "./chunk-BDQOBEZ3.js";
12
12
  import "./chunk-5EMEJNVU.js";
13
13
  import "./chunk-ZFELQG4B.js";
14
- import "./chunk-NURPXHLB.js";
14
+ import "./chunk-OZBSOSAS.js";
15
15
  export {
16
16
  chatRouter,
17
17
  startClaudeCodeSession,
18
18
  startCliSession,
19
19
  startCodexSession
20
20
  };
21
- //# sourceMappingURL=chat-C26CBAZX.js.map
21
+ //# sourceMappingURL=chat-SWYI4ENT.js.map
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  decryptValueWith,
35
35
  encryptValueWith
36
- } from "./chunk-NURPXHLB.js";
36
+ } from "./chunk-OZBSOSAS.js";
37
37
 
38
38
  // ../server/src/services/agent-manager.ts
39
39
  import { EventEmitter as EventEmitter2 } from "events";
@@ -3112,4 +3112,4 @@ export {
3112
3112
  traefikManager,
3113
3113
  agentManager
3114
3114
  };
3115
- //# sourceMappingURL=chunk-J4GLFY7G.js.map
3115
+ //# sourceMappingURL=chunk-ALWA4K5L.js.map
@@ -23,7 +23,7 @@ import {
23
23
  serviceStore,
24
24
  setProjectServices,
25
25
  setProjectVault
26
- } from "./chunk-J4GLFY7G.js";
26
+ } from "./chunk-ALWA4K5L.js";
27
27
  import {
28
28
  atomicWriteSecure,
29
29
  fingerprintFiles,
@@ -2037,7 +2037,7 @@ async function runCompanionForTurn(conversationId) {
2037
2037
  if (!hasNew) {
2038
2038
  return skip(conversationId, "nothingNew", `rien de neuf \xE0 relire (${messageCount} messages)`);
2039
2039
  }
2040
- const { startCliSession } = await import("./chat-C26CBAZX.js");
2040
+ const { startCliSession } = await import("./chat-SWYI4ENT.js");
2041
2041
  const companionConv = await ensureCompanionConversation(conv);
2042
2042
  const isFirstTurn = (companionConv.messages?.length ?? 0) === 0;
2043
2043
  const exchange = formatExchange(conv.messages, from);
@@ -2152,7 +2152,7 @@ async function deliverToMainConversation(conv, message) {
2152
2152
  async function attemptDelivery(conv, message) {
2153
2153
  if (await writeToLivePty(conv.id, message)) return "pty";
2154
2154
  try {
2155
- const { startCliSession } = await import("./chat-C26CBAZX.js");
2155
+ const { startCliSession } = await import("./chat-SWYI4ENT.js");
2156
2156
  await startCliSession(conv.runner, conv.id, message, { jwt: await signJwt() });
2157
2157
  return "headless";
2158
2158
  } catch (err) {
@@ -2317,4 +2317,4 @@ export {
2317
2317
  runCompanionNow,
2318
2318
  initCompanion
2319
2319
  };
2320
- //# sourceMappingURL=chunk-FJLMXLMK.js.map
2320
+ //# sourceMappingURL=chunk-C6LIGJFX.js.map
@@ -30,7 +30,7 @@ import {
30
30
  runCompanionNow,
31
31
  syncConversationFromClaudeTranscript,
32
32
  verifyJwt
33
- } from "./chunk-FJLMXLMK.js";
33
+ } from "./chunk-C6LIGJFX.js";
34
34
  import {
35
35
  StoreDiskCoordinator,
36
36
  agentManager,
@@ -49,7 +49,7 @@ import {
49
49
  recordLocalRemoval,
50
50
  refsOfProjectId,
51
51
  serviceStore
52
- } from "./chunk-J4GLFY7G.js";
52
+ } from "./chunk-ALWA4K5L.js";
53
53
  import {
54
54
  atomicWriteJsonSecure,
55
55
  atomicWriteSecure,
@@ -106,7 +106,7 @@ import {
106
106
  import {
107
107
  isCliAvailable,
108
108
  resolveCliInvocation
109
- } from "./chunk-NURPXHLB.js";
109
+ } from "./chunk-OZBSOSAS.js";
110
110
 
111
111
  // ../server/src/trpc/routers/chat.ts
112
112
  import { z as z9 } from "zod";
@@ -5376,7 +5376,7 @@ function tailTranscript(opts) {
5376
5376
 
5377
5377
  // ../server/src/services/ai-runners/claude-pty-runner.ts
5378
5378
  async function getAgentManager() {
5379
- const { agentManager: agentManager2 } = await import("./agent-manager-FUU72VGH.js");
5379
+ const { agentManager: agentManager2 } = await import("./agent-manager-2AZVCQRI.js");
5380
5380
  return agentManager2;
5381
5381
  }
5382
5382
  function buildPtyArgs(params, sessionId, opts) {
@@ -6070,7 +6070,7 @@ async function shutdownCodexAppServer() {
6070
6070
  }
6071
6071
  }
6072
6072
  async function getAgentManager2() {
6073
- const { agentManager: agentManager2 } = await import("./agent-manager-FUU72VGH.js");
6073
+ const { agentManager: agentManager2 } = await import("./agent-manager-2AZVCQRI.js");
6074
6074
  return agentManager2;
6075
6075
  }
6076
6076
  function parseRuneyaCurlCommand(command) {
@@ -8102,4 +8102,4 @@ export {
8102
8102
  startCliSession,
8103
8103
  chatRouter
8104
8104
  };
8105
- //# sourceMappingURL=chunk-P65BO7WZ.js.map
8105
+ //# sourceMappingURL=chunk-GUIONCNA.js.map
@@ -1,7 +1,7 @@
1
1
  // ../../packages/shared/src/node/node-path.ts
2
2
  import { dirname, delimiter } from "path";
3
3
  function ensureNodeBinOnPath(environment = process.env) {
4
- prependToPath(dirname(process.execPath), environment);
4
+ promoteOnPath(dirname(process.execPath), environment);
5
5
  }
6
6
  function appendToPath(dir, environment = process.env) {
7
7
  if (!dir) return;
@@ -10,12 +10,11 @@ function appendToPath(dir, environment = process.env) {
10
10
  if (entries.includes(dir)) return;
11
11
  environment["PATH"] = entries.length > 0 ? `${current}${delimiter}${dir}` : dir;
12
12
  }
13
- function prependToPath(dir, environment = process.env) {
13
+ function promoteOnPath(dir, environment = process.env) {
14
14
  if (!dir) return;
15
15
  const current = environment["PATH"] ?? "";
16
- const entries = current.split(delimiter).filter(Boolean);
17
- if (entries.includes(dir)) return;
18
- environment["PATH"] = entries.length > 0 ? `${dir}${delimiter}${current}` : dir;
16
+ const others = current.split(delimiter).filter(Boolean).filter((entry) => entry !== dir);
17
+ environment["PATH"] = [dir, ...others].join(delimiter);
19
18
  }
20
19
 
21
20
  // ../../packages/shared/src/node/user-path.ts
@@ -41,7 +40,10 @@ function commonUserBins(home) {
41
40
  async function readLoginShellPath() {
42
41
  if (process.platform === "win32") return null;
43
42
  const shell = process.env["SHELL"];
44
- if (!shell || !existsSync(shell)) return null;
43
+ if (!shell || !existsSync(shell)) {
44
+ warnProbeFailed(shell ? `shell introuvable : ${shell}` : "SHELL absent de cet environnement");
45
+ return null;
46
+ }
45
47
  try {
46
48
  const { stdout } = await execFileAsync(shell, ["-l", "-i", "-c", `echo "${MARKER}$PATH"`], {
47
49
  timeout: SHELL_TIMEOUT_MS,
@@ -51,19 +53,31 @@ async function readLoginShellPath() {
51
53
  env: { ...process.env, TERM: "dumb" }
52
54
  });
53
55
  const line = stdout.split("\n").find((l) => l.includes(MARKER));
54
- if (!line) return null;
56
+ if (!line) {
57
+ warnProbeFailed(`aucune ligne marqu\xE9e dans la r\xE9ponse de ${shell}`);
58
+ return null;
59
+ }
55
60
  const value = line.slice(line.indexOf(MARKER) + MARKER.length).trim();
56
- return value.length > 0 ? value : null;
57
- } catch {
61
+ if (value.length === 0) {
62
+ warnProbeFailed(`${shell} a r\xE9pondu un PATH vide`);
63
+ return null;
64
+ }
65
+ return value;
66
+ } catch (err) {
67
+ const reason = err.killed ? `${shell} n'a pas r\xE9pondu en ${SHELL_TIMEOUT_MS} ms` : `${shell} a \xE9chou\xE9 : ${err instanceof Error ? err.message : String(err)}`;
68
+ warnProbeFailed(reason);
58
69
  return null;
59
70
  }
60
71
  }
72
+ function warnProbeFailed(reason) {
73
+ console.warn(`[path] PATH du shell de connexion non lu (${reason}) \u2014 les outils install\xE9s par l'utilisateur peuvent rester introuvables.`);
74
+ }
61
75
  async function ensureUserBinsOnPath(environment = process.env, home = homedir()) {
62
76
  const shellPath = await readLoginShellPath();
63
77
  if (shellPath) {
64
78
  const entries = shellPath.split(delimiter2).filter(Boolean);
65
79
  for (let i = entries.length - 1; i >= 0; i--) {
66
- prependToPath(entries[i], environment);
80
+ promoteOnPath(entries[i], environment);
67
81
  }
68
82
  }
69
83
  for (const dir of commonUserBins(home)) {
@@ -178,7 +192,7 @@ function decryptValueWith(key, encrypted) {
178
192
  export {
179
193
  ensureNodeBinOnPath,
180
194
  appendToPath,
181
- prependToPath,
195
+ promoteOnPath,
182
196
  readLoginShellPath,
183
197
  ensureUserBinsOnPath,
184
198
  stampConsole,
@@ -188,4 +202,4 @@ export {
188
202
  encryptValueWith,
189
203
  decryptValueWith
190
204
  };
191
- //# sourceMappingURL=chunk-NURPXHLB.js.map
205
+ //# sourceMappingURL=chunk-OZBSOSAS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/shared/src/node/node-path.ts","../../../packages/shared/src/node/user-path.ts","../../../packages/shared/src/node/log-timestamps.ts","../../../packages/shared/src/node/cli-invocation.ts","../../../packages/shared/src/node/aes-gcm.ts"],"sourcesContent":["import { dirname, delimiter } from 'node:path';\n\n/**\n * Garantit que le répertoire du binaire Node est dans le `PATH` des services.\n *\n * Un raccourci de bureau n'hérite pas du `PATH` d'un shell de connexion : il\n * reçoit celui de la session graphique, où les gestionnaires de version (n, nvm,\n * fnm, volta, brew) ne figurent pas. Node, lui, est lancé par chemin absolu et\n * démarre très bien — mais `npm`, `npx`, `yarn` et `corepack`, qui vivent à côté\n * de lui, deviennent introuvables. Un service échoue alors sur un message qui ne\n * dit rien de sa cause : « cannot find package manager binary ».\n *\n * Le répertoire est REMONTÉ en tête. Y être présent ne suffit pas : un poste où\n * `/usr/bin/node` est un Node système ancien le résoudrait avant le nôtre, et le\n * service démarrerait sur la mauvaise version sans rien signaler. Un lanceur de\n * bureau transmet volontiers un `PATH` qui contient déjà tout — dans le\n * désordre — et un simple ajout n'y changerait alors rien.\n */\nexport function ensureNodeBinOnPath(environment: NodeJS.ProcessEnv = process.env): void {\n promoteOnPath(dirname(process.execPath), environment);\n}\n\n/**\n * Ajoute un répertoire en queue du `PATH`, sans doublon ni séparateur vide.\n */\nexport function appendToPath(dir: string, environment: NodeJS.ProcessEnv = process.env): void {\n if (!dir) return;\n const current = environment['PATH'] ?? '';\n const entries = current.split(delimiter).filter(Boolean);\n if (entries.includes(dir)) return;\n environment['PATH'] = entries.length > 0 ? `${current}${delimiter}${dir}` : dir;\n}\n\n/**\n * REMONTE un répertoire en tête du `PATH`, qu'il y figure déjà ou non.\n *\n * Réservé à ce dont on connaît la provenance : le Node qui nous exécute, le\n * `PATH` du shell de connexion. Contrairement à `appendToPath`, une entrée déjà\n * présente n'est pas laissée où elle est : elle est retirée de sa position puis\n * remise devant — sans quoi la correction serait inerte là où elle compte le\n * plus. Un lanceur de bureau peut transmettre un `PATH` contenant déjà nvm,\n * `~/.local/bin` et le reste, tous relégués derrière `/usr/bin` : rien n'y\n * manque, tout y est mal placé.\n *\n * Les doublons du répertoire visé disparaissent au passage — il n'en reste\n * qu'une occurrence, en tête.\n */\nexport function promoteOnPath(dir: string, environment: NodeJS.ProcessEnv = process.env): void {\n if (!dir) return;\n const current = environment['PATH'] ?? '';\n const others = current.split(delimiter).filter(Boolean).filter(entry => entry !== dir);\n environment['PATH'] = [dir, ...others].join(delimiter);\n}\n","import { execFile } from 'node:child_process';\nimport { promisify } from 'node:util';\nimport { homedir } from 'node:os';\nimport { existsSync, statSync } from 'node:fs';\nimport { join, delimiter } from 'node:path';\nimport { appendToPath, promoteOnPath } from './node-path.js';\n\nconst execFileAsync = promisify(execFile);\n\n/**\n * Marqueur : un `.zshrc` interactif écrit volontiers sur stdout (bannières,\n * gestionnaires de version, `motd`). Sans balise, on ne sait pas quelle ligne\n * est le `PATH`.\n */\nconst MARKER = '__RUNEYA_PATH__';\n\n/** Le profil de l'utilisateur peut être long à charger — mais pas éternel. */\nconst SHELL_TIMEOUT_MS = 3000;\n\n/**\n * Emplacements où un CLI utilisateur s'installe sans passer par le système.\n * Filet de sécurité quand le shell de connexion n'a rien donné : on ne devine\n * pas les gestionnaires de version (chemins versionnés), seulement le banal.\n */\nfunction commonUserBins(home: string): string[] {\n return [\n join(home, '.local', 'bin'),\n join(home, 'bin'),\n join(home, '.npm-global', 'bin'),\n join(home, '.bun', 'bin'),\n join(home, '.cargo', 'bin'),\n '/opt/homebrew/bin',\n '/usr/local/bin',\n ];\n}\n\n/**\n * Demande son `PATH` au shell de connexion de l'utilisateur.\n *\n * Un raccourci de bureau reçoit le `PATH` de la session graphique, pas celui du\n * shell : `~/.local/bin`, nvm, fnm, volta, mise, asdf… n'y figurent pas. Le CLI\n * installé par l'utilisateur devient alors introuvable, et l'agent le déclare\n * simplement « non disponible ».\n *\n * Renvoie `null` en cas d'échec (Windows, pas de `SHELL`, timeout, profil qui\n * plante) : l'absence de réponse ne doit jamais empêcher l'agent de démarrer.\n */\nexport async function readLoginShellPath(): Promise<string | null> {\n if (process.platform === 'win32') return null;\n\n const shell = process.env['SHELL'];\n if (!shell || !existsSync(shell)) {\n warnProbeFailed(shell ? `shell introuvable : ${shell}` : 'SHELL absent de cet environnement');\n return null;\n }\n\n try {\n // `-l -i` : le `PATH` d'un utilisateur vit aussi bien dans le profil de\n // connexion que dans le fichier interactif (`.zshrc`, `.bashrc`).\n // `shell: false` : le shell EST le programme lancé, pas l'interpréteur.\n const { stdout } = await execFileAsync(shell, ['-l', '-i', '-c', `echo \"${MARKER}$PATH\"`], {\n timeout: SHELL_TIMEOUT_MS,\n shell: false,\n encoding: 'utf8',\n maxBuffer: 1024 * 1024,\n env: { ...process.env, TERM: 'dumb' },\n });\n\n const line = stdout.split('\\n').find(l => l.includes(MARKER));\n if (!line) {\n warnProbeFailed(`aucune ligne marquée dans la réponse de ${shell}`);\n return null;\n }\n\n const value = line.slice(line.indexOf(MARKER) + MARKER.length).trim();\n if (value.length === 0) {\n warnProbeFailed(`${shell} a répondu un PATH vide`);\n return null;\n }\n return value;\n } catch (err) {\n const reason = (err as { killed?: boolean }).killed\n ? `${shell} n'a pas répondu en ${SHELL_TIMEOUT_MS} ms`\n : `${shell} a échoué : ${err instanceof Error ? err.message : String(err)}`;\n warnProbeFailed(reason);\n return null;\n }\n}\n\n/**\n * Un échec muet ici se paie cher : les outils que l'utilisateur a installés pour\n * lui-même restent introuvables, et rien ne dit pourquoi. Le service démarre\n * alors sur une version qu'il n'a pas choisie, ou pas du tout.\n */\nfunction warnProbeFailed(reason: string): void {\n console.warn(`[path] PATH du shell de connexion non lu (${reason}) — les outils installés par l'utilisateur peuvent rester introuvables.`);\n}\n\n/**\n * Complète le `PATH` de l'agent avec ce que le shell de connexion connaît, puis\n * avec les emplacements utilisateur usuels qui existent réellement sur disque.\n *\n * Le `PATH` du shell passe EN TÊTE, comme pour Node. Le mettre en queue\n * revenait à ne rien faire là où ça comptait : sur un poste portant un Node\n * système en `/usr/bin`, celui-ci l'emportait sur la version choisie par\n * l'utilisateur (nvm, fnm, volta…), et le service démarrait sur la mauvaise\n * sans qu'aucun message ne le dise. Ce que l'utilisateur a choisi pour son\n * shell est ce qu'il attend de ses services.\n *\n * Les entrées du shell sont REMONTÉES, même déjà présentes : un lanceur de\n * bureau transmet parfois un `PATH` qui les contient toutes, reléguées derrière\n * `/usr/bin` — ajouter ce qui manque n'y changerait rien, il faut réordonner.\n *\n * Les emplacements usuels, eux, restent EN QUEUE : ce sont des devinettes, pas\n * une préférence exprimée, et ils ne délogent donc personne.\n */\nexport async function ensureUserBinsOnPath(\n environment: NodeJS.ProcessEnv = process.env,\n home: string = homedir(),\n): Promise<void> {\n const shellPath = await readLoginShellPath();\n if (shellPath) {\n // Parcours à l'envers : chaque entrée passe devant la précédente, donc\n // remonter la liste de la fin vers le début restitue son ordre d'origine.\n const entries = shellPath.split(delimiter).filter(Boolean);\n for (let i = entries.length - 1; i >= 0; i--) {\n promoteOnPath(entries[i]!, environment);\n }\n }\n\n for (const dir of commonUserBins(home)) {\n if (isDirectory(dir)) appendToPath(dir, environment);\n }\n}\n\nfunction isDirectory(path: string): boolean {\n try {\n return statSync(path).isDirectory();\n } catch {\n return false;\n }\n}\n","/**\n * Horodate ce que le process écrit sur la console, en temps écoulé depuis son\n * démarrage.\n *\n * Les 300 et quelques appels à `console.log` du serveur, de l'agent et du CLI\n * n'ont pas à être réécrits : on enveloppe `console` une fois, au démarrage, et\n * tout ce qui passe par lui est daté — jusqu'aux bibliothèques tierces.\n *\n * Le delta plutôt que l'heure : ces journaux servent surtout à comprendre ce qui\n * prend du temps au sein d'un même lancement, et « +1.204s » se lit sans\n * soustraction mentale. L'heure absolue reste disponible dans le journal\n * d'audit, qui, lui, sert à recouper avec le cloud.\n */\n\n/**\n * Une ligne qui ne dit rien à dater : une ligne vide, ou un morceau d'encadré.\n *\n * La bannière de démarrage est dessinée ligne à ligne ; un horodatage devant\n * chacune casse l'alignement des colonnes et n'apprend rien — elles sont toutes\n * écrites dans la même milliseconde.\n */\nfunction isDecorative(args: unknown[]): boolean {\n if (args.length === 0) return true;\n const first = args[0];\n if (typeof first !== 'string') return false;\n const trimmed = first.trim();\n return trimmed === '' || /^[┌│└├┬┴┼─┐┘┤]/.test(trimmed);\n}\n\nconst LEVELS = ['log', 'info', 'warn', 'error', 'debug'] as const;\n\n/** Le temps écoulé, cadré pour que les lignes s'alignent en colonne. */\nfunction formatElapsed(startedAt: number, now: number): string {\n const seconds = (now - startedAt) / 1000;\n return `+${seconds.toFixed(3)}s`.padStart(10);\n}\n\n/**\n * Enveloppe `console`. Rend une fonction qui remet l'original en place — les\n * tests en ont besoin, et un mode dont la sortie est lue par un script aussi.\n *\n * Appelé deux fois, le second appel ne fait rien : sans cette garde, deux\n * horodatages se cumuleraient sur chaque ligne.\n */\nexport function stampConsole(startedAt: number = Date.now()): () => void {\n const target = console as unknown as Record<string, unknown> & { __runeyaStamped?: boolean };\n if (target.__runeyaStamped) return () => {};\n target.__runeyaStamped = true;\n\n const originals = LEVELS.map((level) => {\n const original = console[level].bind(console);\n console[level] = (...args: unknown[]) => (\n isDecorative(args)\n ? original(...args)\n : original(formatElapsed(startedAt, Date.now()), ...args)\n );\n return [level, original] as const;\n });\n\n return () => {\n for (const [level, original] of originals) console[level] = original;\n target.__runeyaStamped = false;\n };\n}\n","import { execFile, execFileSync } from 'node:child_process';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { dirname, resolve as resolvePath } from 'node:path';\n\nexport interface CliInvocation {\n command: string;\n args: string[];\n}\n\n/**\n * Comment lancer un CLI global (`claude`, `codex`) sur la plateforme courante.\n *\n * Windows : un CLI installé globalement par npm n'est pas un `.exe` mais un\n * shim `claude.cmd`. Ni `child_process.spawn(..., { shell: false })` ni\n * `pty.spawn()` ne savent le lancer — node-pty échoue sur « File not found:\n * claude ». Passer par `cmd.exe /c` fonctionnerait mais abîme les arguments\n * (le prompt système contient guillemets, retours à la ligne et `%`), donc on\n * résout le point d'entrée JS visé par le shim et on le lance avec le `node`\n * courant.\n *\n * Sur POSIX la commande est rendue telle quelle : rien ne change pour Linux\n * ni macOS.\n */\nexport function resolveCliInvocation(cli: string, args: string[] = []): CliInvocation {\n if (process.platform !== 'win32') return { command: cli, args };\n if (/\\.exe$/i.test(cli)) return { command: cli, args };\n\n // 1. Localiser le shim sur le PATH (sauf si un chemin explicite est donné).\n let shim = cli;\n if (!cli.includes('\\\\') && !cli.includes('/')) {\n let found: string[] = [];\n try {\n // Borné : un `where` qui ne rend pas la main figerait le process appelant,\n // puisque la résolution est synchrone.\n found = execFileSync('where', [cli], { encoding: 'utf-8', timeout: 5_000, windowsHide: true })\n .split(/\\r?\\n/).map((l) => l.trim()).filter(Boolean);\n } catch { /* absent du PATH — laisser le spawn échouer avec son propre message */ }\n const exe = found.find((f) => /\\.exe$/i.test(f));\n if (exe) return { command: exe, args };\n shim = found.find((f) => /\\.cmd$/i.test(f)) ?? found[0] ?? cli;\n }\n if (/\\.exe$/i.test(shim)) return { command: shim, args };\n\n // 2. Extraire le point d'entrée `.js` du shim npm et le lancer avec node.\n if (/\\.cmd$/i.test(shim) && existsSync(shim)) {\n try {\n const content = readFileSync(shim, 'utf-8');\n // Les shims npm écrivent « %~dp0\\...\\cli.js » ; certains outils écrivent\n // « %~dp0%\\...\\cli.js ». Les deux formes mènent au même point d'entrée.\n const m = content.match(/%~?dp0%?\\\\?([^\"\\s]+\\.js)/i);\n if (m?.[1]) {\n const entry = resolvePath(dirname(shim), m[1].replace(/^\\\\+/, ''));\n if (existsSync(entry)) return { command: process.execPath, args: [entry, ...args] };\n }\n } catch { /* on retombe sur l'interpréteur de commandes */ }\n }\n\n // 3. Dernier recours : confier à l'interpréteur de commandes.\n const comspec = process.env['ComSpec'] || process.env['COMSPEC'] || 'cmd.exe';\n return { command: comspec, args: ['/d', '/s', '/c', shim, ...args] };\n}\n\n/**\n * La commande qui dit où vit un exécutable, selon la plateforme.\n *\n * `which` n'existe pas sur Windows ; une détection qui l'appelle y répond\n * toujours « absent », quel que soit l'outil installé.\n */\nexport function whichCommand(): string {\n return process.platform === 'win32' ? 'where' : 'which';\n}\n\n/**\n * `<cli> --version` répond-il ?\n *\n * Le même contrôle vivait côté serveur et côté agent, et les deux lançaient\n * `execFile('claude', …, { shell: false })` : sur Windows, un shim `.cmd` n'est\n * pas lançable ainsi, et la détection répondait « absent » pour un CLI\n * parfaitement installé — l'interface désactivait alors le runner.\n */\nexport async function isCliAvailable(cli: string, timeoutMs = 5_000): Promise<boolean> {\n const { command, args } = resolveCliInvocation(cli, ['--version']);\n return new Promise((resolve) => {\n execFile(command, args, { timeout: timeoutMs, windowsHide: true }, (err) => resolve(!err));\n });\n}\n","import { randomBytes, createCipheriv, createDecipheriv } from 'node:crypto';\n\nconst ALGORITHM = 'aes-256-gcm';\n\n/**\n * Encrypt under a caller-supplied key.\n *\n * The no-key forms in the server read the process keyring, which is the right default\n * everywhere except migration: converting a vault means holding two keys at\n * once, and neither of them is \"the\" current one.\n */\nexport function encryptValueWith(key: Buffer, plaintext: string): string {\n const iv = randomBytes(16);\n const cipher = createCipheriv(ALGORITHM, key, iv);\n let enc = cipher.update(plaintext, 'utf-8', 'hex');\n enc += cipher.final('hex');\n const authTag = cipher.getAuthTag().toString('hex');\n return `${iv.toString('hex')}:${authTag}:${enc}`;\n}\n\n/** Decrypt under a caller-supplied key. Throws when the key does not open it. */\nexport function decryptValueWith(key: Buffer, encrypted: string): string {\n const parts = encrypted.split(':');\n if (parts.length !== 3) throw new Error('Invalid encrypted value format — expected iv:authTag:ciphertext');\n const [ivHex, authTagHex, ciphertext] = parts;\n if (!/^[0-9a-f]+$/i.test(ivHex) || !/^[0-9a-f]+$/i.test(authTagHex) || (ciphertext !== '' && !/^[0-9a-f]+$/i.test(ciphertext))) {\n throw new Error('Invalid hex in encrypted value — possible data corruption');\n }\n const decipher = createDecipheriv(ALGORITHM, key, Buffer.from(ivHex, 'hex'), { authTagLength: 16 });\n decipher.setAuthTag(Buffer.from(authTagHex, 'hex'));\n let dec = decipher.update(ciphertext, 'hex', 'utf-8');\n dec += decipher.final('utf-8');\n return dec;\n}\n"],"mappings":";AAAA,SAAS,SAAS,iBAAiB;AAkB5B,SAAS,oBAAoB,cAAiC,QAAQ,KAAW;AACtF,gBAAc,QAAQ,QAAQ,QAAQ,GAAG,WAAW;AACtD;AAKO,SAAS,aAAa,KAAa,cAAiC,QAAQ,KAAW;AAC5F,MAAI,CAAC,IAAK;AACV,QAAM,UAAU,YAAY,MAAM,KAAK;AACvC,QAAM,UAAU,QAAQ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":["delimiter","delimiter","execFile","existsSync","dirname"]}
@@ -27,13 +27,13 @@ import {
27
27
  reviewWindow,
28
28
  runCompanionNow,
29
29
  takeRelaunchSlot
30
- } from "./chunk-FJLMXLMK.js";
30
+ } from "./chunk-C6LIGJFX.js";
31
31
  import "./chunk-MD3VW4HQ.js";
32
- import "./chunk-J4GLFY7G.js";
32
+ import "./chunk-ALWA4K5L.js";
33
33
  import "./chunk-BDQOBEZ3.js";
34
34
  import "./chunk-5EMEJNVU.js";
35
35
  import "./chunk-ZFELQG4B.js";
36
- import "./chunk-NURPXHLB.js";
36
+ import "./chunk-OZBSOSAS.js";
37
37
  export {
38
38
  COMPANION_SIGNATURE,
39
39
  MAX_CONSECUTIVE_RELAUNCHES,
@@ -64,4 +64,4 @@ export {
64
64
  runCompanionNow,
65
65
  takeRelaunchSlot
66
66
  };
67
- //# sourceMappingURL=companion-Q67RAO3N.js.map
67
+ //# sourceMappingURL=companion-JYLQKSFO.js.map
package/index.js CHANGED
@@ -135,7 +135,7 @@ if (subCommand === "install-desktop" || subCommand === "uninstall-desktop") {
135
135
  }
136
136
  }
137
137
  if (subCommand === "instances") {
138
- const { listInstances, killInstance, restartInstance } = await import("./src-7O3GCEIB.js");
138
+ const { listInstances, killInstance, restartInstance } = await import("./src-42DMJB3D.js");
139
139
  const { runInstancesCommand } = await import("./instances-command-KZ5UGXOR.js");
140
140
  process.exit(await runInstancesCommand(args.slice(1), {
141
141
  listInstances,
@@ -295,7 +295,7 @@ function listenWithRetry(server, port, host, wss, maxRetries = 20, delay = 500)
295
295
  });
296
296
  }
297
297
  async function main() {
298
- const { ensureNodeBinOnPath, ensureUserBinsOnPath, stampConsole } = await import("./node-4UUJN2WG.js");
298
+ const { ensureNodeBinOnPath, ensureUserBinsOnPath, stampConsole } = await import("./node-RN4URNZ5.js");
299
299
  ensureNodeBinOnPath();
300
300
  await ensureUserBinsOnPath();
301
301
  if (!isPullEnv) {
@@ -307,7 +307,7 @@ async function main() {
307
307
  console.warn(`[cli] Journal sur disque indisponible : ${err.message}`);
308
308
  }
309
309
  }
310
- const { createLocalServer, pullEnv, PullEnvError, registerInstance, registerCliLocation } = await import("./src-7O3GCEIB.js");
310
+ const { createLocalServer, pullEnv, PullEnvError, registerInstance, registerCliLocation } = await import("./src-42DMJB3D.js");
311
311
  registerCliLocation({ execPath: process.execPath, cliEntry: fileURLToPath(import.meta.url) });
312
312
  if (isPullEnv) {
313
313
  if (!serviceArg) {
@@ -416,7 +416,7 @@ async function main() {
416
416
  networkInfo,
417
417
  setLanMode,
418
418
  resolveTrayIcon
419
- } = await import("./src-7O3GCEIB.js");
419
+ } = await import("./src-42DMJB3D.js");
420
420
  tray = await startInstanceTray({
421
421
  info: { cwd: process.cwd(), port, version, url: appUrl },
422
422
  assetsDir: join(__dirname, "assets"),
@@ -5,12 +5,12 @@ import {
5
5
  ensureNodeBinOnPath,
6
6
  ensureUserBinsOnPath,
7
7
  isCliAvailable,
8
- prependToPath,
8
+ promoteOnPath,
9
9
  readLoginShellPath,
10
10
  resolveCliInvocation,
11
11
  stampConsole,
12
12
  whichCommand
13
- } from "./chunk-NURPXHLB.js";
13
+ } from "./chunk-OZBSOSAS.js";
14
14
  export {
15
15
  appendToPath,
16
16
  decryptValueWith,
@@ -18,10 +18,10 @@ export {
18
18
  ensureNodeBinOnPath,
19
19
  ensureUserBinsOnPath,
20
20
  isCliAvailable,
21
- prependToPath,
21
+ promoteOnPath,
22
22
  readLoginShellPath,
23
23
  resolveCliInvocation,
24
24
  stampConsole,
25
25
  whichCommand
26
26
  };
27
- //# sourceMappingURL=node-4UUJN2WG.js.map
27
+ //# sourceMappingURL=node-RN4URNZ5.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeya/runeya",
3
- "version": "2.0.137",
3
+ "version": "2.0.138",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "runeya": "./index.js"
@@ -65,7 +65,7 @@ import {
65
65
  soleAccountScope,
66
66
  startCliSession,
67
67
  vaultOfProject
68
- } from "./chunk-P65BO7WZ.js";
68
+ } from "./chunk-GUIONCNA.js";
69
69
  import {
70
70
  settingsManager
71
71
  } from "./chunk-I7JHF5FE.js";
@@ -87,7 +87,7 @@ import {
87
87
  stopClaudeTranscriptWatcher,
88
88
  stopCodexTranscriptWatcher,
89
89
  verifyJwt
90
- } from "./chunk-FJLMXLMK.js";
90
+ } from "./chunk-C6LIGJFX.js";
91
91
  import "./chunk-MD3VW4HQ.js";
92
92
  import {
93
93
  agentManager,
@@ -127,7 +127,7 @@ import {
127
127
  stableEncryptValue,
128
128
  traefikManager,
129
129
  unregisterInstance
130
- } from "./chunk-J4GLFY7G.js";
130
+ } from "./chunk-ALWA4K5L.js";
131
131
  import {
132
132
  atomicWriteSecure,
133
133
  renameWithRetry,
@@ -199,7 +199,7 @@ import {
199
199
  encryptValueWith,
200
200
  resolveCliInvocation,
201
201
  whichCommand
202
- } from "./chunk-NURPXHLB.js";
202
+ } from "./chunk-OZBSOSAS.js";
203
203
 
204
204
  // ../server/src/create-server.ts
205
205
  import express from "express";
@@ -10830,7 +10830,7 @@ async function createLocalServer() {
10830
10830
  ]);
10831
10831
  console.log("[server] Shutdown complete");
10832
10832
  };
10833
- const { initCompanion } = await import("./companion-Q67RAO3N.js");
10833
+ const { initCompanion } = await import("./companion-JYLQKSFO.js");
10834
10834
  initCompanion();
10835
10835
  return { app, server, wss, shutdown };
10836
10836
  }
@@ -11220,7 +11220,7 @@ function listenWithRetry(server, port, host, wss, maxRetries = 20, delay = 500)
11220
11220
  });
11221
11221
  }
11222
11222
  async function main() {
11223
- const { ensureNodeBinOnPath, ensureUserBinsOnPath } = await import("./node-4UUJN2WG.js");
11223
+ const { ensureNodeBinOnPath, ensureUserBinsOnPath } = await import("./node-RN4URNZ5.js");
11224
11224
  ensureNodeBinOnPath();
11225
11225
  await ensureUserBinsOnPath();
11226
11226
  console.log("Hello World 2");
@@ -11277,4 +11277,4 @@ export {
11277
11277
  startProcess,
11278
11278
  stopProcess
11279
11279
  };
11280
- //# sourceMappingURL=src-7O3GCEIB.js.map
11280
+ //# sourceMappingURL=src-42DMJB3D.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/shared/src/node/node-path.ts","../../../packages/shared/src/node/user-path.ts","../../../packages/shared/src/node/log-timestamps.ts","../../../packages/shared/src/node/cli-invocation.ts","../../../packages/shared/src/node/aes-gcm.ts"],"sourcesContent":["import { dirname, delimiter } from 'node:path';\n\n/**\n * Garantit que le répertoire du binaire Node est dans le `PATH` des services.\n *\n * Un raccourci de bureau n'hérite pas du `PATH` d'un shell de connexion : il\n * reçoit celui de la session graphique, où les gestionnaires de version (n, nvm,\n * fnm, volta, brew) ne figurent pas. Node, lui, est lancé par chemin absolu et\n * démarre très bien — mais `npm`, `npx`, `yarn` et `corepack`, qui vivent à côté\n * de lui, deviennent introuvables. Un service échoue alors sur un message qui ne\n * dit rien de sa cause : « cannot find package manager binary ».\n *\n * Le répertoire est ajouté EN TÊTE. Être présent dans le `PATH` ne suffit pas :\n * un poste où `/usr/bin/node` est un Node système ancien le résoudrait avant le\n * nôtre, et le service démarrerait sur la mauvaise version sans rien signaler.\n */\nexport function ensureNodeBinOnPath(environment: NodeJS.ProcessEnv = process.env): void {\n prependToPath(dirname(process.execPath), environment);\n}\n\n/**\n * Ajoute un répertoire en queue du `PATH`, sans doublon ni séparateur vide.\n */\nexport function appendToPath(dir: string, environment: NodeJS.ProcessEnv = process.env): void {\n if (!dir) return;\n const current = environment['PATH'] ?? '';\n const entries = current.split(delimiter).filter(Boolean);\n if (entries.includes(dir)) return;\n environment['PATH'] = entries.length > 0 ? `${current}${delimiter}${dir}` : dir;\n}\n\n/**\n * Ajoute un répertoire en TÊTE du `PATH`, sans doublon ni séparateur vide.\n *\n * Réservé à ce dont on connaît la provenance — le Node qui nous exécute, le\n * `PATH` du shell de connexion de l'utilisateur — par opposition aux\n * emplacements devinés, qui restent en queue.\n *\n * Un répertoire déjà présent n'est PAS déplacé : on complète un `PATH`, on ne\n * réordonne pas les choix que la machine a déjà faits pour ses propres\n * répertoires.\n */\nexport function prependToPath(dir: string, environment: NodeJS.ProcessEnv = process.env): void {\n if (!dir) return;\n const current = environment['PATH'] ?? '';\n const entries = current.split(delimiter).filter(Boolean);\n if (entries.includes(dir)) return;\n environment['PATH'] = entries.length > 0 ? `${dir}${delimiter}${current}` : dir;\n}\n","import { execFile } from 'node:child_process';\nimport { promisify } from 'node:util';\nimport { homedir } from 'node:os';\nimport { existsSync, statSync } from 'node:fs';\nimport { join, delimiter } from 'node:path';\nimport { appendToPath, prependToPath } from './node-path.js';\n\nconst execFileAsync = promisify(execFile);\n\n/**\n * Marqueur : un `.zshrc` interactif écrit volontiers sur stdout (bannières,\n * gestionnaires de version, `motd`). Sans balise, on ne sait pas quelle ligne\n * est le `PATH`.\n */\nconst MARKER = '__RUNEYA_PATH__';\n\n/** Le profil de l'utilisateur peut être long à charger — mais pas éternel. */\nconst SHELL_TIMEOUT_MS = 3000;\n\n/**\n * Emplacements où un CLI utilisateur s'installe sans passer par le système.\n * Filet de sécurité quand le shell de connexion n'a rien donné : on ne devine\n * pas les gestionnaires de version (chemins versionnés), seulement le banal.\n */\nfunction commonUserBins(home: string): string[] {\n return [\n join(home, '.local', 'bin'),\n join(home, 'bin'),\n join(home, '.npm-global', 'bin'),\n join(home, '.bun', 'bin'),\n join(home, '.cargo', 'bin'),\n '/opt/homebrew/bin',\n '/usr/local/bin',\n ];\n}\n\n/**\n * Demande son `PATH` au shell de connexion de l'utilisateur.\n *\n * Un raccourci de bureau reçoit le `PATH` de la session graphique, pas celui du\n * shell : `~/.local/bin`, nvm, fnm, volta, mise, asdf… n'y figurent pas. Le CLI\n * installé par l'utilisateur devient alors introuvable, et l'agent le déclare\n * simplement « non disponible ».\n *\n * Renvoie `null` en cas d'échec (Windows, pas de `SHELL`, timeout, profil qui\n * plante) : l'absence de réponse ne doit jamais empêcher l'agent de démarrer.\n */\nexport async function readLoginShellPath(): Promise<string | null> {\n if (process.platform === 'win32') return null;\n\n const shell = process.env['SHELL'];\n if (!shell || !existsSync(shell)) return null;\n\n try {\n // `-l -i` : le `PATH` d'un utilisateur vit aussi bien dans le profil de\n // connexion que dans le fichier interactif (`.zshrc`, `.bashrc`).\n // `shell: false` : le shell EST le programme lancé, pas l'interpréteur.\n const { stdout } = await execFileAsync(shell, ['-l', '-i', '-c', `echo \"${MARKER}$PATH\"`], {\n timeout: SHELL_TIMEOUT_MS,\n shell: false,\n encoding: 'utf8',\n maxBuffer: 1024 * 1024,\n env: { ...process.env, TERM: 'dumb' },\n });\n\n const line = stdout.split('\\n').find(l => l.includes(MARKER));\n if (!line) return null;\n\n const value = line.slice(line.indexOf(MARKER) + MARKER.length).trim();\n return value.length > 0 ? value : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Complète le `PATH` de l'agent avec ce que le shell de connexion connaît, puis\n * avec les emplacements utilisateur usuels qui existent réellement sur disque.\n *\n * Le `PATH` du shell passe EN TÊTE, comme pour Node. Le mettre en queue\n * revenait à ne rien faire là où ça comptait : sur un poste portant un Node\n * système en `/usr/bin`, celui-ci l'emportait sur la version choisie par\n * l'utilisateur (nvm, fnm, volta…), et le service démarrait sur la mauvaise\n * sans qu'aucun message ne le dise. Ce que l'utilisateur a choisi pour son\n * shell est ce qu'il attend de ses services.\n *\n * Les emplacements usuels, eux, restent EN QUEUE : ce sont des devinettes, pas\n * une préférence exprimée. Un répertoire déjà présent n'est jamais déplacé.\n */\nexport async function ensureUserBinsOnPath(\n environment: NodeJS.ProcessEnv = process.env,\n home: string = homedir(),\n): Promise<void> {\n const shellPath = await readLoginShellPath();\n if (shellPath) {\n // Parcours à l'envers : chaque entrée passe devant la précédente, donc\n // remonter la liste de la fin vers le début restitue son ordre d'origine.\n const entries = shellPath.split(delimiter).filter(Boolean);\n for (let i = entries.length - 1; i >= 0; i--) {\n prependToPath(entries[i]!, environment);\n }\n }\n\n for (const dir of commonUserBins(home)) {\n if (isDirectory(dir)) appendToPath(dir, environment);\n }\n}\n\nfunction isDirectory(path: string): boolean {\n try {\n return statSync(path).isDirectory();\n } catch {\n return false;\n }\n}\n","/**\n * Horodate ce que le process écrit sur la console, en temps écoulé depuis son\n * démarrage.\n *\n * Les 300 et quelques appels à `console.log` du serveur, de l'agent et du CLI\n * n'ont pas à être réécrits : on enveloppe `console` une fois, au démarrage, et\n * tout ce qui passe par lui est daté — jusqu'aux bibliothèques tierces.\n *\n * Le delta plutôt que l'heure : ces journaux servent surtout à comprendre ce qui\n * prend du temps au sein d'un même lancement, et « +1.204s » se lit sans\n * soustraction mentale. L'heure absolue reste disponible dans le journal\n * d'audit, qui, lui, sert à recouper avec le cloud.\n */\n\n/**\n * Une ligne qui ne dit rien à dater : une ligne vide, ou un morceau d'encadré.\n *\n * La bannière de démarrage est dessinée ligne à ligne ; un horodatage devant\n * chacune casse l'alignement des colonnes et n'apprend rien — elles sont toutes\n * écrites dans la même milliseconde.\n */\nfunction isDecorative(args: unknown[]): boolean {\n if (args.length === 0) return true;\n const first = args[0];\n if (typeof first !== 'string') return false;\n const trimmed = first.trim();\n return trimmed === '' || /^[┌│└├┬┴┼─┐┘┤]/.test(trimmed);\n}\n\nconst LEVELS = ['log', 'info', 'warn', 'error', 'debug'] as const;\n\n/** Le temps écoulé, cadré pour que les lignes s'alignent en colonne. */\nfunction formatElapsed(startedAt: number, now: number): string {\n const seconds = (now - startedAt) / 1000;\n return `+${seconds.toFixed(3)}s`.padStart(10);\n}\n\n/**\n * Enveloppe `console`. Rend une fonction qui remet l'original en place — les\n * tests en ont besoin, et un mode dont la sortie est lue par un script aussi.\n *\n * Appelé deux fois, le second appel ne fait rien : sans cette garde, deux\n * horodatages se cumuleraient sur chaque ligne.\n */\nexport function stampConsole(startedAt: number = Date.now()): () => void {\n const target = console as unknown as Record<string, unknown> & { __runeyaStamped?: boolean };\n if (target.__runeyaStamped) return () => {};\n target.__runeyaStamped = true;\n\n const originals = LEVELS.map((level) => {\n const original = console[level].bind(console);\n console[level] = (...args: unknown[]) => (\n isDecorative(args)\n ? original(...args)\n : original(formatElapsed(startedAt, Date.now()), ...args)\n );\n return [level, original] as const;\n });\n\n return () => {\n for (const [level, original] of originals) console[level] = original;\n target.__runeyaStamped = false;\n };\n}\n","import { execFile, execFileSync } from 'node:child_process';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { dirname, resolve as resolvePath } from 'node:path';\n\nexport interface CliInvocation {\n command: string;\n args: string[];\n}\n\n/**\n * Comment lancer un CLI global (`claude`, `codex`) sur la plateforme courante.\n *\n * Windows : un CLI installé globalement par npm n'est pas un `.exe` mais un\n * shim `claude.cmd`. Ni `child_process.spawn(..., { shell: false })` ni\n * `pty.spawn()` ne savent le lancer — node-pty échoue sur « File not found:\n * claude ». Passer par `cmd.exe /c` fonctionnerait mais abîme les arguments\n * (le prompt système contient guillemets, retours à la ligne et `%`), donc on\n * résout le point d'entrée JS visé par le shim et on le lance avec le `node`\n * courant.\n *\n * Sur POSIX la commande est rendue telle quelle : rien ne change pour Linux\n * ni macOS.\n */\nexport function resolveCliInvocation(cli: string, args: string[] = []): CliInvocation {\n if (process.platform !== 'win32') return { command: cli, args };\n if (/\\.exe$/i.test(cli)) return { command: cli, args };\n\n // 1. Localiser le shim sur le PATH (sauf si un chemin explicite est donné).\n let shim = cli;\n if (!cli.includes('\\\\') && !cli.includes('/')) {\n let found: string[] = [];\n try {\n // Borné : un `where` qui ne rend pas la main figerait le process appelant,\n // puisque la résolution est synchrone.\n found = execFileSync('where', [cli], { encoding: 'utf-8', timeout: 5_000, windowsHide: true })\n .split(/\\r?\\n/).map((l) => l.trim()).filter(Boolean);\n } catch { /* absent du PATH — laisser le spawn échouer avec son propre message */ }\n const exe = found.find((f) => /\\.exe$/i.test(f));\n if (exe) return { command: exe, args };\n shim = found.find((f) => /\\.cmd$/i.test(f)) ?? found[0] ?? cli;\n }\n if (/\\.exe$/i.test(shim)) return { command: shim, args };\n\n // 2. Extraire le point d'entrée `.js` du shim npm et le lancer avec node.\n if (/\\.cmd$/i.test(shim) && existsSync(shim)) {\n try {\n const content = readFileSync(shim, 'utf-8');\n // Les shims npm écrivent « %~dp0\\...\\cli.js » ; certains outils écrivent\n // « %~dp0%\\...\\cli.js ». Les deux formes mènent au même point d'entrée.\n const m = content.match(/%~?dp0%?\\\\?([^\"\\s]+\\.js)/i);\n if (m?.[1]) {\n const entry = resolvePath(dirname(shim), m[1].replace(/^\\\\+/, ''));\n if (existsSync(entry)) return { command: process.execPath, args: [entry, ...args] };\n }\n } catch { /* on retombe sur l'interpréteur de commandes */ }\n }\n\n // 3. Dernier recours : confier à l'interpréteur de commandes.\n const comspec = process.env['ComSpec'] || process.env['COMSPEC'] || 'cmd.exe';\n return { command: comspec, args: ['/d', '/s', '/c', shim, ...args] };\n}\n\n/**\n * La commande qui dit où vit un exécutable, selon la plateforme.\n *\n * `which` n'existe pas sur Windows ; une détection qui l'appelle y répond\n * toujours « absent », quel que soit l'outil installé.\n */\nexport function whichCommand(): string {\n return process.platform === 'win32' ? 'where' : 'which';\n}\n\n/**\n * `<cli> --version` répond-il ?\n *\n * Le même contrôle vivait côté serveur et côté agent, et les deux lançaient\n * `execFile('claude', …, { shell: false })` : sur Windows, un shim `.cmd` n'est\n * pas lançable ainsi, et la détection répondait « absent » pour un CLI\n * parfaitement installé — l'interface désactivait alors le runner.\n */\nexport async function isCliAvailable(cli: string, timeoutMs = 5_000): Promise<boolean> {\n const { command, args } = resolveCliInvocation(cli, ['--version']);\n return new Promise((resolve) => {\n execFile(command, args, { timeout: timeoutMs, windowsHide: true }, (err) => resolve(!err));\n });\n}\n","import { randomBytes, createCipheriv, createDecipheriv } from 'node:crypto';\n\nconst ALGORITHM = 'aes-256-gcm';\n\n/**\n * Encrypt under a caller-supplied key.\n *\n * The no-key forms in the server read the process keyring, which is the right default\n * everywhere except migration: converting a vault means holding two keys at\n * once, and neither of them is \"the\" current one.\n */\nexport function encryptValueWith(key: Buffer, plaintext: string): string {\n const iv = randomBytes(16);\n const cipher = createCipheriv(ALGORITHM, key, iv);\n let enc = cipher.update(plaintext, 'utf-8', 'hex');\n enc += cipher.final('hex');\n const authTag = cipher.getAuthTag().toString('hex');\n return `${iv.toString('hex')}:${authTag}:${enc}`;\n}\n\n/** Decrypt under a caller-supplied key. Throws when the key does not open it. */\nexport function decryptValueWith(key: Buffer, encrypted: string): string {\n const parts = encrypted.split(':');\n if (parts.length !== 3) throw new Error('Invalid encrypted value format — expected iv:authTag:ciphertext');\n const [ivHex, authTagHex, ciphertext] = parts;\n if (!/^[0-9a-f]+$/i.test(ivHex) || !/^[0-9a-f]+$/i.test(authTagHex) || (ciphertext !== '' && !/^[0-9a-f]+$/i.test(ciphertext))) {\n throw new Error('Invalid hex in encrypted value — possible data corruption');\n }\n const decipher = createDecipheriv(ALGORITHM, key, Buffer.from(ivHex, 'hex'), { authTagLength: 16 });\n decipher.setAuthTag(Buffer.from(authTagHex, 'hex'));\n let dec = decipher.update(ciphertext, 'hex', 'utf-8');\n dec += decipher.final('utf-8');\n return dec;\n}\n"],"mappings":";AAAA,SAAS,SAAS,iBAAiB;AAgB5B,SAAS,oBAAoB,cAAiC,QAAQ,KAAW;AACtF,gBAAc,QAAQ,QAAQ,QAAQ,GAAG,WAAW;AACtD;AAKO,SAAS,aAAa,KAAa,cAAiC,QAAQ,KAAW;AAC5F,MAAI,CAAC,IAAK;AACV,QAAM,UAAU,YAAY,MAAM,KAAK;AACvC,QAAM,UAAU,QAAQ,MAAM,SAAS,EAAE,OAAO,OAAO;AACvD,MAAI,QAAQ,SAAS,GAAG,EAAG;AAC3B,cAAY,MAAM,IAAI,QAAQ,SAAS,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,GAAG,KAAK;AAC9E;AAaO,SAAS,cAAc,KAAa,cAAiC,QAAQ,KAAW;AAC7F,MAAI,CAAC,IAAK;AACV,QAAM,UAAU,YAAY,MAAM,KAAK;AACvC,QAAM,UAAU,QAAQ,MAAM,SAAS,EAAE,OAAO,OAAO;AACvD,MAAI,Q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AAM,GAAG;AACjC,MAAI,MAAM,WAAW,EAAG,OAAM,IAAI,MAAM,sEAAiE;AACzG,QAAM,CAAC,OAAO,YAAY,UAAU,IAAI;AACxC,MAAI,CAAC,eAAe,KAAK,KAAK,KAAK,CAAC,eAAe,KAAK,UAAU,KAAM,eAAe,MAAM,CAAC,eAAe,KAAK,UAAU,GAAI;AAC9H,UAAM,IAAI,MAAM,gEAA2D;AAAA,EAC7E;AACA,QAAM,WAAW,iBAAiB,WAAW,KAAK,OAAO,KAAK,OAAO,KAAK,GAAG,EAAE,eAAe,GAAG,CAAC;AAClG,WAAS,WAAW,OAAO,KAAK,YAAY,KAAK,CAAC;AAClD,MAAI,MAAM,SAAS,OAAO,YAAY,OAAO,OAAO;AACpD,SAAO,SAAS,MAAM,OAAO;AAC7B,SAAO;AACT;","names":["delimiter","delimiter","execFile","existsSync","dirname"]}
File without changes
File without changes
File without changes