@moda-ai/cli 1.55.42 → 1.55.44

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 (45) hide show
  1. package/README.md +1 -1
  2. package/dist/{agent-86hghww1.js → agent-5ax7fqhe.js} +9 -8
  3. package/dist/{cli-daqkdnm1.js → cli-4pc0a18x.js} +1 -1
  4. package/dist/{cli-1z1sx8dg.js → cli-5aa48ry5.js} +5 -4
  5. package/dist/{cli-xddtv3yn.js → cli-8pcq2et6.js} +2 -40
  6. package/dist/{cli-hjm9151g.js → cli-8pksf2x7.js} +5 -5
  7. package/dist/{cli-vwpbspr5.js → cli-d4cdczhe.js} +5 -5
  8. package/dist/{cli-0xc5htv7.js → cli-dmm9jm9m.js} +1 -1
  9. package/dist/cli-e0kbye4s.js +39 -0
  10. package/dist/{cli-t0pb7qbs.js → cli-e24fjyrb.js} +118 -10
  11. package/dist/{cli-gt3yq1y5.js → cli-k2ka2kjb.js} +184 -2
  12. package/dist/{cli-pmzh2qjy.js → cli-sejqvvhv.js} +14 -6
  13. package/dist/{cli-srwzar82.js → cli-t4xfvrry.js} +34 -15
  14. package/dist/{cli-4sy4tytm.js → cli-tztzrh6b.js} +19 -5
  15. package/dist/{cli-he8csgsr.js → cli-wwbr5caw.js} +8 -8
  16. package/dist/{cli-77ekrx7d.js → cli-xcpwp0gb.js} +14 -7
  17. package/dist/{cli-mxfyq5nq.js → cli-xx0pjzkh.js} +4 -4
  18. package/dist/cli.js +82 -41
  19. package/dist/{doctor-c05njdv8.js → doctor-k4tdgvgv.js} +8 -7
  20. package/dist/{fix-aghp304m.js → fix-nk5xffz8.js} +4 -4
  21. package/dist/{harness-vabp33ak.js → harness-avynbq4f.js} +6 -5
  22. package/dist/{harness-github-actions-112503xs.js → harness-github-actions-gd6vyxb0.js} +6 -5
  23. package/dist/{index-dtxvvcq2.js → index-63k2a6gb.js} +12 -11
  24. package/dist/{production-intelligence-e5vsc6cw.js → production-intelligence-sv3qx7f4.js} +24 -7
  25. package/dist/{profile-commands-se9947c1.js → profile-commands-mh3kfqkn.js} +98 -20
  26. package/dist/{prompt-attribution-pbns1ya3.js → prompt-attribution-wvvnzw4m.js} +6 -5
  27. package/dist/prompt-source-mcp.js +6 -5
  28. package/dist/{prompts-ab-f5qrvpkt.js → prompts-ab-y7egdzg4.js} +8 -7
  29. package/dist/{prompts-propose-jg2j41wx.js → prompts-propose-5nw25v9a.js} +8 -7
  30. package/dist/{prompts-qppk0mhp.js → prompts-snnbyxmz.js} +6 -5
  31. package/dist/{provision-cya5rpxa.js → provision-t1dpzcjp.js} +6 -5
  32. package/dist/{registry-8a1940sr.js → registry-8zkxefjs.js} +3 -3
  33. package/dist/{skills-sh93b156.js → skills-d4215fa9.js} +6 -5
  34. package/dist/{sync-0pp1c8hs.js → sync-17f9yxb1.js} +8 -7
  35. package/package.json +1 -1
  36. package/skills/integration/index.json +2 -2
  37. package/skills/moda-cli/SKILL.md +6 -3
  38. package/skills/moda-cli/references/auth.md +16 -7
  39. package/skills/moda-cli/references/commands.md +4 -2
  40. package/skills/moda-cli/references/dashboard-parity.md +3 -0
  41. package/skills/moda-cli/references/detections.md +20 -0
  42. package/skills/moda-cli/references/output-protocol.md +1 -1
  43. package/skills/moda-cli/references/production-intelligence.md +48 -0
  44. package/skills/moda-cli/references/search-and-traces.md +3 -1
  45. package/skills/moda-cli/references/troubleshooting.md +14 -0
@@ -12,6 +12,54 @@ moda overview --days-back=30
12
12
  Returns total traces, trend, frustration rate, tool failure summary,
13
13
  top clusters, recent activity.
14
14
 
