@brainervirus/workit-claude-code 8.1.1 → 8.2.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "workit",
3
3
  "displayName": "Workit",
4
- "version": "8.1.1",
4
+ "version": "8.2.0",
5
5
  "description": "Workflow rails for agentic coding: task context on every session, branch policy on shell commands, and the workit method skills",
6
6
  "author": {
7
7
  "name": "BrainerVirus"
package/dist/workit.js CHANGED
@@ -65,7 +65,7 @@ var package_default;
65
65
  var init_package = __esm(() => {
66
66
  package_default = {
67
67
  name: "@brainervirus/workit-cli",
68
- version: "8.1.1",
68
+ version: "8.2.0",
69
69
  private: false,
70
70
  description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
71
71
  keywords: [
@@ -103,9 +103,9 @@ var init_package = __esm(() => {
103
103
  },
104
104
  dependencies: {
105
105
  "@babel/parser": "7.29.9",
106
- "@brainervirus/workit-core": "^8.1.1",
107
- "@brainervirus/workit-cursor": "^8.1.1",
108
- "@brainervirus/workit-opencode": "^8.1.1",
106
+ "@brainervirus/workit-core": "^8.2.0",
107
+ "@brainervirus/workit-cursor": "^8.2.0",
108
+ "@brainervirus/workit-opencode": "^8.2.0",
109
109
  "@inkjs/ui": "2.0.0",
110
110
  ink: "7.1.1",
111
111
  react: "19.2.8"
@@ -63420,9 +63420,8 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
63420
63420
  return [
63421
63421
  ...new Set(entries.filter((entry) => typeof entry === "string" && isWorkitPlugin(entry)))
63422
63422
  ];
63423
- }, commandOnPath = (name, env) => {
63423
+ }, commandOnPath = (name, env) => findOnPath(process.platform === "win32" ? [name, `${name}.exe`] : [name], env) !== null, pathextNames = (name, env) => process.platform === "win32" ? (env.PATHEXT ?? process.env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean).map((ext) => `${name}${ext.toLowerCase()}`) : [name], findOnPath = (names, env) => {
63424
63424
  const dirs = (env.PATH ?? process.env.PATH ?? "").split(path29.delimiter);
63425
- const names = process.platform === "win32" ? [name, `${name}.exe`] : [name];
63426
63425
  for (const dir of dirs) {
63427
63426
  if (!dir)
63428
63427
  continue;
@@ -63432,11 +63431,11 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
63432
63431
  const st = statSync4(candidate);
63433
63432
  if (process.platform !== "win32" && (st.mode & 73) === 0)
63434
63433
  continue;
63435
- return true;
63434
+ return candidate;
63436
63435
  } catch {}
63437
63436
  }
63438
63437
  }
63439
- return false;
63438
+ return null;
63440
63439
  }, versionOf = (bin, env, timeout) => {
63441
63440
  const r = spawnSync13(bin, ["--version"], { encoding: "utf8", env, timeout });
63442
63441
  if (r.error)
@@ -64530,6 +64529,67 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
64530
64529
  fix: repair,
64531
64530
  registryProbed
64532
64531
  };
64532
+ }, CLI_PACKAGE = "@brainervirus/workit-cli", SEMVER, WORKIT_PROBE_TIMEOUT_MS = 1e4, workitVersions, workitVersionAt = (bin, env) => {
64533
+ let key;
64534
+ try {
64535
+ const st = statSync4(bin);
64536
+ key = `${bin}:${st.ino}:${st.size}:${st.mtimeMs}`;
64537
+ } catch {
64538
+ return { version: null, timedOut: false };
64539
+ }
64540
+ const cached = workitVersions.get(key);
64541
+ if (cached)
64542
+ return cached;
64543
+ const viaShell = process.platform === "win32" && /\.(?:cmd|bat)$/i.test(bin);
64544
+ const r = viaShell ? spawnSync13(`"${bin}" --version`, {
64545
+ encoding: "utf8",
64546
+ env,
64547
+ timeout: WORKIT_PROBE_TIMEOUT_MS,
64548
+ shell: true
64549
+ }) : spawnSync13(bin, ["--version"], { encoding: "utf8", env, timeout: WORKIT_PROBE_TIMEOUT_MS });
64550
+ const timedOut = r.error !== undefined && "code" in r.error && r.error.code === "ETIMEDOUT";
64551
+ const version = r.status === 0 ? (r.stdout ?? "").match(SEMVER)?.[0] ?? null : null;
64552
+ const probe = { version: timedOut ? null : version, timedOut };
64553
+ workitVersions.set(key, probe);
64554
+ return probe;
64555
+ }, checkWorkitOnPath = (res) => {
64556
+ const plugins = [
64557
+ ...claudeWorkitInstalls(res.home, res.env, res.cwd).map((i) => ({
64558
+ label: `Claude Code plugin ${i.id}`,
64559
+ version: i.version
64560
+ })),
64561
+ { label: "Cursor plugin", version: installedPluginVersion(res) },
64562
+ { label: "OpenCode plugin", version: installedOpenCodeCacheVersion(res) }
64563
+ ].filter((p) => p.version !== null);
64564
+ const newest = plugins.reduce((best, p) => best && semverAtLeast(best.version, p.version) ? best : p, null);
64565
+ const target = newest?.version ?? "latest";
64566
+ const fix = `npm i -g ${CLI_PACKAGE}@${target} (or run it without a global install: npx -y ${CLI_PACKAGE}@${target} <command>)`;
64567
+ const bin = findOnPath(pathextNames("workit", res.env), res.env);
64568
+ if (!bin) {
64569
+ return { id: "workit_on_path", status: "warn", detail: "no workit on PATH", fix };
64570
+ }
64571
+ const { version, timedOut } = workitVersionAt(bin, res.env);
64572
+ if (!version) {
64573
+ return {
64574
+ id: "workit_on_path",
64575
+ status: "warn",
64576
+ detail: timedOut ? `${bin} does not run (\`workit --version\` timed out after ${WORKIT_PROBE_TIMEOUT_MS / 1000}s)` : `${bin} does not run (\`workit --version\` failed)`,
64577
+ fix
64578
+ };
64579
+ }
64580
+ if (newest && versionBehind(version, newest.version)) {
64581
+ return {
64582
+ id: "workit_on_path",
64583
+ status: "warn",
64584
+ detail: `workit ${version} at ${bin} is older than the ${newest.label} ${newest.version}`,
64585
+ fix
64586
+ };
64587
+ }
64588
+ return {
64589
+ id: "workit_on_path",
64590
+ status: "pass",
64591
+ detail: `workit ${version} at ${bin}${newest ? ` (newest host plugin ${newest.version})` : ""}`
64592
+ };
64533
64593
  }, RUN_CHECKS, INSTALLER_REQUIRED, runDoctor = (options = {}) => {
64534
64594
  const res = resolve(options);
64535
64595
  const raw = RUN_CHECKS.map((fn) => fn(res));
@@ -64577,12 +64637,15 @@ var init_doctor = __esm(() => {
64577
64637
  init_skill_manifests();
64578
64638
  OPENCODE_V1_FIX = `OpenCode < ${SUPPORT_MATRIX.opencode.minimum} cannot load Workit 3 (V2 plugin API only): upgrade OpenCode to ${SUPPORT_MATRIX.opencode.minimum}+, or stay on Workit 2.x by pinning "@brainervirus/workit-opencode@2" in the opencode.json "plugin" array`;
64579
64639
  canonicalCursorHook = cursorHooksEntry("").command;
64640
+ SEMVER = /\d+\.\d+\.\d+/;
64641
+ workitVersions = new Map;
64580
64642
  RUN_CHECKS = [
64581
64643
  checkRuntime,
64582
64644
  checkVersions,
64583
64645
  checkCodexPin,
64584
64646
  checkOpencodeVersion,
64585
64647
  checkClaudePlugin,
64648
+ checkWorkitOnPath,
64586
64649
  checkAssets,
64587
64650
  checkLauncher,
64588
64651
  checkUtility,
@@ -74736,7 +74799,7 @@ function parsePackageSpec(spec) {
74736
74799
  const version = at > 0 ? value.slice(at + 1) : null;
74737
74800
  if (!name || name.length > 214 || !NPM_NAME.test(name))
74738
74801
  return null;
74739
- if (version !== null && !SEMVER.test(version))
74802
+ if (version !== null && !SEMVER2.test(version))
74740
74803
  return null;
74741
74804
  return { name, version };
74742
74805
  }
@@ -74771,7 +74834,7 @@ function verifyReleased(cwd, input, npm = systemNpm) {
74771
74834
  const version = spec.version ?? (input.tag ? input.tag.replace(/^v(?=\d)/u, "") : null);
74772
74835
  if (!version)
74773
74836
  return failure3("invalid_input", "--package needs a version (<name>@<version>) or --tag");
74774
- if (!SEMVER.test(version))
74837
+ if (!SEMVER2.test(version))
74775
74838
  return failure3("invalid_input", `${version} (from --tag) is not a semver version; pass <name>@<version>`);
74776
74839
  const viewed = npm(["view", `${spec.name}@${version}`, "version", "gitHead", "--json"]);
74777
74840
  if (viewed.status !== 0 && !/E404|404 Not Found|is not in this registry|No match found/iu.test(viewed.stderr))
@@ -74805,7 +74868,7 @@ function verifyReleased(cwd, input, npm = systemNpm) {
74805
74868
  observations
74806
74869
  }, input.actor));
74807
74870
  }
74808
- var NPM_NAME, SEMVER, SAFE_ARG, systemNpm = (args) => {
74871
+ var NPM_NAME, SEMVER2, SAFE_ARG, systemNpm = (args) => {
74809
74872
  if (!args.every((arg) => SAFE_ARG.test(arg)))
74810
74873
  return { status: 2, stdout: "", stderr: "refused: unsafe npm argument" };
74811
74874
  const options = {
@@ -74836,7 +74899,7 @@ var init_verify = __esm(() => {
74836
74899
  init_report();
74837
74900
  init_redact();
74838
74901
  NPM_NAME = /^(?:@[A-Za-z0-9~][A-Za-z0-9-._~]*\/)?[A-Za-z0-9~][A-Za-z0-9-._~]*$/u;
74839
- SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u;
74902
+ SEMVER2 = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u;
74840
74903
  SAFE_ARG = /^[0-9A-Za-z@/._~+-]+$/u;
74841
74904
  });
74842
74905
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-claude-code",
3
- "version": "8.1.1",
3
+ "version": "8.2.0",
4
4
  "private": false,
5
5
  "description": "Workit Claude Code plugin — session and per-turn task context, branch policy on git shell commands, workit method skills, and verifier/reviewer/implementer agents",
6
6
  "keywords": [
@@ -39,8 +39,8 @@
39
39
  "build": "bun scripts/build.ts"
40
40
  },
41
41
  "devDependencies": {
42
- "@brainervirus/workit-cli": "^8.1.1",
43
- "@brainervirus/workit-core": "^8.1.1"
42
+ "@brainervirus/workit-cli": "^8.2.0",
43
+ "@brainervirus/workit-core": "^8.2.0"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=24"