@brainervirus/workit-cli 7.5.1 → 7.5.2

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 +16 -9
  2. package/package.json +4 -4
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: "7.5.1",
68
+ version: "7.5.2",
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": "^7.5.1",
107
- "@brainervirus/workit-cursor": "^7.5.1",
108
- "@brainervirus/workit-opencode": "^7.5.1",
106
+ "@brainervirus/workit-core": "^7.5.2",
107
+ "@brainervirus/workit-cursor": "^7.5.2",
108
+ "@brainervirus/workit-opencode": "^7.5.2",
109
109
  "@inkjs/ui": "2.0.0",
110
110
  ink: "7.1.1",
111
111
  react: "19.2.8"
@@ -13458,7 +13458,7 @@ function recordVerdict(context, input) {
13458
13458
  });
13459
13459
  const authoring = [session, input.derivedFrom].find((candidate) => typeof candidate === "string" && authors.has(candidate));
13460
13460
  if (!self2 && authoring)
13461
- return err("blocked", `author_verdict: session ${authoring} authored ${branch}; a verdict must come from a different session`, input.derivedFrom === undefined ? 'have a non-author session record the verdict, or pass --self (a self verdict is never accepted by merge:"verified")' : "run the verifier as a separate session: the lead spawns it with its own WORKIT_SESSION_ID (Claude Code: subagents get one from the SubagentStart hook)");
13461
+ return err("blocked", `author_verdict: session ${authoring} authored ${branch}; a verdict must come from a different session`, input.derivedFrom === undefined ? "have a non-author session record the verdict: spawn a verifier with its own WORKIT_SESSION_ID=<lead>-v<n> (Claude Code: subagents get one from the SubagentStart hook); or, as the author, pass --self (self-reviewed, never accepted)" : "run the verifier as a separate session: the lead spawns it with its own WORKIT_SESSION_ID (Claude Code: subagents get one from the SubagentStart hook)");
13462
13462
  const link = checkSupersede(context, "verdict", self2);
13463
13463
  if (!link.ok)
13464
13464
  return link;
@@ -70173,7 +70173,7 @@ var init_knowledge = __esm(() => {
70173
70173
  HEADING = /^\s{0,3}#{1,6}(\s|$)/;
70174
70174
  TABLE_SEPARATOR = /^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)*\|?\s*$/;
70175
70175
  LIST_ITEM = /^\s*(?:[-*+]|\d+[.)])\s+/;
70176
- PLACEHOLDER2 = /^(?:(?:tbd|todo|tba|fixme)\b.*|n\/a|none|none yet|coming soon|placeholder|\.\.\.|…|-)?[.:]?$/i;
70176
+ PLACEHOLDER2 = /^(?:(?:tbd|todo|tba|fixme)(?:\s*[:–—-].*)?|n\/a|none|none yet|coming soon|placeholder|\.\.\.|…|-)?[.:]?$/i;
70177
70177
  INDENTED_CODE = /^(?: {4}|\t)/;
70178
70178
  LINK = /!?\[[^\]]*\]\(\s*(?:<([^>\n]+)>|((?:[^()\s<>]|\([^()\s]*\))+))(?:\s+["'(][^)]*)?\)/g;
70179
70179
  REFERENCE_DEFINITION = /^\s{0,3}\[[^\]]+\]:\s*<?(\S+?)>?(?:\s|$)/;
@@ -77789,7 +77789,7 @@ async function run16(argv, io) {
77789
77789
  })), (row) => `recorded ruling ${row.id}`);
77790
77790
  if (rest.length !== 1)
77791
77791
  return usage4(io, `ledger verdict takes one result: ${VERDICT_RESULTS.join("|")}`);
