@plurnk/plurnk-execs-common 0.2.7 → 0.2.8
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/docs/sh.md +12 -0
- package/package.json +2 -2
package/docs/sh.md
CHANGED
|
@@ -13,3 +13,15 @@ The command runs with a **scoped** environment: the host daemon's own secrets
|
|
|
13
13
|
## Channels
|
|
14
14
|
|
|
15
15
|
Output streams into two channels on the `exec://` entry: `#stdout` (default) and `#stderr` (both `text/stream`); `READ` the entry to see them. A host-effecting command proposes for review before it runs; a read-only one runs inline and returns its output the same turn. A non-zero exit closes the entry with status 500, the message on `stderr`.
|
|
16
|
+
|
|
17
|
+
## Deadlines & polling — `<timeout, poll>`
|
|
18
|
+
|
|
19
|
+
For a long-running command, the `<L>` slot carries `<TIMEOUT_SECONDS, POLL_SECONDS>` (both seconds):
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
<<EXEC<1800>:npm run build:EXEC hard-kill at 1800s; wake on completion
|
|
23
|
+
<<EXEC<1800,300>:npm run e2e:EXEC bounded at 1800s + wake every 300s
|
|
24
|
+
<<EXEC<-1,300>:npm run test:EXEC no deadline (-1) + wake every 300s
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The **timeout** (first, required when the slot is used) bounds the run — at the deadline the command is killed. **`-1` declines a deadline** (unlimited); the run is still reaped when the loop ends, and you remain free to `KILL` it. The optional **poll** (second) wakes the loop on that cadence while the stream is open, so you can `READ` partial output and decide to wait or `KILL` — it never interrupts the command. A poll always requires a timeout (it's the second coordinate); bare `EXEC` with no slot runs to completion, bounded only by the loop.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plurnk/plurnk-execs-common",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Universal subprocess executor for plurnk-service's exec scheme — one package exposing the shell + node + python floor plus whichever host interpreters (perl, ruby, php, lua, awk, bc, …) are present.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plurnk",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{
|
|
37
37
|
"name": "sh",
|
|
38
38
|
"glyph": "🐚",
|
|
39
|
-
"example": "<<EXEC
|
|
39
|
+
"example": "<<EXEC<-1,300>:npm run test:EXEC"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"name": "bash",
|