@runtypelabs/cli 2.37.0 → 2.39.0
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 +95 -8
- package/dist/index.js +3505 -2807
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -673,6 +673,39 @@ runtype dispatch --flow <id> --variable key=value --variable key2=value2
|
|
|
673
673
|
runtype dispatch --flow <id> --no-stream --json
|
|
674
674
|
```
|
|
675
675
|
|
|
676
|
+
#### Execution inputs and machine-readable results
|
|
677
|
+
|
|
678
|
+
`dispatch`, `flows run`, and `agents execute` accept `--inputs <json>` or
|
|
679
|
+
`--inputs-file <file|->` for typed input variables. Use `-` to read a JSON object
|
|
680
|
+
from stdin. `--variable key=value` remains a repeatable **string** input; use JSON
|
|
681
|
+
for numbers, booleans, arrays, objects, and null. Conflicting input sources and
|
|
682
|
+
duplicate keys are rejected rather than silently overwritten.
|
|
683
|
+
|
|
684
|
+
```bash
|
|
685
|
+
runtype flows run flow_example --inputs '{"limit":5,"enabled":true}' --json
|
|
686
|
+
printf '%s' '{"customer":{"name":"Alyss"}}' | runtype dispatch --flow flow_example --inputs-file - --json
|
|
687
|
+
runtype agents execute agent_example --message "Summarize these items" --inputs '{"items":[1,2,3]}' --json
|
|
688
|
+
runtype dispatch --flow flow_example --messages-file conversation.json --jsonl
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
`--messages-file <file|->` supplies a JSON array of messages instead of `--message`.
|
|
692
|
+
Only one source may consume stdin. Input-bearing `agents execute` requests use
|
|
693
|
+
the dispatch API so variables reach the runtime; requests without input variables
|
|
694
|
+
retain the agent execution endpoint.
|
|
695
|
+
|
|
696
|
+
For these execution commands, `--json` writes one final JSON value to stdout,
|
|
697
|
+
without progress prose or text deltas. `--jsonl` writes structured events one per
|
|
698
|
+
line followed by an `execution_summary` event (also used for buffered results or
|
|
699
|
+
errors). The two formats are mutually exclusive. Diagnostics go to stderr.
|
|
700
|
+
Exit codes are **0** for completion, **1** for failed execution, invalid input,
|
|
701
|
+
authentication errors, or incomplete streams, and **2** when awaiting input or
|
|
702
|
+
approval. Awaiting results do not claim `success: true`. A paused execution is
|
|
703
|
+
not automatically approved or restarted.
|
|
704
|
+
|
|
705
|
+
CRUD commands that accept a JSON-object `--from-file` through the shared file
|
|
706
|
+
reader also accept `--from-file -`. This does not change commands whose input
|
|
707
|
+
files have a different format, such as batch record-ID arrays.
|
|
708
|
+
|
|
676
709
|
### `runtype prompts`
|
|
677
710
|
|
|
678
711
|
Manage prompts.
|
|
@@ -706,6 +739,17 @@ Manage batch operations.
|
|
|
706
739
|
| `batch status <id>` | Check batch job status (`--watch`) |
|
|
707
740
|
| `batch cancel <id>` | Cancel a batch job |
|
|
708
741
|
|
|
742
|
+
`batch status --watch` polls in both terminal and nonterminal environments. Use
|
|
743
|
+
`--timeout <ms>` (default `300000`) and `--interval <ms>` (default `2000`) to bound
|
|
744
|
+
the local wait; these options require `--watch`. With `--json`, stdout contains
|
|
745
|
+
one final result, while progress is sent to stderr. Failed or cancelled batches,
|
|
746
|
+
completed batches with failed records, and local timeouts exit nonzero. Timing out
|
|
747
|
+
stops watching only: it does not cancel or resubmit the server batch.
|
|
748
|
+
|
|
749
|
+
```bash
|
|
750
|
+
runtype batch status batch_example --watch --timeout 600000 --interval 2000 --json
|
|
751
|
+
```
|
|
752
|
+
|
|
709
753
|
### `runtype eval`
|
|
710
754
|
|
|
711
755
|
Manage evaluations.
|
|
@@ -855,16 +899,59 @@ runtype config path
|
|
|
855
899
|
|
|
856
900
|
Valid config keys: `apiUrl`, `defaultModel`, `defaultTemperature`, `outputFormat`, `streamResponses`
|
|
857
901
|
|
|
858
|
-
###
|
|
902
|
+
### Effective target and headless safeguards
|
|
903
|
+
|
|
904
|
+
```bash
|
|
905
|
+
# Inspect the resolved endpoint and credential source without exposing the key
|
|
906
|
+
runtype config context --json
|
|
907
|
+
|
|
908
|
+
# Fail closed if the target or authenticated organization differs
|
|
909
|
+
runtype --no-input --expect-api-url https://api.runtype.com --expect-org org_example \
|
|
910
|
+
flows run flow_example --inputs '{"limit":5}' --json
|
|
911
|
+
|
|
912
|
+
# Headless mode is not consent: destructive commands also require --yes
|
|
913
|
+
runtype --no-input records delete record_example --yes
|
|
914
|
+
```
|
|
859
915
|
|
|
860
|
-
|
|
916
|
+
API URL precedence is **`--api-url` > `RUNTYPE_API_URL` > saved `apiUrl` config >
|
|
917
|
+
stored credential endpoint > production**. Saved URL configuration now affects
|
|
918
|
+
ordinary API commands, not just configuration display. If an old saved value is
|
|
919
|
+
stale, reset it or explicitly select your intended endpoint before upgrading
|
|
920
|
+
automation. Conflicting explicit API URL flags are rejected.
|
|
921
|
+
|
|
922
|
+
`config context` is an offline, redacted inspection; its stored organization hint
|
|
923
|
+
is not proof of current server identity (`orgVerified: false`). `--expect-org`
|
|
924
|
+
checks the authenticated identity against the server before API actions. With
|
|
925
|
+
either expected-target guard, an invalid environment credential does not silently
|
|
926
|
+
fall back to a different stored credential.
|
|
927
|
+
|
|
928
|
+
Claim/verify tokens remain bound to their issuing server; the expected-URL guard
|
|
929
|
+
also checks that actual endpoint. Anonymous registration and claim/verify reject
|
|
930
|
+
`--expect-org`, since that ceremony cannot prove the resulting organization.
|
|
931
|
+
|
|
932
|
+
Implicit login never prompts when stdin is not a terminal. `--no-input` also
|
|
933
|
+
disables interactive startup and prompts in terminal sessions; delete, bulk-delete,
|
|
934
|
+
revoke, and reset commands require explicit `--yes` in this mode. Marathon and
|
|
935
|
+
`agents task` reject `--no-input`; use their documented headless JSON mode instead.
|
|
936
|
+
|
|
937
|
+
### Global Options
|
|
861
938
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
|
865
|
-
|
|
|
866
|
-
|
|
|
867
|
-
| `--
|
|
939
|
+
Root flags are forwarded to subcommands; output support depends on the command:
|
|
940
|
+
|
|
941
|
+
| Flag | Description |
|
|
942
|
+
| ------------------------ | --------------------------------------- |
|
|
943
|
+
| `--json` | Output in JSON format |
|
|
944
|
+
| `--tty` / `--no-tty` | Force TTY / non-TTY mode |
|
|
945
|
+
| `-v, --verbose` | Enable verbose output |
|
|
946
|
+
| `--api-url <url>` | Override API URL |
|
|
947
|
+
| `--expect-api-url <url>` | Assert effective API endpoint |
|
|
948
|
+
| `--expect-org <id>` | Assert authenticated organization |
|
|
949
|
+
| `--no-input` | Disable prompts; does not imply consent |
|
|
950
|
+
| `-y, --yes` | Explicit destructive-action consent |
|
|
951
|
+
|
|
952
|
+
`--tty` / `--no-tty` are available on commands with terminal rendering. The strict
|
|
953
|
+
single-result JSON contract above applies to the three execution commands and
|
|
954
|
+
`batch status --watch`, not every legacy command.
|
|
868
955
|
|
|
869
956
|
## Development
|
|
870
957
|
|