@workit-dev/codex 2.12.0 → 2.13.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": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -6621,13 +6621,13 @@ var require_dist = __commonJS(function(exports, module) {
6621
6621
  });
6622
6622
 
6623
6623
  // packages/workit-codex/scripts/launch-mcp.ts
6624
- import { existsSync as existsSync17, realpathSync as realpathSync12, statSync as statSync6 } from "node:fs";
6624
+ import { existsSync as existsSync18, realpathSync as realpathSync12, statSync as statSync6 } from "node:fs";
6625
6625
  import path38 from "node:path";
6626
6626
  import { fileURLToPath as fileURLToPath3 } from "node:url";
6627
6627
 
6628
6628
  // packages/workit-core/src/core.ts
6629
6629
  import { spawnSync as spawnSync20 } from "node:child_process";
6630
- import { existsSync as existsSync12, realpathSync as realpathSync9 } from "node:fs";
6630
+ import { existsSync as existsSync13, realpathSync as realpathSync9 } from "node:fs";
6631
6631
  import path31 from "node:path";
6632
6632
 
6633
6633
  // packages/workit-core/src/core/task-contract.ts
@@ -24035,6 +24035,7 @@ var exportDigest = (bundle) => sha256({
24035
24035
  task: bundle.task
24036
24036
  });
24037
24037
  // packages/workit-core/src/autonomy.ts
24038
+ import { closeSync as closeSync2, copyFileSync as copyFileSync2, existsSync as existsSync11, openSync as openSync2 } from "node:fs";
24038
24039
  import path26 from "node:path";
24039
24040
 
24040
24041
  // packages/workit-core/src/core/eval-world.ts
@@ -24131,12 +24132,36 @@ function checkSeal(dir) {
24131
24132
  }
24132
24133
 
24133
24134
  // packages/workit-core/src/autonomy.ts
