@runeya/runeya 2.0.136 → 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 +29 -7
- package/agent/index.js.map +1 -1
- package/{agent-manager-TUFAFC6U.js → agent-manager-2AZVCQRI.js} +3 -3
- package/{chat-UBUGGGBZ.js → chat-SWYI4ENT.js} +5 -5
- package/{chunk-7JAJSV4L.js → chunk-ALWA4K5L.js} +2 -2
- package/{chunk-5JUONZ3G.js → chunk-C6LIGJFX.js} +4 -4
- package/{chunk-G4CR7O3L.js → chunk-GUIONCNA.js} +6 -6
- package/{chunk-4RMM2OUU.js → chunk-OZBSOSAS.js} +31 -8
- package/chunk-OZBSOSAS.js.map +1 -0
- package/{companion-U3FKH7SQ.js → companion-JYLQKSFO.js} +4 -4
- package/index.js +4 -4
- package/{node-JU7A5NDT.js → node-RN4URNZ5.js} +4 -2
- package/package.json +1 -1
- package/{src-XAKZS5VF.js → src-42DMJB3D.js} +7 -7
- package/chunk-4RMM2OUU.js.map +0 -1
- /package/{agent-manager-TUFAFC6U.js.map → agent-manager-2AZVCQRI.js.map} +0 -0
- /package/{chat-UBUGGGBZ.js.map → chat-SWYI4ENT.js.map} +0 -0
- /package/{chunk-7JAJSV4L.js.map → chunk-ALWA4K5L.js.map} +0 -0
- /package/{chunk-5JUONZ3G.js.map → chunk-C6LIGJFX.js.map} +0 -0
- /package/{chunk-G4CR7O3L.js.map → chunk-GUIONCNA.js.map} +0 -0
- /package/{companion-U3FKH7SQ.js.map → companion-JYLQKSFO.js.map} +0 -0
- /package/{node-JU7A5NDT.js.map → node-RN4URNZ5.js.map} +0 -0
- /package/{src-XAKZS5VF.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,6 +4914,12 @@ 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 promoteOnPath(dir, environment = process.env) {
|
|
4918
|
+
if (!dir) return;
|
|
4919
|
+
const current = environment["PATH"] ?? "";
|
|
4920
|
+
const others = current.split(delimiter).filter(Boolean).filter((entry) => entry !== dir);
|
|
4921
|
+
environment["PATH"] = [dir, ...others].join(delimiter);
|
|
4922
|
+
}
|
|
4917
4923
|
|
|
4918
4924
|
// ../../packages/shared/src/node/user-path.ts
|
|
4919
4925
|
import { execFile as execFile3 } from "child_process";
|
|
@@ -4938,7 +4944,10 @@ function commonUserBins(home) {
|
|
|
4938
4944
|
async function readLoginShellPath() {
|
|
4939
4945
|
if (process.platform === "win32") return null;
|
|
4940
4946
|
const shell = process.env["SHELL"];
|
|
4941
|
-
if (!shell || !existsSync(shell))
|
|
4947
|
+
if (!shell || !existsSync(shell)) {
|
|
4948
|
+
warnProbeFailed(shell ? `shell introuvable : ${shell}` : "SHELL absent de cet environnement");
|
|
4949
|
+
return null;
|
|
4950
|
+
}
|
|
4942
4951
|
try {
|
|
4943
4952
|
const { stdout } = await execFileAsync(shell, ["-l", "-i", "-c", `echo "${MARKER}$PATH"`], {
|
|
4944
4953
|
timeout: SHELL_TIMEOUT_MS,
|
|
@@ -4948,18 +4957,31 @@ async function readLoginShellPath() {
|
|
|
4948
4957
|
env: { ...process.env, TERM: "dumb" }
|
|
4949
4958
|
});
|
|
4950
4959
|
const line = stdout.split("\n").find((l) => l.includes(MARKER));
|
|
4951
|
-
if (!line)
|
|
4960
|
+
if (!line) {
|
|
4961
|
+
warnProbeFailed(`aucune ligne marqu\xE9e dans la r\xE9ponse de ${shell}`);
|
|
4962
|
+
return null;
|
|
4963
|
+
}
|
|
4952
4964
|
const value = line.slice(line.indexOf(MARKER) + MARKER.length).trim();
|
|
4953
|
-
|
|
4954
|
-
|
|
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);
|
|
4955
4973
|
return null;
|
|
4956
4974
|
}
|
|
4957
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
|
+
}
|
|
4958
4979
|
async function ensureUserBinsOnPath(environment = process.env, home = homedir6()) {
|
|
4959
4980
|
const shellPath = await readLoginShellPath();
|
|
4960
4981
|
if (shellPath) {
|
|
4961
|
-
|
|
4962
|
-
|
|
4982
|
+
const entries = shellPath.split(delimiter2).filter(Boolean);
|
|
4983
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
4984
|
+
promoteOnPath(entries[i], environment);
|
|
4963
4985
|
}
|
|
4964
4986
|
}
|
|
4965
4987
|
for (const dir of commonUserBins(home)) {
|