@moda-ai/cli 1.55.43 → 1.55.45

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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/{agent-x1gwrrvd.js → agent-5ax7fqhe.js} +8 -8
  3. package/dist/{cli-5y9tj6cb.js → cli-4m0rgkx4.js} +7 -2
  4. package/dist/{cli-daqkdnm1.js → cli-4pc0a18x.js} +1 -1
  5. package/dist/{cli-1z1sx8dg.js → cli-5aa48ry5.js} +5 -4
  6. package/dist/{cli-5fhqfx04.js → cli-8pcq2et6.js} +1 -1
  7. package/dist/{cli-fpd1pfvt.js → cli-8pksf2x7.js} +5 -5
  8. package/dist/{cli-s1w5phms.js → cli-d4cdczhe.js} +5 -5
  9. package/dist/{cli-0xc5htv7.js → cli-dmm9jm9m.js} +1 -1
  10. package/dist/{cli-t0pb7qbs.js → cli-e24fjyrb.js} +118 -10
  11. package/dist/{cli-pmzh2qjy.js → cli-sejqvvhv.js} +14 -6
  12. package/dist/{cli-h62j4jn7.js → cli-t4xfvrry.js} +34 -15
  13. package/dist/{cli-9a0a3v13.js → cli-tztzrh6b.js} +2 -2
  14. package/dist/{cli-k5drmy8r.js → cli-wwbr5caw.js} +8 -8
  15. package/dist/{cli-77ekrx7d.js → cli-xcpwp0gb.js} +14 -7
  16. package/dist/{cli-stfpr2ct.js → cli-xx0pjzkh.js} +4 -4
  17. package/dist/cli.js +33 -29
  18. package/dist/{doctor-wrgajgev.js → doctor-k4tdgvgv.js} +7 -7
  19. package/dist/{fix-7aajsdbf.js → fix-nk5xffz8.js} +4 -4
  20. package/dist/{harness-1rn1hqzz.js → harness-avynbq4f.js} +5 -5
  21. package/dist/{harness-github-actions-m95qvgbs.js → harness-github-actions-gd6vyxb0.js} +5 -5
  22. package/dist/{index-svfzq5rb.js → index-63k2a6gb.js} +11 -11
  23. package/dist/{production-intelligence-7jvfdz6b.js → production-intelligence-0z6v6tpp.js} +5 -3
  24. package/dist/{profile-commands-se9947c1.js → profile-commands-mh3kfqkn.js} +98 -20
  25. package/dist/{prompt-attribution-hc6mcvee.js → prompt-attribution-wvvnzw4m.js} +5 -5
  26. package/dist/prompt-source-mcp.js +5 -5
  27. package/dist/{prompts-ab-ws66335h.js → prompts-ab-y7egdzg4.js} +7 -7
  28. package/dist/{prompts-propose-a9m0p9nr.js → prompts-propose-5nw25v9a.js} +7 -7
  29. package/dist/{prompts-xe5bgbx8.js → prompts-snnbyxmz.js} +5 -5
  30. package/dist/{provision-a9kkfvp7.js → provision-t1dpzcjp.js} +5 -5
  31. package/dist/{registry-j2dsfh6v.js → registry-8zkxefjs.js} +3 -3
  32. package/dist/{skills-vveagdwe.js → skills-d4215fa9.js} +5 -5
  33. package/dist/{sync-yy3fgnxe.js → sync-17f9yxb1.js} +7 -7
  34. package/package.json +1 -1
  35. package/skills/integration/index.json +2 -2
  36. package/skills/moda-cli/SKILL.md +4 -3
  37. package/skills/moda-cli/references/auth.md +16 -7
  38. package/skills/moda-cli/references/output-protocol.md +1 -1
  39. package/skills/moda-cli/references/search-and-traces.md +3 -1
  40. package/skills/moda-cli/references/troubleshooting.md +14 -0
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  inventoryFiles,
3
3
  safePromptEvidencePath
4
- } from "./cli-s1w5phms.js";
4
+ } from "./cli-d4cdczhe.js";
5
5
  import"./cli-xq45etg1.js";
