@elaraai/east-claude-plugin 1.0.92 → 1.0.94

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "east",
3
- "version": "1.0.92",
3
+ "version": "1.0.94",
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
  "author": {
6
6
  "name": "Elara AI",
package/index.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 2,
3
3
  "stats": {
4
- "totalEntries": 1245,
4
+ "totalEntries": 1246,
5
5
  "totalFiles": 208,
6
6
  "packages": {
7
7
  "east": 570,
@@ -10,7 +10,7 @@
10
10
  "east-py-datascience": 94,
11
11
  "east-ui": 316,
12
12
  "e3-ui": 116,
13
- "e3": 17,
13
+ "e3": 18,
14
14
  "e3-ui-cli": 8,
15
15
  "e3-create": 6
16
16
  }
@@ -44966,6 +44966,32 @@
44966
44966
  "import { createWebE3 } from '@elaraai/e3-web';"
44967
44967
  ],
44968
44968
  "source": "// main.tsx — a deployed ui() task, every request it makes answered in the page\nconst e3 = await createWebE3(new Worker(new URL('./e3.worker.ts', import.meta.url), { type: 'module' }));\n\ncreateRoot(document.getElementById('root')!).render(\n <ChakraProvider value={system}>\n <E3Provider config={{ apiUrl: e3.apiUrl, repo: 'default', workspace: 'main', fetch: e3.fetch }}>\n <ReactiveDatasetProvider>\n <UITaskPreview task=\"dashboard\" />\n </ReactiveDatasetProvider>\n </E3Provider>\n </ChakraProvider>,\n);"
44969
+ },
44970
+ {
44971
+ "id": "e3:static:rack-delegation",
44972
+ "skill": "e3",
44973
+ "package": "e3",
44974
+ "file": "static",
44975
+ "suite": "e3 rack",
44976
+ "test": "Enroll a private rack, select task bodies and run a local dataflow with shared rack capacity",
44977
+ "keywords": [
44978
+ "e3",
44979
+ "rack",
44980
+ "delegate",
44981
+ "enroll",
44982
+ "VPN",
44983
+ "policy",
44984
+ "spill",
44985
+ "rack-only",
44986
+ "dataflow",
44987
+ "watch",
44988
+ "e3-api-server"
44989
+ ],
44990
+ "imports": [],
44991
+ "source": "# Local machine: bind a VPN address the worker can reach.\ne3 rack enroll --listen 100.64.0.10:7331 --label workshop\n# Inside a prepared worker VM, run the printed matching-release configure/enroll\n# commands with its host-provisioned allocation path. Enter the origin and token\n# at their hidden prompts; never put them in shell arguments or plaintext files.\n# HTTP needs --allow-vpn-http plus authenticated VPN and exact host endpoint policy.\n# Enrollment observes a new registration, not activation or task readiness.\n# Independent agents use separate worker VMs; resources/GPU ownership belong to\n# the host lifecycle. Final host/source management and capacity activation remain\n# companion cloud #253 work. Once the service and capacity are active:\ne3 rack policy . set 'train_*' rack --size large\ne3 dataflow run . dev --rack -j 4 --memory 8G\ne3 watch src/main.ts . dev --start --rack\ne3 rack status\ne3 task logs . dev.train_model --follow\n# Placement preserves hashes/cache. Local planner and fallback retain the budget.\n# --rack-only waits for busy compatible capacity; infrastructure fallback remains.\n# Custom commands/environments and host-dependent calls stay local by default.\n# For a local API server with the matching optional @elaraai/e3-rack installed:\ne3-api-server --repos ./repos --rack",
44992
+ "languages": [
44993
+ "typescript"
44994
+ ]
44969
44995
  }
44970
44996
  ]
44971
44997
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/east-claude-plugin",
3
- "version": "1.0.92",
3
+ "version": "1.0.94",
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",
@@ -1,6 +1,6 @@
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) 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()."
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 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()."
4
4
  ---
5
5
 
6
6
  # East Execution Engine (e3)
@@ -72,6 +72,7 @@ What do you need?
72
72
  │ ├─ A function written in python or another node package → East.importFunction(pkg, name, FunctionType) in the body
73
73
  │ └─ Bundle and export → e3.package(name, version, ...items); e3.export(pkg, zipPath)
