@brainervirus/workit-codex 7.7.0 → 8.0.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workit",
3
- "version": "7.7.0",
3
+ "version": "8.0.0",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -6624,12 +6624,12 @@ var require_dist = __commonJS(function(exports, module) {
6624
6624
  import { existsSync as existsSync9, realpathSync as realpathSync7, statSync as statSync3 } from "node:fs";
6625
6625
  import path21 from "node:path";
6626
6626
 
6627
- // packages/workit-core/src/core.ts
6627
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core.ts
6628
6628
  import { spawnSync as spawnSync12 } from "node:child_process";
6629
6629
  import { existsSync as existsSync7, realpathSync as realpathSync5 } from "node:fs";
6630
6630
  import path19 from "node:path";
6631
6631
 
6632
- // packages/workit-core/src/core/task-contract.ts
6632
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
6633
6633
  import { createHash, randomUUID } from "node:crypto";
6634
6634
 
6635
6635
  // node_modules/zod/v4/core/util.js
@@ -14203,7 +14203,7 @@ function preprocess(fn, schema) {
14203
14203
  function datetime2(params) {
14204
14204
  return _isoDateTime(ZodISODateTime, params);
14205
14205
  }
14206
- // packages/workit-core/src/core/task-contract.ts
14206
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
14207
14207
  var SCHEMA_VERSION = 1;
14208
14208
  var POLICY_VERSION = "1.0.0";
14209
14209
  var OPERATION_FAMILIES = [
@@ -15058,7 +15058,7 @@ function requirementId(input) {
15058
15058
  }
15059
15059
  });
15060
15060
  }
15061
- // packages/workit-core/src/core/operation-input.ts
15061
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
15062
15062
  var str = (d, values) => ({
15063
15063
  type: "string",
15064
15064
  ...values ? { enum: values } : {},
@@ -15454,7 +15454,7 @@ function parseAdvertisedOperation(family, input, host) {
15454
15454
  }))
15455
15455
  });
15456
15456
  }
15457
- // packages/workit-core/src/core/task-store.ts
15457
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-store.ts
15458
15458
  import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
15459
15459
  import * as fs7 from "node:fs";
15460
15460
  import path6 from "node:path";
@@ -16060,7 +16060,7 @@ function acquireFileLockSync(targetPath, options) {
16060
16060
  }
16061
16061
  }
16062
16062
  }
16063
- // packages/workit-core/src/core/package-root.ts
16063
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/package-root.ts
16064
16064
  import { existsSync } from "node:fs";
16065
16065
  import path3 from "node:path";
16066
16066
  import { fileURLToPath } from "node:url";
@@ -16079,12 +16079,12 @@ var assetRoot = () => {
16079
16079
  return existsSync(assets) ? assets : root;
16080
16080
  };
16081
16081
 
16082
- // packages/workit-core/src/core/store-lock.ts
16082
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
16083
16083
  import { spawnSync as spawnSync2 } from "node:child_process";
16084
16084
  import fs5 from "node:fs";
16085
16085
  import { hostname } from "node:os";
16086
16086
 
16087
- // packages/workit-core/src/store/paths.ts
16087
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/paths.ts
16088
16088
  import { spawnSync } from "node:child_process";
16089
16089
  import { createHash as createHash2 } from "node:crypto";
16090
16090
  import fs4 from "node:fs";
@@ -16364,7 +16364,7 @@ var checkoutSlug = (root) => {
16364
16364
  return `${base}-${shortHash(canonical)}`;
16365
16365
  };
16366
16366
 
16367
- // packages/workit-core/src/core/store-lock.ts
16367
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
16368
16368
  var metadataLockSchema = object({
16369
16369
  pid: number2().int().nonnegative().safe(),
16370
16370
  processStart: string2().nullable(),
@@ -16495,7 +16495,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
16495
16495
  }
16496
16496
  };
16497
16497
 
16498
- // packages/workit-core/src/store/event-log.ts
16498
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/event-log.ts
16499
16499
  import { randomUUID as randomUUID2 } from "node:crypto";
16500
16500
  import fs6 from "node:fs";
16501
16501
  import path5 from "node:path";
@@ -16655,7 +16655,7 @@ var retryTransient = (run) => {
16655
16655
  };
16656
16656
  var renameWithRetry = (from, to) => retryTransient(() => fs6.renameSync(from, to));
16657
16657
 
16658
- // packages/workit-core/src/store/patch.ts
16658
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/patch.ts
16659
16659
  var isPlainObject2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
16660
16660
  var equal = (left, right) => {
16661
16661
  if (left === right)
@@ -16765,7 +16765,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
16765
16765
  return false;
16766
16766
  });
16767
16767
 
16768
- // packages/workit-core/src/store/reduce.ts
16768
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/reduce.ts
16769
16769
  import { createHash as createHash3 } from "node:crypto";
