@brainervirus/workit-cursor 8.0.1 → 8.1.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.
@@ -10008,6 +10008,7 @@ var DEFAULTS = {
10008
10008
  },
10009
10009
  commitPolicy: { preset: "conventional" }
10010
10010
  };
10011
+ var unchosenBranchPolicy = new WeakSet([DEFAULTS]);
10011
10012
  var readSafe = (p) => {
10012
10013
  try {
10013
10014
  return readFileSync(p, "utf8");
@@ -10032,22 +10033,21 @@ var parseConfigResult = (raw, file) => {
10032
10033
  const locale = LOCALE_RE.test(String(input.locale ?? "")) ? input.locale : DEFAULTS.locale;
10033
10034
  const preset = Object.hasOwn(PRESETS, input.branchPolicy?.preset) ? input.branchPolicy?.preset : "gitflow";
10034
10035
  const commitPreset = COMMIT_PRESETS.includes(String(input.commitPolicy?.preset ?? "")) ? input.commitPolicy?.preset : "conventional";
10035
- return {
10036
- status: "valid",
10037
- path: file,
10038
- config: {
10039
- locale,
10040
- localeOptions: Array.isArray(input.localeOptions) ? input.localeOptions : DEFAULTS.localeOptions,
10041
- branchPolicy: mergePreset(preset, {
10042
- allowed: Array.isArray(input.branchPolicy?.allowed) ? input.branchPolicy.allowed : undefined,
10043
- protectedNames: Array.isArray(input.branchPolicy?.protected) ? input.branchPolicy.protected : undefined
10044
- }, DEFAULTS),
10045
- commitPolicy: {
10046
- preset: commitPreset,
10047
- ...typeof input.commitPolicy?.pattern === "string" ? { pattern: input.commitPolicy.pattern } : {}
10048
- }
10036
+ const config = {
10037
+ locale,
10038
+ localeOptions: Array.isArray(input.localeOptions) ? input.localeOptions : DEFAULTS.localeOptions,
10039
+ branchPolicy: mergePreset(preset, {
10040
+ allowed: Array.isArray(input.branchPolicy?.allowed) ? input.branchPolicy.allowed : undefined,
10041
+ protectedNames: Array.isArray(input.branchPolicy?.protected) ? input.branchPolicy.protected : undefined
10042
+ }, DEFAULTS),
10043
+ commitPolicy: {
10044
+ preset: commitPreset,
10045
+ ...typeof input.commitPolicy?.pattern === "string" ? { pattern: input.commitPolicy.pattern } : {}
10049
10046
  }
10050
10047
  };
10048
+ if (!Object.hasOwn(PRESETS, input.branchPolicy?.preset))
10049
+ unchosenBranchPolicy.add(config);
10050
+ return { status: "valid", path: file, config };
10051
10051
  };
10052
10052
  var readConfigTyped = (dir) => {
10053
10053
  const file = path5.join(dir ?? configDir(), "config.json");
@@ -10060,9 +10060,11 @@ var readConfig = () => {
10060
10060
  return result.config ?? DEFAULTS;
10061
10061
  };
10062
10062
  var branchGlobPattern = (glob) => new RegExp(`^${glob.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*")}$`, "i");
10063
- var resolveBranchPolicy = (config, workspace) => {
10063
+ var resolveBranchPolicy = (config, workspace, repoPreset) => {
10064
10064
  const wp = workspace?.branchPolicy ?? {};
10065
- const preset = Object.hasOwn(PRESETS, wp.preset) ? wp.preset : config.branchPolicy?.preset ?? "gitflow";
10065
+ const workspacePreset = Object.hasOwn(PRESETS, wp.preset);
10066
+ const detected = !workspacePreset && unchosenBranchPolicy.has(config) ? repoPreset?.() ?? null : null;
10067
+ const preset = workspacePreset ? wp.preset : detected ?? config.branchPolicy?.preset ?? "gitflow";
10066
10068
  const merged = mergePreset(preset, {
10067
10069
  allowed: wp.allowed,
10068
10070
  protectedNames: wp.protected
@@ -10071,9 +10073,10 @@ var resolveBranchPolicy = (config, workspace) => {
10071
10073
  return {
10072
10074
  preset,
10073
10075
  allowed,
10074
- protected: new Set(merged.protected.map((p) => p.toLowerCase())),
10076
+ protected: new Set([...merged.protected, ...detected ? PRESETS.gitflow.protected : []].map((p) => p.toLowerCase())),
10075
10077
  integration: wp.integration === "merge" ? "merge" : "pr",
10076
- defaultTargetBranch: preset === "github-flow" ? "main" : preset === "trunk-based" ? "master" : "develop"
10078
+ defaultTargetBranch: preset === "github-flow" ? "main" : preset === "trunk-based" ? "master" : "develop",
10079
+ detected: detected !== null
10077
10080
  };
10078
10081
  };
10079
10082
  var COMMIT_PRESETS = [
@@ -10096,9 +10099,77 @@ var resolveCommitPolicy = (config, workspace) => {
10096
10099
  };
10097
10100
 
10098
10101
  // packages/workit-core/src/core/workspaces.ts
10102
+ import { spawnSync as spawnSync5 } from "node:child_process";
10099
10103
  import { createHash as createHash5 } from "node:crypto";
10100
10104
  import { readFileSync as readFileSync2, realpathSync } from "node:fs";
10101
10105
  import path6 from "node:path";
10106
+
10107
+ // packages/workit-core/src/core/branch-policy.ts
10108
+ import { spawnSync as spawnSync4 } from "node:child_process";
10109
+ var PREFIXES = {
10110
+ feature: "feature/*",
10111
+ bugfix: "bugfix/*",
10112
+ release: "release/*",
10113
+ hotfix: "hotfix/*"
10114
+ };
10115
+ var branchNames = (workspaceRoot) => {
10116
+ const r = spawnSync4("git", ["for-each-ref", "--format=%(refname)", "refs/heads", "refs/remotes/origin"], { cwd: workspaceRoot, encoding: "utf8" });
10117
+ if (r.status !== 0)
10118
+ return new Set;
10119
+ return new Set((r.stdout ?? "").split(`
10120
+ `).filter(Boolean).map((ref) => ref.startsWith("refs/heads/") ? ref.slice("refs/heads/".length) : ref.slice("refs/remotes/origin/".length)));
10121
+ };
10122
+ var detectBranchPolicy = (workspaceRoot) => {
10123
+ const names = branchNames(workspaceRoot);
10124
+ const develop = names.has("develop");
10125
+ const main = names.has("main");
10126
+ const master = names.has("master");
10127
+ const root = main ? "main" : master ? "master" : null;
10128
+ if (develop) {
10129
+ return {
10130
+ preset: "gitflow",
10131
+ developBranch: "develop",
10132
+ integration: "merge",
10133
+ protected: root ? [root, "develop"] : ["develop"],
10134
+ allowed: [...PRESETS.gitflow.allowed],
10135
+ prefixes: PREFIXES
10136
+ };
10137
+ }
10138
+ if (root === "main") {
10139
+ return {
10140
+ preset: "github-flow",
10141
+ developBranch: null,
10142
+ integration: "pr",
10143
+ protected: [root],
10144
+ allowed: ["*"],
10145
+ prefixes: PREFIXES
10146
+ };
10147
+ }
10148
+ if (root === "master") {
10149
+ return {
10150
+ preset: "trunk-based",
10151
+ developBranch: null,
10152
+ integration: "pr",
10153
+ protected: [root],
10154
+ allowed: ["*"],
10155
+ prefixes: PREFIXES
10156
+ };
10157
+ }
10158
+ return {
10159
+ preset: "gitflow",
10160
+ developBranch: null,
10161
+ integration: "merge",
10162
+ protected: [],
10163
+ allowed: [],
10164
+ prefixes: PREFIXES
10165
+ };
10166
+ };
10167
+ var repoBranchPreset = (workspaceRoot) => {
10168
+ const detected = detectBranchPolicy(workspaceRoot);
10169
+ return detected.developBranch || detected.allowed.length ? detected.preset : null;
10170
+ };
10171
+
10172
+ // packages/workit-core/src/core/workspaces.ts
10102
10173
  var nonBlank = string2().refine((value) => value.trim().length > 0, "must not be blank");
10103
10174
  var branchPreset = custom((value) => typeof value === "string" && Object.hasOwn(PRESETS, value), "unsupported branch preset");
10104
10175
  var commitPreset = custom((value) => typeof value === "string" && COMMIT_PRESETS.includes(value), "unsupported commit preset");
@@ -10340,6 +10411,53 @@ var validateWorkspaceGlob = (glob) => {
10340
10411
  }
10341
10412
  return { ok: true };
10342
10413
  };
10414
+
10415
+ class WorkspaceConfigError extends Error {
10416
+ name = "WorkspaceConfigError";
10417
+ }
10418
+ var mainCheckouts = new Map;
10419
+ var mainCheckoutOf = (cwd) => {
10420
+ const cached = mainCheckouts.get(cwd);
10421
+ if (cached !== undefined)
10422
+ return cached;
10423
+ const env = { ...process.env };
10424
+ for (const name of ["GIT_DIR", "GIT_WORK_TREE", "GIT_COMMON_DIR", "GIT_INDEX_FILE"])
10425
+ delete env[name];
10426
+ const git = (args) => {
10427
+ const run = spawnSync5("git", args, {
10428
+ cwd,
10429
+ env,
10430
+ encoding: "utf8",
10431
+ timeout: 5000,
10432
+ windowsHide: true
10433
+ });
10434
+ return run.status === 0 ? run.stdout : null;
10435
+ };
10436
+ let main = null;
10437
+ const dirs = git(["rev-parse", "--path-format=absolute", "--git-dir", "--git-common-dir"]);
10438
+ const [gitDir, common] = (dirs ?? "").trim().split(/\r?\n/u);
10439
+ if (gitDir && common && path6.resolve(gitDir) !== path6.resolve(common)) {
10440
+ const listed = /^worktree (.+)$/mu.exec(git(["worktree", "list", "--porcelain"]) ?? "")?.[1];
10441
+ main = listed?.trim() || (path6.basename(common) === ".git" ? path6.dirname(common) : common);
10442
+ }
10443
+ mainCheckouts.set(cwd, main);
10444
+ return main;
10445
+ };
10446
+ var matchingEntries = (cwd, entries) => {
10447
+ const match = (where) => {
10448
+ const targets = [where, realpathOf(where)].map((value) => value.replaceAll("\\", "/"));
10449
+ return entries.filter((entry) => {
10450
+ const glob = entry.glob.replaceAll("\\", "/");
10451
+ const canonical = canonicalGlob(glob);
10452
+ return targets.some((target) => matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target));
10453
+ });
10454
+ };
10455
+ const direct = match(cwd);
10456
+ if (direct.length)
10457
+ return direct;
10458
+ const main = mainCheckoutOf(cwd);
10459
+ return main ? match(main) : direct;
10460
+ };
10343
10461
  var realpathOf = (p) => {
10344
10462
  const real = realpathSync.native ?? realpathSync;
10345
10463
  try {
@@ -10364,43 +10482,29 @@ var selectWorkspaceMatch = (matches, cwd, workspaceName) => {
10364
10482
  if (named.length === 1)
10365
10483
  return named[0];
10366
10484
  if (named.length > 1)
10367
- throw new Error(`ambiguous workspace ${JSON.stringify(workspaceName)} for ${cwd}`);
10485
+ throw new WorkspaceConfigError(`ambiguous workspace ${JSON.stringify(workspaceName)} for ${cwd}`);
10368
10486
  if (matches.length > 0) {
10369
- throw new Error(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}; matching choices: ${matches.map((entry) => entry.name).join(", ")}`);
10487
+ throw new WorkspaceConfigError(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}; matching choices: ${matches.map((entry) => entry.name).join(", ")}`);
10370
10488
  }
10371
- throw new Error(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}`);
10489
+ throw new WorkspaceConfigError(`workspace ${JSON.stringify(workspaceName)} does not match ${cwd}`);
10372
10490
  }
10373
10491
  if (matches.length < 2)
10374
10492
  return matches[0];
10375
10493
  const highestSpecificity = Math.max(...matches.map((entry) => globSpecificity(entry.glob)));
10376
10494
  const mostSpecific = matches.filter((entry) => globSpecificity(entry.glob) === highestSpecificity);
10377
10495
  if (mostSpecific.length > 1) {
10378
- throw new Error(`ambiguous workspace for ${cwd}; choose one of: ${mostSpecific.map((entry) => entry.name).join(", ")}`);
10496
+ throw new WorkspaceConfigError(`ambiguous workspace for ${cwd}; choose one of: ${mostSpecific.map((entry) => entry.name).join(", ")}`);
10379
10497
  }
10380
10498
  return mostSpecific[0];
10381
10499
  };
10382
10500
  var resolveWorkspaceFromEntries = (cwd, entries, workspaceName) => {
10383
- const targets = [cwd, realpathOf(cwd)].map((p) => p.replaceAll("\\", "/"));
10384
- const matches = [];
10385
- for (const ws of entries) {
10386
- const glob = ws.glob.replaceAll("\\", "/");
10387
- const canonical = canonicalGlob(glob);
10388
- let matched = false;
10389
- for (const target of targets) {
10390
- if (matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target)) {
10391
- matched = true;
10392
- break;
10393
- }
10394
- }
10395
- if (matched)
10396
- matches.push(ws);
10397
- }
10501
+ const matches = matchingEntries(cwd, entries);
10398
10502
  return selectWorkspaceMatch(matches, cwd, workspaceName) ?? null;
10399
10503
  };
10400
10504
  var resolveWorkspaceFrom = (cwd, dir, workspaceName) => {
10401
10505
  const result = readWorkspacesResult(dir);
10402
10506
  if (result.status === "malformed" || result.status === "invalid")
10403
- throw new Error(result.error);
10507
+ throw new WorkspaceConfigError(result.error);
10404
10508
  return resolveWorkspaceFromEntries(cwd, result.entries, workspaceName);
10405
10509
  };
10406
10510
  var runtimeWorkspacePolicySchema = (kind) => {
@@ -10431,31 +10535,26 @@ var matchRuntimeWorkspace = (cwd) => {
10431
10535
  } catch (error) {
10432
10536
  if (error.code === "ENOENT")
10433
10537
  return null;
10434
- throw new Error(`${file} could not be read: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
10538
+ throw new WorkspaceConfigError(`${file} could not be read: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
10435
10539
  }
10436
10540
  let parsed;
10437
10541
  try {
10438
10542
  parsed = JSON.parse(raw);
10439
10543
  } catch {
10440
- throw new Error(`${file} is not valid JSON`);
10544
+ throw new WorkspaceConfigError(`${file} is not valid JSON`);
10441
10545
  }
10442
10546
  const validated = runtimeWorkspaceIndexSchema.safeParse(parsed);
10443
10547
  if (!validated.success) {
10444
10548
  const detail = validated.error.issues.map((issue) => `${issue.path.map(String).join(".") || "workspaces"}: ${issue.message}`).join("; ");
10445
- throw new Error(`${file} has invalid workspace matching data: ${detail}`);
10549
+ throw new WorkspaceConfigError(`${file} has invalid workspace matching data: ${detail}`);
10446
10550
  }
10447
10551
  const entries = validated.data.workspaces;
10448
10552
  for (const entry of entries ?? []) {
10449
10553
  const glob = validateWorkspaceGlob(entry.glob);
10450
10554
  if (!glob.ok)
10451
- throw new Error(`${file} workspace ${entry.name}: ${glob.error}`);
10555
+ throw new WorkspaceConfigError(`${file} workspace ${entry.name}: ${glob.error}`);
10452
10556
  }
10453
- const targets = [cwd, realpathOf(cwd)].map((value) => value.replaceAll("\\", "/"));
10454
- const matches = (entries ?? []).filter((entry) => {
10455
- const glob = entry.glob.replaceAll("\\", "/");
10456
- const canonical = canonicalGlob(glob);
10457
- return targets.some((target) => matchWorkspace(glob, target) || canonical !== glob && matchWorkspace(canonical, target));
10458
- });
10557
+ const matches = matchingEntries(cwd, entries ?? []);
10459
10558
  const workspaceName = process.env.WORKFLOW_WORKSPACE_NAME?.trim() || undefined;
10460
10559
  const selected = selectWorkspaceMatch(matches, cwd, workspaceName);
10461
10560
  return selected ? { file, selected } : null;
@@ -10472,7 +10571,7 @@ var resolveRuntimeWorkspaceCandidate = (cwd, kind) => {
10472
10571
  const policy = runtimeWorkspacePolicySchema(kind).safeParse(selected);
10473
10572
  if (!policy.success) {
10474
10573
  const detail = policy.error.issues.map((issue) => `${issue.path.map(String).join(".") || "workspace"}: ${issue.message}`).join("; ");
10475
- throw new Error(`${file} has invalid ${kind} policy configuration: ${detail}`);
10574
+ throw new WorkspaceConfigError(`${file} has invalid ${kind} policy configuration: ${detail}`);
10476
10575
  }
10477
10576
  return policy.data;
10478
10577
  };
@@ -10483,10 +10582,10 @@ var resolveRuntimeWorkspacePolicy = (cwd, kind, requestedProfile) => {
10483
10582
  const key = kind === "branch" ? "branchPolicy" : "commitPolicy";
10484
10583
  const profileName = requestedProfile?.trim() || candidate.defaultProfile;
10485
10584
  if (candidate.defaultProfile && !Object.hasOwn(candidate.profiles ?? {}, candidate.defaultProfile))
10486
- throw new Error(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(candidate.defaultProfile)}`);
10585
+ throw new WorkspaceConfigError(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(candidate.defaultProfile)}`);
10487
10586
  const profile = profileName ? candidate.profiles?.[profileName] : undefined;
10488
10587
  if (profileName && !profile)
10489
- throw new Error(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(profileName)}`);
10588
+ throw new WorkspaceConfigError(`workspace ${JSON.stringify(candidate.name)} has no profile ${JSON.stringify(profileName)}`);
10490
10589
  const profilePolicy = profile?.[key];
10491
10590
  const workspacePolicy = candidate[key];
10492
10591
  return {
@@ -11251,7 +11350,7 @@ var packageRoot = () => {
11251
11350
  };
11252
11351
 
11253
11352
  // packages/workit-core/src/core/store-lock.ts
11254
- import { spawnSync as spawnSync4 } from "node:child_process";
11353
+ import { spawnSync as spawnSync6 } from "node:child_process";
11255
11354
  import fs7 from "node:fs";
11256
11355
  import { hostname } from "node:os";
11257
11356
  var metadataLockSchema = object({
@@ -11301,7 +11400,7 @@ var processStartOf = (pid) => {
11301
11400
  }
11302
11401
  if (process.platform === "darwin" || process.platform === "freebsd") {
11303
11402
  try {
11304
- const run = spawnSync4("ps", ["-o", "lstart=", "-p", String(pid)], {
11403
+ const run = spawnSync6("ps", ["-o", "lstart=", "-p", String(pid)], {
11305
11404
  encoding: "utf8",
11306
11405
  timeout: 1000
11307
11406
  });
@@ -13441,11 +13540,11 @@ var workerBlocksTransition = (transition, state) => transition === "pause" ? fal
13441
13540
  // packages/workit-core/src/core/task-evaluation.ts
13442
13541
  import { createHash as createHash8 } from "node:crypto";
13443
13542
  import * as fs11 from "node:fs";
13444
- import { spawnSync as spawnSync6 } from "node:child_process";
13543
+ import { spawnSync as spawnSync8 } from "node:child_process";
13445
13544
  import path14 from "node:path";
13446
13545
 
13447
13546
  // packages/workit-core/src/check-config.ts
13448
- import { spawnSync as spawnSync5 } from "node:child_process";
13547
+ import { spawnSync as spawnSync7 } from "node:child_process";
13449
13548
  import fs10 from "node:fs";
13450
13549
  import path13 from "node:path";
13451
13550
  var SCRIPT_CHECKS = ["test", "lint", "typecheck", "check"];
@@ -13489,7 +13588,7 @@ function splitCommand(command) {
13489
13588
  return argv.length ? argv : new Error("empty command");
13490
13589
  }
13491
13590
  var git3 = (cwd, args) => {
13492
- const run = spawnSync5("git", args, {
13591
+ const run = spawnSync7("git", args, {
13493
13592
  cwd,
13494
13593
  encoding: "utf8",
13495
13594
  timeout: 20000,
@@ -13694,7 +13793,7 @@ var compareCodeUnits3 = (left, right) => {
13694
13793
  return left.length - right.length;
13695
13794
  };
13696
13795
  var gitPaths = (root) => {
13697
- const result = spawnSync6("git", ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], {
13796
+ const result = spawnSync8("git", ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], {
13698
13797
  cwd: root,
13699
13798
  encoding: "buffer"
13700
13799
  });
@@ -13707,7 +13806,7 @@ var gitPaths = (root) => {
13707
13806
  };
13708
13807
  }
13709
13808
  const paths = result.stdout ? result.stdout.toString("utf8").split("\x00").filter(Boolean).map((item) => item.split(path14.sep).join("/")) : [];
13710
- const stagedDeleted = spawnSync6("git", ["diff", "--cached", "--name-only", "--diff-filter=D", "-z"], { cwd: root, encoding: "buffer" });
13809
+ const stagedDeleted = spawnSync8("git", ["diff", "--cached", "--name-only", "--diff-filter=D", "-z"], { cwd: root, encoding: "buffer" });
13711
13810
  if (stagedDeleted.status !== 0) {
13712
13811
  const stderr = stagedDeleted.stderr?.toString("utf8") ?? "";
13713
13812
  if (!/not a git repository/i.test(stderr))
@@ -13838,7 +13937,7 @@ function captureCandidate(root, scope, environment = []) {
13838
13937
  const values = supplied.toSorted((left, right) => compareCodeUnits3(left.name, right.name)).map(({ name, value }) => ({ name, value, refs: [] }));
13839
13938
  if (values.some(({ value }) => value === null))
13840
13939
  completeness = "uncertain";
13841
- const headResult = spawnSync6("git", ["rev-parse", "HEAD"], { cwd: checkout, encoding: "utf8" });
13940
+ const headResult = spawnSync8("git", ["rev-parse", "HEAD"], { cwd: checkout, encoding: "utf8" });
13842
13941
  if (headResult.status !== 0 && !/not a git repository/i.test(headResult.stderr ?? ""))
13843
13942
  completeness = "uncertain";
13844
13943
  const head = headResult.status === 0 ? headResult.stdout.trim() : null;
@@ -16466,7 +16565,7 @@ function effectiveWorkspacePolicy(workspaceRoot, kind, profileName) {
16466
16565
  const selected = resolveRuntimeWorkspacePolicy(workspaceRoot, kind, profileName?.trim() || process.env.WORKFLOW_PROFILE?.trim() || undefined);
16467
16566
  const config = readConfig();
16468
16567
  return kind === "branch" ? {
16469
- branchPolicy: withReleaseTracks(workspaceRoot, resolveBranchPolicy(config, selected.policy ? { branchPolicy: selected.policy } : null)),
16568
+ branchPolicy: withReleaseTracks(workspaceRoot, resolveBranchPolicy(config, selected.policy ? { branchPolicy: selected.policy } : null, () => repoBranchPreset(workspaceRoot))),
16470
16569
  provenance: { branchPolicy: selected.source }
16471
16570
  } : {
16472
16571
  commitPolicy: resolveCommitPolicy(config, selected.policy ? { commitPolicy: selected.policy } : null),
@@ -16663,11 +16762,11 @@ var segmentsOf = (command) => {
16663
16762
  flushSegment();
16664
16763
  return segments;
16665
16764
  };
16666
- var PREFIXES = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
16765
+ var PREFIXES2 = new Set(["sudo", "command", "env", "nohup", "time", "exec", "xargs"]);
16667
16766
  var operands = (words) => words.filter((item) => !item.startsWith("-"));
16668
16767
  var editsOf = (input) => {
16669
16768
  let words = input;
16670
- while (words.length && (PREFIXES.has(words[0]) || /^\w+=/.test(words[0])))
16769
+ while (words.length && (PREFIXES2.has(words[0]) || /^\w+=/.test(words[0])))
16671
16770
  words = words.slice(1);
16672
16771
  const [verb, ...args] = words;
16673
16772
  const name = (verb?.split(/[\\/]/).at(-1) ?? "").toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cursor",
3
- "version": "8.0.1",
3
+ "version": "8.1.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.1",
48
- "@brainervirus/workit-mcp": "^8.0.1"
47
+ "@brainervirus/workit-core": "^8.1.1",
48
+ "@brainervirus/workit-mcp": "^8.1.1"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=24"