agentxchain 2.155.17 → 2.155.18

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.17",
3
+ "version": "2.155.18",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -77,6 +77,15 @@ function getDependencyBarrierId(workstreamId) {
77
77
 
78
78
  function resolveRecommendedRole(repoState, repoConfig, workstreamPhase) {
79
79
  const routing = repoConfig.routing?.[workstreamPhase];
80
+ if (repoState.charter_materialization_pending && workstreamPhase === 'planning') {
81
+ if (repoConfig.roles?.pm) {
82
+ return 'pm';
83
+ }
84
+ if (routing?.entry_role && repoConfig.roles?.[routing.entry_role]) {
85
+ return routing.entry_role;
86
+ }
87
+ }
88
+
80
89
  const recommendedRole = repoState.next_recommended_role;
81
90
  if (
82
91
  recommendedRole
@@ -95,6 +95,24 @@ export function resolveGovernedRole({ override = null, state = null, config }) {
95
95
  };
96
96
  }
97
97
 
98
+ // BUG-73: charter materialization is planning-owned work. Persisted state from
99
+ // older releases may still recommend dev, so resolve the role from the pending
100
+ // materialization rather than trusting a stale implementation recommendation.
101
+ if (state?.charter_materialization_pending && phase === 'planning') {
102
+ const materializationRole = config?.roles?.pm
103
+ ? 'pm'
104
+ : (routing?.entry_role && config?.roles?.[routing.entry_role] ? routing.entry_role : null);
105
+ if (materializationRole) {
106
+ return {
107
+ roleId: materializationRole,
108
+ warnings,
109
+ error: null,
110
+ availableRoles: roles,
111
+ phase,
112
+ };
113
+ }
114
+ }
115
+
98
116
  if (state?.next_recommended_role && config?.roles?.[state.next_recommended_role]) {
99
117
  const recommended = state.next_recommended_role;
100
118
  const isLegal = !routing?.allowed_next_roles || routing.allowed_next_roles.includes(recommended);