15
+ #### Before/after and trends (`--compare`, `--series`)
16
+
17
+ ```bash
18
+ moda overview --compare # last 7 days against the 7 days before
19
+ moda overview --compare --since=2026-10-17T14:00:00Z # after a deploy against the same span before it
20
+ moda overview --compare --since=2026-10-10 --until=2026-10-12 # a fixed window against the one before it
21
+ moda overview --series --days-back=14 # adds [bucket, value] series (implies --compare)
22
+ moda overview --compare --agent-name=planner # one sub-agent (names in trends.agent.options)
23
+ moda overview --compare --unit=turn # rates per user turn (or segment) instead of per trace
24
+ ```
25
+
26
+ Adds `trends` (GET `/v1/data/trends`), read from the dashboard's own loaders.
27
+ The previous window is always the span of equal length just before the window,
28
+ as the dashboard defines it. So `--since=<deploy time>` (to now) compares after
29
+ the deploy with the same length of time before it. There is no separate
30
+ `--compare-to` flag: every dashboard loader computes "previous" this way.
31
+ `--days-back` and `--since` are exclusive; `--until` needs `--since`; a window
32
+ can be up to 90 days.
33
+
34
+ Each figure is `{current, previous, delta, delta_pct, spike?}`. `delta` is
35
+ current minus previous (percentage points for a `_pct` rate). `delta_pct` is the
36
+ relative change. `spike` is the dashboard's spike rule. Sections:
37
+
38
+ | Section | Dashboard source | Figures |
39
+ |---|---|---|
40
+ | `overview` | Analytics overview | traces, messages, negative emotion rate (per analyzed trace), failed tool calls (per call), ungrounded claims (per scored message); `n` gives numerator and denominator |
41
+ | `problems` | Problems trend card | analysed traces, traces with any signal, signal rate (`--days-back` only) |
42
+ | `rates` | Signals overview rate cards | each detector's share of units with a detection (`--unit=conversation\|segment\|turn`) |
43
+ | `detectors` | Detector tab KPI tiles | emotion (analyzed, negative rate, detections, affected users, traces per family), tool_failure (failed traces, classified failures, failure rate, calls, users, tools), laziness, hallucination |
44
+
45
+ The same detector can show different rates in different sections because each
46
+ uses its own denominator (`rate_note` says which). `detectors.tool_failure.failure_rate_pct`
47
+ counts classified failures per call and is higher than `overview.tool_failure_rate_pct`
48
+ (failed call records per call).
49
+
50
+ `--series` adds `trends.series`: compact `[bucket, value]` arrays, per hour for
51
+ windows up to 2 days and per day above. Bucket keys are `YYYY-MM-DD` or
52
+ `YYYY-MM-DDTHH:00Z`.
53
+
54
+ `--agent-name` scopes the `overview` section only. The Problems, rates and
55
+ detector loaders have no sub-agent filter, so those sections are left out and
56
+ `trends.notes` says so.
57
+
58
+ The `overview` section is the slow part: on a large workspace a 30-day window
59
+ can take about 40 seconds, and the CLI waits up to 90. A figure whose read
60
+ failed is `null` with `unavailable: true` (never zero), and `trends.notes`
61
+ names it.
62
+
15
63
  ### 2b. Ask & investigate (production intelligence)
16
64
 
17
65
  `moda ask` answers a natural-language production/harness question (a paid
@@ -37,7 +37,9 @@ These rows have no score or message index. Open one with
37
37
  `moda traces spans <conversation_id>` or `moda traces get <conversation_id>` to find the
38
38
  matching turn. When more traces exist, `fallback.has_more` is true and
39
39
  `next_commands` includes the `moda traces --search ... --offset` command to
40
- page. With `--mode=keyword`, ranked traces are not substituted. If the fallback
40
+ page. With `--mode=keyword` the trace-level search is not run (it is
41
+ relevance-ranked, so it could not be shown as literal matches); a warning says
42
+ so and `next_commands` offers `moda traces --search` instead. If the fallback
41
43
  itself fails, you get a warning, not a silent empty result. Either way, zero
42
44
  results does not prove the topic never came up.
43
45
 
@@ -33,6 +33,20 @@ setup wizard; do not run it unprompted.
33
33
  The key is invalid, revoked, or for another environment. Get a new key and
34
34
  save it with `moda auth login --api-key`.
35
35
 
36
+ **`Tenant <id> does not exist or is not accessible to this API key` (exit 1, `not_found`)**
37
+ `MODA_TENANT_ID` (or `--tenant-id`) names a tenant that does not exist or was
38
+ deleted. The key itself is fine. Set the tenant id to one from the dashboard
39
+ URL, or from `moda auth whoami` with a browser session, and retry. A key that
40
+ belongs to one tenant and is pointed at another gets `access_denied` with
41
+ "Unset MODA_TENANT_ID" instead; a read-only key running a write gets
42
+ `access_denied` saying it is read-only.
43
+
44
+ **`MODA_BASE_URL=... is a loopback URL, and the active profile 'prod' is a prod profile` (exit 5, `input_required`)**
45
+ Nothing was sent. Re-run with `--profile=local` (the choice's `resume_flags`)
46
+ to use the local stack, or unset `MODA_BASE_URL` to use production.
47
+ `moda auth status --online` then shows `online.baseUrl` and, from `/whoami`,
48
+ the tenant the key acts on.
49
+
36
50
  **`not_found` (exit 1)**
37
51
  The trace, problem, or cluster id does not exist in this tenant (a trace with
38
52
  no generated world state returns a warning, not `not_found`).