@kaddo/mcp 3.55.0 → 3.56.0

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.
Files changed (2) hide show
  1. package/dist/index.js +32 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2542,12 +2542,23 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
2542
2542
  if (oq.summary.blocking_open > 0) {
2543
2543
  return { id: "questions", phase: "Knowledge Refinement", label: "Run `kaddo questions` to see source locations and resolution guidance, then resolve, assume or defer the blocking open questions.", command: "kaddo questions", reason: `${oq.summary.blocking_open} blocking open question(s) remain.` };
2544
2544
  }
2545
+ const st = buildDeliveryState(dir);
2546
+ const secondary = buildSecondaryRecommendations(st);
2545
2547
  const roadmap = roadmapSignal(dir);
2548
+ if (roadmap !== "has-candidates" && st.draft_work_items > 0) {
2549
+ return {
2550
+ id: "refine-work-item",
2551
+ phase: "Active Delivery",
2552
+ label: "Refine the existing draft Work Item with the work-item-agent.",
2553
+ agent: "work-item-agent",
2554
+ skill: "work-item-refinement",
2555
+ reason: `There ${st.draft_work_items === 1 ? "is" : "are"} ${st.draft_work_items} draft Work Item${st.draft_work_items === 1 ? "" : "s"}. Refine before defining roadmap candidates.`,
2556
+ ...secondary.length ? { secondary } : {}
2557
+ };
2558
+ }
2546
2559
  if (roadmap !== "has-candidates") {
2547
2560
  return { id: "roadmap", phase: "Planning", label: "Use roadmap-agent to define roadmap candidates (`kaddo roadmap`).", command: "kaddo roadmap", agent: "roadmap-agent", target: "knowledge/delivery/roadmap.md", reason: "The roadmap has no candidates yet." };
2548
2561
  }
2549
- const st = buildDeliveryState(dir);
2550
- const secondary = buildSecondaryRecommendations(st);
2551
2562
  if (st.total_work_items === 0) {
2552
2563
  return {
2553
2564
  id: "create-work-item",
@@ -5617,7 +5628,25 @@ function isValidSource(s) {
5617
5628
  return VALID_SOURCES.includes(s);
5618
5629
  }
5619
5630
  function parseWorkItemSource(frontmatter) {
5620
- const raw = frontmatter.source ? String(frontmatter.source) : "";
5631
+ const rawSource = frontmatter.source;
5632
+ if (rawSource != null && typeof rawSource === "object" && !Array.isArray(rawSource)) {
5633
+ const obj = rawSource;
5634
+ const t = optStr(obj.type);
5635
+ const type = t && isValidSource(t) ? t : "unknown";
5636
+ return {
5637
+ type,
5638
+ id: optStr(obj.id) ?? optStr(frontmatter.source_id),
5639
+ title: optStr(obj.title) ?? optStr(frontmatter.source_title),
5640
+ context: optStr(obj.context) ?? optStr(frontmatter.source_context),
5641
+ provider: optStr(obj.provider) ?? optStr(frontmatter.source_provider),
5642
+ url: optStr(obj.url) ?? optStr(frontmatter.source_url),
5643
+ imported_at: optStr(obj.imported_at) ?? optStr(frontmatter.source_imported_at),
5644
+ synced_at: optStr(obj.synced_at) ?? optStr(frontmatter.source_synced_at),
5645
+ inferred: obj.inferred === true || obj.inferred === "true",
5646
+ reason: t && !isValidSource(t) ? `Invalid source type in object: "${t}".` : void 0
5647
+ };
5648
+ }
5649
+ const raw = rawSource ? String(rawSource) : "";
5621
5650
  if (raw && isValidSource(raw)) {
5622
5651
  return {
5623
5652
  type: raw,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/mcp",
3
- "version": "3.55.0",
3
+ "version": "3.56.0",
4
4
  "description": "MCP server for Kaddo project knowledge: read-only resources/tools/prompts plus safe derived generation under .kaddo/.",
5
5
  "license": "MIT",
6
6
  "repository": {