6
6
  import"./cli-97fnztpy.js";
7
7
  import"./cli-cesds766.js";
8
8
  import {
9
9
  require_typescript
10
10
  } from "./cli-qpq84eee.js";
11
- import"./cli-5fhqfx04.js";
11
+ import"./cli-8pcq2et6.js";
12
12
  import"./cli-e0kbye4s.js";
13
- import"./cli-9a0a3v13.js";
14
- import"./cli-0xc5htv7.js";
15
- import"./cli-t0pb7qbs.js";
13
+ import"./cli-tztzrh6b.js";
14
+ import"./cli-dmm9jm9m.js";
15
+ import"./cli-e24fjyrb.js";
16
16
  import"./cli-k4tqwah4.js";
17
17
  import"./cli-9kfxkxmk.js";
18
18
  import"./cli-ns5fcnkz.js";
@@ -3,7 +3,7 @@ import {
3
3
  checkPromptMapping,
4
4
  discoverHarnessPromptSources,
5
5
  safePromptEvidencePath
6
- } from "./cli-s1w5phms.js";
6
+ } from "./cli-d4cdczhe.js";
7
7
  import"./cli-xq45etg1.js";
8
8
  import"./cli-97fnztpy.js";
9
9
  import"./cli-cesds766.js";
@@ -11,11 +11,11 @@ import {
11
11
  inspectCodeSelectors,
12
12
  inspectPythonSelectors
13
13
  } from "./cli-qpq84eee.js";
14
- import"./cli-5fhqfx04.js";
14
+ import"./cli-8pcq2et6.js";
15
15
  import"./cli-e0kbye4s.js";
16
- import"./cli-9a0a3v13.js";
17
- import"./cli-0xc5htv7.js";
18
- import"./cli-t0pb7qbs.js";
16
+ import"./cli-tztzrh6b.js";
17
+ import"./cli-dmm9jm9m.js";
18
+ import"./cli-e24fjyrb.js";
19
19
  import"./cli-k4tqwah4.js";
20
20
  import"./cli-9kfxkxmk.js";
21
21
  import"./cli-ns5fcnkz.js";
@@ -23,15 +23,15 @@ import {
23
23
  runPromptAb,
24
24
  selectProblemCases,
25
25
  waitLabel
26
- } from "./cli-fpd1pfvt.js";
27
- import"./cli-k5drmy8r.js";
28
- import"./cli-daqkdnm1.js";
26
+ } from "./cli-8pksf2x7.js";
27
+ import"./cli-wwbr5caw.js";
28
+ import"./cli-4pc0a18x.js";
29
29
  import"./cli-mm48br00.js";
30
- import"./cli-5fhqfx04.js";
30
+ import"./cli-8pcq2et6.js";
31
31
  import"./cli-e0kbye4s.js";
32
- import"./cli-9a0a3v13.js";
33
- import"./cli-0xc5htv7.js";
34
- import"./cli-t0pb7qbs.js";
32
+ import"./cli-tztzrh6b.js";
33
+ import"./cli-dmm9jm9m.js";
34
+ import"./cli-e24fjyrb.js";
35
35
  import"./cli-k4tqwah4.js";
36
36
  import"./cli-9kfxkxmk.js";
37
37
  import"./cli-ns5fcnkz.js";
@@ -7,21 +7,21 @@ import {
7
7
  formatVerdict,
8
8
  rerunWithYes,
9
9
  resolvePromptArmSpec
10
- } from "./cli-fpd1pfvt.js";
11
- import"./cli-k5drmy8r.js";
12
- import"./cli-daqkdnm1.js";
10
+ } from "./cli-8pksf2x7.js";
11
+ import"./cli-wwbr5caw.js";
12
+ import"./cli-4pc0a18x.js";
13
13
  import"./cli-mm48br00.js";
14
- import"./cli-5fhqfx04.js";
14
+ import"./cli-8pcq2et6.js";
15
15
  import"./cli-e0kbye4s.js";
