@plurnk/plurnk-execs-common 1.17.0 → 1.19.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/docs/awk.md CHANGED
@@ -24,3 +24,7 @@ Output goes to `#stdout`, diagnostics to `#stderr`; `exit 1` in the program
24
24
  closes with status 500. `[{"cwd": "<directory>"}]` selects the working directory
25
25
  for relative file arguments. AWK is the right tool for column arithmetic and
26
26
  line reshaping over text; for JSON use `jq`, for anything else `node` or `sh`.
27
+
28
+ `[{"env": {"NAME": "value"}}]` on the same fence line sets variables for this run
29
+ alone, over the entries in your `env` registry; names are the shell's, and plurnk's own
30
+ (`PLURNK_*`, provider credentials) are refused by name.
package/docs/bc.md CHANGED
@@ -17,6 +17,6 @@ scale=6
17
17
  Each expression prints its value on its own line to `#stdout`; `#stderr`
18
18
  carries parse errors such as `syntax error`. The exit status is 0 even when
19
19
  a line failed to parse, so read `#stderr` when a result is missing. A script
20
- target (````` ````bc (rates.bc) `````) runs that file with the body as stdin.
20
+ target (`bc (rates.bc)`) runs that file with the body as stdin.
21
21
  Use bc for exact decimal or big-integer arithmetic; for anything with strings,
22
22
  loops over data, or JSON, reach for `awk`, `node`, or `sh`.
package/docs/node.md CHANGED
@@ -53,8 +53,12 @@ it, never output; a non-200 receipt with no `stream` address ran nothing.
53
53
  Runs in the workspace project root by default, or the daemon's own cwd in a
54
54
  workspace without one; a `[{"cwd": "<directory>"}]` block on the opening fence line selects
55
55
  another. The target is a script, never a command or a directory:
56
- ````` ````node (tool.js) ````` runs that JavaScript file and receives the body as
56
+ `node (tool.js)` runs that JavaScript file and receives the body as
57
57
  stdin. `[{"args": ["--format","json"]}]` passes literal script arguments, also for
58
58
  `worker://` and `skill://` targets. Relative imports resolve from the script;
59
59
  ordinary relative filesystem paths resolve from cwd. The receipt names cwd
60
60
  when it differs from the project root.
61
+
62
+ `[{"env": {"NAME": "value"}}]` on the same fence line sets variables for this run
63
+ alone, over the entries in your `env` registry; names are the shell's, and plurnk's own
64
+ (`PLURNK_*`, provider credentials) are refused by name.
package/docs/python3.md CHANGED
@@ -20,3 +20,7 @@ Each argument is a literal string, without shell expansion. `[{"cwd": "<director
20
20
  selects the working directory; otherwise it remains the workspace root. The
21
21
  same options apply to local and `worker://` script targets. Native skill files
22
22
  retain their sibling imports and source-relative assets.
23
+
24
+ `[{"env": {"NAME": "value"}}]` on the same fence line sets variables for this run
25
+ alone, over the entries in your `env` registry; names are the shell's, and plurnk's own
26
+ (`PLURNK_*`, provider credentials) are refused by name.
package/docs/ruby.md CHANGED
@@ -20,3 +20,7 @@ puts JSON.generate(words.tally)
20
20
  exception or `exit 1` closes with status 500 with the backtrace on stderr.
21
21
  Gems resolve from the project's ordinary Ruby environment; `[{"cwd": "<directory>"}]`
22
22
  selects the working directory when the project's `Gemfile` lives elsewhere.
23
+
24
+ `[{"env": {"NAME": "value"}}]` on the same fence line sets variables for this run
25
+ alone, over the entries in your `env` registry; names are the shell's, and plurnk's own
26
+ (`PLURNK_*`, provider credentials) are refused by name.
package/docs/sh.md CHANGED
@@ -29,7 +29,15 @@ pwd
29
29
 
30
30
  The receipt always names the directory the command ran in.
