mrvn-cli 0.5.21 → 0.5.22

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.
@@ -19842,6 +19842,7 @@ function generateProposedActions(issues) {
19842
19842
  // src/skills/builtin/jira/sprint-progress.ts
19843
19843
  import { query as query2 } from "@anthropic-ai/claude-agent-sdk";
19844
19844
  var DONE_STATUSES6 = /* @__PURE__ */ new Set(["done", "closed", "resolved", "obsolete", "wont do", "cancelled"]);
19845
+ var PROGRESS_DONE_STATUSES = /* @__PURE__ */ new Set(["done", "closed", "resolved", "obsolete", "wont do"]);
19845
19846
  var BATCH_SIZE = 5;
19846
19847
  var MAX_LINKED_ISSUES = 50;
19847
19848
  var BLOCKED_WEIGHT_RISK_THRESHOLD = 0.3;
@@ -20768,8 +20769,16 @@ async function _assessArtifactRecursive(store, client, host, options, visited, d
20768
20769
  children.push(childReport);
20769
20770
  }
20770
20771
  if (children.length > 0) {
20772
+ const childProgressValues = children.map((c) => {
20773
+ const updates = c.appliedUpdates.length > 0 ? c.appliedUpdates : c.proposedUpdates;
20774
+ const lastStatus = findLast(updates, (u) => u.field === "status");
20775
+ if (lastStatus && PROGRESS_DONE_STATUSES.has(String(lastStatus.proposedValue))) return 100;
20776
+ const lastProgress = findLast(updates, (u) => u.field === "progress");
20777
+ if (lastProgress) return lastProgress.proposedValue;
20778
+ return c.marvinProgress;
20779
+ });
20771
20780
  const rolledUpProgress = Math.round(
20772
- children.reduce((s, c) => s + c.marvinProgress, 0) / children.length
20781
+ childProgressValues.reduce((s, p) => s + p, 0) / childProgressValues.length
20773
20782
  );
20774
20783
  if (rolledUpProgress !== currentProgress) {
20775
20784
  proposedUpdates.push({
@@ -20785,7 +20794,7 @@ async function _assessArtifactRecursive(store, client, host, options, visited, d
20785
20794
  const appliedUpdates = [];
20786
20795
  if (options.applyUpdates && proposedUpdates.length > 0) {
20787
20796
  const doneArtifacts = new Set(
20788
- proposedUpdates.filter((u) => u.field === "status" && DONE_STATUSES6.has(String(u.proposedValue))).map((u) => u.artifactId)
20797
+ proposedUpdates.filter((u) => u.field === "status" && PROGRESS_DONE_STATUSES.has(String(u.proposedValue))).map((u) => u.artifactId)
20789
20798
  );
20790
20799
  for (const update of proposedUpdates) {
20791
20800
  if (update.field === "review") continue;
@@ -21113,6 +21122,12 @@ function formatArtifactChild(parts, child, depth) {
21113
21122
  formatArtifactChild(parts, grandchild, depth + 1);
21114
21123
  }
21115
21124
  }
21125
+ function findLast(arr, predicate) {
21126
+ for (let i = arr.length - 1; i >= 0; i--) {
21127
+ if (predicate(arr[i])) return arr[i];
21128
+ }
21129
+ return void 0;
21130
+ }
21116
21131
 
21117
21132
  // src/skills/builtin/jira/tools.ts
21118
21133
  var JIRA_TYPE = "jira-issue";