@moda-ai/cli 1.49.0 → 1.52.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/dist/{cli-bqhs6sk7.js → cli-ac3p2byq.js} +245 -60
- package/dist/{cli-6xndg2h4.js → cli-ha40mgy1.js} +4 -4
- package/dist/{cli-m3bg9yyh.js → cli-he2wb4hd.js} +8 -9
- package/dist/{cli-c64d2jrw.js → cli-kxwm7y62.js} +1 -1
- package/dist/{cli-taf854xx.js → cli-sq6g0tk5.js} +2 -2
- package/dist/cli.js +166 -74
- package/dist/{harness-github-actions-dvq7spqh.js → harness-github-actions-gbty3k66.js} +2 -2
- package/dist/{harness-4ypeg9dh.js → harness-s13wvdxt.js} +2 -2
- package/dist/{index-pdg9t77n.js → index-pykaaezb.js} +5 -5
- package/dist/prompt-source-mcp.js +2 -2
- package/dist/{provision-7fhbgk2d.js → provision-d1dfj6as.js} +3 -3
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +40 -22
package/skills/moda-cli/SKILL.md
CHANGED
|
@@ -364,8 +364,8 @@ Fields an agent should read:
|
|
|
364
364
|
|
|
365
365
|
`errors[].code` is one of `input_error`, `api_error`, `network_error`,
|
|
366
366
|
`auth_required`, `input_required`, `cancelled`, `command_error`,
|
|
367
|
-
`access_denied`, `unknown_error`, or a documented domain
|
|
368
|
-
`cloud_unavailable`. `access_denied` (exit 1) is an access problem — no
|
|
367
|
+
`access_denied`, `output_error`, `unknown_error`, or a documented domain
|
|
368
|
+
code such as `cloud_unavailable`. `access_denied` (exit 1) is an access problem — no
|
|
369
369
|
organizations or an insufficient (viewer) role — distinct from `auth_required`
|
|
370
370
|
(exit 4, missing/expired credentials).
|
|
371
371
|
|
|
@@ -408,14 +408,26 @@ Treat an answer as degraded if **any** of these hold:
|
|
|
408
408
|
|
|
409
409
|
### Large outputs and unknown flags
|
|
410
410
|
|
|
411
|
-
- **Byte limit.** In `--agent` mode, envelopes over 200 KB
|
|
412
|
-
*without*
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
`
|
|
417
|
-
|
|
418
|
-
|
|
411
|
+
- **Byte limit.** In `--agent` mode, envelopes over 200 KB
|
|
412
|
+
(`MODA_AGENT_MAX_OUTPUT_BYTES`) are bounded *without* cutting any text or
|
|
413
|
+
breaking their shape: the complete output (the same JSON `--json` prints) is
|
|
414
|
+
written to a local file, and whole trailing list items are dropped from
|
|
415
|
+
`data`. `truncation.data.full_output_path` (also an `artifacts[]` entry of
|
|
416
|
+
kind `full_output`) is that file; read it in line ranges or with `jq`.
|
|
417
|
+
These files are pruned after 24 hours (`MODA_AGENT_OUTPUT_RETENTION_HOURS`).
|
|
418
|
+
`truncation.data` also says what was dropped (`dropped_items`,
|
|
419
|
+
`complete: false`). `data` is still normal JSON, so
|
|
420
|
+
`data.frustrations[0].conversation_id` keeps working. If even one item is
|
|
421
|
+
over budget, `data` is a stub `{ truncated, original_bytes, max_bytes,
|
|
422
|
+
full_output_path }`. If that file cannot be written (unwritable
|
|
423
|
+
`MODA_AGENT_OUTPUT_DIR`, full disk), nothing is dropped: the envelope keeps
|
|
424
|
+
the whole result over the limit with `status: "error"`, an `output_error`
|
|
425
|
+
(`cause: "full_output_save_failed"`), and exit `1`. If only the oversized
|
|
426
|
+
envelope text could not be saved (`cause: "envelope_text_save_failed"`),
|
|
427
|
+
that text stays whole, and the error message says whether `data` is whole
|
|
428
|
+
or bounded with its complete copy at `truncation.data.full_output_path`.
|
|
429
|
+
You can also page with a smaller `--limit` and
|
|
430
|
+
`--offset`, or rerun with `--json` (no byte limit).
|
|
419
431
|
- **Unknown flags fail.** A flag the command doesn't take (a typo, or a
|
|
420
432
|
filter it lacks) exits `1` with the valid flag list and a "did you mean",
|
|
421
433
|
instead of being silently ignored. Stray arguments on commands that take
|
|
@@ -446,6 +458,8 @@ fail instead of being clamped.
|
|
|
446
458
|
time window. On `context`, `--window=0` returns only the anchor message (plus
|
|
447
459
|
`total_messages`), and a value above 5 is clamped to 5 with a warning that
|
|
448
460
|
prints the `--all --from --max-messages` command for a wider slice.
|
|
461
|
+
`--metadata-only` returns only the summary and `total_messages`, with no
|
|
462
|
+
messages.
|
|
449
463
|
|
|
450
464
|
### Schema introspection
|
|
451
465
|
|
|
@@ -534,11 +548,13 @@ compare scores across modes.
|
|
|
534
548
|
Hand the anchors straight to `moda context`:
|
|
535
549
|
|
|
536
550
|
```bash
|
|
537
|
-
# Find, then read the exact turn
|
|
538
|
-
|
|
551
|
+
# Find, then read the exact turn. --json prints the bare payload; piped output
|
|
552
|
+
# without it is the agent envelope, where results sit under .data.results.
|
|
553
|
+
hit=$(moda search "double charge" --limit=1 --json | jq -c '.results[0] // empty')
|
|
539
554
|
cid=$(echo "$hit" | jq -r '.conversation_id')
|
|
540
|
-
|
|
541
|
-
|
|
555
|
+
# Trace-level fallback hits (match_grain: "trace") have no message_index.
|
|
556
|
+
idx=$(echo "$hit" | jq -r '.message_index // empty')
|
|
557
|
+
moda context "$cid" ${idx:+--msg-index="$idx"}
|
|
542
558
|
```
|
|
543
559
|
|
|
544
560
|
### 2. Overview (start here for health questions)
|
|
@@ -635,6 +651,7 @@ moda context <conversation_id> # default window around middle
|
|
|
635
651
|
moda context <conversation_id> --msg-index=5 # center on message 5
|
|
636
652
|
moda context <conversation_id> --window=3 # 3 messages each side (max 5)
|
|
637
653
|
moda context <conversation_id> --msg-index=40 --window=0 # just message 40 + total_messages
|
|
654
|
+
moda context <conversation_id> --metadata-only # summary + total_messages, no messages
|
|
638
655
|
moda context <conversation_id> --all # whole trace in order, first 500 messages
|
|
639
656
|
moda context <conversation_id> --all --from=500 --max-messages=500 # continue (max 5000)
|
|
640
657
|
```
|
|
@@ -746,9 +763,9 @@ Pass `--include-window` to attach a `window` field per row (instead of
|
|
|
746
763
|
(1–5, default `1`) is the half-width; `--window=1` ⇒ 3 messages total
|
|
747
764
|
(anchor ± 1).
|
|
748
765
|
|
|
749
|
-
Examples default to `--limit=5` (max 20).
|
|
750
|
-
|
|
751
|
-
|
|
766
|
+
Examples default to `--limit=5` (max 20). Example text is returned whole; if
|
|
767
|
+
the agent envelope goes over its byte limit, whole trailing examples are
|
|
768
|
+
dropped and `truncation.data.full_output_path` holds every example. Agent output lists the 20 most frequent
|
|
752
769
|
`subtypes` (`subtypes_total` has the full count); `--json` lists all.
|
|
753
770
|
|
|
754
771
|
### 7. Prompt management
|
|
@@ -1116,16 +1133,17 @@ and archiving an active custom signal (pause it, or delete a draft).
|
|
|
1116
1133
|
|
|
1117
1134
|
```bash
|
|
1118
1135
|
# Semantic: find the moment a user expressed an intent, in their own words
|
|
1119
|
-
moda search "user wants to cancel subscription" --mode=semantic --limit=5 \
|
|
1136
|
+
moda search "user wants to cancel subscription" --mode=semantic --limit=5 --json \
|
|
1120
1137
|
| jq -r '.results[] | "\(.conversation_id) @\(.message_index) \(.snippet)"'
|
|
1121
1138
|
|
|
1122
1139
|
# Keyword: locate every tool call/result mentioning an exact identifier
|
|
1123
1140
|
moda search "stripe.refunds.create" --mode=keyword --limit=10
|
|
1124
1141
|
|
|
1125
|
-
# Search, then open the top hit at the exact turn
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
|
1142
|
+
# Search, then open the top message-level hit at the exact turn (skips
|
|
1143
|
+
# trace-level fallback hits, which have no message_index)
|
|
1144
|
+
moda search "rate limit exceeded" --limit=5 --json \
|
|
1145
|
+
| jq -r 'first(.results[] | select(.message_index != null)) | "\(.conversation_id) \(.message_index)"' \
|
|
1146
|
+
| xargs -r -n2 sh -c 'moda context "$0" --msg-index="$1"'
|
|
1129
1147
|
```
|
|
1130
1148
|
|
|
1131
1149
|
### Daily health check
|