@moda-ai/cli 1.55.22 → 1.55.24
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/{agent-mj622k8s.js → agent-b4tdzy9q.js} +8 -9
- package/dist/{cli-9x9adrtj.js → cli-0wr3483h.js} +1 -1
- package/dist/{cli-a5c9te95.js → cli-7xc585hc.js} +5 -5
- package/dist/{cli-rqk6f6n6.js → cli-9btx12wp.js} +24 -5
- package/dist/cli-9hc5bg2r.js +61 -0
- package/dist/{cli-cehskjde.js → cli-dn91fb56.js} +13 -15
- package/dist/{cli-5ke3xe6y.js → cli-dve50x7p.js} +258 -28
- package/dist/{cli-569hj0bj.js → cli-qvg26twp.js} +5 -4
- package/dist/{cli-033n2mpb.js → cli-qycsmxev.js} +6 -9
- package/dist/{cli-0ef72tqx.js → cli-rt26sbz7.js} +14 -14
- package/dist/{cli-pc5cw7mx.js → cli-vg88mg20.js} +5 -5
- package/dist/{cli-wf7gfa1e.js → cli-y2ty9vtv.js} +8 -10
- package/dist/cli.js +1310 -346
- package/dist/{doctor-mx6jf435.js → doctor-3r19ry92.js} +8 -9
- package/dist/{fix-9fmy6p2x.js → fix-exvxzvtz.js} +6 -7
- package/dist/{harness-github-actions-c826bfxs.js → harness-github-actions-atc5bbkj.js} +5 -6
- package/dist/{harness-xvg6ws6x.js → harness-vzy7n7ea.js} +5 -6
- package/dist/{index-1wbjz3jc.js → index-e1pf1qz2.js} +17 -17
- package/dist/{production-intelligence-dbe9dmc5.js → production-intelligence-c8e0xw3n.js} +17 -16
- package/dist/{profile-commands-kmmd9y86.js → profile-commands-6e2dgv72.js} +7 -48
- package/dist/prompt-source-mcp.js +5 -6
- package/dist/{prompts-1tkhrxkq.js → prompts-cvzt994j.js} +6 -7
- package/dist/{provision-wzttap58.js → provision-q86phh4a.js} +5 -4
- package/dist/{registry-atqyb5fa.js → registry-s2vdsfw8.js} +3 -4
- package/dist/{skills-gejdvjak.js → skills-tadh1jss.js} +5 -6
- package/dist/{sync-57ercmh9.js → sync-g8wtecz1.js} +7 -8
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +31 -29
- package/skills/moda-cli/references/commands.md +22 -22
- package/skills/moda-cli/references/dashboard-parity.md +4 -4
- package/skills/moda-cli/references/detections.md +10 -10
- package/skills/moda-cli/references/feedback.md +2 -2
- package/skills/moda-cli/references/output-protocol.md +2 -2
- package/skills/moda-cli/references/production-intelligence.md +10 -10
- package/skills/moda-cli/references/recipes.md +14 -14
- package/skills/moda-cli/references/search-and-traces.md +32 -32
- package/skills/moda-cli/references/signals-and-false-positives.md +29 -29
- package/skills/moda-cli/references/troubleshooting.md +4 -4
- package/dist/cli-7ea02wca.js +0 -30
|
@@ -3,17 +3,16 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
} from "./cli-vg88mg20.js";
|
|
7
|
+
import"./cli-0wr3483h.js";
|
|
8
|
+
import"./cli-y2ty9vtv.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-7xc585hc.js";
|
|
11
11
|
import"./cli-97fnztpy.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-5ke3xe6y.js";
|
|
12
|
+
import"./cli-qvg26twp.js";
|
|
13
|
+
import"./cli-dn91fb56.js";
|
|
14
|
+
import"./cli-9btx12wp.js";
|
|
15
|
+
import"./cli-dve50x7p.js";
|
|
17
16
|
import"./cli-0v6na3yp.js";
|
|
18
17
|
export {
|
|
19
18
|
runStatusCommand,
|
|
@@ -2,18 +2,17 @@ import {
|
|
|
2
2
|
DEFAULT_POLL_INTERVAL_MS,
|
|
3
3
|
DEFAULT_WAIT_TIMEOUT_MS,
|
|
4
4
|
fetchLatestRun
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-y2ty9vtv.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-7xc585hc.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-qvg26twp.js";
|
|
10
10
|
import {
|
|
11
11
|
assertFlags
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-dn91fb56.js";
|
|
13
13
|
import {
|
|
14
14
|
callControlAPI
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-7ea02wca.js";
|
|
15
|
+
} from "./cli-9btx12wp.js";
|
|
17
16
|
import {
|
|
18
17
|
CliInputError,
|
|
19
18
|
EXIT_DEGRADED,
|
|
@@ -22,7 +21,7 @@ import {
|
|
|
22
21
|
getModaPaths,
|
|
23
22
|
resolveApiTenantId,
|
|
24
23
|
validateConfig
|
|
25
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-dve50x7p.js";
|
|
26
25
|
import"./cli-0v6na3yp.js";
|
|
27
26
|
|
|
28
27
|
// src/fix.ts
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-7xc585hc.js";
|
|
4
4
|
import"./cli-97fnztpy.js";
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-7ea02wca.js";
|
|
5
|
+
import"./cli-qvg26twp.js";
|
|
6
|
+
import"./cli-dn91fb56.js";
|
|
7
|
+
import"./cli-9btx12wp.js";
|
|
9
8
|
import {
|
|
10
9
|
recordApiRequest
|
|
11
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-dve50x7p.js";
|
|
12
11
|
import"./cli-0v6na3yp.js";
|
|
13
12
|
|
|
14
13
|
// src/harness-github-actions.ts
|
|
@@ -42,13 +42,12 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-7xc585hc.js";
|
|
46
46
|
import"./cli-97fnztpy.js";
|
|
47
|
-
import"./cli-
|
|
48
|
-
import"./cli-
|
|
49
|
-
import"./cli-
|
|
50
|
-
import"./cli-
|
|
51
|
-
import"./cli-5ke3xe6y.js";
|
|
47
|
+
import"./cli-qvg26twp.js";
|
|
48
|
+
import"./cli-dn91fb56.js";
|
|
49
|
+
import"./cli-9btx12wp.js";
|
|
50
|
+
import"./cli-dve50x7p.js";
|
|
52
51
|
import"./cli-0v6na3yp.js";
|
|
53
52
|
export {
|
|
54
53
|
writeHumanProgress,
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-qycsmxev.js";
|
|
4
|
+
import"./cli-9hc5bg2r.js";
|
|
4
5
|
import {
|
|
5
6
|
buildDoctorReport
|
|
6
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-vg88mg20.js";
|
|
7
8
|
import {
|
|
8
9
|
ConnectCodeError,
|
|
9
10
|
connectWithCode,
|
|
10
11
|
loadAuthSession,
|
|
11
12
|
loadToken,
|
|
12
13
|
login
|
|
13
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-0wr3483h.js";
|
|
14
15
|
import {
|
|
15
16
|
initPrompts,
|
|
16
17
|
runPromptSync
|
|
17
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-y2ty9vtv.js";
|
|
18
19
|
import"./cli-mm48br00.js";
|
|
19
20
|
import {
|
|
20
21
|
canonicalText,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
runCodingAgent,
|
|
35
36
|
runHarnessCommand,
|
|
36
37
|
startRemoteAnalyze
|
|
37
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-7xc585hc.js";
|
|
38
39
|
import {
|
|
39
40
|
stripAnsi
|
|
40
41
|
} from "./cli-97fnztpy.js";
|
|
@@ -46,13 +47,12 @@ import {
|
|
|
46
47
|
import {
|
|
47
48
|
agentsMdProblem,
|
|
48
49
|
runSkillSync
|
|
49
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-rt26sbz7.js";
|
|
50
51
|
import {
|
|
51
52
|
createCommandContext
|
|
52
|
-
} from "./cli-
|
|
53
|
-
import"./cli-
|
|
54
|
-
import"./cli-
|
|
55
|
-
import"./cli-7ea02wca.js";
|
|
53
|
+
} from "./cli-qvg26twp.js";
|
|
54
|
+
import"./cli-dn91fb56.js";
|
|
55
|
+
import"./cli-9btx12wp.js";
|
|
56
56
|
import {
|
|
57
57
|
CliAuthError,
|
|
58
58
|
CliInputError,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
recordApiRequest,
|
|
61
61
|
resolveIngestUrl,
|
|
62
62
|
resolveModaBaseUrl
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-dve50x7p.js";
|
|
64
64
|
import {
|
|
65
65
|
detectAgents,
|
|
66
66
|
installRules,
|
|
@@ -269,7 +269,7 @@ function renderSdkIntegrationGuideContent() {
|
|
|
269
269
|
"```",
|
|
270
270
|
"",
|
|
271
271
|
"Exact-trace confirmation: send one request through your app with a known trace ID,",
|
|
272
|
-
"then run `moda
|
|
272
|
+
"then run `moda traces spans <that-id>` — you should see your llm span(s).",
|
|
273
273
|
""
|
|
274
274
|
].join(`
|
|
275
275
|
`);
|
|
@@ -2274,7 +2274,7 @@ function buildSetupPlan(options) {
|
|
|
2274
2274
|
status: "planned",
|
|
2275
2275
|
approved: true,
|
|
2276
2276
|
files: [".claude/skills", ".cursor/rules"],
|
|
2277
|
-
command: "moda skills
|
|
2277
|
+
command: "moda skills push"
|
|
2278
2278
|
},
|
|
2279
2279
|
{
|
|
2280
2280
|
category: "sdk",
|
|
@@ -2300,7 +2300,7 @@ function buildSetupPlan(options) {
|
|
|
2300
2300
|
status: options.configureAutosync ? "planned" : "manual",
|
|
2301
2301
|
approved: options.configureAutosync,
|
|
2302
2302
|
files: [".github/workflows/moda-autosync.yml"],
|
|
2303
|
-
command: "moda prompts sync && moda skills
|
|
2303
|
+
command: "moda prompts sync && moda skills push",
|
|
2304
2304
|
reason: options.configureAutosync ? undefined : "No autosync workflow is written until it is explicitly approved (--autosync)."
|
|
2305
2305
|
},
|
|
2306
2306
|
{
|
|
@@ -2359,7 +2359,7 @@ function applySdkIntegrationOutcome(setupPlan, outcome, deps) {
|
|
|
2359
2359
|
break;
|
|
2360
2360
|
}
|
|
2361
2361
|
case "telemetry_not_observed":
|
|
2362
|
-
laneBoard?.warn("sdk", `integration applied but the verification trace was not observed; check MODA_API_KEY at runtime, then moda
|
|
2362
|
+
laneBoard?.warn("sdk", `integration applied but the verification trace was not observed; check MODA_API_KEY at runtime, then moda traces spans ${verificationId}`);
|
|
2363
2363
|
markManual(setupPlan, "sdk", outcome.detail ?? "Verification trace was not observed.");
|
|
2364
2364
|
break;
|
|
2365
2365
|
case "needs_human_input": {
|
|
@@ -2376,7 +2376,7 @@ function applySdkIntegrationOutcome(setupPlan, outcome, deps) {
|
|
|
2376
2376
|
sdkAction.reason = outcome.detail ?? "Existing Moda integration verified.";
|
|
2377
2377
|
break;
|
|
2378
2378
|
}
|
|
2379
|
-
const reason = outcome.verification ? "agent reports Moda is already integrated but the verification trace was not observed; " + `check MODA_API_KEY at runtime, then \`moda
|
|
2379
|
+
const reason = outcome.verification ? "agent reports Moda is already integrated but the verification trace was not observed; " + `check MODA_API_KEY at runtime, then \`moda traces spans ${verificationId}\`` : "agent reports Moda is already integrated — not independently verified; " + "send a real request through your app with a trace ID (`conversation_id`) you choose, then run `moda traces spans` with that id";
|
|
2380
2380
|
laneBoard?.warn("sdk", reason);
|
|
2381
2381
|
markManual(setupPlan, "sdk", reason);
|
|
2382
2382
|
break;
|
|
@@ -2480,7 +2480,7 @@ function writeAutosyncWorkflow(cwd = process.cwd()) {
|
|
|
2480
2480
|
` - name: Sync prompts to Moda`,
|
|
2481
2481
|
` run: ${GENERATED_WORKFLOW_NPX} prompts sync`,
|
|
2482
2482
|
` - name: Sync skills to Moda`,
|
|
2483
|
-
` run: ${GENERATED_WORKFLOW_NPX} skills
|
|
2483
|
+
` run: ${GENERATED_WORKFLOW_NPX} skills push`,
|
|
2484
2484
|
""
|
|
2485
2485
|
].join(`
|
|
2486
2486
|
`)}`);
|
|
@@ -10,15 +10,13 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
callControlAPI,
|
|
12
12
|
callDataAPI
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import {
|
|
15
|
-
apiKeyHeaders
|
|
16
|
-
} from "./cli-7ea02wca.js";
|
|
13
|
+
} from "./cli-9btx12wp.js";
|
|
17
14
|
import {
|
|
18
15
|
CliAuthError,
|
|
19
16
|
CliInputError,
|
|
20
17
|
EXIT_DEGRADED,
|
|
21
18
|
EXIT_OK,
|
|
19
|
+
apiKeyHeaders,
|
|
22
20
|
asNumber,
|
|
23
21
|
asRecord,
|
|
24
22
|
asString,
|
|
@@ -30,7 +28,7 @@ import {
|
|
|
30
28
|
resolveModaBaseUrl,
|
|
31
29
|
safeWriteStderr,
|
|
32
30
|
shellWord
|
|
33
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-dve50x7p.js";
|
|
34
32
|
import"./cli-0v6na3yp.js";
|
|
35
33
|
|
|
36
34
|
// src/production-intelligence.ts
|
|
@@ -509,7 +507,7 @@ async function investigateProduction(options) {
|
|
|
509
507
|
const hints = loadHarnessHints(options.cwd);
|
|
510
508
|
const overviewEndpoint = `/overview?days_back=${options.daysBack}`;
|
|
511
509
|
const toolEndpoint = options.toolName ? `/tool-failures/${encodeURIComponent(options.toolName)}?days_back=${options.daysBack}&limit=5` : `/tool-failures?days_back=${options.daysBack}`;
|
|
512
|
-
const frustrationsEndpoint =
|
|
510
|
+
const frustrationsEndpoint = `${investigateFrustrationsEndpoint(options.daysBack)}${options.conversationId ? `&conversation_id=${encodeURIComponent(options.conversationId)}` : ""}`;
|
|
513
511
|
const problemsEndpoint = `/problems?days_back=${options.daysBack}&limit=${INVESTIGATION_PROBLEM_LIMIT}`;
|
|
514
512
|
const skipped = { data: null, status: "ok" };
|
|
515
513
|
const [overview, tools, frustrations, problems] = await Promise.all([
|
|
@@ -525,10 +523,10 @@ async function investigateProduction(options) {
|
|
|
525
523
|
warnings.push(result.warning);
|
|
526
524
|
}
|
|
527
525
|
if (options.toolName && tools.status === "ok" && toolRows(tools.data, options.toolName).every((row) => row.count <= 0)) {
|
|
528
|
-
warnings.push(`No failures found for tool "${options.toolName}" in the last ${options.daysBack} day(s) — the tool may have no failures in this window, or the name may not exist in this tenant. ` + "Run `moda
|
|
526
|
+
warnings.push(`No failures found for tool "${options.toolName}" in the last ${options.daysBack} day(s) — the tool may have no failures in this window, or the name may not exist in this tenant. ` + "Run `moda detections tools` to list tools with recorded failures, or widen --days-back.");
|
|
529
527
|
}
|
|
530
528
|
if (options.conversationId) {
|
|
531
|
-
warnings.push(`Scoped to trace ${options.conversationId} for frustration evidence only; overview and tool failures are tenant-wide. ` + `Open the trace itself with \`moda
|
|
529
|
+
warnings.push(`Scoped to trace ${options.conversationId} for frustration evidence only; overview and tool failures are tenant-wide. ` + `Open the trace itself with \`moda traces spans ${options.conversationId}\`.`);
|
|
532
530
|
}
|
|
533
531
|
const evidenceRefs = [];
|
|
534
532
|
const findings = [];
|
|
@@ -794,7 +792,7 @@ function findingsFromOverview(overview, daysBack, hints, evidenceRefs) {
|
|
|
794
792
|
id: "action_investigate_frustration",
|
|
795
793
|
title: "Inspect frustration anchors.",
|
|
796
794
|
rationale: "Frustration anchors show the user turn where the experience degraded.",
|
|
797
|
-
command: `moda
|
|
795
|
+
command: `moda detections list --family=frustration --days-back=${daysBack} --include-window`,
|
|
798
796
|
mutability: "read",
|
|
799
797
|
requiresApproval: false
|
|
800
798
|
}]
|
|
@@ -847,13 +845,16 @@ function toolFailureFindings(data, daysBack, hints, evidenceRefs, scopedTool) {
|
|
|
847
845
|
id: `action_tool_detail_${slug(name)}`,
|
|
848
846
|
title: `Inspect ${name} failure examples.`,
|
|
849
847
|
rationale: "Examples include trace anchors and error subtypes.",
|
|
850
|
-
command: `moda
|
|
848
|
+
command: `moda detections tools ${name} --days-back=${daysBack} --include-window`,
|
|
851
849
|
mutability: "read",
|
|
852
850
|
requiresApproval: false
|
|
853
851
|
}]
|
|
854
852
|
}];
|
|
855
853
|
});
|
|
856
854
|
}
|
|
855
|
+
function investigateFrustrationsEndpoint(daysBack) {
|
|
856
|
+
return `/emotions?family=frustration&days_back=${daysBack}&limit=1&include_context=0`;
|
|
857
|
+
}
|
|
857
858
|
function frustrationFindings(data, daysBack, evidenceRefs) {
|
|
858
859
|
data = frustrationsFromEmotions(asRecord(data) ?? {});
|
|
859
860
|
const summary = asRecord(valueAt(data, ["summary"]));
|
|
@@ -871,7 +872,7 @@ function frustrationFindings(data, daysBack, evidenceRefs) {
|
|
|
871
872
|
id: evidenceId,
|
|
872
873
|
kind: "frustration",
|
|
873
874
|
label: quote ? `Frustration anchor: "${quote}"` : `${count} frustrated trace(s)`,
|
|
874
|
-
endpoint:
|
|
875
|
+
endpoint: investigateFrustrationsEndpoint(daysBack),
|
|
875
876
|
...conversationId ? { conversationId } : {},
|
|
876
877
|
value: first ?? summary ?? data
|
|
877
878
|
});
|
|
@@ -890,7 +891,7 @@ function frustrationFindings(data, daysBack, evidenceRefs) {
|
|
|
890
891
|
id: "action_frustration_window",
|
|
891
892
|
title: "Read the frustration window.",
|
|
892
893
|
rationale: "The user quote and nearby turns reveal what confused or blocked the user.",
|
|
893
|
-
command: conversationId ? `moda
|
|
894
|
+
command: conversationId ? `moda traces get ${shellWord(contextTarget(conversationId))}${anchorIndex !== null ? ` --msg-index=${anchorIndex}` : ""} --window=3` : `moda detections list --family=frustration --days-back=${daysBack} --include-window`,
|
|
894
895
|
mutability: "read",
|
|
895
896
|
requiresApproval: false
|
|
896
897
|
}]
|
|
@@ -955,7 +956,7 @@ function problemFindings(data, daysBack, evidenceRefs) {
|
|
|
955
956
|
id: `action_problem_${slug(problem.id)}`,
|
|
956
957
|
title: `Open the Problem dossier for ${problem.name}.`,
|
|
957
958
|
rationale: "The dossier has the cause, evidence, affected traces and verification state.",
|
|
958
|
-
command: `moda
|
|
959
|
+
command: `moda problems get ${problem.id}`,
|
|
959
960
|
mutability: "read",
|
|
960
961
|
requiresApproval: false
|
|
961
962
|
}]
|
|
@@ -1777,13 +1778,13 @@ function slug(value) {
|
|
|
1777
1778
|
function purposeForCommand(command) {
|
|
1778
1779
|
if (command.startsWith("moda investigate"))
|
|
1779
1780
|
return "Open the ranked production investigation.";
|
|
1780
|
-
if (command.startsWith("moda
|
|
1781
|
+
if (command.startsWith("moda detections tools"))
|
|
1781
1782
|
return "Inspect tool failure examples and trace anchors.";
|
|
1782
1783
|
if (command.startsWith("moda problems"))
|
|
1783
1784
|
return "List the ranked Problems.";
|
|
1784
|
-
if (command.startsWith("moda
|
|
1785
|
+
if (command.startsWith("moda problems get "))
|
|
1785
1786
|
return "Open the Problem dossier.";
|
|
1786
|
-
if (command.startsWith("moda
|
|
1787
|
+
if (command.startsWith("moda traces get"))
|
|
1787
1788
|
return "Read the relevant trace window.";
|
|
1788
1789
|
if (command.startsWith("moda doctor"))
|
|
1789
1790
|
return "Validate Moda setup and data flow.";
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
probeApiKey,
|
|
3
|
+
redactApiKey,
|
|
4
|
+
resolveApiKeyCredential
|
|
5
|
+
} from "./cli-9hc5bg2r.js";
|
|
1
6
|
import {
|
|
2
7
|
authFetch,
|
|
3
8
|
clearAuthSession,
|
|
@@ -5,10 +10,7 @@ import {
|
|
|
5
10
|
loadAuthSession,
|
|
6
11
|
login,
|
|
7
12
|
revokeCliSessionToken
|
|
8
|
-
} from "./cli-
|
|
9
|
-
import {
|
|
10
|
-
apiKeyHeaders
|
|
11
|
-
} from "./cli-7ea02wca.js";
|
|
13
|
+
} from "./cli-0wr3483h.js";
|
|
12
14
|
import {
|
|
13
15
|
CliInputError,
|
|
14
16
|
DEFAULT_INGEST_URL,
|
|
@@ -23,7 +25,6 @@ import {
|
|
|
23
25
|
getActiveProfile,
|
|
24
26
|
getModaPaths,
|
|
25
27
|
loadProfileConfig,
|
|
26
|
-
recordApiRequest,
|
|
27
28
|
resolveApiKey,
|
|
28
29
|
resolveApiKeyFromActiveProfile,
|
|
29
30
|
resolveApiTenantId,
|
|
@@ -34,51 +35,9 @@ import {
|
|
|
34
35
|
secretFilePathFromRef,
|
|
35
36
|
setActiveProfile,
|
|
36
37
|
upsertProfile
|
|
37
|
-
} from "./cli-
|
|
38
|
+
} from "./cli-dve50x7p.js";
|
|
38
39
|
import"./cli-0v6na3yp.js";
|
|
39
40
|
|
|
40
|
-
// src/api-key-auth.ts
|
|
41
|
-
var PROBE_TIMEOUT_MS = 1e4;
|
|
42
|
-
function resolveApiKeyCredential(options = {}) {
|
|
43
|
-
const key = resolveApiKey(options);
|
|
44
|
-
if (!key)
|
|
45
|
-
return;
|
|
46
|
-
const env = options.env ?? process.env;
|
|
47
|
-
const source = env.MODA_API_KEY === key ? "env" : resolveApiKeyFromActiveProfile(options) === key ? "profile" : "config";
|
|
48
|
-
return { key, source, tenantId: embeddedTenantIdFromApiKey(key) };
|
|
49
|
-
}
|
|
50
|
-
function redactApiKey(key) {
|
|
51
|
-
if (key.length <= 12)
|
|
52
|
-
return "<redacted>";
|
|
53
|
-
return `${key.slice(0, 8)}...${key.slice(-4)}`;
|
|
54
|
-
}
|
|
55
|
-
async function probeApiKey(key, options = {}) {
|
|
56
|
-
let response;
|
|
57
|
-
try {
|
|
58
|
-
recordApiRequest();
|
|
59
|
-
response = await fetch(`${resolveModaBaseUrl(options)}/api/v1/data/overview`, {
|
|
60
|
-
method: "GET",
|
|
61
|
-
headers: apiKeyHeaders(key, options),
|
|
62
|
-
signal: AbortSignal.timeout(PROBE_TIMEOUT_MS)
|
|
63
|
-
});
|
|
64
|
-
} catch (error) {
|
|
65
|
-
const reason = error instanceof Error ? error.message : String(error);
|
|
66
|
-
return { outcome: "unreachable", reason };
|
|
67
|
-
}
|
|
68
|
-
if (response.status === 401 || response.status === 403) {
|
|
69
|
-
return { outcome: "rejected", status: response.status };
|
|
70
|
-
}
|
|
71
|
-
if (response.status !== 200) {
|
|
72
|
-
return { outcome: "unreachable", reason: `HTTP ${response.status}` };
|
|
73
|
-
}
|
|
74
|
-
try {
|
|
75
|
-
await response.json();
|
|
76
|
-
} catch {
|
|
77
|
-
return { outcome: "unreachable", reason: "non-JSON response from the Data API" };
|
|
78
|
-
}
|
|
79
|
-
return { outcome: "live" };
|
|
80
|
-
}
|
|
81
|
-
|
|
82
41
|
// src/profile-commands.ts
|
|
83
42
|
var ONLINE_PROBE_TIMEOUT_MS = 5000;
|
|
84
43
|
function subcommand(context) {
|
|
@@ -5,13 +5,12 @@ import {
|
|
|
5
5
|
inspectCodeSelectors,
|
|
6
6
|
inspectPythonSelectors,
|
|
7
7
|
safePromptEvidencePath
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-7xc585hc.js";
|
|
9
9
|
import"./cli-97fnztpy.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-5ke3xe6y.js";
|
|
10
|
+
import"./cli-qvg26twp.js";
|
|
11
|
+
import"./cli-dn91fb56.js";
|
|
12
|
+
import"./cli-9btx12wp.js";
|
|
13
|
+
import"./cli-dve50x7p.js";
|
|
15
14
|
import {
|
|
16
15
|
__commonJS,
|
|
17
16
|
__toESM
|
|
@@ -11,17 +11,16 @@ import {
|
|
|
11
11
|
runPromptSync,
|
|
12
12
|
runPromptsCommand,
|
|
13
13
|
writePromptSyncProgress
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-y2ty9vtv.js";
|
|
15
15
|
import {
|
|
16
16
|
promptSourceHashPayload
|
|
17
17
|
} from "./cli-mm48br00.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-7xc585hc.js";
|
|
19
19
|
import"./cli-97fnztpy.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-5ke3xe6y.js";
|
|
20
|
+
import"./cli-qvg26twp.js";
|
|
21
|
+
import"./cli-dn91fb56.js";
|
|
22
|
+
import"./cli-9btx12wp.js";
|
|
23
|
+
import"./cli-dve50x7p.js";
|
|
25
24
|
import"./cli-0v6na3yp.js";
|
|
26
25
|
export {
|
|
27
26
|
writePromptSyncProgress,
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-qycsmxev.js";
|
|
4
|
+
import"./cli-9hc5bg2r.js";
|
|
4
5
|
import {
|
|
5
6
|
loadAuthSession
|
|
6
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-0wr3483h.js";
|
|
7
8
|
import {
|
|
8
9
|
stringOption
|
|
9
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-qvg26twp.js";
|
|
10
11
|
import {
|
|
11
12
|
CliAuthError,
|
|
12
13
|
resolveIngestUrl,
|
|
13
14
|
resolveModaBaseUrl
|
|
14
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-dve50x7p.js";
|
|
15
16
|
import"./cli-0v6na3yp.js";
|
|
16
17
|
|
|
17
18
|
// src/provision.ts
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertFlags
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-dn91fb56.js";
|
|
4
4
|
import {
|
|
5
5
|
callControlAPI
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-7ea02wca.js";
|
|
6
|
+
} from "./cli-9btx12wp.js";
|
|
8
7
|
import {
|
|
9
8
|
CliInputError,
|
|
10
9
|
explicitOutputMode,
|
|
11
10
|
resolveApiKey
|
|
12
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-dve50x7p.js";
|
|
13
12
|
import"./cli-0v6na3yp.js";
|
|
14
13
|
|
|
15
14
|
// src/registry.ts
|
|
@@ -3,12 +3,11 @@ import {
|
|
|
3
3
|
pullSkills,
|
|
4
4
|
runSkillSync,
|
|
5
5
|
runSkillsCommand
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-5ke3xe6y.js";
|
|
6
|
+
} from "./cli-rt26sbz7.js";
|
|
7
|
+
import"./cli-qvg26twp.js";
|
|
8
|
+
import"./cli-dn91fb56.js";
|
|
9
|
+
import"./cli-9btx12wp.js";
|
|
10
|
+
import"./cli-dve50x7p.js";
|
|
12
11
|
import"./cli-8dtnwp9r.js";
|
|
13
12
|
import"./cli-0v6na3yp.js";
|
|
14
13
|
export {
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPromptsCommand
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-y2ty9vtv.js";
|
|
4
4
|
import"./cli-mm48br00.js";
|
|
5
5
|
import {
|
|
6
6
|
runHarnessCommand
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-7xc585hc.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
9
|
import {
|
|
10
10
|
runSkillsCommand
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-7ea02wca.js";
|
|
11
|
+
} from "./cli-rt26sbz7.js";
|
|
12
|
+
import"./cli-qvg26twp.js";
|
|
13
|
+
import"./cli-dn91fb56.js";
|
|
14
|
+
import"./cli-9btx12wp.js";
|
|
16
15
|
import {
|
|
17
16
|
CliInputError
|
|
18
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-dve50x7p.js";
|
|
19
18
|
import"./cli-8dtnwp9r.js";
|
|
20
19
|
import"./cli-0v6na3yp.js";
|
|
21
20
|
|
package/package.json
CHANGED