@elaraai/e3-cli 1.0.107 → 1.0.109
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 +12 -1
- package/dist/src/cli.js +3 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/call.d.ts +31 -3
- package/dist/src/commands/call.d.ts.map +1 -1
- package/dist/src/commands/call.js +187 -46
- package/dist/src/commands/call.js.map +1 -1
- package/dist/src/commands/call.spec.d.ts +6 -0
- package/dist/src/commands/call.spec.d.ts.map +1 -0
- package/dist/src/commands/call.spec.js +106 -0
- package/dist/src/commands/call.spec.js.map +1 -0
- package/dist/src/commands/mutate.d.ts.map +1 -1
- package/dist/src/commands/mutate.js +5 -17
- package/dist/src/commands/mutate.js.map +1 -1
- package/dist/src/commands/mutation-spec.d.ts +35 -0
- package/dist/src/commands/mutation-spec.d.ts.map +1 -0
- package/dist/src/commands/mutation-spec.js +42 -0
- package/dist/src/commands/mutation-spec.js.map +1 -0
- package/dist/src/commands/mutation-spec.spec.d.ts +6 -0
- package/dist/src/commands/mutation-spec.spec.d.ts.map +1 -0
- package/dist/src/commands/mutation-spec.spec.js +28 -0
- package/dist/src/commands/mutation-spec.spec.js.map +1 -0
- package/dist/src/commands/rack-options.d.ts +47 -2
- package/dist/src/commands/rack-options.d.ts.map +1 -1
- package/dist/src/commands/rack-options.js +96 -8
- package/dist/src/commands/rack-options.js.map +1 -1
- package/dist/src/commands/rack-options.spec.d.ts +6 -0
- package/dist/src/commands/rack-options.spec.d.ts.map +1 -0
- package/dist/src/commands/rack-options.spec.js +53 -0
- package/dist/src/commands/rack-options.spec.js.map +1 -0
- package/dist/src/commands/rack.d.ts.map +1 -1
- package/dist/src/commands/rack.js +42 -11
- package/dist/src/commands/rack.js.map +1 -1
- package/dist/src/commands/start.d.ts.map +1 -1
- package/dist/src/commands/start.js +5 -3
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/watch.d.ts.map +1 -1
- package/dist/src/commands/watch.js +8 -3
- package/dist/src/commands/watch.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -227,6 +227,7 @@ e3 call <repo> <pkg.fn> [args...] # Call by package: pkg.fn or pkg@1.
|
|
|
227
227
|
e3 call <repo> -w <ws> <fn> [args...] # Call the workspace's deployed package
|
|
228
228
|
e3 call <repo> -w <ws> <fn> @.inputs.sales 5 # Pass a dataset of the workspace
|
|
229
229
|
e3 call <repo> <pkg.fn> 2 3 -o sum.beast2 # Write the raw result to a file
|
|
230
|
+
e3 call <repo> -w <ws> <fn> [args...] --draft <record>.<mutation> [args...] # Over an unsaved edit; nothing is saved
|
|
230
231
|
```
|
|
231
232
|
|
|
232
233
|
Arguments are `.east` literals or paths to `.beast2` / `.json` / `.east` files,
|
|
@@ -234,7 +235,17 @@ parsed against the function's parameter types. With `-w`, an argument written
|
|
|
234
235
|
`@<keypath>` is that dataset of the workspace: the function reads it where it
|
|
235
236
|
is stored, at the hash it holds when the call starts, rather than a copy sent
|
|
236
237
|
with the call. Without `-w` one is refused. A call triggers no dataflow and
|
|
237
|
-
|
|
238
|
+
changes no dataset or record of the workspace.
|
|
239
|
+
|
|
240
|
+
With `-w`, each `--draft <record>.<mutation> [args...]` lays an unsaved edit
|
|
241
|
+
over a record the function lists in its `drafts`: the mutation runs as
|
|
242
|
+
`e3 mutate` would run it, its arguments read the same way, and the function
|
|
243
|
+
reads the record at the state that leaves. Nothing is saved. Drafts are laid in
|
|
244
|
+
the order written. `--draft` reads every word up to the next option, so it is
|
|
245
|
+
written after the call's own arguments, or the drafts are ended with `--`; a
|
|
246
|
+
draft ends where its mutation's arguments do, and a word that starts with a
|
|
247
|
+
dash is written `--draft=<word>`. A draft the record refuses ends the call
|
|
248
|
+
before the function runs, and exits non-zero saying which draft and why.
|
|
238
249
|
|
|
239
250
|
### Watch / live development
|
|
240
251
|
|
package/dist/src/cli.js
CHANGED
|
@@ -266,7 +266,7 @@ program
|
|
|
266
266
|
.option('-v, --verbose', "Pass -v to each task's runner (timing/perf to stderr)")
|
|
267
267
|
.option('--rack', 'Delegate eligible tasks to this machine\'s enrolled rack')
|
|
268
268
|
.option('--no-rack', 'Run locally even when the repository rack policy is enabled')
|
|
269
|
-
.option('--rack-only', 'Wait for rack capacity instead of spilling locally;
|
|
269
|
+
.option('--rack-only', 'Wait for rack capacity instead of spilling locally; an unhealthy rack is given two minutes, and a failed transfer one more lease, before work runs locally')
|
|
270
270
|
.action(withDefaultRepo(startCommand)));
|
|
271
271
|
// ---------------------------------------------------------------------------
|
|
272
272
|
// auth
|
|
@@ -299,6 +299,8 @@ program
|
|
|
299
299
|
.argument('[args...]', 'Arguments: .east literals or .beast2/.json/.east file paths, and with --workspace a dataset of the workspace as @<keypath> (e.g. @.inputs.sales)')
|
|
300
300
|
.option('-w, --workspace <ws>', 'Call against the package deployed in a workspace, whose datasets an argument may name')
|
|
301
301
|
.option('-o, --output <path>', 'Write the result to a .beast2 file instead of printing')
|
|
302
|
+
.option('--draft <draft...>', 'With --workspace: lay an unsaved edit over a record the function reads, and save nothing: <record>.<mutation> then its arguments, '
|
|
303
|
+
+ "as e3 mutate takes them. Repeatable, laid in order; written after the call's own arguments")
|
|
302
304
|
.option('-v, --verbose', "Pass -v to the runner (timing/perf to stderr; local or remote)")
|
|
303
305
|
.option(...JOBS)
|
|
304
306
|
.option(...MEMORY)
|
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;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAA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M,CAAC;KAChB,WAAW,CAAC,0EAA0E,CAAC;KACvF,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,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"}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Licensed under BSL 1.1. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
5
|
import { type EastTypeValue } from '@elaraai/east';
|
|
6
|
-
import { type CallArg, type
|
|
6
|
+
import { type CallArg, type FunctionDraft, type FunctionInput, type RecordSignature } from '@elaraai/e3-types';
|
|
7
7
|
import { type BudgetFlags } from './budget.js';
|
|
8
8
|
/** A function's callable signature, from either a local FunctionObject or a
|
|
9
9
|
* remote describe. */
|
|
10
10
|
interface CallSignature {
|
|
11
|
-
inputs:
|
|
11
|
+
inputs: FunctionInput[];
|
|
12
12
|
argTypes: EastTypeValue[];
|
|
13
13
|
outputType: EastTypeValue;
|
|
14
14
|
}
|
|
@@ -21,10 +21,12 @@ interface CallSignature {
|
|
|
21
21
|
* @param signature - Its signature
|
|
22
22
|
* @param rawArgs - The arguments as written
|
|
23
23
|
* @param workspace - The workspace the call runs in, when it names one
|
|
24
|
+
* @param drafted - Whether the call was written with a `--draft`, which reads
|
|
25
|
+
* every word after it: a miscount then says where a call's own arguments go
|
|
24
26
|
* @throws {Error} When the count differs, or the function reads inputs and
|
|
25
27
|
* the call names no workspace
|
|
26
28
|
*/
|
|
27
|
-
export declare function checkCallArguments(fn: string, signature: CallSignature, rawArgs: readonly string[], workspace: string | undefined): void;
|
|
29
|
+
export declare function checkCallArguments(fn: string, signature: CallSignature, rawArgs: readonly string[], workspace: string | undefined, drafted?: boolean): void;
|
|
28
30
|
/**
|
|
29
31
|
* Parse a function spec. With --workspace a bare `fn` is allowed (the
|
|
30
32
|
* package comes from the deployment); otherwise `pkg.fn` / `pkg@ver.fn`.
|
|
@@ -57,6 +59,31 @@ export declare function encodeArg(raw: string, typeValue: EastTypeValue, index:
|
|
|
57
59
|
* does not match the parameter type
|
|
58
60
|
*/
|
|
59
61
|
export declare function callArg(raw: string, typeValue: EastTypeValue, index: number): Promise<CallArg>;
|
|
62
|
+
/**
|
|
63
|
+
* Reads the drafts a call was written with (`--draft`): unsaved edits to lay
|
|
64
|
+
* over the records its function reads, each a mutation call as `e3 mutate`
|
|
65
|
+
* takes one.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* The command line hands over the words of every `--draft` as one list, so a
|
|
69
|
+
* draft ends where its mutation's arguments do: `<record>.<mutation>`, then as
|
|
70
|
+
* many words as the mutation declares arguments, each read against its type as
|
|
71
|
+
* {@link encodeArg} reads one. The word after them names the next draft. A
|
|
72
|
+
* record is described once, however many drafts name it.
|
|
73
|
+
*
|
|
74
|
+
* @param words - Every word written after a `--draft`, in order
|
|
75
|
+
* @param workspace - The workspace the call runs in, which a refusal names
|
|
76
|
+
* @param describe - Describes a record of that workspace: its mutations, each
|
|
77
|
+
* with its form and the types of its arguments; `null` when it has no such
|
|
78
|
+
* record
|
|
79
|
+
* @returns The drafts, in the order written
|
|
80
|
+
* @throws {Error} Where a draft starts, for a word that names no mutation of a
|
|
81
|
+
* record of the workspace; for a draft with fewer words than its mutation
|
|
82
|
+
* takes; and for an argument that does not match its type. Each names the
|
|
83
|
+
* draft by its place and, where the draft before it decided how a word was
|
|
84
|
+
* read, says so
|
|
85
|
+
*/
|
|
86
|
+
export declare function readDrafts(words: readonly string[], workspace: string, describe: (record: string) => Promise<Pick<RecordSignature, 'mutations'> | null>): Promise<FunctionDraft[]>;
|
|
60
87
|
/**
|
|
61
88
|
* `e3 call` entry point.
|
|
62
89
|
*/
|
|
@@ -64,6 +91,7 @@ export declare function callCommand(repoArg: string, fnSpec: string, args: strin
|
|
|
64
91
|
workspace?: string;
|
|
65
92
|
output?: string;
|
|
66
93
|
verbose?: boolean;
|
|
94
|
+
draft?: string[];
|
|
67
95
|
}): Promise<void>;
|
|
68
96
|
export {};
|
|
69
97
|
//# sourceMappingURL=call.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../src/commands/call.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../src/commands/call.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0CH,OAAO,EAUL,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;AAcvB,OAAO,EACL,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAA2C,KAAK,eAAe,EAEpH,MAAM,mBAAmB,CAAC;AAa3B,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAqBlF;uBACuB;AACvB,UAAU,aAAa;IACrB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAA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
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* e3 call <repo> <pkg@1.0.0.fn> [args...]
|
|
11
11
|
* e3 call <repo> -w <ws> <fn> [args...] # workspace-scoped
|
|
12
12
|
* e3 call <repo> -w <ws> <fn> @.inputs.sales 5 # a dataset argument
|
|
13
|
+
* e3 call <repo> -w <ws> <fn> [args...] --draft <record>.<mutation> [args...]
|
|
14
|
+
* # over an unsaved edit
|
|
13
15
|
*
|
|
14
16
|
* Each positional argument is an .east literal (e.g. `5`, `"hello"`,
|
|
15
17
|
* `[1.0, 2.0]`) or a path to a .beast2 / .json / .east file, parsed against
|
|
@@ -21,6 +23,15 @@
|
|
|
21
23
|
* A function that declares inputs reads them from the workspace itself, so
|
|
22
24
|
* its caller passes the arguments alone, and calls it with -w.
|
|
23
25
|
*
|
|
26
|
+
* With -w, each `--draft <record>.<mutation> [args...]` lays an unsaved edit
|
|
27
|
+
* over a record the function reads (east-workspace#1619): the mutation runs as
|
|
28
|
+
* `e3 mutate` would run it, its arguments read the same way, and the function
|
|
29
|
+
* reads the record at the state that leaves. Nothing is saved. Drafts are laid
|
|
30
|
+
* in the order written. `--draft` reads every word up to the next option, so it
|
|
31
|
+
* is written after the call's own arguments, or the drafts are ended with `--`;
|
|
32
|
+
* a draft ends where its mutation's arguments do; and a word that starts with
|
|
33
|
+
* a dash is written `--draft=<word>`.
|
|
34
|
+
*
|
|
24
35
|
* Calls are graph-free: the result is printed (or written with -o), and the
|
|
25
36
|
* function's stdout and stderr go to the terminal's stderr, so the value can
|
|
26
37
|
* be piped. A call of a local repository runs in this process and keeps
|
|
@@ -30,22 +41,28 @@
|
|
|
30
41
|
* server's package runs within one request and keeps nothing.
|
|
31
42
|
*/
|
|
32
43
|
import { readFile, writeFile } from 'fs/promises';
|
|
33
|
-
import { decodeBeast2For, encodeBeast2For, fromEastTypeValue, decodeJSONFor, parseFor, printFor, none, variant, } from '@elaraai/east';
|
|
34
|
-
import { packageRead, packageGetLatestVersion, workspaceGetPackage, detachedToExecuteResult,
|
|
35
|
-
import { decodeFunctionObject, parseKeypath,
|
|
36
|
-
import { functionDescribe, functionCall, workspaceFunctionDescribe, workspaceFunctionCall, packageList as packageListRemote, } from '@elaraai/e3-api-client';
|
|
44
|
+
import { IntegerType, decodeBeast2For, encodeBeast2For, fromEastTypeValue, decodeJSONFor, parseFor, printFor, none, variant, } from '@elaraai/east';
|
|
45
|
+
import { packageObjectRead, packageRead, packageGetLatestVersion, workspaceGetPackage, detachedToExecuteResult, functionCallUnkept, recordDescribe, LocalStorage, LocalTaskRunner, } from '@elaraai/e3-core';
|
|
46
|
+
import { decodeFunctionObject, functionDraftEnded, functionDraftsOutlasted, inputLabel, parseKeypath, } from '@elaraai/e3-types';
|
|
47
|
+
import { ApiError, functionDescribe, functionCall, workspaceFunctionDescribe, workspaceFunctionCall, workspaceRecordDescribe, packageList as packageListRemote, } from '@elaraai/e3-api-client';
|
|
37
48
|
import { parseRepoLocation, formatError, exitError } from '../utils.js';
|
|
38
49
|
import { parseTaskSpec } from './run.js';
|
|
39
50
|
import { commandBudget, refuseRemoteBudget } from './budget.js';
|
|
51
|
+
import { arityRefusal, parseMutationSpec } from './mutation-spec.js';
|
|
40
52
|
/** How long a remote call's start waits for it to end before the call is
|
|
41
53
|
* named, and polled: a call any longer can be stopped with Ctrl-C at once. */
|
|
42
54
|
const CALL_START_WAIT_MS = 1_000;
|
|
43
|
-
// Local calls have no transport ceiling — be generous but still bounded.
|
|
55
|
+
// Local calls have no transport ceiling — be generous but still bounded. A
|
|
56
|
+
// call's timeout covers the laying of its drafts and its function's run.
|
|
44
57
|
const LOCAL_LIMITS = {
|
|
45
58
|
timeoutMs: 10 * 60_000,
|
|
46
59
|
maxResultBytes: 64 * 1024 * 1024,
|
|
47
60
|
maxLogBytes: 64 * 1024,
|
|
48
61
|
};
|
|
62
|
+
/** An Integer a message names, as East prints it: a draft's place among a call's. */
|
|
63
|
+
const printInteger = printFor(IntegerType);
|
|
64
|
+
/** Where a call's own arguments are written when it passes drafts. */
|
|
65
|
+
const OWN_ARGUMENTS_FIRST = "a call's own arguments are written before the first --draft, which reads every word up to the next option";
|
|
49
66
|
/**
|
|
50
67
|
* Checks a call's arguments against the function's signature: the arguments
|
|
51
68
|
* alone are counted, never the inputs a call reads, and a function with inputs
|
|
@@ -55,15 +72,18 @@ const LOCAL_LIMITS = {
|
|
|
55
72
|
* @param signature - Its signature
|
|
56
73
|
* @param rawArgs - The arguments as written
|
|
57
74
|
* @param workspace - The workspace the call runs in, when it names one
|
|
75
|
+
* @param drafted - Whether the call was written with a `--draft`, which reads
|
|
76
|
+
* every word after it: a miscount then says where a call's own arguments go
|
|
58
77
|
* @throws {Error} When the count differs, or the function reads inputs and
|
|
59
78
|
* the call names no workspace
|
|
60
79
|
*/
|
|
61
|
-
export function checkCallArguments(fn, signature, rawArgs, workspace) {
|
|
80
|
+
export function checkCallArguments(fn, signature, rawArgs, workspace, drafted = false) {
|
|
62
81
|
if (signature.inputs.length > 0 && workspace === undefined) {
|
|
63
|
-
throw new Error(`Function '${fn}' reads ${signature.inputs.map((
|
|
82
|
+
throw new Error(`Function '${fn}' reads ${signature.inputs.map((input) => inputLabel(input)).join(', ')} from the workspace it is called through: pass -w <ws>`);
|
|
64
83
|
}
|
|
65
84
|
if (rawArgs.length !== signature.argTypes.length) {
|
|
66
|
-
|
|
85
|
+
const where = drafted ? ` — ${OWN_ARGUMENTS_FIRST}` : '';
|
|
86
|
+
throw new Error(`Function '${fn}' expects ${signature.argTypes.length} argument(s), got ${rawArgs.length}${where}`);
|
|
67
87
|
}
|
|
68
88
|
}
|
|
69
89
|
/**
|
|
@@ -141,6 +161,81 @@ export async function callArg(raw, typeValue, index) {
|
|
|
141
161
|
}
|
|
142
162
|
return variant('dataset', path);
|
|
143
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Reads the drafts a call was written with (`--draft`): unsaved edits to lay
|
|
166
|
+
* over the records its function reads, each a mutation call as `e3 mutate`
|
|
167
|
+
* takes one.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* The command line hands over the words of every `--draft` as one list, so a
|
|
171
|
+
* draft ends where its mutation's arguments do: `<record>.<mutation>`, then as
|
|
172
|
+
* many words as the mutation declares arguments, each read against its type as
|
|
173
|
+
* {@link encodeArg} reads one. The word after them names the next draft. A
|
|
174
|
+
* record is described once, however many drafts name it.
|
|
175
|
+
*
|
|
176
|
+
* @param words - Every word written after a `--draft`, in order
|
|
177
|
+
* @param workspace - The workspace the call runs in, which a refusal names
|
|
178
|
+
* @param describe - Describes a record of that workspace: its mutations, each
|
|
179
|
+
* with its form and the types of its arguments; `null` when it has no such
|
|
180
|
+
* record
|
|
181
|
+
* @returns The drafts, in the order written
|
|
182
|
+
* @throws {Error} Where a draft starts, for a word that names no mutation of a
|
|
183
|
+
* record of the workspace; for a draft with fewer words than its mutation
|
|
184
|
+
* takes; and for an argument that does not match its type. Each names the
|
|
185
|
+
* draft by its place and, where the draft before it decided how a word was
|
|
186
|
+
* read, says so
|
|
187
|
+
*/
|
|
188
|
+
export async function readDrafts(words, workspace, describe) {
|
|
189
|
+
const drafts = [];
|
|
190
|
+
const described = new Map();
|
|
191
|
+
/** The draft before the one being read, and how many words it took. */
|
|
192
|
+
let before = null;
|
|
193
|
+
let at = 0;
|
|
194
|
+
while (at < words.length) {
|
|
195
|
+
const spec = words[at];
|
|
196
|
+
const place = drafts.length + 1;
|
|
197
|
+
// This word starts a draft because the one before it took the words it did
|
|
198
|
+
const readAs = before === null
|
|
199
|
+
? ''
|
|
200
|
+
: ` — draft ${place - 1} (${before.spec}) takes ${before.takes} argument(s), so '${spec}' was read as the draft after it; ${OWN_ARGUMENTS_FIRST}`;
|
|
201
|
+
let named;
|
|
202
|
+
try {
|
|
203
|
+
named = parseMutationSpec(spec);
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
throw new Error(`Draft ${place}: '${spec}' is not a mutation, written <record>.<mutation>${readAs}`);
|
|
207
|
+
}
|
|
208
|
+
const { record, mutation } = named;
|
|
209
|
+
if (!described.has(record))
|
|
210
|
+
described.set(record, await describe(record));
|
|
211
|
+
const signature = described.get(record) ?? null;
|
|
212
|
+
if (signature === null) {
|
|
213
|
+
throw new Error(`Draft ${place} (${spec}): record '${record}' not found in workspace '${workspace}'${readAs}`);
|
|
214
|
+
}
|
|
215
|
+
const mut = signature.mutations.find((m) => m.name === mutation);
|
|
216
|
+
if (mut === undefined) {
|
|
217
|
+
const available = signature.mutations.map((m) => m.name).join(', ') || '(none)';
|
|
218
|
+
throw new Error(`Draft ${place} (${spec}): mutation '${mutation}' not found on record '${record}'. Available: ${available}${readAs}`);
|
|
219
|
+
}
|
|
220
|
+
const raw = words.slice(at + 1, at + 1 + mut.argTypes.length);
|
|
221
|
+
const refusal = arityRefusal(mutation, mut, raw.length);
|
|
222
|
+
if (refusal !== null)
|
|
223
|
+
throw new Error(`Draft ${place} (${spec}): ${refusal}`);
|
|
224
|
+
const args = [];
|
|
225
|
+
for (const [i, word] of raw.entries()) {
|
|
226
|
+
try {
|
|
227
|
+
args.push(await encodeArg(word, mut.argTypes[i], i));
|
|
228
|
+
}
|
|
229
|
+
catch (err) {
|
|
230
|
+
throw new Error(`Draft ${place} (${spec}): ${err instanceof Error ? err.message : String(err)}`);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
drafts.push({ record, mutation, args });
|
|
234
|
+
before = { spec, takes: mut.argTypes.length };
|
|
235
|
+
at += 1 + mut.argTypes.length;
|
|
236
|
+
}
|
|
237
|
+
return drafts;
|
|
238
|
+
}
|
|
144
239
|
/**
|
|
145
240
|
* Writes a log tail of the function's to the terminal's stderr, the value's
|
|
146
241
|
* stdout left to the value alone.
|
|
@@ -157,7 +252,8 @@ function forwardLog(text, truncated, stream) {
|
|
|
157
252
|
}
|
|
158
253
|
/**
|
|
159
254
|
* Render a terminal ExecuteResult: print/write the value on success,
|
|
160
|
-
* report the diagnostic and exit non-zero otherwise.
|
|
255
|
+
* report the diagnostic and exit non-zero otherwise. A call one of its drafts
|
|
256
|
+
* ended, before its function ran, is reported as that draft's.
|
|
161
257
|
*/
|
|
162
258
|
async function renderResult(result, outputType, outputPath) {
|
|
163
259
|
// Forward the function's captured logs — its stdout, then its stderr — to
|
|
@@ -166,6 +262,14 @@ async function renderResult(result, outputType, outputPath) {
|
|
|
166
262
|
forwardLog(result.stdout, result.stdoutTruncated, 'stdout');
|
|
167
263
|
forwardLog(result.stderr, result.stderrTruncated, 'stderr');
|
|
168
264
|
const outcome = result.outcome;
|
|
265
|
+
// The draft whose mutation ended the call, as its result names it: never read
|
|
266
|
+
// from its stderr, whose first line says so for people, and which a function's
|
|
267
|
+
// own stderr may begin the same way (#1680's review)
|
|
268
|
+
const draft = functionDraftEnded(result);
|
|
269
|
+
const drafted = draft === null ? null : `Draft ${draft.record}.${draft.mutation} (${printInteger(draft.place)} of ${printInteger(draft.of)})`;
|
|
270
|
+
// Every draft laid, and the call's timeout ended before its function ran, as
|
|
271
|
+
// its result names it
|
|
272
|
+
const outlasted = functionDraftsOutlasted(result);
|
|
169
273
|
switch (outcome.type) {
|
|
170
274
|
case 'success': {
|
|
171
275
|
const bytes = outcome.value.value;
|
|
@@ -188,7 +292,9 @@ async function renderResult(result, outputType, outputPath) {
|
|
|
188
292
|
break;
|
|
189
293
|
}
|
|
190
294
|
case 'failed': {
|
|
191
|
-
console.error(
|
|
295
|
+
console.error(drafted === null
|
|
296
|
+
? `Function failed with exit code: ${outcome.value.exitCode}`
|
|
297
|
+
: `${drafted} failed with exit code: ${outcome.value.exitCode}; the function did not run`);
|
|
192
298
|
process.exit(1);
|
|
193
299
|
break;
|
|
194
300
|
}
|
|
@@ -199,7 +305,18 @@ async function renderResult(result, outputType, outputPath) {
|
|
|
199
305
|
break;
|
|
200
306
|
}
|
|
201
307
|
case 'timed_out': {
|
|
202
|
-
console.error(
|
|
308
|
+
console.error(drafted !== null
|
|
309
|
+
? `${drafted} had not been laid when the call timed out after ${outcome.value.ms}ms; the function did not run`
|
|
310
|
+
: outlasted
|
|
311
|
+
? `The call's drafts were laid, and its timeout of ${outcome.value.ms}ms ended before the function ran: the function did not run`
|
|
312
|
+
: `Function timed out after ${outcome.value.ms}ms`);
|
|
313
|
+
process.exit(1);
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
case 'conflict': {
|
|
317
|
+
console.error(`Draft ${outcome.value.record}.${outcome.value.mutation} (${printInteger(outcome.value.place)} of ${printInteger(outcome.value.of)}) `
|
|
318
|
+
+ `conflicted: ${outcome.value.message} — `
|
|
319
|
+
+ 'the edit no longer matches the record; re-read it and call again');
|
|
203
320
|
process.exit(1);
|
|
204
321
|
break;
|
|
205
322
|
}
|
|
@@ -208,14 +325,19 @@ async function renderResult(result, outputType, outputPath) {
|
|
|
208
325
|
/**
|
|
209
326
|
* Call a function in a local repository (no server round trip).
|
|
210
327
|
*/
|
|
211
|
-
async function callLocal(repoPath, spec, workspace, rawArgs, budget, outputPath, verbose) {
|
|
328
|
+
async function callLocal(repoPath, spec, workspace, rawArgs, draftWords, budget, outputPath, verbose) {
|
|
212
329
|
const storage = new LocalStorage();
|
|
330
|
+
// Through a workspace, the package it names by its hash, which a call
|
|
331
|
+
// through it runs: never the package a name and a version name now, which
|
|
332
|
+
// an import under the same version replaces before any deploy of it
|
|
213
333
|
let pkgName;
|
|
214
334
|
let version;
|
|
335
|
+
let pkg;
|
|
215
336
|
if (workspace) {
|
|
216
337
|
const deployed = await workspaceGetPackage(storage, repoPath, workspace);
|
|
217
338
|
pkgName = deployed.name;
|
|
218
339
|
version = deployed.version;
|
|
340
|
+
pkg = await packageObjectRead(storage, repoPath, deployed.hash);
|
|
219
341
|
}
|
|
220
342
|
else {
|
|
221
343
|
pkgName = spec.name;
|
|
@@ -227,8 +349,8 @@ async function callLocal(repoPath, spec, workspace, rawArgs, budget, outputPath,
|
|
|
227
349
|
}
|
|
228
350
|
version = resolved;
|
|
229
351
|
}
|
|
352
|
+
pkg = await packageRead(storage, repoPath, pkgName, version);
|
|
230
353
|
}
|
|
231
|
-
const pkg = await packageRead(storage, repoPath, pkgName, version);
|
|
232
354
|
const fnHash = pkg.functions.get(spec.fn);
|
|
233
355
|
if (!fnHash) {
|
|
234
356
|
const available = Array.from(pkg.functions.keys()).join(', ');
|
|
@@ -236,47 +358,47 @@ async function callLocal(repoPath, spec, workspace, rawArgs, budget, outputPath,
|
|
|
236
358
|
}
|
|
237
359
|
const fnObj = decodeFunctionObject(Buffer.from(await storage.objects.read(repoPath, fnHash)));
|
|
238
360
|
const signature = { inputs: fnObj.inputs, argTypes: fnObj.argTypes, outputType: fnObj.outputType };
|
|
239
|
-
checkCallArguments(spec.fn, signature, rawArgs, workspace);
|
|
240
|
-
|
|
241
|
-
// of its datasets, are pinned at the hash each holds now, as a server pins
|
|
242
|
-
// them, and named in the result; a call with none takes values only
|
|
243
|
-
// (`callCommand` refuses a dataset without -w)
|
|
244
|
-
let pinned;
|
|
361
|
+
checkCallArguments(spec.fn, signature, rawArgs, workspace, draftWords.length > 0);
|
|
362
|
+
const runner = new LocalTaskRunner(repoPath, budget);
|
|
245
363
|
if (workspace === undefined) {
|
|
364
|
+
// Through the package a call reads no workspace: it takes values only
|
|
365
|
+
// (`callCommand` refuses a dataset and a draft without -w)
|
|
246
366
|
const values = [];
|
|
247
367
|
for (let i = 0; i < rawArgs.length; i++) {
|
|
248
368
|
values.push(await encodeArg(rawArgs[i], signature.argTypes[i], i));
|
|
249
369
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (!('args' in pinned)) {
|
|
260
|
-
// An unassigned dataset, and nothing ran
|
|
261
|
-
await renderResult(pinned, signature.outputType, outputPath);
|
|
370
|
+
const detached = await runner.runDetached({
|
|
371
|
+
bodyIr: await storage.objects.read(repoPath, fnObj.bodyIr),
|
|
372
|
+
args: values,
|
|
373
|
+
runner: fnObj.runner,
|
|
374
|
+
limits: LOCAL_LIMITS,
|
|
375
|
+
environment: fnObj.environment.type === 'some' ? fnObj.environment.value : undefined,
|
|
376
|
+
}, { storage, verbose });
|
|
377
|
+
// The wire shape a server answers, rendered the same way
|
|
378
|
+
await renderResult(detachedToExecuteResult(detached), signature.outputType, outputPath);
|
|
262
379
|
return;
|
|
263
380
|
}
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
381
|
+
const args = [];
|
|
382
|
+
for (let i = 0; i < rawArgs.length; i++) {
|
|
383
|
+
args.push(await callArg(rawArgs[i], signature.argTypes[i], i));
|
|
384
|
+
}
|
|
385
|
+
const drafts = await readDrafts(draftWords, workspace, (record) => recordDescribe(storage, repoPath, workspace, record));
|
|
386
|
+
// Through a workspace the function is resolved again, its inputs and an
|
|
387
|
+
// argument that names one of its datasets pinned at the hash each holds
|
|
388
|
+
// now, under the workspace's shared lock, and its drafts are laid over the
|
|
389
|
+
// records it reads, as a server's call resolves, pins and lays them: the
|
|
390
|
+
// result names what was read. Nothing of the call is kept, and nothing of a
|
|
391
|
+
// draft is saved
|
|
392
|
+
const result = await functionCallUnkept(storage, runner, repoPath, workspace, spec.fn, { args, drafts }, {
|
|
270
393
|
limits: LOCAL_LIMITS,
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
await renderResult(detachedToExecuteResult(detached, pinned.inputs), signature.outputType, outputPath);
|
|
394
|
+
...(verbose !== undefined && { verbose }),
|
|
395
|
+
});
|
|
396
|
+
await renderResult(result, signature.outputType, outputPath);
|
|
275
397
|
}
|
|
276
398
|
/**
|
|
277
399
|
* Call a function on a remote repository via the API client.
|
|
278
400
|
*/
|
|
279
|
-
async function callRemote(baseUrl, repo, token, spec, workspace, rawArgs, outputPath, verbose) {
|
|
401
|
+
async function callRemote(baseUrl, repo, token, spec, workspace, rawArgs, draftWords, outputPath, verbose) {
|
|
280
402
|
const opts = { token, verbose };
|
|
281
403
|
let version = spec.version;
|
|
282
404
|
if (!workspace && version === 'latest') {
|
|
@@ -292,14 +414,27 @@ async function callRemote(baseUrl, repo, token, spec, workspace, rawArgs, output
|
|
|
292
414
|
const signature = workspace
|
|
293
415
|
? await workspaceFunctionDescribe(baseUrl, repo, workspace, spec.fn, opts)
|
|
294
416
|
: await functionDescribe(baseUrl, repo, spec.name, version, spec.fn, opts);
|
|
295
|
-
checkCallArguments(spec.fn, signature, rawArgs, workspace);
|
|
417
|
+
checkCallArguments(spec.fn, signature, rawArgs, workspace, draftWords.length > 0);
|
|
296
418
|
// The server pins the function's inputs and a dataset argument in the
|
|
297
419
|
// workspace
|
|
298
420
|
const args = [];
|
|
299
421
|
for (let i = 0; i < rawArgs.length; i++) {
|
|
300
422
|
args.push(await callArg(rawArgs[i], signature.argTypes[i], i));
|
|
301
423
|
}
|
|
302
|
-
|
|
424
|
+
// The server lays the drafts; each is read here against its mutation's
|
|
425
|
+
// types, which the server describes (`callCommand` refuses one without -w)
|
|
426
|
+
const drafts = workspace === undefined ? [] : await readDrafts(draftWords, workspace, async (record) => {
|
|
427
|
+
try {
|
|
428
|
+
return await workspaceRecordDescribe(baseUrl, repo, workspace, record, opts);
|
|
429
|
+
}
|
|
430
|
+
catch (err) {
|
|
431
|
+
// The workspace has no such record
|
|
432
|
+
if (err instanceof ApiError && err.code === 'dataset_not_found')
|
|
433
|
+
return null;
|
|
434
|
+
throw err;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
const request = { args, runner: none, limits: none, drafts };
|
|
303
438
|
if (!workspace) {
|
|
304
439
|
await renderResult(await functionCall(baseUrl, repo, spec.name, version, spec.fn, request, opts), signature.outputType, outputPath);
|
|
305
440
|
return;
|
|
@@ -345,13 +480,19 @@ export async function callCommand(repoArg, fnSpec, args, options) {
|
|
|
345
480
|
if (dataset !== -1 && options.workspace === undefined) {
|
|
346
481
|
throw new Error(`Argument ${dataset + 1} (${args[dataset]}) is a dataset, which a call reads from the workspace it runs in: pass -w <ws>`);
|
|
347
482
|
}
|
|
483
|
+
// A draft is laid over a record of the workspace, and a call through the
|
|
484
|
+
// package reads none: it is refused the same way
|
|
485
|
+
const drafts = options.draft ?? [];
|
|
486
|
+
if (drafts.length > 0 && options.workspace === undefined) {
|
|
487
|
+
throw new Error(`A draft (--draft ${drafts[0]}) is laid over a record of the workspace the call runs in: pass -w <ws>`);
|
|
488
|
+
}
|
|
348
489
|
const location = await parseRepoLocation(repoArg);
|
|
349
490
|
if (location.type === 'local') {
|
|
350
|
-
await callLocal(location.path, spec, options.workspace, args, commandBudget(options), options.output, options.verbose);
|
|
491
|
+
await callLocal(location.path, spec, options.workspace, args, drafts, commandBudget(options), options.output, options.verbose);
|
|
351
492
|
}
|
|
352
493
|
else {
|
|
353
494
|
refuseRemoteBudget(options);
|
|
354
|
-
await callRemote(location.baseUrl, location.repo, location.token, spec, options.workspace, args, options.output, options.verbose);
|
|
495
|
+
await callRemote(location.baseUrl, location.repo, location.token, spec, options.workspace, args, drafts, options.output, options.verbose);
|
|
355
496
|
}
|
|
356
497
|
}
|
|
357
498
|
catch (err) {
|