agentxchain 2.155.11 → 2.155.12

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.11",
3
+ "version": "2.155.12",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,6 +51,14 @@ const RESERVED_PATHS = [
51
51
  '.agentxchain/lock.json',
52
52
  ];
53
53
 
54
+ function phaseTransitionAutoApprovalApplies(config) {
55
+ return config?.approval_policy?.phase_transitions?.default === 'auto_approve';
56
+ }
57
+
58
+ function runCompletionAutoApprovalApplies(config) {
59
+ return config?.approval_policy?.run_completion?.action === 'auto_approve';
60
+ }
61
+
54
62
  /**
55
63
  * Write a dispatch bundle for the currently assigned turn.
56
64
  *
@@ -334,7 +342,10 @@ function renderPrompt(role, roleId, turn, state, config, root) {
334
342
  if (gateConfig.requires_verification_pass) {
335
343
  lines.push('- Requires verification pass');
336
344
  }
337
- if (gateConfig.requires_human_approval) {
345
+ if (gateConfig.requires_human_approval && phaseTransitionAutoApprovalApplies(config)) {
346
+ lines.push('- Requires approval, but `approval_policy.phase_transitions.default` is `auto_approve` for this run.');
347
+ lines.push('- Do NOT set `status: "needs_human"` solely to request phase-gate approval. If the required artifacts are complete, set the appropriate `phase_transition_request`; the orchestrator will evaluate and auto-approve the gate.');
348
+ } else if (gateConfig.requires_human_approval) {
338
349
  lines.push('- Requires human approval');
339
350
  }
340
351
  lines.push('');
@@ -512,7 +523,12 @@ function renderPrompt(role, roleId, turn, state, config, root) {
512
523
  const isTerminal = currentPhase && phaseNames.indexOf(currentPhase) === phaseNames.length - 1;
513
524
  if (isTerminal) {
514
525
  lines.push(`- **You are in the \`${currentPhase}\` phase (final phase).**`);
515
- lines.push('- **If your review verdict is ship-ready (no blocking issues):** set `run_completion_request: true` and `status: "completed"`. This triggers the human approval gate — it does NOT bypass human review.');
526
+ if (runCompletionAutoApprovalApplies(config)) {
527
+ lines.push('- **If your review verdict is ship-ready (no blocking issues):** set `run_completion_request: true` and `status: "completed"`. This triggers orchestrator run-completion evaluation and auto-approval under `approval_policy.run_completion.action: "auto_approve"`.');
528
+ lines.push('- Do NOT use `status: "needs_human"` solely to request final approval when the approval policy is auto-approve. Use `needs_human` only for genuine blockers.');
529
+ } else {
530
+ lines.push('- **If your review verdict is ship-ready (no blocking issues):** set `run_completion_request: true` and `status: "completed"`. This triggers the human approval gate — it does NOT bypass human review.');
531
+ }
516
532
  lines.push('- **If you found genuine blocking issues that prevent shipping:** set `status: "needs_human"` and explain the blockers in `needs_human_reason`.');
517
533
  lines.push('- Do NOT use `status: "needs_human"` to mean "human should approve the release." That is what `run_completion_request: true` is for.');
518
534
  lines.push('- Do NOT set `phase_transition_request` to the exit gate name.');