agentxchain 2.155.2 → 2.155.3
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
|
@@ -10,6 +10,16 @@ const CRITICAL_DELETION_PATHS = new Set([
|
|
|
10
10
|
'.planning/acceptance-matrix.md',
|
|
11
11
|
]);
|
|
12
12
|
|
|
13
|
+
// Files under .agentxchain/ that are documentation or operator-customizable
|
|
14
|
+
// configuration, NOT core governed state. Modifications to these should not
|
|
15
|
+
// block operator-commit reconciliation.
|
|
16
|
+
const RECONCILE_SAFE_AGENTXCHAIN_PATHS = new Set([
|
|
17
|
+
'.agentxchain/SESSION_RECOVERY.md',
|
|
18
|
+
]);
|
|
19
|
+
const RECONCILE_SAFE_AGENTXCHAIN_PREFIXES = [
|
|
20
|
+
'.agentxchain/prompts/',
|
|
21
|
+
];
|
|
22
|
+
|
|
13
23
|
function git(root, args) {
|
|
14
24
|
return execFileSync('git', args, {
|
|
15
25
|
cwd: root,
|
|
@@ -90,16 +100,26 @@ function summarizeCommit(root, sha) {
|
|
|
90
100
|
};
|
|
91
101
|
}
|
|
92
102
|
|
|
103
|
+
function isReconcileSafeAgentxchainPath(pathName) {
|
|
104
|
+
if (RECONCILE_SAFE_AGENTXCHAIN_PATHS.has(pathName)) return true;
|
|
105
|
+
for (const prefix of RECONCILE_SAFE_AGENTXCHAIN_PREFIXES) {
|
|
106
|
+
if (pathName.startsWith(prefix)) return true;
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
|
|
93
111
|
function classifyUnsafeCommit(commit) {
|
|
94
112
|
for (const entry of commit.name_status) {
|
|
95
113
|
for (const pathName of entry.paths) {
|
|
96
114
|
if (pathName === '.agentxchain' || pathName.startsWith('.agentxchain/')) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
if (!isReconcileSafeAgentxchainPath(pathName)) {
|
|
116
|
+
return {
|
|
117
|
+
error_class: 'governance_state_modified',
|
|
118
|
+
message: `Commit ${commit.sha.slice(0, 8)} modifies governed state path ${pathName}; reconcile cannot auto-accept .agentxchain edits.`,
|
|
119
|
+
commit: commit.sha,
|
|
120
|
+
path: pathName,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
103
123
|
}
|
|
104
124
|
if (entry.status.startsWith('D') && CRITICAL_DELETION_PATHS.has(pathName)) {
|
|
105
125
|
return {
|
|
@@ -239,6 +259,8 @@ export function reconcileOperatorHead(root, opts = {}) {
|
|
|
239
259
|
safety_checks: {
|
|
240
260
|
baseline_is_ancestor: true,
|
|
241
261
|
rejected_state_paths: ['.agentxchain/'],
|
|
262
|
+
reconcile_safe_paths: [...RECONCILE_SAFE_AGENTXCHAIN_PATHS],
|
|
263
|
+
reconcile_safe_prefixes: [...RECONCILE_SAFE_AGENTXCHAIN_PREFIXES],
|
|
242
264
|
rejected_deletions: [...CRITICAL_DELETION_PATHS],
|
|
243
265
|
},
|
|
244
266
|
},
|