@getmagical/cli 0.8.0 → 0.9.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 CHANGED
@@ -7,6 +7,12 @@ Magical CLI for the shared MCP operation surface.
7
7
  - Shared operational commands come from `packages/mcp-registry`.
8
8
  - Do not add shared commands directly in this package or in `services/mcp/operations`.
9
9
 
10
+ New agents created with `automations create` or added with `automations update`
11
+ use the Recommended model pool when `config.model` is omitted. Explicit model
12
+ selections and existing agents keep their current models. If no Recommended pool
13
+ is configured for the agent type and environment, the save returns an actionable
14
+ error rather than silently pinning a model.
15
+
10
16
  ## Usage
11
17
 
12
18
  ```bash
@@ -22,6 +28,49 @@ mgcl automations run-draft --draft-automation-id ... --agent-id ... --idempotenc
22
28
  mgcl automations publish --draft-automation-id ... # non-production only: mgcl refuses against the production API, and the API rejects it too
23
29
  ```
24
30
 
31
+ ## Typed classification
32
+
33
+ Use `mgcl classify` for focused typed judgments over context you already have.
34
+ The request uses TypeSafe-shaped JSON with one shared `state` and a map of
35
+ named `questions`. Version 1 supports `noul`, `choice`, and `score` questions.
36
+ The backend uses `jev-latest` by default. Add `model` to the request to select
37
+ an explicit supported model; the response reports the model actually used.
38
+ Instructions, choice descriptions, rubric levels, and score legends may be
39
+ structured JSON and are passed through without narrowing.
40
+ The backend applies a 30-second total deadline, including bounded transient
41
+ retries. Access is employee-only through normal CLI credentials or an allowed
42
+ Magical runtime identity.
43
+
44
+ ```bash
45
+ mgcl classify --input-file request.json
46
+ mgcl classify --input-json '{"state":"Please refund the duplicate charge.","questions":{"refund_requested":{"type":"noul","instructions":"Does the message explicitly request a refund?"}}}'
47
+ cat request.json | mgcl classify --input-file -
48
+ ```
49
+
50
+ Pass exactly one input source. Questions in one batch are independent and
51
+ cannot consume sibling answers. Split dependent judgments into separate calls.
52
+ `noul` is a probability rather than a boolean; choice results retain the full
53
+ option distribution; scores may be fractional. Confidence represents the
54
+ returned distribution, not correctness, so include an `insufficient_evidence`
55
+ choice when the supplied context may not establish an answer.
56
+
57
+ The command evaluates only supplied text and JSON. It does not fetch URLs,
58
+ files named in the request, run records, or media. Output is always the full
59
+ parseable JSON response, including model, usage, probability distributions,
60
+ score legends, and additive fields. A valid negative or uncertain answer exits
61
+ successfully. Invalid input and backend or provider failures use the normal
62
+ nonzero CLI error path and write diagnostics to stderr.
63
+
64
+ ## Publish checks after saving
65
+
66
+ `automations create`, `automations update`, and `workbench patch apply` return
67
+ `publishChecks` for the saved version and branch. Draft saves remain allowed.
68
+ Inspect each check's `issues` (including agent/command targets and metadata),
69
+ fix checks with `blocking: true`, and save again before completing the task.
70
+ Nonblocking failures are advisory. `status: unknown` means the save succeeded
71
+ but readiness could not be checked; retry before treating the task as complete.
72
+ Passing health checks does not bypass publication permissions or review.
73
+
25
74
  ## Deployment targets
26
75
 
27
76
  Use the global `--env us|uk|stg` option to select a complete Magical API and
@@ -498,9 +547,9 @@ Automation settings follow the same shape (`automation:config.systemPrompt`).
498
547
  Branch creation defaults to main. Use `--source-branch-id` and optionally
499
548
  `--source-version-id` to fork from another branch or an older version in that
500
549
  branch's history. Names must use lowercase letters or numbers separated by
501
- single dashes, such as `release-2`, and must be 100 characters or fewer.
502
- Spaces, underscores, slashes, backslashes, punctuation, uppercase letters,
503
- leading or trailing dashes, repeated dashes, and over-length names are
550
+ single dashes or slashes, such as `release-2` or `otto/branch-fix`, and must be
551
+ 100 characters or fewer. Spaces, underscores, backslashes, other punctuation,
552
+ uppercase letters, leading or trailing separators, adjacent separators, and over-length names are
504
553
  rejected before an API request. Branch IDs, not names, identify targets, and
505
554
  every automation or branch ID must be a UUID; malformed IDs are rejected
506
555
  before an API request.