@brainervirus/workit-claude-code 8.37.1 → 8.37.3

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.
package/dist/workit.js CHANGED
@@ -9317,7 +9317,7 @@ var package_default;
9317
9317
  var init_package = __esm(() => {
9318
9318
  package_default = {
9319
9319
  name: "@brainervirus/workit-cli",
9320
- version: "8.37.1",
9320
+ version: "8.37.3",
9321
9321
  private: false,
9322
9322
  description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
9323
9323
  keywords: [
@@ -9355,13 +9355,13 @@ var init_package = __esm(() => {
9355
9355
  },
9356
9356
  dependencies: {
9357
9357
  "@babel/parser": "7.29.9",
9358
- "@brainervirus/workit-cursor": "^8.37.1",
9358
+ "@brainervirus/workit-cursor": "^8.37.3",
9359
9359
  "@inkjs/ui": "2.0.0",
9360
9360
  ink: "7.1.1",
9361
9361
  react: "19.2.8"
9362
9362
  },
9363
9363
  devDependencies: {
9364
- "@brainervirus/workit-core": "^8.37.1"
9364
+ "@brainervirus/workit-core": "^8.37.3"
9365
9365
  },
9366
9366
  engines: {
9367
9367
  node: ">=24"
@@ -14715,19 +14715,11 @@ function appendLine(file, build, options) {
14715
14715
  try {
14716
14716
  if (process.platform !== "win32")
14717
14717
  tighten(fd);
14718
- const size = fs13.fstatSync(fd).size;
14719
- let fence = "";
14720
- if (size > 0) {
14721
- const last = Buffer.alloc(1);
14722
- fs13.readSync(fd, last, 0, 1, size - 1);
14723
- if (last[0] !== 10)
14724
- fence = `
14725
- `;
14726
- }
14727
- const line = build(lastLine(fd, size));
14718
+ const line = build(lastLine(fd, fs13.fstatSync(fd).size));
14728
14719
  if (!line.ok)
14729
14720
  return line;
14730
- const bytes = Buffer.from(fence + line.value);
14721
+ const bytes = Buffer.from(`
14722
+ ${line.value}`);
14731
14723
  const written = fs13.writeSync(fd, bytes);
14732
14724
  if (written !== bytes.length)
14733
14725
  return err("unavailable", `short write to ${file}: ${written} of ${bytes.length} bytes; the row is torn and will be skipped`);
@@ -65412,18 +65404,29 @@ function isWorkitPlugin(value) {
65412
65404
  const pkgPath = /\/(?:packages\/workit-(?:opencode|cursor)|node_modules\/@brainervirus\/workit-(?:opencode|cursor))(?:\/|$)/.test(s);
65413
65405
  return named(s, "workflow-toolkit") || named(s, "workflow-toolkit-opencode") || named(s, "local/workflow-toolkit") || named(s, "workit") || named(s, "local/workit") || named(s, "@brainervirus/workit-opencode") || named(s, "@brainervirus/workit-cursor") || url && pkgPath || s.startsWith("git+file://") && s.includes("workflow-toolkit");
65414
65406
  }
65415
- function mergeOpenCodePlugins(plugin, pin) {
65416
- const existing = Array.isArray(plugin) ? plugin : typeof plugin === "string" ? [plugin] : [];
65407
+ function mergeOpenCodePlugins(plugins, pin) {
65408
+ const existing = Array.isArray(plugins) ? plugins : typeof plugins === "string" ? [plugins] : [];
65417
65409
  const config = [pin, ...existing.filter((p) => !isWorkitPlugin(p))];
65418
- const changed = JSON.stringify(config) !== JSON.stringify(existing) ? ["plugin"] : [];
65410
+ const changed = JSON.stringify(config) !== JSON.stringify(existing) ? ["plugins"] : [];
65419
65411
  return { config, changed };
65420
65412
  }
65421
65413
  function mergeOpenCodeConfig(config, pin) {
65422
65414
  const base = isRecord4(config) ? { ...config } : {};
65423
65415
  const changed = [];
65424
- const plugins = mergeOpenCodePlugins(base.plugin, pin);
65425
- if (plugins.changed.length > 0) {
65426
- base.plugin = plugins.config;
65416
+ const plugins = mergeOpenCodePlugins(base.plugins, pin);
65417
+ const hadLegacy = base.plugin !== undefined;
65418
+ const legacy = Array.isArray(base.plugin) ? base.plugin : typeof base.plugin === "string" ? [base.plugin] : [];
65419
+ const legacyRest = legacy.filter((p) => !isWorkitPlugin(p));
65420
+ const legacyMoved = legacyRest.length !== legacy.length;
65421
+ if (plugins.changed.length > 0 || legacyMoved) {
65422
+ base.plugins = plugins.config;
65423
+ changed.push("plugins");
65424
+ }
65425
+ if (legacyMoved) {
65426
+ if (legacyRest.length > 0)
65427
+ base.plugin = legacyRest;
65428
+ else if (hadLegacy)
65429
+ delete base.plugin;
65427
65430
  changed.push("plugin");
65428
65431
  }
65429
65432
  return { config: base, changed };
@@ -68425,6 +68428,14 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
68425
68428
  fix: "Run `workit init` (or restore the checkout and re-run install-opencode-plugin.sh)"
68426
68429
  };
68427
68430
  }
68431
+ if (pluginEntries({ plugins: cfg?.plugins }).length === 0) {
68432
+ return {
68433
+ id: "stale_pin",
68434
+ status: "warn",
68435
+ detail: `workit is registered under the deprecated "plugin" key; move it to "plugins" (${entries[0]})`,
68436
+ fix: "workit setup --hosts=opencode"
68437
+ };
68438
+ }
68428
68439
  return { id: "stale_pin", status: "pass", detail: "opencode pin resolves" };
68429
68440
  }, pluginMcpSelectors = (res) => {
68430
68441
  const p = path39.join(res.cursorPluginDir, "mcp.json");
@@ -69685,7 +69696,7 @@ var init_doctor = __esm(() => {
69685
69696
  init_session_hook();
69686
69697
  init_hook_runs();
69687
69698
  init_host_permissions();
69688
- 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`;
69699
+ OPENCODE_V1_FIX = `OpenCode < ${SUPPORT_MATRIX.opencode.minimum} cannot load Workit (V2 plugin API only): upgrade OpenCode to ${SUPPORT_MATRIX.opencode.minimum}+`;
69689
69700
  AGENT_MARKER_VERSION = /^# Generated by Workit (\d+\.\d+\.\d+)\b/;
69690
69701
  canonicalCursorHook = cursorHooksEntry().command;
69691
69702
  SILENT_HOOK_GRACE_MS = 2 * 60000;
@@ -70170,17 +70181,13 @@ function applyOpenCode(root, res) {
70170
70181
  detail: `cannot merge into malformed config: ${existing.error} — repair or remove the file`
70171
70182
  };
70172
70183
  }
70173
- const configuredPlugins = existing.kind === "record" ? Array.isArray(existing.value.plugins) ? existing.value.plugins : typeof existing.value.plugins === "string" ? [existing.value.plugins] : typeof existing.value.plugin === "string" ? [existing.value.plugin] : Array.isArray(existing.value.plugin) ? existing.value.plugin : [] : [];
70184
+ const listOf = (value) => Array.isArray(value) ? value : typeof value === "string" ? [value] : [];
70185
+ const configuredPlugins = existing.kind === "record" ? [...listOf(existing.value.plugins), ...listOf(existing.value.plugin)] : [];
70174
70186
  const configuredPin = configuredPlugins.find((entry) => typeof entry === "string" && isWorkitPlugin(entry));
70175
70187
  const pin = configuredPin ?? resolvedPin;
70176
70188
  const base = existing.kind === "record" ? existing.value : {};
70177
- const merged = existing.kind === "record" && Object.hasOwn(existing.value, "plugins") ? (() => {
70178
- const plugins = mergeOpenCodePlugins(existing.value.plugins, pin);
70179
- return {
70180
- config: { ...existing.value, plugins: plugins.config },
70181
- changed: plugins.changed.length > 0 ? ["plugins"] : []
70182
- };
70183
- })() : mergeOpenCodeConfig(base, pin);
70189
+ const merged = mergeOpenCodeConfig(base, pin);
70190
+ const moved = merged.changed.includes("plugin");
70184
70191
  if (merged.changed.length === 0) {
70185
70192
  return {
70186
70193
  platform: "opencode",
@@ -70195,7 +70202,7 @@ function applyOpenCode(root, res) {
70195
70202
  platform: "opencode",
70196
70203
  file: res.opencodeConfig,
70197
70204
  status: "Configured",
70198
- detail: `pinned ${pin}`
70205
+ detail: moved ? `pinned ${pin}; moved the Workit entry from the deprecated "plugin" key to "plugins"` : `pinned ${pin}`
70199
70206
  } : {
70200
70207
  platform: "opencode",
70201
70208
  file: res.opencodeConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-claude-code",
3
- "version": "8.37.1",
3
+ "version": "8.37.3",
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.37.1",
43
- "@brainervirus/workit-core": "^8.37.1"
42
+ "@brainervirus/workit-cli": "^8.37.3",
43
+ "@brainervirus/workit-core": "^8.37.3"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=24"