16770
16770
  var OPENING_TYPES = new Set([
16771
16771
  "task.opened",
@@ -16896,7 +16896,7 @@ function eventType(before, after) {
16896
16896
  return "task.updated";
16897
16897
  }
16898
16898
 
16899
- // packages/workit-core/src/store/notes.ts
16899
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/notes.ts
16900
16900
  var SLOT = Symbol.for("workit.migrationReporter");
16901
16901
  var reportMigration = (report) => {
16902
16902
  try {
@@ -16907,7 +16907,7 @@ var reportMigration = (report) => {
16907
16907
  };
16908
16908
  var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
16909
16909
 
16910
- // packages/workit-core/src/core/task-store.ts
16910
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-store.ts
16911
16911
  var MIGRATION_PENDING = "workit migration pending";
16912
16912
  var STORE_FORMAT = 3;
16913
16913
  var STORE_MIN_RUNTIME = "3.0.0";
@@ -18543,18 +18543,18 @@ class TaskStore {
18543
18543
  return failure2(recovery ? "recovery_required" : "storage_error", `lock operation failed: ${String(error)}`, { path: lockPath });
18544
18544
  }
18545
18545
  }
18546
- // packages/workit-core/src/core/workers.ts
18546
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/workers.ts
18547
18547
  var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
18548
18548
  var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
18549
18549
  var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
18550
18550
 
18551
- // packages/workit-core/src/core/task-evaluation.ts
18551
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
18552
18552
  import { createHash as createHash7 } from "node:crypto";
18553
18553
  import * as fs11 from "node:fs";
18554
18554
  import { spawnSync as spawnSync6 } from "node:child_process";
18555
18555
  import path11 from "node:path";
18556
18556
 
18557
- // packages/workit-core/src/check-config.ts
18557
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/check-config.ts
18558
18558
  import { spawnSync as spawnSync3 } from "node:child_process";
18559
18559
  import fs8 from "node:fs";
18560
18560
  import path7 from "node:path";
@@ -18759,7 +18759,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
18759
18759
  return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
18760
18760
  }
18761
18761
 
18762
- // packages/workit-core/src/git/rev.ts
18762
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/git/rev.ts
18763
18763
  import { spawnSync as spawnSync4 } from "node:child_process";
18764
18764
  import { createHash as createHash5 } from "node:crypto";
18765
18765
  import fs9 from "node:fs";
@@ -18940,11 +18940,11 @@ function pushRemoteName(cwd, branch) {
18940
18940
  return remotes.length === 1 ? remotes[0] : null;
18941
18941
  }
18942
18942
 
18943
- // packages/workit-core/src/core/policy/derive.ts
18943
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
18944
18944
  import { existsSync as existsSync3 } from "node:fs";
18945
18945
  import path10 from "node:path";
18946
18946
 
18947
- // packages/workit-core/src/ledger.ts
18947
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/ledger.ts
18948
18948
  import { spawnSync as spawnSync5 } from "node:child_process";
18949
18949
  import { createHash as createHash6, randomBytes as randomBytes2 } from "node:crypto";
18950
18950
  import fs10 from "node:fs";
@@ -19295,7 +19295,7 @@ function checkVerdicts(cwd, branch, rows) {
19295
19295
  }
19296
19296
  var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
19297
19297
 
19298
- // packages/workit-core/src/core/policy/derive.ts
19298
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
19299
19299
  var RULES = {
19300
19300
  test: "check:test",
19301
19301
  self: "verdict:self",
@@ -19483,7 +19483,7 @@ function derivedRuleStatus(task, requirement, root, ledger) {
19483
19483
  }
19484
19484
  }
19485
19485
 
19486
- // packages/workit-core/src/core/task-evaluation.ts
19486
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
19487
19487
  var digestBytes = (value) => createHash7("sha256").update(value).digest("hex");
19488
19488
  var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path11.sep}`);
19489
19489
  var relative = (root, candidate) => path11.relative(root, candidate).split(path11.sep).join("/") || ".";
@@ -20149,7 +20149,7 @@ function evaluateClosure(requestedOutcome, view) {
20149
20149
  });
20150
20150
  }
20151
20151
 
20152
- // packages/workit-core/src/core/methods.ts
20152
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/methods.ts
20153
20153
  var METHODS = {
20154
20154
  "workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
20155
20155
  "workit-bdd": { dimensions: ["testing"] },
@@ -20195,7 +20195,7 @@ function selectMethods(policy, capabilities) {
20195
20195
  });
20196
20196
  }
20197
20197
 
20198
- // packages/workit-core/src/core/task-context.ts
20198
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-context.ts
20199
20199
  function reconcileResume(view, observations = []) {
20200
20200
  if (observations.length > 0)
20201
20201
  return failure2("permission_denied", "worker observations require native host verification");
@@ -20309,7 +20309,7 @@ var exportDigest = (bundle) => sha256({
20309
20309
  sourceWorkspaceId: bundle.sourceWorkspaceId,
20310
20310
  task: bundle.task
20311
20311
  });
20312
- // packages/workit-core/src/core/git.ts
20312
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/git.ts
20313
20313
  import { execFileSync } from "node:child_process";
20314
20314
  var run = (cwd, args) => {
20315
20315
  try {
@@ -20377,7 +20377,7 @@ var gitContext = (workspaceRoot, paths = []) => {
20377
20377
  };
20378
20378
  };
20379
20379
 
20380
- // packages/workit-core/src/core/config.ts
20380
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/config.ts
20381
20381
  import {
20382
20382
  copyFileSync as copyFileSync2,
20383
20383
  cpSync as cpSync2,
@@ -20390,7 +20390,7 @@ import {
20390
20390
  import os2 from "node:os";
20391
20391
  import path12 from "node:path";
20392
20392
 
20393
- // packages/workit-core/src/core/boundary.ts
20393
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/boundary.ts
20394
20394
  import { statSync as statSync2 } from "node:fs";
20395
20395
  var EVENT = {
20396
20396
  initialization: "initialization",
@@ -20426,7 +20426,7 @@ var changedSourcesSinceLoad = (marker) => {
20426
20426
  return changed;
20427
20427
  };
20428
20428
 
20429
- // packages/workit-core/src/core/config.ts
20429
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/config.ts
20430
20430
  var diagnosticLogger;
20431
20431
  var PRESETS = {
20432
20432
  gitflow: {
@@ -20579,7 +20579,7 @@ var COMMIT_PRESETS = [
20579
20579
  "auto"
20580
20580
  ];
20581
20581
 
20582
- // packages/workit-core/src/core/workspaces.ts
20582
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
20583
20583
  import { createHash as createHash8 } from "node:crypto";
20584
20584
  import { readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
20585
20585
  import path13 from "node:path";
@@ -20988,12 +20988,12 @@ function workspaceDefaultTarget(cwd, globalDefault) {
20988
20988
  return String(ws?.vcs?.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : globalDefault ?? policyDefault) ?? "develop");
20989
20989
  }
20990
20990
 
20991
- // packages/workit-core/src/core/vcs-config.ts
20991
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/vcs-config.ts
20992
20992
  import fs12 from "node:fs";
20993
20993
  import path14 from "node:path";
20994
20994
  import { spawnSync as spawnSync8 } from "node:child_process";
20995
20995
 
20996
- // packages/workit-core/src/core/release-tracks.ts
20996
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
20997
20997
  import { createHash as createHash9 } from "node:crypto";
20998
20998
  import { spawnSync as spawnSync7 } from "node:child_process";
20999
20999
  var KNOWN_FIELDS = new Set([
@@ -21378,7 +21378,7 @@ function resolveTrackFor(cwd, options) {
21378
21378
  return resolution;
21379
21379
  }
21380
21380
 
21381
- // packages/workit-core/src/core/vcs-config.ts
21381
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/vcs-config.ts
21382
21382
  var workspacesPath = () => path14.join(configDir(), "workspaces.json");
21383
21383
  var vcsCwd = (cwd) => cwd ?? process.env.WORKFLOW_WORKSPACE_ROOT ?? process.cwd();
21384
21384
  var remoteProvider = (cwd) => {
@@ -21659,10 +21659,10 @@ function mergedPrStyle(limit = 6, cwd) {
21659
21659
  examples
21660
21660
  };
21661
21661
  }
21662
- // packages/workit-core/src/core/task-engine.ts
21662
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
21663
21663
  import { realpathSync as realpathSync4 } from "node:fs";
21664
21664
 
21665
- // packages/workit-core/src/core/policy-resolver.ts
21665
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
21666
21666
  function resolvePolicy(input) {
21667
21667
  const ids = input.constraints.map((constraint) => constraint.id);
21668
21668
  if (new Set(ids).size !== ids.length)
@@ -21718,7 +21718,7 @@ function diffPolicy(previous, next, reason, now) {
21718
21718
  return parsed.data;
21719
21719
  }
21720
21720
 
21721
- // packages/workit-core/src/core/policy/judgment.ts
21721
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
21722
21722
  var isObject6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
21723
21723
  var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
21724
21724
  var ALIASES = {
@@ -21842,7 +21842,7 @@ function normalizeJudgment(raw, previous) {
21842
21842
  return success(null, null, { judgment: parsed.data, ignored, legacy });
21843
21843
  }
21844
21844
 
21845
- // packages/workit-core/src/autonomy.ts
21845
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/autonomy.ts
21846
21846
  import os3 from "node:os";
21847
21847
  import path15 from "node:path";
21848
21848
  var accountHome = () => {
@@ -21979,7 +21979,7 @@ function resolveAutonomy(cwd) {
21979
21979
  var suggested = (kind) => kind === "merge" ? "verified" : "true";
21980
21980
  var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
21981
21981
 
21982
- // packages/workit-core/src/core/task-engine.ts
21982
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
21983
21983
  var workspaceVerification = (root) => {
21984
21984
  try {
21985
21985
  return resolveAutonomy(root).verification;
@@ -23564,7 +23564,7 @@ class WorkitCore {
23564
23564
  return this.summary(changed.data.task);
23565
23565
  }
23566
23566
  }
23567
- // packages/workit-core/src/core/repo-context.ts
23567
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/repo-context.ts
23568
23568
  import { spawnSync as spawnSync9 } from "node:child_process";
23569
23569
  import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
23570
23570
  import path16 from "node:path";
@@ -24034,20 +24034,20 @@ function releaseNotesContext(root, rangeOrTag) {
24034
24034
  return { stdout, stderr: "", exitCode: 0, cwd };
24035
24035
  }
24036
24036
 
24037
- // packages/workit-core/src/core/tracker-issues.ts
24037
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/tracker-issues.ts
24038
24038
  import { spawnSync as spawnSync11 } from "node:child_process";
24039
24039
 
24040
- // packages/workit-core/src/core/pr-create.ts
24040
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/pr-create.ts
24041
24041
  import fs13 from "node:fs";
24042
24042
  import path17 from "node:path";
24043
24043
  import { spawnSync as spawnSync10 } from "node:child_process";
24044
- // packages/workit-core/src/forge/pr-body.ts
24044
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/forge/pr-body.ts
24045
24045
  function parseGhIssue(value) {
24046
24046
  const m = /issues\/(\d+)/.exec(value);
24047
24047
  return m ? m[1] : String(value).trim().replace(/^#/, "");
24048
24048
  }
24049
24049
 
24050
- // packages/workit-core/src/core/pr-create.ts
24050
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/pr-create.ts
24051
24051
  function whichOnPath(tool) {
24052
24052
  const names = process.platform === "win32" ? [tool, `${tool}.exe`, `${tool}.cmd`] : [tool];
24053
24053
  for (const dir of (process.env.PATH ?? "").split(path17.delimiter)) {
@@ -24075,7 +24075,7 @@ var pushRemote = (cwd) => {
24075
24075
  return urls.length === 1 ? urls[0] : null;
24076
24076
  };
24077
24077
 
24078
- // packages/workit-core/src/core/tracker-issues.ts
24078
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/tracker-issues.ts
24079
24079
  var repoPathFromRemote = (remote) => {
24080
24080
  let rest = (remote || "").trim().replace(/\/+$/, "");
24081
24081
  if (!rest)
@@ -24173,19 +24173,19 @@ var fetchGitLabIssueBody = async (ref, root, deps = {}) => {
24173
24173
  return tryCliTriple(deps.cli ?? defaultCli("glab", hostingCliAvailable("gitlab")), "glab", ["issue", "view", id, "-R", repoArg, "-F", "json"], root, id, ["iid"], ["description"]);
24174
24174
  };
24175
24175
 
24176
- // packages/workit-core/src/core/youtrack.ts
24176
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/youtrack.ts
24177
24177
  import fs14 from "node:fs";
24178
24178
  import path18 from "node:path";
24179
24179
 
24180
- // packages/workit-core/src/core/templates.ts
24180
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/templates.ts
24181
24181
  var repoRoot2 = assetRoot();
24182
24182
 
24183
- // packages/workit-core/src/core/scripts.ts
24183
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/scripts.ts
24184
24184
  var PLUGIN_ROOT = packageRoot();
24185
24185
  var ASSET_ROOT = assetRoot();
24186
24186
  var resolveWorkspaceRoot = (explicit) => explicit || process.cwd();
24187
24187
 
24188
- // packages/workit-core/src/core/youtrack.ts
24188
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/youtrack.ts
24189
24189
  var ISSUE_RE = /^[A-Z]+-\d+$/;
24190
24190
  var TOKEN_PLACEHOLDER = "YOUR_TOKEN_HERE";
24191
24191
  var youTrackConfigPath = () => process.env.WORKFLOW_YOUTRACK_CONFIG ?? path18.join(configDir(), "youtrack.json");
@@ -24476,7 +24476,7 @@ var fetchYouTrackIssueBody = async (issue, creds = youTrackToken, request = youT
24476
24476
  }
24477
24477
  };
24478
24478
 
24479
- // packages/workit-core/src/core/context-read.ts
24479
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/context-read.ts
24480
24480
  var contextReadSchema = object({
24481
24481
  kind: _enum([
24482
24482
  "git",
@@ -24571,7 +24571,7 @@ var readExternalContext = async (root, payload) => {
24571
24571
  }
24572
24572
  }
24573
24573
  };
24574
- // packages/workit-core/src/core.ts
24574
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core.ts
24575
24575
  var revision2 = /^[A-Za-z0-9@][A-Za-z0-9@._/~^{}-]*$/;
24576
24576
  function gitRevisionParts(value) {
24577
24577
  if (!value || value.startsWith("-") || /[\s\\'"`$;|&<>]/.test(value)) {
@@ -24627,7 +24627,7 @@ function run2(root, executable, args, env = {}) {
24627
24627
  };
24628
24628
  }
