@workit-dev/opencode 1.2.1 → 1.2.2
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/plugin.js +23 -3
- package/package.json +2 -2
package/dist/plugin.js
CHANGED
|
@@ -16317,6 +16317,19 @@ function verdictBasis(verdict, current) {
|
|
|
16317
16317
|
return "stale";
|
|
16318
16318
|
}
|
|
16319
16319
|
var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
|
|
16320
|
+
var VOID_TYPE = "verdict.voided";
|
|
16321
|
+
function verdictVoids(rows, options = {}) {
|
|
16322
|
+
const voids = new Map;
|
|
16323
|
+
for (const row of rows)
|
|
16324
|
+
if (row.type === VOID_TYPE && row.observer === "workit_cli" && typeof row.target === "string" && (options.chained ? row.integrity === "verified" : row.integrity !== "unverified") && !voids.has(row.target))
|
|
16325
|
+
voids.set(row.target, {
|
|
16326
|
+
id: row.id,
|
|
16327
|
+
at: row.at,
|
|
16328
|
+
reason: str2(row.reason) ?? "",
|
|
16329
|
+
by: row.actor.session
|
|
16330
|
+
});
|
|
16331
|
+
return voids;
|
|
16332
|
+
}
|
|
16320
16333
|
function trailerSessions(cwd, base, head) {
|
|
16321
16334
|
if (!base || !head || !safeRef2(base) || !safeRef2(head))
|
|
16322
16335
|
return [];
|
|
@@ -16655,6 +16668,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
|
|
|
16655
16668
|
for (const row of rows)
|
|
16656
16669
|
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
|
|
16657
16670
|
retired.add(row.supersedes);
|
|
16671
|
+
for (const id of verdictVoids(rows, { chained: true }).keys())
|
|
16672
|
+
retired.add(id);
|
|
16658
16673
|
const byKind = new Map;
|
|
16659
16674
|
for (const row of rows.toSorted(byRank))
|
|
16660
16675
|
if (isLiveVerdict(row, retired) && scope(row)) {
|
|
@@ -16788,7 +16803,7 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
16788
16803
|
const mirror = readLedgerAt(cwd, file, { integrity: true });
|
|
16789
16804
|
if (!mirror.ok)
|
|
16790
16805
|
return [];
|
|
16791
|
-
const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
|
|
16806
|
+
const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
|
|
16792
16807
|
const added = new Set;
|
|
16793
16808
|
try {
|
|
16794
16809
|
fs16.mkdirSync(path20.dirname(local.value), { recursive: true });
|
|
@@ -16814,7 +16829,10 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
16814
16829
|
integrityReason: _reason,
|
|
16815
16830
|
...fields
|
|
16816
16831
|
} = row;
|
|
16817
|
-
const written = appendLine(local.value, (previous) => ({
|
|
16832
|
+
const written = appendLine(local.value, (previous) => ({
|
|
16833
|
+
ok: true,
|
|
16834
|
+
value: sealed(fields, id, at, previous).line
|
|
16835
|
+
}), { heldLock: true });
|
|
16818
16836
|
if (!written.ok)
|
|
16819
16837
|
return false;
|
|
16820
16838
|
ids.add(id);
|
|
@@ -16855,6 +16873,7 @@ var OBSERVED_ONLY = new Set([
|
|
|
16855
16873
|
"check",
|
|
16856
16874
|
"merge.unverified",
|
|
16857
16875
|
"policy.judged",
|
|
16876
|
+
"verdict.voided",
|
|
16858
16877
|
...PR_ROW_TYPES
|
|
16859
16878
|
]);
|
|
16860
16879
|
|
|
@@ -24435,7 +24454,8 @@ var WORKIT_BYPASS_FLAGS = ["--unverified", "--overwrite-unintegrated"];
|
|
|
24435
24454
|
var WORKIT_USER_ONLY = [
|
|
24436
24455
|
["release", "notes", "approve"],
|
|
24437
24456
|
["grant", "set"],
|
|
24438
|
-
["grant", "raise"]
|
|
24457
|
+
["grant", "raise"],
|
|
24458
|
+
["ledger", "void"]
|
|
24439
24459
|
];
|
|
24440
24460
|
var ALLOWED = new Set(WORKIT_ALLOWED_VERBS);
|
|
24441
24461
|
var hasWordsInOrder = (words, needle) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/opencode",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@opencode/plugin": "2.0.18",
|
|
44
|
-
"@workit-dev/core": "^1.2.
|
|
44
|
+
"@workit-dev/core": "^1.2.2"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|