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.
package/dist/marvin.js CHANGED
@@ -26053,6 +26053,7 @@ function generateProposedActions(issues) {
26053
26053
  // src/skills/builtin/jira/sprint-progress.ts
26054
26054
  import { query as query3 } from "@anthropic-ai/claude-agent-sdk";
26055
26055
  var DONE_STATUSES15 = /* @__PURE__ */ new Set(["done", "closed", "resolved", "obsolete", "wont do", "cancelled"]);
26056
+ var PROGRESS_DONE_STATUSES = /* @__PURE__ */ new Set(["done", "closed", "resolved", "obsolete", "wont do"]);
26056
26057
  var BATCH_SIZE = 5;
26057
26058
  var MAX_LINKED_ISSUES = 50;
26058
26059
  var BLOCKED_WEIGHT_RISK_THRESHOLD = 0.3;
@@ -26979,8 +26980,16 @@ async function _assessArtifactRecursive(store, client, host, options, visited, d
26979
26980
  children.push(childReport);
26980
26981
  }
26981
26982
  if (children.length > 0) {
26983
+ const childProgressValues = children.map((c) => {
26984
+ const updates = c.appliedUpdates.length > 0 ? c.appliedUpdates : c.proposedUpdates;
26985
+ const lastStatus = findLast(updates, (u) => u.field === "status");
26986
+ if (lastStatus && PROGRESS_DONE_STATUSES.has(String(lastStatus.proposedValue))) return 100;
26987
+ const lastProgress = findLast(updates, (u) => u.field === "progress");
26988
+ if (lastProgress) return lastProgress.proposedValue;
26989
+ return c.marvinProgress;
26990
+ });
26982
26991
  const rolledUpProgress = Math.round(
26983
- children.reduce((s, c) => s + c.marvinProgress, 0) / children.length
26992
+ childProgressValues.reduce((s, p) => s + p, 0) / childProgressValues.length
26984
26993
  );
26985
26994
  if (rolledUpProgress !== currentProgress) {
26986
26995
  proposedUpdates.push({
@@ -26996,7 +27005,7 @@ async function _assessArtifactRecursive(store, client, host, options, visited, d
26996
27005
  const appliedUpdates = [];
26997
27006
  if (options.applyUpdates && proposedUpdates.length > 0) {
26998
27007
  const doneArtifacts = new Set(
26999
- proposedUpdates.filter((u) => u.field === "status" && DONE_STATUSES15.has(String(u.proposedValue))).map((u) => u.artifactId)
27008
+ proposedUpdates.filter((u) => u.field === "status" && PROGRESS_DONE_STATUSES.has(String(u.proposedValue))).map((u) => u.artifactId)
27000
27009
  );
27001
27010
  for (const update of proposedUpdates) {
27002
27011
  if (update.field === "review") continue;
@@ -27324,6 +27333,12 @@ function formatArtifactChild(parts, child, depth) {
27324
27333
  formatArtifactChild(parts, grandchild, depth + 1);
27325
27334
  }
27326
27335
  }
27336
+ function findLast(arr, predicate) {
27337
+ for (let i = arr.length - 1; i >= 0; i--) {
27338
+ if (predicate(arr[i])) return arr[i];
27339
+ }
27340
+ return void 0;
27341
+ }
27327
27342
 
27328
27343
  // src/skills/builtin/jira/tools.ts
27329
27344
  var JIRA_TYPE = "jira-issue";
@@ -33567,7 +33582,7 @@ function createProgram() {
33567
33582
  const program2 = new Command();
33568
33583
  program2.name("marvin").description(
33569
33584
  "AI-powered product development assistant with Product Owner, Delivery Manager, and Technical Lead personas"
33570
- ).version("0.5.21");
33585
+ ).version("0.5.22");
33571
33586
  program2.command("init").description("Initialize a new Marvin project in the current directory").action(async () => {
33572
33587
  await initCommand();
33573
33588
  });