@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.
- package/README.md +7 -0
- package/dist/{cli-9kyw5qx0.js → cli-fhfdnvh4.js} +4 -2
- package/dist/{cli-73v8mqh1.js → cli-grn40kvh.js} +41 -31
- package/dist/{cli-9v0c1xe1.js → cli-gxmq4wmn.js} +36 -19
- package/dist/{cli-zp7a97sp.js → cli-mx9r1689.js} +30 -2
- package/dist/{cli-t5v7mhvj.js → cli-tw8jj190.js} +6 -1
- package/dist/cli.js +255 -72
- package/dist/{harness-x6kaz47j.js → harness-7eabmv0v.js} +2 -2
- package/dist/{harness-github-actions-5syjp1sz.js → harness-github-actions-s10y3kpz.js} +8 -2
- package/dist/{index-8vvznb36.js → index-6wxkhbk5.js} +23 -6
- package/dist/prompt-source-mcp.js +2 -2
- package/dist/{provision-2z73642d.js → provision-parsn3xg.js} +3 -3
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +12 -7
|
@@ -42,8 +42,8 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
46
|
-
import"./cli-
|
|
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-
|
|
4
|
-
import
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 {
|
|
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 [
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-fhfdnvh4.js";
|
|
4
4
|
import {
|
|
5
5
|
loadAuthSession
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-tw8jj190.js";
|
|
7
7
|
import {
|
|
8
8
|
CliAuthError,
|
|
9
9
|
resolveIngestUrl,
|
|
10
10
|
resolveModaBaseUrl,
|
|
11
11
|
stringOption
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-mx9r1689.js";
|
|
13
13
|
import"./cli-0v6na3yp.js";
|
|
14
14
|
|
|
15
15
|
// src/provision.ts
|
package/package.json
CHANGED
package/skills/moda-cli/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moda-cli
|
|
3
|
-
version: 2.
|
|
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
|
-
|
|
1405
|
-
|
|
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).
|