@workit-dev/codex 2.27.1 → 2.27.4
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
|
@@ -22633,15 +22633,13 @@ function sessionTrust(cwd, row) {
|
|
|
22633
22633
|
const session = row.actor.session;
|
|
22634
22634
|
if (!session || row.self === true)
|
|
22635
22635
|
return null;
|
|
22636
|
+
const binding = session.includes(":") ? issuedBinding(cwd, session) : null;
|
|
22637
|
+
if (binding === "token" && row.sessionBound !== true)
|
|
22638
|
+
return "unbound_session";
|
|
22636
22639
|
const source = typeof row.sessionSource === "string" ? row.sessionSource : "env";
|
|
22637
22640
|
const host = row.actor.host;
|
|
22638
22641
|
const issuedOnly = source === "flag" ? host !== "cli" : source === "env" && session.includes(":") && !SHELL_VOUCHED_HOSTS.has(host);
|
|
22639
|
-
|
|
22640
|
-
return null;
|
|
22641
|
-
const binding = issuedBinding(cwd, session);
|
|
22642
|
-
if (binding === null)
|
|
22643
|
-
return "unissued_session";
|
|
22644
|
-
return binding === "token" && row.sessionBound !== true ? "unbound_session" : null;
|
|
22642
|
+
return issuedOnly && binding === null ? "unissued_session" : null;
|
|
22645
22643
|
}
|
|
22646
22644
|
function trustReasons(cwd, row) {
|
|
22647
22645
|
if (row.integrity === "unverified")
|
|
@@ -11610,15 +11610,13 @@ function sessionTrust(cwd, row) {
|
|
|
11610
11610
|
const session = row.actor.session;
|
|
11611
11611
|
if (!session || row.self === true)
|
|
11612
11612
|
return null;
|
|
11613
|
+
const binding = session.includes(":") ? issuedBinding(cwd, session) : null;
|
|
11614
|
+
if (binding === "token" && row.sessionBound !== true)
|
|
11615
|
+
return "unbound_session";
|
|
11613
11616
|
const source = typeof row.sessionSource === "string" ? row.sessionSource : "env";
|
|
11614
11617
|
const host = row.actor.host;
|
|
11615
11618
|
const issuedOnly = source === "flag" ? host !== "cli" : source === "env" && session.includes(":") && !SHELL_VOUCHED_HOSTS.has(host);
|
|
11616
|
-
|
|
11617
|
-
return null;
|
|
11618
|
-
const binding = issuedBinding(cwd, session);
|
|
11619
|
-
if (binding === null)
|
|
11620
|
-
return "unissued_session";
|
|
11621
|
-
return binding === "token" && row.sessionBound !== true ? "unbound_session" : null;
|
|
11619
|
+
return issuedOnly && binding === null ? "unissued_session" : null;
|
|
11622
11620
|
}
|
|
11623
11621
|
function trustReasons(cwd, row) {
|
|
11624
11622
|
if (row.integrity === "unverified")
|
|
@@ -19965,11 +19963,13 @@ function currentJudgment(cwd) {
|
|
|
19965
19963
|
// packages/workit-core/src/core/verdict-set.ts
|
|
19966
19964
|
import path32 from "node:path";
|
|
19967
19965
|
var SET_TTL_MS = 7 * 86400000;
|
|
19966
|
+
var SET_ROW = "verdict.set";
|
|
19968
19967
|
var SET_VOID = "verdict.set.voided";
|
|
19969
19968
|
var setStorePath = () => path32.join(resolveStateDir(), "verdicts", "sets", "ledger.jsonl");
|
|
19969
|
+
var distrusted = (cwd, id, rows, type) => rows.some((row) => row.type === type && row.id === id && trustReasons(cwd, row).length > 0);
|
|
19970
19970
|
function gateStands(cwd, gate, rows, now = Date.now()) {
|
|
19971
19971
|
const id = typeof gate.verdictId === "string" ? gate.verdictId : null;
|
|
19972
|
-
if (id !== null && verdictVoids(rows).has(id))
|
|
19972
|
+
if (id !== null && (verdictVoids(rows).has(id) || distrusted(cwd, id, rows, "verdict")))
|
|
19973
19973
|
return false;
|
|
19974
19974
|
if (gate.via !== "set")
|
|
19975
19975
|
return true;
|
|
@@ -19979,7 +19979,7 @@ function gateStands(cwd, gate, rows, now = Date.now()) {
|
|
|
19979
19979
|
if (id === null)
|
|
19980
19980
|
return true;
|
|
19981
19981
|
const read = readLedgerAt(cwd, setStorePath(), { integrity: true });
|
|
19982
|
-
return read.ok && !read.value.rows.some((row) => row.type === SET_VOID && row.target === id && row.integrity === "verified");
|
|
19982
|
+
return read.ok && !distrusted(cwd, id, read.value.rows, SET_ROW) && !read.value.rows.some((row) => row.type === SET_VOID && row.target === id && row.integrity === "verified");
|
|
19983
19983
|
}
|
|
19984
19984
|
|
|
19985
19985
|
// packages/workit-core/src/hooks/stop.ts
|
|
@@ -23701,16 +23701,27 @@ var opaque = (rest, scan, assigns) => {
|
|
|
23701
23701
|
if (hit && rest.some((word) => base2(word).toLowerCase() === "env"))
|
|
23702
23702
|
scan.hit ??= hit.split("=")[0] ?? null;
|
|
23703
23703
|
};
|
|
23704
|
+
var LOGIN_VALUED = {
|
|
23705
|
+
su: /[sgGwc]/u,
|
|
23706
|
+
runuser: /[sgGwuc]/u,
|
|
23707
|
+
script: /[cEIOBTmot]/u
|
|
23708
|
+
};
|
|
23704
23709
|
var loginScript = (words) => {
|
|
23705
23710
|
const at = words.findIndex((word) => /^(?:su|runuser|script)$/u.test(base2(word)));
|
|
23706
23711
|
if (at < 0)
|
|
23707
23712
|
return null;
|
|
23713
|
+
const valued = LOGIN_VALUED[base2(words[at])] ?? /c/u;
|
|
23708
23714
|
for (let index = at + 1;index < words.length; index += 1) {
|
|
23709
23715
|
const word = words[index] ?? "";
|
|
23710
|
-
if (word === "
|
|
23716
|
+
if (word === "--command")
|
|
23711
23717
|
return words[index + 1] ?? null;
|
|
23712
23718
|
if (word.startsWith("--command="))
|
|
23713
23719
|
return word.slice("--command=".length);
|
|
23720
|
+
if (!/^-[^-]/u.test(word))
|
|
23721
|
+
continue;
|
|
23722
|
+
const ends = word.slice(1).search(valued) + 1;
|
|
23723
|
+
if (ends > 0 && word[ends] === "c")
|
|
23724
|
+
return word.slice(ends + 1) || (words[index + 1] ?? null);
|
|
23714
23725
|
}
|
|
23715
23726
|
return null;
|
|
23716
23727
|
};
|
package/dist/workit-hook.js
CHANGED
|
@@ -101,7 +101,7 @@ if (quiet) {
|
|
|
101
101
|
`);
|
|
102
102
|
} else {
|
|
103
103
|
try {
|
|
104
|
-
const { runCodexHook } = await import("./workit-hook-
|
|
104
|
+
const { runCodexHook } = await import("./workit-hook-kxqhz122.js");
|
|
105
105
|
await runCodexHook([payload]);
|
|
106
106
|
} catch (error) {
|
|
107
107
|
const { answerRuntimeFailure } = await import("./workit-hook-2j7nwxvz.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/codex",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.4",
|
|
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": "^2.27.
|
|
45
|
-
"@workit-dev/mcp": "^2.27.
|
|
44
|
+
"@workit-dev/core": "^2.27.4",
|
|
45
|
+
"@workit-dev/mcp": "^2.27.4"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=24"
|