@workit-dev/codex 1.2.1 → 1.3.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/dist/launch-mcp.js
CHANGED
|
@@ -21530,6 +21530,7 @@ var PR_ROW_TYPES = new Set([
|
|
|
21530
21530
|
"pr.merged",
|
|
21531
21531
|
"pr.linked"
|
|
21532
21532
|
]);
|
|
21533
|
+
var HOLD_ROW_TYPES = new Set(["branch.hold", "branch.hold.cleared"]);
|
|
21533
21534
|
var err = (code, error, unblock) => ({
|
|
21534
21535
|
ok: false,
|
|
21535
21536
|
code,
|
|
@@ -22037,6 +22038,19 @@ function verdictBasis(verdict, current) {
|
|
|
22037
22038
|
return "stale";
|
|
22038
22039
|
}
|
|
22039
22040
|
var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
|
|
22041
|
+
var VOID_TYPE = "verdict.voided";
|
|
22042
|
+
function verdictVoids(rows, options = {}) {
|
|
22043
|
+
const voids = new Map;
|
|
22044
|
+
for (const row of rows)
|
|
22045
|
+
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))
|
|
22046
|
+
voids.set(row.target, {
|
|
22047
|
+
id: row.id,
|
|
22048
|
+
at: row.at,
|
|
22049
|
+
reason: str2(row.reason) ?? "",
|
|
22050
|
+
by: row.actor.session
|
|
22051
|
+
});
|
|
22052
|
+
return voids;
|
|
22053
|
+
}
|
|
22040
22054
|
function trailerSessions(cwd, base, head) {
|
|
22041
22055
|
if (!base || !head || !safeRef2(base) || !safeRef2(head))
|
|
22042
22056
|
return [];
|
|
@@ -22375,6 +22389,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
|
|
|
22375
22389
|
for (const row of rows)
|
|
22376
22390
|
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
|
|
22377
22391
|
retired.add(row.supersedes);
|
|
22392
|
+
for (const id of verdictVoids(rows, { chained: true }).keys())
|
|
22393
|
+
retired.add(id);
|
|
22378
22394
|
const byKind = new Map;
|
|
22379
22395
|
for (const row of rows.toSorted(byRank))
|
|
22380
22396
|
if (isLiveVerdict(row, retired) && scope(row)) {
|
|
@@ -22508,7 +22524,7 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
22508
22524
|
const mirror = readLedgerAt(cwd, file, { integrity: true });
|
|
22509
22525
|
if (!mirror.ok)
|
|
22510
22526
|
return [];
|
|
22511
|
-
const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
|
|
22527
|
+
const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
|
|
22512
22528
|
const added = new Set;
|
|
22513
22529
|
try {
|
|
22514
22530
|
fs15.mkdirSync(path19.dirname(local.value), { recursive: true });
|
|
@@ -22534,7 +22550,10 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
22534
22550
|
integrityReason: _reason,
|
|
22535
22551
|
...fields
|
|
22536
22552
|
} = row;
|
|
22537
|
-
const written = appendLine(local.value, (previous) => ({
|
|
22553
|
+
const written = appendLine(local.value, (previous) => ({
|
|
22554
|
+
ok: true,
|
|
22555
|
+
value: sealed(fields, id, at, previous).line
|
|
22556
|
+
}), { heldLock: true });
|
|
22538
22557
|
if (!written.ok)
|
|
22539
22558
|
return false;
|
|
22540
22559
|
ids.add(id);
|
|
@@ -22553,6 +22572,8 @@ var OBSERVED_ONLY = new Set([
|
|
|
22553
22572
|
"check",
|
|
22554
22573
|
"merge.unverified",
|
|
22555
22574
|
"policy.judged",
|
|
22575
|
+
"verdict.voided",
|
|
22576
|
+
...HOLD_ROW_TYPES,
|
|
22556
22577
|
...PR_ROW_TYPES
|
|
22557
22578
|
]);
|
|
22558
22579
|
|
|
@@ -14435,6 +14435,19 @@ var PR_ROW_TYPES = new Set([
|
|
|
14435
14435
|
"pr.merged",
|
|
14436
14436
|
"pr.linked"
|
|
14437
14437
|
]);
|
|
14438
|
+
var HOLD_ROW_TYPES = new Set(["branch.hold", "branch.hold.cleared"]);
|
|
14439
|
+
function branchHold(rows, branch) {
|
|
14440
|
+
let hold = null;
|
|
14441
|
+
for (const row of rows) {
|
|
14442
|
+
if (row.branch !== branch || row.observer !== "workit_cli")
|
|
14443
|
+
continue;
|
|
14444
|
+
if (row.type === "branch.hold")
|
|
14445
|
+
hold = row;
|
|
14446
|
+
else if (row.type === "branch.hold.cleared" || row.type === "push.verified")
|
|
14447
|
+
hold = null;
|
|
14448
|
+
}
|
|
14449
|
+
return hold;
|
|
14450
|
+
}
|
|
14438
14451
|
var err = (code, error, unblock) => ({
|
|
14439
14452
|
ok: false,
|
|
14440
14453
|
code,
|
|
@@ -14938,6 +14951,19 @@ function verdictBasis(verdict, current) {
|
|
|
14938
14951
|
return "stale";
|
|
14939
14952
|
}
|
|
14940
14953
|
var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
|
|
14954
|
+
var VOID_TYPE = "verdict.voided";
|
|
14955
|
+
function verdictVoids(rows, options = {}) {
|
|
14956
|
+
const voids = new Map;
|
|
14957
|
+
for (const row of rows)
|
|
14958
|
+
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))
|
|
14959
|
+
voids.set(row.target, {
|
|
14960
|
+
id: row.id,
|
|
14961
|
+
at: row.at,
|
|
14962
|
+
reason: str(row.reason) ?? "",
|
|
14963
|
+
by: row.actor.session
|
|
14964
|
+
});
|
|
14965
|
+
return voids;
|
|
14966
|
+
}
|
|
14941
14967
|
function trailerSessions(cwd, base, head) {
|
|
14942
14968
|
if (!base || !head || !safeRef2(base) || !safeRef2(head))
|
|
14943
14969
|
return [];
|
|
@@ -15276,6 +15302,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
|
|
|
15276
15302
|
for (const row of rows)
|
|
15277
15303
|
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
|
|
15278
15304
|
retired.add(row.supersedes);
|
|
15305
|
+
for (const id of verdictVoids(rows, { chained: true }).keys())
|
|
15306
|
+
retired.add(id);
|
|
15279
15307
|
const byKind = new Map;
|
|
15280
15308
|
for (const row of rows.toSorted(byRank))
|
|
15281
15309
|
if (isLiveVerdict(row, retired) && scope(row)) {
|
|
@@ -15409,7 +15437,7 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
15409
15437
|
const mirror = readLedgerAt(cwd, file, { integrity: true });
|
|
15410
15438
|
if (!mirror.ok)
|
|
15411
15439
|
return [];
|
|
15412
|
-
const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
|
|
15440
|
+
const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
|
|
15413
15441
|
const added = new Set;
|
|
15414
15442
|
try {
|
|
15415
15443
|
fs12.mkdirSync(path16.dirname(local.value), { recursive: true });
|
|
@@ -15435,7 +15463,10 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
15435
15463
|
integrityReason: _reason,
|
|
15436
15464
|
...fields
|
|
15437
15465
|
} = row;
|
|
15438
|
-
const written = appendLine(local.value, (previous) => ({
|
|
15466
|
+
const written = appendLine(local.value, (previous) => ({
|
|
15467
|
+
ok: true,
|
|
15468
|
+
value: sealed(fields, id, at, previous).line
|
|
15469
|
+
}), { heldLock: true });
|
|
15439
15470
|
if (!written.ok)
|
|
15440
15471
|
return false;
|
|
15441
15472
|
ids.add(id);
|
|
@@ -15476,6 +15507,8 @@ var OBSERVED_ONLY = new Set([
|
|
|
15476
15507
|
"check",
|
|
15477
15508
|
"merge.unverified",
|
|
15478
15509
|
"policy.judged",
|
|
15510
|
+
"verdict.voided",
|
|
15511
|
+
...HOLD_ROW_TYPES,
|
|
15479
15512
|
...PR_ROW_TYPES
|
|
15480
15513
|
]);
|
|
15481
15514
|
|
|
@@ -19287,7 +19320,8 @@ var WORKIT_BYPASS_FLAGS = ["--unverified", "--overwrite-unintegrated"];
|
|
|
19287
19320
|
var WORKIT_USER_ONLY = [
|
|
19288
19321
|
["release", "notes", "approve"],
|
|
19289
19322
|
["grant", "set"],
|
|
19290
|
-
["grant", "raise"]
|
|
19323
|
+
["grant", "raise"],
|
|
19324
|
+
["ledger", "void"]
|
|
19291
19325
|
];
|
|
19292
19326
|
var ALLOWED = new Set(WORKIT_ALLOWED_VERBS);
|
|
19293
19327
|
var hasWordsInOrder = (words, needle) => {
|
|
@@ -21527,7 +21561,7 @@ var unpushed = (cwd, branch, endpoint, mine, merged) => {
|
|
|
21527
21561
|
return null;
|
|
21528
21562
|
return {
|
|
21529
21563
|
kind: "unpushed",
|
|
21530
|
-
reason: `${branch} has ${count} commit(s) of this session not on ${remote}, and this workspace's endpoint is \`${endpoint}\` (\`workit grant show\`): push them with \`workit git push\`${endpoint === "pr" ? ", then open or update the PR (`workit pr create --fill`)" : ""}.`
|
|
21564
|
+
reason: `${branch} has ${count} commit(s) of this session not on ${remote}, and this workspace's endpoint is \`${endpoint}\` (\`workit grant show\`): push them with \`workit git push\`${endpoint === "pr" ? ", then open or update the PR (`workit pr create --fill`)" : ""}. If the user said not yet, record it once with \`workit git hold --why "<their words>"\` and stop.`
|
|
21531
21565
|
};
|
|
21532
21566
|
};
|
|
21533
21567
|
var redChecks = (cwd, rows, pr, head, endpoint) => {
|
|
@@ -21606,7 +21640,7 @@ function stopObligation(input, descriptor) {
|
|
|
21606
21640
|
return null;
|
|
21607
21641
|
const autonomy = resolveAutonomy(input.cwd);
|
|
21608
21642
|
const endpoint = autonomy.effectiveEndpoint;
|
|
21609
|
-
if (endpoint !== "commit") {
|
|
21643
|
+
if (endpoint !== "commit" && !branchHold(rows, branch)) {
|
|
21610
21644
|
const left = unpushed(input.cwd, branch, endpoint, commits, mergedHeads(rows));
|
|
21611
21645
|
if (left)
|
|
21612
21646
|
return { ...left, head };
|
package/dist/workit-hook.js
CHANGED
|
@@ -84,7 +84,7 @@ if (quiet) {
|
|
|
84
84
|
`);
|
|
85
85
|
} else {
|
|
86
86
|
try {
|
|
87
|
-
const { runCodexHook } = await import("./workit-hook-
|
|
87
|
+
const { runCodexHook } = await import("./workit-hook-sc4ng8c7.js");
|
|
88
88
|
await runCodexHook([payload]);
|
|
89
89
|
} catch (error) {
|
|
90
90
|
const { answerRuntimeFailure } = await import("./workit-hook-ehy7rps6.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/codex",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit Codex CLI/desktop plugin — shared MCP transport, hooks, method skills, and verifier/reviewer/implementer agents",
|
|
6
6
|
"keywords": [
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"build": "bun scripts/build.ts"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@workit-dev/core": "^1.
|
|
45
|
-
"@workit-dev/mcp": "^1.
|
|
44
|
+
"@workit-dev/core": "^1.3.0",
|
|
45
|
+
"@workit-dev/mcp": "^1.3.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|