agentxchain 2.155.7 → 2.155.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentxchain",
3
- "version": "2.155.7",
3
+ "version": "2.155.8",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -768,9 +768,13 @@ async function dispatchIdleExpansion(context, session, contOpts, absVisionPath,
768
768
  ``,
769
769
  `The JSON object MUST have this shape:`,
770
770
  ` { "kind": "new_intake_intent", "expansion_iteration": ${currentIteration},`,
771
- ` "title": "...", "priority": "p1|p2|p3", "template": "generic",`,
772
- ` "charter": "...", "acceptance_contract": ["criterion 1", ...],`,
773
- ` "vision_traceability": { "headings": ["heading from snapshot"], "rationale": "..." } }`,
771
+ ` "new_intake_intent": {`,
772
+ ` "title": "...", "priority": "p1|p2|p3", "template": "generic",`,
773
+ ` "charter": "...", "acceptance_contract": ["criterion 1", ...]`,
774
+ ` },`,
775
+ ` "vision_traceability": [`,
776
+ ` { "vision_heading": "heading from snapshot", "goal": "what this advances", "kind": "advances" }`,
777
+ ` ] }`,
774
778
  `OR:`,
775
779
  ` { "kind": "vision_exhausted", "expansion_iteration": ${currentIteration},`,
776
780
  ` "headings": [{"heading": "...", "status": "complete|deferred|out_of_scope", "reason": "..."}] }`,
@@ -566,6 +566,15 @@ function normalizeIdleExpansionSidecar(sidecar, context) {
566
566
  }
567
567
 
568
568
  function normalizeVisionTraceabilityForTurnResult(traceability) {
569
+ // Handle object-shaped traceability: { headings: [...], rationale: "..." }
570
+ if (traceability && typeof traceability === 'object' && !Array.isArray(traceability) && Array.isArray(traceability.headings)) {
571
+ const rationale = traceability.rationale || '';
572
+ return traceability.headings.map((h) => {
573
+ if (typeof h === 'string') return { vision_heading: h, goal: rationale, kind: 'advances' };
574
+ if (h && typeof h === 'object') return { vision_heading: h.heading || h.vision_heading || '', goal: h.goal || h.rationale || rationale, kind: h.kind || 'advances' };
575
+ return { vision_heading: String(h), goal: rationale, kind: 'advances' };
576
+ });
577
+ }
569
578
  if (!Array.isArray(traceability)) {
570
579
  return traceability;
571
580
  }