@moda-ai/cli 1.55.17 → 1.55.19
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-cha3kg9d.js → agent-mj622k8s.js} +9 -9
- package/dist/{cli-1exddmc0.js → cli-033n2mpb.js} +2 -2
- package/dist/{cli-5hq827jt.js → cli-569hj0bj.js} +1 -1
- package/dist/{cli-3ezzeqcy.js → cli-5ke3xe6y.js} +47 -3
- package/dist/{cli-av3dqgj5.js → cli-5km7j04z.js} +4 -4
- package/dist/{cli-eazeanvt.js → cli-7ea02wca.js} +1 -1
- package/dist/{cli-qmjnh4z9.js → cli-9x9adrtj.js} +1 -1
- package/dist/{cli-a1mv0ypm.js → cli-a5c9te95.js} +5 -5
- package/dist/cli-cehskjde.js +1302 -0
- package/dist/{cli-5q1gyvxn.js → cli-pc5cw7mx.js} +5 -5
- package/dist/{cli-c8p69n55.js → cli-rqk6f6n6.js} +2 -2
- package/dist/{cli-0e8bfvn7.js → cli-wf7gfa1e.js} +8 -8
- package/dist/cli.js +346 -921
- package/dist/{doctor-kg0yq1wf.js → doctor-mx6jf435.js} +9 -9
- package/dist/{fix-q8er8egx.js → fix-9fmy6p2x.js} +7 -7
- package/dist/{harness-github-actions-ver6cprq.js → harness-github-actions-c826bfxs.js} +6 -6
- package/dist/{harness-v9s0k9s7.js → harness-xvg6ws6x.js} +6 -6
- package/dist/{index-7zqa7t5c.js → index-6qqmjqb2.js} +11 -11
- package/dist/{production-intelligence-k36jsvqx.js → production-intelligence-dbe9dmc5.js} +3 -3
- package/dist/{profile-commands-88sdwzbg.js → profile-commands-kmmd9y86.js} +3 -3
- package/dist/prompt-source-mcp.js +6 -6
- package/dist/{prompts-2r756vtd.js → prompts-1tkhrxkq.js} +7 -7
- package/dist/{provision-n3r7yway.js → provision-wzttap58.js} +4 -4
- package/dist/{registry-5v63ga01.js → registry-atqyb5fa.js} +4 -4
- package/dist/{skills-fed17et3.js → skills-d35nnm66.js} +6 -6
- package/dist/{sync-r4tncne4.js → sync-n2psdffz.js} +8 -8
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/dist/cli-kg0kz05e.js +0 -496
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDoctorReport
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
3
|
+
} from "./cli-pc5cw7mx.js";
|
|
4
|
+
import"./cli-9x9adrtj.js";
|
|
5
|
+
import"./cli-wf7gfa1e.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
7
|
import {
|
|
8
8
|
HARNESS_REPORT_APPROVAL_PATH,
|
|
@@ -14,19 +14,19 @@ import {
|
|
|
14
14
|
readHarnessSyncState,
|
|
15
15
|
summarizeHarness,
|
|
16
16
|
validateHarnessReport
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-a5c9te95.js";
|
|
18
18
|
import"./cli-97fnztpy.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
19
|
+
import"./cli-569hj0bj.js";
|
|
20
|
+
import"./cli-cehskjde.js";
|
|
21
|
+
import"./cli-rqk6f6n6.js";
|
|
22
|
+
import"./cli-7ea02wca.js";
|
|
23
23
|
import {
|
|
24
24
|
CliInputError,
|
|
25
25
|
resolveApiKey,
|
|
26
26
|
resolveIngestUrl,
|
|
27
27
|
resolveModaBaseUrl,
|
|
28
28
|
resolveTenantId
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-5ke3xe6y.js";
|
|
30
30
|
import"./cli-0v6na3yp.js";
|
|
31
31
|
|
|
32
32
|
// src/agent.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authFetch,
|
|
3
3
|
getCachedLoginContext
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-9x9adrtj.js";
|
|
5
5
|
import {
|
|
6
6
|
CliAccessError,
|
|
7
7
|
CliInputError,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
resolveTenantIdFromActiveProfile,
|
|
17
17
|
saveCliConfig,
|
|
18
18
|
writeSecretJsonFile
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-5ke3xe6y.js";
|
|
20
20
|
|
|
21
21
|
// src/init/tenant.ts
|
|
22
22
|
import { randomUUID } from "node:crypto";
|
|
@@ -535,13 +535,24 @@ function writeSecretJsonFile(path, value) {
|
|
|
535
535
|
class CliInputError extends Error {
|
|
536
536
|
usage;
|
|
537
537
|
reason;
|
|
538
|
-
|
|
538
|
+
details;
|
|
539
|
+
constructor(message, usage, reason, details) {
|
|
539
540
|
super(message);
|
|
540
541
|
this.usage = usage;
|
|
541
542
|
this.reason = reason;
|
|
543
|
+
this.details = details;
|
|
542
544
|
this.name = "CliInputError";
|
|
543
545
|
}
|
|
544
546
|
}
|
|
547
|
+
var inputDetails = new WeakMap;
|
|
548
|
+
function attachInputDetails(error, details) {
|
|
549
|
+
inputDetails.set(error, details);
|
|
550
|
+
}
|
|
551
|
+
function inputDetailsOf(error) {
|
|
552
|
+
if (error instanceof CliInputError && error.details)
|
|
553
|
+
return error.details;
|
|
554
|
+
return error !== null && typeof error === "object" ? inputDetails.get(error) : undefined;
|
|
555
|
+
}
|
|
545
556
|
|
|
546
557
|
class CliAccessError extends Error {
|
|
547
558
|
guidance;
|
|
@@ -2030,6 +2041,35 @@ function formatValidationMessage(error) {
|
|
|
2030
2041
|
});
|
|
2031
2042
|
return `Validation error — ${[...new Set(parts)].join("; ")}`;
|
|
2032
2043
|
}
|
|
2044
|
+
function zodIssueDetails(error) {
|
|
2045
|
+
const issues = error.issues;
|
|
2046
|
+
if (error.name !== "ZodError" || !Array.isArray(issues) || issues.length === 0)
|
|
2047
|
+
return;
|
|
2048
|
+
const issue = issues[0];
|
|
2049
|
+
const key = Array.isArray(issue.path) && typeof issue.path[0] === "string" ? issue.path[0] : undefined;
|
|
2050
|
+
const details = {};
|
|
2051
|
+
if (key)
|
|
2052
|
+
details.field = `--${key.replace(/_/g, "-")}`;
|
|
2053
|
+
if (issue.code === "invalid_enum_value" && Array.isArray(issue.options)) {
|
|
2054
|
+
details.allowed = issue.options.map(String);
|
|
2055
|
+
}
|
|
2056
|
+
if (issue.type === "number" && (issue.code === "too_small" || issue.code === "too_big")) {
|
|
2057
|
+
const bound = Number(issue.code === "too_small" ? issue.minimum : issue.maximum);
|
|
2058
|
+
if (Number.isFinite(bound))
|
|
2059
|
+
details.range = issue.code === "too_small" ? { min: bound } : { max: bound };
|
|
2060
|
+
}
|
|
2061
|
+
return Object.keys(details).length > 0 ? details : undefined;
|
|
2062
|
+
}
|
|
2063
|
+
function inputDetailFields(details) {
|
|
2064
|
+
if (!details)
|
|
2065
|
+
return {};
|
|
2066
|
+
return {
|
|
2067
|
+
...details.field ? { field: details.field } : {},
|
|
2068
|
+
...details.allowed?.length ? { allowed: details.allowed } : {},
|
|
2069
|
+
...details.range && (details.range.min !== undefined || details.range.max !== undefined) ? { range: details.range } : {},
|
|
2070
|
+
...details.didYouMean?.length ? { did_you_mean: details.didYouMean } : {}
|
|
2071
|
+
};
|
|
2072
|
+
}
|
|
2033
2073
|
var API_KEY_RECOVERY = "Set MODA_API_KEY=moda_sk_... in the environment, or save one with `moda auth login --api-key` (reads MODA_API_KEY or --api-key-stdin). Keys: https://moda.dev/settings";
|
|
2034
2074
|
function serverErrorMessage(error) {
|
|
2035
2075
|
const body = error.responseBody;
|
|
@@ -2094,11 +2134,15 @@ function errorToAgentError(error) {
|
|
|
2094
2134
|
}
|
|
2095
2135
|
if (error instanceof Error) {
|
|
2096
2136
|
if (error instanceof CliInputError || error.name === "ZodError") {
|
|
2137
|
+
const details = inputDetailsOf(error) ?? zodIssueDetails(error);
|
|
2138
|
+
const fromUsage = "usage" in error && typeof error.usage === "string" ? extractSuggestedCommands(error.usage) : undefined;
|
|
2139
|
+
const suggested = [...new Set([...details?.suggestedCommands ?? [], ...fromUsage ?? []])];
|
|
2097
2140
|
return {
|
|
2098
2141
|
code: "input_error",
|
|
2099
2142
|
message: formatValidationMessage(error),
|
|
2100
2143
|
cause: "usage" in error && typeof error.usage === "string" ? error.usage : undefined,
|
|
2101
|
-
suggested_commands:
|
|
2144
|
+
suggested_commands: suggested.length > 0 ? suggested : undefined,
|
|
2145
|
+
...inputDetailFields(details),
|
|
2102
2146
|
blocking: true
|
|
2103
2147
|
};
|
|
2104
2148
|
}
|
|
@@ -2578,4 +2622,4 @@ function extractSuggestedCommands(text) {
|
|
|
2578
2622
|
return commands.length > 0 ? commands : undefined;
|
|
2579
2623
|
}
|
|
2580
2624
|
|
|
2581
|
-
export { PROD_BASE_URL, DEFAULT_INGEST_URL, getModaPaths, getModaDir, isLoopbackBaseUrl, describeBaseUrlSource, loadProfileConfig, saveProfileConfig, getActiveProfile, setActiveProfile, upsertProfile, clearStoredApiKeyCredentials, secretFilePathFromRef, resolveSecretReference, resolveApiKeyFromActiveProfile, resolveTenantIdFromActiveProfile, ensureSecretFilePermissions, writeSecretJsonFile, CliInputError, CliAccessError, CliInputRequiredError, CliAuthError, CliNotFoundError, CliCancellationError, isNetworkLikeError, isApiLikeError, apiErrorStatus, VERSION, MODA_BASE_URL, loadCliConfig, saveCliConfig, resolveApiKey, embeddedTenantIdFromApiKey, resolveIngestUrl2 as resolveIngestUrl, resolveTenantId, resolveApiTenantId, resolveModaBaseUrl, validateConfig, recordApiRequest, getApiRequestCount, resetApiRequestCount, BATCH_MAX_TARGETS, BATCH_CONCURRENCY, parseBatchTarget, collectBatchTargets, mapWithConcurrency, contextTarget, asRecord, asString, asNumber, frustrationAnchorIndex, frustrationsFromEmotions, withFrustrationAnchors, shellWord, trimToolFailureConversations, withToolFailureAnchors, embeddedWindowSize, withoutDetectionWindows, compactProblemDossier, MAX_SCANNED_FILE_BYTES, DEFAULT_MAX_INVENTORY_FILES, DEFAULT_MAX_INVENTORY_TEXT_BYTES, MAX_RECORDED_SKIPS, SKIPPED_DIRS, isSkippedDir, isSkippedPathPrefix, isEvalLikePath, shouldInventoryFile, isTextFile, isSecretishPath, SECRET_KEYS, redactDeep, redactString, packSnapshot, setAgentUpdateNotice, EXIT_OK, EXIT_ERROR, EXIT_DEGRADED, EXIT_AUTH_REQUIRED, EXIT_INPUT_REQUIRED, EXIT_CANCELLED, AGENT_ERROR_CODES, wasOutputCancelled, safeWriteStdout, safeWriteStderr, explicitOutputMode, outputModeFromFlags, resolveOutputMode, createCliOutput, agentEnvelopeFits, errorToAgentError, agentMaxOutputBytes };
|
|
2625
|
+
export { PROD_BASE_URL, DEFAULT_INGEST_URL, getModaPaths, getModaDir, isLoopbackBaseUrl, describeBaseUrlSource, loadProfileConfig, saveProfileConfig, getActiveProfile, setActiveProfile, upsertProfile, clearStoredApiKeyCredentials, secretFilePathFromRef, resolveSecretReference, resolveApiKeyFromActiveProfile, resolveTenantIdFromActiveProfile, ensureSecretFilePermissions, writeSecretJsonFile, CliInputError, attachInputDetails, CliAccessError, CliInputRequiredError, CliAuthError, CliNotFoundError, CliCancellationError, isNetworkLikeError, isApiLikeError, apiErrorStatus, VERSION, MODA_BASE_URL, loadCliConfig, saveCliConfig, resolveApiKey, embeddedTenantIdFromApiKey, resolveIngestUrl2 as resolveIngestUrl, resolveTenantId, resolveApiTenantId, resolveModaBaseUrl, validateConfig, recordApiRequest, getApiRequestCount, resetApiRequestCount, BATCH_MAX_TARGETS, BATCH_CONCURRENCY, parseBatchTarget, collectBatchTargets, mapWithConcurrency, contextTarget, asRecord, asString, asNumber, frustrationAnchorIndex, frustrationsFromEmotions, withFrustrationAnchors, shellWord, trimToolFailureConversations, withToolFailureAnchors, embeddedWindowSize, withoutDetectionWindows, compactProblemDossier, MAX_SCANNED_FILE_BYTES, DEFAULT_MAX_INVENTORY_FILES, DEFAULT_MAX_INVENTORY_TEXT_BYTES, MAX_RECORDED_SKIPS, SKIPPED_DIRS, isSkippedDir, isSkippedPathPrefix, isEvalLikePath, shouldInventoryFile, isTextFile, isSecretishPath, SECRET_KEYS, redactDeep, redactString, packSnapshot, setAgentUpdateNotice, EXIT_OK, EXIT_ERROR, EXIT_DEGRADED, EXIT_AUTH_REQUIRED, EXIT_INPUT_REQUIRED, EXIT_CANCELLED, AGENT_ERROR_CODES, wasOutputCancelled, safeWriteStdout, safeWriteStderr, explicitOutputMode, outputModeFromFlags, resolveOutputMode, createCliOutput, agentEnvelopeFits, errorToAgentError, agentMaxOutputBytes };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCommandContext
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-569hj0bj.js";
|
|
4
4
|
import {
|
|
5
5
|
assertFlags,
|
|
6
6
|
assertPositionals
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-cehskjde.js";
|
|
8
8
|
import {
|
|
9
9
|
callControlAPI
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-rqk6f6n6.js";
|
|
11
11
|
import {
|
|
12
12
|
CliInputError,
|
|
13
13
|
recordApiRequest,
|
|
14
14
|
resolveApiKey,
|
|
15
15
|
resolveIngestUrl,
|
|
16
16
|
resolveTenantId
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-5ke3xe6y.js";
|
|
18
18
|
import {
|
|
19
19
|
SKILL_SOURCE_HARNESS,
|
|
20
20
|
SKILL_SOURCE_INTEGRATION_BUNDLED,
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createCommandContext,
|
|
6
6
|
stringOption
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-569hj0bj.js";
|
|
8
8
|
import {
|
|
9
9
|
assertFlags,
|
|
10
10
|
assertPositionals,
|
|
11
11
|
requireTenant
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-cehskjde.js";
|
|
13
13
|
import {
|
|
14
14
|
ApiError,
|
|
15
15
|
callControlAPI
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-rqk6f6n6.js";
|
|
17
17
|
import {
|
|
18
18
|
CliInputError,
|
|
19
19
|
CliInputRequiredError,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
resolveModaBaseUrl,
|
|
40
40
|
resolveTenantId,
|
|
41
41
|
shouldInventoryFile
|
|
42
|
-
} from "./cli-
|
|
42
|
+
} from "./cli-5ke3xe6y.js";
|
|
43
43
|
import {
|
|
44
44
|
__commonJS,
|
|
45
45
|
__require,
|
|
@@ -195871,7 +195871,7 @@ async function runHarnessCommand(context) {
|
|
|
195871
195871
|
throw new CliInputError("Focused remote prompt analysis is not supported yet.", "Use local --analyst=claude|codex|cursor|local-scan, or drop --concern for a full remote report.");
|
|
195872
195872
|
}
|
|
195873
195873
|
if (context.flags["github-actions"] === "true") {
|
|
195874
|
-
const { runGithubActionsAnalyze } = await import("./harness-github-actions-
|
|
195874
|
+
const { runGithubActionsAnalyze } = await import("./harness-github-actions-c826bfxs.js");
|
|
195875
195875
|
const result = await runGithubActionsAnalyze(rootDir, {
|
|
195876
195876
|
writeReport: (report2) => {
|
|
195877
195877
|
const normalized = normalizeHarnessReport(report2);
|