@elaraai/east-c-cli 1.0.79 → 1.0.81

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.
Files changed (2) hide show
  1. package/README.md +29 -74
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -33,78 +33,33 @@ See [`docs/conventions/MAKEFILE_TARGETS.md`](../../../../docs/conventions/MAKEFI
33
33
 
34
34
  The CLI loads the standard platform from `east-c-std` by default. Custom platform functions can be linked at build time.
35
35
 
36
- ### Streaming outputs and inputs
37
-
38
- A function whose trailing parameter is an emit capability writes its output
39
- incrementally instead of returning it; a large collection input can be fed
40
- lazily, one decoded segment at a time (`--stream` is repeatable):
41
-
42
- ```bash
43
- # Emit a Dict (or array / set) through the trailing parameter, feeding
44
- # inputs 0 and 1 lazily from indexed beast2 blobs
45
- east-c run task.beast2 -i rows.beast2 -i more.beast2 --stream 0 --stream 1 \
46
- --emit dict -o out.beast2 -v
47
- ```
48
-
49
- Dict and Set emissions must ascend in East order. The sink writes one pass,
50
- segment by segment, with one open batch in memory whatever the size of the
51
- output, and a key below the previous one is an error naming both:
52
-
53
- ```text
54
- beast2 v5: Dict key emitted out of order: 1 after 2 — Set/Dict emissions must ascend in East order
55
- ```
56
-
57
- Equal keys are an error too unless the sink folds them:
58
-
59
- ```bash
60
- # Dict: fold the values of adjacent equal keys with an East function (K, V, V) -> V
61
- east-c run task.beast2 --emit dict --merge merge.beast2 -o out.beast2
62
-
63
- # Set: keep the first of adjacent equal elements
64
- east-c run task.beast2 --emit set --union -o out.beast2
65
- ```
66
-
67
- `--merge` takes an IR file in any format the program itself may use, compiled
68
- with the run's `-p` platforms; its signature must match the emit parameter's
69
- key and value types. Adjacent equal keys fold left in emission order,
70
- `acc = merge(key, acc, value)`, and the output is byte-identical to what the
71
- sink writes without the flag for the already-folded sequence.
72
-
73
- ### Merging blobs
74
-
75
- `merge` combines sorted Set or Dict blobs of one type — the files `run --emit`
76
- writes — into one, in a single pass over the inputs: every input is read
77
- segment by segment, equal keys across inputs fold in input order (`--merge`
78
- on Dict inputs, `--union` on Set inputs; without a fold an equal key is an
79
- error), and the output is byte-identical to what `run --emit` writes for the
80
- same entries emitted ascending. This is how e3 assembles a partitioned task's
81
- keyed partials; all three runners write the same bytes.
82
-
83
- ```bash
84
- # Dict partials: fold the values of equal keys, in input order
85
- east-c merge --merge merge.beast2 -i part-0.beast2 -i part-1.beast2 -i part-2.beast2 -o out.beast2 -v
86
-
87
- # Set partials: the first of equal elements stands
88
- east-c merge --union -i part-0.beast2 -i part-1.beast2 -o out.beast2
89
-
90
- # Only the keys in [from, to): range.beast2 holds a Struct{from: Option<K>,
91
- # to: Option<K>} over the inputs' key type, an absent bound open
92
- east-c merge --merge merge.beast2 --range range.beast2 -i part-0.beast2 -i part-1.beast2 -o out.beast2
93
- ```
94
-
95
- With `--range` every input is sought to the segment owning `from` through its
96
- fences and read up to the first key at or past `to`, so a merge over one key
97
- range of large partials reads that range's share of each, plus at most one
98
- segment — how e3 merges a large output in parallel, one range per unit.
99
-
100
- An input of another type than the first, an Array input, an input whose keys
101
- do not ascend, a fold whose signature does not match the inputs, and bounds of
102
- another type than the inputs' key are refused, naming the input. With `-v` the
103
- merge prints its account:
104
-
105
- ```text
106
- merge: 3 input(s), 31 entries, 13 fold(s)
107
- ```
36
+ ### Running a unit (`exec`)
37
+
38
+ `east-c exec <unit.beast2>` is the command e3 runs: the machine-facing twin
39
+ of `run`. The unit file names the work — a program to run over its inputs, or
40
+ the parts of an output to merge — with the platforms, the threads the runner
41
+ may use, the output's kind (a value the program returns, or an array, set,
42
+ dict or fold it emits into), and where to write the output and a typed
43
+ result: the outcome (`ok`, or `failed` with the message and its source
44
+ locations), the peak memory, and the time spent loading, compiling, executing
45
+ and writing. Paths in a unit may be relative to its file, so a unit and the
46
+ files it names replay wherever they are moved together. It exits 0 when the
47
+ outcome is `ok` and 1 when the result records a failure; `-v` prints where the
48
+ time went and the peak memory.
49
+
50
+ ### Large inputs
51
+
52
+ An indexed beast2 collection input of `EAST_LAZY_INPUT_BYTES` bytes or more
53
+ (64 MiB unless set; `0` turns it off) opens lazily: the file is mapped, and a
54
+ read decodes only the segments it reaches. With `-v` the runner says which
55
+ inputs opened lazily and how many of their segments it decoded.
56
+
57
+ A collection input may also be a manifest directory, the form e3 stages a
58
+ stored collection in: the input file holds a manifest, and each segment it
59
+ names is a standalone blob in `<file>.segments/<sha256>.beast2`. It opens
60
+ over those files — lazily, a read opening only the segments it reaches, or
61
+ whole — and counts as the size of its segments when the runner decides
62
+ whether to open it lazily.
108
63
 
