@wrongstack/governance 0.319.0 → 0.320.1
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/dist/index.js +10 -7
- package/dist/project-daemon.js +10 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1211,6 +1211,7 @@ async function connectGovernanceProjectClient(options) {
|
|
|
1211
1211
|
|
|
1212
1212
|
// src/sanitize.ts
|
|
1213
1213
|
function sanitizeGovernanceMessage(message) {
|
|
1214
|
+
if (typeof message !== "string") return "";
|
|
1214
1215
|
return message.replace(/wsg_[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)*/gu, "[credential]").slice(0, 512);
|
|
1215
1216
|
}
|
|
1216
1217
|
|
|
@@ -2156,11 +2157,7 @@ function validateTaskContractV1(contract) {
|
|
|
2156
2157
|
}
|
|
2157
2158
|
for (const assumption of contract.assumptions) {
|
|
2158
2159
|
addRequiredStringIssue(issues, assumption.id, "assumptions[].id");
|
|
2159
|
-
addRequiredStringIssue(
|
|
2160
|
-
issues,
|
|
2161
|
-
assumption.statement,
|
|
2162
|
-
`assumptions[${assumption.id}].statement`
|
|
2163
|
-
);
|
|
2160
|
+
addRequiredStringIssue(issues, assumption.statement, `assumptions[${assumption.id}].statement`);
|
|
2164
2161
|
}
|
|
2165
2162
|
if (hasMutatingOperation(contract.autonomy.allowedOperations) && contract.autonomy.allowedPaths.length === 0) {
|
|
2166
2163
|
issues.push({
|
|
@@ -4572,7 +4569,10 @@ var SqliteGovernanceEventStore = class _SqliteGovernanceEventStore {
|
|
|
4572
4569
|
aggregate: resultAggregate
|
|
4573
4570
|
};
|
|
4574
4571
|
} catch (error) {
|
|
4575
|
-
|
|
4572
|
+
try {
|
|
4573
|
+
this.db.exec("ROLLBACK");
|
|
4574
|
+
} catch {
|
|
4575
|
+
}
|
|
4576
4576
|
throw error;
|
|
4577
4577
|
}
|
|
4578
4578
|
}
|
|
@@ -4636,7 +4636,10 @@ var SqliteGovernanceEventStore = class _SqliteGovernanceEventStore {
|
|
|
4636
4636
|
this.db.exec("COMMIT");
|
|
4637
4637
|
return { handled: true, idempotentReplay: false, observation: stored };
|
|
4638
4638
|
} catch (error) {
|
|
4639
|
-
|
|
4639
|
+
try {
|
|
4640
|
+
this.db.exec("ROLLBACK");
|
|
4641
|
+
} catch {
|
|
4642
|
+
}
|
|
4640
4643
|
throw error;
|
|
4641
4644
|
}
|
|
4642
4645
|
}
|
package/dist/project-daemon.js
CHANGED
|
@@ -489,6 +489,7 @@ async function acquireGovernanceDaemonStartupLease(options) {
|
|
|
489
489
|
|
|
490
490
|
// src/sanitize.ts
|
|
491
491
|
function sanitizeGovernanceMessage(message) {
|
|
492
|
+
if (typeof message !== "string") return "";
|
|
492
493
|
return message.replace(/wsg_[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)*/gu, "[credential]").slice(0, 512);
|
|
493
494
|
}
|
|
494
495
|
|
|
@@ -1225,11 +1226,7 @@ function validateTaskContractV1(contract) {
|
|
|
1225
1226
|
}
|
|
1226
1227
|
for (const assumption of contract.assumptions) {
|
|
1227
1228
|
addRequiredStringIssue(issues, assumption.id, "assumptions[].id");
|
|
1228
|
-
addRequiredStringIssue(
|
|
1229
|
-
issues,
|
|
1230
|
-
assumption.statement,
|
|
1231
|
-
`assumptions[${assumption.id}].statement`
|
|
1232
|
-
);
|
|
1229
|
+
addRequiredStringIssue(issues, assumption.statement, `assumptions[${assumption.id}].statement`);
|
|
1233
1230
|
}
|
|
1234
1231
|
if (hasMutatingOperation(contract.autonomy.allowedOperations) && contract.autonomy.allowedPaths.length === 0) {
|
|
1235
1232
|
issues.push({
|
|
@@ -3066,7 +3063,10 @@ var SqliteGovernanceEventStore = class _SqliteGovernanceEventStore {
|
|
|
3066
3063
|
aggregate: resultAggregate
|
|
3067
3064
|
};
|
|
3068
3065
|
} catch (error) {
|
|
3069
|
-
|
|
3066
|
+
try {
|
|
3067
|
+
this.db.exec("ROLLBACK");
|
|
3068
|
+
} catch {
|
|
3069
|
+
}
|
|
3070
3070
|
throw error;
|
|
3071
3071
|
}
|
|
3072
3072
|
}
|
|
@@ -3130,7 +3130,10 @@ var SqliteGovernanceEventStore = class _SqliteGovernanceEventStore {
|
|
|
3130
3130
|
this.db.exec("COMMIT");
|
|
3131
3131
|
return { handled: true, idempotentReplay: false, observation: stored };
|
|
3132
3132
|
} catch (error) {
|
|
3133
|
-
|
|
3133
|
+
try {
|
|
3134
|
+
this.db.exec("ROLLBACK");
|
|
3135
|
+
} catch {
|
|
3136
|
+
}
|
|
3134
3137
|
throw error;
|
|
3135
3138
|
}
|
|
3136
3139
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/governance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.320.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Deterministic workflow contracts and transition policy for WrongStack orchestration.",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"README.md"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@wrongstack/persistence": "0.
|
|
30
|
+
"@wrongstack/persistence": "0.320.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^26.2.0",
|