@moda-ai/cli 1.55.11 → 1.55.13
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-n0ch2j90.js → agent-rd9deae9.js} +9 -9
- package/dist/{cli-m16taf4z.js → cli-09rr5smg.js} +1 -1
- package/dist/{cli-11fevr8y.js → cli-34zdvcpg.js} +5 -5
- package/dist/{cli-k5qqj2bp.js → cli-4x9w6ey7.js} +1 -1
- package/dist/{cli-fq7kk77e.js → cli-90hb4ng0.js} +8 -8
- package/dist/{cli-n9gexgma.js → cli-bfmn3bsk.js} +2 -2
- package/dist/{cli-g7ferymy.js → cli-k7vwt56h.js} +3 -3
- package/dist/{cli-429zt7g4.js → cli-kwz900s4.js} +95 -21
- package/dist/{cli-m857n028.js → cli-m0fa54ny.js} +5 -5
- package/dist/{cli-tmqd1f0m.js → cli-ryd7nzke.js} +2 -2
- package/dist/{cli-t4jjhn3g.js → cli-ssqb8bfw.js} +1 -1
- package/dist/{cli-fwec3m42.js → cli-y8gbbe9k.js} +4 -4
- package/dist/cli.js +96 -61
- package/dist/{doctor-spvy2zb3.js → doctor-8yb6r66e.js} +9 -9
- package/dist/{fix-ax6bbg37.js → fix-bt5zn07e.js} +7 -7
- package/dist/{harness-jbqpbp6n.js → harness-9psndqtm.js} +6 -6
- package/dist/{harness-github-actions-mtksqp3c.js → harness-github-actions-nph5t2s7.js} +6 -6
- package/dist/{index-2d0q94sv.js → index-qjaprhrv.js} +11 -11
- package/dist/{production-intelligence-1tf98n79.js → production-intelligence-mg3qp2dg.js} +3 -3
- package/dist/{profile-commands-f6599bcx.js → profile-commands-2g5bjzj2.js} +3 -3
- package/dist/prompt-source-mcp.js +6 -6
- package/dist/{prompts-y3xd9heh.js → prompts-mzazn8ce.js} +7 -7
- package/dist/{provision-cjpsswa9.js → provision-rm0yc08f.js} +4 -4
- package/dist/{registry-1dvxsekd.js → registry-mbz65bjy.js} +4 -4
- package/dist/{skills-1k0hbkaf.js → skills-sagxq9sc.js} +6 -6
- package/dist/{sync-by81xqk4.js → sync-gkwexz68.js} +8 -8
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +10 -4
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
createCommandContext,
|
|
15
15
|
parseBooleanFlagValue
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-4x9w6ey7.js";
|
|
17
17
|
import {
|
|
18
18
|
SIGNALS_MANAGEMENT_SUBCOMMANDS,
|
|
19
19
|
assertFlags,
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
runUserCommand,
|
|
24
24
|
runUsersCommand,
|
|
25
25
|
unknownSignalsSubcommandError
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-k7vwt56h.js";
|
|
27
27
|
import {
|
|
28
28
|
ApiError,
|
|
29
29
|
callControlAPI,
|
|
30
30
|
callDataAPI
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-ryd7nzke.js";
|
|
32
32
|
import {
|
|
33
33
|
apiKeyHeaders,
|
|
34
34
|
isPlatformApiKey,
|
|
35
35
|
setPlatformTenantOverride
|
|
36
|
-
} from "./cli-
|
|
36
|
+
} from "./cli-09rr5smg.js";
|
|
37
37
|
import {
|
|
38
38
|
AGENT_ERROR_CODES,
|
|
39
39
|
CliAccessError,
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
CliCancellationError,
|
|
42
42
|
CliInputError,
|
|
43
43
|
CliInputRequiredError,
|
|
44
|
+
CliNotFoundError,
|
|
44
45
|
EXIT_AUTH_REQUIRED,
|
|
45
46
|
EXIT_CANCELLED,
|
|
46
47
|
EXIT_DEGRADED,
|
|
@@ -51,6 +52,7 @@ import {
|
|
|
51
52
|
VERSION,
|
|
52
53
|
agentEnvelopeFits,
|
|
53
54
|
agentMaxOutputBytes,
|
|
55
|
+
apiErrorStatus,
|
|
54
56
|
createCliOutput,
|
|
55
57
|
embeddedTenantIdFromApiKey,
|
|
56
58
|
getApiRequestCount,
|
|
@@ -65,9 +67,10 @@ import {
|
|
|
65
67
|
resolveOutputMode,
|
|
66
68
|
safeWriteStderr,
|
|
67
69
|
safeWriteStdout,
|
|
70
|
+
setAgentUpdateNotice,
|
|
68
71
|
validateConfig,
|
|
69
72
|
wasOutputCancelled
|
|
70
|
-
} from "./cli-
|
|
73
|
+
} from "./cli-kwz900s4.js";
|
|
71
74
|
import {
|
|
72
75
|
__require
|
|
73
76
|
} from "./cli-0v6na3yp.js";
|
|
@@ -897,6 +900,10 @@ async function startUpdateCheck(options = {}, now = Date.now()) {
|
|
|
897
900
|
clearTimeout(timeout);
|
|
898
901
|
}
|
|
899
902
|
}
|
|
903
|
+
function getAvailableUpdate(options = {}) {
|
|
904
|
+
const cache = readCache(options);
|
|
905
|
+
return cache && isNewerVersion(cache.latest, VERSION) ? cache.latest : undefined;
|
|
906
|
+
}
|
|
900
907
|
function getUpdateNotice(options = {}) {
|
|
901
908
|
const cache = readCache(options);
|
|
902
909
|
if (!cache || !isNewerVersion(cache.latest, VERSION)) {
|
|
@@ -1660,7 +1667,7 @@ var agentAuthSchema = {
|
|
|
1660
1667
|
properties: {
|
|
1661
1668
|
reason: {
|
|
1662
1669
|
type: "string",
|
|
1663
|
-
enum: ["no_stored_credentials", "token_expired", "token_revoked", "renew_failed"]
|
|
1670
|
+
enum: ["no_stored_credentials", "token_expired", "token_revoked", "renew_failed", "api_key_rejected"]
|
|
1664
1671
|
},
|
|
1665
1672
|
login_command: { type: "array", items: { type: "string" } },
|
|
1666
1673
|
resume_command: { type: "array", items: { type: "string" } }
|
|
@@ -1934,6 +1941,8 @@ async function finishRun(context, outcome) {
|
|
|
1934
1941
|
function exitCodeForError(error) {
|
|
1935
1942
|
if (error instanceof CliAuthError)
|
|
1936
1943
|
return EXIT_AUTH_REQUIRED;
|
|
1944
|
+
if (apiErrorStatus(error) === 401)
|
|
1945
|
+
return EXIT_AUTH_REQUIRED;
|
|
1937
1946
|
if (error instanceof CliInputRequiredError)
|
|
1938
1947
|
return EXIT_INPUT_REQUIRED;
|
|
1939
1948
|
if (error instanceof CliCancellationError)
|
|
@@ -2072,46 +2081,46 @@ function exitCodesForCommand(command) {
|
|
|
2072
2081
|
import { fileURLToPath } from "url";
|
|
2073
2082
|
import { realpathSync } from "fs";
|
|
2074
2083
|
async function runPromptsCommand(...args) {
|
|
2075
|
-
return (await import("./prompts-
|
|
2084
|
+
return (await import("./prompts-mzazn8ce.js")).runPromptsCommand(...args);
|
|
2076
2085
|
}
|
|
2077
2086
|
async function runSkillsCommand(...args) {
|
|
2078
|
-
return (await import("./skills-
|
|
2087
|
+
return (await import("./skills-sagxq9sc.js")).runSkillsCommand(...args);
|
|
2079
2088
|
}
|
|
2080
2089
|
async function runFixCommand(...args) {
|
|
2081
|
-
return (await import("./fix-
|
|
2090
|
+
return (await import("./fix-bt5zn07e.js")).runFixCommand(...args);
|
|
2082
2091
|
}
|
|
2083
2092
|
async function runFixesCommand(...args) {
|
|
2084
|
-
return (await import("./fix-
|
|
2093
|
+
return (await import("./fix-bt5zn07e.js")).runFixesCommand(...args);
|
|
2085
2094
|
}
|
|
2086
2095
|
async function runHarnessCommand(...args) {
|
|
2087
|
-
return (await import("./harness-
|
|
2096
|
+
return (await import("./harness-9psndqtm.js")).runHarnessCommand(...args);
|
|
2088
2097
|
}
|
|
2089
2098
|
async function runSyncCommand(...args) {
|
|
2090
|
-
return (await import("./sync-
|
|
2099
|
+
return (await import("./sync-gkwexz68.js")).runSyncCommand(...args);
|
|
2091
2100
|
}
|
|
2092
2101
|
async function runRegistryCommand(...args) {
|
|
2093
|
-
return (await import("./registry-
|
|
2102
|
+
return (await import("./registry-mbz65bjy.js")).runRegistryCommand(...args);
|
|
2094
2103
|
}
|
|
2095
2104
|
async function runDoctorCommand(...args) {
|
|
2096
|
-
return (await import("./doctor-
|
|
2105
|
+
return (await import("./doctor-8yb6r66e.js")).runDoctorCommand(...args);
|
|
2097
2106
|
}
|
|
2098
2107
|
async function runStatusCommand(...args) {
|
|
2099
|
-
return (await import("./doctor-
|
|
2108
|
+
return (await import("./doctor-8yb6r66e.js")).runStatusCommand(...args);
|
|
2100
2109
|
}
|
|
2101
2110
|
async function runAuthCommand(...args) {
|
|
2102
|
-
return (await import("./profile-commands-
|
|
2111
|
+
return (await import("./profile-commands-2g5bjzj2.js")).runAuthCommand(...args);
|
|
2103
2112
|
}
|
|
2104
2113
|
async function runConfigCommand(...args) {
|
|
2105
|
-
return (await import("./profile-commands-
|
|
2114
|
+
return (await import("./profile-commands-2g5bjzj2.js")).runConfigCommand(...args);
|
|
2106
2115
|
}
|
|
2107
2116
|
async function runProfilesCommand(...args) {
|
|
2108
|
-
return (await import("./profile-commands-
|
|
2117
|
+
return (await import("./profile-commands-2g5bjzj2.js")).runProfilesCommand(...args);
|
|
2109
2118
|
}
|
|
2110
2119
|
async function runAgentCommand(...args) {
|
|
2111
|
-
return (await import("./agent-
|
|
2120
|
+
return (await import("./agent-rd9deae9.js")).runAgentCommand(...args);
|
|
2112
2121
|
}
|
|
2113
2122
|
async function runProductionCommand(...args) {
|
|
2114
|
-
return (await import("./production-intelligence-
|
|
2123
|
+
return (await import("./production-intelligence-mg3qp2dg.js")).runProductionCommand(...args);
|
|
2115
2124
|
}
|
|
2116
2125
|
function parseArgs(argv) {
|
|
2117
2126
|
const args = argv.slice(2);
|
|
@@ -2455,7 +2464,8 @@ Output auto-detection (no flags needed):
|
|
|
2455
2464
|
Piped/redirected stdout, CI, or an agent env (CLAUDECODE/CURSOR/MODA_AGENT)
|
|
2456
2465
|
=> schema-versioned agent JSON. An interactive terminal => human prose.
|
|
2457
2466
|
Override with the flags above or MODA_FORMAT=human|json|agent|agent-stream.
|
|
2458
|
-
Exit codes: 0 ok, 3 degraded (local fallback),
|
|
2467
|
+
Exit codes: 0 ok, 1 error (errors[0].code says which, e.g. not_found), 3 degraded (local fallback),
|
|
2468
|
+
4 auth required (no key or key rejected), 5 input required, 130 cancelled.
|
|
2459
2469
|
--dry-run Show the planned mutation when supported
|
|
2460
2470
|
--yes Accept explicit automation defaults
|
|
2461
2471
|
--tui Force the human analyst dashboard when supported
|
|
@@ -2800,12 +2810,24 @@ async function printWithOptionalWindows(enriched, listKey, includeWindow, window
|
|
|
2800
2810
|
data = finalize(data, allWarnings);
|
|
2801
2811
|
output.writeData(data, allWarnings.length > 0 ? { warnings: allWarnings } : undefined);
|
|
2802
2812
|
}
|
|
2803
|
-
|
|
2813
|
+
var NOT_FOUND_HINTS = {
|
|
2814
|
+
trace: 'Find trace ids with: moda search "<text>" or moda traces --search=<text>',
|
|
2815
|
+
cluster: "List cluster node ids with: moda clusters",
|
|
2816
|
+
problem: "List problem ids with: moda problems"
|
|
2817
|
+
};
|
|
2818
|
+
function throwIfNotFound(entity, id, isMissing, message) {
|
|
2804
2819
|
if (!isMissing)
|
|
2805
|
-
return
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2820
|
+
return;
|
|
2821
|
+
throw new CliNotFoundError(entity, id, message, NOT_FOUND_HINTS[entity]);
|
|
2822
|
+
}
|
|
2823
|
+
function noWorldStateWarnings(conversationId, isMissing) {
|
|
2824
|
+
if (!isMissing)
|
|
2825
|
+
return;
|
|
2826
|
+
return {
|
|
2827
|
+
warnings: [
|
|
2828
|
+
`No world state for trace "${conversationId}": the trace may not exist in this tenant, or its world state has not been generated yet. Check the trace exists with: moda context ${conversationId} --metadata-only`
|
|
2829
|
+
]
|
|
2830
|
+
};
|
|
2809
2831
|
}
|
|
2810
2832
|
var AUDIT_DEFAULT_LIMIT = 200;
|
|
2811
2833
|
var AUDIT_MAX_LIMIT = 1000;
|
|
@@ -3266,6 +3288,25 @@ function searchDegradeWarning(reason, requestedMode, coverage) {
|
|
|
3266
3288
|
return `${lead} the requested ${requestedMode} ranking did not run, and ${notComparable}. Use --mode=keyword with exact identifiers.`;
|
|
3267
3289
|
}
|
|
3268
3290
|
}
|
|
3291
|
+
function searchOutcomeWarnings(record, requestedFlag, query2) {
|
|
3292
|
+
const warnings = [];
|
|
3293
|
+
const requested = asString(record.requested_mode) ?? requestedFlag ?? "hybrid";
|
|
3294
|
+
const actual = asString(record.search_mode);
|
|
3295
|
+
const degradeReason = asString(record.degrade_reason);
|
|
3296
|
+
const degraded = record.degraded === true || actual !== undefined && actual !== requested;
|
|
3297
|
+
if (degradeReason && degradeReason !== "none") {
|
|
3298
|
+
warnings.push(searchDegradeWarning(degradeReason, requested, record.coverage));
|
|
3299
|
+
} else if (degraded && actual) {
|
|
3300
|
+
warnings.push(`Search ran in ${actual} mode instead of the requested ${requested} mode.`);
|
|
3301
|
+
}
|
|
3302
|
+
if (asString(record.zero_result_reason) === "no_keyword_match") {
|
|
3303
|
+
const match = asRecord(asRecord(record.coverage)?.keyword_match);
|
|
3304
|
+
const minTerms = asNumber(match?.min_terms) ?? undefined;
|
|
3305
|
+
const dropped = asNumber(match?.dropped_non_matching) ?? 0;
|
|
3306
|
+
warnings.push(`No message in this window contains "${query2}"` + (minTerms !== undefined ? ` or at least ${minTerms} of its significant terms` : "") + ` (case-insensitive substring match${degraded ? `, served as keyword because the ${requested} ranking did not run` : ""}).` + (dropped > 0 ? ` ${dropped} index neighbour(s) that only shared a word were not returned.` : "") + " Retry with a shorter exact phrase or identifier, widen --time-range, add --include-tool-io for tool calls/results, or rephrase.");
|
|
3307
|
+
}
|
|
3308
|
+
return warnings;
|
|
3309
|
+
}
|
|
3269
3310
|
function searchCoverageWarnings(coverage, timeRange) {
|
|
3270
3311
|
const record = asRecord(coverage);
|
|
3271
3312
|
if (!record)
|
|
@@ -3657,6 +3698,7 @@ async function readFullTranscript(conversationId, opts = {}) {
|
|
|
3657
3698
|
nextFrom = end < total && messages.length > 0 ? end : null;
|
|
3658
3699
|
warnings.push(`This Moda server has no range reads for context (older backend), so --all fell back to windowed paging and stopped at ${LEGACY_WINDOW_MAX_MESSAGES} messages to keep it cheap.`);
|
|
3659
3700
|
}
|
|
3701
|
+
throwIfNotFound("trace", conversationId, total === 0);
|
|
3660
3702
|
const pageSize = legacy ? LEGACY_WINDOW_MAX_MESSAGES : requested;
|
|
3661
3703
|
const tied = asNumber(ordering?.tied_timestamp_messages) ?? 0;
|
|
3662
3704
|
const synthetic = asNumber(ordering?.synthetic_timestamp_messages) ?? 0;
|
|
@@ -3671,7 +3713,7 @@ async function readFullTranscript(conversationId, opts = {}) {
|
|
|
3671
3713
|
};
|
|
3672
3714
|
const build = (kept) => {
|
|
3673
3715
|
const returned = messages.slice(0, kept);
|
|
3674
|
-
const out = [...
|
|
3716
|
+
const out = [...warnings];
|
|
3675
3717
|
if (total > 0 && start >= total) {
|
|
3676
3718
|
out.push(`--from=${start} is past the end of this trace (${total} messages, indexes 0-${total - 1}).`);
|
|
3677
3719
|
}
|
|
@@ -3758,7 +3800,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
3758
3800
|
const data2 = await callDataAPI(`/task-clusters/search?${query3.toString()}`);
|
|
3759
3801
|
const record = asRecord(data2) ?? {};
|
|
3760
3802
|
const matches = Array.isArray(record.matches) ? record.matches : [];
|
|
3761
|
-
const warnings = params.node_id !== undefined && matches.length === 0 ?
|
|
3803
|
+
const warnings = params.node_id !== undefined && matches.length === 0 ? [`No cluster matched node id "${params.node_id}" for this search. ${NOT_FOUND_HINTS.cluster}`] : [];
|
|
3762
3804
|
context.output.writeData(data2, warnings.length > 0 ? { warnings } : undefined);
|
|
3763
3805
|
break;
|
|
3764
3806
|
}
|
|
@@ -3785,10 +3827,10 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
3785
3827
|
if (params.offset !== undefined)
|
|
3786
3828
|
query2.set("offset", params.offset.toString());
|
|
3787
3829
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
3788
|
-
const data = await callDataAPI(`/clusters/${params.node_id}/conversations${queryString}`);
|
|
3830
|
+
const data = await callDataAPI(`/clusters/${encodeURIComponent(params.node_id)}/conversations${queryString}`);
|
|
3789
3831
|
const clusterRecord = asRecord(data) ?? {};
|
|
3790
|
-
|
|
3791
|
-
context.output.writeData(data
|
|
3832
|
+
throwIfNotFound("cluster", params.node_id, clusterRecord.cluster === null || clusterRecord.cluster === undefined);
|
|
3833
|
+
context.output.writeData(data);
|
|
3792
3834
|
break;
|
|
3793
3835
|
}
|
|
3794
3836
|
case "traces":
|
|
@@ -3870,14 +3912,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
3870
3912
|
const data = await callDataAPI(`/search?${query2.toString()}`);
|
|
3871
3913
|
recordSearchTelemetry(context, data);
|
|
3872
3914
|
const searchRecord = asRecord(data) ?? {};
|
|
3873
|
-
const
|
|
3874
|
-
const actualMode = asString(searchRecord.search_mode);
|
|
3875
|
-
const warnings = [];
|
|
3876
|
-
if (degradeReason && degradeReason !== "none") {
|
|
3877
|
-
warnings.push(searchDegradeWarning(degradeReason, params.mode ?? "hybrid", searchRecord.coverage));
|
|
3878
|
-
} else if (params.mode && actualMode && actualMode !== params.mode && params.mode !== "hybrid") {
|
|
3879
|
-
warnings.push(`Search ran in ${actualMode} mode instead of the requested ${params.mode} mode.`);
|
|
3880
|
-
}
|
|
3915
|
+
const warnings = searchOutcomeWarnings(searchRecord, params.mode, params.q);
|
|
3881
3916
|
warnings.push(...searchCoverageWarnings(searchRecord.coverage, params.time_range ?? "all"));
|
|
3882
3917
|
const results = Array.isArray(searchRecord.results) ? searchRecord.results : [];
|
|
3883
3918
|
if (results.length > 0 && (params.offset ?? 0) > 0) {
|
|
@@ -3922,10 +3957,9 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
3922
3957
|
query3.set("block_index", params.block_index.toString());
|
|
3923
3958
|
if (params.segment_index !== undefined)
|
|
3924
3959
|
query3.set("segment_index", params.segment_index.toString());
|
|
3925
|
-
const data2 = await callDataAPI(`/conversations/${params.conversation_id}/world-state/snapshot?${query3.toString()}`);
|
|
3960
|
+
const data2 = await callDataAPI(`/conversations/${encodeURIComponent(params.conversation_id)}/world-state/snapshot?${query3.toString()}`);
|
|
3926
3961
|
const snapshotRecord = asRecord(data2) ?? {};
|
|
3927
|
-
|
|
3928
|
-
context.output.writeData(data2, warnings2.length > 0 ? { warnings: warnings2 } : undefined);
|
|
3962
|
+
context.output.writeData(data2, noWorldStateWarnings(params.conversation_id, snapshotRecord.found === false));
|
|
3929
3963
|
break;
|
|
3930
3964
|
}
|
|
3931
3965
|
if (params.replay === true) {
|
|
@@ -3937,10 +3971,9 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
3937
3971
|
query3.set("format", format === "fold-inputs" ? "fold_inputs" : "frames");
|
|
3938
3972
|
if (params.message_count !== undefined)
|
|
3939
3973
|
query3.set("message_count", params.message_count.toString());
|
|
3940
|
-
const data2 = await callDataAPI(`/conversations/${params.conversation_id}/world-state/replay?${query3.toString()}`);
|
|
3974
|
+
const data2 = await callDataAPI(`/conversations/${encodeURIComponent(params.conversation_id)}/world-state/replay?${query3.toString()}`);
|
|
3941
3975
|
const replayRecord = asRecord(data2) ?? {};
|
|
3942
|
-
|
|
3943
|
-
context.output.writeData(data2, warnings2.length > 0 ? { warnings: warnings2 } : undefined);
|
|
3976
|
+
context.output.writeData(data2, noWorldStateWarnings(params.conversation_id, replayRecord.hasData === false));
|
|
3944
3977
|
break;
|
|
3945
3978
|
}
|
|
3946
3979
|
const query2 = new URLSearchParams;
|
|
@@ -3949,10 +3982,9 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
3949
3982
|
if (params.event_limit)
|
|
3950
3983
|
query2.set("event_limit", params.event_limit.toString());
|
|
3951
3984
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
3952
|
-
const data = await callDataAPI(`/conversations/${params.conversation_id}/world-state${queryString}`);
|
|
3985
|
+
const data = await callDataAPI(`/conversations/${encodeURIComponent(params.conversation_id)}/world-state${queryString}`);
|
|
3953
3986
|
const wsRecord = asRecord(data) ?? {};
|
|
3954
|
-
|
|
3955
|
-
context.output.writeData(data, warnings.length > 0 ? { warnings } : undefined);
|
|
3987
|
+
context.output.writeData(data, noWorldStateWarnings(params.conversation_id, wsRecord.hasData === false));
|
|
3956
3988
|
break;
|
|
3957
3989
|
}
|
|
3958
3990
|
case "context": {
|
|
@@ -3983,10 +4015,8 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
3983
4015
|
const contextPath = `/conversations/${encodeURIComponent(params.conversation_id)}/context`;
|
|
3984
4016
|
const data = params.metadata_only === true ? await readContextMetadataOnly(contextPath, query2) : await callDataAPI(`${contextPath}${queryString}`);
|
|
3985
4017
|
const ctxRecord = asRecord(data) ?? {};
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
...notFoundWarning("trace", params.conversation_id, asNumber(ctxRecord.total_messages) === 0)
|
|
3989
|
-
];
|
|
4018
|
+
throwIfNotFound("trace", params.conversation_id, asNumber(ctxRecord.total_messages) === 0);
|
|
4019
|
+
const warnings = [...inputWarnings];
|
|
3990
4020
|
const nextCommands = [];
|
|
3991
4021
|
if (params.window !== undefined && params.window > CONTEXT_MAX_WINDOW) {
|
|
3992
4022
|
const center = asNumber(asRecord(ctxRecord.context)?.center_index) ?? params.msg_index ?? 0;
|
|
@@ -4089,7 +4119,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4089
4119
|
if (params.offset !== undefined)
|
|
4090
4120
|
query2.set("offset", params.offset.toString());
|
|
4091
4121
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
4092
|
-
const data = await callDataAPI(`/tool-failures/${params.tool_name}${queryString}`);
|
|
4122
|
+
const data = await callDataAPI(`/tool-failures/${encodeURIComponent(params.tool_name)}${queryString}`);
|
|
4093
4123
|
const tfRecord = asRecord(data) ?? {};
|
|
4094
4124
|
const subtypeCount = Array.isArray(tfRecord.subtypes) ? tfRecord.subtypes.length : 0;
|
|
4095
4125
|
const exampleCount = Array.isArray(tfRecord.examples) ? tfRecord.examples.length : 0;
|
|
@@ -4193,10 +4223,8 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4193
4223
|
if (view === undefined) {
|
|
4194
4224
|
const data2 = await callDataAPI(`/problems/${encodeURIComponent(params.id)}`);
|
|
4195
4225
|
const record = asRecord(data2) ?? {};
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
] : [];
|
|
4199
|
-
context.output.writeData(data2, warnings.length > 0 ? { warnings } : undefined);
|
|
4226
|
+
throwIfNotFound("problem", params.id, record.found === false, `No problem found for id "${params.id}" in this tenant; it may have been merged into another problem.`);
|
|
4227
|
+
context.output.writeData(data2);
|
|
4200
4228
|
break;
|
|
4201
4229
|
}
|
|
4202
4230
|
if (!UUID_RE.test(params.id)) {
|
|
@@ -4215,7 +4243,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4215
4243
|
query2.set("door", params.door);
|
|
4216
4244
|
}
|
|
4217
4245
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
4218
|
-
const data = await callDataAPI(`/problems/${params.id}/${view}${queryString}`);
|
|
4246
|
+
const data = await callDataAPI(`/problems/${encodeURIComponent(params.id)}/${view}${queryString}`);
|
|
4219
4247
|
context.output.writeData(data);
|
|
4220
4248
|
break;
|
|
4221
4249
|
}
|
|
@@ -4270,7 +4298,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4270
4298
|
if (!UUID_RE.test(positional)) {
|
|
4271
4299
|
throw new CliInputError(`Problem id must be a canonical UUID; got "${positional}". Run \`moda problems\` to list problems with their canonical ids.`);
|
|
4272
4300
|
}
|
|
4273
|
-
const data = await callDataAPI(`/problems/${positional}/linear`).catch((error) => {
|
|
4301
|
+
const data = await callDataAPI(`/problems/${encodeURIComponent(positional)}/linear`).catch((error) => {
|
|
4274
4302
|
throw linearApiError(error);
|
|
4275
4303
|
});
|
|
4276
4304
|
const link = asRecord(data)?.link;
|
|
@@ -4745,7 +4773,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
4745
4773
|
resetApiRequestCountBeforeRun: true,
|
|
4746
4774
|
telemetry: "result",
|
|
4747
4775
|
handler: async (context) => {
|
|
4748
|
-
const { runInit } = await import("./index-
|
|
4776
|
+
const { runInit } = await import("./index-qjaprhrv.js");
|
|
4749
4777
|
if (context.outputMode === "agent-stream") {
|
|
4750
4778
|
context.output.writeEvent({
|
|
4751
4779
|
event: "started",
|
|
@@ -4786,7 +4814,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
4786
4814
|
resetApiRequestCountBeforeRun: true,
|
|
4787
4815
|
telemetry: "result-and-error",
|
|
4788
4816
|
handler: async (context) => {
|
|
4789
|
-
const { runProvision } = await import("./provision-
|
|
4817
|
+
const { runProvision } = await import("./provision-rm0yc08f.js");
|
|
4790
4818
|
return runProvision(context, {
|
|
4791
4819
|
resumeCommand: buildResumeCommand("provision", context.rawFlags)
|
|
4792
4820
|
});
|
|
@@ -5674,6 +5702,8 @@ function classifyCliError(error) {
|
|
|
5674
5702
|
return "auth_error";
|
|
5675
5703
|
if (error instanceof CliAccessError)
|
|
5676
5704
|
return "access_error";
|
|
5705
|
+
if (error instanceof CliNotFoundError)
|
|
5706
|
+
return "api_not_found";
|
|
5677
5707
|
if (error instanceof ApiError && error.statusCode === 401)
|
|
5678
5708
|
return "auth_error";
|
|
5679
5709
|
if (error instanceof ApiError && error.statusCode === 403)
|
|
@@ -5878,6 +5908,10 @@ async function dispatchParsedCommandInner(parsed, startedAt) {
|
|
|
5878
5908
|
}
|
|
5879
5909
|
if (!updateCheckDisabled) {
|
|
5880
5910
|
startUpdateCheck();
|
|
5911
|
+
setAgentUpdateNotice(() => {
|
|
5912
|
+
const latest = getAvailableUpdate();
|
|
5913
|
+
return latest ? `moda-cli ${VERSION} is out of date (latest ${latest}); commands and flags may differ from the docs. Update: npm install -g @moda-ai/cli@latest` : undefined;
|
|
5914
|
+
});
|
|
5881
5915
|
}
|
|
5882
5916
|
const context = createCommandContext(parsed, {
|
|
5883
5917
|
commandName: definition.name,
|
|
@@ -6030,6 +6064,7 @@ if (isMain) {
|
|
|
6030
6064
|
export {
|
|
6031
6065
|
telemetryCommandName,
|
|
6032
6066
|
stripLoneSurrogates,
|
|
6067
|
+
searchOutcomeWarnings,
|
|
6033
6068
|
searchDegradeWarning,
|
|
6034
6069
|
searchCoverageWarnings,
|
|
6035
6070
|
runCommand,
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
6
|
+
} from "./cli-34zdvcpg.js";
|
|
7
|
+
import"./cli-ssqb8bfw.js";
|
|
8
|
+
import"./cli-90hb4ng0.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-m0fa54ny.js";
|
|
11
11
|
import"./cli-97fnztpy.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
12
|
+
import"./cli-4x9w6ey7.js";
|
|
13
|
+
import"./cli-k7vwt56h.js";
|
|
14
|
+
import"./cli-ryd7nzke.js";
|
|
15
|
+
import"./cli-09rr5smg.js";
|
|
16
|
+
import"./cli-kwz900s4.js";
|
|
17
17
|
import"./cli-0v6na3yp.js";
|
|
18
18
|
export {
|
|
19
19
|
runStatusCommand,
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
DEFAULT_POLL_INTERVAL_MS,
|
|
3
3
|
DEFAULT_WAIT_TIMEOUT_MS,
|
|
4
4
|
fetchLatestRun
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-90hb4ng0.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-m0fa54ny.js";
|
|
8
8
|
import"./cli-97fnztpy.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-4x9w6ey7.js";
|
|
10
10
|
import {
|
|
11
11
|
assertFlags
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-k7vwt56h.js";
|
|
13
13
|
import {
|
|
14
14
|
callControlAPI
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
} from "./cli-ryd7nzke.js";
|
|
16
|
+
import"./cli-09rr5smg.js";
|
|
17
17
|
import {
|
|
18
18
|
CliInputError,
|
|
19
19
|
EXIT_DEGRADED,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
getModaPaths,
|
|
23
23
|
resolveApiTenantId,
|
|
24
24
|
validateConfig
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-kwz900s4.js";
|
|
26
26
|
import"./cli-0v6na3yp.js";
|
|
27
27
|
|
|
28
28
|
// src/fix.ts
|
|
@@ -42,13 +42,13 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-m0fa54ny.js";
|
|
46
46
|
import"./cli-97fnztpy.js";
|
|
47
|
-
import"./cli-
|
|
48
|
-
import"./cli-
|
|
49
|
-
import"./cli-
|
|
50
|
-
import"./cli-
|
|
51
|
-
import"./cli-
|
|
47
|
+
import"./cli-4x9w6ey7.js";
|
|
48
|
+
import"./cli-k7vwt56h.js";
|
|
49
|
+
import"./cli-ryd7nzke.js";
|
|
50
|
+
import"./cli-09rr5smg.js";
|
|
51
|
+
import"./cli-kwz900s4.js";
|
|
52
52
|
import"./cli-0v6na3yp.js";
|
|
53
53
|
export {
|
|
54
54
|
writeHumanProgress,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSourceSnapshot
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-m0fa54ny.js";
|
|
4
4
|
import"./cli-97fnztpy.js";
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
5
|
+
import"./cli-4x9w6ey7.js";
|
|
6
|
+
import"./cli-k7vwt56h.js";
|
|
7
|
+
import"./cli-ryd7nzke.js";
|
|
8
|
+
import"./cli-09rr5smg.js";
|
|
9
9
|
import {
|
|
10
10
|
recordApiRequest
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-kwz900s4.js";
|
|
12
12
|
import"./cli-0v6na3yp.js";
|
|
13
13
|
|
|
14
14
|
// src/harness-github-actions.ts
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-bfmn3bsk.js";
|
|
4
4
|
import {
|
|
5
5
|
buildDoctorReport
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-34zdvcpg.js";
|
|
7
7
|
import {
|
|
8
8
|
ConnectCodeError,
|
|
9
9
|
connectWithCode,
|
|
10
10
|
loadAuthSession,
|
|
11
11
|
loadToken,
|
|
12
12
|
login
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-ssqb8bfw.js";
|
|
14
14
|
import {
|
|
15
15
|
initPrompts,
|
|
16
16
|
runPromptSync
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-90hb4ng0.js";
|
|
18
18
|
import"./cli-mm48br00.js";
|
|
19
19
|
import {
|
|
20
20
|
canonicalText,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
runCodingAgent,
|
|
35
35
|
runHarnessCommand,
|
|
36
36
|
startRemoteAnalyze
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-m0fa54ny.js";
|
|
38
38
|
import {
|
|
39
39
|
stripAnsi
|
|
40
40
|
} from "./cli-97fnztpy.js";
|
|
@@ -45,13 +45,13 @@ import {
|
|
|
45
45
|
} from "./cli-c5c6f0yw.js";
|
|
46
46
|
import {
|
|
47
47
|
runSkillSync
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-y8gbbe9k.js";
|
|
49
49
|
import {
|
|
50
50
|
createCommandContext
|
|
51
|
-
} from "./cli-
|
|
52
|
-
import"./cli-
|
|
53
|
-
import"./cli-
|
|
54
|
-
import"./cli-
|
|
51
|
+
} from "./cli-4x9w6ey7.js";
|
|
52
|
+
import"./cli-k7vwt56h.js";
|
|
53
|
+
import"./cli-ryd7nzke.js";
|
|
54
|
+
import"./cli-09rr5smg.js";
|
|
55
55
|
import {
|
|
56
56
|
CliAuthError,
|
|
57
57
|
CliInputError,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
recordApiRequest,
|
|
60
60
|
resolveIngestUrl,
|
|
61
61
|
resolveModaBaseUrl
|
|
62
|
-
} from "./cli-
|
|
62
|
+
} from "./cli-kwz900s4.js";
|
|
63
63
|
import {
|
|
64
64
|
detectAgents,
|
|
65
65
|
installRules
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
callControlAPI,
|
|
18
18
|
callDataAPI
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-ryd7nzke.js";
|
|
20
20
|
import {
|
|
21
21
|
apiKeyHeaders
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-09rr5smg.js";
|
|
23
23
|
import {
|
|
24
24
|
CliAuthError,
|
|
25
25
|
CliInputError,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
resolveApiKey,
|
|
30
30
|
resolveModaBaseUrl,
|
|
31
31
|
safeWriteStderr
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-kwz900s4.js";
|
|
33
33
|
import"./cli-0v6na3yp.js";
|
|
34
34
|
|
|
35
35
|
// src/production-intelligence.ts
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
loadAuthSession,
|
|
6
6
|
login,
|
|
7
7
|
revokeCliSessionToken
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-ssqb8bfw.js";
|
|
9
9
|
import {
|
|
10
10
|
apiKeyHeaders
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-09rr5smg.js";
|
|
12
12
|
import {
|
|
13
13
|
CliInputError,
|
|
14
14
|
DEFAULT_INGEST_URL,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
secretFilePathFromRef,
|
|
35
35
|
setActiveProfile,
|
|
36
36
|
upsertProfile
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-kwz900s4.js";
|
|
38
38
|
import"./cli-0v6na3yp.js";
|
|
39
39
|
|
|
40
40
|
// src/api-key-auth.ts
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
inspectCodeSelectors,
|
|
6
6
|
inspectPythonSelectors,
|
|
7
7
|
safePromptEvidencePath
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-m0fa54ny.js";
|
|
9
9
|
import"./cli-97fnztpy.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
10
|
+
import"./cli-4x9w6ey7.js";
|
|
11
|
+
import"./cli-k7vwt56h.js";
|
|
12
|
+
import"./cli-ryd7nzke.js";
|
|
13
|
+
import"./cli-09rr5smg.js";
|
|
14
|
+
import"./cli-kwz900s4.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__toESM
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
runPromptSync,
|
|
12
12
|
runPromptsCommand,
|
|
13
13
|
writePromptSyncProgress
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-90hb4ng0.js";
|
|
15
15
|
import {
|
|
16
16
|
promptSourceHashPayload
|
|
17
17
|
} from "./cli-mm48br00.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-m0fa54ny.js";
|
|
19
19
|
import"./cli-97fnztpy.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
20
|
+
import"./cli-4x9w6ey7.js";
|
|
21
|
+
import"./cli-k7vwt56h.js";
|
|
22
|
+
import"./cli-ryd7nzke.js";
|
|
23
|
+
import"./cli-09rr5smg.js";
|
|
24
|
+
import"./cli-kwz900s4.js";
|
|
25
25
|
import"./cli-0v6na3yp.js";
|
|
26
26
|
export {
|
|
27
27
|
writePromptSyncProgress,
|