@moda-ai/cli 1.55.85 → 1.55.86
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-anya3x2b.js → agent-515pvq3z.js} +3 -3
- package/dist/{cli-aj336k6v.js → cli-gevrs592.js} +2 -2
- package/dist/{cli-v43q6cg9.js → cli-gqrt2rbm.js} +3 -3
- package/dist/{cli-7vywvw8v.js → cli-py31vwrx.js} +137 -22
- package/dist/cli.js +7 -7
- package/dist/{doctor-sa0q9ca6.js → doctor-k2xv4n03.js} +2 -2
- package/dist/{harness-github-actions-ma33g263.js → harness-github-actions-x2jgh0e8.js} +1 -1
- package/dist/{harness-w3fnq796.js → harness-tnhe63n3.js} +1 -1
- package/dist/{index-jvs3ksx6.js → index-69xwrmrh.js} +1 -1
- package/dist/{index-2bctz222.js → index-h9r08433.js} +1 -1
- package/dist/{index-zzyx7qgy.js → index-zfg5y1b9.js} +3 -3
- package/dist/{prompt-attribution-51shashb.js → prompt-attribution-v6c51r59.js} +1 -1
- package/dist/prompt-source-mcp.js +1 -1
- package/dist/{prompts-d484wq58.js → prompts-gsyrzgmg.js} +1 -1
- package/dist/{sync-tpkqgm6r.js → sync-60t12kz3.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-gevrs592.js";
|
|
4
4
|
import"./cli-rrggdmf8.js";
|
|
5
|
-
import"./cli-
|
|
5
|
+
import"./cli-gqrt2rbm.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-tnhe63n3.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-rrggdmf8.js";
|
|
5
5
|
import {
|
|
6
6
|
inspectPromptManifest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-gqrt2rbm.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-tnhe63n3.js");
|
|
399
399
|
const current = scanHarness({
|
|
400
400
|
rootDir: cwd,
|
|
401
401
|
scannerVersion: "doctor",
|
|
@@ -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-tnhe63n3.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-v6c51r59.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-tnhe63n3.js");
|
|
6106
6106
|
const result = await analyzeHarnessPrompts({
|
|
6107
6107
|
rootDir: root,
|
|
6108
6108
|
existing: manifest.sources,
|
|
@@ -18072,6 +18072,8 @@ class PromptResolver {
|
|
|
18072
18072
|
callersByName = new Map;
|
|
18073
18073
|
aliasesByName = new Map;
|
|
18074
18074
|
callersIndexed = false;
|
|
18075
|
+
resolvedCallers = new WeakMap;
|
|
18076
|
+
locallyWrittenParameters = new WeakMap;
|
|
18075
18077
|
methodIndex;
|
|
18076
18078
|
constructor(context, options) {
|
|
18077
18079
|
this.context = context;
|
|
@@ -18463,8 +18465,48 @@ class PromptResolver {
|
|
|
18463
18465
|
return;
|
|
18464
18466
|
}
|
|
18465
18467
|
const checker = this.context.checkerFor(this.relative(callee.expression.getSourceFile().fileName));
|
|
18466
|
-
const
|
|
18467
|
-
|
|
18468
|
+
const arrayType = (type, awaited = false) => {
|
|
18469
|
+
if (!type)
|
|
18470
|
+
return false;
|
|
18471
|
+
if (import_typescript8.default.isArrayTypeNode(type) || import_typescript8.default.isTupleTypeNode(type))
|
|
18472
|
+
return true;
|
|
18473
|
+
if (import_typescript8.default.isTypeOperatorNode(type))
|
|
18474
|
+
return arrayType(type.type, awaited);
|
|
18475
|
+
if (!import_typescript8.default.isTypeReferenceNode(type))
|
|
18476
|
+
return false;
|
|
18477
|
+
const name = type.typeName.getText();
|
|
18478
|
+
return /^(?:Readonly)?Array$/.test(name) || awaited && name === "Promise" && arrayType(type.typeArguments?.[0]);
|
|
18479
|
+
};
|
|
18480
|
+
const arraySeen = new Set;
|
|
18481
|
+
const isArrayReceiver = (expression, awaited = false) => {
|
|
18482
|
+
const raw = unwrapNode(expression);
|
|
18483
|
+
if (import_typescript8.default.isAwaitExpression(raw))
|
|
18484
|
+
return isArrayReceiver(raw.expression, true);
|
|
18485
|
+
const receiver = unwrap2(expression);
|
|
18486
|
+
if (arraySeen.has(receiver))
|
|
18487
|
+
return false;
|
|
18488
|
+
arraySeen.add(receiver);
|
|
18489
|
+
if (import_typescript8.default.isAwaitExpression(receiver))
|
|
18490
|
+
return isArrayReceiver(receiver.expression, true);
|
|
18491
|
+
if (import_typescript8.default.isIdentifier(receiver)) {
|
|
18492
|
+
for (const declaration of this.declarationsOf(receiver)) {
|
|
18493
|
+
if ((import_typescript8.default.isVariableDeclaration(declaration) || import_typescript8.default.isParameter(declaration)) && (arrayType(declaration.type) || declaration.initializer && isArrayReceiver(declaration.initializer)))
|
|
18494
|
+
return true;
|
|
18495
|
+
}
|
|
18496
|
+
}
|
|
18497
|
+
if (import_typescript8.default.isCallExpression(receiver)) {
|
|
18498
|
+
for (const declaration of this.declarationsOf(import_typescript8.default.isPropertyAccessExpression(receiver.expression) ? receiver.expression.name : receiver.expression)) {
|
|
18499
|
+
const fn = functionOf(declaration);
|
|
18500
|
+
if (fn && arrayType(fn.type, awaited))
|
|
18501
|
+
return true;
|
|
18502
|
+
}
|
|
18503
|
+
}
|
|
18504
|
+
const type = checker?.getTypeAtLocation(receiver);
|
|
18505
|
+
if (import_typescript8.default.isArrayLiteralExpression(this.objectLiteralOf(receiver) ?? receiver) || !!checker && !!type && (type.isUnion() ? type.types : [type]).every((item) => checker.isArrayType(item) || checker.isTupleType(item)))
|
|
18506
|
+
return true;
|
|
18507
|
+
return import_typescript8.default.isCallExpression(receiver) && import_typescript8.default.isPropertyAccessExpression(receiver.expression) && ARRAY_ASSEMBLY_METHODS.has(receiver.expression.name.text) && receiver.expression.name.text !== "join" && isArrayReceiver(receiver.expression.expression);
|
|
18508
|
+
};
|
|
18509
|
+
const arrayReceiver = isArrayReceiver(callee.expression);
|
|
18468
18510
|
if ((method === "find" || method === "findLast") && arrayReceiver) {
|
|
18469
18511
|
this.value(callee.expression, owner, { ...flag(walk, "dynamic-key"), project: [ARRAY_ELEMENT, ...walk.project] });
|
|
18470
18512
|
return;
|
|
@@ -18570,6 +18612,10 @@ class PromptResolver {
|
|
|
18570
18612
|
if (walk.seen.has(fn))
|
|
18571
18613
|
continue;
|
|
18572
18614
|
const name = functionName2(fn);
|
|
18615
|
+
if (walk.depth + 1 > this.maxDepth) {
|
|
18616
|
+
this.markUnresolved(call, "depth-limit", walk);
|
|
18617
|
+
continue;
|
|
18618
|
+
}
|
|
18573
18619
|
const next = this.step(walk, fn, `builder ${name ?? "function"} called at ${this.where(call)}`);
|
|
18574
18620
|
if (!next)
|
|
18575
18621
|
continue;
|
|
@@ -18676,6 +18722,8 @@ class PromptResolver {
|
|
|
18676
18722
|
return;
|
|
18677
18723
|
}
|
|
18678
18724
|
if (import_typescript8.default.isVariableDeclaration(declaration)) {
|
|
18725
|
+
if (/^\d+$/.test(next.project[0] ?? "") && this.assembly(declaration, ownerFor(declaration, name, owner), next, at, true))
|
|
18726
|
+
return;
|
|
18679
18727
|
if (!owner && next.flags.includes("interpolated") && declaration.initializer) {
|
|
18680
18728
|
let scope = declaration.parent;
|
|
18681
18729
|
while (scope && !import_typescript8.default.isFunctionLike(scope))
|
|
@@ -18749,12 +18797,12 @@ class PromptResolver {
|
|
|
18749
18797
|
if (fn)
|
|
18750
18798
|
this.builderBody(fn, { node: declaration, name, kind: "builder" }, next);
|
|
18751
18799
|
}
|
|
18752
|
-
assembly(declaration, owner, walk, at) {
|
|
18800
|
+
assembly(declaration, owner, walk, at, probe = false) {
|
|
18753
18801
|
if (!import_typescript8.default.isIdentifier(declaration.name))
|
|
18754
|
-
return;
|
|
18802
|
+
return false;
|
|
18755
18803
|
const scope = enclosingScope2(declaration);
|
|
18756
18804
|
if (!scope)
|
|
18757
|
-
return;
|
|
18805
|
+
return false;
|
|
18758
18806
|
const assignments = [];
|
|
18759
18807
|
const findRebinding = (node) => {
|
|
18760
18808
|
if (import_typescript8.default.isFunctionLike(node))
|
|
@@ -18800,7 +18848,7 @@ class PromptResolver {
|
|
|
18800
18848
|
return new Set;
|
|
18801
18849
|
const next = new Set(seen).add(value);
|
|
18802
18850
|
if (import_typescript8.default.isIdentifier(value)) {
|
|
18803
|
-
const entry = this.declarationsOf(value).find((item) => import_typescript8.default.isVariableDeclaration(item));
|
|
18851
|
+
const entry = this.declarationsOf(value).find((item) => import_typescript8.default.isVariableDeclaration(item) || import_typescript8.default.isParameter(item));
|
|
18804
18852
|
if (entry === declaration)
|
|
18805
18853
|
return versionsAt(value);
|
|
18806
18854
|
if (entry && import_typescript8.default.isVariableDeclaration(entry) && entry.initializer && entry.parent.flags & import_typescript8.default.NodeFlags.Const)
|
|
@@ -18911,15 +18959,24 @@ class PromptResolver {
|
|
|
18911
18959
|
});
|
|
18912
18960
|
};
|
|
18913
18961
|
const isThis = (identifier) => references(identifier);
|
|
18962
|
+
let indexedMutation = false;
|
|
18914
18963
|
const visit = (node) => {
|
|
18915
18964
|
if (import_typescript8.default.isFunctionLike(node) && !invoked(node))
|
|
18916
18965
|
return;
|
|
18917
18966
|
if (import_typescript8.default.isCallExpression(node) && import_typescript8.default.isPropertyAccessExpression(node.expression) && references(node.expression.expression) && /^(?:push|unshift|splice)$/.test(node.expression.name.text)) {
|
|
18967
|
+
if (/^\d+$/.test(walk.project[0] ?? "")) {
|
|
18968
|
+
indexedMutation = true;
|
|
18969
|
+
this.markUnresolved(node, "dynamic-key", walk);
|
|
18970
|
+
return;
|
|
18971
|
+
}
|
|
18972
|
+
if (probe)
|
|
18973
|
+
return;
|
|
18918
18974
|
const args = node.expression.name.text === "splice" ? node.arguments.slice(2) : node.arguments;
|
|
18975
|
+
const elementWalk = walk.project[0] === ARRAY_ELEMENT || walk.project[0] === FLATMAP_ELEMENT ? { ...walk, project: walk.project.slice(1) } : walk;
|
|
18919
18976
|
for (const argument of args)
|
|
18920
|
-
this.value(argument, owner,
|
|
18977
|
+
this.value(argument, owner, elementWalk);
|
|
18921
18978
|
}
|
|
18922
|
-
if (import_typescript8.default.isBinaryExpression(node) && import_typescript8.default.isIdentifier(node.left) && (isThis(node.left) || readVersions.has(node))) {
|
|
18979
|
+
if (!probe && import_typescript8.default.isBinaryExpression(node) && import_typescript8.default.isIdentifier(node.left) && (isThis(node.left) || readVersions.has(node))) {
|
|
18923
18980
|
if (node.operatorToken.kind === import_typescript8.default.SyntaxKind.PlusEqualsToken)
|
|
18924
18981
|
this.value(node.right, owner, walk);
|
|
18925
18982
|
if (node.operatorToken.kind === import_typescript8.default.SyntaxKind.EqualsToken && node.right !== declaration.initializer)
|
|
@@ -18928,8 +18985,37 @@ class PromptResolver {
|
|
|
18928
18985
|
import_typescript8.default.forEachChild(node, visit);
|
|
18929
18986
|
};
|
|
18930
18987
|
visit(scope);
|
|
18988
|
+
return indexedMutation;
|
|
18989
|
+
}
|
|
18990
|
+
parameterHasLocalWrites(parameter) {
|
|
18991
|
+
const cached = this.locallyWrittenParameters.get(parameter);
|
|
18992
|
+
if (cached !== undefined)
|
|
18993
|
+
return cached;
|
|
18994
|
+
let written = false;
|
|
18995
|
+
const name = import_typescript8.default.isIdentifier(parameter.name) ? parameter.name.text : undefined;
|
|
18996
|
+
const scope = enclosingScope2(parameter);
|
|
18997
|
+
const isParameter = (expression) => import_typescript8.default.isIdentifier(expression) && expression.text === name && this.declarationsOf(expression).includes(parameter);
|
|
18998
|
+
const visit = (node) => {
|
|
18999
|
+
if (written)
|
|
19000
|
+
return;
|
|
19001
|
+
if (import_typescript8.default.isBinaryExpression(node) && [import_typescript8.default.SyntaxKind.EqualsToken, import_typescript8.default.SyntaxKind.PlusEqualsToken].includes(node.operatorToken.kind)) {
|
|
19002
|
+
written = isParameter(node.left) || import_typescript8.default.isElementAccessExpression(node.left) && isParameter(node.left.expression);
|
|
19003
|
+
} else if (import_typescript8.default.isCallExpression(node) && import_typescript8.default.isPropertyAccessExpression(node.expression) && /^(?:push|unshift|splice)$/.test(node.expression.name.text)) {
|
|
19004
|
+
written = isParameter(node.expression.expression);
|
|
19005
|
+
}
|
|
19006
|
+
if (!written)
|
|
19007
|
+
import_typescript8.default.forEachChild(node, visit);
|
|
19008
|
+
};
|
|
19009
|
+
if (scope)
|
|
19010
|
+
visit(scope);
|
|
19011
|
+
this.locallyWrittenParameters.set(parameter, written);
|
|
19012
|
+
return written;
|
|
18931
19013
|
}
|
|
18932
19014
|
parameter(declaration, at, owner, walk) {
|
|
19015
|
+
if (import_typescript8.default.isParameter(declaration) && import_typescript8.default.isIdentifier(declaration.name) && !walk.seen.has(declaration) && this.parameterHasLocalWrites(declaration)) {
|
|
19016
|
+
const local = { ...walk, seen: new Set(walk.seen).add(declaration) };
|
|
19017
|
+
this.assembly(declaration, owner, local, at);
|
|
19018
|
+
}
|
|
18933
19019
|
const bound = walk.bindings.get(declaration);
|
|
18934
19020
|
if (bound) {
|
|
18935
19021
|
const project = [...bound.project ?? [], ...walk.project];
|
|
@@ -18991,6 +19077,9 @@ class PromptResolver {
|
|
|
18991
19077
|
}
|
|
18992
19078
|
}
|
|
18993
19079
|
callersOf(fn) {
|
|
19080
|
+
const cached = this.resolvedCallers.get(fn);
|
|
19081
|
+
if (cached)
|
|
19082
|
+
return cached;
|
|
18994
19083
|
const name = functionName2(fn);
|
|
18995
19084
|
if (!name)
|
|
18996
19085
|
return [];
|
|
@@ -18998,12 +19087,14 @@ class PromptResolver {
|
|
|
18998
19087
|
const names = [name, ...this.aliasesByName.get(name) ?? []];
|
|
18999
19088
|
const candidates = names.flatMap((alias) => this.callersByName.get(alias) ?? []);
|
|
19000
19089
|
const signatures = this.implementedSignatures(fn, name);
|
|
19001
|
-
|
|
19090
|
+
const callers = candidates.filter((call) => {
|
|
19002
19091
|
const callee = import_typescript8.default.isPropertyAccessExpression(call.expression) ? call.expression.name : call.expression;
|
|
19003
19092
|
const checker = this.context.checkerFor(this.relative(call.getSourceFile().fileName));
|
|
19004
19093
|
const members = checker && import_typescript8.default.isPropertyAccessExpression(call.expression) ? receiverClasses(call.expression.expression, checker).flatMap((cls) => cls.members.filter((member) => member.name?.getText() === name)) : [];
|
|
19005
19094
|
return [...this.declarationsOf(callee), ...members].some((declaration) => functionOf(declaration) === fn || declaration === fn || signatures.has(declaration) && !!checker && contextualReceiverMatches(call, fn, checker));
|
|
19006
19095
|
});
|
|
19096
|
+
this.resolvedCallers.set(fn, callers);
|
|
19097
|
+
return callers;
|
|
19007
19098
|
}
|
|
19008
19099
|
implementedSignatures(fn, name) {
|
|
19009
19100
|
const checker = this.context.checkerFor(this.relative(fn.getSourceFile().fileName));
|
|
@@ -19305,6 +19396,8 @@ function contains(outer, inner) {
|
|
|
19305
19396
|
return inner.getStart() >= outer.getStart() && inner.getEnd() <= outer.getEnd();
|
|
19306
19397
|
}
|
|
19307
19398
|
function enclosingScope2(declaration) {
|
|
19399
|
+
if (import_typescript8.default.isParameter(declaration) && import_typescript8.default.isFunctionLike(declaration.parent) && "body" in declaration.parent)
|
|
19400
|
+
return declaration.parent.body;
|
|
19308
19401
|
for (let node = declaration.parent;node; node = node.parent) {
|
|
19309
19402
|
if (import_typescript8.default.isBlock(node) || import_typescript8.default.isSourceFile(node) || import_typescript8.default.isModuleBlock(node))
|
|
19310
19403
|
return node;
|
|
@@ -19472,7 +19565,7 @@ function unresolvedReports(resolution, sites) {
|
|
|
19472
19565
|
const resolvedSites = new Set(resolution.refs.flatMap((ref) => ref.callSiteIds.map((id) => `${id}|${ref.role}`)));
|
|
19473
19566
|
const reports = new Map;
|
|
19474
19567
|
for (const value of resolution.unresolved) {
|
|
19475
|
-
if (resolvedSites.has(`${value.callSiteId}|${value.role}`))
|
|
19568
|
+
if (value.reason !== "depth-limit" && resolvedSites.has(`${value.callSiteId}|${value.role}`))
|
|
19476
19569
|
continue;
|
|
19477
19570
|
const site = sites.get(value.callSiteId);
|
|
19478
19571
|
if (!site)
|
|
@@ -19823,7 +19916,7 @@ async function runHarnessCommand(context) {
|
|
|
19823
19916
|
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.");
|
|
19824
19917
|
}
|
|
19825
19918
|
if (context.flags["github-actions"] === "true") {
|
|
19826
|
-
const { runGithubActionsAnalyze } = await import("./harness-github-actions-
|
|
19919
|
+
const { runGithubActionsAnalyze } = await import("./harness-github-actions-x2jgh0e8.js");
|
|
19827
19920
|
const result = await runGithubActionsAnalyze(rootDir, {
|
|
19828
19921
|
writeReport: (report2) => {
|
|
19829
19922
|
const normalized = normalizeHarnessReport(report2);
|
|
@@ -19974,8 +20067,8 @@ async function runHarnessCommand(context) {
|
|
|
19974
20067
|
}
|
|
19975
20068
|
const { artifacts, unknowns, canonicalAgentIdentities } = deterministicGraphItems(rootDir, promote === "all" ? undefined : promote);
|
|
19976
20069
|
tagComponentStatus({ runtimeAgents: [], artifacts }, rootDir);
|
|
19977
|
-
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-
|
|
19978
|
-
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-
|
|
20070
|
+
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-h9r08433.js");
|
|
20071
|
+
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-69xwrmrh.js");
|
|
19979
20072
|
let components = { runtimeAgents: [], artifacts: [], warnings: [] };
|
|
19980
20073
|
if (promote === "all" || promote === "topology" || promote === "tools") {
|
|
19981
20074
|
const { result, ctx } = extractHarnessWithContext2(rootDir);
|
|
@@ -20009,12 +20102,16 @@ async function runHarnessCommand(context) {
|
|
|
20009
20102
|
}
|
|
20010
20103
|
case "extract": {
|
|
20011
20104
|
writeHumanProgress(context, "Harness extract: tracing model call sites (no LLM, no network)...");
|
|
20012
|
-
const { extractHarnessWithContext: extractHarnessWithContext2, serializeExtractResult } = await import("./index-
|
|
20013
|
-
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-
|
|
20105
|
+
const { extractHarnessWithContext: extractHarnessWithContext2, serializeExtractResult } = await import("./index-h9r08433.js");
|
|
20106
|
+
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-69xwrmrh.js");
|
|
20014
20107
|
const { result, ctx } = extractHarnessWithContext2(rootDir, { fresh: true });
|
|
20015
|
-
const
|
|
20108
|
+
const items = deterministicGraphItems(rootDir);
|
|
20109
|
+
const artifacts = items.artifacts;
|
|
20016
20110
|
tagComponentStatus({ runtimeAgents: [], artifacts }, rootDir);
|
|
20017
|
-
const graph =
|
|
20111
|
+
const graph = {
|
|
20112
|
+
...mergeEnumeratedComponents(artifacts, enumerateHarnessComponents(result, ctx)),
|
|
20113
|
+
unknowns: items.unknowns.filter((item) => item.id.startsWith("unresolved_prompt_depth_"))
|
|
20114
|
+
};
|
|
20018
20115
|
writeHumanProgress(context, `Harness extract: ${result.callSites.length} call sites, ${result.roles.length} traced roles across ${result.files} files (${result.programs} programs, ${result.durationMs.toLocaleString()} ms).`);
|
|
20019
20116
|
context.output.writeData({ ...serializeExtractResult(result), graph }, {
|
|
20020
20117
|
status: result.warnings.length > 0 ? "degraded" : "success",
|
|
@@ -20913,8 +21010,8 @@ var CONCERN_PROMOTED_ARTIFACT_TYPES = {
|
|
|
20913
21010
|
evals: new Set(["model_config", "eval"])
|
|
20914
21011
|
};
|
|
20915
21012
|
async function deterministicFloorGraph(rootDir, options = {}) {
|
|
20916
|
-
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-
|
|
20917
|
-
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-
|
|
21013
|
+
const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-h9r08433.js");
|
|
21014
|
+
const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-69xwrmrh.js");
|
|
20918
21015
|
const { result, ctx } = extractHarnessWithContext2(rootDir);
|
|
20919
21016
|
const items = deterministicGraphItems(rootDir);
|
|
20920
21017
|
const components = mergeEnumeratedComponents(items.artifacts, enumerateHarnessComponents(result, ctx));
|
|
@@ -21062,7 +21159,7 @@ function mergeDeterministicArtifacts(graph, rootDir, options = {}) {
|
|
|
21062
21159
|
try {
|
|
21063
21160
|
promoted = promoteHarnessCandidates(detectHarnessCandidates(rootDir), rootDir, { fullEvidence: true });
|
|
21064
21161
|
if (!allowedTypes || allowedTypes.has("prompt"))
|
|
21065
|
-
promoted = withCallSitePrompts(rootDir, promoted);
|
|
21162
|
+
promoted = withCallSitePrompts(rootDir, promoted, graph.unknowns ??= []);
|
|
21066
21163
|
} catch {
|
|
21067
21164
|
promoted = [];
|
|
21068
21165
|
}
|
|
@@ -21203,14 +21300,32 @@ function remapCanonicalArtifactAgents(graph, artifacts = graph.artifacts, dropUn
|
|
|
21203
21300
|
});
|
|
21204
21301
|
}
|
|
21205
21302
|
}
|
|
21206
|
-
function withCallSitePrompts(rootDir, promoted) {
|
|
21303
|
+
function withCallSitePrompts(rootDir, promoted, unknowns = []) {
|
|
21207
21304
|
if (process.env.MODA_HARNESS_CALLSITE_PROMPTS === "0")
|
|
21208
21305
|
return promoted;
|
|
21209
21306
|
try {
|
|
21210
21307
|
const { result, ctx } = extractHarnessWithContext(rootDir);
|
|
21211
21308
|
const sites = result.callSites.filter((site) => !site.isTest);
|
|
21212
21309
|
const toolDefinitions = result.toolDefinitions ?? [];
|
|
21213
|
-
|
|
21310
|
+
const assembled = promptArtifactsFromCallSites(sites, ctx, promoted, { toolDefinitions, agentForScope: createAgentScopeResolver(result, ctx) });
|
|
21311
|
+
for (const report of assembled.unresolved) {
|
|
21312
|
+
const limited = report.values.filter((value) => value.reason === "depth-limit");
|
|
21313
|
+
if (!limited.length)
|
|
21314
|
+
continue;
|
|
21315
|
+
const id = stableId("unresolved_prompt_depth", `${report.callSiteId}:${report.role}`);
|
|
21316
|
+
if (unknowns.some((unknown) => unknown.id === id))
|
|
21317
|
+
continue;
|
|
21318
|
+
unknowns.push({
|
|
21319
|
+
id,
|
|
21320
|
+
question: `trace depth limit: ${report.role} prompt at ${report.path}:${report.line} has unresolved source paths.`,
|
|
21321
|
+
candidateIds: [],
|
|
21322
|
+
evidence: [
|
|
21323
|
+
{ path: report.path, line: report.line, reason: "trace depth limit at model call site" },
|
|
21324
|
+
...limited.map((value) => ({ path: value.path, line: value.line, reason: `trace depth limit: ${value.expression}` }))
|
|
21325
|
+
]
|
|
21326
|
+
});
|
|
21327
|
+
}
|
|
21328
|
+
return assembled.artifacts;
|
|
21214
21329
|
} catch {
|
|
21215
21330
|
return promoted;
|
|
21216
21331
|
}
|
package/dist/cli.js
CHANGED
|
@@ -2975,25 +2975,25 @@ function leafManifestFields(leaf, commands) {
|
|
|
2975
2975
|
import { fileURLToPath } from "url";
|
|
2976
2976
|
import { realpathSync } from "fs";
|
|
2977
2977
|
async function runPromptsCommand(...args) {
|
|
2978
|
-
return (await import("./prompts-
|
|
2978
|
+
return (await import("./prompts-gsyrzgmg.js")).runPromptsCommand(...args);
|
|
2979
2979
|
}
|
|
2980
2980
|
async function runSkillsCommand(...args) {
|
|
2981
2981
|
return (await import("./skills-knpeqryb.js")).runSkillsCommand(...args);
|
|
2982
2982
|
}
|
|
2983
2983
|
async function runHarnessCommand(...args) {
|
|
2984
|
-
return (await import("./harness-
|
|
2984
|
+
return (await import("./harness-tnhe63n3.js")).runHarnessCommand(...args);
|
|
2985
2985
|
}
|
|
2986
2986
|
async function runSyncCommand(...args) {
|
|
2987
|
-
return (await import("./sync-
|
|
2987
|
+
return (await import("./sync-60t12kz3.js")).runSyncCommand(...args);
|
|
2988
2988
|
}
|
|
2989
2989
|
async function runRegistryCommand(...args) {
|
|
2990
2990
|
return (await import("./registry-c64qr7ta.js")).runRegistryCommand(...args);
|
|
2991
2991
|
}
|
|
2992
2992
|
async function runDoctorCommand(...args) {
|
|
2993
|
-
return (await import("./doctor-
|
|
2993
|
+
return (await import("./doctor-k2xv4n03.js")).runDoctorCommand(...args);
|
|
2994
2994
|
}
|
|
2995
2995
|
async function runStatusCommand(...args) {
|
|
2996
|
-
return (await import("./doctor-
|
|
2996
|
+
return (await import("./doctor-k2xv4n03.js")).runStatusCommand(...args);
|
|
2997
2997
|
}
|
|
2998
2998
|
async function runAuthCommand(...args) {
|
|
2999
2999
|
return (await import("./profile-commands-1fdvrs5y.js")).runAuthCommand(...args);
|
|
@@ -3005,7 +3005,7 @@ async function runProfilesCommand(...args) {
|
|
|
3005
3005
|
return (await import("./profile-commands-1fdvrs5y.js")).runProfilesCommand(...args);
|
|
3006
3006
|
}
|
|
3007
3007
|
async function runAgentCommand(...args) {
|
|
3008
|
-
return (await import("./agent-
|
|
3008
|
+
return (await import("./agent-515pvq3z.js")).runAgentCommand(...args);
|
|
3009
3009
|
}
|
|
3010
3010
|
async function runProductionCommand(...args) {
|
|
3011
3011
|
return (await import("./production-intelligence-f9sd68te.js")).runProductionCommand(...args);
|
|
@@ -6769,7 +6769,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
6769
6769
|
resetApiRequestCountBeforeRun: true,
|
|
6770
6770
|
telemetry: "result-and-error",
|
|
6771
6771
|
handler: async (context) => {
|
|
6772
|
-
const { runInit } = await import("./index-
|
|
6772
|
+
const { runInit } = await import("./index-zfg5y1b9.js");
|
|
6773
6773
|
if (context.outputMode === "agent-stream") {
|
|
6774
6774
|
context.output.writeEvent({
|
|
6775
6775
|
event: "started",
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
promptsDiscoveredCheck,
|
|
4
4
|
runDoctorCommand,
|
|
5
5
|
runStatusCommand
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-gevrs592.js";
|
|
7
7
|
import"./cli-rrggdmf8.js";
|
|
8
|
-
import"./cli-
|
|
8
|
+
import"./cli-gqrt2rbm.js";
|
|
9
9
|
import"./cli-mm48br00.js";
|
|
10
10
|
import"./cli-k0vxtzxb.js";
|
|
11
11
|
import"./cli-22yvg5kh.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDoctorReport
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-gevrs592.js";
|
|
4
4
|
import {
|
|
5
5
|
selectTenantAndCreateKey
|
|
6
6
|
} from "./cli-n1406hqg.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
initPrompts,
|
|
22
22
|
runPromptSync
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-gqrt2rbm.js";
|
|
24
24
|
import {
|
|
25
25
|
agentsMdProblem,
|
|
26
26
|
runSkillSync
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
runCodingAgent,
|
|
47
47
|
runHarnessCommand,
|
|
48
48
|
startRemoteAnalyze
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-py31vwrx.js";
|
|
50
50
|
import {
|
|
51
51
|
canonicalText,
|
|
52
52
|
renderInitBanner,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPromptsCommand
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-gqrt2rbm.js";
|
|
4
4
|
import {
|
|
5
5
|
runSkillsCommand
|
|
6
6
|
} from "./cli-1smcq5pf.js";
|
|
@@ -10,7 +10,7 @@ import"./cli-hcwdz9sd.js";
|
|
|
10
10
|
import"./cli-mm48br00.js";
|
|
11
11
|
import {
|
|
12
12
|
runHarnessCommand
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-py31vwrx.js";
|
|
14
14
|
import"./cli-k0vxtzxb.js";
|
|
15
15
|
import"./cli-97fnztpy.js";
|
|
16
16
|
import"./cli-y333w08f.js";
|
package/package.json
CHANGED