31
31
 
32
- A script target runs that script: ````` ````sh (greet.sh) ````` runs it with an empty
32
+ `env` on the same line sets variables for this run alone, over the entries in
33
+ your `env` registry; plurnk's own names (`PLURNK_*`, provider credentials) are
34
+ refused by name:
35
+
36
+ ````sh [{"env": {"LC_ALL": "C"}}]
37
+ sort names.txt
38
+ ````
39
+
40
+ A script target runs that script: `sh (greet.sh)` runs it with an empty
33
41
  stdin; a nonempty body becomes its stdin. The interpreter reads the script
34
42
  directly, so it needs no executable bit; a script path authored inside a shell
35
43
  body still follows the kernel's ordinary executable-bit rules.
@@ -50,8 +58,8 @@ runs. Output then streams under the receipt's `stream` address, such as
50
58
  `## Delegation` streams list reports each channel's size and growth and READ can
51
59
  inspect any range. On
52
60
  completion, the harness adds one `_plurnk` READ per channel: its first page
53
- (up to 16 lines), `range` extent, and terminal exit status. READ the `stream`
54
- address for more; the `log:///…/READ` item holds only its recorded page:
61
+ (up to 16 lines), `range` extent, and terminal exit status. READ that observation's
62
+ `path` for more; the `log:///…/READ` item holds only its recorded page:
55
63
 
56
64
  ````READ (sh:///ab3d5678#stdout) <17,40>
57
65
  ````
@@ -64,34 +72,21 @@ never output: output lives on the stream and in the harness READs. A receipt
64
72
  with a non-200 status and no `stream` address ran nothing; its body is still
65
73
  your program, and its Problem says why it was refused.
66
74
 
67
- ## Deadlines & polling — `<timeout, poll>`
75
+ ## Lifetime
68
76
 
69
- For a long-running command, the `<L>` slot carries `<timeout, poll>` in minutes:
77
+ How long a command may run is one metadata field; absent, it ends with the loop.
70
78
 
71
- ````sh <30>
72
- npm run build
73
- ````
74
-
75
- ````sh <30,5>
79
+ ````sh [{"lifetime": "30m"}]
76
80
  npm run e2e
77
81
  ````
78
82
 
79
- ````sh <-1,5>
80
- npm run test
81
- ````
82
-
83
- ````sh <-1,0>
84
- tail -f app.log
83
+ ````sh [{"lifetime": "detached"}]
84
+ npm run dev
85
85
  ````
86
86
 
87
- The first coordinate is the timeout: a positive value kills at that deadline;
88
- `-1` declines the deadline and the process outlives the loop — it runs until it
89
- exits or you KILL it, so a server you must leave running takes `<-1>`; `0` keeps
90
- the process only through the current turn. Anything without `-1` is reaped when
91
- the loop ends. The optional
92
- positive second coordinate fixes the poll cadence while a loop is parked on
93
- the stream. With no explicit poll, the consumer uses exponential backoff so a
94
- parked loop can inspect partial output and decide whether to wait or KILL. A
95
- second coordinate of `0` disables timer polling for that stream; its eventual
96
- closure still wakes the loop. Polling wakes the loop but never interrupts the
97
- command.
87
+ A duration (`30s`, `30m`, `2h`) kills the command at that deadline. `detached`
88
+ outlives the loop — it runs until it exits or you KILL it, so a server you must
89
+ leave running takes it. `turn` keeps the command only through the current turn.
90
+ While you wait on a stream, the service wakes you to inspect it; you never ask
91
+ for that, and you never poll from inside a loop. To act again later with nothing
92
+ in flight, add a rule with the `schedule` family targeting yourself.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plurnk/plurnk-execs-common",
3
- "version": "1.17.0",
3
+ "version": "1.19.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.17.0"
273
+ "@plurnk/plurnk-execs": "^1.19.0"
274
274
  }
275
275
  }