agentxchain 2.30.0 → 2.31.0

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.30.0",
3
+ "version": "2.31.0",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
package/src/lib/export.js CHANGED
@@ -31,6 +31,7 @@ const INCLUDED_ROOTS = [
31
31
  '.agentxchain/transactions/accept',
32
32
  '.agentxchain/intake',
33
33
  '.agentxchain/multirepo',
34
+ '.planning',
34
35
  ];
35
36
 
36
37
  function sha256(buffer) {
package/src/lib/report.js CHANGED
@@ -471,6 +471,38 @@ function deriveRepoStatusCounts(repoStatuses) {
471
471
  return counts;
472
472
  }
473
473
 
474
+ export function extractWorkflowKitArtifacts(artifact) {
475
+ const config = artifact.config;
476
+ if (!config || typeof config !== 'object' || !config.workflow_kit) return null;
477
+
478
+ const phase = artifact.summary?.phase || artifact.state?.phase;
479
+ if (!phase) return null;
480
+
481
+ const phaseConfig = config.workflow_kit.phases?.[phase];
482
+ if (!phaseConfig) return [];
483
+
484
+ const artifacts = Array.isArray(phaseConfig.artifacts) ? phaseConfig.artifacts : [];
485
+ if (artifacts.length === 0) return [];
486
+
487
+ const entryRole = config.routing?.[phase]?.entry_role || null;
488
+ const fileKeys = new Set(Object.keys(artifact.files || {}));
489
+
490
+ return artifacts
491
+ .filter((a) => a && typeof a.path === 'string')
492
+ .map((a) => {
493
+ const hasExplicitOwner = typeof a.owned_by === 'string' && a.owned_by.length > 0;
494
+ return {
495
+ path: a.path,
496
+ required: a.required !== false,
497
+ semantics: a.semantics || null,
498
+ owned_by: hasExplicitOwner ? a.owned_by : entryRole,
499
+ owner_resolution: hasExplicitOwner ? 'explicit' : 'entry_role',
500
+ exists: fileKeys.has(a.path),
501
+ };
502
+ })
503
+ .sort((a, b) => a.path.localeCompare(b.path, 'en'));
504
+ }
505
+
474
506
  function buildRunSubject(artifact) {
475
507
  const activeTurns = artifact.summary?.active_turn_ids || [];
476
508
  const retainedTurns = artifact.summary?.retained_turn_ids || [];
@@ -518,6 +550,7 @@ function buildRunSubject(artifact) {
518
550
  gate_summary: gateSummary,
519
551
  intake_links: intakeLinks,
520
552
  recovery_summary: recoverySummary,
553
+ workflow_kit_artifacts: extractWorkflowKitArtifacts(artifact),
521
554
  },
522
555
  artifacts: {
523
556
  history_entries: artifact.summary?.history_entries || 0,
@@ -810,6 +843,17 @@ export function formatGovernanceReportText(report) {
810
843
  lines.push(` Turn retained: ${run.recovery_summary.turn_retained == null ? 'n/a' : yesNo(run.recovery_summary.turn_retained)}`);
811
844
  }
812
845
 
846
+ if (Array.isArray(run.workflow_kit_artifacts) && run.workflow_kit_artifacts.length > 0) {
847
+ lines.push('', `Workflow Artifacts (${run.phase || 'unknown'} phase):`);
848
+ for (const art of run.workflow_kit_artifacts) {
849
+ const req = art.required ? 'required' : 'optional';
850
+ const sem = art.semantics || 'none';
851
+ const owner = art.owned_by ? `${art.owned_by} (${art.owner_resolution})` : 'none';
852
+ const status = art.exists ? 'exists' : 'missing';
853
+ lines.push(` ${art.path} | ${req} | ${sem} | owner: ${owner} | ${status}`);
854
+ }
855
+ }
856
+
813
857
  return lines.join('\n');
814
858
  }
815
859
 
@@ -1066,6 +1110,19 @@ export function formatGovernanceReportMarkdown(report) {
1066
1110
  lines.push(`- Turn retained: \`${run.recovery_summary.turn_retained == null ? 'n/a' : yesNo(run.recovery_summary.turn_retained)}\``);
1067
1111
  }
1068
1112
 
1113
+ if (Array.isArray(run.workflow_kit_artifacts) && run.workflow_kit_artifacts.length > 0) {
1114
+ lines.push('', '## Workflow Artifacts', '');
1115
+ lines.push(`Phase: \`${run.phase || 'unknown'}\``, '');
1116
+ lines.push('| Artifact | Required | Semantics | Owner | Resolution | Status |', '|----------|----------|-----------|-------|------------|--------|');
1117
+ for (const art of run.workflow_kit_artifacts) {
1118
+ const req = art.required ? 'yes' : 'no';
1119
+ const sem = art.semantics ? `\`${art.semantics}\`` : 'none';
1120
+ const owner = art.owned_by ? `\`${art.owned_by}\`` : 'none';
1121
+ const status = art.exists ? 'exists' : '**missing**';
1122
+ lines.push(`| \`${art.path}\` | ${req} | ${sem} | ${owner} | ${art.owner_resolution} | ${status} |`);
1123
+ }
1124
+ }
1125
+
1069
1126
  return lines.join('\n');
1070
1127
  }
1071
1128