@brainervirus/workit-claude-code 8.40.7 → 8.40.8

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/workit.js CHANGED
@@ -6537,6 +6537,15 @@ var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspace
6537
6537
  return cached;
6538
6538
  let dir = path2.resolve(cwd);
6539
6539
  while (!existsSync2(path2.join(dir, ".git"))) {
6540
+ if (["HEAD", "objects", "refs"].every((name) => existsSync2(path2.join(dir, name)))) {
6541
+ const real = realpathOf(dir);
6542
+ const owner = ownInternals(real) === true ? gitDirOwner(real) : null;
6543
+ if (owner === null)
6544
+ return Error(`${cwd} is in a repository with no work tree at ${real}: no grants apply`);
6545
+ const probe = { main: owner, superproject: null };
6546
+ probes.set(cwd, probe);
6547
+ return probe;
6548
+ }
6540
6549
  const up = path2.dirname(dir);
6541
6550
  if (up === dir)
6542
6551
  return null;
@@ -6575,6 +6584,14 @@ var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspace
6575
6584
  if (owner !== realpathOf(dir))
6576
6585
  main = owner;
6577
6586
  }
6587
+ const lender = ownInternals(real);
6588
+ if (lender === false)
6589
+ return Error(`${cwd} borrows git internals from outside ${real} that no checkout owns`);
6590
+ if (lender !== true && lender !== realpathOf(dir)) {
6591
+ if (main !== null && main !== lender)
6592
+ return Error(`${cwd} mixes the repositories of ${main} and ${lender}`);
6593
+ main = lender;
6594
+ }
6578
6595
  } else {
6579
6596
  const list = git(["worktree", "list", "--porcelain"]);
6580
6597
  if (list === null)
@@ -6590,6 +6607,30 @@ var nonBlank, branchPreset, commitPreset, workspaceBranchPolicySchema, workspace
6590
6607
  } catch {
6591
6608
  return false;
6592
6609
  }
6610
+ }, INTERNALS, ownInternals = (real) => {
6611
+ let lender = null;
6612
+ for (const name of INTERNALS) {
6613
+ const at = path2.join(real, name);
6614
+ try {
6615
+ lstatSync(at);
6616
+ } catch {
6617
+ continue;
6618
+ }
6619
+ let resolved;
6620
+ try {
6621
+ resolved = (realpathSync.native ?? realpathSync)(at);
6622
+ } catch {
6623
+ return false;
6624
+ }
6625
+ const rel = path2.relative(real, resolved);
6626
+ if (rel && !rel.startsWith("..") && !path2.isAbsolute(rel))
6627
+ continue;
6628
+ const owner = path2.basename(resolved) === name ? gitDirOwner(path2.dirname(resolved)) : null;
6629
+ if (owner === null || lender !== null && lender !== owner)
6630
+ return false;
6631
+ lender = owner;
6632
+ }
6633
+ return lender ?? true;
6593
6634
  }, gitDirOwner = (real) => {
6594
6635
  const parts = real.split(/[\\/]/u);
6595
6636
  const at = parts.lastIndexOf(".git");
@@ -7058,6 +7099,7 @@ var init_workspaces = __esm(() => {
7058
7099
  name = "WorkspaceConfigError";
7059
7100
  };
7060
7101
  probes = new Map;
7102
+ INTERNALS = ["refs", "objects", "config", "packed-refs", "commondir"];
7061
7103
  runtimeWorkspaceIndexSchema = object({
7062
7104
  workspaces: array(object({ name: nonBlank, glob: nonBlank }).passthrough()).optional()
7063
7105
  }).passthrough();
@@ -9375,7 +9417,7 @@ var package_default;
9375
9417
  var init_package = __esm(() => {
9376
9418
  package_default = {
9377
9419
  name: "@brainervirus/workit-cli",
9378
- version: "8.40.7",
9420
+ version: "8.40.8",
9379
9421
  private: false,
9380
9422
  description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
9381
9423
  keywords: [
@@ -9413,13 +9455,13 @@ var init_package = __esm(() => {
9413
9455
  },
9414
9456
  dependencies: {
9415
9457
  "@babel/parser": "7.29.9",
9416
- "@brainervirus/workit-cursor": "^8.40.7",
9458
+ "@brainervirus/workit-cursor": "^8.40.8",
9417
9459
  "@inkjs/ui": "2.0.0",
9418
9460
  ink: "7.1.1",
9419
9461
  react: "19.2.8"
9420
9462
  },
9421
9463
  devDependencies: {
9422
- "@brainervirus/workit-core": "^8.40.7"
9464
+ "@brainervirus/workit-core": "^8.40.8"
9423
9465
  },
9424
9466
  engines: {
9425
9467
  node: ">=24"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-claude-code",
3
- "version": "8.40.7",
3
+ "version": "8.40.8",
4
4
  "private": false,
5
5
  "description": "Workit Claude Code plugin — session and per-turn task context, branch policy on git shell commands, workit method skills, and verifier/reviewer/implementer agents",
6
6
  "keywords": [
@@ -39,8 +39,8 @@
39
39
  "build": "bun scripts/build.ts"
40
40
  },
41
41
  "devDependencies": {
42
- "@brainervirus/workit-cli": "^8.40.7",
43
- "@brainervirus/workit-core": "^8.40.7"
42
+ "@brainervirus/workit-cli": "^8.40.8",
43
+ "@brainervirus/workit-core": "^8.40.8"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=24"