@workit-dev/codex 2.27.2 → 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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workit",
3
- "version": "2.27.2",
3
+ "version": "2.27.4",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -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
- if (!issuedOnly)
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
- if (!issuedOnly)
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
@@ -101,7 +101,7 @@ if (quiet) {
101
101
  `);
102
102
  } else {
103
103
  try {
104
- const { runCodexHook } = await import("./workit-hook-s4ya8max.js");
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.2",
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.2",
45
- "@workit-dev/mcp": "^2.27.2"
44
+ "@workit-dev/core": "^2.27.4",
45
+ "@workit-dev/mcp": "^2.27.4"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=24"