@moda-ai/cli 1.55.53 → 1.55.54
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-0wpfk7ed.js → agent-rmmtap23.js} +3 -3
- package/dist/{cli-thhggczw.js → cli-4vc2cksg.js} +2 -2
- package/dist/{cli-7nghchj8.js → cli-7ye5004e.js} +40 -6
- package/dist/{cli-r4k0yfkt.js → cli-c1vmgdjb.js} +3 -3
- package/dist/cli.js +7 -7
- package/dist/{doctor-wstqcfm4.js → doctor-b34em2fm.js} +2 -2
- package/dist/{harness-github-actions-1031t1kt.js → harness-github-actions-rayyxh1w.js} +1 -1
- package/dist/{harness-3bcakwrv.js → harness-jcqwf5h6.js} +1 -1
- package/dist/{index-msk4gfn5.js → index-cqnp8pfv.js} +3 -3
- package/dist/{prompt-attribution-2687ns4k.js → prompt-attribution-gyx0g661.js} +1 -1
- package/dist/prompt-source-mcp.js +1 -1
- package/dist/{prompts-887e9w1v.js → prompts-s4y90zs7.js} +1 -1
- package/dist/{sync-dxnw1mwa.js → sync-qxf3gkhy.js} +2 -2
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDoctorReport
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-4vc2cksg.js";
|
|
4
4
|
import"./cli-rdh9jjr2.js";
|
|
5
|
-
import"./cli-
|
|
5
|
+
import"./cli-c1vmgdjb.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
7
|
import {
|
|
8
8
|
readHarnessSyncState
|
|
@@ -95,7 +95,7 @@ async function buildAgentContext(context) {
|
|
|
95
95
|
const graph = readHarnessGraphIfPresent(context.cwd);
|
|
96
96
|
const reportState = readHarnessReportState(context.cwd);
|
|
97
97
|
const syncState = readHarnessSyncState(context.cwd);
|
|
98
|
-
const harness = graph ? await import("./harness-
|
|
98
|
+
const harness = graph ? await import("./harness-jcqwf5h6.js") : undefined;
|
|
99
99
|
const topFindings = doctor.checks.filter((check) => check.status === "fail" || check.status === "warning").slice(0, 12).map(checkToFinding);
|
|
100
100
|
const evidenceRefs = [
|
|
101
101
|
...doctor.checks.map(checkToEvidenceRef),
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./cli-rdh9jjr2.js";
|
|
5
5
|
import {
|
|
6
6
|
inspectPromptManifest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-c1vmgdjb.js";
|
|
8
8
|
import {
|
|
9
9
|
readHarnessSyncState,
|
|
10
10
|
renderDoctorHuman,
|
|
@@ -395,7 +395,7 @@ async function harnessCurrentCheck(cwd, manifestPath, manifestExists, tenantId)
|
|
|
395
395
|
};
|
|
396
396
|
}
|
|
397
397
|
try {
|
|
398
|
-
const { scanHarness } = await import("./harness-
|
|
398
|
+
const { scanHarness } = await import("./harness-jcqwf5h6.js");
|
|
399
399
|
const current = scanHarness({
|
|
400
400
|
rootDir: cwd,
|
|
401
401
|
scannerVersion: "doctor",
|
|
@@ -12320,6 +12320,7 @@ var LINE_PATTERNS = [
|
|
|
12320
12320
|
];
|
|
12321
12321
|
var CODE_EXTENSIONS = new Set([...JS, ...PY]);
|
|
12322
12322
|
var PROMPT_DOC_EXTENSIONS = new Set([".md", ".mdc", ".txt", ".prompt", ".jinja", ".jinja2", ".j2", ".hbs", ".tpl"]);
|
|
12323
|
+
var UPPERCASE_DOC_NAME = /^[A-Z0-9][A-Z0-9_-]*\.(?:md|mdc|txt)$/;
|
|
12323
12324
|
var NON_PROMPT_DOC_BASENAMES = new Set([
|
|
12324
12325
|
"readme.md",
|
|
12325
12326
|
"agents.md",
|
|
@@ -12536,7 +12537,7 @@ function detectPromptFile(file, out) {
|
|
|
12536
12537
|
} else if (PROMPTS_DIR.test(dir)) {
|
|
12537
12538
|
confidence2 = "high";
|
|
12538
12539
|
signal = "prompt_file.prompts_dir";
|
|
12539
|
-
} else if (dirHint && score >= 3) {
|
|
12540
|
+
} else if (dirHint && score >= 3 && !UPPERCASE_DOC_NAME.test(basename5(file.path))) {
|
|
12540
12541
|
confidence2 = "medium";
|
|
12541
12542
|
signal = "prompt_file.agent_dir_instruction_text";
|
|
12542
12543
|
} else if (score >= 5) {
|
|
@@ -13632,6 +13633,36 @@ function promoteToolCandidate(candidate, rootDir, confidence2, fileCache) {
|
|
|
13632
13633
|
body: extractToolBody({ path: candidate.path, rootDir }, { name, reason: candidate.signal })
|
|
13633
13634
|
};
|
|
13634
13635
|
}
|
|
13636
|
+
var UTILITY_EXPORT = /^(?:classify|measure|log|count|parse|validate|detect|is|has|should|estimate|truncate|strip|normalize|hash)(?:[A-Z_]|$)/;
|
|
13637
|
+
var BUILDER_VERB = /^(?:build|render|compose|assemble|generate)(?:[A-Z_]|$)/;
|
|
13638
|
+
var PROMPT_NOUN_LAST = /(?:prompt|instructions?|section|block|template|system)(?:_?for[_A-Z]\w*)?$/i;
|
|
13639
|
+
function exportedNames(path, lines) {
|
|
13640
|
+
const python = path.endsWith(".py");
|
|
13641
|
+
return lines.flatMap((line) => {
|
|
13642
|
+
if (python) {
|
|
13643
|
+
const match = /^(?:async\s+)?(?:def|class)\s+([A-Za-z]\w*)|^([A-Za-z]\w*)\s*(?::[^=]+)?=(?!=)/.exec(line);
|
|
13644
|
+
return match ? [match[1] ?? match[2]] : [];
|
|
13645
|
+
}
|
|
13646
|
+
const declared = /^\s*export\s+(?:default\s+)?(?:async\s+)?(?:function\*?|const|let|var|class)\s+([A-Za-z_$][\w$]*)/.exec(line);
|
|
13647
|
+
if (declared)
|
|
13648
|
+
return [declared[1]];
|
|
13649
|
+
const commonJs = /^\s*(?:module\.)?exports\.([A-Za-z_$][\w$]*)\s*=/.exec(line);
|
|
13650
|
+
if (commonJs)
|
|
13651
|
+
return [commonJs[1]];
|
|
13652
|
+
const list = /^\s*(?:export|module\.exports\s*=)\s*\{([^}]*)\}/.exec(line);
|
|
13653
|
+
if (!list)
|
|
13654
|
+
return [];
|
|
13655
|
+
return list[1].split(",").flatMap((entry) => {
|
|
13656
|
+
const name = entry.trim().replace(/^type\s+/, "").split(/\s+as\s+|\s*:\s*/).pop()?.trim();
|
|
13657
|
+
return name && /^[A-Za-z_$][\w$]*$/.test(name) ? [name] : [];
|
|
13658
|
+
});
|
|
13659
|
+
});
|
|
13660
|
+
}
|
|
13661
|
+
function buildsPrompts(path, lines) {
|
|
13662
|
+
if (!lines)
|
|
13663
|
+
return false;
|
|
13664
|
+
return exportedNames(path, lines).some((name) => !UTILITY_EXPORT.test(name) && (BUILDER_VERB.test(name) || PROMPT_NOUN_LAST.test(name)));
|
|
13665
|
+
}
|
|
13635
13666
|
function promotePromptFileCandidate(candidate, confidence2) {
|
|
13636
13667
|
return {
|
|
13637
13668
|
id: stableId("prompt", candidate.path),
|
|
@@ -14469,7 +14500,7 @@ function promoteHarnessCandidates(report, rootDir) {
|
|
|
14469
14500
|
artifact = promoteToolCandidate(candidate, rootDir, confidence2, fileCache);
|
|
14470
14501
|
break;
|
|
14471
14502
|
case "prompt_file":
|
|
14472
|
-
if (candidate.signal === "prompt_module.name_hint")
|
|
14503
|
+
if (candidate.signal === "prompt_module.name_hint" && (TEST_PATH2.test(candidate.path) || !buildsPrompts(candidate.path, readFileLines(rootDir, candidate.path, fileCache))))
|
|
14473
14504
|
break;
|
|
14474
14505
|
artifact = promotePromptFileCandidate(candidate, confidence2);
|
|
14475
14506
|
break;
|
|
@@ -15067,7 +15098,7 @@ async function runHarnessCommand(context) {
|
|
|
15067
15098
|
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.");
|
|
15068
15099
|
}
|
|
15069
15100
|
if (context.flags["github-actions"] === "true") {
|
|
15070
|
-
const { runGithubActionsAnalyze } = await import("./harness-github-actions-
|
|
15101
|
+
const { runGithubActionsAnalyze } = await import("./harness-github-actions-rayyxh1w.js");
|
|
15071
15102
|
const result = await runGithubActionsAnalyze(rootDir, {
|
|
15072
15103
|
writeReport: (report2) => {
|
|
15073
15104
|
const normalized = normalizeHarnessReport(report2);
|
|
@@ -16034,7 +16065,8 @@ function artifactSourceKey(artifact) {
|
|
|
16034
16065
|
}
|
|
16035
16066
|
function graphCoversPromotedArtifact(graph, promoted) {
|
|
16036
16067
|
const promotedName = promoted.name.toLowerCase();
|
|
16037
|
-
const
|
|
16068
|
+
const isDefinitionLine = (entry) => typeof entry.line === "number" && !/^(?:passed to a model call|prompt-named literal referenced)/.test(entry.reason ?? "");
|
|
16069
|
+
const promotedLines = promoted.evidence.filter(isDefinitionLine);
|
|
16038
16070
|
const promotedSource = artifactSourceKey(promoted);
|
|
16039
16071
|
const isWholeFilePrompt = promoted.type === "prompt" && Boolean(promoted.sourcePath);
|
|
16040
16072
|
return graph.artifacts.some((existing) => {
|
|
@@ -16042,10 +16074,12 @@ function graphCoversPromotedArtifact(graph, promoted) {
|
|
|
16042
16074
|
return true;
|
|
16043
16075
|
if (existing.type === promoted.type && existing.name?.toLowerCase() === promotedName) {
|
|
16044
16076
|
const existingSource = artifactSourceKey(existing);
|
|
16045
|
-
|
|
16077
|
+
const existingLines = Array.isArray(existing.evidence) ? existing.evidence.filter(isDefinitionLine) : [];
|
|
16078
|
+
const distinctInline = !existing.sourcePath && !promoted.sourcePath && existingLines.length > 0 && promotedLines.length > 0;
|
|
16079
|
+
if (!existingSource || !promotedSource || existingSource === promotedSource && !distinctInline)
|
|
16046
16080
|
return true;
|
|
16047
16081
|
}
|
|
16048
|
-
if (existing.type === promoted.type && Array.isArray(existing.evidence) && existing.evidence.some((entry) =>
|
|
16082
|
+
if (existing.type === promoted.type && Array.isArray(existing.evidence) && existing.evidence.some((entry) => isDefinitionLine(entry) && promotedLines.some((line) => line.path === entry.path && line.line === entry.line))) {
|
|
16049
16083
|
return true;
|
|
16050
16084
|
}
|
|
16051
16085
|
if (isWholeFilePrompt && existing.sourcePath === promoted.sourcePath)
|
|
@@ -5768,7 +5768,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
|
|
|
5768
5768
|
const analyzedDefinitions = new Map;
|
|
5769
5769
|
if (flags["no-analyze"] !== "true") {
|
|
5770
5770
|
options.onProgress?.("Analyzing prompt sources before sync.");
|
|
5771
|
-
const { analyzeHarnessPrompts } = await import("./harness-
|
|
5771
|
+
const { analyzeHarnessPrompts } = await import("./harness-jcqwf5h6.js");
|
|
5772
5772
|
const result = await analyzeHarnessPrompts({
|
|
5773
5773
|
rootDir: process.cwd(),
|
|
5774
5774
|
existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
|
|
@@ -5796,7 +5796,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
|
|
|
5796
5796
|
const mergedSources = mergePromptSources(manifest.sources, extraSources);
|
|
5797
5797
|
const manifestUpdate = stableJson(mergedSources) === stableJson(mergePromptSources(manifest.sources, [])) ? undefined : $stringify({ version: 2, prompt_paths: manifest.promptPaths, sources: mergedSources });
|
|
5798
5798
|
const prompts = await discoverPrompts(extraSources);
|
|
5799
|
-
const { checkPromptAttribution } = await import("./prompt-attribution-
|
|
5799
|
+
const { checkPromptAttribution } = await import("./prompt-attribution-gyx0g661.js");
|
|
5800
5800
|
const attribution = checkPromptAttribution(process.cwd(), prompts.map((prompt) => prompt.key));
|
|
5801
5801
|
const brokenAttribution = attribution.references.filter((reference) => reference.status === "missing");
|
|
5802
5802
|
if (brokenAttribution.length) {
|
|
@@ -6102,7 +6102,7 @@ async function migratePromptManifest(options = {}) {
|
|
|
6102
6102
|
let addedSources = [];
|
|
6103
6103
|
let pendingSources = [];
|
|
6104
6104
|
if (options.discover) {
|
|
6105
|
-
const { analyzeHarnessPrompts } = await import("./harness-
|
|
6105
|
+
const { analyzeHarnessPrompts } = await import("./harness-jcqwf5h6.js");
|
|
6106
6106
|
const result = await analyzeHarnessPrompts({
|
|
6107
6107
|
rootDir: root,
|
|
6108
6108
|
existing: manifest.sources,
|
package/dist/cli.js
CHANGED
|
@@ -2968,25 +2968,25 @@ function leafManifestFields(leaf, commands) {
|
|
|
2968
2968
|
import { fileURLToPath } from "url";
|
|
2969
2969
|
import { realpathSync } from "fs";
|
|
2970
2970
|
async function runPromptsCommand(...args) {
|
|
2971
|
-
return (await import("./prompts-
|
|
2971
|
+
return (await import("./prompts-s4y90zs7.js")).runPromptsCommand(...args);
|
|
2972
2972
|
}
|
|
2973
2973
|
async function runSkillsCommand(...args) {
|
|
2974
2974
|
return (await import("./skills-mwftqzyk.js")).runSkillsCommand(...args);
|
|
2975
2975
|
}
|
|
2976
2976
|
async function runHarnessCommand(...args) {
|
|
2977
|
-
return (await import("./harness-
|
|
2977
|
+
return (await import("./harness-jcqwf5h6.js")).runHarnessCommand(...args);
|
|
2978
2978
|
}
|
|
2979
2979
|
async function runSyncCommand(...args) {
|
|
2980
|
-
return (await import("./sync-
|
|
2980
|
+
return (await import("./sync-qxf3gkhy.js")).runSyncCommand(...args);
|
|
2981
2981
|
}
|
|
2982
2982
|
async function runRegistryCommand(...args) {
|
|
2983
2983
|
return (await import("./registry-tv8fktxc.js")).runRegistryCommand(...args);
|
|
2984
2984
|
}
|
|
2985
2985
|
async function runDoctorCommand(...args) {
|
|
2986
|
-
return (await import("./doctor-
|
|
2986
|
+
return (await import("./doctor-b34em2fm.js")).runDoctorCommand(...args);
|
|
2987
2987
|
}
|
|
2988
2988
|
async function runStatusCommand(...args) {
|
|
2989
|
-
return (await import("./doctor-
|
|
2989
|
+
return (await import("./doctor-b34em2fm.js")).runStatusCommand(...args);
|
|
2990
2990
|
}
|
|
2991
2991
|
async function runAuthCommand(...args) {
|
|
2992
2992
|
return (await import("./profile-commands-nbaec4y9.js")).runAuthCommand(...args);
|
|
@@ -2998,7 +2998,7 @@ async function runProfilesCommand(...args) {
|
|
|
2998
2998
|
return (await import("./profile-commands-nbaec4y9.js")).runProfilesCommand(...args);
|
|
2999
2999
|
}
|
|
3000
3000
|
async function runAgentCommand(...args) {
|
|
3001
|
-
return (await import("./agent-
|
|
3001
|
+
return (await import("./agent-rmmtap23.js")).runAgentCommand(...args);
|
|
3002
3002
|
}
|
|
3003
3003
|
async function runProductionCommand(...args) {
|
|
3004
3004
|
return (await import("./production-intelligence-zek0rkzj.js")).runProductionCommand(...args);
|
|
@@ -6762,7 +6762,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
6762
6762
|
resetApiRequestCountBeforeRun: true,
|
|
6763
6763
|
telemetry: "result-and-error",
|
|
6764
6764
|
handler: async (context) => {
|
|
6765
|
-
const { runInit } = await import("./index-
|
|
6765
|
+
const { runInit } = await import("./index-cqnp8pfv.js");
|
|
6766
6766
|
if (context.outputMode === "agent-stream") {
|
|
6767
6767
|
context.output.writeEvent({
|
|
6768
6768
|
event: "started",
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-4vc2cksg.js";
|
|
7
7
|
import"./cli-rdh9jjr2.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-c1vmgdjb.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
10
|
import"./cli-xq45etg1.js";
|
|
11
11
|
import"./cli-gtke9wrw.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./cli-hcwdz9sd.js";
|
|
22
22
|
import {
|
|
23
23
|
buildDoctorReport
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-4vc2cksg.js";
|
|
25
25
|
import {
|
|
26
26
|
ConnectCodeError,
|
|
27
27
|
connectWithCode,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
initPrompts,
|
|
34
34
|
runPromptSync
|
|
35
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-c1vmgdjb.js";
|
|
36
36
|
import"./cli-mm48br00.js";
|
|
37
37
|
import {
|
|
38
38
|
codingAgentDisplayName,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
runCodingAgent,
|
|
47
47
|
runHarnessCommand,
|
|
48
48
|
startRemoteAnalyze
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-7ye5004e.js";
|
|
50
50
|
import {
|
|
51
51
|
stripAnsi
|
|
52
52
|
} from "./cli-97fnztpy.js";
|
|
@@ -6,11 +6,11 @@ import"./cli-rjav0vj1.js";
|
|
|
6
6
|
import"./cli-hcwdz9sd.js";
|
|
7
7
|
import {
|
|
8
8
|
runPromptsCommand
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-c1vmgdjb.js";
|
|
10
10
|
import"./cli-mm48br00.js";
|
|
11
11
|
import {
|
|
12
12
|
runHarnessCommand
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-7ye5004e.js";
|
|
14
14
|
import"./cli-97fnztpy.js";
|
|
15
15
|
import"./cli-xq45etg1.js";
|
|
16
16
|
import"./cli-gtke9wrw.js";
|
package/package.json
CHANGED