74
74
  ├─ Operate it from the shell → the e3 CLI (below): deploy, run, read and write datasets, mutate records, gc
75
+ ├─ Delegate local task bodies to a rack → e3 rack enroll + policy; dataflow run --rack, watch --start --rack
75
76
  └─ Drive it from code
76
77
  ├─ A server, over HTTP → @elaraai/e3-api-client
77
78
  ├─ A local repository → @elaraai/e3-core
@@ -79,6 +80,144 @@ What do you need?
79
80
  └─ e3 in a browser, no server → @elaraai/e3-web: serveUnits, serveE3, createWebE3 ("Running e3 in a browser")
80
81
  ```
81
82
 
83
+ ## Rack delegation from a local repository
84
+
85
+ **Setup and routing**
86
+
87
+ | Signature | Description | Example |
88
+ | --- | --- | --- |
89
+ | `e3 rack enroll --listen <host:port> [--allow <ip,...>] [--advertise-url <origin>] [--label <label>] [--no-wait]` | Starts the user-wide hub and prints the source origin, the hub's certificate SHA-256, the matching release and a single-use token for the companion's hidden prompts. Waits for a new registration, not activation. Behind an SSH reverse tunnel, listen on the loopback and advertise the relay's origin. | `e3 rack enroll --listen 127.0.0.1:7331 --allow 127.0.0.1 --advertise-url https://relay.example:7401` |
90
+ | `e3 rack policy [repo] set <glob> rack\|local [--size <size>] [--timeout <min>] [--allow-host-access]` | First whole-task-name match wins; `*` and `?` are wildcards. Size: serverless, small, medium, large, xlarge. | `e3 rack policy . set 'train_*' rack --size large` |
91
+ | `e3 rack policy [repo] enable\|disable\|mode <opt-in\|auto>` | Enable/disable saved opt-in; `mode auto` selects eligible unmatched tasks. Defaults: disabled, opt-in. | `e3 rack policy . enable` |
92
+ | `e3 rack policy [repo] defaults [--no-spill] [--claim-timeout <sec>] [--retry-task-failures-locally]` | Defaults: large, 1440-minute timeout, spill on, 30-second claim recheck, no task-failure retry. | `e3 rack policy . defaults --no-spill` |
93
+ | `e3 rack policy [repo] show\|unset <glob>\|reset` | Inspect rules, remove an exact pattern, or delete the saved policy. | `e3 rack policy . show` |
94
+ | `e3 dataflow run <repo> <ws> --rack\|--no-rack\|--rack-only` | Select rack routing for this run; rack-only disables capacity spill but keeps infrastructure fallback. ❗ Refused for remote URLs. | `e3 dataflow run . dev --rack` |
95
+ | `e3 watch <source> <repo> <ws> --start --rack` | Reuses a rack session across watch runs and refreshes capacity; a second Ctrl-C stops the watch at once. ❗ `--rack` and `--rack-only` require `--start`. | `e3 watch src/main.ts . dev --start --rack` |
96
+ | `e3 rack status\|list\|remove <id-or-label>\|approve <id-or-label>\|stop` | Inspect fleet, revoke a rack, admit the boot a quarantined rack last reported, or stop the shared hub. Status never starts an absent hub. | `e3 rack status` |
97
+ | `e3 rack config [--listen <host:port>] [--allow <ip,...>] [--idle-exit <min>] [--advertise-url <origin>] [--tls\|--no-tls] [--require-approval\|--no-require-approval]` | Configure the shared listener (off by default; HTTPS with the hub's own certificate unless `--no-tls`); every rack and data URL is built on `--advertise-url` when set; zero idle-exit disables automatic shutdown; `--require-approval` quarantines a rack after each reboot until `e3 rack approve` admits it (enrollment admits the first boot). ❗ Plain HTTP only on the loopback or a private address, with `--allow`. | `e3 rack config --listen 10.0.0.5:7331` |
98
+
99
+ The local process owns graph planning, repository and cache. After a cache
100
+ miss, eligible plain task, map and merge bodies can execute on the rack; input
101
+ closures and every output object transfer by hash. The session verifies the
102
+ whole output graph before success. Placement never changes task/cache hashes.
103
+ Local bodies and fallback share the original cores/memory budget; rack bodies
104
+ use remote capacity. Calls, mutations and intake stay local. Stock runner
105
+ configurations qualify; commands, custom environments/platforms and unscannable
106
+ IR stay local. Host file/environment/network access stays local unless a rule
107
+ deliberately grants `--allow-host-access` and its resources exist on the rack.
108
+
109
+ The listener serves HTTPS with the hub's own self-signed certificate, made on
110
+ first use and kept in `hub-tls.beast2`; a rack pins it by its SHA-256, which
111
+ enrollment prints, so TLS runs end to end through any relay or tunnel. The
112
+ usual path is an SSH reverse tunnel from the developer machine to a relay the
113
+ rack reaches, with the hub on the loopback (`--allow 127.0.0.1`) and the relay's
114
+ origin advertised. Removing the certificate file, with the hub stopped, makes a
115
+ new one, which every worker must then pin again. `--no-tls` is for a TLS
116
+ terminator in front of the hub; the hub refuses plain HTTP on a wildcard or
117
+ public address, or without `--allow`. A listener on every address needs
118
+ `--advertise-url` to enroll.
119
+
120
+ The handoff targets a prepared independent worker VM with the matching verified
121
+ `e3-rack` release. Its `configure --allocation <host-provisioned-path>` prompts
122
+ for the source origin, the certificate SHA-256 for an HTTPS origin the hub
123
+ serves, the worker label and settings; `enroll --allocation <path>` prompts for
124
+ the one-time token. Origins, pins and credentials are encrypted together. A
125
+ plain-HTTP origin needs `--allow-vpn-http` on both commands and host
126
+ authorization for that exact endpoint, and belongs only on a path encrypted end
127
+ to end, such as an SSH tunnel, never across a VPN hub that decrypts traffic.
128
+ Never put a source address or token in worker command arguments or plaintext
129
+ files. The local mint intentionally displays its token; do not log that output.
130
+
131
+ Enrollment does not start services or authorize task claims. The local CLI
132
+ observes a new registration (optionally filtered by label); compare it with the
133
+ worker's result. Before a first heartbeat, status is `enrolled-not-started`.
134
+ After managed resume, a ready heartbeat advertises free plus occupied slots;
135
+ busy workers stay eligible. Fenced, draining or stopping workers withdraw their
136
+ capacity and show `unavailable`. After 45 seconds without a heartbeat, readiness
137
+ expires; lease polling cannot prolong it. Source boot approval, when required,
138
+ remains an additional gate. This advertisement does not authorize host resource
139
+ admission or removal of service/network quarantine.
140
+ Resources and mutable whole-GPU assignments belong to the host lifecycle, not
141
+ local enrollment flags. The companion accepts up to 32 mutually trusted sources
142
+ in one worker. After draining and stopping its services and sockets, use
143
+ `configure --allocation <path> --add-source`, confirm the shared trust boundary,
144
+ and enter the additional origin privately. It prints the new source UUID for
145
+ `enroll --allocation <path> --source <UUID>`; add `--allow-vpn-http` to both for a
146
+ plain-HTTP origin. All sources must be enrolled before startup. Each has its own identity,
147
+ client, cache and completion journal; actual execution shares one worker-wide
148
+ task/GPU limit. Per-source capacity reports are not additive reservations.
149
+ A worker is the trust boundary: a shared agent process can access all its
150
+ sources' credentials, so separate clients, and a cloud deployment and developer
151
+ hubs, need separate worker VMs. The hub keeps no task data; what a worker keeps
152
+ between tasks is its own policy, and an agent that keeps nothing works unchanged. Worker-local `source list --allocation <path>`
153
+ prints UUIDs/enrollment status; `--show-origins` adds origins only on a terminal.
154
+ After drain/stop and source-side revocation, `source remove` or `source reset`
155
+ with `--allocation <path> --source <UUID> --acknowledge-revocation` asks for UUID
156
+ confirmation. Reset prints a new UUID for fresh enrollment; old pending results
157
+ and caches stay in the retired namespace. Other sources and retained data are
158
+ preserved, and host endpoint policy must be reconciled before activation. The
159
+ flag acknowledges revocation; it does not revoke remotely.
160
+
161
+ Worker-local `registry status --allocation <path>` reports only whether encrypted
162
+ registry credentials are present; it can run while active and does not test access.
163
+ After drain/stop, `registry configure --allocation <path>` privately prompts for
164
+ username/token without re-entering settings. `registry clear --allocation <path>`
165
+ asks for the installation UUID and removes only the stored access. Both require
166
+ the same release, the writer lock and no unresolved enrollment/service transition;
167
+ they preserve current identities, rotations, settings, journals and cached data.
168
+ Credentials stay in the existing encrypted bundle, with no Docker login file.
169
+ A later activation receives them; services remain stopped and the next boot fenced.
170
+ Repeating configure with the same values or clear when absent does not write.
171
+ Clearing/replacing does not revoke a token remotely or purge cached images.
172
+
173
+ The companion's
174
+ `reconcile-services` applies a host-provided next allocation and service budgets
175
+ after a completed drain, with stopped units, the previous plan hash and exact
176
+ operation/boot binding. It retains ciphertext/journals and network quarantine;
177
+ it does not move a GPU, start a worker or change its executable release. For a
178
+ compatible release change, invoke the target verified executable's `switch-release`
179
+ with the same drain/plan bindings and unchanged resource budgets at the next
180
+ allocation generation. It checks both managed-state contracts, updates only the
181
+ runtime version in the current encrypted configuration, and preserves identities
182
+ and journals through interruption or downgrade. Both four-file releases must stay
183
+ available; a downgrade is a new operation, never a saved-state restore. Services
184
+ stay stopped and quarantined. If the selected release never resumed, the exact
185
+ recorded previous executable's `recover-release` binds the completed release
186
+ receipt, current plan and new operation at another generation increase. It
187
+ requires the original drain or a valid fenced journal with no operation at the
188
+ failed generation, verifies both releases' recorded hashes, and preserves current
189
+ credentials and journals. A prior resume attempt, even across reboot, refuses
190
+ recovery. General journal repair remains unfinished. Named host management, source aliases, network
191
+ activation, incompatible-state migrations and hardware acceptance remain
192
+ companion cloud #253 work. This and durable completion retry are implemented in
193
+ companion PR #254, separately from the original main protocol pin.
194
+
195
+ Policy is `<repo>/rack/policy.beast2`; hub state is `~/.e3/rack` (or
196
+ `E3_RACK_HOME`). A hub `dataflow run` starts exits after 15 idle minutes, and a
197
+ run waits up to 10 seconds for an enrolled rack to report healthy (with none
198
+ enrolled, or a policy that selects no task for a rack, it starts at once): run
199
+ `e3 rack hub` as a service, or set `--idle-exit 0`, for a hub racks can always
200
+ reach. A data URL lasts 15 minutes, which a transfer may use whole; an object is
201
+ at most 5 GiB. The control schema currently requires protocol 2 exactly.
202
+ Agents must report bundled e3 at least the project's release. Infrastructure
203
+ failure falls back locally with a separate execution attempt, as does an
204
+ attempt the rack stopped on its own; the run's own cancellation and the task's
205
+ timeout never do. One cancelled subscriber does not stop work shared by other
206
+ sessions of the same canonical repository and e3 release.
207
+
208
+ **Programmatic attachment** (`@elaraai/e3-rack`)
209
+
210
+ | Signature | Description | Example |
211
+ | --- | --- | --- |
212
+ | `openRackRunner({ repoPath, workspace, storage, label, budget?, settings?, policy?, rackOnly? })` | Opens a runner/session; preserve the caller's existing budget and process settings, use `rackSlots` to extend orchestrator width, and close in `finally`. | `const rack = await openRackRunner({ repoPath, workspace: 'dev', storage, label: 'run', budget });` |
213
+ | `createDataflowRunnerFactory(options?)` | Pass to `createServer({ dataflowRunner })`; one session per API dataflow, using the server's shared budget. Explicit server opt-in overrides policy.enabled; rules still apply. | `const server = await createServer({ reposDir: './repos', dataflowRunner: createDataflowRunnerFactory() });` |
214
+
215
+ The API server's optional rack package is needed only for
216
+ `e3-api-server --repos ./repos --rack`. Portable handlers receive a runner
217
+ factory and do not import hub code. Custom environments, remote function
218
+ delegation, automatic reconnect after hub restart and embedded UI integration
219
+ are deferred.
220
+
82
221
  ## Authoring a package
83
222
 
84
223
  ### Inputs — `e3.input(name, type, source?)`