@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.
@@ -6620,11 +6620,11 @@ var require_dist = __commonJS(function(exports, module) {
6620
6620
  exports.default = formatsPlugin;
6621
6621
  });
6622
6622
 
6623
- // packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/index.ts
6623
+ // packages/workit-mcp/src/index.ts
6624
6624
  import { fileURLToPath as fileURLToPath3 } from "node:url";
6625
6625
  import path21 from "node:path";
6626
6626
 
6627
- // packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/server.ts
6627
+ // packages/workit-mcp/src/server.ts
6628
6628
  import { existsSync as existsSync8, readFileSync as readFileSync6, realpathSync as realpathSync6 } from "node:fs";
6629
6629
  import path20 from "node:path";
6630
6630
 
@@ -16572,15 +16572,15 @@ class StdioServerTransport {
16572
16572
  }
16573
16573
  }
16574
16574
 
16575
- // packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/server.ts
16575
+ // packages/workit-mcp/src/server.ts
16576
16576
  import { fileURLToPath as fileURLToPath2 } from "node:url";
16577
16577
 
16578
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core.ts
16578
+ // packages/workit-core/src/core.ts
16579
16579
  import { spawnSync as spawnSync12 } from "node:child_process";
16580
16580
  import { existsSync as existsSync7, realpathSync as realpathSync5 } from "node:fs";
16581
16581
  import path19 from "node:path";
16582
16582
 
16583
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-contract.ts
16583
+ // packages/workit-core/src/core/task-contract.ts
16584
16584
  import { createHash, randomUUID } from "node:crypto";
16585
16585
  var SCHEMA_VERSION = 1;
16586
16586
  var POLICY_VERSION = "1.0.0";
@@ -17436,7 +17436,7 @@ function requirementId(input) {
17436
17436
  }
17437
17437
  });
17438
17438
  }
17439
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/operation-input.ts
17439
+ // packages/workit-core/src/core/operation-input.ts
17440
17440
  var str = (d, values) => ({
17441
17441
  type: "string",
17442
17442
  ...values ? { enum: values } : {},
@@ -17832,7 +17832,7 @@ function parseAdvertisedOperation(family, input, host) {
17832
17832
  }))
17833
17833
  });
17834
17834
  }
17835
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
17835
+ // packages/workit-core/src/core/task-store.ts
17836
17836
  import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
17837
17837
  import * as fs7 from "node:fs";
17838
17838
  import path6 from "node:path";
@@ -18438,7 +18438,7 @@ function acquireFileLockSync(targetPath, options) {
18438
18438
  }
18439
18439
  }
18440
18440
  }
18441
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/package-root.ts
18441
+ // packages/workit-core/src/core/package-root.ts
18442
18442
  import { existsSync } from "node:fs";
18443
18443
  import path3 from "node:path";
18444
18444
  import { fileURLToPath } from "node:url";
@@ -18457,12 +18457,12 @@ var assetRoot = () => {
18457
18457
  return existsSync(assets) ? assets : root;
18458
18458
  };
18459
18459
 
18460
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
18460
+ // packages/workit-core/src/core/store-lock.ts
18461
18461
  import { spawnSync as spawnSync2 } from "node:child_process";
18462
18462
  import fs5 from "node:fs";
18463
18463
  import { hostname } from "node:os";
18464
18464
 
18465
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/paths.ts
18465
+ // packages/workit-core/src/store/paths.ts
18466
18466
  import { spawnSync } from "node:child_process";
18467
18467
  import { createHash as createHash2 } from "node:crypto";
18468
18468
  import fs4 from "node:fs";
@@ -18742,7 +18742,7 @@ var checkoutSlug = (root) => {
18742
18742
  return `${base}-${shortHash(canonical)}`;
18743
18743
  };
18744
18744
 