16
- import"./cli-9a0a3v13.js";
16
+ import"./cli-tztzrh6b.js";
17
17
  import {
18
18
  callControlAPI
19
- } from "./cli-0xc5htv7.js";
19
+ } from "./cli-dmm9jm9m.js";
20
20
  import {
21
21
  resolveApiTenantId,
22
22
  shellArg,
23
23
  validateConfig
24
- } from "./cli-t0pb7qbs.js";
24
+ } from "./cli-e24fjyrb.js";
25
25
  import {
26
26
  CliInputError
27
27
  } from "./cli-k4tqwah4.js";
@@ -11,15 +11,15 @@ import {
11
11
  runPromptSync,
12
12
  runPromptsCommand,
13
13
  writePromptSyncProgress
14
- } from "./cli-k5drmy8r.js";
14
+ } from "./cli-wwbr5caw.js";
15
15
  import {
16
16
  promptSourceHashPayload
17
17
  } from "./cli-mm48br00.js";
18
- import"./cli-5fhqfx04.js";
18
+ import"./cli-8pcq2et6.js";
19
19
  import"./cli-e0kbye4s.js";
20
- import"./cli-9a0a3v13.js";
21
- import"./cli-0xc5htv7.js";
22
- import"./cli-t0pb7qbs.js";
20
+ import"./cli-tztzrh6b.js";
21
+ import"./cli-dmm9jm9m.js";
22
+ import"./cli-e24fjyrb.js";
23
23
  import"./cli-k4tqwah4.js";
24
24
  import"./cli-9kfxkxmk.js";
25
25
  import"./cli-ns5fcnkz.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  selectTenantAndCreateKey
3
- } from "./cli-1z1sx8dg.js";
4
- import"./cli-77ekrx7d.js";
3
+ } from "./cli-5aa48ry5.js";
4
+ import"./cli-xcpwp0gb.js";
5
5
  import {
6
6
  loadAuthSession
7
- } from "./cli-pmzh2qjy.js";
7
+ } from "./cli-sejqvvhv.js";
8
8
  import {
9
9
  stringOption
10
- } from "./cli-5fhqfx04.js";
10
+ } from "./cli-8pcq2et6.js";
11
11
  import"./cli-e0kbye4s.js";
12
12
  import {
13
13
  resolveIngestUrl,
14
14
  resolveModaBaseUrl
15
- } from "./cli-t0pb7qbs.js";
15
+ } from "./cli-e24fjyrb.js";
16
16
  import {
17
17
  CliAuthError
18
18
  } from "./cli-k4tqwah4.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  assertFlags
3
- } from "./cli-9a0a3v13.js";
3
+ } from "./cli-tztzrh6b.js";
4
4
  import {
5
5
  callControlAPI
6
- } from "./cli-0xc5htv7.js";
6
+ } from "./cli-dmm9jm9m.js";
7
7
  import {
8
8
  explicitOutputMode,
9
9
  resolveApiKey
10
- } from "./cli-t0pb7qbs.js";
10
+ } from "./cli-e24fjyrb.js";
11
11
  import {
12
12
  CliInputError
13
13
  } from "./cli-k4tqwah4.js";
@@ -3,15 +3,15 @@ import {
3
3
  pullSkills,
4
4
  runSkillSync,
5
5
  runSkillsCommand
6
- } from "./cli-stfpr2ct.js";
6
+ } from "./cli-xx0pjzkh.js";
7
7
  import"./cli-qm5b1vck.js";
8
8
  import"./cli-rjav0vj1.js";
9
9
  import"./cli-hcwdz9sd.js";
10
- import"./cli-5fhqfx04.js";
10
+ import"./cli-8pcq2et6.js";
11
11
  import"./cli-e0kbye4s.js";
12
- import"./cli-9a0a3v13.js";
13
- import"./cli-0xc5htv7.js";
14
- import"./cli-t0pb7qbs.js";
12
+ import"./cli-tztzrh6b.js";
13
+ import"./cli-dmm9jm9m.js";
14
+ import"./cli-e24fjyrb.js";
15
15
  import"./cli-k4tqwah4.js";
