@brainervirus/workit-cursor 8.31.0 → 8.32.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.
@@ -2,7 +2,7 @@
2
2
  "name": "workit",
3
3
  "displayName": "Workit",
4
4
  "description": "Adaptive Workit workflow with shared MCP tools and native Cursor hooks",
5
- "version": "8.31.0",
5
+ "version": "8.32.0",
6
6
  "author": {
7
7
  "name": "Cristhofer Pincetti"
8
8
  },
@@ -8261,6 +8261,7 @@ var init_workspaces = __esm(() => {
8261
8261
  verification: _enum(["proportional", "self", "independent"]).optional(),
8262
8262
  delegation: unknown().optional(),
8263
8263
  trailers: boolean2().optional(),
8264
+ deleteBranch: boolean2().optional(),
8264
8265
  liveSessionGuard: boolean2().optional(),
8265
8266
  fanout: object({ tierModels: unknown().optional() }).passthrough().optional(),
8266
8267
  models: object({ roles: unknown().optional() }).passthrough().optional(),
@@ -10166,6 +10167,18 @@ function diffHash(cwd, base, head) {
10166
10167
  }
10167
10168
  return `sha256:${hash.digest("hex")}`;
10168
10169
  }
10170
+ function cleanRebase(cwd, range) {
10171
+ if (!Object.values(range).every(safeRef2))
10172
+ return false;
10173
+ const fromFork = git3(cwd, ["merge-base", range.fromBase, range.from]);
10174
+ const toFork = git3(cwd, ["merge-base", range.toBase, range.to]);
10175
+ if (!fromFork || !toFork || fromFork === toFork)
10176
+ return false;
10177
+ const merged = gitRun2(cwd, ["merge-tree", "--write-tree", "--no-messages", `--merge-base=${fromFork}`, toFork, range.from], GIT_TIMEOUTS.worktree);
10178
+ const tree = merged.ok ? merged.stdout.split(`
10179
+ `)[0]?.trim() : null;
10180
+ return Boolean(tree) && tree === git3(cwd, ["rev-parse", "--verify", "-q", `${range.to}^{tree}`]);
10181
+ }
10169
10182
  function storeRoot(cwd) {
10170
10183
  const location = resolveStore(path10.resolve(cwd));
10171
10184
  if (location instanceof Error)
@@ -10624,23 +10637,24 @@ function checkVerdicts(cwd, branch, ledgerRows) {
10624
10637
  return drift;
10625
10638
  };
10626
10639
  const exactCache = new Map;
10627
- const exactCarry = (row) => {
10628
- if (FAILING.has(String(row.result)))
10629
- return true;
10640
+ const exactMatch = (row) => {
10630
10641
  let exact = exactCache.get(row);
10631
10642
  if (exact === undefined) {
10632
10643
  const toBase = row.base ?? fallbackBase;
10633
10644
  const toBaseSha = toBase ? resolveCommit(cwd, toBase) : null;
10634
10645
  const fromBase = row.baseSha ?? toBaseSha;
10635
- exact = Boolean(row.head && head && toBaseSha && fromBase && sameOwnChange(cwd, { from: row.head, to: head, fromBase, toBase: toBaseSha }));
10646
+ const range = row.head && head && toBaseSha && fromBase ? { from: row.head, to: head, fromBase, toBase: toBaseSha } : null;
10647
+ exact = !range ? null : sameOwnChange(cwd, range) ? "same" : cleanRebase(cwd, range) ? "rebase" : null;
10636
10648
  exactCache.set(row, exact);
10637
10649
  }
10638
10650
  return exact;
10639
10651
  };
10652
+ const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
10640
10653
  const keyBasis = (row) => {
10641
10654
  const basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
10642
10655
  return basis === "carried" && !exactCarry(row) ? "stale" : basis;
10643
10656
  };
10657
+ const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
10644
10658
  const restacked = (row) => restackCarries(FAILING.has(String(row.result)) ? null : cwd, rows, branch, row.head, head);
10645
10659
  const carryOf = (row) => {
10646
10660
  if (keyBasis(row) !== "stale")
@@ -10718,7 +10732,7 @@ function checkVerdicts(cwd, branch, ledgerRows) {
10718
10732
  independent: independence.length === 0,
10719
10733
  accepted: reasons.length === 0,
10720
10734
  reasons,
10721
- carry: basis === "carried" ? carryOf(row) : null,
10735
+ carry: basis === "carried" ? rebaseNote(row) ?? carryOf(row) : null,
10722
10736
  verdict: row
10723
10737
  });
10724
10738
  if (reasons.length === 0) {
@@ -17331,6 +17331,7 @@ var workspaceConfigSchema = object2({
17331
17331
  verification: _enum(["proportional", "self", "independent"]).optional(),
17332
17332
  delegation: unknown().optional(),
17333
17333
  trailers: boolean2().optional(),
17334
+ deleteBranch: boolean2().optional(),
17334
17335
  liveSessionGuard: boolean2().optional(),
17335
17336
  fanout: object2({ tierModels: unknown().optional() }).passthrough().optional(),
17336
17337
  models: object2({ roles: unknown().optional() }).passthrough().optional(),
@@ -22593,6 +22594,18 @@ function diffHash(cwd, base, head) {
22593
22594
  }
22594
22595
  return `sha256:${hash.digest("hex")}`;
22595
22596
  }
22597
+ function cleanRebase(cwd, range) {
22598
+ if (!Object.values(range).every(safeRef2))
22599
+ return false;
22600
+ const fromFork = git4(cwd, ["merge-base", range.fromBase, range.from]);
22601
+ const toFork = git4(cwd, ["merge-base", range.toBase, range.to]);
22602
+ if (!fromFork || !toFork || fromFork === toFork)
22603
+ return false;
22604
+ const merged = gitRun2(cwd, ["merge-tree", "--write-tree", "--no-messages", `--merge-base=${fromFork}`, toFork, range.from], GIT_TIMEOUTS.worktree);
22605
+ const tree = merged.ok ? merged.stdout.split(`
22606
+ `)[0]?.trim() : null;
22607
+ return Boolean(tree) && tree === git4(cwd, ["rev-parse", "--verify", "-q", `${range.to}^{tree}`]);
22608
+ }
22596
22609
  function storeRoot(cwd) {
22597
22610
  const location = resolveStore(path15.resolve(cwd));
22598
22611
  if (location instanceof Error)
@@ -23253,23 +23266,24 @@ function checkVerdicts(cwd, branch, ledgerRows) {
23253
23266
  return drift;
23254
23267
  };
23255
23268
  const exactCache = new Map;
23256
- const exactCarry = (row) => {
23257
- if (FAILING.has(String(row.result)))
23258
- return true;
23269
+ const exactMatch = (row) => {
23259
23270
  let exact = exactCache.get(row);
23260
23271
  if (exact === undefined) {
23261
23272
  const toBase = row.base ?? fallbackBase;
23262
23273
  const toBaseSha = toBase ? resolveCommit(cwd, toBase) : null;
23263
23274
  const fromBase = row.baseSha ?? toBaseSha;
23264
- exact = Boolean(row.head && head && toBaseSha && fromBase && sameOwnChange(cwd, { from: row.head, to: head, fromBase, toBase: toBaseSha }));
23275
+ const range = row.head && head && toBaseSha && fromBase ? { from: row.head, to: head, fromBase, toBase: toBaseSha } : null;
23276
+ exact = !range ? null : sameOwnChange(cwd, range) ? "same" : cleanRebase(cwd, range) ? "rebase" : null;
23265
23277
  exactCache.set(row, exact);
23266
23278
  }
23267
23279
  return exact;
23268
23280
  };
23281
+ const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
23269
23282
  const keyBasis = (row) => {
23270
23283
  const basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
23271
23284
  return basis === "carried" && !exactCarry(row) ? "stale" : basis;
23272
23285
  };
23286
+ const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
23273
23287
  const restacked = (row) => restackCarries(FAILING.has(String(row.result)) ? null : cwd, rows, branch, row.head, head);
23274
23288
  const carryOf = (row) => {
23275
23289
  if (keyBasis(row) !== "stale")
@@ -23347,7 +23361,7 @@ function checkVerdicts(cwd, branch, ledgerRows) {
23347
23361
  independent: independence.length === 0,
23348
23362
  accepted: reasons.length === 0,
23349
23363
  reasons,
23350
- carry: basis === "carried" ? carryOf(row) : null,
23364
+ carry: basis === "carried" ? rebaseNote(row) ?? carryOf(row) : null,
23351
23365
  verdict: row
23352
23366
  });
23353
23367
  if (reasons.length === 0) {
@@ -7861,6 +7861,7 @@ var workspaceConfigSchema = object({
7861
7861
  verification: _enum(["proportional", "self", "independent"]).optional(),
7862
7862
  delegation: unknown().optional(),
7863
7863
  trailers: boolean2().optional(),
7864
+ deleteBranch: boolean2().optional(),
7864
7865
  liveSessionGuard: boolean2().optional(),
7865
7866
  fanout: object({ tierModels: unknown().optional() }).passthrough().optional(),
7866
7867
  models: object({ roles: unknown().optional() }).passthrough().optional(),
@@ -10175,6 +10176,18 @@ function diffHash(cwd, base, head) {
10175
10176
  }
10176
10177
  return `sha256:${hash.digest("hex")}`;
10177
10178
  }
10179
+ function cleanRebase(cwd, range) {
10180
+ if (!Object.values(range).every(safeRef2))
10181
+ return false;
10182
+ const fromFork = git3(cwd, ["merge-base", range.fromBase, range.from]);
10183
+ const toFork = git3(cwd, ["merge-base", range.toBase, range.to]);
10184
+ if (!fromFork || !toFork || fromFork === toFork)
10185
+ return false;
10186
+ const merged = gitRun2(cwd, ["merge-tree", "--write-tree", "--no-messages", `--merge-base=${fromFork}`, toFork, range.from], GIT_TIMEOUTS.worktree);
10187
+ const tree = merged.ok ? merged.stdout.split(`
10188
+ `)[0]?.trim() : null;
10189
+ return Boolean(tree) && tree === git3(cwd, ["rev-parse", "--verify", "-q", `${range.to}^{tree}`]);
10190
+ }
10178
10191
  function storeRoot(cwd) {
10179
10192
  const location = resolveStore(path10.resolve(cwd));
10180
10193
  if (location instanceof Error)
@@ -10838,23 +10851,24 @@ function checkVerdicts(cwd, branch, ledgerRows) {
10838
10851
  return drift;
10839
10852
  };
10840
10853
  const exactCache = new Map;
10841
- const exactCarry = (row) => {
10842
- if (FAILING.has(String(row.result)))
10843
- return true;
10854
+ const exactMatch = (row) => {
10844
10855
  let exact = exactCache.get(row);
10845
10856
  if (exact === undefined) {
10846
10857
  const toBase = row.base ?? fallbackBase;
10847
10858
  const toBaseSha = toBase ? resolveCommit(cwd, toBase) : null;
10848
10859
  const fromBase = row.baseSha ?? toBaseSha;
10849
- exact = Boolean(row.head && head && toBaseSha && fromBase && sameOwnChange(cwd, { from: row.head, to: head, fromBase, toBase: toBaseSha }));
10860
+ const range = row.head && head && toBaseSha && fromBase ? { from: row.head, to: head, fromBase, toBase: toBaseSha } : null;
10861
+ exact = !range ? null : sameOwnChange(cwd, range) ? "same" : cleanRebase(cwd, range) ? "rebase" : null;
10850
10862
  exactCache.set(row, exact);
10851
10863
  }
10852
10864
  return exact;
10853
10865
  };
10866
+ const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
10854
10867
  const keyBasis = (row) => {
10855
10868
  const basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
10856
10869
  return basis === "carried" && !exactCarry(row) ? "stale" : basis;
10857
10870
  };
10871
+ const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
10858
10872
  const restacked = (row) => restackCarries(FAILING.has(String(row.result)) ? null : cwd, rows, branch, row.head, head);
10859
10873
  const carryOf = (row) => {
10860
10874
  if (keyBasis(row) !== "stale")
@@ -10932,7 +10946,7 @@ function checkVerdicts(cwd, branch, ledgerRows) {
10932
10946
  independent: independence.length === 0,
10933
10947
  accepted: reasons.length === 0,
10934
10948
  reasons,
10935
- carry: basis === "carried" ? carryOf(row) : null,
10949
+ carry: basis === "carried" ? rebaseNote(row) ?? carryOf(row) : null,
10936
10950
  verdict: row
10937
10951
  });
10938
10952
  if (reasons.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "8.31.0",
3
+ "version": "8.32.0",
4
4
  "private": false,
5
5
  "description": "Workit Cursor plugin — shared MCP transport, native hooks, and sixteen method skills",
6
6
  "keywords": [
@@ -46,8 +46,8 @@
46
46
  "build": "bun scripts/build.ts"
47
47
  },
48
48
  "devDependencies": {
49
- "@brainervirus/workit-core": "^8.31.0",
50
- "@brainervirus/workit-mcp": "^8.31.0"
49
+ "@brainervirus/workit-core": "^8.32.0",
50
+ "@brainervirus/workit-mcp": "^8.32.0"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">=24"