@brainervirus/workit-cli 8.17.0 → 8.17.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.
Files changed (2) hide show
  1. package/dist/index.js +50 -4
  2. package/package.json +3 -3
package/dist/index.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.17.0",
68
+ version: "8.17.1",
69
69
  private: false,
70
70
  description: "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
71
71
  keywords: [
@@ -103,13 +103,13 @@ var init_package = __esm(() => {
103
103
  },
104
104
  dependencies: {
105
105
  "@babel/parser": "7.29.9",
106
- "@brainervirus/workit-cursor": "^8.17.0",
106
+ "@brainervirus/workit-cursor": "^8.17.1",
107
107
  "@inkjs/ui": "2.0.0",
108
108
  ink: "7.1.1",
109
109
  react: "19.2.8"
110
110
  },
111
111
  devDependencies: {
112
- "@brainervirus/workit-core": "^8.17.0"
112
+ "@brainervirus/workit-core": "^8.17.1"
113
113
  },
114
114
  engines: {
115
115
  node: ">=24"
@@ -66257,6 +66257,7 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
66257
66257
  cursorMcp: options.cursorMcp ?? path34.join(home, ".cursor", "mcp.json"),
66258
66258
  cursorPluginDir: options.cursorPluginDir ?? path34.join(home, ".cursor", "plugins", "local", "workit"),
66259
66259
  cursorHeartbeatDir: options.stateDir ?? (env.WORKFLOW_TOOLKIT_STATE || resolveStateDir()),
66260
+ hookStateDir: options.stateDir ?? (env.WORKFLOW_TOOLKIT_STATE || resolveStateDir()),
66260
66261
  codexHome: options.codexHome,
66261
66262
  piAgentDir: options.piAgentDir,
66262
66263
  env,
@@ -67951,6 +67952,49 @@ var TOKEN_PLACEHOLDER2 = "YOUR_TOKEN_HERE", findDevFromCwd = (cwd) => {
67951
67952
  detail: `heavy-check scopes do not apply their limits: ${probe.reason}${delegate}`,
67952
67953
  fix: SCOPE_DELEGATE_FIX
67953
67954
  };
67955
+ }, DAY_MS, HOOK_SKIPS_FILE = "hook-skips.jsonl", countHookSkips = (stateDir, since) => {
67956
+ const counts = { skip: 0, late: 0 };
67957
+ let text = "";
67958
+ try {
67959
+ text = readFileSync14(path34.join(stateDir, HOOK_SKIPS_FILE), "utf8");
67960
+ } catch {
67961
+ return counts;
67962
+ }
67963
+ for (const line of text.split(`
67964
+ `)) {
67965
+ try {
67966
+ const row = JSON.parse(line);
67967
+ if (!(Date.parse(String(row.at)) >= since))
67968
+ continue;
67969
+ if (row.outcome === "skip")
67970
+ counts.skip += 1;
67971
+ else if (row.outcome === "late")
67972
+ counts.late += 1;
67973
+ } catch {}
67974
+ }
67975
+ return counts;
67976
+ }, checkHookDeadline = (res) => {
67977
+ const file = path34.join(res.hookStateDir, HOOK_SKIPS_FILE);
67978
+ const { skip, late } = countHookSkips(res.hookStateDir, Date.now() - DAY_MS);
67979
+ const lateText = late > 0 ? `; ${late} answered past it in full` : "";
67980
+ if (skip > 0)
67981
+ return {
67982
+ id: "hook_deadline",
67983
+ status: "warn",
67984
+ detail: `${skip} hook${skip === 1 ? "" : "s"} skipped past the hook deadline in the last day (host under load: Workit context, gates and nudges were not applied)${lateText} (${file})`,
67985
+ fix: "Lower the machine load: run heavy commands through `workit check` (the lease serializes them) and fewer parallel agents; WORKIT_HOOK_DEADLINE_MS raises the deadline"
67986
+ };
67987
+ if (late > 0)
67988
+ return {
67989
+ id: "hook_deadline",
67990
+ status: "info",
67991
+ detail: `no hook skipped in the last day${lateText} (${file})`
67992
+ };
67993
+ return {
67994
+ id: "hook_deadline",
67995
+ status: "pass",
67996
+ detail: "no hook passed its deadline in the last day"
67997
+ };
67954
67998
  }, CLAUDE_PLUGIN_PACKAGE = "@brainervirus/workit-claude-code", versionBehind = (version, latest) => version !== latest && semverAtLeast(latest, version), checkClaudePlugin = (res) => {
67955
67999
  const installs = claudeWorkitInstalls(res.home, res.env, res.cwd);
67956
68000
  if (installs.length === 0)
@@ -68148,6 +68192,7 @@ var init_doctor = __esm(() => {
68148
68192
  AGENT_MARKER_VERSION = /^# Generated by Workit (\d+\.\d+\.\d+)\b/;
68149
68193
  canonicalCursorHook = cursorHooksEntry().command;
68150
68194
  SILENT_HOOK_GRACE_MS = 2 * 60000;
68195
+ DAY_MS = 24 * 60 * 60 * 1000;
68151
68196
  SEMVER = /\d+\.\d+\.\d+/;
68152
68197
  workitVersions = new Map;
68153
68198
  RUN_CHECKS = [
@@ -68176,7 +68221,8 @@ var init_doctor = __esm(() => {
68176
68221
  checkGithubIdentity,
68177
68222
  checkGitLabIdentity,
68178
68223
  checkLogWritable,
68179
- checkHeavyScope
68224
+ checkHeavyScope,
68225
+ checkHookDeadline
68180
68226
  ];
68181
68227
  INSTALLER_REQUIRED = new Set([
68182
68228
  "runtime",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cli",
3
- "version": "8.17.0",
3
+ "version": "8.17.1",
4
4
  "private": false,
5
5
  "description": "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
6
6
  "keywords": [
@@ -38,13 +38,13 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@babel/parser": "7.29.9",
41
- "@brainervirus/workit-cursor": "^8.17.0",
41
+ "@brainervirus/workit-cursor": "^8.17.1",
42
42
  "@inkjs/ui": "2.0.0",
43
43
  "ink": "7.1.1",
44
44
  "react": "19.2.8"
45
45
  },
46
46
  "devDependencies": {
47
- "@brainervirus/workit-core": "^8.17.0"
47
+ "@brainervirus/workit-core": "^8.17.1"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=24"