@moda-ai/cli 1.55.4 → 1.55.6

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.
@@ -42,8 +42,8 @@ import {
42
42
  writeHarnessAnalyzeResult,
43
43
  writeHarnessArtifacts,
44
44
  writeHumanProgress
45
- } from "./cli-9v0c1xe1.js";
46
- import"./cli-zp7a97sp.js";
45
+ } from "./cli-gxmq4wmn.js";
46
+ import"./cli-mx9r1689.js";
47
47
  import"./cli-0v6na3yp.js";
48
48
  export {
49
49
  writeHumanProgress,
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  buildSourceSnapshot
3
- } from "./cli-9v0c1xe1.js";
4
- import"./cli-zp7a97sp.js";
3
+ } from "./cli-gxmq4wmn.js";
4
+ import {
5
+ recordApiRequest
6
+ } from "./cli-mx9r1689.js";
5
7
  import"./cli-0v6na3yp.js";
6
8
 
7
9
  // src/harness-github-actions.ts
@@ -34,6 +36,7 @@ async function runGithubActionsAnalyze(rootDir, deps = {}) {
34
36
  const base = (env.MODA_GITHUB_URL || DEFAULT_MODA_GITHUB_URL).replace(/\/+$/, "");
35
37
  const audience = env.MODA_GHA_AUDIENCE || DEFAULT_GHA_AUDIENCE;
36
38
  const oidcToken = await requestOidcToken(env, audience, fetchImpl);
39
+ recordApiRequest();
37
40
  const exchangeRes = await fetchImpl(`${base}/gha/exchange`, {
38
41
  method: "POST",
39
42
  headers: { "Content-Type": "application/json" },
@@ -45,6 +48,7 @@ async function runGithubActionsAnalyze(rootDir, deps = {}) {
45
48
  const exchange = await exchangeRes.json();
46
49
  const authHeader = { Authorization: `Bearer ${exchange.token}`, "Content-Type": "application/json" };
47
50
  const snapshot = buildSnapshot(rootDir);
51
+ recordApiRequest();
48
52
  const analyzeRes = await fetchImpl(`${base}/gha/analyze`, {
49
53
  method: "POST",
50
54
  headers: authHeader,
@@ -60,6 +64,7 @@ async function runGithubActionsAnalyze(rootDir, deps = {}) {
60
64
  let report;
61
65
  let validation;
62
66
  for (let attempt = 0;attempt < maxAttempts; attempt += 1) {
67
+ recordApiRequest();
63
68
  const pollRes = await fetchImpl(`${base}/gha/analyze/${encodeURIComponent(analysisRunId)}`, { headers: { Authorization: authHeader.Authorization } });
64
69
  if (!pollRes.ok)
65
70
  throw new GithubActionsAnalyzeError(`Hosted analysis poll failed (${pollRes.status}).`);
@@ -77,6 +82,7 @@ async function runGithubActionsAnalyze(rootDir, deps = {}) {
77
82
  }
78
83
  let synced = false;
79
84
  if (status === "completed" && validationPassed && exchange.capabilities.includes("sync") && report) {
85
+ recordApiRequest();
80
86
  const syncRes = await fetchImpl(`${base}/gha/sync`, {
81
87
  method: "POST",
82
88
  headers: authHeader,
@@ -3,7 +3,7 @@ import {
3
3
  initPrompts,
4
4
  runPromptSync,
5
5
  runSkillSync
6
- } from "./cli-73v8mqh1.js";
6
+ } from "./cli-grn40kvh.js";
7
7
  import"./cli-mm48br00.js";
8
8
  import {
9
9
  codingAgentDisplayName,
@@ -23,7 +23,7 @@ import {
23
23
  runHarnessCommand,
24
24
  startRemoteAnalyze,
25
25
  stripAnsi
26
- } from "./cli-9v0c1xe1.js";
26
+ } from "./cli-gxmq4wmn.js";
27
27
  import {
28
28
  bundledSkillsDir,
29
29
  installIntegrationSkill,
@@ -35,22 +35,23 @@ import {
35
35
  } from "./cli-ssfq84k5.js";
36
36
  import {
37
37
  selectTenantAndCreateKey
38
- } from "./cli-9kyw5qx0.js";
38
+ } from "./cli-fhfdnvh4.js";
39
39
  import {
40
40
  ConnectCodeError,
41
41
  connectWithCode,
42
42
  loadAuthSession,
43
43
  loadToken,
44
44
  login
45
- } from "./cli-t5v7mhvj.js";
45
+ } from "./cli-tw8jj190.js";
46
46
  import {
47
47
  CliAuthError,
48
48
  CliInputError,
49
49
  VERSION,
50
50
  createCommandContext,
51
+ recordApiRequest,
51
52
  resolveIngestUrl,
52
53
  resolveModaBaseUrl
53
- } from "./cli-zp7a97sp.js";
54
+ } from "./cli-mx9r1689.js";
54
55
  import"./cli-0v6na3yp.js";
55
56
 
56
57
  // src/init/index.ts
@@ -639,6 +640,7 @@ function completeAI7Projection(value) {
639
640
  }
640
641
  async function fetchAuditWithApiKey(id, apiKey, baseUrl) {
641
642
  const url = `${baseUrl}/api/v1/data/audit/${encodeURIComponent(id)}?kind=conversation&include_bodies=1`;
643
+ recordApiRequest();
642
644
  const response = await fetch(url, {
643
645
  method: "GET",
644
646
  headers: { "x-api-key": apiKey },
@@ -650,6 +652,7 @@ async function fetchAuditWithApiKey(id, apiKey, baseUrl) {
650
652
  }
651
653
  const audit = JSON.parse(body);
652
654
  if (isAI7Audit(audit) && isRecord2(audit)) {
655
+ recordApiRequest();
653
656
  const contextResponse = await fetch(`${baseUrl}/api/v1/data/conversations/${encodeURIComponent(id)}/context?window=20`, {
654
657
  headers: { "x-api-key": apiKey },
655
658
  signal: AbortSignal.timeout(1e4)
@@ -2016,20 +2019,26 @@ Harness analysis keeps running on Moda. Resume anytime with \`${HARNESS_PULL_REC
2016
2019
  laneBoard?.complete("agent-skills", "no coding agents detected");
2017
2020
  }
2018
2021
  await initPrompts({ silent: true });
2022
+ let promptSyncOutcome;
2023
+ let skillSyncOutcome;
2019
2024
  laneBoard?.startLane("prompts", "Prompts", { detail: "Created or verified .moda/prompts.yml" });
2020
2025
  try {
2021
2026
  const promptSync = await runPromptSync({}, { profile });
2027
+ promptSyncOutcome = { status: "ok", synced: promptSync.synced.map((prompt) => prompt.key) };
2022
2028
  laneBoard?.complete("prompts", promptSync.synced.length > 0 ? `${promptSync.synced.length} prompt(s) synced` : "manifest ready (no prompt files to sync yet)");
2023
2029
  } catch (err) {
2024
2030
  const message = err instanceof Error ? err.message : String(err);
2031
+ promptSyncOutcome = { status: "failed", synced: [], error: message };
2025
2032
  laneBoard?.warn("prompts", `sync skipped: ${message}`);
2026
2033
  }
2027
2034
  laneBoard?.startLane("skills", "Skills");
2028
2035
  try {
2029
2036
  const skillSync = await runSkillSync({}, { profile });
2037
+ skillSyncOutcome = { status: "ok", synced: skillSync.synced.map((skill) => skill.key) };
2030
2038
  laneBoard?.complete("skills", skillSync.synced.length > 0 ? `${skillSync.synced.length} skill(s) synced` : "no local skills to sync yet");
2031
2039
  } catch (err) {
2032
2040
  const message = err instanceof Error ? err.message : String(err);
2041
+ skillSyncOutcome = { status: "failed", synced: [], error: message };
2033
2042
  laneBoard?.warn("skills", `sync skipped: ${message}`);
2034
2043
  }
2035
2044
  if (setupPlan.find((action) => action.category === "ci-cd")?.approved === true) {
@@ -2178,7 +2187,15 @@ Harness analysis keeps running on Moda. Resume anytime with \`${HARNESS_PULL_REC
2178
2187
  skipped: setupPlan.filter((item) => item.status === "skipped" || item.status === "manual"),
2179
2188
  telemetrySeen
2180
2189
  }));
2181
- return { apiKey, tenantName, phases, setupPlan, ...sdkIntegration ? { sdk_integration: sdkIntegration } : {} };
2190
+ return {
2191
+ apiKey,
2192
+ tenantName,
2193
+ phases,
2194
+ setupPlan,
2195
+ promptSync: promptSyncOutcome,
2196
+ skillSync: skillSyncOutcome,
2197
+ ...sdkIntegration ? { sdk_integration: sdkIntegration } : {}
2198
+ };
2182
2199
  }
2183
2200
  function buildSetupPlan(options) {
2184
2201
  return [
@@ -5,8 +5,8 @@ import {
5
5
  inspectCodeSelectors,
6
6
  inspectPythonSelectors,
7
7
  safePromptEvidencePath
8
- } from "./cli-9v0c1xe1.js";
9
- import"./cli-zp7a97sp.js";
8
+ } from "./cli-gxmq4wmn.js";
9
+ import"./cli-mx9r1689.js";
10
10
  import {
11
11
  __commonJS,
12
12
  __toESM
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  selectTenantAndCreateKey
3
- } from "./cli-9kyw5qx0.js";
3
+ } from "./cli-fhfdnvh4.js";
4
4
  import {
5
5
  loadAuthSession
6
- } from "./cli-t5v7mhvj.js";
6
+ } from "./cli-tw8jj190.js";
7
7
  import {
8
8
  CliAuthError,
9
9
  resolveIngestUrl,
10
10
  resolveModaBaseUrl,
11
11
  stringOption
12
- } from "./cli-zp7a97sp.js";
12
+ } from "./cli-mx9r1689.js";
13
13
  import"./cli-0v6na3yp.js";
14
14
 
15
15
  // src/provision.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda-ai/cli",
3
- "version": "1.55.4",
3
+ "version": "1.55.6",
4
4
  "description": "CLI for Moda - AI agent analytics and observability",
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-14T00:26:25.137Z",
4
- "cli_version": "1.55.4",
3
+ "bundled_at": "2026-10-14T10:49:23.091Z",
4
+ "cli_version": "1.55.6",
5
5
  "skills": [
6
6
  {
7
7
  "id": "integration-cloudflare-think",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: moda-cli
3
- version: 2.8.0
3
+ version: 2.9.0
4
4
  description: Query Moda's AI agent trace analytics and manage code-first prompt versions from the terminal — semantic/keyword/hybrid message search, overview KPIs, topic clusters, message context, user frustration detections, tool failures, custom signals, false-positive review of detections, and moda prompts status/sync/promote. Use when the user asks about moda, modaflows, trace or conversation analytics, prompt management, user frustrations, agent observability, tool failure debugging, custom signals, marking a detection as a false positive, wants to find traces or tool calls about a topic, or wants to investigate how their AI agent is performing.
5
5
  ---
6
6
 
@@ -1362,17 +1362,17 @@ npx: `npx -p @moda-ai/cli moda <command>`.
1362
1362
  | `moda clusters` | Browse topic cluster hierarchy; `--search="q"` finds clusters by meaning, `--node-id=ID` resolves a deep link |
1363
1363
  | `moda cluster-traces <node_id>` | Traces in a cluster (legacy alias: `moda cluster-conversations`) |
1364
1364
  | `moda traces` | List/filter traces by structured fields (legacy alias: `moda conversations`) |
1365
- | `moda context <conversation_id>` | Windowed message context (max 5 per side) |
1365
+ | `moda context <conversation_id>` | Windowed message context (max 5 per side); `--msg-index=N` (alias `--message-index`) anchors the window |
1366
1366
  | `moda frustrations` | User frustration detections with evidence (the frustration family of `emotions`, legacy field names) |
1367
1367
  | `moda emotions` | Multi-family emotion detections: frustration, disapproval, sadness, confusion, anxiety, trust, positive (`--family=F`, `--user-id`, `--conversation-id`, limit 1–20) |
1368
1368
  | `moda hallucinations` | Grounding detections: contradicted/verified outputs, rule breakdown (`--kind=contradicted\|verified`, `--conversation-id=ID`) |
1369
1369
  | `moda tool-failures` | Tool failure overview |
1370
1370
  | `moda tool-failure-detail <tool_name>` | Per-tool failure breakdown + examples |
1371
- | `moda problems` | Rank cross-signal Problems by root cause (what to fix first) |
1371
+ | `moda problems` | Rank cross-signal Problems by root cause (what to fix first); takes only `--days-back`/`--limit`. Filter by family with `moda problems remainder --family=F` or `moda problem <problem_id> --traces --family=F` |
1372
1372
  | `moda problem <problem_id>` | One Problem: dossier, or `--evidence`/`--reports`/`--traces`/`--feedback` pages (`--conversations` is a legacy alias of `--traces`) (`--limit` 1–50, `--cursor` verbatim keyset token) |
1373
1373
  | `moda problem-feedback <problem_id>` | Write: `--action=mark_fixed\|dismiss\|flag_attribution\|rename`. `--reason` required for flag_attribution, optional for dismiss; `--new-name` for rename; `--attribution-id` (UUID) required for flag_attribution |
1374
1374
  | `moda false-positive <kind> <target>` | Write: kinds `problem\|problem-detection\|quote\|tool\|laziness\|hallucination\|custom-signal`; `--reason` optional; problem-detection needs `--conversation-id` + `--attribution-id`; quote needs `--family`, `--turn`, `--quote`; tool needs `--tool` plus `--tool-use-id` or `--msg-index`; custom-signal needs `--conversation-id`; `--undo` removes a mark (not for problem) |
1375
- | `moda false-positives [conversation_id]` | Current false-positive marks: all (`--kind`, `--all` to include removed, `--limit`) or one trace with its problem detection reviews |
1375
+ | `moda false-positives [conversation_id]` | Current false-positive marks: all (`--kind=quote\|tool\|laziness\|hallucination\|custom-signal`, `--all` to include removed, `--limit`) or one trace with its problem detection reviews. Problem dismissals are read with `moda problem <problem_id> --feedback`, detection reviews with `moda detection-reviews <conversation_id>` |
1376
1376
  | `moda laziness` | Laziness detections per trace (`--days-back`, `--limit` 1-50, `--conversation-id`, `--family`) |
1377
1377
  | `moda problem-linear <problem_id>` | The Problem's linked Linear issue (key, state, URL) or `link: null`; needs Linear connected (Integrations → Linear) |
1378
1378
  | `moda problem-linear-file <problem_id>` | Write: file the Problem as a Linear issue (`--team-id`, `--title`, `--priority=0-4`), or link an existing one with `--issue=ENG-123\|URL` (exclusive with the others). Idempotent per Problem |
@@ -1391,7 +1391,7 @@ npx: `npx -p @moda-ai/cli moda <command>`.
1391
1391
  | `moda prompts sync` | Upload changed prompt versions and update lockfile |
1392
1392
  | `moda prompts promote <key>` | Move a remote prompt label |
1393
1393
  | `moda registry template\|validate\|push\|status\|coverage\|log\|show\|prompt` | Register prompts, skills, tools, and agent wiring from one agent-written manifest (`--file`, `--dry-run`, `--live`, `--message`, `--days`); every push is a commit in the Registry history; no repo scan |
1394
- | `moda users` / `moda user <id>` | End users with health/activity; one user's profile |
1394
+ | `moda users` / `moda user <id>` | End users with health/activity (`--page-size=N`, alias `--limit=N`; `--page=N`); one user's profile |
1395
1395
  | `moda problem-reopen <pid>` | Reopen a Problem marked fixed |
1396
1396
  | `moda signals <create\|update\|activate\|pause\|delete\|examples\|refine\|revise\|proposals\|accept\|reject\|search\|preview>` | Manage custom signals (writes take `--dry-run`; LLM-backed ones are rate-limited per key) |
1397
1397
  | `moda prompts list\|show\|proposals\|usage\|replay-runs\|decide` | Read the prompt registry; merge/reject proposals |
@@ -1401,8 +1401,13 @@ npx: `npx -p @moda-ai/cli moda <command>`.
1401
1401
  `moda search` flags: `--mode=keyword|semantic|hybrid` (default `hybrid`),
1402
1402
  `--user-id`, `--time-range=<range>`, `--limit=N` (1–100, default 20).
1403
1403
 
1404
- Common flags across most commands: `--days-back=N` (1–90), `--limit=N`,
1405
- `--offset=N`, `--time-range=<range>`.
1404
+ There is no flag set common to every command: each command rejects a flag it
1405
+ does not take, and the error lists the flags it does. For the time window see
1406
+ [Time-window flags by command](#time-window-flags-by-command) (`--days-back`
1407
+ on most detection commands, `--time-range` on `traces`/`search`/`clusters`,
1408
+ `--window` on `users`/`user`); `--limit`/`--offset` exist only on paged list
1409
+ commands (`moda <command> --help` shows them). Boolean flags take `true`/`false`
1410
+ and also `1`/`0`, `yes`/`no`, `on`/`off`.
1406
1411
  `frustrations` and `tool-failure-detail` additionally accept
1407
1412
  `--include-window` (attach a `window` slice per row) and `--window=N` (1–5,
1408
1413
  default `1`; half-width, so `--window=1` ⇒ 3 messages).