@elaraai/east-codex-plugin 1.0.94 → 1.0.96
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/.codex-plugin/plugin.json +1 -1
- package/index.json +915 -273
- package/package.json +1 -1
- package/skills/e3/SKILL.md +21 -10
- package/skills/e3-ui/SKILL.md +767 -162
- package/skills/east-ui/SKILL.md +18 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/east-codex-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.96",
|
|
4
4
|
"description": "East programming language ecosystem - a statically typed, expression-based language for business logic, data processing, UI definitions, and durable execution",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
package/skills/e3/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: e3
|
|
3
|
-
description: "East Execution Engine (e3) - durable, content-addressed dataflow for East programs. Use when: (1) authoring a package with @elaraai/e3 (e3.input, e3.task, e3.streamTask with e3.output and e3.partition for bounded memory and work split over an input, e3.customTask, e3.function, e3.package, e3.export, East.importFunction), (2) records - audited state written only through mutations (e3.record, e3.mutation.reduce/edit/patch, e3.recordIndex) and migrated between versions (e3.migration.value/rows/rekey), (3) the e3 CLI (repo, package, workspace, dataset, task, dataflow run, run, call, mutate, history, reindex, compact, watch, convert, auth) and the cores and memory a run may use (-j, --memory), (4) driving e3 from code: @elaraai/e3-api-client against a server, @elaraai/e3-core on a local repository, e3-api-server, (5) caching, reactive re-runs and garbage collection, (6) delegating local task bodies to a rack: e3 rack… See the detailed scope below."
|
|
3
|
+
description: "East Execution Engine (e3) - durable, content-addressed dataflow for East programs. Use when: (1) authoring a package with @elaraai/e3 (e3.input, e3.task, e3.streamTask with e3.output and e3.partition for bounded memory and work split over an input, e3.customTask, e3.function, e3.package, e3.export, East.importFunction), (2) records - audited state written only through mutations (e3.record, e3.mutation.reduce/edit/patch, e3.recordIndex) and migrated between versions (e3.migration.value/rows/rekey), (3) the e3 CLI (repo, package, workspace, dataset, task, dataflow run, run, call, mutate, seed, history, reindex, compact, watch, convert, auth) and the cores and memory a run may use (-j, --memory), (4) driving e3 from code: @elaraai/e3-api-client against a server, @elaraai/e3-core on a local repository, e3-api-server, (5) caching, reactive re-runs and garbage collection, (6) delegating local task bodies to a rack: e3 rack… See the detailed scope below."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Detailed skill scope
|
|
7
7
|
|
|
8
|
-
East Execution Engine (e3) - durable, content-addressed dataflow for East programs. Use when: (1) authoring a package with @elaraai/e3 (e3.input, e3.task, e3.streamTask with e3.output and e3.partition for bounded memory and work split over an input, e3.customTask, e3.function, e3.package, e3.export, East.importFunction), (2) records - audited state written only through mutations (e3.record, e3.mutation.reduce/edit/patch, e3.recordIndex) and migrated between versions (e3.migration.value/rows/rekey), (3) the e3 CLI (repo, package, workspace, dataset, task, dataflow run, run, call, mutate, history, reindex, compact, watch, convert, auth) and the cores and memory a run may use (-j, --memory), (4) driving e3 from code: @elaraai/e3-api-client against a server, @elaraai/e3-core on a local repository, e3-api-server, (5) caching, reactive re-runs and garbage collection, (6) delegating local task bodies to a rack: e3 rack enroll/policy, dataflow run --rack, watch --start --rack, optional e3-api-server --rack, (7) e3 in a browser, no server: @elaraai/e3-web (serveUnits, serveE3, createWebE3) and what a browser cannot do. UI tasks are e3-ui's ui().
|
|
8
|
+
East Execution Engine (e3) - durable, content-addressed dataflow for East programs. Use when: (1) authoring a package with @elaraai/e3 (e3.input, e3.task, e3.streamTask with e3.output and e3.partition for bounded memory and work split over an input, e3.customTask, e3.function, e3.package, e3.export, East.importFunction), (2) records - audited state written only through mutations (e3.record, e3.mutation.reduce/edit/patch, e3.recordIndex) and migrated between versions (e3.migration.value/rows/rekey), (3) the e3 CLI (repo, package, workspace, dataset, task, dataflow run, run, call, mutate, seed, history, reindex, compact, watch, convert, auth) and the cores and memory a run may use (-j, --memory), (4) driving e3 from code: @elaraai/e3-api-client against a server, @elaraai/e3-core on a local repository, e3-api-server, (5) caching, reactive re-runs and garbage collection, (6) delegating local task bodies to a rack: e3 rack enroll/policy, dataflow run --rack, watch --start --rack, optional e3-api-server --rack, (7) e3 in a browser, no server: @elaraai/e3-web (serveUnits, serveE3, createWebE3) and what a browser cannot do. UI tasks are e3-ui's ui().
|
|
9
9
|
|
|
10
10
|
# East Execution Engine (e3)
|
|
11
11
|
|
|
@@ -515,7 +515,7 @@ await e3.export(e3.package('tools', '1.0.0', process, add), '/tmp/tools.zip');
|
|
|
515
515
|
|
|
516
516
|
### Records — audited state, written only through mutations
|
|
517
517
|
|
|
518
|
-
`e3.record(name, type, initialValue)` is a dataset at `.records.<name>` that
|
|
518
|
+
`e3.record(name, type, initialValue?)` is a dataset at `.records.<name>` that
|
|
519
519
|
tasks read and react to like any input, but that only its **mutations** write:
|
|
520
520
|
a raw `dataset set` is refused. A mutation is pure, synchronous East — no async
|
|
521
521
|
body and no platform call, since the compare-and-swap retry runs it again
|
|
@@ -525,6 +525,15 @@ the state, the mutation, its arguments, the actor and the time. Deploy mints a
|
|
|
525
525
|
The record's version vector carries the commit hash, so even a mutation that
|
|
526
526
|
leaves the state unchanged triggers downstream tasks.
|
|
527
527
|
|
|
528
|
+
Declared with no initial value, a record is **unassigned** until its first
|
|
529
|
+
state is committed — `e3 seed <repo> <record> <file.beast2> -w <ws>` from a
|
|
530
|
+
beast2 file, or a host's file intake — which is then its `$init`: the deploy
|
|
531
|
+
writes no commit for it, its dependents wait as they wait on an unset input —
|
|
532
|
+
a run leaves them waiting, counts them (`Waiting:`) and goes on without them —
|
|
533
|
+
and a mutation on it is refused until then. So a record whose first state is
|
|
534
|
+
data that arrives after the deploy — a customer list, a reference table —
|
|
535
|
+
never runs its dependents on an empty value first.
|
|
536
|
+
|
|
528
537
|
| Form | Body | Use it when |
|
|
529
538
|
|---|---|---|
|
|
530
539
|
| `e3.mutation.reduce(name, rec, fn)` | `(state, …args) => state`, over the whole state | the rule is over the whole state, or the record is small; any record type |
|
|
@@ -658,7 +667,7 @@ What a deploy does with each record, decided before it writes anything:
|
|
|
658
667
|
|
|
659
668
|
| The workspace holds | Against the package's chain | The deploy |
|
|
660
669
|
|---|---|---|
|
|
661
|
-
| no state | — | mints `$init
|
|
670
|
+
| no state | — | mints `$init` from the initial value, the whole chain counted applied; declared with no initial value, leaves it unassigned (`unassigned`) for `e3 seed` |
|
|
662
671
|
| state | every step applied, the type unchanged | keeps it, with a `$deploy` commit when the package changed |
|
|
663
672
|
| state | a proper prefix applied | runs the rest, a `$migrate:<name>` commit each |
|
|
664
673
|
| state | every step applied, but the type changed | refused: a type change needs a migration, or `--schema reset` |
|
|
@@ -667,7 +676,8 @@ What a deploy does with each record, decided before it writes anything:
|
|
|
667
676
|
|
|
668
677
|
`--schema <policy>` on `e3 workspace deploy` and `e3 watch`: `migrate` (the
|
|
669
678
|
default), `fail` (run no migration; refuse) or `reset` (reset the record to its
|
|
670
|
-
initial value, with a `$reset` commit
|
|
679
|
+
initial value, with a `$reset` commit (`reset`); one declared with no initial
|
|
680
|
+
value goes back to unassigned (`unassign`), for `e3 seed` again). `--plan` prints what the deploy would do
|
|
671
681
|
to each record, index and input and writes nothing — from a zip or a source it
|
|
672
682
|
imports nothing, and a server plans only a package it holds. The steps run
|
|
673
683
|
before the deploy writes: a failed step leaves the workspace as it was, and a
|
|
@@ -716,13 +726,14 @@ a task is `<ws>.<task>` and a mutation `<record>.<mutation>`.
|
|
|
716
726
|
| `e3 dataset set [repo] <ws.name> --from-file <path.beast2> [-j <n>] [--memory <size>]` | Take a beast2 file in as the value, as a deploy takes a `file` source in, saying how far it has got; `-j`, `--memory`: the budget its intake units run under (local). |
|
|
717
727
|
| `e3 dataset list [repo] <ws> [-l]` · `status [repo] <ws.name>` · `find [repo] <ws> <pattern>` | Paths (`-l`: kind, type, status, size) · one dataset · by substring or glob. |
|
|
718
728
|
| **Running** | |
|
|
719
|
-
| `e3 dataflow run [repo] <ws> [--filter <task>] [--force \| --force-task <task>…] [-j <n>] [--memory <size>] [-v]` | Run what is stale, then print the outputs' paths. `--filter`: one task, by its exact name, and the tasks it depends on. `--force`: re-run every task the run runs (under `--filter`, its task); `--force-task`, repeated for each: re-run the tasks it names, whose dependents re-run when an output changes. A task the graph lacks, or one `--filter` leaves out, refuses the run. |
|
|
729
|
+
| `e3 dataflow run [repo] <ws> [--filter <task>] [--force \| --force-task <task>…] [-j <n>] [--memory <size>] [-v]` | Run what is stale, then print the outputs' paths. `--filter`: one task, by its exact name, and the tasks it depends on. `--force`: re-run every task the run runs (under `--filter`, its task); `--force-task`, repeated for each: re-run the tasks it names, whose dependents re-run when an output changes. A task the graph lacks, or one `--filter` leaves out, refuses the run. A task whose input nothing has set — an input never set, or a record declared with no initial value and not yet seeded — is left waiting, with its dependents (`[WAIT]`, `Waiting:`), and the run completes without them; they run once it is set. |
|
|
720
730
|
| `e3 task list [repo] <ws>` | Tasks with the status of each one's latest run. |
|
|
721
731
|
| `e3 task logs [repo] <ws.task> [-n <lines>] [--all] [--follow] [--execution <task>/<inputs>/<id>]` | The last 200 lines by default, of the latest attempt over the task's current inputs, or its latest run; `--follow` stays on that execution; `--execution`: one unit's log, as a split task's log names it (local). |
|
|
722
732
|
| `e3 run <repo> <pkg[@ver].task> [inputs.beast2…] -o <out> [--force] [-v] [-j <n>] [--memory <size>]` | Run one task ad hoc. |
|
|
723
733
|
| `e3 call <repo> <pkg[@ver].fn> [args…] [-o <out.beast2>] [-j <n>] [--memory <size>] [-v]` · `e3 call <repo> -w <ws> <fn> [args…]` | Call a function; each argument is an `.east` literal or a `.beast2`/`.json`/`.east` file, and with `-w` one written `@<keypath>` (`@.inputs.sales`) is that dataset of the workspace, pinned at its hash when the call starts. |
|
|
724
734
|
| **Records** (`-w <ws>` required) | |
|
|
725
735
|
| `e3 mutate <repo> <record.mutation> [args…] -w <ws> [-j <n>] [--memory <size>] [-v]` | Apply a mutation. |
|
|
736
|
+
| `e3 seed <repo> <record> <file.beast2> -w <ws> [-j <n>] [--memory <size>]` | Commit a record's first state from a beast2 file, as its `$init`: for a record declared with no initial value, unassigned until then (local). The file is taken in as a `file` source is, never read whole; a record that holds a state is refused. |
|
|
726
737
|
| `e3 history <repo> <record> -w <ws> [--limit <n>] [--from <hash>] [--delta]` | Commits, newest first (`--delta`: what each changed, per target; local). |
|
|
727
738
|
| `e3 reindex <repo> <record> -w <ws> [--index <name>] [-j <n>] [--memory <size>]` · `e3 compact <repo> <record> -w <ws>` | Rebuild indexes (local) · collapse the history to a `$compact` root, the state kept. |
|
|
728
739
|
| **Development** | |
|
|
@@ -742,8 +753,8 @@ alone and then fans out; on Linux and macOS a guard stops the newest unit when
|
|
|
742
753
|
the runners together pass the budget, and runs it again once it fits. A deploy
|
|
743
754
|
takes its `file` sources in `-j` at a time, their pieces' intake units running
|
|
744
755
|
under the same budget. The commands that run East — `workspace deploy`,
|
|
745
|
-
`dataset set --from-file`, `dataflow run`, `run`, `call`, `mutate`, `
|
|
746
|
-
and `watch` — take the flags for a local repository; against a server the CLI
|
|
756
|
+
`dataset set --from-file`, `dataflow run`, `run`, `call`, `mutate`, `seed`,
|
|
757
|
+
`reindex` and `watch` — take the flags for a local repository; against a server the CLI
|
|
747
758
|
refuses them, since the server runs the work under its own budget
|
|
748
759
|
(`e3-api-server -j`, `--memory`).
|
|
749
760
|
|
|
@@ -828,9 +839,9 @@ takes a runner, `new LocalTaskRunner(repo)`.
|
|
|
828
839
|
| Repositories | `repoInit(path)`, `repoFind(startPath?)`, `repositoryOpen(storage, repo)` (checks the repository and applies the upgrades it owes), `repositoryUpgradeStep(storage, repo, { budgetMs, waitMs? })` → `{ owed }` — a host's job applies them so, a part per run under its time limit, each part taking a step up where the last stopped, `repoGc(storage, repo, { dryRun?, minAge?, keepRuns?, keepDays?, retention?, executionAlive? })` — holding the repository still, or, with `retention: { windowMs }`, beside running work: an object goes once unreachable for the window and not written or re-referenced since; given a runner's `executionAlive`, an attempt recorded running that cannot finish is recorded interrupted and pruned; `repoGcStep(storage, repo, step, { windowMs, pruneMs?, markMs?, concurrency?, executionAlive?, … })` runs that one step at a time, each returning the next (`GcStepType`), `pruneMs` and `markMs` bounding a prune step and a mark step for a host with a time limit |
|
|
829
840
|
| Packages | `packageImport(storage, repo, zipPath)`, `packageExport(storage, repo, name, version, zipPath)`, `packageList`, `packageRemove` |
|
|
830
841
|
| Workspaces | `workspaceCreate(storage, repo, ws)`, `workspaceCopy(storage, repo, from, to)`, `workspaceDeploy(storage, repo, ws, pkgName, pkgVersion, options?)` (`runner`: its migrations, index builds and intake units; `schema` and `inputs`: its policies; `onRecordPlan`, `onRecordIndex`, `onInputPlan`: what it decided; `sourceConcurrency`: the `file` sources taken in at once; `onSourceProgress`, `onDeployProgress`: how far it has got), `workspaceExport(storage, repo, ws, zipPath, name?, version?)`, `workspaceStatus(storage, runner, repo, ws)`, `workspaceStatusRevision(storage, repo, ws)` — a token that moves whenever the status might, which the API's `ETag` names, `workspaceLockStatus(storage, repo, ws)`, `workspaceListStates(storage, repo)` — every workspace with its state in one read of the store, `workspaceRemove(storage, repo, ws, { sweep? })` — the record and what a store removes at once go in one call, and the rest is swept in bounded batches unless `sweep: false` leaves them to `workspaceSweep(storage, repo, cursor?)`, which a host with a time limit runs from a job |
|
|
831
|
-
| Datasets | `workspaceGetDataset(storage, repo, ws, treePath)`, `workspaceSetDataset(storage, repo, ws, treePath, value, type)`, `datasetAdoptFile(storage, repo, ws, treePath, file, { runner, onProgress? })` → `{ hash, size, segments, rows, taken, runners? }`, `taken` being `known`, `carried` or `taken` (by the `runners` named) |
|
|
842
|
+
| Datasets | `workspaceGetDataset(storage, repo, ws, treePath)`, `workspaceSetDataset(storage, repo, ws, treePath, value, type)`, `datasetAdoptFile(storage, repo, ws, treePath, file, { runner, onProgress? })` → `{ hash, size, segments, rows, taken, runners? }`, `taken` being `known`, `carried` or `taken` (by the `runners` named); `deliveryAdoptStored(storage, repo, ws, { address, type }, sha256, { runner?, onProgress?, signal? })` — a delivery the store holds taken in as a stored value of the type, naming no dataset, for a record's first state |
|
|
832
843
|
| Runs | `dataflowExecute(storage, repo, ws, options?)`; `LocalOrchestrator` to start, poll and cancel a run |
|
|
833
|
-
| Records | `recordMutate(storage, runner, repo, ws, record, mutation, args, { actor })`, `recordHistory`, `recordDescribe`, `recordCompact`, `recordReindex` |
|
|
844
|
+
| Records | `recordMutate(storage, runner, repo, ws, record, mutation, args, { actor })`, `recordHistory`, `recordDescribe`, `recordCompact`, `recordReindex`; `recordSystemCommit(storage, runner, repo, ws, record, { name, target, actor, args? })` — `$rollback` to a commit, `$restore` of a state at the record's migrations, and `$init` on a record declared with no initial value: its first state, from a stored value, with the whole chain applied |
|
|
834
845
|
|
|
835
846
|
`@elaraai/e3-core/test` exports the contract suites another storage backend runs
|
|
836
847
|
over itself.
|