@moda-ai/cli 1.55.16 → 1.55.17
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-a2xwfeeh.js → agent-cha3kg9d.js} +9 -9
- package/dist/{cli-86q35fpq.js → cli-0e8bfvn7.js} +8 -8
- package/dist/{cli-3gwbg0xp.js → cli-1exddmc0.js} +2 -2
- package/dist/{cli-b3cxcxgn.js → cli-3ezzeqcy.js} +669 -37
- package/dist/{cli-kf3d6y8c.js → cli-5hq827jt.js} +8 -2
- package/dist/{cli-xy6zn80e.js → cli-5q1gyvxn.js} +5 -5
- package/dist/{cli-7fc44hhq.js → cli-a1mv0ypm.js} +5 -5
- package/dist/{cli-zdeywyn9.js → cli-av3dqgj5.js} +4 -4
- package/dist/cli-bb7133m7.js +144 -0
- package/dist/{cli-2ars875d.js → cli-c8p69n55.js} +2 -2
- package/dist/{cli-atx672xv.js → cli-eazeanvt.js} +1 -1
- package/dist/{cli-53mvsfgn.js → cli-kg0kz05e.js} +3 -3
- package/dist/{cli-6ca1sz0a.js → cli-qmjnh4z9.js} +1 -1
- package/dist/cli.js +94 -47
- package/dist/{doctor-e2xrbpmp.js → doctor-kg0yq1wf.js} +9 -9
- package/dist/{fix-v8xka487.js → fix-q8er8egx.js} +7 -7
- package/dist/{harness-github-actions-301nak95.js → harness-github-actions-ver6cprq.js} +6 -6
- package/dist/{harness-28wbzncq.js → harness-v9s0k9s7.js} +6 -6
- package/dist/{index-ccdpy9ma.js → index-7zqa7t5c.js} +11 -11
- package/dist/{production-intelligence-0wqcvvxk.js → production-intelligence-k36jsvqx.js} +13 -13
- package/dist/{profile-commands-f5kysjrv.js → profile-commands-88sdwzbg.js} +3 -3
- package/dist/prompt-source-mcp.js +6 -6
- package/dist/{prompts-jg0stjfb.js → prompts-2r756vtd.js} +7 -7
- package/dist/{provision-25bw5rd7.js → provision-n3r7yway.js} +4 -4
- package/dist/{registry-39xzetsc.js → registry-5v63ga01.js} +4 -4
- package/dist/{skills-gjesa81c.js → skills-fed17et3.js} +6 -6
- package/dist/{sync-7ts9psky.js → sync-r4tncne4.js} +8 -8
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +20 -8
- package/dist/cli-438g4nwh.js +0 -465
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliOutput,
|
|
3
3
|
outputModeFromFlags
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-3ezzeqcy.js";
|
|
5
5
|
|
|
6
6
|
// src/command-context.ts
|
|
7
7
|
function flagEnabled(flags, key) {
|
|
@@ -50,7 +50,13 @@ function createCommandContext(input, options = {}) {
|
|
|
50
50
|
output: createCliOutput({
|
|
51
51
|
command: options.commandName ?? input.command,
|
|
52
52
|
mode: outputMode,
|
|
53
|
-
quiet
|
|
53
|
+
quiet,
|
|
54
|
+
invocation: {
|
|
55
|
+
command: options.commandName ?? input.command,
|
|
56
|
+
positionals: input.positionals,
|
|
57
|
+
flags: rawFlags,
|
|
58
|
+
...input.bareFlags ? { bareFlags: input.bareFlags } : {}
|
|
59
|
+
}
|
|
54
60
|
}),
|
|
55
61
|
profile: flags.profile,
|
|
56
62
|
dryRun: flagEnabled(flags, "dry-run"),
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAuthSessionValid,
|
|
3
3
|
loadAuthSession
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-qmjnh4z9.js";
|
|
5
5
|
import {
|
|
6
6
|
inspectPromptManifest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-0e8bfvn7.js";
|
|
8
8
|
import {
|
|
9
9
|
readHarnessSyncState,
|
|
10
10
|
renderDoctorHuman,
|
|
11
11
|
renderStatusHuman,
|
|
12
12
|
scanHarness
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-a1mv0ypm.js";
|
|
14
14
|
import {
|
|
15
15
|
callDataAPI
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-c8p69n55.js";
|
|
17
17
|
import {
|
|
18
18
|
ensureSecretFilePermissions,
|
|
19
19
|
getActiveProfile,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveSecretReference,
|
|
28
28
|
resolveTenantId,
|
|
29
29
|
secretFilePathFromRef
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-3ezzeqcy.js";
|
|
31
31
|
|
|
32
32
|
// src/doctor.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createCommandContext,
|
|
6
6
|
stringOption
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-5hq827jt.js";
|
|
8
8
|
import {
|
|
9
9
|
assertFlags,
|
|
10
10
|
assertPositionals,
|
|
11
11
|
requireTenant
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-kg0kz05e.js";
|
|
13
13
|
import {
|
|
14
14
|
ApiError,
|
|
15
15
|
callControlAPI
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-c8p69n55.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-3ezzeqcy.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-ver6cprq.js");
|
|
195875
195875
|
const result = await runGithubActionsAnalyze(rootDir, {
|
|
195876
195876
|
writeReport: (report2) => {
|
|
195877
195877
|
const normalized = normalizeHarnessReport(report2);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCommandContext
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-5hq827jt.js";
|
|
4
4
|
import {
|
|
5
5
|
assertFlags,
|
|
6
6
|
assertPositionals
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-kg0kz05e.js";
|
|
8
8
|
import {
|
|
9
9
|
callControlAPI
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-c8p69n55.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-3ezzeqcy.js";
|
|
18
18
|
import {
|
|
19
19
|
SKILL_SOURCE_HARNESS,
|
|
20
20
|
SKILL_SOURCE_INTEGRATION_BUNDLED,
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// src/intelligence-schema.ts
|
|
2
|
+
var INTELLIGENCE_SCHEMA_VERSION = "moda.intelligence.v1";
|
|
3
|
+
var provenanceSchema = { type: "string", enum: ["measured", "inferred"] };
|
|
4
|
+
var mutabilitySchema = {
|
|
5
|
+
type: "string",
|
|
6
|
+
enum: ["read", "write", "sync", "unknown"]
|
|
7
|
+
};
|
|
8
|
+
var confidenceSchema = {
|
|
9
|
+
type: "string",
|
|
10
|
+
enum: ["high", "medium", "low", "unknown"]
|
|
11
|
+
};
|
|
12
|
+
var MODA_INTELLIGENCE_V1_JSON_SCHEMA = {
|
|
13
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
14
|
+
$id: "moda.intelligence.v1",
|
|
15
|
+
title: "Moda Intelligence v1",
|
|
16
|
+
type: "object",
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
required: [
|
|
19
|
+
"schema_version",
|
|
20
|
+
"generated_at",
|
|
21
|
+
"command",
|
|
22
|
+
"source",
|
|
23
|
+
"degraded",
|
|
24
|
+
"question",
|
|
25
|
+
"summary",
|
|
26
|
+
"answer_markdown",
|
|
27
|
+
"answer_claims",
|
|
28
|
+
"findings",
|
|
29
|
+
"evidence_refs",
|
|
30
|
+
"next_commands",
|
|
31
|
+
"warnings"
|
|
32
|
+
],
|
|
33
|
+
properties: {
|
|
34
|
+
schema_version: { const: "moda.intelligence.v1" },
|
|
35
|
+
generated_at: { type: "string", format: "date-time" },
|
|
36
|
+
command: { type: "string" },
|
|
37
|
+
source: { type: "string", enum: ["cloud", "local_fallback"] },
|
|
38
|
+
degraded: { type: "boolean" },
|
|
39
|
+
question: { type: "string" },
|
|
40
|
+
summary: {
|
|
41
|
+
type: "object",
|
|
42
|
+
additionalProperties: false,
|
|
43
|
+
required: ["text", "confidence"],
|
|
44
|
+
properties: { text: { type: "string" }, confidence: confidenceSchema }
|
|
45
|
+
},
|
|
46
|
+
answer_markdown: { type: "string" },
|
|
47
|
+
answer_claims: {
|
|
48
|
+
type: "array",
|
|
49
|
+
items: {
|
|
50
|
+
type: "object",
|
|
51
|
+
additionalProperties: false,
|
|
52
|
+
required: ["text", "kind", "status", "evidence_ref_ids"],
|
|
53
|
+
properties: {
|
|
54
|
+
text: { type: "string" },
|
|
55
|
+
value: { type: "number" },
|
|
56
|
+
kind: { type: "string", enum: ["percentage", "count", "qualitative"] },
|
|
57
|
+
status: {
|
|
58
|
+
type: "string",
|
|
59
|
+
enum: ["grounded", "ungrounded", "unverifiable"]
|
|
60
|
+
},
|
|
61
|
+
evidence_ref_ids: { type: "array", items: { type: "string" } },
|
|
62
|
+
matched_path: { type: "string" }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
findings: {
|
|
67
|
+
type: "array",
|
|
68
|
+
items: {
|
|
69
|
+
type: "object",
|
|
70
|
+
additionalProperties: false,
|
|
71
|
+
required: ["id", "title", "evidence_ref_ids", "recommended_actions"],
|
|
72
|
+
properties: {
|
|
73
|
+
id: { type: "string" },
|
|
74
|
+
title: { type: "string" },
|
|
75
|
+
severity: {
|
|
76
|
+
type: "string",
|
|
77
|
+
enum: ["critical", "high", "medium", "low", "info"]
|
|
78
|
+
},
|
|
79
|
+
description: { type: "string" },
|
|
80
|
+
evidence_ref_ids: { type: "array", items: { type: "string" } },
|
|
81
|
+
recommended_actions: {
|
|
82
|
+
type: "array",
|
|
83
|
+
items: {
|
|
84
|
+
type: "object",
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
required: ["id", "title", "mutability", "requires_approval"],
|
|
87
|
+
properties: {
|
|
88
|
+
id: { type: "string" },
|
|
89
|
+
title: { type: "string" },
|
|
90
|
+
rationale: { type: "string" },
|
|
91
|
+
command: { type: "string" },
|
|
92
|
+
mutability: mutabilitySchema,
|
|
93
|
+
requires_approval: { type: "boolean" }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
evidence_refs: {
|
|
101
|
+
type: "array",
|
|
102
|
+
items: {
|
|
103
|
+
type: "object",
|
|
104
|
+
additionalProperties: false,
|
|
105
|
+
required: ["id", "kind", "label", "grounding"],
|
|
106
|
+
properties: {
|
|
107
|
+
id: { type: "string" },
|
|
108
|
+
kind: { type: "string" },
|
|
109
|
+
label: { type: "string" },
|
|
110
|
+
anchor: {
|
|
111
|
+
type: "object",
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: {
|
|
114
|
+
conversation_id: { type: "string" },
|
|
115
|
+
message_index: { type: "number" },
|
|
116
|
+
run_id: { type: "string" },
|
|
117
|
+
tool_name: { type: "string" }
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
snippet: { type: "string" },
|
|
121
|
+
grounding: provenanceSchema
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
next_commands: {
|
|
126
|
+
type: "array",
|
|
127
|
+
items: {
|
|
128
|
+
type: "object",
|
|
129
|
+
additionalProperties: false,
|
|
130
|
+
required: ["command", "mutability", "requires_approval"],
|
|
131
|
+
properties: {
|
|
132
|
+
command: { type: "string" },
|
|
133
|
+
purpose: { type: "string" },
|
|
134
|
+
mutability: mutabilitySchema,
|
|
135
|
+
requires_approval: { type: "boolean" }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
warnings: { type: "array", items: { type: "string" } },
|
|
140
|
+
meta: { type: "object" }
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export { INTELLIGENCE_SCHEMA_VERSION, MODA_INTELLIGENCE_V1_JSON_SCHEMA };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
apiKeyHeaders
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-eazeanvt.js";
|
|
4
4
|
import {
|
|
5
5
|
recordApiRequest,
|
|
6
6
|
resolveApiKey,
|
|
7
7
|
resolveModaBaseUrl
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-3ezzeqcy.js";
|
|
9
9
|
|
|
10
10
|
// src/api-client.ts
|
|
11
11
|
var REQUEST_TIMEOUT_MS = 30000;
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
ApiError,
|
|
3
3
|
callControlAPI,
|
|
4
4
|
callDataAPI
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-c8p69n55.js";
|
|
6
6
|
import {
|
|
7
7
|
isPlatformApiKey,
|
|
8
8
|
setPlatformTenantOverride
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-eazeanvt.js";
|
|
10
10
|
import {
|
|
11
11
|
CliAccessError,
|
|
12
12
|
CliInputError,
|
|
13
13
|
embeddedTenantIdFromApiKey,
|
|
14
14
|
resolveApiKey,
|
|
15
15
|
resolveApiTenantId
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-3ezzeqcy.js";
|
|
17
17
|
|
|
18
18
|
// src/parity-commands.ts
|
|
19
19
|
import { readFileSync } from "node:fs";
|
package/dist/cli.js
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
MODA_INTELLIGENCE_V1_JSON_SCHEMA,
|
|
6
|
-
asNumber,
|
|
7
|
-
asRecord,
|
|
8
|
-
asString,
|
|
9
|
-
collectBatchTargets,
|
|
10
|
-
contextTarget,
|
|
11
|
-
embeddedWindowSize,
|
|
12
|
-
frustrationsFromEmotions,
|
|
13
|
-
mapWithConcurrency,
|
|
14
|
-
parseBatchTarget,
|
|
15
|
-
trimToolFailureConversations,
|
|
16
|
-
withFrustrationAnchors,
|
|
17
|
-
withToolFailureAnchors
|
|
18
|
-
} from "./cli-438g4nwh.js";
|
|
3
|
+
MODA_INTELLIGENCE_V1_JSON_SCHEMA
|
|
4
|
+
} from "./cli-bb7133m7.js";
|
|
19
5
|
import {
|
|
20
6
|
createCommandContext,
|
|
21
7
|
parseBooleanFlagValue
|
|
22
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-5hq827jt.js";
|
|
23
9
|
import {
|
|
24
10
|
SIGNALS_MANAGEMENT_SUBCOMMANDS,
|
|
25
11
|
assertFlags,
|
|
@@ -29,19 +15,21 @@ import {
|
|
|
29
15
|
runUserCommand,
|
|
30
16
|
runUsersCommand,
|
|
31
17
|
unknownSignalsSubcommandError
|
|
32
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-kg0kz05e.js";
|
|
33
19
|
import {
|
|
34
20
|
ApiError,
|
|
35
21
|
callControlAPI,
|
|
36
22
|
callDataAPI
|
|
37
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-c8p69n55.js";
|
|
38
24
|
import {
|
|
39
25
|
apiKeyHeaders,
|
|
40
26
|
isPlatformApiKey,
|
|
41
27
|
setPlatformTenantOverride
|
|
42
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-eazeanvt.js";
|
|
43
29
|
import {
|
|
44
30
|
AGENT_ERROR_CODES,
|
|
31
|
+
BATCH_CONCURRENCY,
|
|
32
|
+
BATCH_MAX_TARGETS,
|
|
45
33
|
CliAccessError,
|
|
46
34
|
CliAuthError,
|
|
47
35
|
CliCancellationError,
|
|
@@ -59,14 +47,24 @@ import {
|
|
|
59
47
|
agentEnvelopeFits,
|
|
60
48
|
agentMaxOutputBytes,
|
|
61
49
|
apiErrorStatus,
|
|
50
|
+
asNumber,
|
|
51
|
+
asRecord,
|
|
52
|
+
asString,
|
|
53
|
+
collectBatchTargets,
|
|
54
|
+
compactProblemDossier,
|
|
55
|
+
contextTarget,
|
|
62
56
|
createCliOutput,
|
|
63
57
|
embeddedTenantIdFromApiKey,
|
|
58
|
+
embeddedWindowSize,
|
|
64
59
|
errorToAgentError,
|
|
60
|
+
frustrationsFromEmotions,
|
|
65
61
|
getApiRequestCount,
|
|
66
62
|
getModaDir,
|
|
67
63
|
isApiLikeError,
|
|
68
64
|
isNetworkLikeError,
|
|
69
65
|
loadProfileConfig,
|
|
66
|
+
mapWithConcurrency,
|
|
67
|
+
parseBatchTarget,
|
|
70
68
|
resetApiRequestCount,
|
|
71
69
|
resolveApiKey,
|
|
72
70
|
resolveApiTenantId,
|
|
@@ -75,9 +73,13 @@ import {
|
|
|
75
73
|
safeWriteStderr,
|
|
76
74
|
safeWriteStdout,
|
|
77
75
|
setAgentUpdateNotice,
|
|
76
|
+
trimToolFailureConversations,
|
|
78
77
|
validateConfig,
|
|
79
|
-
wasOutputCancelled
|
|
80
|
-
|
|
78
|
+
wasOutputCancelled,
|
|
79
|
+
withFrustrationAnchors,
|
|
80
|
+
withToolFailureAnchors,
|
|
81
|
+
withoutDetectionWindows
|
|
82
|
+
} from "./cli-3ezzeqcy.js";
|
|
81
83
|
import {
|
|
82
84
|
__require
|
|
83
85
|
} from "./cli-0v6na3yp.js";
|
|
@@ -216,6 +218,7 @@ var ProblemSchema = z.object({
|
|
|
216
218
|
traces: boolFlag(),
|
|
217
219
|
conversations: boolFlag(),
|
|
218
220
|
feedback: boolFlag(),
|
|
221
|
+
full: boolFlag(),
|
|
219
222
|
limit: z.number().min(1).max(50).optional(),
|
|
220
223
|
cursor: z.string().optional(),
|
|
221
224
|
family: z.enum(PROBLEM_FAMILIES).optional(),
|
|
@@ -321,7 +324,8 @@ var EmotionsSchema = z.object({
|
|
|
321
324
|
offset: z.number().min(0).max(1e4).optional(),
|
|
322
325
|
family: z.enum(EMOTION_FAMILIES).optional(),
|
|
323
326
|
user_id: z.string().min(1).max(256).optional(),
|
|
324
|
-
conversation_id: z.string().min(1).max(256).optional()
|
|
327
|
+
conversation_id: z.string().min(1).max(256).optional(),
|
|
328
|
+
include_window: boolFlag()
|
|
325
329
|
});
|
|
326
330
|
var HallucinationsSchema = z.object({
|
|
327
331
|
days_back: daysBackFlag(7),
|
|
@@ -2201,46 +2205,46 @@ function exitCodesForCommand(command) {
|
|
|
2201
2205
|
import { fileURLToPath } from "url";
|
|
2202
2206
|
import { realpathSync } from "fs";
|
|
2203
2207
|
async function runPromptsCommand(...args) {
|
|
2204
|
-
return (await import("./prompts-
|
|
2208
|
+
return (await import("./prompts-2r756vtd.js")).runPromptsCommand(...args);
|
|
2205
2209
|
}
|
|
2206
2210
|
async function runSkillsCommand(...args) {
|
|
2207
|
-
return (await import("./skills-
|
|
2211
|
+
return (await import("./skills-fed17et3.js")).runSkillsCommand(...args);
|
|
2208
2212
|
}
|
|
2209
2213
|
async function runFixCommand(...args) {
|
|
2210
|
-
return (await import("./fix-
|
|
2214
|
+
return (await import("./fix-q8er8egx.js")).runFixCommand(...args);
|
|
2211
2215
|
}
|
|
2212
2216
|
async function runFixesCommand(...args) {
|
|
2213
|
-
return (await import("./fix-
|
|
2217
|
+
return (await import("./fix-q8er8egx.js")).runFixesCommand(...args);
|
|
2214
2218
|
}
|
|
2215
2219
|
async function runHarnessCommand(...args) {
|
|
2216
|
-
return (await import("./harness-
|
|
2220
|
+
return (await import("./harness-v9s0k9s7.js")).runHarnessCommand(...args);
|
|
2217
2221
|
}
|
|
2218
2222
|
async function runSyncCommand(...args) {
|
|
2219
|
-
return (await import("./sync-
|
|
2223
|
+
return (await import("./sync-r4tncne4.js")).runSyncCommand(...args);
|
|
2220
2224
|
}
|
|
2221
2225
|
async function runRegistryCommand(...args) {
|
|
2222
|
-
return (await import("./registry-
|
|
2226
|
+
return (await import("./registry-5v63ga01.js")).runRegistryCommand(...args);
|
|
2223
2227
|
}
|
|
2224
2228
|
async function runDoctorCommand(...args) {
|
|
2225
|
-
return (await import("./doctor-
|
|
2229
|
+
return (await import("./doctor-kg0yq1wf.js")).runDoctorCommand(...args);
|
|
2226
2230
|
}
|
|
2227
2231
|
async function runStatusCommand(...args) {
|
|
2228
|
-
return (await import("./doctor-
|
|
2232
|
+
return (await import("./doctor-kg0yq1wf.js")).runStatusCommand(...args);
|
|
2229
2233
|
}
|
|
2230
2234
|
async function runAuthCommand(...args) {
|
|
2231
|
-
return (await import("./profile-commands-
|
|
2235
|
+
return (await import("./profile-commands-88sdwzbg.js")).runAuthCommand(...args);
|
|
2232
2236
|
}
|
|
2233
2237
|
async function runConfigCommand(...args) {
|
|
2234
|
-
return (await import("./profile-commands-
|
|
2238
|
+
return (await import("./profile-commands-88sdwzbg.js")).runConfigCommand(...args);
|
|
2235
2239
|
}
|
|
2236
2240
|
async function runProfilesCommand(...args) {
|
|
2237
|
-
return (await import("./profile-commands-
|
|
2241
|
+
return (await import("./profile-commands-88sdwzbg.js")).runProfilesCommand(...args);
|
|
2238
2242
|
}
|
|
2239
2243
|
async function runAgentCommand(...args) {
|
|
2240
|
-
return (await import("./agent-
|
|
2244
|
+
return (await import("./agent-cha3kg9d.js")).runAgentCommand(...args);
|
|
2241
2245
|
}
|
|
2242
2246
|
async function runProductionCommand(...args) {
|
|
2243
|
-
return (await import("./production-intelligence-
|
|
2247
|
+
return (await import("./production-intelligence-k36jsvqx.js")).runProductionCommand(...args);
|
|
2244
2248
|
}
|
|
2245
2249
|
function parseArgs(argv) {
|
|
2246
2250
|
const args = argv.slice(2);
|
|
@@ -2623,6 +2627,8 @@ Emotions flags:
|
|
|
2623
2627
|
--family=F frustration|disapproval|sadness|confusion|anxiety|trust|positive
|
|
2624
2628
|
--days-back=N --limit=N Window 1-90 (default 7); page size 1-20 (default 10)
|
|
2625
2629
|
--offset=N Skip N detections (0-10000)
|
|
2630
|
+
--include-window Keep each detection's conversation window in agent output
|
|
2631
|
+
(also frustrations; omitted by default, use context_command)
|
|
2626
2632
|
|
|
2627
2633
|
Laziness flags:
|
|
2628
2634
|
--family=F One laziness family (e.g. omission_phrase, stub_body, deflection, completion, tool_selection)
|
|
@@ -2635,6 +2641,8 @@ Hallucinations flags:
|
|
|
2635
2641
|
--days-back=N --limit=N Window 1-90 (default 7); page size 1-20 (default 10)
|
|
2636
2642
|
|
|
2637
2643
|
Problem flags (moda problem <id>):
|
|
2644
|
+
--full Whole dossier in agent output (default there: header, summary,
|
|
2645
|
+
top 5 evidence anchors, report titles)
|
|
2638
2646
|
--evidence|--reports|--traces|--feedback
|
|
2639
2647
|
Open one sub-resource page (at most one)
|
|
2640
2648
|
--limit=N --cursor=TOKEN Keyset paging (1-50; pass next_cursor back verbatim)
|
|
@@ -2933,6 +2941,19 @@ async function printWithOptionalWindows(enriched, listKey, includeWindow, window
|
|
|
2933
2941
|
data = finalize(data, allWarnings);
|
|
2934
2942
|
output.writeData(data, allWarnings.length > 0 ? { warnings: allWarnings } : undefined);
|
|
2935
2943
|
}
|
|
2944
|
+
function withoutRepeatedFrustrationWindow(data) {
|
|
2945
|
+
if (!Array.isArray(data.frustrations))
|
|
2946
|
+
return data;
|
|
2947
|
+
const frustrations = data.frustrations.map((item) => {
|
|
2948
|
+
const row = asRecord(item);
|
|
2949
|
+
const window = asRecord(row?.window);
|
|
2950
|
+
if (!row || !window || "error" in window)
|
|
2951
|
+
return item;
|
|
2952
|
+
const { conversation: _conversation, ...rest } = row;
|
|
2953
|
+
return rest;
|
|
2954
|
+
});
|
|
2955
|
+
return { ...data, frustrations };
|
|
2956
|
+
}
|
|
2936
2957
|
var NOT_FOUND_HINTS = {
|
|
2937
2958
|
trace: 'Find trace ids with: moda search "<text>" or moda traces --search=<text>',
|
|
2938
2959
|
cluster: "List cluster node ids with: moda clusters",
|
|
@@ -3963,7 +3984,7 @@ async function readAuditItem(command, params, budget) {
|
|
|
3963
3984
|
if (budget && !budget.fits(page.data, page.options)) {
|
|
3964
3985
|
page.options.warnings = [
|
|
3965
3986
|
...page.options.warnings ?? [],
|
|
3966
|
-
"This page is
|
|
3987
|
+
"This page is larger than the agent output budget even at the smallest page the server returns, so some of its spans are cut from this output. Rerun this command with --json (no byte limit) or a higher MODA_AGENT_MAX_OUTPUT_BYTES to see the whole row before following next_cursor."
|
|
3967
3988
|
];
|
|
3968
3989
|
}
|
|
3969
3990
|
return page;
|
|
@@ -4133,7 +4154,7 @@ async function runAuditBatch(command, positionals, flags, context) {
|
|
|
4133
4154
|
const base = parseCommandFlags(AuditSchema, flagsToArgs(rest, "id", targets[0].id), command, { positionalKey: "id" });
|
|
4134
4155
|
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4135
4156
|
const share = agentMode ? auditItemByteShare(targets.length) : undefined;
|
|
4136
|
-
const results = await mapWithConcurrency(targets, BATCH_CONCURRENCY, (target) => readBatchItem(target, () => readAuditItem(command, { ...base, id: target.id }, share !== undefined ? { maxBytes: share, fits: fitsShare(share) } : undefined)));
|
|
4157
|
+
const results = await mapWithConcurrency(targets, BATCH_CONCURRENCY, (target) => readBatchItem(target, () => readAuditItem(command, { ...base, id: target.id }, share !== undefined ? { maxBytes: Math.max(AUDIT_MIN_PAGE_BYTES, share), fits: fitsShare(share) } : undefined)));
|
|
4137
4158
|
return writeBatchResult(command, context, targets, results, [], rest);
|
|
4138
4159
|
}
|
|
4139
4160
|
async function runCommand(command, positional, flags, positionals = positional ? [positional] : [], context = createCommandContext({ command, positional, positionals, flags })) {
|
|
@@ -4397,7 +4418,10 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4397
4418
|
query2.set("conversation_id", params.conversation_id);
|
|
4398
4419
|
query2.set("family", "frustration");
|
|
4399
4420
|
const data = frustrationsFromEmotions(await callDataAPI(`/emotions?${query2.toString()}`));
|
|
4400
|
-
|
|
4421
|
+
const includeWindow = params.include_window === true;
|
|
4422
|
+
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4423
|
+
const anchored = withFrustrationAnchors(data);
|
|
4424
|
+
await printWithOptionalWindows(agentMode && !includeWindow ? withoutDetectionWindows(anchored, "frustrations", "conversation") : anchored, "frustrations", includeWindow, params.window ?? 1, context.output, processingDisabledWarning(data, "frustration"), agentMode && includeWindow ? (payload) => withoutRepeatedFrustrationWindow(payload) : undefined);
|
|
4401
4425
|
break;
|
|
4402
4426
|
}
|
|
4403
4427
|
case "tool-failures": {
|
|
@@ -4524,7 +4548,7 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4524
4548
|
break;
|
|
4525
4549
|
}
|
|
4526
4550
|
if (!positional) {
|
|
4527
|
-
throw new CliInputError("<problem_id> is required", "Usage: moda problem <problem_id> [--evidence|--reports|--traces|--feedback] [--limit=N] [--cursor=TOKEN] [--family=F] [--door=D]");
|
|
4551
|
+
throw new CliInputError("<problem_id> is required", "Usage: moda problem <problem_id> [--full | --evidence|--reports|--traces|--feedback] [--limit=N] [--cursor=TOKEN] [--family=F] [--door=D]");
|
|
4528
4552
|
}
|
|
4529
4553
|
const args = flagsToArgs(flags, "id", positional);
|
|
4530
4554
|
const params = parseCommandFlags(ProblemSchema, args, command, { positionalKey: "id" });
|
|
@@ -4535,10 +4559,25 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4535
4559
|
throw new CliInputError(`Choose at most one of --evidence, --reports, --traces, --feedback (got ${got}).`, "Usage: moda problem <problem_id> [--evidence|--reports|--traces|--feedback]");
|
|
4536
4560
|
}
|
|
4537
4561
|
const view = views[0];
|
|
4562
|
+
if (view !== undefined && params.full === true) {
|
|
4563
|
+
throw new CliInputError("--full applies to the dossier only; the --evidence/--reports/--traces/--feedback pages are always whole.", "Usage: moda problem <problem_id> [--full] | moda problem <problem_id> --evidence|--reports|--traces|--feedback");
|
|
4564
|
+
}
|
|
4538
4565
|
if (view === undefined) {
|
|
4539
4566
|
const data2 = await callDataAPI(`/problems/${encodeURIComponent(params.id)}`);
|
|
4540
4567
|
const record = asRecord(data2) ?? {};
|
|
4541
4568
|
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.`);
|
|
4569
|
+
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4570
|
+
if (agentMode) {
|
|
4571
|
+
const compact = compactProblemDossier(record, params.id);
|
|
4572
|
+
if (params.full === true) {
|
|
4573
|
+
context.output.writeData(data2, {
|
|
4574
|
+
nextCommands: compact.nextCommands.filter((next) => !next.command.endsWith(" --full"))
|
|
4575
|
+
});
|
|
4576
|
+
} else {
|
|
4577
|
+
context.output.writeData(compact.data, { nextCommands: compact.nextCommands });
|
|
4578
|
+
}
|
|
4579
|
+
break;
|
|
4580
|
+
}
|
|
4542
4581
|
context.output.writeData(data2);
|
|
4543
4582
|
break;
|
|
4544
4583
|
}
|
|
@@ -4894,8 +4933,11 @@ async function runCommand(command, positional, flags, positionals = positional ?
|
|
|
4894
4933
|
if (params.conversation_id)
|
|
4895
4934
|
query2.set("conversation_id", params.conversation_id);
|
|
4896
4935
|
const queryString = query2.toString() ? `?${query2.toString()}` : "";
|
|
4897
|
-
const
|
|
4898
|
-
const processingWarnings = processingDisabledWarning(
|
|
4936
|
+
const raw = await callDataAPI(`/emotions${queryString}`);
|
|
4937
|
+
const processingWarnings = processingDisabledWarning(raw, "emotion");
|
|
4938
|
+
const agentMode = context.output.mode === "agent" || context.output.mode === "agent-stream";
|
|
4939
|
+
const record = asRecord(raw);
|
|
4940
|
+
const data = agentMode && params.include_window !== true && record ? withoutDetectionWindows(record, "detections", "conversation_context") : raw;
|
|
4899
4941
|
context.output.writeData(data, processingWarnings.length > 0 ? { warnings: processingWarnings } : undefined);
|
|
4900
4942
|
break;
|
|
4901
4943
|
}
|
|
@@ -5095,7 +5137,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
5095
5137
|
resetApiRequestCountBeforeRun: true,
|
|
5096
5138
|
telemetry: "result-and-error",
|
|
5097
5139
|
handler: async (context) => {
|
|
5098
|
-
const { runInit } = await import("./index-
|
|
5140
|
+
const { runInit } = await import("./index-7zqa7t5c.js");
|
|
5099
5141
|
if (context.outputMode === "agent-stream") {
|
|
5100
5142
|
context.output.writeEvent({
|
|
5101
5143
|
event: "started",
|
|
@@ -5136,7 +5178,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
5136
5178
|
resetApiRequestCountBeforeRun: true,
|
|
5137
5179
|
telemetry: "result-and-error",
|
|
5138
5180
|
handler: async (context) => {
|
|
5139
|
-
const { runProvision } = await import("./provision-
|
|
5181
|
+
const { runProvision } = await import("./provision-n3r7yway.js");
|
|
5140
5182
|
return runProvision(context, {
|
|
5141
5183
|
resumeCommand: buildResumeCommand("provision", context.rawFlags)
|
|
5142
5184
|
});
|
|
@@ -5624,7 +5666,10 @@ var commandRegistry = createCommandRegistry([
|
|
|
5624
5666
|
legacyCommand({
|
|
5625
5667
|
name: "frustrations",
|
|
5626
5668
|
description: "User frustration detections: the frustration family of `emotions` (same data as the dashboard), legacy field names",
|
|
5627
|
-
examples: [
|
|
5669
|
+
examples: [
|
|
5670
|
+
"moda frustrations --days-back=14",
|
|
5671
|
+
"moda frustrations --days-back=14 --include-window # agent output omits conversation windows unless asked"
|
|
5672
|
+
],
|
|
5628
5673
|
...dataApiDefaults
|
|
5629
5674
|
}),
|
|
5630
5675
|
legacyCommand({
|
|
@@ -5671,6 +5716,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
5671
5716
|
description: "Open one Problem: dossier, or --evidence/--reports/--traces/--feedback pages (--conversations is a legacy alias of --traces)",
|
|
5672
5717
|
examples: [
|
|
5673
5718
|
"moda problem <problem_id>",
|
|
5719
|
+
"moda problem <problem_id> --full # whole dossier (agent output defaults to a compact one)",
|
|
5674
5720
|
"moda problem <problem_id> --evidence --limit=10",
|
|
5675
5721
|
"moda problem <problem_id> --reports",
|
|
5676
5722
|
"moda problem <problem_id> --traces --family=tool_failure",
|
|
@@ -5797,7 +5843,8 @@ var commandRegistry = createCommandRegistry([
|
|
|
5797
5843
|
description: "Multi-family emotion detections (frustration, disapproval, sadness, confusion, anxiety, trust, positive)",
|
|
5798
5844
|
examples: [
|
|
5799
5845
|
"moda emotions --days-back=7",
|
|
5800
|
-
"moda emotions --family=confusion --limit=20"
|
|
5846
|
+
"moda emotions --family=confusion --limit=20",
|
|
5847
|
+
"moda emotions --include-window # keep conversation windows in agent output"
|
|
5801
5848
|
],
|
|
5802
5849
|
...dataApiDefaults
|
|
5803
5850
|
}),
|