24134
- var accountDir = () => {
24135
+ var accountHomeDir = () => {
24135
24136
  const home = grantsHome.resolve();
24136
24137
  return home === null ? null : configDir({ HOME: home });
24137
24138
  };
24138
- var grantsDir = () => accountDir() ?? resolveConfigDir();
24139
+ var deniedFile = (dir) => {
24140
+ for (const name of ["workspaces.json", SEAL_FILE]) {
24141
+ const file = path26.join(dir, name);
24142
+ try {
24143
+ closeSync2(openSync2(file, "r"));
24144
+ } catch (error) {
24145
+ const code = error.code;
24146
+ if (code === "EACCES" || code === "EPERM")
24147
+ return file;
24148
+ }
24149
+ }
24150
+ return null;
24151
+ };
24152
+ var accountDir = () => {
24153
+ const dir = accountHomeDir();
24154
+ return dir === null || deniedFile(dir) !== null ? null : dir;
24155
+ };
24156
+ var grantsDir = () => accountHomeDir() ?? resolveConfigDir();
24139
24157
  var NO_ACCOUNT = "no OS account record answered (core/account-home.ts), so no grants are read: the D4 defaults apply";
24158
+ var accountUnread = () => {
24159
+ const dir = accountHomeDir();
24160
+ if (dir === null)
24161
+ return NO_ACCOUNT;
24162
+ const file = deniedFile(dir);
24163
+ return file === null ? null : `the account's ${path26.basename(file)} cannot be read (permission denied), so it reads as no workspace entries: no grants, no models, the D4 defaults apply`;
24164
+ };
24140
24165
  var entriesIn = (dir) => dir === null ? [] : loadWorkspacesFrom(dir);
24141
24166
  var fileSource = (dir = accountDir()) => ({
24142
24167
  resolve: (cwd, name) => dir === null ? null : resolveWorkspaceFrom(cwd, dir, name),
@@ -24179,7 +24204,7 @@ var benchWorld = (cwd) => {
24179
24204
  var grantsOverride = () => {
24180
24205
  const shown = shownGrantsDir();
24181
24206
  if (shown === null)
24182
- return NO_ACCOUNT;
24207
+ return accountUnread() ?? NO_ACCOUNT;
24183
24208
  const configured = path26.resolve(resolveConfigDir());
24184
24209
  return configured === path26.resolve(shown) ? null : `the config directory is redirected to ${configured} (WORKIT_CONFIG, WORKIT_CONFIG_DIR or XDG_CONFIG_HOME), but that override does not apply to grants: grants are read only from ${path26.join(grantsDir(), "workspaces.json")}, and under a redirect they never exceed the D4 defaults`;
24185
24210
  };
@@ -24348,9 +24373,10 @@ function capAt(source, named, where, by, why, main = false) {
24348
24373
  }
24349
24374
  function resolveAutonomy(cwd, target) {
24350
24375
  const world = benchWorld(cwd);
24376
+ const unread = world ? null : accountUnread();
24377
+ if (unread !== null)
24378
+ return { ...autonomyOf(null), note: unread };
24351
24379
  const override = world ? null : grantsOverride();
24352
- if (override === NO_ACCOUNT)
24353
- return { ...autonomyOf(null), note: override };
24354
24380
  let resolved;
24355
24381
  const once = typeof target === "function" ? () => resolved ??= target() : target;
24356
24382
  const account = accountAuthority(cwd, world, once);
@@ -26558,7 +26584,7 @@ class WorkitCore {
26558
26584
  }
26559
26585
  // packages/workit-core/src/core/repo-context.ts
26560
26586
  import { spawnSync as spawnSync16 } from "node:child_process";
26561
- import { existsSync as existsSync11, readFileSync as readFileSync11, readdirSync as readdirSync4 } from "node:fs";
26587
+ import { existsSync as existsSync12, readFileSync as readFileSync11, readdirSync as readdirSync4 } from "node:fs";
26562
26588
  import path27 from "node:path";
26563
26589
  var isSafeContextRange = (value) => value.length <= 4096 && (() => {
26564
26590
  try {
@@ -26740,7 +26766,7 @@ var diffStatForRange = (cwd, range) => {
26740
26766
  };
26741
26767
  var packageScripts = (cwd, keys) => {
26742
26768
  const pkgPath = path27.join(cwd, "package.json");
26743
- if (!existsSync11(pkgPath))
26769
+ if (!existsSync12(pkgPath))
26744
26770
  return [];
26745
26771
  try {
26746
26772
  const pkg = JSON.parse(readFileSync11(pkgPath, "utf8"));
@@ -26775,7 +26801,7 @@ var documentationFiles = (cwd) => {
26775
26801
  return matches.toSorted().slice(0, 200);
26776
26802
  };
26777
26803
  var readTrimmed2 = (file, maxLines) => {
26778
- if (!existsSync11(file))
26804
+ if (!existsSync12(file))
26779
26805
  return "";
26780
26806
  const lines = readFileSync11(file, "utf8").split(`
26781
26807
  `);
@@ -26851,7 +26877,7 @@ ${status.stderr}` : "");
26851
26877
  stdout += `
26852
26878
  `;
26853
26879
  stdout += printSection("Recent Validation Signals");
26854
- if (existsSync11(path27.join(cwd, "package.json"))) {
26880
+ if (existsSync12(path27.join(cwd, "package.json"))) {
26855
26881
  stdout += `package.json detected. Common scripts:
26856
26882
  `;
26857
26883
  const found = packageScripts(cwd, ["lint", "format:check", "test", "build"]);
@@ -26860,7 +26886,7 @@ ${status.stderr}` : "");
26860
26886
  `) + `
26861
26887
  `;
26862
26888
  }
26863
- if (existsSync11(path27.join(cwd, "Cargo.toml")) || existsSync11(path27.join(cwd, "src-tauri/Cargo.toml"))) {
26889
+ if (existsSync12(path27.join(cwd, "Cargo.toml")) || existsSync12(path27.join(cwd, "src-tauri/Cargo.toml"))) {
26864
26890
  stdout += `Rust project detected.
26865
26891
  `;
26866
26892
  }
@@ -26912,7 +26938,7 @@ function changelogContext(root, range) {
26912
26938
  `;
26913
26939
  stdout += printSection("Existing CHANGELOG.md");
26914
26940
  const changelogPath = path27.join(cwd, "CHANGELOG.md");
26915
- if (existsSync11(changelogPath)) {
26941
+ if (existsSync12(changelogPath)) {
26916
26942
  stdout += readTrimmed2(changelogPath, 260) + `
26917
26943
  `;
26918
26944
  } else {
@@ -26954,7 +26980,7 @@ function docsRefreshContext(root, range) {
26954
26980
  `;
26955
26981
  stdout += printSection("README Preview");
26956
26982
  const readme = path27.join(cwd, "README.md");
26957
- if (existsSync11(readme)) {
26983
+ if (existsSync12(readme)) {
26958
26984
  stdout += readTrimmed2(readme, 220) + `
26959
26985
  `;
26960
26986
  } else {
@@ -26963,7 +26989,7 @@ function docsRefreshContext(root, range) {
26963
26989
  }
26964
26990
  stdout += printSection("Package Scripts");
26965
26991
  const pkgPath = path27.join(cwd, "package.json");
26966
- if (existsSync11(pkgPath)) {
26992
+ if (existsSync12(pkgPath)) {
26967
26993
  try {
26968
26994
  const pkg = JSON.parse(readFileSync11(pkgPath, "utf8"));
26969
26995
  stdout += JSON.stringify({ name: pkg.name, version: pkg.version, scripts: pkg.scripts }, null, 2) + `
@@ -27019,7 +27045,7 @@ function releaseNotesContext(root, rangeOrTag) {
27019
27045
  `;
27020
27046
  stdout += printSection("Existing Release Files");
27021
27047
  for (const rel of ["CHANGELOG.md", "RELEASE_NOTES.md", ".github/releases.md"]) {
27022
- if (existsSync11(path27.join(cwd, rel)))
27048
+ if (existsSync12(path27.join(cwd, rel)))
27023
27049
  stdout += rel + `
27024
27050
  `;
27025
27051
  }
@@ -27627,7 +27653,7 @@ function resolveInside(root, candidate) {
27627
27653
  throw new Error("path must stay inside repository root");
27628
27654
  }
27629
27655
  let ancestor = target;
27630
- while (!existsSync12(ancestor))
27656
+ while (!existsSync13(ancestor))
27631
27657
  ancestor = path31.dirname(ancestor);
27632
27658
  const canonicalAncestor = realpathSync9(ancestor);
27633
27659
  if (canonicalAncestor !== base && !canonicalAncestor.startsWith(base + path31.sep)) {
@@ -27651,7 +27677,7 @@ function run2(root, executable, args, env = {}) {
27651
27677
  }
27652
27678
 
27653
27679
  // packages/workit-core/src/core/cli-locate.ts
27654
- import { closeSync as closeSync2, existsSync as existsSync13, openSync as openSync2, readSync } from "node:fs";
27680
+ import { closeSync as closeSync3, existsSync as existsSync14, openSync as openSync3, readSync } from "node:fs";
27655
27681
  import path32 from "node:path";
27656
27682
  var LAUNCHER_MARKER = "workit-owned-launcher";
27657
27683
  var CLI_PACKAGE_PATH = ["node_modules", "@workit-dev", "cli"];
@@ -27666,7 +27692,7 @@ var ownedCurrentEntry = (env, platform = process.platform) => path32.join(instal
27666
27692
  var head = (file) => {
27667
27693
  let fd;
27668
27694
  try {
27669
- fd = openSync2(file, "r");
27695
+ fd = openSync3(file, "r");
27670
27696
  const buffer = Buffer.alloc(256);
27671
27697
  const read = readSync(fd, buffer, 0, buffer.length, 0);
27672
27698
  return buffer.subarray(0, read).toString("utf8");
@@ -27674,13 +27700,13 @@ var head = (file) => {
27674
27700
  return "";
27675
27701
  } finally {
27676
27702
  if (fd !== undefined)
27677
- closeSync2(fd);
27703
+ closeSync3(fd);
27678
27704
  }
27679
27705
  };
27680
27706
  var locateWorkitCli = (options = {}) => {
27681
27707
  const env = options.env ?? process.env;
27682
27708
  const platform = options.platform ?? process.platform;
27683
- const exists = options.exists ?? existsSync13;
27709
+ const exists = options.exists ?? existsSync14;
27684
27710
  const read = options.read ?? head;
27685
27711
  const node = options.node ?? process.execPath;
27686
27712
  const launcher = ownedLauncherPath(env, platform);
@@ -27742,7 +27768,7 @@ var SUPPORT_MATRIX = {
27742
27768
  };
27743
27769
 
27744
27770
  // packages/workit-mcp/src/server.ts
27745
- import { existsSync as existsSync14, readFileSync as readFileSync12, realpathSync as realpathSync10 } from "node:fs";
27771
+ import { existsSync as existsSync15, readFileSync as readFileSync12, realpathSync as realpathSync10 } from "node:fs";
27746
27772
  import path33 from "node:path";
27747
27773
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
27748
27774
  function isZ4Schema(s) {
@@ -30301,7 +30327,7 @@ function createMcpServer(host, contextProvider) {
30301
30327
  path33.join(here, "server.ts"),
30302
30328
  path33.join(here, "..", "..", "workit-core", "src", "core", "task-contract.ts"),
30303
30329
  path33.join(here, "..", "..", "workit-core", "src", "core", "task-engine.ts")
30304
- ].filter((file) => existsSync14(file)));
30330
+ ].filter((file) => existsSync15(file)));
30305
30331
  let staleWarned = false;
30306
30332
  const failures = new Map;
30307
30333
  const server = new Server({ name: "workit", version: VERSION }, { capabilities: { tools: {}, resources: {} } });
@@ -30818,13 +30844,13 @@ var PROMPT_INTENTS = [
30818
30844
  ].map(([name, pattern]) => [`workit-${name}`, pattern]);
30819
30845
  var READERS = new Set("cat sed head tail less more bat nl get-content gc type".split(" "));
30820
30846
  // packages/workit-core/src/hooks/hosts/fields.ts
30821
- import { existsSync as existsSync15, realpathSync as realpathSync11, statSync as statSync5 } from "node:fs";
30847
+ import { existsSync as existsSync16, realpathSync as realpathSync11, statSync as statSync5 } from "node:fs";
30822
30848
  import path35 from "node:path";
30823
30849
  var isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
30824
30850
  var nonEmpty2 = (value) => typeof value === "string" && value.trim() !== "";
30825
30851
  var optionalText = (value) => typeof value === "string" ? value : null;
30826
30852
  var existingDirectory = (value) => {
30827
- if (!nonEmpty2(value) || !path35.isAbsolute(value) || !existsSync15(value))
30853
+ if (!nonEmpty2(value) || !path35.isAbsolute(value) || !existsSync16(value))
30828
30854
  return null;
30829
30855
  try {
30830
30856
  return statSync5(value).isDirectory() ? realpathSync11(value) : null;
@@ -31725,7 +31751,7 @@ if (false)
31725
31751
 
31726
31752
  // packages/workit-codex/scripts/agents.ts
31727
31753
  import {
31728
- existsSync as existsSync16,
31754
+ existsSync as existsSync17,
31729
31755
  lstatSync as lstatSync6,
31730
31756
  mkdirSync as mkdirSync5,
31731
31757
  readdirSync as readdirSync5,
@@ -31784,7 +31810,7 @@ var lstatOrNull = (file) => {
31784
31810
  };
31785
31811
  var installCodexAgents = (pluginRoot, codexHome, models = {}) => {
31786
31812
  const source = path37.join(pluginRoot, "agents");
31787
- if (!existsSync16(source))
31813
+ if (!existsSync17(source))
31788
31814
  return [];
31789
31815
  const version = pluginVersion(pluginRoot);
31790
31816
  const target = path37.join(codexHome, "agents");
@@ -31850,7 +31876,7 @@ var resolveCodexWorkspaceRoot = (pluginRoot, env) => {
31850
31876
  const explicit = env.WORKIT_WORKSPACE_ROOT;
31851
31877
  const inherited = env.PWD;
31852
31878
  const candidate = explicit ?? (inherited && path38.resolve(inherited) !== path38.resolve(pluginRoot) ? inherited : undefined);
31853
- if (!candidate || !path38.isAbsolute(candidate) || !existsSync17(candidate))
31879
+ if (!candidate || !path38.isAbsolute(candidate) || !existsSync18(candidate))
31854
31880
  return null;
31855
31881
  try {
31856
31882
  if (!statSync6(candidate).isDirectory())
@@ -15514,7 +15514,7 @@ var seedTurnContext = (input, descriptor, text = turnContextText(input, descript
15514
15514
  };
15515
15515
  // packages/workit-core/src/core/route-intent.ts
15516
15516
  import { spawnSync as spawnSync14 } from "node:child_process";
15517
- import { existsSync as existsSync10 } from "node:fs";
15517
+ import { existsSync as existsSync11 } from "node:fs";
15518
15518
  import path25 from "node:path";
15519
15519
 
15520
15520
  // packages/workit-core/src/hooks/raw-git.ts
@@ -15525,6 +15525,7 @@ import os5 from "node:os";
15525
15525
  import path24 from "node:path";
15526
15526
 
15527
15527
  // packages/workit-core/src/autonomy.ts
15528
+ import { closeSync as closeSync2, copyFileSync, existsSync as existsSync10, openSync as openSync2 } from "node:fs";
15528
15529
  import path22 from "node:path";
15529
15530
 
15530
15531
  // packages/workit-core/src/core/eval-world.ts
@@ -15621,12 +15622,36 @@ function checkSeal(dir) {
15621
15622
  }
15622
15623
 
15623
15624
  // packages/workit-core/src/autonomy.ts
15624
- var accountDir = () => {
15625
+ var accountHomeDir = () => {
15625
15626
  const home = grantsHome.resolve();
15626
15627
  return home === null ? null : configDir2({ HOME: home });
15627
15628
  };
15628
- var grantsDir = () => accountDir() ?? resolveConfigDir();
15629
+ var deniedFile = (dir) => {
15630
+ for (const name of ["workspaces.json", SEAL_FILE]) {
15631
+ const file = path22.join(dir, name);
15632
+ try {
15633
+ closeSync2(openSync2(file, "r"));
15634
+ } catch (error) {
15635
+ const code = error.code;
15636
+ if (code === "EACCES" || code === "EPERM")
15637
+ return file;
15638
+ }
15639
+ }
15640
+ return null;
15641
+ };
15642
+ var accountDir = () => {
15643
+ const dir = accountHomeDir();
15644
+ return dir === null || deniedFile(dir) !== null ? null : dir;
15645
+ };
15646
+ var grantsDir = () => accountHomeDir() ?? resolveConfigDir();
15629
15647
  var NO_ACCOUNT = "no OS account record answered (core/account-home.ts), so no grants are read: the D4 defaults apply";
15648
+ var accountUnread = () => {
15649
+ const dir = accountHomeDir();
15650
+ if (dir === null)
15651
+ return NO_ACCOUNT;
15652
+ const file = deniedFile(dir);
15653
+ return file === null ? null : `the account's ${path22.basename(file)} cannot be read (permission denied), so it reads as no workspace entries: no grants, no models, the D4 defaults apply`;
15654
+ };
15630
15655
  var entriesIn = (dir) => dir === null ? [] : loadWorkspacesFrom(dir);
15631
15656
  var fileSource = (dir = accountDir()) => ({
15632
15657
  resolve: (cwd, name) => dir === null ? null : resolveWorkspaceFrom(cwd, dir, name),
@@ -15686,7 +15711,7 @@ var benchWorld = (cwd) => {
15686
15711
  var grantsOverride = () => {
15687
15712
  const shown = shownGrantsDir();
15688
15713
  if (shown === null)
15689
- return NO_ACCOUNT;
15714
+ return accountUnread() ?? NO_ACCOUNT;
15690
15715
  const configured = path22.resolve(resolveConfigDir());
15691
15716
  return configured === path22.resolve(shown) ? null : `the config directory is redirected to ${configured} (WORKIT_CONFIG, WORKIT_CONFIG_DIR or XDG_CONFIG_HOME), but that override does not apply to grants: grants are read only from ${path22.join(grantsDir(), "workspaces.json")}, and under a redirect they never exceed the D4 defaults`;
15692
15717
  };
@@ -15855,9 +15880,10 @@ function capAt(source, named, where, by, why, main = false) {
15855
15880
  }
15856
15881
  function resolveAutonomy(cwd, target) {
15857
15882
  const world = benchWorld(cwd);
15883
+ const unread = world ? null : accountUnread();
15884
+ if (unread !== null)
15885
+ return { ...autonomyOf(null), note: unread };
15858
15886
  const override = world ? null : grantsOverride();
15859
- if (override === NO_ACCOUNT)
15860
- return { ...autonomyOf(null), note: override };
15861
15887
  let resolved;
15862
15888
  const once = typeof target === "function" ? () => resolved ??= target() : target;
15863
15889
  const account = accountAuthority(cwd, world, once);
@@ -15956,9 +15982,9 @@ function capAtRemotes(source, autonomy, cwd, target) {
15956
15982
  return capped;
15957
15983
  }
15958
15984
  var grantsMatter = (kind) => {
15959
- const override = grantsOverride();
15960
- if (override === NO_ACCOUNT)
15985
+ if (accountUnread() !== null)
15961
15986
  return false;
15987
+ const override = grantsOverride();
15962
15988
  const entries = entriesIn(accountDir());
15963
15989
  const matters = entries.some((entry) => {
15964
15990
  const autonomy = autonomyOf(entry);
@@ -18571,7 +18597,7 @@ var judgedDir = (root, dir) => {
18571
18597
  if (dir === null)
18572
18598
  return root;
18573
18599
  const resolved = path25.resolve(root, dir);
18574
- return existsSync10(resolved) && inWorkitWorkspace(resolved) ? resolved : null;
18600
+ return existsSync11(resolved) && inWorkitWorkspace(resolved) ? resolved : null;
18575
18601
  };
18576
18602
  var shellBranchPolicyViolation = (root, command, dialect = "posix") => {
18577
18603
  let judged = false;
@@ -19580,7 +19606,7 @@ var splitDenial = (plan) => ({
19580
19606
  });
19581
19607
  // packages/workit-core/src/hooks/write-gate.ts
19582
19608
  import {
19583
- existsSync as existsSync11,
19609
+ existsSync as existsSync12,
19584
19610
  readdirSync as readdirSync3,
19585
19611
  readFileSync as readFileSync10,
19586
19612
  readlinkSync as readlinkSync3,
@@ -20292,7 +20318,7 @@ var linkSources = (args, at) => {
20292
20318
  const sources = names.filter((name, index) => into >= 0 ? name !== dest : index < names.length - 1 || names.length === 1);
20293
20319
  const target = dest === undefined ? null : at(dest);
20294
20320
  const symbolic = args.some((arg) => /^-[a-zA-Z]*s|^--symbolic$/.test(arg));
20295
- const base = target === null ? null : into >= 0 || sources.length > 1 || existsSync11(target) || /[\\/]$/.test(dest ?? "") ? target : path29.dirname(target);
20321
+ const base = target === null ? null : into >= 0 || sources.length > 1 || existsSync12(target) || /[\\/]$/.test(dest ?? "") ? target : path29.dirname(target);
20296
20322
  return sources.flatMap((source) => {
20297
20323
  if (symbolic && base !== null && !path29.isAbsolute(homeExpanded(source)))
20298
20324
  return [path29.resolve(base, source)];
@@ -21763,13 +21789,13 @@ ${line}` };
21763
21789
  return decision;
21764
21790
  };
21765
21791
  // packages/workit-core/src/hooks/hosts/fields.ts
21766
- import { existsSync as existsSync12, realpathSync as realpathSync9, statSync as statSync4 } from "node:fs";
21792
+ import { existsSync as existsSync13, realpathSync as realpathSync9, statSync as statSync4 } from "node:fs";
21767
21793
  import path31 from "node:path";
21768
21794
  var isRecord6 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
21769
21795
  var nonEmpty2 = (value) => typeof value === "string" && value.trim() !== "";
21770
21796
  var optionalText = (value) => typeof value === "string" ? value : null;
21771
21797
  var existingDirectory = (value) => {
21772
- if (!nonEmpty2(value) || !path31.isAbsolute(value) || !existsSync12(value))
21798
+ if (!nonEmpty2(value) || !path31.isAbsolute(value) || !existsSync13(value))
21773
21799
  return null;
21774
21800
  try {
21775
21801
  return statSync4(value).isDirectory() ? realpathSync9(value) : null;
@@ -23633,7 +23659,7 @@ var cdWorkitSplit = (command) => {
23633
23659
  };
23634
23660
 
23635
23661
  // packages/workit-core/src/hooks/model-limit.ts
23636
- import { closeSync as closeSync2, openSync as openSync2, readdirSync as readdirSync4, readSync, statSync as statSync5 } from "node:fs";
23662
+ import { closeSync as closeSync3, openSync as openSync3, readdirSync as readdirSync4, readSync, statSync as statSync5 } from "node:fs";
23637
23663
  import os10 from "node:os";
23638
23664
  import path34 from "node:path";
23639
23665
  var MONTHS = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
@@ -23774,21 +23800,21 @@ var TAIL_BYTES2 = 16384;
23774
23800
  var tail = (file, size) => {
23775
23801
  const length = Math.min(size, TAIL_BYTES2);
23776
23802
  const buffer = Buffer.alloc(length);
23777
- const fd = openSync2(file, "r");
23803
+ const fd = openSync3(file, "r");
23778
23804
  try {
23779
23805
  readSync(fd, buffer, 0, length, size - length);
23780
23806
  } finally {
23781
- closeSync2(fd);
23807
+ closeSync3(fd);
23782
23808
  }
23783
23809
  return buffer.toString("utf8");
23784
23810
  };
23785
23811
  var start = (file) => {
23786
23812
  const buffer = Buffer.alloc(TAIL_BYTES2);
23787
- const fd = openSync2(file, "r");
23813
+ const fd = openSync3(file, "r");
23788
23814
  try {
23789
23815
  return buffer.subarray(0, readSync(fd, buffer, 0, TAIL_BYTES2, 0)).toString("utf8");
23790
23816
  } finally {
23791
- closeSync2(fd);
23817
+ closeSync3(fd);
23792
23818
  }
23793
23819
  };
23794
23820
  var parse4 = (line) => {
@@ -101,7 +101,7 @@ if (quiet) {
101
101
  `);
102
102
  } else {
103
103
  try {
104
- const { runCodexHook } = await import("./workit-hook-cs31z956.js");
104
+ const { runCodexHook } = await import("./workit-hook-4wfr9txp.js");
105
105
  await runCodexHook([payload]);
106
106
  } catch (error) {
107
107
  const { answerRuntimeFailure } = await import("./workit-hook-9k8dtngs.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/codex",
3
- "version": "2.12.0",
3
+ "version": "2.13.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": "^2.12.0",
45
- "@workit-dev/mcp": "^2.12.0"
44
+ "@workit-dev/core": "^2.13.0",
45
+ "@workit-dev/mcp": "^2.13.0"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=24"