18745
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/store-lock.ts
18745
+ // packages/workit-core/src/core/store-lock.ts
18746
18746
  var metadataLockSchema = object2({
18747
18747
  pid: number2().int().nonnegative().safe(),
18748
18748
  processStart: string2().nullable(),
@@ -18873,7 +18873,7 @@ var clearAbandonedReclaimGuard = (lockPath, nowMs = Date.now()) => {
18873
18873
  }
18874
18874
  };
18875
18875
 
18876
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/event-log.ts
18876
+ // packages/workit-core/src/store/event-log.ts
18877
18877
  import { randomUUID as randomUUID2 } from "node:crypto";
18878
18878
  import fs6 from "node:fs";
18879
18879
  import path5 from "node:path";
@@ -19033,7 +19033,7 @@ var retryTransient = (run) => {
19033
19033
  };
19034
19034
  var renameWithRetry = (from, to) => retryTransient(() => fs6.renameSync(from, to));
19035
19035
 
19036
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/patch.ts
19036
+ // packages/workit-core/src/store/patch.ts
19037
19037
  var isPlainObject3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
19038
19038
  var equal = (left, right) => {
19039
19039
  if (left === right)
@@ -19143,7 +19143,7 @@ var isPatch = (value) => Array.isArray(value) && value.every((op) => {
19143
19143
  return false;
19144
19144
  });
19145
19145
 
19146
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/reduce.ts
19146
+ // packages/workit-core/src/store/reduce.ts
19147
19147
  import { createHash as createHash3 } from "node:crypto";
19148
19148
  var OPENING_TYPES = new Set([
19149
19149
  "task.opened",
@@ -19274,7 +19274,7 @@ function eventType(before, after) {
19274
19274
  return "task.updated";
19275
19275
  }
19276
19276
 
19277
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/store/notes.ts
19277
+ // packages/workit-core/src/store/notes.ts
19278
19278
  var SLOT = Symbol.for("workit.migrationReporter");
19279
19279
  var reportMigration = (report) => {
19280
19280
  try {
@@ -19285,7 +19285,7 @@ var reportMigration = (report) => {
19285
19285
  };
19286
19286
  var migrationReporterInstalled = () => typeof globalThis[SLOT] === "function";
19287
19287
 
19288
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-store.ts
19288
+ // packages/workit-core/src/core/task-store.ts
19289
19289
  var MIGRATION_PENDING = "workit migration pending";
19290
19290
  var STORE_FORMAT = 3;
19291
19291
  var STORE_MIN_RUNTIME = "3.0.0";
@@ -20921,18 +20921,18 @@ class TaskStore {
20921
20921
  return failure2(recovery ? "recovery_required" : "storage_error", `lock operation failed: ${String(error)}`, { path: lockPath });
20922
20922
  }
20923
20923
  }
20924
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workers.ts
20924
+ // packages/workit-core/src/core/workers.ts
20925
20925
  var UNCERTAIN_WORKER_STATES = ["dispatching", "running", "cancelling", "unknown"];
20926
20926
  var isUncertainWorker = (state) => UNCERTAIN_WORKER_STATES.includes(state);
20927
20927
  var workerBlocksTransition = (transition, state) => transition === "pause" ? false : isUncertainWorker(state);
20928
20928
 
20929
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
20929
+ // packages/workit-core/src/core/task-evaluation.ts
20930
20930
  import { createHash as createHash7 } from "node:crypto";
20931
20931
  import * as fs11 from "node:fs";
20932
20932
  import { spawnSync as spawnSync6 } from "node:child_process";
20933
20933
  import path11 from "node:path";
20934
20934
 
20935
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/check-config.ts
20935
+ // packages/workit-core/src/check-config.ts
20936
20936
  import { spawnSync as spawnSync3 } from "node:child_process";
20937
20937
  import fs8 from "node:fs";
20938
20938
  import path7 from "node:path";
@@ -21137,7 +21137,7 @@ function checkCommand(args, version, onPath = workitAvailable()) {
21137
21137
  return onPath ? `workit check ${args}` : `npx -y @brainervirus/workit-cli@${version} check ${args}`;
21138
21138
  }
21139
21139
 
21140
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/git/rev.ts
21140
+ // packages/workit-core/src/git/rev.ts
21141
21141
  import { spawnSync as spawnSync4 } from "node:child_process";
21142
21142
  import { createHash as createHash5 } from "node:crypto";
21143
21143
  import fs9 from "node:fs";
@@ -21318,11 +21318,11 @@ function pushRemoteName(cwd, branch) {
21318
21318
  return remotes.length === 1 ? remotes[0] : null;
21319
21319
  }
21320
21320
 
21321
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
21321
+ // packages/workit-core/src/core/policy/derive.ts
21322
21322
  import { existsSync as existsSync3 } from "node:fs";
21323
21323
  import path10 from "node:path";
21324
21324
 
21325
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/ledger.ts
21325
+ // packages/workit-core/src/ledger.ts
21326
21326
  import { spawnSync as spawnSync5 } from "node:child_process";
21327
21327
  import { createHash as createHash6, randomBytes as randomBytes2 } from "node:crypto";
21328
21328
  import fs10 from "node:fs";
@@ -21564,7 +21564,7 @@ var independenceReasons = (row, authors) => {
21564
21564
  reasons.push("self");
21565
21565
  return reasons;
21566
21566
  };
21567
- function effectiveOf(rows, authors) {
21567
+ function effectiveOf(rows, authors, sameCode) {
21568
21568
  let effective = null;
21569
21569
  for (const row of rows) {
21570
21570
  if (!effective) {
@@ -21575,7 +21575,7 @@ function effectiveOf(rows, authors) {
21575
21575
  const effIndependent = independenceReasons(effective, authors).length === 0;
21576
21576
  if (effIndependent && !rowIndependent)
21577
21577
  continue;
21578
- if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session)
21578
+ if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session && sameCode(effective, row))
21579
21579
  continue;
21580
21580
  effective = row;
21581
21581
  }
@@ -21606,16 +21606,22 @@ function checkVerdicts(cwd, branch, rows) {
21606
21606
  const head = branchHead(cwd, branch);
21607
21607
  const fallbackBase = defaultBase(cwd);
21608
21608
  const keyCache = new Map;
21609
- const keyFor = (base) => {
21610
- if (!base || !head)
21609
+ const keysAt = (base, at) => {
21610
+ if (!base || !at)
21611
21611
  return { patchId: null, diffHash: null };
21612
- let key = keyCache.get(base);
21612
+ const cacheKey = `${base}\x00${at}`;
21613
+ let key = keyCache.get(cacheKey);
21613
21614
  if (!key) {
21614
- key = { patchId: patchId(cwd, base, head), diffHash: diffHash(cwd, base, head) };
21615
- keyCache.set(base, key);
21615
+ key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
21616
+ keyCache.set(cacheKey, key);
21616
21617
  }
21617
21618
  return key;
21618
21619
  };
21620
+ const keyFor = (base) => keysAt(base, head);
21621
+ const sameCode = (failed, row) => verdictBasis(failed, {
21622
+ head: row.head,
21623
+ ...keysAt(failed.base ?? fallbackBase, row.head)
21624
+ }) !== "stale" || restackCarries(rows, branch, failed.head, row.head);
21619
21625
  const authors = authorSessions(cwd, rows, branch, { base: fallbackBase, head });
21620
21626
  const byKind = new Map;
21621
21627
  for (const row of rows)
@@ -21625,7 +21631,7 @@ function checkVerdicts(cwd, branch, rows) {
21625
21631
  }
21626
21632
  const verdicts = [];
21627
21633
  for (const [kind, list] of byKind) {
21628
- const row = effectiveOf(list, authors);
21634
+ const row = effectiveOf(list, authors, sameCode);
21629
21635
  if (!row)
21630
21636
  continue;
21631
21637
  let basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
@@ -21651,11 +21657,11 @@ function checkVerdicts(cwd, branch, rows) {
21651
21657
  verdicts.sort((a, b) => a.verdict.seq - b.verdict.seq);
21652
21658
  const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
21653
21659
  const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
21654
- const newestAccepted = verdicts.findLast((entry) => entry.accepted) ?? null;
21660
+ const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
21655
21661
  const accepted = newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
21656
21662
  accepted: false,
21657
21663
  verdict: failing?.verdict ?? null,
21658
- reasons: failing ? ["failing_verdict"] : newestCurrent?.reasons ?? ["no_verdict"]
21664
+ reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
21659
21665
  };
21660
21666
  const selfEntry = failing ? undefined : verdicts.findLast((entry) => entry.current && !entry.independent && STRONG_RESULTS.has(String(entry.verdict.result)));
21661
21667
  return {
@@ -21671,9 +21677,9 @@ function checkVerdicts(cwd, branch, rows) {
21671
21677
  authors: [...authors].toSorted()
21672
21678
  };
21673
21679
  }
21674
- var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
21680
+ var OBSERVED_ONLY = new Set(["check", "merge.unverified", ...PR_ROW_TYPES]);
21675
21681
 
21676
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/derive.ts
21682
+ // packages/workit-core/src/core/policy/derive.ts
21677
21683
  var RULES = {
21678
21684
  test: "check:test",
21679
21685
  self: "verdict:self",
@@ -21861,7 +21867,7 @@ function derivedRuleStatus(task, requirement, root, ledger) {
21861
21867
  }
21862
21868
  }
21863
21869
 
21864
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-evaluation.ts
21870
+ // packages/workit-core/src/core/task-evaluation.ts
21865
21871
  var digestBytes = (value) => createHash7("sha256").update(value).digest("hex");
21866
21872
  var inside = (root, candidate) => candidate === root || candidate.startsWith(`${root}${path11.sep}`);
21867
21873
  var relative = (root, candidate) => path11.relative(root, candidate).split(path11.sep).join("/") || ".";
@@ -22527,7 +22533,7 @@ function evaluateClosure(requestedOutcome, view) {
22527
22533
  });
22528
22534
  }
22529
22535
 
22530
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/methods.ts
22536
+ // packages/workit-core/src/core/methods.ts
22531
22537
  var METHODS = {
22532
22538
  "workit-shape": { dimensions: ["challenge", "decisions", "artifacts", "continuity"] },
22533
22539
  "workit-bdd": { dimensions: ["testing"] },
@@ -22573,7 +22579,7 @@ function selectMethods(policy, capabilities) {
22573
22579
  });
22574
22580
  }
22575
22581
 
22576
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-context.ts
22582
+ // packages/workit-core/src/core/task-context.ts
22577
22583
  function reconcileResume(view, observations = []) {
22578
22584
  if (observations.length > 0)
22579
22585
  return failure2("permission_denied", "worker observations require native host verification");
@@ -22687,7 +22693,7 @@ var exportDigest = (bundle) => sha256({
22687
22693
  sourceWorkspaceId: bundle.sourceWorkspaceId,
22688
22694
  task: bundle.task
22689
22695
  });
22690
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/git.ts
22696
+ // packages/workit-core/src/core/git.ts
22691
22697
  import { execFileSync } from "node:child_process";
22692
22698
  var run = (cwd, args) => {
22693
22699
  try {
@@ -22755,7 +22761,7 @@ var gitContext = (workspaceRoot, paths = []) => {
22755
22761
  };
22756
22762
  };
22757
22763
 
22758
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
22764
+ // packages/workit-core/src/core/config.ts
22759
22765
  import {
22760
22766
  copyFileSync as copyFileSync2,
22761
22767
  cpSync as cpSync2,
@@ -22768,7 +22774,7 @@ import {
22768
22774
  import os2 from "node:os";
22769
22775
  import path12 from "node:path";
22770
22776
 
22771
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/boundary.ts
22777
+ // packages/workit-core/src/core/boundary.ts
22772
22778
  import { statSync as statSync2 } from "node:fs";
22773
22779
  var EVENT = {
22774
22780
  initialization: "initialization",
@@ -22804,7 +22810,7 @@ var changedSourcesSinceLoad = (marker) => {
22804
22810
  return changed;
22805
22811
  };
22806
22812
 
22807
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/config.ts
22813
+ // packages/workit-core/src/core/config.ts
22808
22814
  var diagnosticLogger;
22809
22815
  var PRESETS = {
22810
22816
  gitflow: {
@@ -22957,7 +22963,7 @@ var COMMIT_PRESETS = [
22957
22963
  "auto"
22958
22964
  ];
22959
22965
 
22960
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/workspaces.ts
22966
+ // packages/workit-core/src/core/workspaces.ts
22961
22967
  import { createHash as createHash8 } from "node:crypto";
22962
22968
  import { readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
22963
22969
  import path13 from "node:path";
@@ -23366,12 +23372,12 @@ function workspaceDefaultTarget(cwd, globalDefault) {
23366
23372
  return String(ws?.vcs?.defaultTargetBranch ?? (hasWorkspacePolicy ? policyDefault : globalDefault ?? policyDefault) ?? "develop");
23367
23373
  }
23368
23374
 
23369
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/vcs-config.ts
23375
+ // packages/workit-core/src/core/vcs-config.ts
23370
23376
  import fs12 from "node:fs";
23371
23377
  import path14 from "node:path";
23372
23378
  import { spawnSync as spawnSync8 } from "node:child_process";
23373
23379
 
23374
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/release-tracks.ts
23380
+ // packages/workit-core/src/core/release-tracks.ts
23375
23381
  import { createHash as createHash9 } from "node:crypto";
23376
23382
  import { spawnSync as spawnSync7 } from "node:child_process";
23377
23383
  var KNOWN_FIELDS = new Set([
@@ -23756,7 +23762,7 @@ function resolveTrackFor(cwd, options) {
23756
23762
  return resolution;
23757
23763
  }
23758
23764
 
23759
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/vcs-config.ts
23765
+ // packages/workit-core/src/core/vcs-config.ts
23760
23766
  var workspacesPath = () => path14.join(configDir(), "workspaces.json");
23761
23767
  var vcsCwd = (cwd) => cwd ?? process.env.WORKFLOW_WORKSPACE_ROOT ?? process.cwd();
23762
23768
  var remoteProvider = (cwd) => {
@@ -24037,10 +24043,10 @@ function mergedPrStyle(limit = 6, cwd) {
24037
24043
  examples
24038
24044
  };
24039
24045
  }
24040
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
24046
+ // packages/workit-core/src/core/task-engine.ts
24041
24047
  import { realpathSync as realpathSync4 } from "node:fs";
24042
24048
 
24043
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy-resolver.ts
24049
+ // packages/workit-core/src/core/policy-resolver.ts
24044
24050
  function resolvePolicy(input) {
24045
24051
  const ids = input.constraints.map((constraint) => constraint.id);
24046
24052
  if (new Set(ids).size !== ids.length)
@@ -24096,7 +24102,7 @@ function diffPolicy(previous, next, reason, now) {
24096
24102
  return parsed.data;
24097
24103
  }
24098
24104
 
24099
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/policy/judgment.ts
24105
+ // packages/workit-core/src/core/policy/judgment.ts
24100
24106
  var isObject6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
24101
24107
  var squash = (key) => key.toLowerCase().replace(/[_-]/g, "");
24102
24108
  var ALIASES = {
@@ -24220,7 +24226,7 @@ function normalizeJudgment(raw, previous) {
24220
24226
  return success(null, null, { judgment: parsed.data, ignored, legacy });
24221
24227
  }
24222
24228
 
24223
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/autonomy.ts
24229
+ // packages/workit-core/src/autonomy.ts
24224
24230
  import os3 from "node:os";
24225
24231
  import path15 from "node:path";
24226
24232
  var accountHome = () => {
@@ -24357,7 +24363,7 @@ function resolveAutonomy(cwd) {
24357
24363
  var suggested = (kind) => kind === "merge" ? "verified" : "true";
24358
24364
  var grantHint = (workspace, kind) => `ask the user to run, in their own terminal: workit grant set ${workspace ?? "<workspace>"} ${kind}=${suggested(kind)}`;
24359
24365
 
24360
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/task-engine.ts
24366
+ // packages/workit-core/src/core/task-engine.ts
24361
24367
  var workspaceVerification = (root) => {
24362
24368
  try {
24363
24369
  return resolveAutonomy(root).verification;
@@ -25942,7 +25948,7 @@ class WorkitCore {
25942
25948
  return this.summary(changed.data.task);
25943
25949
  }
25944
25950
  }
25945
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/repo-context.ts
25951
+ // packages/workit-core/src/core/repo-context.ts
25946
25952
  import { spawnSync as spawnSync9 } from "node:child_process";
25947
25953
  import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync4 } from "node:fs";
25948
25954
  import path16 from "node:path";
@@ -26412,20 +26418,20 @@ function releaseNotesContext(root, rangeOrTag) {
26412
26418
  return { stdout, stderr: "", exitCode: 0, cwd };
26413
26419
  }
26414
26420
 
26415
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/tracker-issues.ts
26421
+ // packages/workit-core/src/core/tracker-issues.ts
26416
26422
  import { spawnSync as spawnSync11 } from "node:child_process";
26417
26423
 
26418
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/pr-create.ts
26424
+ // packages/workit-core/src/core/pr-create.ts
26419
26425
  import fs13 from "node:fs";
26420
26426
  import path17 from "node:path";
26421
26427
  import { spawnSync as spawnSync10 } from "node:child_process";
26422
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/forge/pr-body.ts
26428
+ // packages/workit-core/src/forge/pr-body.ts
26423
26429
  function parseGhIssue(value) {
26424
26430
  const m = /issues\/(\d+)/.exec(value);
26425
26431
  return m ? m[1] : String(value).trim().replace(/^#/, "");
26426
26432
  }
26427
26433
 
26428
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/pr-create.ts
26434
+ // packages/workit-core/src/core/pr-create.ts
26429
26435
  function whichOnPath(tool) {
26430
26436
  const names = process.platform === "win32" ? [tool, `${tool}.exe`, `${tool}.cmd`] : [tool];
26431
26437
  for (const dir of (process.env.PATH ?? "").split(path17.delimiter)) {
@@ -26453,7 +26459,7 @@ var pushRemote = (cwd) => {
26453
26459
  return urls.length === 1 ? urls[0] : null;
26454
26460
  };
26455
26461
 
26456
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/tracker-issues.ts
26462
+ // packages/workit-core/src/core/tracker-issues.ts
26457
26463
  var repoPathFromRemote = (remote) => {
26458
26464
  let rest = (remote || "").trim().replace(/\/+$/, "");
26459
26465
  if (!rest)
@@ -26551,19 +26557,19 @@ var fetchGitLabIssueBody = async (ref, root, deps = {}) => {
26551
26557
  return tryCliTriple(deps.cli ?? defaultCli("glab", hostingCliAvailable("gitlab")), "glab", ["issue", "view", id, "-R", repoArg, "-F", "json"], root, id, ["iid"], ["description"]);
26552
26558
  };
26553
26559
 
26554
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/youtrack.ts
26560
+ // packages/workit-core/src/core/youtrack.ts
26555
26561
  import fs14 from "node:fs";
26556
26562
  import path18 from "node:path";
26557
26563
 
26558
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/templates.ts
26564
+ // packages/workit-core/src/core/templates.ts
26559
26565
  var repoRoot2 = assetRoot();
26560
26566
 
26561
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/scripts.ts
26567
+ // packages/workit-core/src/core/scripts.ts
26562
26568
  var PLUGIN_ROOT = packageRoot();
26563
26569
  var ASSET_ROOT = assetRoot();
26564
26570
  var resolveWorkspaceRoot = (explicit) => explicit || process.cwd();
26565
26571
 
26566
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/youtrack.ts
26572
+ // packages/workit-core/src/core/youtrack.ts
26567
26573
  var ISSUE_RE = /^[A-Z]+-\d+$/;
26568
26574
  var TOKEN_PLACEHOLDER = "YOUR_TOKEN_HERE";
26569
26575
  var youTrackConfigPath = () => process.env.WORKFLOW_YOUTRACK_CONFIG ?? path18.join(configDir(), "youtrack.json");
@@ -26854,7 +26860,7 @@ var fetchYouTrackIssueBody = async (issue, creds = youTrackToken, request = youT
26854
26860
  }
26855
26861
  };
26856
26862
 
26857
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/context-read.ts
26863
+ // packages/workit-core/src/core/context-read.ts
26858
26864
  var contextReadSchema = object2({
26859
26865
  kind: _enum([
26860
26866
  "git",
@@ -26949,7 +26955,7 @@ var readExternalContext = async (root, payload) => {
26949
26955
  }
26950
26956
  }
26951
26957
  };
26952
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core.ts
26958
+ // packages/workit-core/src/core.ts
26953
26959
  var revision2 = /^[A-Za-z0-9@][A-Za-z0-9@._/~^{}-]*$/;
26954
26960
  function gitRevisionParts(value) {
26955
26961
  if (!value || value.startsWith("-") || /[\s\\'"`$;|&<>]/.test(value)) {
@@ -27005,7 +27011,7 @@ function run2(root, executable, args, env = {}) {
27005
27011
  };
27006
27012
  }
27007
27013
 
27008
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/core/logger.ts
27014
+ // packages/workit-core/src/core/logger.ts
27009
27015
  import os4 from "node:os";
27010
27016
  var REDACTED = "[REDACTED]";
27011
27017
  var SECRET_VALUE = /\b(?:Bearer|Basic|Digest|Token)\s+\S+/gi;
@@ -27062,7 +27068,7 @@ var applyPatterns = (value) => {
27062
27068
  };
27063
27069
  var redactSecrets = (value) => applyPatterns(value);
27064
27070
 
27065
- // packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/server.ts
27071
+ // packages/workit-mcp/src/server.ts
27066
27072
  class McpCapabilityUnavailableError extends Error {
27067
27073
  capability;
27068
27074
  constructor(capability) {
@@ -27358,7 +27364,7 @@ async function runStdioServer(host, contextProvider = defaultContextProvider(hos
27358
27364
  return server;
27359
27365
  }
27360
27366
 
27361
- // packages/workit-cursor/node_modules/@brainervirus/workit-mcp/src/index.ts
27367
+ // packages/workit-mcp/src/index.ts
27362
27368
  var main = async () => {
27363
27369
  const args = process.argv.slice(2);
27364
27370
  const hostIndex = args.indexOf("--host");
@@ -27375,7 +27381,7 @@ var main = async () => {
27375
27381
  var entryPath = process.argv[1] ? path21.resolve(process.argv[1]) : "";
27376
27382
  if (entryPath === path21.resolve(fileURLToPath3(import.meta.url)))
27377
27383
  await main();
27378
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/descriptor.ts
27384
+ // packages/workit-core/src/hooks/descriptor.ts
27379
27385
  var support = (descriptor, axis) => {
27380
27386
  if (axis.startsWith("event:"))
27381
27387
  return descriptor.events[axis.slice("event:".length)].support;
@@ -27399,14 +27405,14 @@ var capabilitiesFor = (descriptor, observed = {}) => descriptor.capabilities.map
27399
27405
  refs: rule.refs.map((handle) => ({ kind: "host", host: descriptor.host, handle }))
27400
27406
  };
27401
27407
  });
27402
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/context.ts
27408
+ // packages/workit-core/src/hooks/context.ts
27403
27409
  var signals = new Map;
27404
27410
  var cache = new Map;
27405
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/write-gate.ts
27411
+ // packages/workit-core/src/hooks/write-gate.ts
27406
27412
  var CASE_INSENSITIVE = process.platform === "darwin" || process.platform === "win32";
27407
27413
  var PREFIXES = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
27408
27414
  var cache2 = new Map;
27409
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/fields.ts
27415
+ // packages/workit-core/src/hooks/hosts/fields.ts
27410
27416
  var SHELLS = new Set(["sh", "bash", "zsh", "dash", "pwsh", "powershell", "cmd"]);
27411
27417
  var WRITE_TOOLS = new Set([
27412
27418
  "write",
@@ -27427,19 +27433,19 @@ var WRITE_TOOLS = new Set([
27427
27433
  "editfile",
27428
27434
  "writefile"
27429
27435
  ]);
27430
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/handle.ts
27436
+ // packages/workit-core/src/hooks/handle.ts
27431
27437
  var offered = new Set;
27432
27438
  var CLAUDE_JUDGES = new Set(["workit:verifier", "workit:reviewer"]);
27433
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/claude-code.ts
27439
+ // packages/workit-core/src/hooks/hosts/claude-code.ts
27434
27440
  var SOURCES = new Set(["startup", "resume", "clear", "compact", "fork"]);
27435
27441
  var SHELL_TOOLS = new Set(["Bash", "PowerShell"]);
27436
27442
  var CONTEXT_EVENTS = new Set(["SessionStart", "UserPromptSubmit", "SubagentStart"]);
27437
27443
 
27438
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/codex.ts
27444
+ // packages/workit-core/src/hooks/hosts/codex.ts
27439
27445
  var SHELL_TOOLS2 = new Set(["bash", "unified-exec"]);
27440
27446
  var SOURCES2 = new Set(["startup", "resume", "clear", "compact"]);
27441
27447
 
27442
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/hosts/cursor.ts
27448
+ // packages/workit-core/src/hooks/hosts/cursor.ts
27443
27449
  var undocumented = { support: "undocumented", native: null };
27444
27450
  var none = { support: "none", native: null };
27445
27451
  var CURSOR_DESCRIPTOR = {
@@ -27544,7 +27550,7 @@ var CURSOR_DESCRIPTOR = {
27544
27550
  };
27545
27551
  var BLOCKING = new Set(["preToolUse", "beforeShellExecution", "subagentStart"]);
27546
27552
 
27547
- // packages/workit-cursor/node_modules/@brainervirus/workit-core/src/hooks/run.ts
27553
+ // packages/workit-core/src/hooks/run.ts
27548
27554
  if (false) {}
27549
27555
  // packages/workit-cursor/hooks/workit-hook.ts
27550
27556
  var cursorCapabilities = (availability = {}) => capabilitiesFor(CURSOR_DESCRIPTOR, {