@elaraai/e3-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.
- package/README.md +115 -25
- package/dist/src/cli.js +51 -9
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/budget.d.ts +32 -0
- package/dist/src/commands/budget.d.ts.map +1 -0
- package/dist/src/commands/budget.js +46 -0
- package/dist/src/commands/budget.js.map +1 -0
- package/dist/src/commands/call.d.ts +2 -1
- package/dist/src/commands/call.d.ts.map +1 -1
- package/dist/src/commands/call.js +5 -3
- package/dist/src/commands/call.js.map +1 -1
- package/dist/src/commands/compact.spec.js +7 -6
- package/dist/src/commands/compact.spec.js.map +1 -1
- package/dist/src/commands/history.d.ts +1 -0
- package/dist/src/commands/history.d.ts.map +1 -1
- package/dist/src/commands/history.js +30 -9
- package/dist/src/commands/history.js.map +1 -1
- package/dist/src/commands/logs.d.ts +2 -2
- package/dist/src/commands/logs.d.ts.map +1 -1
- package/dist/src/commands/logs.js +28 -28
- package/dist/src/commands/logs.js.map +1 -1
- package/dist/src/commands/logs.spec.js +4 -1
- package/dist/src/commands/logs.spec.js.map +1 -1
- package/dist/src/commands/mutate.d.ts +2 -1
- package/dist/src/commands/mutate.d.ts.map +1 -1
- package/dist/src/commands/mutate.js +42 -19
- package/dist/src/commands/mutate.js.map +1 -1
- package/dist/src/commands/reindex.d.ts +12 -0
- package/dist/src/commands/reindex.d.ts.map +1 -0
- package/dist/src/commands/reindex.js +67 -0
- package/dist/src/commands/reindex.js.map +1 -0
- package/dist/src/commands/repo.d.ts +4 -1
- package/dist/src/commands/repo.d.ts.map +1 -1
- package/dist/src/commands/repo.js +32 -16
- package/dist/src/commands/repo.js.map +1 -1
- package/dist/src/commands/run.d.ts +2 -1
- package/dist/src/commands/run.d.ts.map +1 -1
- package/dist/src/commands/run.js +15 -21
- package/dist/src/commands/run.js.map +1 -1
- package/dist/src/commands/set.d.ts +2 -1
- package/dist/src/commands/set.d.ts.map +1 -1
- package/dist/src/commands/set.js +64 -25
- package/dist/src/commands/set.js.map +1 -1
- package/dist/src/commands/start.d.ts +2 -2
- package/dist/src/commands/start.d.ts.map +1 -1
- package/dist/src/commands/start.js +33 -27
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/watch.d.ts +4 -2
- package/dist/src/commands/watch.d.ts.map +1 -1
- package/dist/src/commands/watch.js +35 -9
- package/dist/src/commands/watch.js.map +1 -1
- package/dist/src/commands/workspace.d.ts +25 -2
- package/dist/src/commands/workspace.d.ts.map +1 -1
- package/dist/src/commands/workspace.js +230 -32
- package/dist/src/commands/workspace.js.map +1 -1
- package/dist/src/format.d.ts +12 -0
- package/dist/src/format.d.ts.map +1 -1
- package/dist/src/format.js +19 -3
- package/dist/src/format.js.map +1 -1
- package/dist/src/intake.d.ts +109 -0
- package/dist/src/intake.d.ts.map +1 -0
- package/dist/src/intake.js +290 -0
- package/dist/src/intake.js.map +1 -0
- package/dist/src/intake.spec.d.ts +6 -0
- package/dist/src/intake.spec.d.ts.map +1 -0
- package/dist/src/intake.spec.js +162 -0
- package/dist/src/intake.spec.js.map +1 -0
- package/dist/src/path-resolver.d.ts.map +1 -1
- package/dist/src/path-resolver.js +3 -2
- package/dist/src/path-resolver.js.map +1 -1
- package/dist/src/progress.d.ts +1 -1
- package/dist/src/progress.d.ts.map +1 -1
- package/dist/src/progress.js +10 -10
- package/dist/src/progress.js.map +1 -1
- package/dist/src/progress.spec.js +17 -1
- package/dist/src/progress.spec.js.map +1 -1
- package/dist/src/utils.d.ts +15 -2
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +25 -7
- package/dist/src/utils.js.map +1 -1
- package/package.json +7 -7
- package/dist/src/commands/jobs.d.ts +0 -25
- package/dist/src/commands/jobs.d.ts.map +0 -1
- package/dist/src/commands/jobs.js +0 -39
- package/dist/src/commands/jobs.js.map +0 -1
package/README.md
CHANGED
|
@@ -15,13 +15,19 @@ Every command that takes `<repo>` accepts either a local path or an `http(s)://`
|
|
|
15
15
|
### Repository
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
e3 repo create <repo>
|
|
18
|
+
e3 repo create <repo> [--exist-ok] # Create a new repository
|
|
19
19
|
e3 repo status <repo> # Show repository status
|
|
20
20
|
e3 repo remove <repo> [-r] # Remove a repository (-r removes workspaces first)
|
|
21
|
-
e3 repo gc <repo> [--dry-run]
|
|
21
|
+
e3 repo gc <repo> [--dry-run] [--keep-runs <n>] [--keep-days <d>] # Remove old history and unreferenced objects
|
|
22
22
|
e3 repo list <server-url> # List repositories on a server
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
`repo gc` keeps each workspace's last 10 runs (`--keep-runs`), every run from
|
|
26
|
+
the last 7 days (`--keep-days`) and the run its current state came from, with
|
|
27
|
+
the executions they used; every execution a workspace's current state is served
|
|
28
|
+
from, so a re-run stays cached; and every execution from the last 7 days. The
|
|
29
|
+
rest of the history goes, with the outputs only it kept.
|
|
30
|
+
|
|
25
31
|
### Packages
|
|
26
32
|
|
|
27
33
|
```bash
|
|
@@ -37,13 +43,47 @@ e3 package remove <repo> <pkg> # Remove a package
|
|
|
37
43
|
e3 workspace create <repo> <name> # Create empty workspace
|
|
38
44
|
e3 workspace deploy <repo> <ws> <pkg>[@<ver>] # Deploy a package
|
|
39
45
|
e3 workspace deploy <repo> <ws> --from-zip <path.zip> # Import + create + deploy in one shot
|
|
46
|
+
e3 workspace deploy <repo> <ws> --from-source <file.ts> # Bundle a TypeScript source into a package, then import + create + deploy
|
|
40
47
|
e3 workspace deploy <repo> <ws> … --skip-file-sources # Leave `file`-source inputs unset
|
|
48
|
+
e3 workspace deploy <repo> <ws> … --functions <path...> # Function manifests for East.importFunction packages built elsewhere
|
|
49
|
+
e3 workspace deploy <repo> <ws> … --schema <policy> # A record that cannot be kept as it is: migrate (default), fail, or reset
|
|
50
|
+
e3 workspace deploy <repo> <ws> … --allow-drop-records # Drop a record the package no longer declares, with its state and history
|
|
51
|
+
e3 workspace deploy <repo> <ws> … --plan # Say what the deploy would do to each record and index; write nothing
|
|
52
|
+
e3 workspace deploy <repo> <ws> … --quiet # Errors only: no progress
|
|
41
53
|
e3 workspace export <repo> <ws> <zip> # Export workspace as a package
|
|
42
54
|
e3 workspace list <repo> # List workspaces
|
|
43
55
|
e3 workspace status <repo> <ws> # Detailed workspace status
|
|
44
56
|
e3 workspace remove <repo> <ws> # Remove a workspace
|
|
45
57
|
```
|
|
46
58
|
|
|
59
|
+
A deploy decides what to do with each record before it writes anything. It
|
|
60
|
+
mints a new record's `$init` commit, keeps one whose migrations have all been
|
|
61
|
+
applied (with a `$deploy` commit when the package changed), and runs the
|
|
62
|
+
migrations a workspace has not applied, a `$migrate:<name>` commit each. A
|
|
63
|
+
record whose type changed with no migration, or whose applied steps the
|
|
64
|
+
package's chain does not start with, is refused, and so is a record the
|
|
65
|
+
package no longer declares, unless `--allow-drop-records`. `--schema fail`
|
|
66
|
+
runs no migration and refuses instead; `--schema reset` resets such a record to
|
|
67
|
+
the package's initial value, with a `$reset` commit. `--plan` prints the plan
|
|
68
|
+
and writes nothing. From a zip or a source it imports nothing: it reads the
|
|
69
|
+
package from the zip where it is. A server plans only a package it holds, so
|
|
70
|
+
there it is refused: `e3 package import` the zip, then plan the package by
|
|
71
|
+
name.
|
|
72
|
+
|
|
73
|
+
A deploy takes the package's `file` sources in on this machine, locally `-j` at
|
|
74
|
+
a time. A collection is taken in by intake units on the runners — east-c, or
|
|
75
|
+
east-node where e3 finds no east-c — in pieces of its segments, under the same
|
|
76
|
+
budget, and a deploy stopped part way takes up again from the pieces it
|
|
77
|
+
finished. The deploy says how far it has got on stderr. Each file prints a line
|
|
78
|
+
once it is in: its size, time and rate, and how it was taken in (`unchanged,
|
|
79
|
+
already in the store`, `taken in by east-c`, or `carried` for a value that is
|
|
80
|
+
not a collection), with why the first time a runner fell back to another. A
|
|
81
|
+
terminal also keeps a live line for the files in flight, with their pieces, the
|
|
82
|
+
rate and the time left. Against a server, the deploy line says what the server's job is doing;
|
|
83
|
+
the deliveries then upload a few at a time, each printing a line once it is in,
|
|
84
|
+
and a terminal's live line names those in flight: how far each hash has got,
|
|
85
|
+
then what the server's commit is doing with it.
|
|
86
|
+
|
|
47
87
|
### Datasets
|
|
48
88
|
|
|
49
89
|
Dataset paths use the flat form `<ws>.<name>`. The CLI resolves `<name>` against inputs and task outputs automatically.
|
|
@@ -51,38 +91,66 @@ Dataset paths use the flat form `<ws>.<name>`. The CLI resolves `<name>` against
|
|
|
51
91
|
```bash
|
|
52
92
|
e3 dataset get <repo> <ws.name> [-f east|json|beast2]
|
|
53
93
|
e3 dataset set <repo> <ws.name> <file> [--type <spec>] [--type-file <path>]
|
|
94
|
+
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 does
|
|
54
95
|
e3 dataset list <repo> <ws> [-l] # List dataset paths (with -l for table view)
|
|
55
96
|
e3 dataset status <repo> <ws.name> # Show one dataset's kind/type/status/size
|
|
56
97
|
e3 dataset find <repo> <ws> <pattern> # Substring or glob (`*`, `?`) match across names
|
|
57
98
|
```
|
|
58
99
|
|
|
100
|
+
### Records
|
|
101
|
+
|
|
102
|
+
A record is written only through its mutations — a raw `dataset set` on one is
|
|
103
|
+
refused — and `-w` names the workspace that holds it. Read its state with
|
|
104
|
+
`dataset get`, like any dataset.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
e3 mutate <repo> <record.mutation> [args...] -w <ws> [-v] # Apply a mutation; args are .east literals or .beast2/.json/.east files
|
|
108
|
+
e3 history <repo> <record> -w <ws> [--limit <n>] [--from <hash>] [--delta] # The commit chain, newest first (--delta: local repositories)
|
|
109
|
+
e3 reindex <repo> <record> -w <ws> [--index <name>] # Rebuild an index from the record (every one by default)
|
|
110
|
+
e3 compact <repo> <record> -w <ws> # Collapse the history to a $compact root; the state is kept
|
|
111
|
+
```
|
|
112
|
+
|
|
59
113
|
### Tasks
|
|
60
114
|
|
|
61
115
|
```bash
|
|
62
116
|
e3 task list <repo> <ws> # List tasks with execution status
|
|
63
|
-
e3 task logs <repo> <ws.task>
|
|
64
|
-
e3 task logs <repo> <ws.task> --
|
|
117
|
+
e3 task logs <repo> <ws.task> # The last 200 lines of a task's logs (-n <lines> for more, --all for the whole log)
|
|
118
|
+
e3 task logs <repo> <ws.task> --follow # Tail, then stream live output
|
|
119
|
+
e3 task logs <repo> --execution <taskHash>/<inputsHash>/<executionId> # One execution's own log — a unit a split task's log names (local repositories)
|
|
65
120
|
```
|
|
66
121
|
|
|
67
122
|
### Dataflow execution
|
|
68
123
|
|
|
69
124
|
```bash
|
|
70
|
-
e3 dataflow run <repo> <ws> [--filter <p>] [-j <n>] [--force] [-v]
|
|
125
|
+
e3 dataflow run <repo> <ws> [--filter <p>] [-j <n>] [--memory <size>] [--force] [-v]
|
|
71
126
|
```
|
|
72
127
|
|
|
73
|
-
`-j` / `--jobs <n>`
|
|
74
|
-
e3
|
|
75
|
-
merge units of its
|
|
76
|
-
come first served, whatever launched it).
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
128
|
+
`-j` / `--jobs <n>` and `--memory <size>` are the budget of the runner processes
|
|
129
|
+
e3 spawns. `-j` is its cores: the runners in flight at once, across the
|
|
130
|
+
dataflow's tasks and the pieces and merge units of its split tasks alike (every
|
|
131
|
+
runner takes one, first come first served, whatever launched it). `--memory` is
|
|
132
|
+
the memory those runners may reserve between them, as `8G` or `512M`. They
|
|
133
|
+
default to `E3_JOBS` and `E3_MEMORY`, else to what e3 may use: the CPUs of its
|
|
134
|
+
affinity mask, capped by a cgroup quota, and the cgroup's `memory.max` or else
|
|
135
|
+
physical memory, less a reserve for e3 and the OS.
|
|
136
|
+
|
|
137
|
+
A unit of a split task reserves the largest peak memory a unit of its stage
|
|
138
|
+
(its pieces, or one level of its merges) has reached in the run, so each stage
|
|
139
|
+
runs its first unit alone and then fans out. Anything else reserves nothing. On
|
|
140
|
+
Linux and macOS a guard stops the newest such unit when the runners together
|
|
141
|
+
pass the budget, and runs it again once there is room.
|
|
142
|
+
|
|
143
|
+
`e3 watch`, `e3 run`, `e3 call`, `e3 mutate`, `e3 reindex` and
|
|
144
|
+
`e3 workspace deploy` take the same two flags for a local repository, a deploy
|
|
145
|
+
taking its `file` sources in `-j` at a time; `e3 dataset set --from-file` takes
|
|
146
|
+
both for its intake units. Against a server the CLI refuses them, since the
|
|
147
|
+
server runs the work under its own budget (`e3-api-server -j` / `--memory`).
|
|
148
|
+
|
|
149
|
+
A local run's per-execution scratch directories are created inside the
|
|
150
|
+
repository, under `<repo>/tmp/scratch` — on the object store's filesystem, so
|
|
151
|
+
an output that is not a collection is stored by a link rather than a copy — or
|
|
152
|
+
under `E3_SCRATCH_DIR` when it is set. A scratch directory left by a dead process is removed by the
|
|
153
|
+
next run or `e3 repo gc`.
|
|
86
154
|
|
|
87
155
|
`-v` / `--verbose` forwards `-v` to each task's runner so it prints a timing/perf
|
|
88
156
|
block to the task's logs (`e3 task logs <repo> <ws.task>`) — identical across
|
|
@@ -94,25 +162,46 @@ Also on `e3 run`, `e3 call`, and `e3 mutate` — local and remote repositories
|
|
|
94
162
|
After a successful run, the CLI prints the task output paths so you can read them straight away:
|
|
95
163
|
|
|
96
164
|
```
|
|
97
|
-
Summary:
|
|
165
|
+
Summary:
|
|
166
|
+
Executed: 2
|
|
167
|
+
Cached: 0
|
|
168
|
+
Failed: 0
|
|
169
|
+
Skipped: 0
|
|
170
|
+
Duration: 412ms
|
|
171
|
+
|
|
98
172
|
Outputs:
|
|
99
|
-
dev.greet
|
|
100
|
-
dev.shout
|
|
173
|
+
dev.greet 14 B
|
|
174
|
+
dev.shout 16 B
|
|
101
175
|
```
|
|
102
176
|
|
|
103
177
|
### Ad-hoc task execution
|
|
104
178
|
|
|
105
179
|
```bash
|
|
106
180
|
e3 run <repo> <pkg.task> <inputs...> -o <out>
|
|
107
|
-
e3 run <repo> <pkg@1.0.0.task> <in.beast2> -o <out.beast2> [-v]
|
|
181
|
+
e3 run <repo> <pkg@1.0.0.task> <in.beast2> -o <out.beast2> [--force] [-v] [-j <n>] [--memory <size>]
|
|
108
182
|
```
|
|
109
183
|
|
|
184
|
+
### Function calls
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
e3 call <repo> <pkg.fn> [args...] # Call by package: pkg.fn or pkg@1.0.0.fn
|
|
188
|
+
e3 call <repo> -w <ws> <fn> [args...] # Call the workspace's deployed package
|
|
189
|
+
e3 call <repo> <pkg.fn> 2 3 -o sum.beast2 # Write the raw result to a file
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Arguments are `.east` literals or paths to `.beast2` / `.json` / `.east` files,
|
|
193
|
+
parsed against the function's parameter types. A call triggers no dataflow and
|
|
194
|
+
writes nothing to the repository.
|
|
195
|
+
|
|
110
196
|
### Watch / live development
|
|
111
197
|
|
|
112
198
|
```bash
|
|
113
|
-
e3 watch <source.ts> <repo> <ws> [--start] [-j <n>] [--abort-on-change]
|
|
199
|
+
e3 watch <source.ts> <repo> <ws> [--start] [--schema <policy>] [-j <n>] [--memory <size>] [--abort-on-change] [--functions <path...>]
|
|
114
200
|
```
|
|
115
201
|
|
|
202
|
+
`--schema` is the deploy's (`e3 workspace deploy`); a record whose type changes
|
|
203
|
+
with no migration stops the watch, naming `--schema=reset`.
|
|
204
|
+
|
|
116
205
|
### Authentication
|
|
117
206
|
|
|
118
207
|
```bash
|
|
@@ -145,7 +234,7 @@ The completion script delegates dynamic lookups (workspace names, dataset paths,
|
|
|
145
234
|
|
|
146
235
|
### Defaulting the repository
|
|
147
236
|
|
|
148
|
-
When the positional `<repo>` is optional (every command that takes one as the first argument, except `run` and `watch`), the value is resolved in this order:
|
|
237
|
+
When the positional `<repo>` is optional (every command that takes one as the first argument, except `run`, `call`, `mutate`, `history`, `compact`, `reindex` and `watch`), the value is resolved in this order:
|
|
149
238
|
|
|
150
239
|
1. Explicit positional argument.
|
|
151
240
|
2. `E3_REPO` environment variable.
|
|
@@ -191,6 +280,7 @@ release may reshape it. Application code should use
|
|
|
191
280
|
| `e3 workspace import <repo> <ws> <zip>` | `e3 workspace deploy <repo> <ws> --from-zip <zip>` |
|
|
192
281
|
| `e3 run <repo> <pkg>/<task>` | `e3 run <repo> <pkg>.<task>` |
|
|
193
282
|
| `e3 watch <repo> <ws> <source>` | `e3 watch <source> <repo> <ws>` |
|
|
283
|
+
| `--concurrency <n>`, `--partition-concurrency <n>` | `-j <n>` / `--jobs <n>` |
|
|
194
284
|
|
|
195
285
|
## Example
|
|
196
286
|
|
|
@@ -259,7 +349,7 @@ BSL 1.1. See [LICENSE.md](./LICENSE.md).
|
|
|
259
349
|
- [@elaraai/e3](https://www.npmjs.com/package/@elaraai/e3): SDK for authoring e3 packages with typed tasks and pipelines
|
|
260
350
|
- [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Object store, dataflow orchestrator, execution state
|
|
261
351
|
- [@elaraai/e3-types](https://www.npmjs.com/package/@elaraai/e3-types): Shared type definitions for e3 packages
|
|
262
|
-
- [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 package`, `e3 workspace`, `e3
|
|
352
|
+
- [@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
|
|
263
353
|
- [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 repositories
|
|
264
354
|
- [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
|
|
265
355
|
- [@elaraai/e3-api-tests](https://www.npmjs.com/package/@elaraai/e3-api-tests): Shared API compliance test suites
|
package/dist/src/cli.js
CHANGED
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
* transport is detected from the argument.
|
|
25
25
|
*/
|
|
26
26
|
import { createRequire } from 'node:module';
|
|
27
|
-
import { Command
|
|
27
|
+
import { Command } from 'commander';
|
|
28
|
+
import { configureFramePool } from '@elaraai/east';
|
|
29
|
+
import { DEFAULT_KEEP_DAYS, DEFAULT_KEEP_RUNS, DOOR_FRAME_WORKERS } from '@elaraai/e3-core';
|
|
28
30
|
const require = createRequire(import.meta.url);
|
|
29
31
|
const packageJson = require('../../package.json');
|
|
30
32
|
import { repoCommand } from './commands/repo.js';
|
|
@@ -39,6 +41,7 @@ import { callCommand } from './commands/call.js';
|
|
|
39
41
|
import { mutateCommand } from './commands/mutate.js';
|
|
40
42
|
import { historyCommand } from './commands/history.js';
|
|
41
43
|
import { compactCommand } from './commands/compact.js';
|
|
44
|
+
import { reindexCommand } from './commands/reindex.js';
|
|
42
45
|
import { logsCommand, DEFAULT_TAIL_LINES } from './commands/logs.js';
|
|
43
46
|
import { datasetStatusCommand } from './commands/dataset-status.js';
|
|
44
47
|
import { findCommand } from './commands/find.js';
|
|
@@ -49,6 +52,15 @@ import { completionCommand } from './commands/completion.js';
|
|
|
49
52
|
import { installCommand as completionInstall, uninstallCommand as completionUninstall } from './commands/completion-install.js';
|
|
50
53
|
import { completeCommand } from './commands/complete.js';
|
|
51
54
|
import { withDefaultRepo, defaultRepoArg } from './utils.js';
|
|
55
|
+
// The store door frames on two workers; a command that runs units caps them
|
|
56
|
+
// from its budget.
|
|
57
|
+
configureFramePool({ workers: DOOR_FRAME_WORKERS });
|
|
58
|
+
// The budget every command that runs units takes, for a local repository: a
|
|
59
|
+
// server runs the work under its own.
|
|
60
|
+
const JOBS = ['-j, --jobs <n>', 'Cores: runner processes to keep in flight, a task or a unit each (local repositories; default: $E3_JOBS, else the CPUs available to e3)'];
|
|
61
|
+
const MEMORY = ['--memory <size>', 'Memory those runner processes may reserve between them, as 8G or 512M (local repositories; default: $E3_MEMORY, else the memory available to e3, less a reserve for e3 and the OS)'];
|
|
62
|
+
// What a deploy does with a record it cannot keep as it is.
|
|
63
|
+
const SCHEMA = ['--schema <policy>', "What to do with a record the deploy cannot keep as it is: migrate (run the migrations the workspace has not applied; the default), fail (run none, and refuse) or reset (reset it to the package's initial value)"];
|
|
52
64
|
const program = new Command();
|
|
53
65
|
program
|
|
54
66
|
.name('e3')
|
|
@@ -75,10 +87,12 @@ program
|
|
|
75
87
|
.argument('[repo]', 'Repository path or URL (default: $E3_REPO or .)')
|
|
76
88
|
.action(withDefaultRepo(repoCommand.status)))
|
|
77
89
|
.addCommand(new Command('gc')
|
|
78
|
-
.description('Remove unreferenced objects')
|
|
90
|
+
.description('Remove the run and execution history the repository no longer keeps, and unreferenced objects')
|
|
79
91
|
.argument('[repo]', 'Repository path or URL (default: $E3_REPO or .)')
|
|
80
92
|
.option('--dry-run', 'Report what would be deleted without deleting')
|
|
81
93
|
.option('--min-age <ms>', 'Minimum file age in ms before deletion', '60000')
|
|
94
|
+
.option('--keep-runs <n>', `Runs of each workspace to keep however old, the latest first, with the executions they used (default: ${DEFAULT_KEEP_RUNS})`)
|
|
95
|
+
.option('--keep-days <d>', `Days of runs and executions to keep however many (default: ${DEFAULT_KEEP_DAYS})`)
|
|
82
96
|
.action(withDefaultRepo(repoCommand.gc)))
|
|
83
97
|
.addCommand(new Command('list')
|
|
84
98
|
.description('List repositories on a server')
|
|
@@ -132,7 +146,12 @@ program
|
|
|
132
146
|
.option('--from-source <path>', 'Bundle a TypeScript source file into a package, then import and deploy (creates the workspace if needed)')
|
|
133
147
|
.option('--functions <path...>', 'Function manifests (east-py / east-node export-functions) for East.importFunction packages built elsewhere; a package of this uv or npm workspace is exported and linked by itself')
|
|
134
148
|
.option('--skip-file-sources', "Deploy without reading the package's file sources; those inputs stay unset until `e3 dataset set --from-file`")
|
|
149
|
+
.option(...SCHEMA)
|
|
150
|
+
.option('--allow-drop-records', 'Drop a record the package no longer declares, with its state and history')
|
|
151
|
+
.option('--plan', 'Say what the deploy would do to each record and index, and write nothing')
|
|
135
152
|
.option('--quiet', 'Suppress progress and success output (errors only)')
|
|
153
|
+
.option('-j, --jobs <n>', "Cores: the package's file sources taken in at once, and runner processes for their intake units and its migrations and index builds (local repositories; default: $E3_JOBS, else the CPUs available to e3)")
|
|
154
|
+
.option(...MEMORY)
|
|
136
155
|
.action(withDefaultRepo(workspaceCommand.deploy)))
|
|
137
156
|
.addCommand(new Command('export')
|
|
138
157
|
.description('Export workspace as a package')
|
|
@@ -176,7 +195,9 @@ program
|
|
|
176
195
|
.argument('[file]', 'Path to .east, .beast2, .json, or .csv file')
|
|
177
196
|
.option('--type <typespec>', 'Inline .east type specification (required for .json/.csv)')
|
|
178
197
|
.option('--type-file <path>', 'Read .east type specification from a file (alternative to --type)')
|
|
179
|
-
.option('--from-file <path>', '
|
|
198
|
+
.option('--from-file <path>', 'Take an existing .beast2 file in as the value — read a segment at a time, never whole, and never modified')
|
|
199
|
+
.option('-j, --jobs <n>', 'Cores: runner processes --from-file takes the file in on, a piece each (local repositories; default: $E3_JOBS, else the CPUs available to e3)')
|
|
200
|
+
.option(...MEMORY)
|
|
180
201
|
.action(withDefaultRepo(setCommand)))
|
|
181
202
|
.addCommand(new Command('list')
|
|
182
203
|
.description('List dataset paths in a workspace')
|
|
@@ -213,7 +234,7 @@ program
|
|
|
213
234
|
.option('-n, --lines <n>', `Show the last <n> lines (default: ${DEFAULT_TAIL_LINES})`)
|
|
214
235
|
.option('--all', 'Show the whole log instead of the last lines')
|
|
215
236
|
.option('--follow', 'Follow log output')
|
|
216
|
-
.option('--execution <ref>', "View one execution's logs by <taskHash>/<inputsHash>/<executionId>, as a
|
|
237
|
+
.option('--execution <ref>', "View one execution's logs by <taskHash>/<inputsHash>/<executionId>, as a split task's log names its units (local repositories)")
|
|
217
238
|
.action(withDefaultRepo(logsCommand)));
|
|
218
239
|
// ---------------------------------------------------------------------------
|
|
219
240
|
// dataflow
|
|
@@ -226,9 +247,8 @@ program
|
|
|
226
247
|
.argument('[repo]', 'Repository path or URL (default: $E3_REPO or .)')
|
|
227
248
|
.argument('<ws>', 'Workspace name')
|
|
228
249
|
.option('--filter <pattern>', 'Only run tasks matching pattern')
|
|
229
|
-
.option(
|
|
230
|
-
.
|
|
231
|
-
.addOption(new Option('--partition-concurrency <n>', 'Deprecated: use --jobs').hideHelp())
|
|
250
|
+
.option(...JOBS)
|
|
251
|
+
.option(...MEMORY)
|
|
232
252
|
.option('--force', 'Force re-execution even if cached')
|
|
233
253
|
.option('-v, --verbose', "Pass -v to each task's runner (timing/perf to stderr)")
|
|
234
254
|
.action(withDefaultRepo(startCommand)));
|
|
@@ -248,6 +268,8 @@ program
|
|
|
248
268
|
.option('-o, --output <path>', 'Output file path')
|
|
249
269
|
.option('--force', 'Force re-execution even if cached')
|
|
250
270
|
.option('-v, --verbose', "Pass -v to the runner (timing/perf to stderr)")
|
|
271
|
+
.option(...JOBS)
|
|
272
|
+
.option(...MEMORY)
|
|
251
273
|
.action(runCommand);
|
|
252
274
|
// ---------------------------------------------------------------------------
|
|
253
275
|
// call — named package functions (graph-free, persists nothing)
|
|
@@ -261,6 +283,8 @@ program
|
|
|
261
283
|
.option('-w, --workspace <ws>', 'Call against the package deployed in a workspace')
|
|
262
284
|
.option('-o, --output <path>', 'Write the result to a .beast2 file instead of printing')
|
|
263
285
|
.option('-v, --verbose', "Pass -v to the runner (timing/perf to stderr; local or remote)")
|
|
286
|
+
.option(...JOBS)
|
|
287
|
+
.option(...MEMORY)
|
|
264
288
|
.action(callCommand);
|
|
265
289
|
// ---------------------------------------------------------------------------
|
|
266
290
|
// mutate — apply a mutation to a record (the only write door; audited commit)
|
|
@@ -273,6 +297,8 @@ program
|
|
|
273
297
|
.argument('[args...]', 'Arguments: .east literals or .beast2/.json/.east file paths')
|
|
274
298
|
.option('-w, --workspace <ws>', 'Workspace holding the record (required)')
|
|
275
299
|
.option('-v, --verbose', "Pass -v to the reducer's runner (timing/perf to stderr; local or remote)")
|
|
300
|
+
.option(...JOBS)
|
|
301
|
+
.option(...MEMORY)
|
|
276
302
|
.action(mutateCommand);
|
|
277
303
|
// ---------------------------------------------------------------------------
|
|
278
304
|
// history — a record's commit history (newest first)
|
|
@@ -285,6 +311,7 @@ program
|
|
|
285
311
|
.option('-w, --workspace <ws>', 'Workspace holding the record (required)')
|
|
286
312
|
.option('--limit <n>', 'Maximum number of commits to show')
|
|
287
313
|
.option('--from <hash>', 'Commit hash to start the walk at (page cursor)')
|
|
314
|
+
.option('--delta', "Show what each commit changed, per target (local repositories)")
|
|
288
315
|
.action(historyCommand);
|
|
289
316
|
// ---------------------------------------------------------------------------
|
|
290
317
|
// compact — drop a record's prior commit chain (state unchanged)
|
|
@@ -297,6 +324,20 @@ program
|
|
|
297
324
|
.option('-w, --workspace <ws>', 'Workspace holding the record (required)')
|
|
298
325
|
.action(compactCommand);
|
|
299
326
|
// ---------------------------------------------------------------------------
|
|
327
|
+
// reindex — rebuild a record's secondary indexes from its primary
|
|
328
|
+
// ---------------------------------------------------------------------------
|
|
329
|
+
program
|
|
330
|
+
.command('reindex')
|
|
331
|
+
.description("Rebuild a record's secondary indexes from its primary (the state is unchanged)")
|
|
332
|
+
.argument('<repo>', 'Repository path')
|
|
333
|
+
.argument('<record>', 'Record name')
|
|
334
|
+
.option('-w, --workspace <ws>', 'Workspace holding the record (required)')
|
|
335
|
+
.option('--index <name>', 'Rebuild one index (default: every index the record declares)')
|
|
336
|
+
.option('-v, --verbose', "Pass -v to the index programs' runner (timing/perf to stderr)")
|
|
337
|
+
.option(...JOBS)
|
|
338
|
+
.option(...MEMORY)
|
|
339
|
+
.action(reindexCommand);
|
|
340
|
+
// ---------------------------------------------------------------------------
|
|
300
341
|
// watch — source first, workspace second
|
|
301
342
|
// ---------------------------------------------------------------------------
|
|
302
343
|
program
|
|
@@ -306,8 +347,9 @@ program
|
|
|
306
347
|
.argument('<repo>', 'Repository path or URL')
|
|
307
348
|
.argument('<workspace>', 'Workspace name')
|
|
308
349
|
.option('--start', 'Execute dataflow after each deploy')
|
|
309
|
-
.option(
|
|
310
|
-
.
|
|
350
|
+
.option(...SCHEMA)
|
|
351
|
+
.option(...JOBS)
|
|
352
|
+
.option(...MEMORY)
|
|
311
353
|
.option('--abort-on-change', 'Abort running execution when file changes')
|
|
312
354
|
.option('--functions <path...>', 'Function manifests (east-py / east-node export-functions) for East.importFunction packages built elsewhere; a package of this uv or npm workspace is exported and linked by itself')
|
|
313
355
|
.action(watchCommand);
|
package/dist/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAwB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OA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,CAC3C;KACA,UAAU,CACT,IAAI,OAAO,CAAC,KAAK,CAAC;KACf,WAAW,CAAC,6BAA6B,CAAC;KAC1C,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAC1C;KACA,UAAU,CACT,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,8BAA8B,CAAC;KAC3C,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAC3C,CAAC;AAEJ,OAAO;KACJ,OAAO,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KACvC,QAAQ,CAAC,SAAS,EAAE,6CAA6C,CAAC;KAClE,QAAQ,CAAC,YAAY,EAAE,qDAAqD,CAAC;KAC7E,MAAM,CAAC,eAAe,CAAC,CAAC;AAE3B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type Budget } from '@elaraai/e3-core';
|
|
6
|
+
/** The flags that name a budget. */
|
|
7
|
+
export interface BudgetFlags {
|
|
8
|
+
/** `--jobs <n>` / `-j <n>`: the cores. */
|
|
9
|
+
jobs?: string;
|
|
10
|
+
/** `--memory <size>`: the memory. */
|
|
11
|
+
memory?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolves a command's budget — each of `--jobs` and `--memory`, else
|
|
15
|
+
* `E3_JOBS` and `E3_MEMORY`, else what this process may use — and caps e3's
|
|
16
|
+
* own frame pool, the one the store door frames on, from it.
|
|
17
|
+
*
|
|
18
|
+
* A value that is not a positive integer of cores or a memory size is an
|
|
19
|
+
* argument error: NaN would launch nothing and die later as "Dataflow stuck".
|
|
20
|
+
*
|
|
21
|
+
* @param flags - The parsed flags, when the command takes them
|
|
22
|
+
* @returns The budget
|
|
23
|
+
*/
|
|
24
|
+
export declare function commandBudget(flags?: BudgetFlags): Budget;
|
|
25
|
+
/**
|
|
26
|
+
* Refuses `-j` and `--memory` against a server, whose own budget runs the
|
|
27
|
+
* work.
|
|
28
|
+
*
|
|
29
|
+
* @param flags - The parsed flags
|
|
30
|
+
*/
|
|
31
|
+
export declare function refuseRemoteBudget(flags: BudgetFlags): void;
|
|
32
|
+
//# sourceMappingURL=budget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../../../src/commands/budget.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAqC,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGlF,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,GAAE,WAAgB,GAAG,MAAM,CAS7D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAI3D"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The budget of a command that runs units: the cores and the memory its
|
|
7
|
+
* runner processes take from — a dataflow's tasks and the units of its split
|
|
8
|
+
* tasks, a function call, a mutation, an index build.
|
|
9
|
+
*/
|
|
10
|
+
import { configureFramePool } from '@elaraai/east';
|
|
11
|
+
import { DOOR_FRAME_WORKERS, resolveBudget } from '@elaraai/e3-core';
|
|
12
|
+
import { exitError } from '../utils.js';
|
|
13
|
+
/**
|
|
14
|
+
* Resolves a command's budget — each of `--jobs` and `--memory`, else
|
|
15
|
+
* `E3_JOBS` and `E3_MEMORY`, else what this process may use — and caps e3's
|
|
16
|
+
* own frame pool, the one the store door frames on, from it.
|
|
17
|
+
*
|
|
18
|
+
* A value that is not a positive integer of cores or a memory size is an
|
|
19
|
+
* argument error: NaN would launch nothing and die later as "Dataflow stuck".
|
|
20
|
+
*
|
|
21
|
+
* @param flags - The parsed flags, when the command takes them
|
|
22
|
+
* @returns The budget
|
|
23
|
+
*/
|
|
24
|
+
export function commandBudget(flags = {}) {
|
|
25
|
+
let budget;
|
|
26
|
+
try {
|
|
27
|
+
budget = resolveBudget(flags);
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
exitError(err instanceof Error ? err.message : String(err));
|
|
31
|
+
}
|
|
32
|
+
configureFramePool({ workers: Math.min(DOOR_FRAME_WORKERS, budget.cores) });
|
|
33
|
+
return budget;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Refuses `-j` and `--memory` against a server, whose own budget runs the
|
|
37
|
+
* work.
|
|
38
|
+
*
|
|
39
|
+
* @param flags - The parsed flags
|
|
40
|
+
*/
|
|
41
|
+
export function refuseRemoteBudget(flags) {
|
|
42
|
+
if (flags.jobs !== undefined || flags.memory !== undefined) {
|
|
43
|
+
exitError("-j and --memory budget a local repository's runners: a server runs the work under its own budget");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=budget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budget.js","sourceRoot":"","sources":["../../../src/commands/budget.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAUxC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,QAAqB,EAAE;IACnD,IAAI,MAAc,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,SAAS,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9D,CAAC;IACD,kBAAkB,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAkB;IACnD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC3D,SAAS,CAAC,kGAAkG,CAAC,CAAC;IAChH,CAAC;AACH,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
5
|
import { type EastTypeValue } from '@elaraai/east';
|
|
6
|
+
import { type BudgetFlags } from './budget.js';
|
|
6
7
|
/**
|
|
7
8
|
* Parse a function spec. With --workspace a bare `fn` is allowed (the
|
|
8
9
|
* package comes from the deployment); otherwise `pkg.fn` / `pkg@ver.fn`.
|
|
@@ -20,7 +21,7 @@ export declare function encodeArg(raw: string, typeValue: EastTypeValue, index:
|
|
|
20
21
|
/**
|
|
21
22
|
* `e3 call` entry point.
|
|
22
23
|
*/
|
|
23
|
-
export declare function callCommand(repoArg: string, fnSpec: string, args: string[], options: {
|
|
24
|
+
export declare function callCommand(repoArg: string, fnSpec: string, args: string[], options: BudgetFlags & {
|
|
24
25
|
workspace?: string;
|
|
25
26
|
output?: string;
|
|
26
27
|
verbose?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../src/commands/call.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,EASL,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../src/commands/call.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,EASL,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;AAoBvB,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAgBlF;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,OAAO,GACvB;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAOjD;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CA4BzG;AA+LD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,WAAW,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAChF,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
|
@@ -24,6 +24,7 @@ import { decodeFunctionObject } from '@elaraai/e3-types';
|
|
|
24
24
|
import { functionDescribe, functionCall, workspaceFunctionDescribe, workspaceFunctionCall, packageList as packageListRemote, } from '@elaraai/e3-api-client';
|
|
25
25
|
import { parseRepoLocation, formatError, exitError } from '../utils.js';
|
|
26
26
|
import { parseTaskSpec } from './run.js';
|
|
27
|
+
import { commandBudget, refuseRemoteBudget } from './budget.js';
|
|
27
28
|
// Local calls have no transport ceiling — be generous but still bounded.
|
|
28
29
|
const LOCAL_LIMITS = {
|
|
29
30
|
timeoutMs: 10 * 60_000,
|
|
@@ -130,7 +131,7 @@ async function renderResult(result, outputType, outputPath) {
|
|
|
130
131
|
/**
|
|
131
132
|
* Call a function in a local repository (no server round trip).
|
|
132
133
|
*/
|
|
133
|
-
async function callLocal(repoPath, spec, workspace, rawArgs, outputPath, verbose) {
|
|
134
|
+
async function callLocal(repoPath, spec, workspace, rawArgs, budget, outputPath, verbose) {
|
|
134
135
|
const storage = new LocalStorage();
|
|
135
136
|
let pkgName;
|
|
136
137
|
let version;
|
|
@@ -165,7 +166,7 @@ async function callLocal(repoPath, spec, workspace, rawArgs, outputPath, verbose
|
|
|
165
166
|
for (let i = 0; i < rawArgs.length; i++) {
|
|
166
167
|
args.push(await encodeArg(rawArgs[i], signature.inputTypes[i], i));
|
|
167
168
|
}
|
|
168
|
-
const runner = new LocalTaskRunner(repoPath);
|
|
169
|
+
const runner = new LocalTaskRunner(repoPath, budget);
|
|
169
170
|
const bodyIr = await storage.objects.read(repoPath, fnObj.bodyIr);
|
|
170
171
|
const detached = await runner.runDetached({
|
|
171
172
|
bodyIr,
|
|
@@ -238,9 +239,10 @@ export async function callCommand(repoArg, fnSpec, args, options) {
|
|
|
238
239
|
const spec = parseFunctionSpec(fnSpec, options.workspace !== undefined);
|
|
239
240
|
const location = await parseRepoLocation(repoArg);
|
|
240
241
|
if (location.type === 'local') {
|
|
241
|
-
await callLocal(location.path, spec, options.workspace, args, options.output, options.verbose);
|
|
242
|
+
await callLocal(location.path, spec, options.workspace, args, commandBudget(options), options.output, options.verbose);
|
|
242
243
|
}
|
|
243
244
|
else {
|
|
245
|
+
refuseRemoteBudget(options);
|
|
244
246
|
await callRemote(location.baseUrl, location.repo, location.token, spec, options.workspace, args, options.output, options.verbose);
|
|
245
247
|
}
|
|
246
248
|
}
|