@mutagent/cli 0.1.396 → 0.1.397

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.
Files changed (4) hide show
  1. package/README.md +37 -17
  2. package/dist/bin/cli.js +31095 -25976
  3. package/dist/index.js +547 -313
  4. package/package.json +4 -2
package/README.md CHANGED
@@ -328,7 +328,7 @@ is the source of truth for flags.
328
328
  | Option | Description |
329
329
  |---|---|
330
330
  | `--json` | Output results as JSON (for AI agents) |
331
- | `--api-key <key>` | Mutagent API key for this command |
331
+ | `--api-key <key>` | Mutagent platform API key for this command |
332
332
  | `--endpoint <url>` | Mutagent server endpoint for this command |
333
333
  | `--non-interactive` | Disable interactive prompts (for CI/AI agents) |
334
334
  | `-h, --help` | Display help for command |
@@ -381,7 +381,7 @@ mutagent providers get <id> # LLM provider details
381
381
  mutagent providers test <id> # Test LLM provider connectivity
382
382
 
383
383
  # Manage keys
384
- mutagent providers add # Add a provider (--provider, --name, --api-key, --scope, --base-url, --set-default)
384
+ mutagent providers add # Add an LLM provider (--provider, --name, --api-key-stdin or --api-key, --base-url, --set-default)
385
385
  mutagent providers update <id> --name "New name" --active true
386
386
  mutagent providers delete <id> --force
387
387
  ```
@@ -392,12 +392,12 @@ LLM provider types: `openai`, `anthropic`, `google`, `moonshot`, `glm`, `deepsee
392
392
  #### Workspace Environments (`env`)
393
393
 
394
394
  ```bash
395
- mutagent env ls # List the workspace's Environments
395
+ mutagent env list # List the workspace's Environments
396
396
  mutagent env set demo GREETING=hello --secret GITHUB_TOKEN=ghp_…
397
397
  mutagent env set staging --from-file .env.staging --secrets-from-file .env.staging.secrets
398
398
  mutagent env show demo # Entry names + fingerprints — never a value
399
399
  mutagent env unset demo GREETING
400
- mutagent env rm demo --force
400
+ mutagent env delete demo --force
401
401
  mutagent helix --env demo -p "check the deploy" # Load it into a Helix cloud run
402
402
  ```
403
403
 
@@ -496,12 +496,12 @@ mutagent sandbox presets # Presets `mutagent helix --pr
496
496
  mutagent sandbox providers # Providers `mutagent helix --sandbox-provider` can name
497
497
  mutagent sandbox preflight --image alpine:3.20 # Would this definition run?
498
498
  mutagent sandbox spawn --image alpine:3.20 --detach
499
- mutagent sandbox ls
499
+ mutagent sandbox list
500
500
  mutagent sandbox status sbx_1
501
501
  mutagent sandbox exec --sandbox sbx_1 -- bun test
502
502
  mutagent sandbox attach sbx_1 --since 412
503
503
  mutagent sandbox traces sbx_1 # Spans recorded for a sandbox
