@brainervirus/workit-cursor 8.0.0 → 8.0.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.
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from "node:module";
3
3
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
4
4
 
5
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
5
+ // packages/workit-core/src/core/task-contract.ts
6
6
  import { createHash, randomUUID } from "node:crypto";
7
7
 
8
8
  // node_modules/zod/v4/core/util.js
@@ -7516,7 +7516,7 @@ function refine(fn, _params = {}) {
7516
7516
  function superRefine(fn, params) {
7517
7517
  return _superRefine(fn, params);
7518
7518
  }
7519
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
7519
+ // packages/workit-core/src/core/task-contract.ts
7520
7520
  var SCHEMA_VERSION = 1;
7521
7521
  var POLICY_VERSION = "1.0.0";
7522
7522
  var OPERATION_FAMILIES = [
@@ -8372,14 +8372,14 @@ function requirementId(input) {
8372
8372
  });
8373
8373
  }
8374
8374
 
8375
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
8375
+ // packages/workit-core/src/core/task-engine.ts
8376
8376
  import { realpathSync as realpathSync4 } from "node:fs";
8377
8377
 
8378
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
8378
+ // packages/workit-core/src/core/policy/derive.ts
8379
8379
  import { existsSync } from "node:fs";
8380
8380
  import path4 from "node:path";
8381
8381
 
8382
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/git/rev.ts
8382
+ // packages/workit-core/src/git/rev.ts
8383
8383
  import { spawnSync } from "node:child_process";
8384
8384
  import { createHash as createHash2 } from "node:crypto";
8385
8385
  import fs from "node:fs";
@@ -8531,13 +8531,13 @@ function currentBranch(cwd) {
8531
8531
  return line(git(cwd, ["symbolic-ref", "--short", "-q", "HEAD"]));
8532
8532
  }
8533
8533
 
8534
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
8534
+ // packages/workit-core/src/ledger.ts
8535
8535
  import { spawnSync as spawnSync3 } from "node:child_process";
8536
8536
  import { createHash as createHash4, randomBytes } from "node:crypto";
8537
8537
  import fs3 from "node:fs";
8538
8538
  import path3 from "node:path";
8539
8539
 
8540
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/paths.ts
8540
+ // packages/workit-core/src/store/paths.ts
8541
8541
  import { spawnSync as spawnSync2 } from "node:child_process";
8542
8542
  import { createHash as createHash3 } from "node:crypto";
8543
8543
  import fs2 from "node:fs";
@@ -8817,7 +8817,7 @@ var checkoutSlug = (root) => {
8817
8817
  return `${base}-${shortHash(canonical)}`;
8818
8818
  };
8819
8819
 
8820
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
8820
+ // packages/workit-core/src/ledger.ts
8821
8821
  var LEDGER_VERSION = 1;
8822
8822
  var PASSING = new Set(["verified", "tests-verified", "type-check-only"]);
8823
8823
  var FAILING = new Set(["failed", "blocked"]);
@@ -9055,7 +9055,7 @@ var independenceReasons = (row, authors) => {
9055
9055
  reasons.push("self");
9056
9056
  return reasons;
9057
9057
  };
