@agentswf/sandbox 0.1.0-beta.1 → 0.1.0-beta.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 +2 -2
- package/src/srt/index.ts +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentswf/sandbox",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.2",
|
|
4
4
|
"description": "agents.wf: the sandboxes a workflow opens, and their providers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/romanlv/agentswf",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"docker"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@agentswf/contract": "0.1.0-beta.
|
|
31
|
+
"@agentswf/contract": "0.1.0-beta.2"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
package/src/srt/index.ts
CHANGED
|
@@ -304,7 +304,8 @@ async function probe(options: SrtOptions, context: SandboxContext): Promise<void
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
|
-
* srt as installed on this machine:
|
|
307
|
+
* srt as installed on this machine: the `srt` on `PATH` that answers `--version` (npm releases are
|
|
308
|
+
* 0.0.x; older ones print 1.0.0 outside npm). `undefined` when absent. The
|
|
308
309
|
* toolchain is what `PATH`'s executables under `~` need: their `bin` directories, and each one's
|
|
309
310
|
* install tree (X19): a node package's root, a `bin/` beside a `lib/` (a node or a Python venv),
|
|
310
311
|
* or the executable alone. Never a whole parent of `bin`: `~/.local` holds `state/` and
|
|
@@ -326,8 +327,8 @@ export async function findSrt(
|
|
|
326
327
|
stderr: "pipe",
|
|
327
328
|
timeout: VERSION_MS,
|
|
328
329
|
});
|
|
329
|
-
|
|
330
|
-
|
|
330
|
+
if (version.exitCode !== 0 || !/^\d+\.\d+\.\d+/.test(version.stdout.toString().trim()))
|
|
331
|
+
return undefined;
|
|
331
332
|
const real = [
|
|
332
333
|
...new Set(
|
|
333
334
|
(await Promise.all(path.map((entry) => realpath(entry).catch(() => undefined)))).filter(
|