@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.
- package/agent/index.js +24 -10
- package/agent/index.js.map +1 -1
- package/{agent-manager-FUU72VGH.js → agent-manager-2AZVCQRI.js} +3 -3
- package/{chat-C26CBAZX.js → chat-SWYI4ENT.js} +5 -5
- package/{chunk-J4GLFY7G.js → chunk-ALWA4K5L.js} +2 -2
- package/{chunk-FJLMXLMK.js → chunk-C6LIGJFX.js} +4 -4
- package/{chunk-P65BO7WZ.js → chunk-GUIONCNA.js} +6 -6
- package/{chunk-NURPXHLB.js → chunk-OZBSOSAS.js} +26 -12
- package/chunk-OZBSOSAS.js.map +1 -0
- package/{companion-Q67RAO3N.js → companion-JYLQKSFO.js} +4 -4
- package/index.js +4 -4
- package/{node-4UUJN2WG.js → node-RN4URNZ5.js} +4 -4
- package/package.json +1 -1
- package/{src-7O3GCEIB.js → src-42DMJB3D.js} +7 -7
- package/chunk-NURPXHLB.js.map +0 -1
- /package/{agent-manager-FUU72VGH.js.map → agent-manager-2AZVCQRI.js.map} +0 -0
- /package/{chat-C26CBAZX.js.map → chat-SWYI4ENT.js.map} +0 -0
- /package/{chunk-J4GLFY7G.js.map → chunk-ALWA4K5L.js.map} +0 -0
- /package/{chunk-FJLMXLMK.js.map → chunk-C6LIGJFX.js.map} +0 -0
- /package/{chunk-P65BO7WZ.js.map → chunk-GUIONCNA.js.map} +0 -0
- /package/{companion-Q67RAO3N.js.map → companion-JYLQKSFO.js.map} +0 -0
- /package/{node-4UUJN2WG.js.map → node-RN4URNZ5.js.map} +0 -0
- /package/{src-7O3GCEIB.js.map → src-42DMJB3D.js.map} +0 -0
package/agent/index.js
CHANGED
|
@@ -4905,7 +4905,7 @@ import { networkInterfaces as networkInterfaces2, homedir as homedir7, platform
|
|
|
4905
4905
|
// ../../packages/shared/src/node/node-path.ts
|
|
4906
4906
|
import { dirname, delimiter } from "path";
|
|
4907
4907
|
function ensureNodeBinOnPath(environment = process.env) {
|
|
4908
|
-
|
|
4908
|
+
promoteOnPath(dirname(process.execPath), environment);
|
|
4909
4909
|
}
|
|
4910
4910
|
function appendToPath(dir, environment = process.env) {
|
|
4911
4911
|
if (!dir) return;
|
|
@@ -4914,12 +4914,11 @@ function appendToPath(dir, environment = process.env) {
|
|
|
4914
4914
|
if (entries.includes(dir)) return;
|
|
4915
4915
|
environment["PATH"] = entries.length > 0 ? `${current}${delimiter}${dir}` : dir;
|
|
4916
4916
|
}
|
|
4917
|
-
function
|
|
4917
|
+
function promoteOnPath(dir, environment = process.env) {
|
|
4918
4918
|
if (!dir) return;
|
|
4919
4919
|
const current = environment["PATH"] ?? "";
|
|
4920
|
-
const
|
|
4921
|
-
|
|
4922
|
-
environment["PATH"] = entries.length > 0 ? `${dir}${delimiter}${current}` : dir;
|
|
4920
|
+
const others = current.split(delimiter).filter(Boolean).filter((entry) => entry !== dir);
|
|
4921
|
+
environment["PATH"] = [dir, ...others].join(delimiter);
|
|
4923
4922
|
}
|
|
4924
4923
|
|
|
4925
4924
|
// ../../packages/shared/src/node/user-path.ts
|
|
@@ -4945,7 +4944,10 @@ function commonUserBins(home) {
|
|
|
4945
4944
|
async function readLoginShellPath() {
|
|
4946
4945
|
if (process.platform === "win32") return null;
|
|
4947
4946
|
const shell = process.env["SHELL"];
|
|
4948
|
-
if (!shell || !existsSync(shell))
|
|
4947
|
+
if (!shell || !existsSync(shell)) {
|
|
4948
|
+
warnProbeFailed(shell ? `shell introuvable : ${shell}` : "SHELL absent de cet environnement");
|
|
4949
|
+
return null;
|
|
4950
|
+
}
|
|
4949
4951
|
try {
|
|
4950
4952
|
const { stdout } = await execFileAsync(shell, ["-l", "-i", "-c", `echo "${MARKER}$PATH"`], {
|
|
4951
4953
|
timeout: SHELL_TIMEOUT_MS,
|
|
@@ -4955,19 +4957,31 @@ async function readLoginShellPath() {
|
|
|
4955
4957
|
env: { ...process.env, TERM: "dumb" }
|
|
4956
4958
|
});
|
|
4957
4959
|
const line = stdout.split("\n").find((l) => l.includes(MARKER));
|
|
4958
|
-
if (!line)
|
|
4960
|
+
if (!line) {
|
|
4961
|
+
warnProbeFailed(`aucune ligne marqu\xE9e dans la r\xE9ponse de ${shell}`);
|
|
4962
|
+
return null;
|
|
4963
|
+
}
|
|
4959
4964
|
const value = line.slice(line.indexOf(MARKER) + MARKER.length).trim();
|
|
4960
|
-
|
|
4961
|
-
|
|
4965
|
+
if (value.length === 0) {
|
|
4966
|
+
warnProbeFailed(`${shell} a r\xE9pondu un PATH vide`);
|
|
4967
|
+
return null;
|
|
4968
|
+
}
|
|
4969
|
+
return value;
|
|
4970
|
+
} catch (err) {
|
|
4971
|
+
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)}`;
|
|
4972
|
+
warnProbeFailed(reason);
|
|
4962
4973
|
return null;
|
|
4963
4974
|
}
|
|
4964
4975
|
}
|
|
4976
|
+
function warnProbeFailed(reason) {
|
|
4977
|
+
console.warn(`[path] PATH du shell de connexion non lu (${reason}) \u2014 les outils install\xE9s par l'utilisateur peuvent rester introuvables.`);
|
|
4978
|
+
}
|
|
4965
4979
|
async function ensureUserBinsOnPath(environment = process.env, home = homedir6()) {
|
|
4966
4980
|
const shellPath = await readLoginShellPath();
|
|
4967
4981
|
if (shellPath) {
|
|
4968
4982
|
const entries = shellPath.split(delimiter2).filter(Boolean);
|
|
4969
4983
|
for (let i = entries.length - 1; i >= 0; i--) {
|
|
4970
|
-
|
|
4984
|
+
promoteOnPath(entries[i], environment);
|
|
4971
4985
|
}
|
|
4972
4986
|
}
|
|
4973
4987
|
for (const dir of commonUserBins(home)) {
|