16
16
  import"./cli-ns5fcnkz.js";
17
17
  import"./cli-0v6na3yp.js";
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  runSkillsCommand
3
- } from "./cli-stfpr2ct.js";
3
+ } from "./cli-xx0pjzkh.js";
4
4
  import"./cli-qm5b1vck.js";
5
5
  import"./cli-rjav0vj1.js";
6
6
  import"./cli-hcwdz9sd.js";
7
7
  import {
8
8
  runPromptsCommand
9
- } from "./cli-k5drmy8r.js";
9
+ } from "./cli-wwbr5caw.js";
10
10
  import"./cli-mm48br00.js";
11
11
  import {
12
12
  runHarnessCommand
13
- } from "./cli-s1w5phms.js";
13
+ } from "./cli-d4cdczhe.js";
14
14
  import"./cli-xq45etg1.js";
15
15
  import"./cli-97fnztpy.js";
16
16
  import"./cli-cesds766.js";
17
17
  import"./cli-qpq84eee.js";
18
- import"./cli-5fhqfx04.js";
18
+ import"./cli-8pcq2et6.js";
19
19
  import"./cli-e0kbye4s.js";
20
- import"./cli-9a0a3v13.js";
21
- import"./cli-0xc5htv7.js";
22
- import"./cli-t0pb7qbs.js";
20
+ import"./cli-tztzrh6b.js";
21
+ import"./cli-dmm9jm9m.js";
22
+ import"./cli-e24fjyrb.js";
23
23
  import {
24
24
  CliInputError
25
25
  } from "./cli-k4tqwah4.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda-ai/cli",
3
- "version": "1.55.43",
3
+ "version": "1.55.45",
4
4
  "description": "CLI for Moda: production monitoring and evals for AI agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": "moda.skill_index.v1",
