agentxchain 2.155.6 → 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
|
@@ -762,6 +762,25 @@ async function dispatchIdleExpansion(context, session, contOpts, absVisionPath,
|
|
|
762
762
|
`- Every proposed intent MUST cite at least one VISION.md heading from the snapshot below.`,
|
|
763
763
|
`- Output MUST be a structured idle_expansion_result (new_intake_intent or vision_exhausted).`,
|
|
764
764
|
``,
|
|
765
|
+
`OUTPUT FORMAT — you MUST do one of these:`,
|
|
766
|
+
`(a) Include "idle_expansion_result" as a top-level key in your turn-result.json, OR`,
|
|
767
|
+
`(b) Save the result as a sibling file named idle-expansion-result.json next to your turn-result.json in the staging directory.`,
|
|
768
|
+
``,
|
|
769
|
+
`The JSON object MUST have this shape:`,
|
|
770
|
+
` { "kind": "new_intake_intent", "expansion_iteration": ${currentIteration},`,
|
|
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
|
+
` ] }`,
|
|
778
|
+
`OR:`,
|
|
779
|
+
` { "kind": "vision_exhausted", "expansion_iteration": ${currentIteration},`,
|
|
780
|
+
` "headings": [{"heading": "...", "status": "complete|deferred|out_of_scope", "reason": "..."}] }`,
|
|
781
|
+
``,
|
|
782
|
+
`Do NOT just describe the result in text — you must produce the actual JSON object.`,
|
|
783
|
+
``,
|
|
765
784
|
`VISION headings snapshot:`,
|
|
766
785
|
visionHeadings || ' (none captured)',
|
|
767
786
|
``,
|
|
@@ -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
|
}
|