@plurnk/plurnk-execs-common 1.26.0 → 1.28.0
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/dist/Common.d.ts.map +1 -1
- package/dist/Common.js +2 -2
- package/dist/Common.js.map +1 -1
- package/docs/node.md +1 -1
- package/docs/sh.md +13 -5
- package/package.json +2 -2
package/dist/Common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../src/Common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../src/Common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAmC3E,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAwC,CAAC;AAenF,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,kBAAkB;IAClD,UAAmB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,SAAS,CActG;IAEc,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAOnD;CACJ"}
|
package/dist/Common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
|
-
import { SubprocessExecutor } from "@plurnk/plurnk-execs";
|
|
2
|
+
import { SubprocessExecutor, SpawnAccounts } from "@plurnk/plurnk-execs";
|
|
3
3
|
const RECIPES = Object.freeze({
|
|
4
4
|
// Subprocess floor.
|
|
5
5
|
sh: { bin: "sh", arg: (c) => ["-c", c] },
|
|
@@ -19,7 +19,7 @@ const RECIPES = Object.freeze({
|
|
|
19
19
|
export const RUNTIME_TAGS = Object.freeze(Object.keys(RECIPES));
|
|
20
20
|
// PATH presence via POSIX `command -v` — robust across interpreters that don't
|
|
21
21
|
// support `--version` (tclsh, bc, some awks). bin is from the fixed table above.
|
|
22
|
-
const onPath = (bin) => spawnSync("sh", ["-c", `command -v "$1"`, "sh", bin]).status === 0;
|
|
22
|
+
const onPath = (bin) => spawnSync("sh", ["-c", `command -v "$1"`, "sh", bin], { ...SpawnAccounts.options() }).status === 0; // {§executor-spawn-account}
|
|
23
23
|
// Detection harness: one package claiming the common-REPL tags. probe() lights
|
|
24
24
|
// up only the interpreters present on this host, so the consumer offers the
|
|
25
25
|
// model exactly what the platform has — "plurnk supports the host's REPLs out
|
package/dist/Common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../src/Common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Common.js","sourceRoot":"","sources":["../src/Common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAmBzE,MAAM,OAAO,GAAqC,MAAM,CAAC,MAAM,CAAC;IAC5D,oBAAoB;IACpB,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;IACxC,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE;IACnE,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,C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E,CAAC;QAC/E,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,GAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAClE,CAAC;IAEQ,KAAK,CAAC,KAAK;QAChB,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,SAAS;YAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAC9F,IAAI,CAAC,CAAC,eAAe;YAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QACtG,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;YAChB,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE;YACpC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;IAC/D,CAAC;CACJ"}
|
package/docs/node.md
CHANGED
|
@@ -12,7 +12,7 @@ console.log(JSON.stringify({ platform: os.platform(), cpus: os.cpus().length }))
|
|
|
12
12
|
`[{"args": ["--format","json"]}]` passes literal script arguments, also for
|
|
13
13
|
`worker://` and `skill://` targets. Relative imports resolve from the script;
|
|
14
14
|
ordinary relative filesystem paths resolve from the working directory.
|
|
15
|
-
Environment, working directory, channels,
|
|
15
|
+
Environment, working directory, channels, output on completion, exit status and lifetime
|
|
16
16
|
are the executor family's, as `sh.md` states. Stdout is text, so structured
|
|
17
17
|
output is serialized (`console.log(JSON.stringify(value))`); a thrown error
|
|
18
18
|
exits nonzero (status 500) with its stack on stderr.
|
package/docs/sh.md
CHANGED
|
@@ -40,9 +40,9 @@ under the receipt's `stream` address, such as `sh:///ab3d5678`: `#stdout` is
|
|
|
40
40
|
the default channel and `#stderr` the second; both are `text/stream`. While it
|
|
41
41
|
runs, the packet's `## Delegation` streams list reports each channel's size and
|
|
42
42
|
growth, and READ can inspect any range. On completion, the harness adds one
|
|
43
|
-
`_plurnk` READ per channel:
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
`_plurnk` READ per channel: the whole output when it fits the context budget,
|
|
44
|
+
otherwise a bodiless receipt naming its size, with the `range` extent and the
|
|
45
|
+
terminal exit status. READ a range of the observation's `path` for any part:
|
|
46
46
|
|
|
47
47
|
```READ (sh:///ab3d5678#stdout) <17,40>
|
|
48
48
|
```
|
|
@@ -55,8 +55,16 @@ says why it was refused.
|
|
|
55
55
|
|
|
56
56
|
## Lifetime
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
The heading's `lifetime` metadata bounds the command's total runtime, not idle
|
|
59
|
+
time. This command is stopped after 30 seconds if it has not finished:
|
|
60
|
+
|
|
61
|
+
```sh [{"lifetime": "30s"}]
|
|
62
|
+
npm test
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Expiry closes the stream with status 504. By contrast, `WAIT <30>` limits one
|
|
66
|
+
wait to 30 seconds without stopping the command. Without `lifetime`,
|
|
67
|
+
the command is loop-bound; see `env.md` for other lifetime values.
|
|
60
68
|
|
|
61
69
|
## Live input
|
|
62
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-execs-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"description": "Universal subprocess executor for plurnk-service's exec scheme — one package exposing the shell, Node.js, Python 3, and supported host interpreters.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -270,6 +270,6 @@
|
|
|
270
270
|
"prepublishOnly": "npm audit --audit-level=moderate && npm test"
|
|
271
271
|
},
|
|
272
272
|
"peerDependencies": {
|
|
273
|
-
"@plurnk/plurnk-execs": "^1.
|
|
273
|
+
"@plurnk/plurnk-execs": "^1.28.0"
|
|
274
274
|
}
|
|
275
275
|
}
|