77792
- return fromResult(io, await recorded(recordVerdict(context, {
77792
+ const verdict = await recorded(recordVerdict(context, {
77793
77793
  result: rest[0],
77794
77794
  kind: values.kind,
77795
77795
  how: values.how,
@@ -77797,7 +77797,11 @@ async function run16(argv, io) {
77797
77797
  self: values.self === true,
77798
77798
  evidenceRefs: values.evidence,
77799
77799
  ..."derivedFrom" in acting ? { derivedFrom: acting.derivedFrom } : {}
77800
- })), (row) => `recorded verdict ${row.id}: ${row.result} [${row.kind}] for ${row.branch} @ ${(row.head ?? "").slice(0, 12)} as ${actor.session ?? "no session"}${row.self ? ` (self${row.selfReason === "no_session" ? ": WORKIT_SESSION_ID unset" : ""}; never accepted)` : ""}`);
77800
+ }));
77801
+ if (verdict.ok && verdict.value.selfReason === "flag" && !passedTestOn(io.cwd, verdict.value))
77802
+ io.stderr(`warning: no passing \`workit check test\` observed on ${(verdict.value.head ?? "this head").slice(0, 12)}; run it before a --self verdict
77803
+ `);
77804
+ return fromResult(io, verdict, (row) => `recorded verdict ${row.id}: ${row.result} [${row.kind}] for ${row.branch} @ ${(row.head ?? "").slice(0, 12)} as ${actor.session ?? "no session"}${row.self ? ` (self${row.selfReason === "no_session" ? ": WORKIT_SESSION_ID unset" : ""}; never accepted)` : ""}`);
77801
77805
  }
77802
77806
  var USAGE9 = "workit ledger decision|ruling|verdict|list|check ... (workit help ledger for the grammar)", OPTIONS, SESSION_SAFE2, ROLE_SAFE, actorFor = (io, values) => {
77803
77807
  const actor = actorFromEnv(io.env);
@@ -77823,7 +77827,10 @@ var USAGE9 = "workit ledger decision|ruling|verdict|list|check ... (workit help
77823
77827
  return;
77824
77828
  const parsed = Number(value);
77825
77829
  return Number.isInteger(parsed) && parsed > 0 ? parsed : new Error(`${flag} must be a positive integer`);
77826
- }, failed2 = (io, result) => emit(io, fail(result.code, result.error, result.unblock ? { unblock: result.unblock } : {})), fromResult = (io, result, human) => result.ok ? emit(io, ok(result.value), human) : failed2(io, result), usage4 = (io, error) => emit(io, fail("invalid_input", error, { unblock: USAGE9 })), verdictLines = (check) => {
77830
+ }, failed2 = (io, result) => emit(io, fail(result.code, result.error, result.unblock ? { unblock: result.unblock } : {})), fromResult = (io, result, human) => result.ok ? emit(io, ok(result.value), human) : failed2(io, result), usage4 = (io, error) => emit(io, fail("invalid_input", error, { unblock: USAGE9 })), passedTestOn = (cwd, verdict) => {
77831
+ const ledger = readLedger(cwd);
77832
+ return ledger.ok && ledger.value.rows.some((row) => row.type === "check" && row.observer === "workit_cli" && row.name === "test" && row.result === "passed" && row.dirty !== true && row.branch === verdict.branch && row.head === verdict.head);
77833
+ }, verdictLines = (check) => {
77827
77834
  const lines = [
77828
77835
  `${check.branch} @ ${(check.head ?? "no commit").slice(0, 12)}: current: ${check.current.basis}${typeof check.current.verdict?.result === "string" ? ` (${check.current.verdict.result})` : ""}; ${check.accepted.accepted ? "accepted" : `not accepted (${check.accepted.reasons.join(", ")})`}; review: ${check.review}`
77829
77836
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cli",
3
- "version": "7.5.1",
3
+ "version": "7.5.2",
4
4
  "private": false,
5
5
  "description": "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
6
6
  "keywords": [
@@ -38,9 +38,9 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@babel/parser": "7.29.9",
41
- "@brainervirus/workit-core": "^7.5.1",
42
- "@brainervirus/workit-cursor": "^7.5.1",
43
- "@brainervirus/workit-opencode": "^7.5.1",
41
+ "@brainervirus/workit-core": "^7.5.2",
42
+ "@brainervirus/workit-cursor": "^7.5.2",
43
+ "@brainervirus/workit-opencode": "^7.5.2",
44
44
  "@inkjs/ui": "2.0.0",
45
45
  "ink": "7.1.1",
46
46
  "react": "19.2.8"