24629
24629
 
24630
- // packages/workit-core/src/core/support-matrix.ts
24630
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/support-matrix.ts
24631
24631
  var SUPPORT_MATRIX = {
24632
24632
  bun: "1.4.1",
24633
24633
  node: { minimum: "24", current: "24.20.0" },
@@ -24637,7 +24637,7 @@ var SUPPORT_MATRIX = {
24637
24637
  os: ["ubuntu-latest", "macos-latest", "windows-latest"]
24638
24638
  };
24639
24639
 
24640
- // packages/workit-mcp/src/server.ts
24640
+ // packages/workit-codex/node_modules/@brainervirus/workit-mcp/src/server.ts
24641
24641
  import { existsSync as existsSync8, readFileSync as readFileSync6, realpathSync as realpathSync6 } from "node:fs";
24642
24642
  import path20 from "node:path";
24643
24643
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
@@ -27014,10 +27014,10 @@ class StdioServerTransport {
27014
27014
  }
27015
27015
  }
27016
27016
 
27017
- // packages/workit-mcp/src/server.ts
27017
+ // packages/workit-codex/node_modules/@brainervirus/workit-mcp/src/server.ts
27018
27018
  import { fileURLToPath as fileURLToPath2 } from "node:url";
27019
27019
 
27020
- // packages/workit-core/src/core/logger.ts
27020
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/logger.ts
27021
27021
  import os4 from "node:os";