3
- "bundled_at": "2026-10-18T02:56:13.211Z",
4
- "cli_version": "1.55.43",
3
+ "bundled_at": "2026-10-20T02:21:32.859Z",
4
+ "cli_version": "1.55.45",
5
5
  "skills": [
6
6
  {
7
7
  "id": "integration-cloudflare-think",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: moda-cli
3
- version: 3.0.9
3
+ version: 3.0.10
4
4
  description: Investigate a production AI agent with the Moda CLI (`moda`) - find where something happened in real traces (traces search, then traces get), check agent health, rank what to fix (investigate, problems), and dig into tool failures, user frustration, and hallucinations. Also prompt registry sync/promote, replays, custom signals, and false-positive marking. Use when the user mentions Moda, production traces or conversations of their agent, agent failures, or asks what to fix.
5
5
  ---
6
6
 
@@ -20,8 +20,9 @@ in `references/`; read one only when the task needs it.
20
20
  only with an API key, so ready means `apiKeyCredential.verified` is `true`; a
21
21
  browser session from `moda auth login` alone is not enough. With no key, or
22
22
  a rejected one, ask the user to `export MODA_API_KEY=moda_sk_...` (or run
23
- `moda auth login --api-key`). Do not run `moda init` unprompted; it is an
24
- interactive wizard that writes to the repo.
23
+ `moda auth login --api-key`). `online.baseUrl` is where requests go and
24
+ `online.dataApi.tenantId` the tenant the key acts on. Do not run `moda init`
25
+ unprompted; it is an interactive wizard that writes to the repo.
25
26
  - Not installed: `npx -y -p @moda-ai/cli moda <command>`.
26
27
  - If a response carries `meta.update`, the installed CLI is out of date and
27
28
  may not match this guide; tell the user how to update
@@ -85,7 +85,7 @@ printf %s "$KEY" | moda auth login --api-key-stdin # key never touches argv
85
85
  moda auth login --api-key=<key> # inline; WARNS, key is visible in argv + shell history
86
86
  moda auth logout # revoke the session server-side, then delete it locally
87
87
  moda auth status # both credentials; exit 0 if either is usable, else 4
88
- moda auth status --online # additionally probe GET /api/cli/context
88
+ moda auth status --online # also probe /api/v1/data/whoami (+ /api/cli/context with a session)
89
89
  moda auth whoami # identity from the session, or from the API key
90
90
  moda auth token # print the raw bearer token + newline, nothing else
91
91
  curl -H "Authorization: Bearer $(moda auth token)" https://moda.dev/api/cli/context
@@ -156,12 +156,21 @@ two independent credentials and `auth` reports both:
156
156
  a rejected key gets `verified: false`, stops counting toward `authenticated`,
157
157
  and exits `4`; an unreachable API leaves it counting, so a blip never kills a
158
158
  good credential. With `--online` the payload adds
159
- `{ "online": { "reachable": <bool>, "ok": <bool>, "tenantCount": <n> } }`:
160
- `reachable: true` means any HTTP response arrived (even a 401/500), `ok`
161
- reflects HTTP success, and `tenantCount` is present only when the response
162
- was ok and carried a tenants array. A network failure or probe timeout
163
- (5 s) yields `reachable: false`; the exit code always follows local session
164
- validity only, never the probe.
159
+ `{ "online": { "baseUrl": <url>, "reachable": <bool>, "ok": <bool>,
160
+ "tenantCount"?: <n>, "session"?: {...}, "dataApi": { "reachable", "status",
161
+ "ok", "tenantId", "tenantName", "keyKind", "scope", "error"? } } }`.
162
+ `baseUrl` is where every request goes. `dataApi` probes
163
+ `GET /api/v1/data/whoami`, which the frontend proxy and the backend both
164
+ serve, so it confirms a base URL pointed straight at the backend and names
165
+ the key's tenant; without a key it is an unauthenticated reachability check
166
+ (a live Data API answers 401). `session` (only with a browser session)
167
+ probes `GET /api/cli/context`, a frontend-only route: a 404 there with a
168
+ reachable `dataApi` means the URL is the backend, and a warning says so.
169
+ `reachable: true` means any HTTP response arrived (even a 401/500); `ok`
170
+ means every credential present was accepted. A network failure or probe
171
+ timeout (5 s) yields `reachable: false`. A 403 for an unknown or
172
+ inaccessible tenant (`MODA_TENANT_ID`) keeps the key counted and adds a
173
+ warning with the tenant fix.
165
174
  - `moda auth token` writes exactly the bare token plus a trailing newline to
166
175
  stdout in **every** output mode — including piped/json/agent, because
167
176
  command substitution is a pipe — so `$(moda auth token)` composes safely
@@ -42,7 +42,7 @@ Branch on the exit code; it is stable and cheaper than parsing the payload:
42
42
  | `1` | error — bad input, unknown id (`not_found`), access denied, API/network failure | Read `errors[0].code`; retry only `network_error` / 5xx `api_error`. For `not_found`, find a valid id first (the `cause` names the command). |
43
43
  | `3` | degraded — Moda Cloud was unavailable and the answer was synthesized from local Data API evidence (`ask`), or some sources failed to load (`investigate`/`failures`, named in `data.failedSources`) | Answer is present but lower-trust or partial; verify before acting, and never read a partial result as "no issues". |
44
44
  | `4` | auth required — no API key, or the API rejected it (HTTP 401) | Set `MODA_API_KEY` or run the `login_command` from the `auth` payload (`moda auth login --api-key`), then re-run. |
45
- | `5` | input required — a choice is needed that the non-interactive run could not answer | Pick a choice from the `input_request` payload and re-invoke the same command with that choice's `resume_flags` appended. |
45
+ | `5` | input required — a choice is needed that the non-interactive run could not answer (for example a tenant, or `--profile=local` for a loopback `MODA_BASE_URL` on a prod profile) | Pick a choice from the `input_request` payload and re-invoke the same command with that choice's `resume_flags` appended. |
46
46
  | `130` | cancelled | Treat as interrupted or closed pipe; do not retry blindly. |
47
47
 
48
48
  Exit codes `4` and `5` are recoverable-by-caller failures: the envelope's
@@ -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`).