@getmagical/cli 0.2.5 → 0.2.6
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 +87 -0
- package/dist/index.js +1724 -351
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,93 @@ mgcl automation-runs list --automation-id ...
|
|
|
21
21
|
mgcl automations run-draft --draft-automation-id ... --agent-id ... --idempotency-key ... --config-json '{"startInTakeOverMode":true,"captureActions":true,"approvalMode":"HUMAN_APPROVAL","consistencyCheckCount":3}'
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
## Registered Evals
|
|
25
|
+
|
|
26
|
+
Registered evals and their persisted runs are global resources, so these
|
|
27
|
+
commands authenticate normally but do not accept `--org`:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
mgcl evals list --json
|
|
31
|
+
mgcl evals get --slug <eval-slug> --json
|
|
32
|
+
|
|
33
|
+
# A test run takes one concrete input and is never retried automatically.
|
|
34
|
+
mgcl evals test-run \
|
|
35
|
+
--slug <eval-slug> \
|
|
36
|
+
--input-json '{"model":"gpt-5"}' \
|
|
37
|
+
--json
|
|
38
|
+
|
|
39
|
+
# A persisted run takes arrays of choices and plans their Cartesian product.
|
|
40
|
+
mgcl evals plan-run \
|
|
41
|
+
--slug <eval-slug> \
|
|
42
|
+
--input-file ./eval-inputs.json \
|
|
43
|
+
--repeat-count 2 \
|
|
44
|
+
--json
|
|
45
|
+
|
|
46
|
+
mgcl evals run \
|
|
47
|
+
--slug <eval-slug> \
|
|
48
|
+
--input-file ./eval-inputs.json \
|
|
49
|
+
--repeat-count 2 \
|
|
50
|
+
--confirm-trials 20 \
|
|
51
|
+
--wait \
|
|
52
|
+
--json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Pass exactly one of `--input-file` or `--input-json`. `evals run` always plans
|
|
56
|
+
first. In an interactive terminal it prompts with the exact trial count; JSON
|
|
57
|
+
and other non-interactive invocations must acknowledge that count with
|
|
58
|
+
`--confirm-trials <count>`. The CLI generates an idempotency key when one is
|
|
59
|
+
not supplied and reports it with safe retry guidance if the start request
|
|
60
|
+
fails ambiguously.
|
|
61
|
+
|
|
62
|
+
Runs start asynchronously unless `--wait` is present. The same bounded wait is
|
|
63
|
+
available independently, with duration units `ms`, `s`, `m`, and `h`:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
mgcl evals runs list --slug <eval-slug> --status RUNNING --json
|
|
67
|
+
mgcl evals runs get --id <eval-run-id> --json
|
|
68
|
+
mgcl evals runs await --id <eval-run-id> --timeout 10m --json
|
|
69
|
+
mgcl evals runs trials --id <eval-run-id> --limit 100 --cursor <cursor> --json
|
|
70
|
+
mgcl evals runs cancel --id <eval-run-id> --json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Await prints the final structured result before exiting nonzero for `FAILED`,
|
|
74
|
+
`CANCELLED`, or a client timeout. A completed run is operationally successful
|
|
75
|
+
regardless of its scores.
|
|
76
|
+
|
|
77
|
+
The stable `--json` bodies use the GraphQL field names. Representative shapes
|
|
78
|
+
for the execution lifecycle are:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{"combinationCount":10,"repeatCount":2,"trialCount":20}
|
|
82
|
+
{"idempotencyKey":"mgcl-eval-...","evalRunId":"...","workflowId":"...","workflowRunId":"..."}
|
|
83
|
+
{"reachedTerminal":true,"pollCount":1,"elapsedMs":42,"evalRun":{"id":"...","status":"COMPLETE","trialStatusCounts":{"queued":0,"running":0,"complete":20,"failed":0,"cancelled":0}}}
|
|
84
|
+
{"trials":[{"id":"...","status":"COMPLETE","input":{},"output":{},"scores":{}}],"nextCursor":"..."}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Definition results include `slug`, `name`, `description`, `tags`, `version`,
|
|
88
|
+
and `inputSchema`. Test results include `status`, `input`, `output`, `scores`,
|
|
89
|
+
and a nullable `{ "type", "message" }` error. Run detail also includes its
|
|
90
|
+
persisted configuration, definition snapshot, progress, timing, initiating
|
|
91
|
+
user, dashboard URL, idempotency key, and Temporal identifiers.
|
|
92
|
+
|
|
93
|
+
Raw-result exports are asynchronous. `--wait` polls and downloads the completed
|
|
94
|
+
file. Existing files are never overwritten unless `--force` is explicit:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
mgcl evals runs export \
|
|
98
|
+
--id <eval-run-id> \
|
|
99
|
+
--output ./eval-results.json \
|
|
100
|
+
--wait
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Without `--wait`, export JSON reports `exportId`, `evalRunId`, `status`, and
|
|
104
|
+
workflow identifiers. A completed export additionally reports `fileName`,
|
|
105
|
+
`trialCount`, `downloadUrl`, and, after CLI download, the resolved `outputPath`.
|
|
106
|
+
|
|
107
|
+
These GraphQL operations come from the same shared registry used by the Apollo
|
|
108
|
+
MCP server. MCP callers must provide `idempotencyKey` and
|
|
109
|
+
`expectedTrialCount` directly when starting a run.
|
|
110
|
+
|
|
24
111
|
## Edit a Skill
|
|
25
112
|
|
|
26
113
|
The Skills working-copy commands currently support root-level skills at
|