9058
- function effectiveOf(rows, authors) {
9058
+ function effectiveOf(rows, authors, sameCode) {
9059
9059
  let effective = null;
9060
9060
  for (const row of rows) {
9061
9061
  if (!effective) {
@@ -9066,7 +9066,7 @@ function effectiveOf(rows, authors) {
9066
9066
  const effIndependent = independenceReasons(effective, authors).length === 0;
9067
9067
  if (effIndependent && !rowIndependent)
9068
9068
  continue;
9069
- if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session)
9069
+ if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session && sameCode(effective, row))
9070
9070
  continue;
9071
9071
  effective = row;
9072
9072
  }
@@ -9097,16 +9097,22 @@ function checkVerdicts(cwd, branch, rows) {
9097
9097
  const head = branchHead(cwd, branch);
9098
9098
  const fallbackBase = defaultBase(cwd);
9099
9099
  const keyCache = new Map;
9100
- const keyFor = (base) => {
9101
- if (!base || !head)
9100
+ const keysAt = (base, at) => {
9101
+ if (!base || !at)
9102
9102
  return { patchId: null, diffHash: null };
9103
- let key = keyCache.get(base);
9103
+ const cacheKey = `${base}\x00${at}`;
9104
+ let key = keyCache.get(cacheKey);
9104
9105
  if (!key) {
9105
- key = { patchId: patchId(cwd, base, head), diffHash: diffHash(cwd, base, head) };
9106
- keyCache.set(base, key);
9106
+ key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
9107
+ keyCache.set(cacheKey, key);
9107
9108
  }
9108
9109
  return key;
9109
9110
  };
9111
+ const keyFor = (base) => keysAt(base, head);
9112
+ const sameCode = (failed, row) => verdictBasis(failed, {
9113
+ head: row.head,
9114
+ ...keysAt(failed.base ?? fallbackBase, row.head)
9115
+ }) !== "stale" || restackCarries(rows, branch, failed.head, row.head);
9110
9116
  const authors = authorSessions(cwd, rows, branch, { base: fallbackBase, head });
9111
9117
  const byKind = new Map;
9112
9118
  for (const row of rows)
@@ -9116,7 +9122,7 @@ function checkVerdicts(cwd, branch, rows) {
9116
9122
  }
9117
9123
  const verdicts = [];
9118
9124
  for (const [kind, list] of byKind) {
9119
- const row = effectiveOf(list, authors);
9125
+ const row = effectiveOf(list, authors, sameCode);
9120
9126
  if (!row)
9121
9127
  continue;
9122
9128
  let basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
@@ -9142,11 +9148,11 @@ function checkVerdicts(cwd, branch, rows) {
9142
9148
  verdicts.sort((a, b) => a.verdict.seq - b.verdict.seq);
9143
9149
  const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
9144
9150
  const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
9145
- const newestAccepted = verdicts.findLast((entry) => entry.accepted) ?? null;
9151
+ const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
9146
9152
  const accepted = newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
9147
9153
  accepted: false,
9148
9154
  verdict: failing?.verdict ?? null,
9149
- reasons: failing ? ["failing_verdict"] : newestCurrent?.reasons ?? ["no_verdict"]
9155
+ reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
9150
9156
  };
9151
9157
  const selfEntry = failing ? undefined : verdicts.findLast((entry) => entry.current && !entry.independent && STRONG_RESULTS.has(String(entry.verdict.result)));
9152
9158
  return {
@@ -9162,9 +9168,9 @@ function checkVerdicts(cwd, branch, rows) {
9162
9168
  authors: [...authors].toSorted()
9163
9169
  };
9164
9170
  }
9165
- var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
9171
+ var OBSERVED_ONLY = new Set(["check", "merge.unverified", ...PR_ROW_TYPES]);
9166
9172
 
9167
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
9173
+ // packages/workit-core/src/core/policy/derive.ts
9168
9174
  var RULES = {
9169
9175
  test: "check:test",
9170
9176
  self: "verdict:self",
@@ -9363,7 +9369,7 @@ function writeBlockers(task, root) {
9363
9369
  });
9364
9370
  }
9365
9371
 
9366
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
9372
+ // packages/workit-core/src/core/policy-resolver.ts
9367
9373
  function resolvePolicy(input) {
9368
9374
  const ids = input.constraints.map((constraint) => constraint.id);
9369
9375
  if (new Set(ids).size !== ids.length)
@@ -9419,7 +9425,7 @@ function diffPolicy(previous, next, reason, now) {
9419
9425
  return parsed.data;
9420
9426
  }
9421
9427
 
9422
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
9428
+ // packages/workit-core/src/core/operation-input.ts
9423
9429
  var str2 = (d, values) => ({
9424
9430
  type: "string",
9425
9431
  ...values ? { enum: values } : {},
@@ -9765,7 +9771,7 @@ function normalizeOperationInput(family, input, host) {
9765
9771
  return request;
9766
9772
  }
9767
9773
 
9768
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
9774
+ // packages/workit-core/src/core/policy/judgment.ts
9769
9775
  var isObject3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
9770
9776
  var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
9771
9777
  var ALIASES = {
@@ -9889,11 +9895,11 @@ function normalizeJudgment(raw, previous) {
9889
9895
  return success(null, null, { judgment: parsed.data, ignored, legacy });
9890
9896
  }
9891
9897
 
9892
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
9898
+ // packages/workit-core/src/autonomy.ts
9893
9899
  import os3 from "node:os";
9894
9900
  import path7 from "node:path";
9895
9901
 
9896
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
9902
+ // packages/workit-core/src/core/config.ts
9897
9903
  import {
9898
9904
  copyFileSync,
9899
9905
  cpSync,
@@ -9906,7 +9912,7 @@ import {
9906
9912
  import os2 from "node:os";
9907
9913
  import path5 from "node:path";
9908
9914
 
9909
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/boundary.ts
9915
+ // packages/workit-core/src/core/boundary.ts
9910
9916
  var EVENT = {
9911
9917
  initialization: "initialization",
9912
9918
  provenance: "provenance",
@@ -9927,7 +9933,7 @@ var errorDetail = (err) => {
9927
9933
  return { error_name: "unknown", error: String(err) };
9928
9934
  };
9929
9935
 
9930
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
9936
+ // packages/workit-core/src/core/config.ts
9931
9937
  var diagnosticLogger;
9932
9938
  var PRESETS = {
9933
9939
  gitflow: {
@@ -10089,7 +10095,7 @@ var resolveCommitPolicy = (config, workspace) => {
10089
10095
  return config.commitPolicy ?? { preset: "conventional" };
10090
10096
  };
10091
10097
 
10092
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
10098
+ // packages/workit-core/src/core/workspaces.ts
10093
10099
  import { createHash as createHash5 } from "node:crypto";
10094
10100
  import { readFileSync as readFileSync2, realpathSync } from "node:fs";
10095
10101
  import path6 from "node:path";
@@ -10489,7 +10495,7 @@ var resolveRuntimeWorkspacePolicy = (cwd, kind, requestedProfile) => {
10489
10495
  };
10490
10496
  };
10491
10497
 
10492
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
10498
+ // packages/workit-core/src/autonomy.ts
10493
10499
  var accountHome = () => {
10494
10500
  try {
10495
10501
  return os3.userInfo().homedir;
@@ -10624,7 +10630,7 @@ function resolveAutonomy(cwd) {
10624
10630
  var suggested = (kind) => kind === "merge" ? "verified" : "true";
10625
10631
  var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
10626
10632
 
10627
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
10633
+ // packages/workit-core/src/core/task-store.ts
10628
10634
  import { createHash as createHash7, randomUUID as randomUUID3 } from "node:crypto";
10629
10635
  import * as fs9 from "node:fs";
10630
10636
  import path12 from "node:path";
@@ -11230,7 +11236,7 @@ function acquireFileLockSync(targetPath, options) {
11230
11236
  }
11231
11237
  }
11232
11238
  }
11233
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/package-root.ts
11239
+ // packages/workit-core/src/core/package-root.ts
11234
11240
  import { existsSync as existsSync3 } from "node:fs";
11235
11241
  import path10 from "node:path";
11236
11242
  import { fileURLToPath } from "node:url";
@@ -11244,7 +11250,7 @@ var packageRoot = () => {
11244
11250
  }
11245
11251
  };
11246
11252
 
11247
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
11253
+ // packages/workit-core/src/core/store-lock.ts
11248
11254
  import { spawnSync as spawnSync4 } from "node:child_process";
11249
11255
  import fs7 from "node:fs";
11250
11256
  import { hostname } from "node:os";
@@ -11378,7 +11384,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
11378
11384
  }
11379
11385
  };
11380
11386
 
11381
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/event-log.ts
11387
+ // packages/workit-core/src/store/event-log.ts
11382
11388
  import { randomUUID as randomUUID2 } from "node:crypto";
11383
11389
  import fs8 from "node:fs";
11384
11390
  import path11 from "node:path";
@@ -11538,7 +11544,7 @@ var retryTransient = (run) => {
11538
11544
  };
11539
11545
  var renameWithRetry = (from, to) => retryTransient(() => fs8.renameSync(from, to));
11540
11546
 
11541
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/patch.ts
11547
+ // packages/workit-core/src/store/patch.ts
11542
11548
  var isPlainObject2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
11543
11549
  var equal = (left, right) => {
11544
11550
  if (left === right)
@@ -11648,7 +11654,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
11648
11654
  return false;
11649
11655
  });
11650
11656
 
11651
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/reduce.ts
11657
+ // packages/workit-core/src/store/reduce.ts
11652
11658
  import { createHash as createHash6 } from "node:crypto";
11653
11659
  var OPENING_TYPES = new Set([
11654
11660
  "task.opened",
@@ -11779,7 +11785,7 @@ function eventType(before, after) {
11779
11785
  return "task.updated";
11780
11786
  }
11781
11787
 
11782
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/notes.ts
11788
+ // packages/workit-core/src/store/notes.ts
11783
11789
  var SLOT = Symbol.for("workit.migrationReporter");
11784
11790
  var reportMigration = (report) => {
11785
11791
  try {
@@ -11790,7 +11796,7 @@ var reportMigration = (report) => {
11790
11796
  };
11791
11797
  var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
11792
11798
 
11793
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
11799
+ // packages/workit-core/src/core/task-store.ts
11794
11800
  var MIGRATION_PENDING = "workit migration pending";
11795
11801
  var STORE_FORMAT = 3;
11796
11802
  var STORE_MIN_RUNTIME = "3.0.0";
@@ -13427,18 +13433,18 @@ class TaskStore {
13427
13433
  }
13428
13434
  }
13429
13435
 
13430
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workers.ts
13436
+ // packages/workit-core/src/core/workers.ts
13431
13437
  var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
13432
13438
  var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
13433
13439
  var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
13434
13440
 
13435
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
13441
+ // packages/workit-core/src/core/task-evaluation.ts
13436
13442
  import { createHash as createHash8 } from "node:crypto";
13437
13443
  import * as fs11 from "node:fs";
13438
13444
  import { spawnSync as spawnSync6 } from "node:child_process";
13439
13445
  import path14 from "node:path";
13440
13446
 
13441
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/check-config.ts
13447
+ // packages/workit-core/src/check-config.ts
13442
13448
  import { spawnSync as spawnSync5 } from "node:child_process";
13443
13449
  import fs10 from "node:fs";
13444
13450
  import path13 from "node:path";
@@ -13643,7 +13649,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
13643
13649
  return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
13644
13650
  }
13645
13651
 
13646
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
13652
+ // packages/workit-core/src/core/task-evaluation.ts
13647
13653
  var digestBytes = (value) => createHash8("sha256").update(value).digest("hex");
13648
13654
  var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path14.sep}`);
13649
13655
  var relative = (root, candidate) => path14.relative(root, candidate).split(path14.sep).join("/") || ".";
@@ -14309,7 +14315,7 @@ function evaluateClosure(requestedOutcome, view) {
14309
14315
  });
14310
14316
  }
14311
14317
 
14312
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/methods.ts
14318
+ // packages/workit-core/src/core/methods.ts
14313
14319
  var METHODS = {
14314
14320
  "workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
14315
14321
  "workit-bdd": { dimensions: ["testing"] },
@@ -14417,7 +14423,7 @@ Skills: load the skill, never act from memory of it (slash aliases /wk-<name>).
14417
14423
  - architecture, deepen modules (user-invoked; offer it): workit-architecture
14418
14424
  `.trim();
14419
14425
 
14420
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-context.ts
14426
+ // packages/workit-core/src/core/task-context.ts
14421
14427
  function reconcileResume(view, observations = []) {
14422
14428
  if (observations.length > 0)
14423
14429
  return failure2("permission_denied", "worker observations require native host verification");
@@ -14532,7 +14538,7 @@ var exportDigest = (bundle) => sha256({
14532
14538
  task: bundle.task
14533
14539
  });
14534
14540
 
14535
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
14541
+ // packages/workit-core/src/core/task-engine.ts
14536
14542
  var workspaceVerification = (root) => {
14537
14543
  try {
14538
14544
  return resolveAutonomy(root).verification;
@@ -16117,7 +16123,7 @@ class WorkitCore {
16117
16123
  return this.summary(changed.data.task);
16118
16124
  }
16119
16125
  }
16120
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
16126
+ // packages/workit-core/src/hooks/descriptor.ts
16121
16127
  var support = (descriptor, axis) => {
16122
16128
  if (axis.startsWith("event:"))
16123
16129
  return descriptor.events[axis.slice("event:".length)].support;
@@ -16141,7 +16147,7 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
16141
16147
  refs: rule.refs.map((handle) => ({ kind: "host", host: descriptor.host, handle }))
16142
16148
  };
16143
16149
  });
16144
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/context.ts
16150
+ // packages/workit-core/src/hooks/context.ts
16145
16151
  import path15 from "node:path";
16146
16152
  var MIGRATION_PENDING_NOTE = "workit migration pending — run `workit task status`";
16147
16153
  var migrationPending = (result) => !result.ok && result.code === "needs_input" && (result.error ?? "").startsWith(MIGRATION_PENDING);
@@ -16289,10 +16295,10 @@ var turnContextText = (input, descriptor) => {
16289
16295
  return null;
16290
16296
  }
16291
16297
  };
16292
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/branch.ts
16298
+ // packages/workit-core/src/core/branch.ts
16293
16299
  import { createHash as createHash9 } from "node:crypto";
16294
16300
 
16295
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
16301
+ // packages/workit-core/src/core/release-tracks.ts
16296
16302
  class ReleaseTrackError extends Error {
16297
16303
  }
16298
16304
  var KNOWN_FIELDS = new Set([
@@ -16431,7 +16437,7 @@ function workspaceReleaseTracks(cwd) {
16431
16437
  }
16432
16438
  var memo3 = new Map;
16433
16439
 
16434
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/branch.ts
16440
+ // packages/workit-core/src/core/branch.ts
16435
16441
  var withReleaseTracks = (workspaceRoot, policy) => {
16436
16442
  const read = workspaceReleaseTracks(workspaceRoot);
16437
16443
  if (read.error)
@@ -16524,7 +16530,7 @@ var validateBranchNameFor = (workspaceRoot, name) => {
16524
16530
  }
16525
16531
  };
16526
16532
 
16527
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/route-intent.ts
16533
+ // packages/workit-core/src/core/route-intent.ts
16528
16534
  var shellBranchTarget = (command) => {
16529
16535
  if (!command.trim() || /[\r\n;&|<>`'"$()\\*?{}~!#]/u.test(command) || command.includes("[") || command.includes("]"))
16530
16536
  return null;
@@ -16540,12 +16546,12 @@ var shellBranchPolicyViolation = (root, command) => {
16540
16546
  return target === null ? null : validateBranchNameFor(root, target);
16541
16547
  };
16542
16548
 
16543
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/policy.ts
16549
+ // packages/workit-core/src/hooks/policy.ts
16544
16550
  var shellPolicy = (cwd, command) => {
16545
16551
  const policy = shellBranchPolicyViolation(cwd, command);
16546
16552
  return policy && !policy.ok ? { kind: "deny", reason: `branch_policy_denied: ${policy.error}`, unblock: null } : { kind: "none" };
16547
16553
  };
16548
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
16554
+ // packages/workit-core/src/hooks/write-gate.ts
16549
16555
  import { realpathSync as realpathSync5 } from "node:fs";
16550
16556
  import path16 from "node:path";
16551
16557
  var NONE2 = { kind: "none" };
@@ -16806,7 +16812,7 @@ function writeGate(cwd, paths) {
16806
16812
  return NONE2;
16807
16813
  }
16808
16814
  }
16809
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
16815
+ // packages/workit-core/src/hooks/hosts/fields.ts
16810
16816
  import { existsSync as existsSync6, realpathSync as realpathSync6, statSync as statSync2 } from "node:fs";
16811
16817
  import path17 from "node:path";
16812
16818
  var isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
@@ -16874,7 +16880,7 @@ var writePaths = (input) => {
16874
16880
  paths.push(match[1].trim());
16875
16881
  return [...new Set(paths)];
16876
16882
  };
16877
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
16883
+ // packages/workit-core/src/hooks/handle.ts
16878
16884
  var usable2 = (value) => value === "native" || value === "partial";
16879
16885
  var NONE3 = { kind: "none" };
16880
16886
  var offered = new Set;
@@ -16970,7 +16976,7 @@ var dispatchHook = (adapter, raw, env = process.env) => {
16970
16976
  };
16971
16977
  }
16972
16978
  };
16973
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
16979
+ // packages/workit-core/src/hooks/hosts/claude-code.ts
16974
16980
  var CLAUDE_CODE_DESCRIPTOR = {
16975
16981
  host: "claude_code",
16976
16982
  label: "Claude Code",
@@ -17213,7 +17219,7 @@ var claudeCodeAdapter = {
17213
17219
  render
17214
17220
  };
17215
17221
 
17216
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
17222
+ // packages/workit-core/src/hooks/hosts/codex.ts
17217
17223
  function detectCodexSurface(env) {
17218
17224
  return env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE === "Codex Desktop" || Boolean(env.CODEX_ELECTRON_RESOURCES_PATH) ? "codex_desktop" : "codex_cli";
17219
17225
  }
@@ -17441,7 +17447,7 @@ var codexAdapter = {
17441
17447
  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>`
17442
17448
  };
17443
17449
 
17444
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
17450
+ // packages/workit-core/src/hooks/hosts/cursor.ts
17445
17451
  import path18 from "node:path";
17446
17452
  var undocumented2 = { support: "undocumented", native: null };
17447
17453
  var none = { support: "none", native: null };
@@ -17685,7 +17691,7 @@ var cursorAdapter = {
17685
17691
  render: render3
17686
17692
  };
17687
17693
 
17688
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/run.ts
17694
+ // packages/workit-core/src/hooks/run.ts
17689
17695
  var HOOK_ADAPTERS = {
17690
17696
  claude_code: claudeCodeAdapter,
17691
17697
  codex_cli: codexAdapter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "private": false,
5
5
  "description": "Workit Cursor plugin — shared MCP transport, native hooks, and sixteen method skills",
6
6
  "keywords": [
@@ -44,8 +44,8 @@
44
44
  "build": "bun scripts/build.ts"
45
45
  },
46
46
  "dependencies": {
47
- "@brainervirus/workit-core": "^8.0.0",
48
- "@brainervirus/workit-mcp": "^8.0.0"
47
+ "@brainervirus/workit-core": "^8.0.1",
48
+ "@brainervirus/workit-mcp": "^8.0.1"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=24"