agentxchain 2.155.47 → 2.155.48

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.47",
3
+ "version": "2.155.48",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -492,6 +492,8 @@ function renderPrompt(role, roleId, turn, state, config, root) {
492
492
  lines.push('- `run_id`, `turn_id`, `role`, `runtime_id`: must match the values above exactly');
493
493
  lines.push('- `status`: one of `completed`, `blocked`, `needs_human`, `failed`. Do NOT use `complete`, `success`, `done`, or any other synonym — use the exact enum value `completed`.');
494
494
  lines.push('- `summary`: concise description of what you did this turn');
495
+ lines.push('- `decisions`: REQUIRED array. Use `[]` when no new decisions were made; do not omit the field.');
496
+ lines.push('- `objections`: REQUIRED array. Use `[]` when no objections are raised; review_only roles must include at least one objection.');
495
497
  lines.push('- `files_changed`: array of **strings** (file paths only). Do NOT use objects like `{path, change_type}` — just the path string (e.g. `["src/cli.js", "tests/smoke.mjs"]`).');
496
498
  lines.push('- `decisions[].id`: pattern `DEC-NNN` where NNN is digits only (e.g. `DEC-001`, `DEC-002`). Do NOT use `D1`, `D2`, or freeform IDs.');
497
499
  lines.push('- `decisions[].statement`: non-empty string describing the decision. Do NOT use `decision` or `description` as the field name — the field is `statement`.');
@@ -1018,6 +1018,30 @@ export function normalizeTurnResult(tr, config, context = {}) {
1018
1018
  const hasExplicitNoEditLifecycleSignal = normalized.run_completion_request === true
1019
1019
  || (typeof normalized.phase_transition_request === 'string' && normalized.phase_transition_request.trim().length > 0);
1020
1020
 
1021
+ // ── BUG-94: default missing top-level required arrays ────────────────
1022
+ // Empty decisions/objections are schema-valid. Review-only challenge
1023
+ // requirements remain enforced later by protocol validation.
1024
+ if (!('decisions' in normalized)) {
1025
+ corrections.push('decisions: defaulted missing required array to []');
1026
+ normalizationEvents.push({
1027
+ field: 'decisions',
1028
+ original_value: null,
1029
+ normalized_value: [],
1030
+ rationale: 'missing_decisions_array_defaulted',
1031
+ });
1032
+ normalized.decisions = [];
1033
+ }
1034
+ if (!('objections' in normalized)) {
1035
+ corrections.push('objections: defaulted missing required array to []');
1036
+ normalizationEvents.push({
1037
+ field: 'objections',
1038
+ original_value: null,
1039
+ normalized_value: [],
1040
+ rationale: 'missing_objections_array_defaulted',
1041
+ });
1042
+ normalized.objections = [];
1043
+ }
1044
+
1021
1045
  // ── BUG-90: normalize status synonyms ────────────────────────────────
1022
1046
  const STATUS_SYNONYMS = { complete: 'completed', success: 'completed', done: 'completed', error: 'failed', failure: 'failed' };
1023
1047
  if (typeof normalized.status === 'string' && !VALID_STATUSES.includes(normalized.status)) {