@brainervirus/workit-cli 8.35.2 → 8.37.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.
Files changed (2) hide show
  1. package/dist/index.js +23 -9
  2. package/package.json +3 -3
package/dist/index.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.35.2",
9320
+ version: "8.37.0",
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.35.2",
9358
+ "@brainervirus/workit-cursor": "^8.37.0",
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.35.2"
9364
+ "@brainervirus/workit-core": "^8.37.0"
9365
9365
  },
9366
9366
  engines: {
9367
9367
  node: ">=24"
@@ -77639,6 +77639,7 @@ var exports_check = {};
77639
77639
  __export(exports_check, {
77640
77640
  OUTPUT_LINES: () => OUTPUT_LINES,
77641
77641
  boundedOutput: () => boundedOutput,
77642
+ countWarnings: () => countWarnings,
77642
77643
  hostToolWaitCapMs: () => hostToolWaitCapMs,
77643
77644
  run: () => run12,
77644
77645
  workspaceResources: () => workspaceResources
@@ -77823,6 +77824,10 @@ function boundedArgv(argv) {
77823
77824
  const truncated = cut.length !== argv.length || cut.some((item, index) => item !== argv[index]);
77824
77825
  return { argv: cut, truncated };
77825
77826
  }
77827
+ function countWarnings(log) {
77828
+ return redactLog(log).replace(ANSI_COLOR, "").split(`
77829
+ `).filter((line) => WARNING_LINE.test(line) && !NO_WARNINGS.test(line)).length;
77830
+ }
77826
77831
  function boundedOutput(log, lines) {
77827
77832
  const all = tailLines(log, Number.MAX_SAFE_INTEGER);
77828
77833
  if (all.length === 0)
@@ -78079,6 +78084,7 @@ async function run12(argv, io) {
78079
78084
  };
78080
78085
  const storeDir = io.env.WORKFLOW_WORKSPACE_ROOT || top;
78081
78086
  const task = await recordInTask(io, storeDir, options.task, observation, unblockFor);
78087
+ const warnings = countWarnings(result.log);
78082
78088
  const data = {
78083
78089
  evidenceId: task.evidenceId,
78084
78090
  ledgerRowId: observation.ledgerRowId,
@@ -78099,6 +78105,7 @@ async function run12(argv, io) {
78099
78105
  logPath,
78100
78106
  logTail: tail,
78101
78107
  outputBytes: result.outputBytes,
78108
+ warnings,
78102
78109
  logTruncated: result.truncated,
78103
78110
  task: task.task,
78104
78111
  lease: heavy?.leaseReport ?? null,
@@ -78113,7 +78120,7 @@ async function run12(argv, io) {
78113
78120
  const code = !passed ? "failed" : recordError ? recordError.code : "ok";
78114
78121
  const error = !passed ? result.timedOut ? `timed out after ${options.timeoutMs} ms` : result.spawnError ? `cannot start ${command[0]}: ${result.spawnError}` : `exited ${result.exitCode}` : recordError?.message;
78115
78122
  const label = name ?? command.join(" ");
78116
- const summary = `workit check ${label}: ${passed ? "passed, exit 0" : error ?? "failed"} in ${result.durationMs} ms (${configured ? "configured" : "ad-hoc"}${name && !configured && config.checks.some((item) => item.name === name) ? `; not the configured command for "${name}"` : ""}); ${task.evidenceId ? `evidence ${task.evidenceId} on task ${task.task?.id}` : task.note ?? (task.error ? `task: ${task.error.message}` : "ledger only")}; log: ${logPath ?? "not stored"}`;
78123
+ const summary = `workit check ${label}: ${passed ? "passed, exit 0" : error ?? "failed"} in ${result.durationMs} ms (${configured ? "configured" : "ad-hoc"}${warnings ? `; warnings: ${warnings}` : ""}${name && !configured && config.checks.some((item) => item.name === name) ? `; not the configured command for "${name}"` : ""}); ${task.evidenceId ? `evidence ${task.evidenceId} on task ${task.task?.id}` : task.note ?? (task.error ? `task: ${task.error.message}` : "ledger only")}; log: ${logPath ?? "not stored"}`;
78117
78124
  if (io.json)
78118
78125
  io.stdout(`${JSON.stringify({ ok: code === "ok", code, data, ...error ? { error } : {}, ...task.stillUnsatisfied[0] ? { unblock: task.stillUnsatisfied[0].unblock } : {} })}
78119
78126
  `);
@@ -78136,7 +78143,7 @@ async function run12(argv, io) {
78136
78143
  return recordError.code === "busy" ? 4 : recordError.code === "invalid_input" ? 2 : 5;
78137
78144
  return 0;
78138
78145
  }
78139
- var USAGE5 = 'workit check <name> [--full] [--no-lease --reason "<why>"] | workit check [--name <n>] [--shell] [--heavy] [--full] [--wait <s>] [--timeout <s>] [--task <id>] [--json] -- <cmd…>', OUTPUT_LINES = 60, MAX_UNVERIFIED_RUN_MS, RECORD_TAIL_LINES = 20, RECORD_TAIL_CHARS = 200, posix = (value) => value.split(path50.sep).join("/") || ".", ENGINE_CODES2, FINGERPRINT_VARS, HOST_TOOL_WAIT_CAP_MS = 1e5;
78146
+ var USAGE5 = 'workit check <name> [--full] [--no-lease --reason "<why>"] | workit check [--name <n>] [--shell] [--heavy] [--full] [--wait <s>] [--timeout <s>] [--task <id>] [--json] -- <cmd…>', OUTPUT_LINES = 60, MAX_UNVERIFIED_RUN_MS, RECORD_TAIL_LINES = 20, RECORD_TAIL_CHARS = 200, posix = (value) => value.split(path50.sep).join("/") || ".", ENGINE_CODES2, FINGERPRINT_VARS, ANSI_COLOR, WARNING_LINE, NO_WARNINGS, HOST_TOOL_WAIT_CAP_MS = 1e5;
78140
78147
  var init_check = __esm(() => {
78141
78148
  init_check_config();
78142
78149
  init_checks3();
@@ -78154,6 +78161,9 @@ var init_check = __esm(() => {
78154
78161
  permission_denied: "blocked"
78155
78162
  };
78156
78163
  FINGERPRINT_VARS = ["CI", "NODE_ENV", "npm_config_script_shell", "NODE_OPTIONS", "SHELL"];
78164
+ ANSI_COLOR = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*m`, "g");
78165
+ WARNING_LINE = /^\s*(?:⚠|\[(?:WARN|WARNING|warn|warning)\]|(?:npm\s+)?(?:WARN\s|warn\s)|warn(?:ing)?(?:\[[^\]]*\])?:|\d+:\d+\s+warning\s|\S+\(\d+,\d+\):\s*warning\s|\S+:\d+:\d+:\s*warning\b)/;
78166
+ NO_WARNINGS = /\b(?:no|0|zero|none)\s+warnings?\b/i;
78157
78167
  });
78158
78168
 
78159
78169
  // packages/workit-cli/src/verbs/lock.ts
@@ -87867,7 +87877,7 @@ function renderBrief(cwd, plan, input) {
87867
87877
  ...verifier ? [
87868
87878
  ` verifier: model ${verifier.model}${verifier.effort ? ` effort ${verifier.effort}` : ""} (${verifier.source})`
87869
87879
  ] : [],
87870
- `TIMEBOX: ${slice.timebox ?? DEFAULT_TIMEBOX}; past it without a new commit you will be replaced`,
87880
+ `TIMEBOX: ${timeboxText(slice.timebox)}; past it without a new commit you will be replaced`,
87871
87881
  scratchLine,
87872
87882
  `FORBIDDEN: ${slice.forbidden.join("; ")}`,
87873
87883
  ...fanIn,
@@ -87902,7 +87912,10 @@ function renderBrief(cwd, plan, input) {
87902
87912
  }
87903
87913
  };
87904
87914
  }
87905
- var DEFAULT_TIMEBOX = "30 minutes", REPORT, identityOf = (host) => {
87915
+ var DEFAULT_TIMEBOX = "30 minutes", DEFAULT_TOOL_CALLS = 120, timeboxText = (timebox) => {
87916
+ const text = timebox ?? DEFAULT_TIMEBOX;
87917
+ return /\b\d+\s+tool calls\b/u.test(text) ? text : `${text}, ${DEFAULT_TOOL_CALLS} tool calls`;
87918
+ }, REPORT, identityOf = (host) => {
87906
87919
  const family = host?.replace(/_(?:cli|desktop)$/, "") ?? "";
87907
87920
  if (family === "claude_code")
87908
87921
  return "issued";
@@ -88414,9 +88427,10 @@ var init_fanout_check = __esm(() => {
88414
88427
 
88415
88428
  // packages/workit-core/src/fanout-status.ts
88416
88429
  function timeboxMs(text) {
88417
- if (!text || /^\s*\d+(?:\.\d+)?\s*$/u.test(text))
88430
+ const time = text?.replace(/[\s,;]*\b\d+\s+tool calls\b[\s,;]*/gu, " ").trim();
88431
+ if (!time || /^\d+(?:\.\d+)?$/u.test(time))
88418
88432
  return null;
88419
- const ms = parseDuration2(text);
88433
+ const ms = parseDuration2(time);
88420
88434
  return ms && ms > 0 ? ms : null;
88421
88435
  }
88422
88436
  function activity(cwd, plan, slice, rows) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cli",
3
- "version": "8.35.2",
3
+ "version": "8.37.0",
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.35.2",
41
+ "@brainervirus/workit-cursor": "^8.37.0",
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.35.2"
47
+ "@brainervirus/workit-core": "^8.37.0"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=24"