@runtypelabs/cli 2.39.0 → 2.40.3
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 +85 -0
- package/dist/index.js +5467 -4439
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -643,8 +643,93 @@ Manage agents.
|
|
|
643
643
|
| `agents create -n <name>` | Create a new agent |
|
|
644
644
|
| `agents execute <id> -m <message>` | Execute an agent with a message |
|
|
645
645
|
| `agents task <agent> -g <goal>` | Run a multi-session task (see Marathon section) |
|
|
646
|
+
| `agents ensure <file>` | Converge a definition from a file |
|
|
646
647
|
| `agents delete <id>` | Delete an agent |
|
|
647
648
|
|
|
649
|
+
`agents execute` and `dispatch --agent` take `--alias <name>` or `--version-id <id>`
|
|
650
|
+
to run a specific version. Supply at most one; omit both to run the agent's saved
|
|
651
|
+
configuration.
|
|
652
|
+
|
|
653
|
+
#### Release aliases
|
|
654
|
+
|
|
655
|
+
An agent runs an immutable **version**. A **release alias** is a named, mutable
|
|
656
|
+
pointer that selects which version runs: `live` is built in and never expires, and
|
|
657
|
+
any name matching `^[a-z0-9][a-z0-9-]{0,62}$` is a preview pointer. Every activation
|
|
658
|
+
appends an append-only **deployment receipt**.
|
|
659
|
+
|
|
660
|
+
| Subcommand | Description |
|
|
661
|
+
| ------------------------------------------------------------------------------ | ---------------------------------- |
|
|
662
|
+
| `agents aliases list <agentId> [--include-archived]` | List the pointers, live first |
|
|
663
|
+
| `agents aliases get <agentId> <alias>` | Read one pointer and its revision |
|
|
664
|
+
| `agents aliases activate <agentId> <alias> --version-id <id> [--revision <n>]` | Aim a pointer at one exact version |
|
|
665
|
+
| `agents aliases archive <agentId> <alias> [--revision <n>] [--dry-run]` | Stop a preview pointer resolving |
|
|
666
|
+
| `agents aliases archive <alias> --all [--dry-run]` | Archive that name on every agent |
|
|
667
|
+
| `agents aliases rollback <agentId> <alias> [--steps <n>] [--revision <n>]` | Re-aim at the previous version |
|
|
668
|
+
| `agents deployments list <agentId> [--alias <name>]` | Read the deployment history |
|
|
669
|
+
|
|
670
|
+
Moving an existing `live` pointer requires the revision you read, sent as `If-Match`:
|
|
671
|
+
|
|
672
|
+
```bash
|
|
673
|
+
runtype agents aliases get agent_abc live --json
|
|
674
|
+
runtype agents aliases activate agent_abc live --version-id agentver_9 --revision 12 \
|
|
675
|
+
--idempotency-key deploy-2026-09-06-1
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
`agents ensure <file> --deploy <alias>` saves and activates in one step;
|
|
679
|
+
`--release publish|none` is the older spelling of the same thing, and supplying both
|
|
680
|
+
is refused. A non-live deploy leaves live unchanged.
|
|
681
|
+
|
|
682
|
+
##### Cleaning up a pull request's preview
|
|
683
|
+
|
|
684
|
+
A preview pointer expires 14 days after the last converge that touched it, and a
|
|
685
|
+
sweep archives it then. Archiving on PR close is the primary cleanup; the TTL is
|
|
686
|
+
only the backstop. `--all` archives the name on every agent the pull request
|
|
687
|
+
touched, each under the revision it just read, and reports a stale revision
|
|
688
|
+
without stopping. It is idempotent: a second run finds nothing active.
|
|
689
|
+
|
|
690
|
+
```yaml
|
|
691
|
+
on:
|
|
692
|
+
pull_request:
|
|
693
|
+
types: [closed]
|
|
694
|
+
|
|
695
|
+
jobs:
|
|
696
|
+
archive-preview:
|
|
697
|
+
runs-on: ubuntu-latest
|
|
698
|
+
steps:
|
|
699
|
+
- run: npx @runtypelabs/cli agents aliases archive "pr-${{ github.event.number }}" --all
|
|
700
|
+
env:
|
|
701
|
+
RUNTYPE_API_KEY: ${{ secrets.RUNTYPE_API_KEY }}
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
An organization holds at most 50 active preview aliases and one agent at most 10.
|
|
705
|
+
Creating one past either limit is refused with `PREVIEW_ALIAS_LIMIT`; archiving one
|
|
706
|
+
frees the quota immediately.
|
|
707
|
+
|
|
708
|
+
#### Promoting between organizations
|
|
709
|
+
|
|
710
|
+
`runtype agents promote` moves an agent from one organization to another with two
|
|
711
|
+
credentials. Neither key is ever a command-line argument: name the environment
|
|
712
|
+
variable that holds it.
|
|
713
|
+
|
|
714
|
+
| Subcommand | Description |
|
|
715
|
+
| --------------------------------------------------- | ------------------------------------------------------- |
|
|
716
|
+
| `agents promote prepare <name> --alias <candidate>` | Stage the definition at a preview pointer in the target |
|
|
717
|
+
| `agents promote validate <manifest>` | Re-plan and report unresolved references (exit 1) |
|
|
718
|
+
| `agents promote evaluate <manifest> --suite <id>` | Run a suite against the staged version |
|
|
719
|
+
| `agents promote activate <manifest> [--alias live]` | Deploy that exact staged version |
|
|
720
|
+
|
|
721
|
+
```bash
|
|
722
|
+
export RUNTYPE_SOURCE_API_KEY=... RUNTYPE_TARGET_API_KEY=...
|
|
723
|
+
runtype agents promote prepare "Pricing Assistant" --alias promote-482
|
|
724
|
+
runtype agents promote validate promotion.json
|
|
725
|
+
runtype agents promote evaluate promotion.json --suite evalsuite_1
|
|
726
|
+
runtype agents promote activate promotion.json
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
Credentials never cross organizations, secrets stay `{{secret:NAME}}` references
|
|
730
|
+
resolved by the target, and the manifest carries only ids and hashes. `evaluate`
|
|
731
|
+
reports its result and nothing gates activation on it.
|
|
732
|
+
|
|
648
733
|
### `runtype persona`
|
|
649
734
|
|
|
650
735
|
Set up the [Persona](https://github.com/runtypelabs/persona) chat widget against Runtype: create an agent, create a client token, and output an embed snippet.
|