504
- mutagent sandbox rm sbx_1 --force
504
+ mutagent sandbox delete sbx_1 --force
505
505
  ```
506
506
 
507
507
  `exec` without `--sandbox` runs one command in a fresh, one-shot sandbox and
@@ -553,7 +553,7 @@ flowchart LR
553
553
  HXAGENT --> HXAGENTDEF["definition: positional, --prompt, --file, --name"]
554
554
  HXAGENT --> HXAGENTSLUG["@slug, @slug:vN, @slug:latest<br/>managed agent"]
555
555
 
556
- HXSESSION --> SLS["ls"]
556
+ HXSESSION --> SLS["list"]
557
557
  HXSESSION --> SATTACH["attach"]
558
558
  HXSESSION --> SSEND["send"]
559
559
  HXSESSION --> SSIGNAL["signal"]
@@ -620,8 +620,8 @@ The two trees authenticate differently.
620
620
  | `helix --version`, `-v` | `GET /api/sandbox/presets` (the preset description, not a live probe) | `commands/helix/index.ts` → `commands/helix/doctor.ts` → `lib/sandbox-catalog.ts` |
621
621
  | `helix agent <definition> …` | `POST SESSIONS` with `arm: agent` (or `POST /api/sandbox/:id/session` with `--sandbox`), then the attach loop | `commands/helix/agent.ts` → `commands/helix/run-cloud.ts` |
622
622
  | `helix agent @slug[:vN\|:latest]` | `POST SESSIONS` with body `agent: {slug, revision?}`, `mode` when `-p` or `--rpc` is given, `args: ["-p", task]`; prints the receipt `{reference, sandboxId, agent, mode}` on stderr; then the attach loop | `commands/helix/agent.ts` → `commands/helix/managed-agent.ts` → `commands/helix/run-cloud.ts` |
623
- | `helix session ls` | `GET SESSIONS[?limit=&cursor=]` | `commands/helix/session-commands.ts` → `lib/helix-session-api.ts` |
624
- | `helix session ls <sandbox-id>` (internal) | `GET /api/sandbox/:id/sessions` | `commands/helix/session-commands.ts` → `lib/sandbox-api.ts` |
623
+ | `helix session list` | `GET SESSIONS[?limit=&cursor=]` | `commands/helix/session-commands.ts` → `lib/helix-session-api.ts` |
624
+ | `helix session list <sandbox-id>` (internal) | `GET /api/sandbox/:id/sessions` | `commands/helix/session-commands.ts` → `lib/sandbox-api.ts` |
625
625
  | `helix session attach <ref>` | `GET SESSIONS/<ref>/stream[?since=]` | `commands/helix/session-commands.ts` → `lib/helix-session-api.ts` |
626
626
  | `helix session send <ref>` | `POST SESSIONS/<ref>/input` `{line}` | `commands/helix/send.ts` → `lib/helix-session-api.ts` |
627
627
  | `helix session send <id> --session <sid>` (internal) | `POST /api/sandbox/:id/input` `{sessionId, line}` | `commands/helix/send.ts` → `lib/sandbox-api.ts` |
@@ -637,7 +637,7 @@ The two trees authenticate differently.
637
637
  | `helix models default <ids…>`, `--clear` | `PUT /api/sandbox/helix/defaults` `{models}` (`--clear` sends `[]`) | `commands/helix/models.ts` → `lib/sandbox-api.ts` |
638
638
  | `helix doctor`, `helix smoke` | `POST /api/sandbox/run` (fresh preset sandbox, torn down after), or `POST /api/sandbox/:id/exec` with `--sandbox` | `commands/helix/doctor.ts` → `lib/sandbox-api.ts` |
639
639
  | `helix version` | `GET /api/sandbox/presets` | `commands/helix/doctor.ts` → `lib/sandbox-catalog.ts` |
640
- | `helix update` | `GET /api/sandbox/presets` to name the pinned version, then exit 2 | `commands/helix/doctor.ts` |
640
+ | `helix update` | `GET /api/sandbox/presets` to name the pinned version, then exit 1 (`NOT_SUPPORTED`) | `commands/helix/doctor.ts` |
641
641
 
642
642
  All source paths in this table are under `mutagent-cli/src/`.
643
643
 
@@ -694,17 +694,37 @@ mutagent skills install # Install the skill so agents can self-
694
694
  | `_links` | Dashboard / API URLs |
695
695
  | `_compat` | Compat metadata: `cliVersion`, `skillVersion`, `skillMinCliVersion` |
696
696
 
697
- #### Exit codes
697
+ #### Exit codes and failures
698
+
699
+ One table for every command (`EXIT_CODES` in `src/lib/errors.ts`):
698
700
 
699
701
  | Code | Meaning |
700
702
  |---|---|
701
703
  | `0` | Success |
702
- | `1` | General error |
703
- | `2` | Authentication required |
704
- | `3` | Configuration error |
705
- | `5` | Network error |
706
- | `6` | Rate limit exceeded |
707
- | `8` | Permission error |
704
+ | `1` | Failure, usage errors included (unknown command or option, a missing argument) |
705
+ | `2` | The API key expired or is invalid (a key from another service included) |
706
+ | `3` | Not signed in, or no workspace selected |
707
+
708
+ Exit 0 means success and nothing else: under `--json`, `success: true` if and only if the
709
+ exit code is 0. A failure under `--json` is one object on stdout:
710
+
711
+ ```json
712
+ {
713
+ "success": false,
714
+ "error": "What went wrong",
715
+ "code": "UNKNOWN_OPTION",
716
+ "suggestedAction": "Run: mutagent env ls --help",
717
+ "_agentGuidance": {
718
+ "helpCommand": "mutagent env ls --help",
719
+ "fix": ["mutagent env ls --help"],
720
+ "notes": [],
721
+ "escalate": "Present only when a person has to act"
722
+ }
723
+ }
724
+ ```
725
+
726
+ In a terminal the same failure is `Error: …` on stderr, with the fix. Commands that forward
727
+ a remote process (`sandbox exec`, a Helix run) exit with that process's own code.
708
728
 
709
729
  ### See also
710
730