atris 3.57.1 → 3.57.2
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/package.json +1 -1
- package/scripts/member-operate.mjs +20 -2
package/package.json
CHANGED
|
@@ -77,8 +77,26 @@ const agent = String(readFlag(args, '--agent', '')).trim().toLowerCase();
|
|
|
77
77
|
const model = String(readFlag(args, '--model', '')).trim();
|
|
78
78
|
|
|
79
79
|
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
// Resolution order: explicit env, repo checkout beside this script, then the
|
|
81
|
+
// installed CLI on PATH (cloud workspaces carry this script without the repo).
|
|
82
|
+
function resolveAtrisBin() {
|
|
83
|
+
const candidates = [
|
|
84
|
+
process.env.ATRIS_BIN,
|
|
85
|
+
path.join(scriptDir, '..', 'bin', 'atris.js'),
|
|
86
|
+
].filter(Boolean);
|
|
87
|
+
for (const candidate of candidates) {
|
|
88
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
89
|
+
}
|
|
90
|
+
const pathDirs = String(process.env.PATH || '').split(path.delimiter);
|
|
91
|
+
for (const dir of pathDirs) {
|
|
92
|
+
if (!dir) continue;
|
|
93
|
+
const candidate = path.join(dir, 'atris');
|
|
94
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const atrisBin = resolveAtrisBin();
|
|
99
|
+
if (!atrisBin) {
|
|
82
100
|
finish({ ok: false, reason: 'atris_bin_not_found', member, executed: false });
|
|
83
101
|
}
|
|
84
102
|
|