27022
27022
  var REDACTED = "[REDACTED]";
27023
27023
  var SECRET_VALUE = /\b(?:Bearer|Basic|Digest|Token)\s+\S+/gi;
@@ -27074,7 +27074,7 @@ var applyPatterns = (value) => {
27074
27074
  };
27075
27075
  var redactSecrets = (value) => applyPatterns(value);
27076
27076
 
27077
- // packages/workit-mcp/src/server.ts
27077
+ // packages/workit-codex/node_modules/@brainervirus/workit-mcp/src/server.ts
27078
27078
  class McpCapabilityUnavailableError extends Error {
27079
27079
  capability;
27080
27080
  constructor(capability) {
@@ -27369,7 +27369,7 @@ async function runStdioServer(host, contextProvider = defaultContextProvider(hos
27369
27369
  await server.connect(new StdioServerTransport);
27370
27370
  return server;
27371
27371
  }
27372
- // packages/workit-core/src/hooks/descriptor.ts
27372
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
27373
27373
  var support = (descriptor, axis) => {
27374
27374
  if (axis.startsWith("event:"))
27375
27375
  return descriptor.events[axis.slice("event:".length)].support;
@@ -27393,14 +27393,14 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
27393
27393
  refs: rule.refs.map((handle) => ({ kind: "host", host: descriptor.host, handle }))
27394
27394
  };
27395
27395
  });
27396
- // packages/workit-core/src/hooks/context.ts
27396
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/context.ts
27397
27397
  var signals = new Map;
27398
27398
  var cache = new Map;
27399
- // packages/workit-core/src/hooks/write-gate.ts
27399
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
27400
27400
  var CASE_INSENSITIVE = process.platform === "darwin" || process.platform === "win32";
27401
27401
  var PREFIXES = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
27402
27402
  var cache2 = new Map;
27403
- // packages/workit-core/src/hooks/hosts/fields.ts
27403
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
27404
27404
  var SHELLS = new Set(["sh", "bash", "zsh", "dash", "pwsh", "powershell", "cmd"]);
27405
27405
  var WRITE_TOOLS = new Set([
27406
27406
  "write",
@@ -27421,15 +27421,15 @@ var WRITE_TOOLS = new Set([
27421
27421
  "editfile",
27422
27422
  "writefile"
27423
27423
  ]);
27424
- // packages/workit-core/src/hooks/handle.ts
27424
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
27425
27425
  var offered = new Set;
27426
27426
  var CLAUDE_JUDGES = new Set(["workit:verifier", "workit:reviewer"]);
27427
- // packages/workit-core/src/hooks/hosts/claude-code.ts
27427
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
27428
27428
  var SOURCES = new Set(["startup", "resume", "clear", "compact", "fork"]);
27429
27429
  var SHELL_TOOLS = new Set(["Bash", "PowerShell"]);
27430
27430
  var CONTEXT_EVENTS = new Set(["SessionStart", "UserPromptSubmit", "SubagentStart"]);
27431
27431
 
27432
- // packages/workit-core/src/hooks/hosts/codex.ts
27432
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
27433
27433
  function detectCodexSurface(env) {
27434
27434
  return env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || Boolean(env.CODEX_ELECTRON_RESOURCES_PATH) ? "codex_desktop" : "codex_cli";
27435
27435
  }
@@ -27534,10 +27534,10 @@ var codexDescriptor = (host) => ({ ...CODEX_DESCRIPTOR, host });
27534
27534
  var SHELL_TOOLS2 = new Set(["bash", "unified-exec"]);
27535
27535
  var SOURCES2 = new Set(["startup", "resume", "clear", "compact"]);
27536
27536
 
27537
- // packages/workit-core/src/hooks/hosts/cursor.ts
27537
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
27538
27538
  var BLOCKING = new Set(["preToolUse", "beforeShellExecution", "subagentStart"]);
27539
27539
 
27540
- // packages/workit-core/src/hooks/run.ts
27540
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/run.ts
27541
27541
  if (false) {}
27542
27542
  // packages/workit-codex/hooks/workit-hook.ts
27543
27543
  var codexCapabilities = (host, availability = {}) => capabilitiesFor(codexDescriptor(host), {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from "node:module";
3
3
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
4
- // packages/workit-core/src/hooks/descriptor.ts
4
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
5
5
  var support = (descriptor, axis) => {
6
6
  if (axis.startsWith("event:"))
7
7
  return descriptor.events[axis.slice("event:".length)].support;
@@ -25,10 +25,10 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
25
25
  refs: rule.refs.map((handle) => ({ kind: "host", host: descriptor.host, handle }))
26
26
  };
27
27
  });
28
- // packages/workit-core/src/hooks/context.ts
28
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/context.ts
29
29
  import path15 from "node:path";
30
30
 
31
- // packages/workit-core/src/core/methods.ts
31
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/methods.ts
32
32
  var METHODS = {
33
33
  "workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
34
34
  "workit-bdd": { dimensions: ["testing"] },
@@ -136,7 +136,7 @@ Skills: load the skill, never act from memory of it (slash aliases /wk-<name>).
136
136
  - architecture, deepen modules (user-invoked; offer it): workit-architecture
137
137
  `.trim();
138
138
 
139
- // packages/workit-core/src/core/task-contract.ts
139
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
140
140
  import { createHash, randomUUID } from "node:crypto";
141
141
 
142
142
  // node_modules/zod/v4/core/util.js
@@ -7650,7 +7650,7 @@ function refine(fn, _params = {}) {
7650
7650
  function superRefine(fn, params) {
7651
7651
  return _superRefine(fn, params);
7652
7652
  }
7653
- // packages/workit-core/src/core/task-contract.ts
7653
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
7654
7654
  var SCHEMA_VERSION = 1;
7655
7655
  var POLICY_VERSION = "1.0.0";
7656
7656
  var OPERATION_FAMILIES = [
@@ -8506,13 +8506,13 @@ function requirementId(input) {
8506
8506
  });
8507
8507
  }
8508
8508
 
8509
- // packages/workit-core/src/core/task-evaluation.ts
8509
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
8510
8510
  import { createHash as createHash7 } from "node:crypto";
8511
8511
  import * as fs11 from "node:fs";
8512
8512
  import { spawnSync as spawnSync6 } from "node:child_process";
8513
8513
  import path11 from "node:path";
8514
8514
 
8515
- // packages/workit-core/src/check-config.ts
8515
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/check-config.ts
8516
8516
  import { spawnSync } from "node:child_process";
8517
8517
  import fs from "node:fs";
8518
8518
  import path from "node:path";
@@ -8717,7 +8717,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
8717
8717
  return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
8718
8718
  }
8719
8719
 
8720
- // packages/workit-core/src/git/rev.ts
8720
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/git/rev.ts
8721
8721
  import { spawnSync as spawnSync2 } from "node:child_process";
8722
8722
  import { createHash as createHash2 } from "node:crypto";
8723
8723
  import fs2 from "node:fs";
@@ -8869,7 +8869,7 @@ function currentBranch(cwd) {
8869
8869
  return line(git2(cwd, ["symbolic-ref", "--short", "-q", "HEAD"]));
8870
8870
  }
8871
8871
 
8872
- // packages/workit-core/src/core/task-store.ts
8872
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-store.ts
8873
8873
  import { createHash as createHash5, randomUUID as randomUUID3 } from "node:crypto";
8874
8874
  import * as fs9 from "node:fs";
8875
8875
  import path8 from "node:path";
@@ -9475,7 +9475,7 @@ function acquireFileLockSync(targetPath, options) {
9475
9475
  }
9476
9476
  }
9477
9477
  }
9478
- // packages/workit-core/src/core/package-root.ts
9478
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/package-root.ts
9479
9479
  import { existsSync } from "node:fs";
9480
9480
  import path5 from "node:path";
9481
9481
  import { fileURLToPath } from "node:url";
@@ -9489,12 +9489,12 @@ var packageRoot = () => {
9489
9489
  }
9490
9490
  };
9491
9491
 
9492
- // packages/workit-core/src/core/store-lock.ts
9492
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
9493
9493
  import { spawnSync as spawnSync4 } from "node:child_process";
9494
9494
  import fs7 from "node:fs";
9495
9495
  import { hostname } from "node:os";
9496
9496
 
9497
- // packages/workit-core/src/store/paths.ts
9497
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/paths.ts
9498
9498
  import { spawnSync as spawnSync3 } from "node:child_process";
9499
9499
  import { createHash as createHash3 } from "node:crypto";
9500
9500
  import fs6 from "node:fs";
@@ -9774,7 +9774,7 @@ var checkoutSlug = (root) => {
9774
9774
  return `${base}-${shortHash(canonical)}`;
9775
9775
  };
9776
9776
 
9777
- // packages/workit-core/src/core/store-lock.ts
9777
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
9778
9778
  var metadataLockSchema = object({
9779
9779
  pid: number2().int().nonnegative().safe(),
9780
9780
  processStart: string2().nullable(),
@@ -9905,7 +9905,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
9905
9905
  }
9906
9906
  };
9907
9907
 
9908
- // packages/workit-core/src/store/event-log.ts
9908
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/event-log.ts
9909
9909
  import { randomUUID as randomUUID2 } from "node:crypto";
9910
9910
  import fs8 from "node:fs";
9911
9911
  import path7 from "node:path";
@@ -10065,7 +10065,7 @@ var retryTransient = (run) => {
10065
10065
  };
10066
10066
  var renameWithRetry = (from, to) => retryTransient(() => fs8.renameSync(from, to));
10067
10067
 
10068
- // packages/workit-core/src/store/patch.ts
10068
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/patch.ts
10069
10069
  var isPlainObject2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
10070
10070
  var equal = (left, right) => {
10071
10071
  if (left === right)
@@ -10175,7 +10175,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
10175
10175
  return false;
10176
10176
  });
10177
10177
 
10178
- // packages/workit-core/src/store/reduce.ts
10178
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/reduce.ts
10179
10179
  import { createHash as createHash4 } from "node:crypto";
10180
10180
  var OPENING_TYPES = new Set([
10181
10181
  "task.opened",
@@ -10306,7 +10306,7 @@ function eventType(before, after) {
10306
10306
  return "task.updated";
10307
10307
  }
10308
10308
 
10309
- // packages/workit-core/src/store/notes.ts
10309
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/store/notes.ts
10310
10310
  var SLOT = Symbol.for("workit.migrationReporter");
10311
10311
  var reportMigration = (report) => {
10312
10312
  try {
@@ -10317,7 +10317,7 @@ var reportMigration = (report) => {
10317
10317
  };
10318
10318
  var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
10319
10319
 
10320
- // packages/workit-core/src/core/task-store.ts
10320
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-store.ts
10321
10321
  var MIGRATION_PENDING = "workit migration pending";
10322
10322
  var STORE_FORMAT = 3;
10323
10323
  var STORE_MIN_RUNTIME = "3.0.0";
@@ -11954,11 +11954,11 @@ class TaskStore {
11954
11954
  }
11955
11955
  }
11956
11956
 
11957
- // packages/workit-core/src/core/policy/derive.ts
11957
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
11958
11958
  import { existsSync as existsSync3 } from "node:fs";
11959
11959
  import path10 from "node:path";
11960
11960
 
11961
- // packages/workit-core/src/ledger.ts
11961
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/ledger.ts
11962
11962
  import { spawnSync as spawnSync5 } from "node:child_process";
11963
11963
  import { createHash as createHash6, randomBytes as randomBytes2 } from "node:crypto";
11964
11964
  import fs10 from "node:fs";
@@ -12309,7 +12309,7 @@ function checkVerdicts(cwd, branch, rows) {
12309
12309
  }
12310
12310
  var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
12311
12311
 
12312
- // packages/workit-core/src/core/policy/derive.ts
12312
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
12313
12313
  var RULES = {
12314
12314
  test: "check:test",
12315
12315
  self: "verdict:self",
@@ -12508,7 +12508,7 @@ function writeBlockers(task, root) {
12508
12508
  });
12509
12509
  }
12510
12510
 
12511
- // packages/workit-core/src/core/task-evaluation.ts
12511
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
12512
12512
  var digestBytes = (value) => createHash7("sha256").update(value).digest("hex");
12513
12513
  var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path11.sep}`);
12514
12514
  var relative = (root, candidate) => path11.relative(root, candidate).split(path11.sep).join("/") || ".";
@@ -13174,10 +13174,10 @@ function evaluateClosure(requestedOutcome, view) {
13174
13174
  });
13175
13175
  }
13176
13176
 
13177
- // packages/workit-core/src/core/task-engine.ts
13177
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
13178
13178
  import { realpathSync as realpathSync4 } from "node:fs";
13179
13179
 
13180
- // packages/workit-core/src/core/policy-resolver.ts
13180
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
13181
13181
  function resolvePolicy(input) {
13182
13182
  const ids = input.constraints.map((constraint) => constraint.id);
13183
13183
  if (new Set(ids).size !== ids.length)
@@ -13233,7 +13233,7 @@ function diffPolicy(previous, next, reason, now) {
13233
13233
  return parsed.data;
13234
13234
  }
13235
13235
 
13236
- // packages/workit-core/src/core/operation-input.ts
13236
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
13237
13237
  var str2 = (d, values) => ({
13238
13238
  type: "string",
13239
13239
  ...values ? { enum: values } : {},
@@ -13579,7 +13579,7 @@ function normalizeOperationInput(family, input, host) {
13579
13579
  return request;
13580
13580
  }
13581
13581
 
13582
- // packages/workit-core/src/core/policy/judgment.ts
13582
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
13583
13583
  var isObject6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
13584
13584
  var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
13585
13585
  var ALIASES = {
@@ -13703,11 +13703,11 @@ function normalizeJudgment(raw, previous) {
13703
13703
  return success(null, null, { judgment: parsed.data, ignored, legacy });
13704
13704
  }
13705
13705
 
13706
- // packages/workit-core/src/autonomy.ts
13706
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/autonomy.ts
13707
13707
  import os3 from "node:os";
13708
13708
  import path14 from "node:path";
13709
13709
 
13710
- // packages/workit-core/src/core/config.ts
13710
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/config.ts
13711
13711
  import {
13712
13712
  copyFileSync as copyFileSync2,
13713
13713
  cpSync as cpSync2,
@@ -13720,7 +13720,7 @@ import {
13720
13720
  import os2 from "node:os";
13721
13721
  import path12 from "node:path";
13722
13722
 
13723
- // packages/workit-core/src/core/boundary.ts
13723
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/boundary.ts
13724
13724
  var EVENT = {
13725
13725
  initialization: "initialization",
13726
13726
  provenance: "provenance",
@@ -13741,7 +13741,7 @@ var errorDetail = (err) => {
13741
13741
  return { error_name: "unknown", error: String(err) };
13742
13742
  };
13743
13743
 
13744
- // packages/workit-core/src/core/config.ts
13744
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/config.ts
13745
13745
  var diagnosticLogger;
13746
13746
  var PRESETS = {
13747
13747
  gitflow: {
@@ -13903,7 +13903,7 @@ var resolveCommitPolicy = (config, workspace) => {
13903
13903
  return config.commitPolicy ?? { preset: "conventional" };
13904
13904
  };
13905
13905
 
13906
- // packages/workit-core/src/core/workspaces.ts
13906
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
13907
13907
  import { createHash as createHash8 } from "node:crypto";
13908
13908
  import { readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
13909
13909
  import path13 from "node:path";
@@ -14303,7 +14303,7 @@ var resolveRuntimeWorkspacePolicy = (cwd, kind, requestedProfile) => {
14303
14303
  };
14304
14304
  };
14305
14305
 
14306
- // packages/workit-core/src/autonomy.ts
14306
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/autonomy.ts
14307
14307
  var accountHome = () => {
14308
14308
  try {
14309
14309
  return os3.userInfo().homedir;
@@ -14438,12 +14438,12 @@ function resolveAutonomy(cwd) {
14438
14438
  var suggested = (kind) => kind === "merge" ? "verified" : "true";
14439
14439
  var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
14440
14440
 
14441
- // packages/workit-core/src/core/workers.ts
14441
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/workers.ts
14442
14442
  var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
14443
14443
  var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
14444
14444
  var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
14445
14445
 
14446
- // packages/workit-core/src/core/task-context.ts
14446
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-context.ts
14447
14447
  function reconcileResume(view, observations = []) {
14448
14448
  if (observations.length > 0)
14449
14449
  return failure2("permission_denied", "worker observations require native host verification");
@@ -14558,7 +14558,7 @@ var exportDigest = (bundle) => sha256({
14558
14558
  task: bundle.task
14559
14559
  });
14560
14560
 
14561
- // packages/workit-core/src/core/task-engine.ts
14561
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
14562
14562
  var workspaceVerification = (root) => {
14563
14563
  try {
14564
14564
  return resolveAutonomy(root).verification;
@@ -16144,7 +16144,7 @@ class WorkitCore {
16144
16144
  }
16145
16145
  }
16146
16146
 
16147
- // packages/workit-core/src/hooks/context.ts
16147
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/context.ts
16148
16148
  var MIGRATION_PENDING_NOTE = "workit migration pending — run `workit task status`";
16149
16149
  var migrationPending = (result) => !result.ok && result.code === "needs_input" && (result.error ?? "").startsWith(MIGRATION_PENDING);
16150
16150
  var boundTo = (entry, session) => entry.sessions.some((item) => item.host === session.host && item.handle === session.handle);
@@ -16291,10 +16291,10 @@ var turnContextText = (input, descriptor) => {
16291
16291
  return null;
16292
16292
  }
16293
16293
  };
16294
- // packages/workit-core/src/core/branch.ts
16294
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/branch.ts
16295
16295
  import { createHash as createHash9 } from "node:crypto";
16296
16296
 
16297
- // packages/workit-core/src/core/release-tracks.ts
16297
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
16298
16298
  class ReleaseTrackError extends Error {
16299
16299
  }
16300
16300
  var KNOWN_FIELDS = new Set([
@@ -16433,7 +16433,7 @@ function workspaceReleaseTracks(cwd) {
16433
16433
  }
16434
16434
  var memo3 = new Map;
16435
16435
 
16436
- // packages/workit-core/src/core/branch.ts
16436
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/branch.ts
16437
16437
  var withReleaseTracks = (workspaceRoot, policy) => {
16438
16438
  const read = workspaceReleaseTracks(workspaceRoot);
16439
16439
  if (read.error)
@@ -16526,7 +16526,7 @@ var validateBranchNameFor = (workspaceRoot, name) => {
16526
16526
  }
16527
16527
  };
16528
16528
 
16529
- // packages/workit-core/src/core/route-intent.ts
16529
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/core/route-intent.ts
16530
16530
  var shellBranchTarget = (command) => {
16531
16531
  if (!command.trim() || /[\r\n;&|<>`'"$()\\*?{}~!#]/u.test(command) || command.includes("[") || command.includes("]"))
16532
16532
  return null;
@@ -16542,12 +16542,12 @@ var shellBranchPolicyViolation = (root, command) => {
16542
16542
  return target === null ? null : validateBranchNameFor(root, target);
16543
16543
  };
16544
16544
 
16545
- // packages/workit-core/src/hooks/policy.ts
16545
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/policy.ts
16546
16546
  var shellPolicy = (cwd, command) => {
16547
16547
  const policy = shellBranchPolicyViolation(cwd, command);
16548
16548
  return policy && !policy.ok ? { kind: "deny", reason: `branch_policy_denied: ${policy.error}`, unblock: null } : { kind: "none" };
16549
16549
  };
16550
- // packages/workit-core/src/hooks/write-gate.ts
16550
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
16551
16551
  import { realpathSync as realpathSync5 } from "node:fs";
16552
16552
  import path16 from "node:path";
16553
16553
  var NONE2 = { kind: "none" };
@@ -16808,7 +16808,7 @@ function writeGate(cwd, paths) {
16808
16808
  return NONE2;
16809
16809
  }
16810
16810
  }
16811
- // packages/workit-core/src/hooks/hosts/fields.ts
16811
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
16812
16812
  import { existsSync as existsSync6, realpathSync as realpathSync6, statSync as statSync2 } from "node:fs";
16813
16813
  import path17 from "node:path";
16814
16814
  var isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
@@ -16876,7 +16876,7 @@ var writePaths = (input) => {
16876
16876
  paths.push(match[1].trim());
16877
16877
  return [...new Set(paths)];
16878
16878
  };
16879
- // packages/workit-core/src/hooks/handle.ts
16879
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
16880
16880
  var usable2 = (value) => value === "native" || value === "partial";
16881
16881
  var NONE3 = { kind: "none" };
16882
16882
  var offered = new Set;
@@ -16972,7 +16972,7 @@ var dispatchHook = (adapter, raw, env = process.env) => {
16972
16972
  };
16973
16973
  }
16974
16974
  };
16975
- // packages/workit-core/src/hooks/hosts/claude-code.ts
16975
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
16976
16976
  var CLAUDE_CODE_DESCRIPTOR = {
16977
16977
  host: "claude_code",
16978
16978
  label: "Claude Code",
@@ -17215,7 +17215,7 @@ var claudeCodeAdapter = {
17215
17215
  render
17216
17216
  };
17217
17217
 
17218
- // packages/workit-core/src/hooks/hosts/codex.ts
17218
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
17219
17219
  function detectCodexSurface(env) {
17220
17220
  return env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || Boolean(env.CODEX_ELECTRON_RESOURCES_PATH) ? "codex_desktop" : "codex_cli";
17221
17221
  }
@@ -17444,7 +17444,7 @@ var codexAdapter = {
17444
17444
  addendum: (input) => `<workit-codex-mutations>Codex MCP is read-only: unattested callers cannot mutate. Run workit verbs with the workit CLI on the shell (node_modules/.bin/workit, or npx -y @brainervirus/workit-cli): check, git branch|commit|push, pr, ci, stack, ledger, handoff; task-family mutations take --json${input.session.id ? ` --actor ${input.session.id}` : ""}. A verifier or reviewer records workit ledger verdict under a session the lead assigns (WORKIT_SESSION_ID=<lead>-v<n>), never the author's. Merge and release need a workspace grant (workit grant show); a question answer is not host permission.</workit-codex-mutations>`
17445
17445
  };
17446
17446
 
17447
- // packages/workit-core/src/hooks/hosts/cursor.ts
17447
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
17448
17448
  import path18 from "node:path";
17449
17449
  var undocumented2 = { support: "undocumented", native: null };
17450
17450
  var none = { support: "none", native: null };
@@ -17688,7 +17688,7 @@ var cursorAdapter = {
17688
17688
  render: render3
17689
17689
  };
17690
17690
 
17691
- // packages/workit-core/src/hooks/run.ts
17691
+ // packages/workit-codex/node_modules/@brainervirus/workit-core/src/hooks/run.ts
17692
17692
  var HOOK_ADAPTERS = {
17693
17693
  claude_code: claudeCodeAdapter,
17694
17694
  codex_cli: codexAdapter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-codex",
3
- "version": "7.7.0",
3
+ "version": "8.0.0",
4
4
  "private": false,
5
5
  "description": "Workit Codex CLI/desktop plugin — shared MCP transport, hooks, and sixteen method skills",
6
6
  "keywords": [
@@ -38,8 +38,8 @@
38
38
  "build": "bun scripts/build.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@brainervirus/workit-core": "^7.7.0",
42
- "@brainervirus/workit-mcp": "^7.7.0"
41
+ "@brainervirus/workit-core": "^8.0.0",
42
+ "@brainervirus/workit-mcp": "^8.0.0"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=24"
@@ -51,8 +51,8 @@ the base keeps moving, or after 3 failed fix attempts on the same check.
51
51
  flake|infra` per head. Real: reproduce with `workit check`, fix the root
52
52
  cause, batch fixes into one push.
53
53
  6. **Verified.** After the last push a non-author records a verdict
54
- (read the `workit-review` skill's SKILL.md and follow it). Land only when granted: `workit stack land` (the
55
- contiguous verified run from the root) or `workit pr merge`.
54
+ (read the `workit-review` skill's SKILL.md and follow it). Land only when granted: `workit stack land` (verified run
55
+ from the root) or `workit pr merge`; `--unverified --reason` only if user-asked.
56
56
  7. **Observe it landed:** `workit verify-delivery pr` or `merge`. After a failed
57
57
  verdict or a check red 3+ times, at any endpoint: offer `/wk-retro` in one
58
58
  line of the final or stop report; never pause the babysit loop for it.