agentxchain 2.155.9 → 2.155.10
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
|
@@ -479,7 +479,15 @@ function buildIdleExpansionValidationContext(state, opts, activeTurn) {
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
function maybeAttachIdleExpansionSidecar(root, stagingRel, turnResult, context) {
|
|
482
|
-
if (
|
|
482
|
+
if (turnResult?.idle_expansion_result !== undefined) {
|
|
483
|
+
// Normalize embedded idle_expansion_result in-place (same transforms as sidecar path)
|
|
484
|
+
const normalizedResult = normalizeIdleExpansionSidecar(turnResult.idle_expansion_result, context);
|
|
485
|
+
return {
|
|
486
|
+
turnResult: { ...turnResult, idle_expansion_result: normalizedResult },
|
|
487
|
+
warnings: [],
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
if (context.required !== true) {
|
|
483
491
|
return { turnResult, warnings: [] };
|
|
484
492
|
}
|
|
485
493
|
|
|
@@ -525,7 +533,24 @@ function normalizeIdleExpansionSidecar(sidecar, context) {
|
|
|
525
533
|
: context.expansionIteration,
|
|
526
534
|
};
|
|
527
535
|
|
|
528
|
-
|
|
536
|
+
let intent = sidecar.new_intake_intent || sidecar.proposed_intent;
|
|
537
|
+
// Normalize flat new_intake_intent fields: if the PM put title/charter at the
|
|
538
|
+
// top level instead of nesting under new_intake_intent, extract them.
|
|
539
|
+
if (sidecar.kind === 'new_intake_intent' && !intent && sidecar.title && sidecar.charter) {
|
|
540
|
+
intent = {
|
|
541
|
+
title: sidecar.title,
|
|
542
|
+
charter: sidecar.charter,
|
|
543
|
+
acceptance_contract: sidecar.acceptance_contract,
|
|
544
|
+
priority: sidecar.priority,
|
|
545
|
+
template: sidecar.template,
|
|
546
|
+
};
|
|
547
|
+
// Remove flat fields from result to avoid schema pollution
|
|
548
|
+
delete result.title;
|
|
549
|
+
delete result.charter;
|
|
550
|
+
delete result.acceptance_contract;
|
|
551
|
+
delete result.priority;
|
|
552
|
+
delete result.template;
|
|
553
|
+
}
|
|
529
554
|
if (sidecar.kind === 'new_intake_intent' && intent && typeof intent === 'object' && !Array.isArray(intent)) {
|
|
530
555
|
result.new_intake_intent = {
|
|
531
556
|
title: intent.title,
|