109
64
  ### Exiting with the parent
110
65
 
@@ -116,7 +71,7 @@ the runner down with it when it dies, even while the body is computing.
116
71
  Without the flag, stdin is left alone.
117
72
 
118
73
  ```bash
119
- east-c run task.beast2 --exit-with-parent --emit dict -o out.beast2
74
+ east-c run task.beast2 --exit-with-parent -o out.beast2
120
75
  ```
121
76
 
122
77
  On Windows the watcher reads a synchronous pipe or an overlapped one. Hand it
@@ -209,7 +164,7 @@ Business Source License 1.1 — see [LICENSE.md](LICENSE.md). Same terms as `eas
209
164
  - [@elaraai/e3](https://www.npmjs.com/package/@elaraai/e3): SDK for authoring e3 packages with typed tasks and pipelines
210
165
  - [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Object store, dataflow orchestrator, execution state
211
166
  - [@elaraai/e3-types](https://www.npmjs.com/package/@elaraai/e3-types): Shared type definitions for e3 packages
212
- - [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 package`, `e3 workspace`, `e3 start`, `e3 watch`, `e3 logs` commands
167
+ - [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 package`, `e3 workspace`, `e3 dataflow run`, `e3 watch`, `e3 task logs` commands
213
168
  - [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 repositories
214
169
  - [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
215
170
  - [@elaraai/e3-api-tests](https://www.npmjs.com/package/@elaraai/e3-api-tests): Shared API compliance test suites
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/east-c-cli",
3
- "version": "1.0.79",
3
+ "version": "1.0.81",
4
4
  "description": "Provides the `east-c` bin. A tiny launcher resolves the native binary for your platform from the matching per-platform package (@elaraai/east-c-cli-<target>), pulled in via optional dependencies.",
5
5
  "bin": {
6
6
  "east-c": "bin/east-c.mjs"
@@ -32,14 +32,14 @@
32
32
  "node": ">=18.0.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@elaraai/east": "1.0.79"
35
+ "@elaraai/east": "1.0.81"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@elaraai/east-c-cli-linux-x64": "1.0.79",
39
- "@elaraai/east-c-cli-linux-arm64": "1.0.79",
40
- "@elaraai/east-c-cli-darwin-arm64": "1.0.79",
41
- "@elaraai/east-c-cli-darwin-x64": "1.0.79",
42
- "@elaraai/east-c-cli-win32-x64": "1.0.79"
38
+ "@elaraai/east-c-cli-linux-x64": "1.0.81",
39
+ "@elaraai/east-c-cli-linux-arm64": "1.0.81",
40
+ "@elaraai/east-c-cli-darwin-arm64": "1.0.81",
41
+ "@elaraai/east-c-cli-darwin-x64": "1.0.81",
42
+ "@elaraai/east-c-cli-win32-x64": "1.0.81"
43
43
  },
44
44
  "scripts": {}
45
45
  }