@workit-dev/codex 1.6.1 → 1.7.1

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": "1.6.1",
3
+ "version": "1.7.1",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -25,10 +25,9 @@ account. Follow the workit-review skill (`$workit-review`).
25
25
  Before your final report, wait for or stop every background command you started
26
26
  (the host shows you running while one lives); never report with one still running.
27
27
 
28
- Never commit, push, merge or edit. Write only in the checkout's
29
- `.workit-scratch/`: generated test cases go into files there via a quoted
30
- heredoc (`<<'EOF'`), never run by the shell. If the ledger refuses you as an
31
- author, report that instead of a verdict.
28
+ Never commit, push, merge or edit. Write only in the candidate
29
+ worktree's `.workit-scratch/`: test cases go into files there via a quoted heredoc
30
+ (`<<'EOF'`), never run by the shell. If the ledger refuses you as an author, report that instead of a verdict.
32
31
 
33
32
  Codex runs you in a read-only sandbox. `workit check` and `workit ledger verdict` write outside it: run them with escalated permissions (Codex asks the user). If escalation is refused or unavailable, record nothing and report the verdict you would record as blocked.
34
33
  '''
@@ -29,8 +29,8 @@ the goal is unmet until you observe it.
29
29
  Before your final report, wait for or stop every background command you started
30
30
  (the host shows you running while one lives); never report with one still running.
31
31
 
32
- Write only in the checkout's `.workit-scratch/`: a generated test case goes in
33
- a file there via a quoted heredoc (`<<'EOF'`), never run by the shell.
32
+ Write only in the candidate worktree's `.workit-scratch/`: a test case goes in a
33
+ file there via a quoted heredoc (`<<'EOF'`), never run by the shell.
34
34
 
35
35
  Report: candidate SHA, each check with its exit code, each acceptance line,
36
36
  the verdict row you recorded. Fix nothing: a failing check is a verdict.
@@ -16078,7 +16078,8 @@ var workspaceConfigSchema = object({
16078
16078
  ]))).passthrough().optional().describe("Autonomy grants (D15): only ever set here, by the user, with `workit grant set`."),
16079
16079
  youtrack: object({
16080
16080
  baseUrl: nonBlank.optional().describe("This workspace's YouTrack URL."),
16081
- link_issues: boolean2().optional().describe("Legacy alias of `issues: { provider: youtrack, link: true }`.")
16081
+ link_issues: boolean2().optional().describe("Legacy alias of `issues: { provider: youtrack, link: true }`."),
16082
+ writes: _enum(["ask", "auto"]).optional().describe("ask (default): each workit youtrack write waits for the user's yes. auto: posts without asking, behind WORKIT_YT_WRITE=1.")
16082
16083
  }).passthrough().optional().describe("YouTrack settings for this workspace."),
16083
16084
  issues: object({
16084
16085
  provider: _enum(["github", "gitlab", "youtrack"]).optional().describe("The issue tracker PRs link to."),
@@ -7313,7 +7313,8 @@ var workspaceConfigSchema = object({
7313
7313
  ]))).passthrough().optional().describe("Autonomy grants (D15): only ever set here, by the user, with `workit grant set`."),
7314
7314
  youtrack: object({
7315
7315
  baseUrl: nonBlank.optional().describe("This workspace's YouTrack URL."),
7316
- link_issues: boolean2().optional().describe("Legacy alias of `issues: { provider: youtrack, link: true }`.")
7316
+ link_issues: boolean2().optional().describe("Legacy alias of `issues: { provider: youtrack, link: true }`."),
7317
+ writes: _enum(["ask", "auto"]).optional().describe("ask (default): each workit youtrack write waits for the user's yes. auto: posts without asking, behind WORKIT_YT_WRITE=1.")
7317
7318
  }).passthrough().optional().describe("YouTrack settings for this workspace."),
7318
7319
  issues: object({
7319
7320
  provider: _enum(["github", "gitlab", "youtrack"]).optional().describe("The issue tracker PRs link to."),
@@ -18969,9 +18970,15 @@ var messageOf = (segment, index) => {
18969
18970
  return null;
18970
18971
  return match[3].replace(/\n+$/u, "");
18971
18972
  };
18973
+ var sameGitDir = (a, b, platform = process.platform) => {
18974
+ if (platform !== "win32")
18975
+ return path23.posix.resolve(a) === path23.posix.resolve(b);
18976
+ const fold = (value) => path23.win32.resolve(value).toLowerCase();
18977
+ return fold(a) === fold(b);
18978
+ };
18972
18979
  var cdCommitCall = (input, command, target, repo) => {
18973
18980
  const { top, git, dir: store } = repo.location;
18974
- if (!top || !git || git.gitDir === path23.dirname(store) || repoAt(input.cwd)?.location.top === top)
18981
+ if (!top || !git || sameGitDir(git.gitDir, path23.dirname(store)) || repoAt(input.cwd)?.location.top === top)
18975
18982
  return null;
18976
18983
  const bare = command.replaceAll(/'[^']*'|"(?:[^"\\]|\\.)*"/gu, "").replaceAll("&&", "");
18977
18984
  if (/[;|&<>`$()\n\\]/u.test(bare))
@@ -23250,10 +23257,12 @@ var substitutingHeredoc = (command) => {
23250
23257
  }
23251
23258
  return false;
23252
23259
  };
23253
- var judgeDeny = (input, what) => {
23260
+ var judgeDeny = (input, what, target) => {
23254
23261
  const role = input.session.agentType?.endsWith("reviewer") ? "reviewer" : "verifier";
23255
23262
  const root = checkoutOf2(input.cwd)?.root;
23256
- const scratch = root ? path31.join(root, SCRATCH) : `${SCRATCH}/ at the root of the checkout you judge`;
23263
+ const candidate = target ? checkoutOf2(target)?.root : undefined;
23264
+ const also = root && candidate && candidate !== root && commonDir(candidate) === commonDir(root) ? ` or ${path31.join(candidate, SCRATCH)}` : "";
23265
+ const scratch = root ? `${path31.join(root, SCRATCH)}${also}` : `${SCRATCH}/ at the root of the checkout you judge`;
23257
23266
  const unblock = `Write only under ${scratch} (mkdir -p it): put a generated case in a file there with a quoted heredoc (<<'EOF') and never run it in the shell. Reads, \`workit check\` and \`workit ledger verdict|finding\` stay allowed; a change the candidate needs is a finding, not an edit.`;
23258
23267
  return {
23259
23268
  kind: "deny",
@@ -23274,7 +23283,7 @@ function confineJudge(input, targets) {
23274
23283
  if (inScratch(canonical4(target), repo))
23275
23284
  continue;
23276
23285
  const runner = runnerAt(target);
23277
- return judgeDeny(input, runner === null ? `${shown(target)} is outside it` : `\`${runner}\` runs in ${shown(target)}, outside it`);
23286
+ return judgeDeny(input, runner === null ? `${shown(target)} is outside it` : `\`${runner}\` runs in ${shown(target)}, outside it`, target);
23278
23287
  }
23279
23288
  return NONE5;
23280
23289
  } catch {
@@ -84,7 +84,7 @@ if (quiet) {
84
84
  `);
85
85
  } else {
86
86
  try {
87
- const { runCodexHook } = await import("./workit-hook-n63mrn52.js");
87
+ const { runCodexHook } = await import("./workit-hook-f4re7k5j.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.6.1",
3
+ "version": "1.7.1",
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.6.1",
45
- "@workit-dev/mcp": "^1.6.1"
44
+ "@workit-dev/core": "^1.7.1",
45
+ "@workit-dev/mcp": "^1.7.1"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=24"