@brainervirus/workit-opencode 8.35.0 → 8.36.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.
@@ -23,7 +23,7 @@ description: Build a requested change in small verified steps - follow local pat
23
23
  (`workit check test`, plus `lint` and `typecheck` when the repo has them),
24
24
  not after every edit. Heavy work runs under one machine-wide lease: an ad-hoc
25
25
  suite is `workit check --heavy -- <cmd>`, never a hand-made flock; a busy
26
- lease waits and names its holder (`workit lock status`).
26
+ lease waits and names its holder (`workit lock status`). A tool warning is a finding: fix it in this PR in the right layer, or record the false positive with evidence; pre-existing ones get their own PR.
27
27
  5. Prove the feature on its real surface with the project's `verify-<app>`
28
28
  skill; none yet? Write one (call the skill tool with `workit-verify-app`). Tests show branch behavior,
29
29
  not that the feature works. The report carries what you observed: a UI
@@ -49,7 +49,7 @@ the same check. Fix round and recheck both failed: a decider (call the skill too
49
49
  5. **CI.** Local gates mirror CI: push and continue; `workit ci wait` once on
50
50
  the final head, in the background where the host allows. Red: read `logTail`, classify. Flake or infra: one
51
51
  `workit ci rerun --failed --reason flake|infra` per head. Real: reproduce
52
- with `workit check`, fix the root cause, batch every fix in one push.
52
+ with `workit check`, fix the root cause, batch every fix in one push. A tool warning is a finding: fix it in this PR in the right layer, or record the false positive with evidence; pre-existing ones get their own PR.
53
53
  6. **Verified.** The lane in `workit pr status` decides: none, no verdict; self, your `--self` verdict; focused or full (or `verification: self|independent`), one non-author verifier per PR after the last push, never per push (call the skill tool with `workit-review`), on Claude Code with the `model` and `effort` of `workit models show --role verifier`. A docs-only push (or test-only under a unit verdict) keeps the verdict (`carried`); `reverify: focused` re-checks only the new diff, reusing green CI; one verdict at a stack's top covers its unchanged lower PRs. Land only when
54
54
  granted: `workit stack land` or `workit pr merge`; `--unverified --reason` if user-asked.
55
55
  7. **Observe it landed:** `workit verify-delivery pr` or `merge`. After a failed
package/dist/plugin.js CHANGED
@@ -8497,7 +8497,11 @@ var releaseTrackSchema = object({
8497
8497
  ["requiredChecks", track.requiredChecks ?? []]
8498
8498
  ]) {
8499
8499
  if (new Set(values).size !== values.length) {
8500
- context.addIssue({ code: "custom", path: [field], message: "entries must be unique" });
8500
+ context.addIssue({
8501
+ code: "custom",
8502
+ path: [field],
8503
+ message: "entries must be unique"
8504
+ });
8501
8505
  }
8502
8506
  }
8503
8507
  if (track.versionSource?.kind === "package-json" && (path4.posix.isAbsolute(track.versionSource.path.replaceAll("\\", "/")) || /^[A-Za-z]:\//u.test(track.versionSource.path.replaceAll("\\", "/")) || track.versionSource.path.replaceAll("\\", "/").split("/").includes(".."))) {
@@ -8530,7 +8534,10 @@ var workspaceConfigSchema = object({
8530
8534
  kind,
8531
8535
  union([boolean2(), literal("verified")]).optional()
8532
8536
  ]))).passthrough().optional(),
8533
- youtrack: object({ baseUrl: nonBlank.optional(), link_issues: boolean2().optional() }).passthrough().optional(),
8537
+ youtrack: object({
8538
+ baseUrl: nonBlank.optional(),
8539
+ link_issues: boolean2().optional()
8540
+ }).passthrough().optional(),
8534
8541
  issues: object({
8535
8542
  provider: _enum(["github", "gitlab", "youtrack"]).optional(),
8536
8543
  link: boolean2().optional(),
@@ -8571,9 +8578,16 @@ var workspacesFileSchema = object({
8571
8578
  var workspacesRevision = (contents) => createHash2("sha256").update(contents ?? "<missing>").digest("hex");
8572
8579
  var validateWorkspacesDocument = (parsed, file) => {
8573
8580
  if (!isConfigObject(parsed)) {
8574
- return { status: "malformed", path: file, entries: [], error: `${file} is not a JSON object` };
8581
+ return {
8582
+ status: "malformed",
8583
+ path: file,
8584
+ entries: [],
8585
+ error: `${file} is not a JSON object`
8586
+ };
8575
8587
  }
8576
- const validated = workspacesFileSchema.safeParse(parsed, { reportInput: true });
8588
+ const validated = workspacesFileSchema.safeParse(parsed, {
8589
+ reportInput: true
8590
+ });
8577
8591
  if (!validated.success) {
8578
8592
  const detail = validated.error.issues.map((issue) => {
8579
8593
  const field = String(issue.path[issue.path.length - 1] ?? "");
@@ -8613,7 +8627,12 @@ var readWorkspacesResult = (dir = configDir()) => {
8613
8627
  raw = readFileSync2(file, "utf8");
8614
8628
  } catch (error) {
8615
8629
  if (error.code === "ENOENT")
8616
- return { status: "missing", path: file, entries: [], revision: workspacesRevision(null) };
8630
+ return {
8631
+ status: "missing",
8632
+ path: file,
8633
+ entries: [],
8634
+ revision: workspacesRevision(null)
8635
+ };
8617
8636
  return {
8618
8637
  status: "malformed",
8619
8638
  path: file,
@@ -8633,7 +8652,10 @@ var readWorkspacesResult = (dir = configDir()) => {
8633
8652
  error: `${file} is not valid JSON`
8634
8653
  };
8635
8654
  }
8636
- return { ...validateWorkspacesDocument(parsed, file), revision: workspacesRevision(raw) };
8655
+ return {
8656
+ ...validateWorkspacesDocument(parsed, file),
8657
+ revision: workspacesRevision(raw)
8658
+ };
8637
8659
  };
8638
8660
  var globToRegExp = (glob) => {
8639
8661
  let out = "";
@@ -8844,7 +8866,10 @@ var matchRuntimeWorkspace = (cwd, dir = configDir()) => {
8844
8866
  };
8845
8867
  var resolveRuntimeReleaseTracks = (cwd) => {
8846
8868
  const matched = matchRuntimeWorkspace(cwd);
8847
- return matched ? { workspace: matched.selected.name, releaseTracks: matched.selected.releaseTracks } : null;
8869
+ return matched ? {
8870
+ workspace: matched.selected.name,
8871
+ releaseTracks: matched.selected.releaseTracks
8872
+ } : null;
8848
8873
  };
8849
8874
  var inheritedSetting = (cwd, dir, has) => {
8850
8875
  let matched;
@@ -8857,7 +8882,10 @@ var inheritedSetting = (cwd, dir, has) => {
8857
8882
  return null;
8858
8883
  const { selected, matches } = matched;
8859
8884
  const enclosing = matches.filter((entry) => entry !== selected).toSorted((a, b) => globSpecificity(b.glob) - globSpecificity(a.glob));
8860
- return { workspace: selected.name, source: [selected, ...enclosing].find(has) ?? null };
8885
+ return {
8886
+ workspace: selected.name,
8887
+ source: [selected, ...enclosing].find(has) ?? null
8888
+ };
8861
8889
  };
8862
8890
  var workspaceLiveSessionGuard = (cwd, dir) => inheritedSetting(cwd, dir, (entry) => typeof entry.liveSessionGuard === "boolean")?.source?.liveSessionGuard !== false;
8863
8891
  var TIER_KEYS = new Set(["mundane", "standard", "hard"]);
@@ -14556,7 +14584,12 @@ function readLedger(cwd, options = {}) {
14556
14584
  });
14557
14585
  return {
14558
14586
  ok: true,
14559
- value: { path: file.value, rows, skipped, integrity: options.integrity ? integrity : null }
14587
+ value: {
14588
+ path: file.value,
14589
+ rows,
14590
+ skipped,
14591
+ integrity: options.integrity ? integrity : null
14592
+ }
14560
14593
  };
14561
14594
  }
14562
14595
  var TAMPER_REASONS = new Set(["hash_mismatch", "broken_link"]);
@@ -14649,7 +14682,10 @@ var renameAwareBranch = (scopeOf, branch) => {
14649
14682
  return scopeOf(own)({ branch: theirs, at: target.at });
14650
14683
  };
14651
14684
  };
14652
- function authorSessions(cwd, rows, branch, range = { base: null, head: null }, scope = branchScope(cwd, branch)) {
14685
+ function authorSessions(cwd, rows, branch, range = {
14686
+ base: null,
14687
+ head: null
14688
+ }, scope = branchScope(cwd, branch)) {
14653
14689
  const sessions = new Set;
14654
14690
  for (const row of rows) {
14655
14691
  if (!scope(row) || row.type !== "commit.recorded" && row.type !== "task.opened")
@@ -14760,12 +14796,13 @@ function restackCarries(exactIn, rows, branch, from, to) {
14760
14796
  const cwd = exactIn;
14761
14797
  let known = restackExact.get(row);
14762
14798
  if (known === undefined) {
14763
- known = typeof row.fromBase === "string" && typeof row.toBase === "string" && sameOwnChange(cwd, {
14799
+ const range = typeof row.fromBase === "string" && typeof row.toBase === "string" ? {
14764
14800
  from: fromHead,
14765
14801
  to: head,
14766
14802
  fromBase: row.fromBase,
14767
14803
  toBase: row.toBase
14768
- });
14804
+ } : null;
14805
+ known = range !== null && (sameOwnChange(cwd, range) || cleanRebase(cwd, range));
14769
14806
  restackExact.set(row, known);
14770
14807
  }
14771
14808
  return known;
@@ -14800,7 +14837,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14800
14837
  const cacheKey = `${base}\x00${at}`;
14801
14838
  let key = keyCache.get(cacheKey);
14802
14839
  if (!key) {
14803
- key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
14840
+ key = {
14841
+ patchId: patchId(cwd, base, at),
14842
+ diffHash: diffHash(cwd, base, at)
14843
+ };
14804
14844
  keyCache.set(cacheKey, key);
14805
14845
  }
14806
14846
  return key;
@@ -14840,7 +14880,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14840
14880
  };
14841
14881
  const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
14842
14882
  const keyBasis = (row) => {
14843
- const basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
14883
+ const basis = verdictBasis(row, {
14884
+ head,
14885
+ ...keyFor(row.base ?? fallbackBase)
14886
+ });
14844
14887
  return basis === "carried" && !exactCarry(row) ? "stale" : basis;
14845
14888
  };
14846
14889
  const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
@@ -14945,7 +14988,11 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14945
14988
  const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
14946
14989
  const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
14947
14990
  const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
14948
- const accepted = tampered.length ? { accepted: false, verdict: null, reasons: ["ledger_tampered"] } : newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
14991
+ const accepted = tampered.length ? {
14992
+ accepted: false,
14993
+ verdict: null,
14994
+ reasons: ["ledger_tampered"]
14995
+ } : newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
14949
14996
  accepted: false,
14950
14997
  verdict: failing?.verdict ?? null,
14951
14998
  reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
@@ -14963,7 +15010,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14963
15010
  selfVerdict: accepted.accepted ? null : selfEntry?.verdict ?? null,
14964
15011
  base: newestCurrent?.verdict.base ?? fallbackBase,
14965
15012
  patchId: keyFor(newestCurrent?.verdict.base ?? fallbackBase).patchId,
14966
- current: { basis: newestCurrent?.basis ?? "none", verdict: newestCurrent?.verdict ?? null },
15013
+ current: {
15014
+ basis: newestCurrent?.basis ?? "none",
15015
+ verdict: newestCurrent?.verdict ?? null
15016
+ },
14967
15017
  carry: carryEntry?.carry ?? null,
14968
15018
  reverify,
14969
15019
  accepted,
@@ -21679,7 +21729,10 @@ function entryCompactContext(store, entry, session, context) {
21679
21729
  const task = entry ? store.readTask(entry.id) : null;
21680
21730
  if (task && !task.ok)
21681
21731
  return null;
21682
- const freshness = { mode: "signal", current: () => recentSignal(store.root) };
21732
+ const freshness = {
21733
+ mode: "signal",
21734
+ current: () => recentSignal(store.root)
21735
+ };
21683
21736
  const observed = task?.data.evidence.some(isObservedCheck) ?? false;
21684
21737
  const files = (task?.data.decisions ?? []).flatMap((decision) => decision.data.binding.contentRefs.flatMap((ref) => ref.kind === "file" ? [path27.resolve(store.root, ref.path)] : []));
21685
21738
  const observedFiles = filesKey(files);
@@ -24882,12 +24935,22 @@ function gitRestack(cwd, input) {
24882
24935
  if (!dir) {
24883
24936
  const scratch = scratchDir(cwd);
24884
24937
  if (!scratch)
24885
- return { ok: false, conflict: false, worktree: cwd, error: "no store root" };
24938
+ return {
24939
+ ok: false,
24940
+ conflict: false,
24941
+ worktree: cwd,
24942
+ error: "no store root"
24943
+ };
24886
24944
  fs25.mkdirSync(scratch, { recursive: true });
24887
24945
  dir = path42.join(scratch, `${input.branch.replace(/[^A-Za-z0-9._-]+/gu, "_").slice(0, 40)}-${randomBytes4(4).toString("hex")}`);
24888
24946
  const added = gitRun3(cwd, ["worktree", "add", "-q", dir, input.branch], GIT_TIMEOUTS.worktree);
24889
24947
  if (!added.ok)
24890
- return { ok: false, conflict: false, worktree: cwd, error: firstLine(added) };
24948
+ return {
24949
+ ok: false,
24950
+ conflict: false,
24951
+ worktree: cwd,
24952
+ error: firstLine(added)
24953
+ };
24891
24954
  }
24892
24955
  const run = gitRun3(dir, [
24893
24956
  "-c",
@@ -24910,7 +24973,12 @@ function gitRestack(cwd, input) {
24910
24973
  error: `git rebase did not finish within ${stackDeps.rebaseTimeoutMs} ms`
24911
24974
  };
24912
24975
  if (rebaseInProgress(dir))
24913
- return { ok: false, conflict: true, worktree: dir, error: firstLine(run) };
24976
+ return {
24977
+ ok: false,
24978
+ conflict: true,
24979
+ worktree: dir,
24980
+ error: firstLine(run)
24981
+ };
24914
24982
  if (!owner)
24915
24983
  gitRun3(cwd, ["worktree", "remove", "--force", dir]);
24916
24984
  return { ok: false, conflict: false, worktree: dir, error: firstLine(run) };
@@ -24918,7 +24986,12 @@ function gitRestack(cwd, input) {
24918
24986
  if (!owner)
24919
24987
  gitRun3(cwd, ["worktree", "remove", "--force", dir]);
24920
24988
  const head = branchTip(cwd, input.branch);
24921
- return head ? { ok: true, head } : { ok: false, conflict: false, worktree: dir, error: `${input.branch} vanished` };
24989
+ return head ? { ok: true, head } : {
24990
+ ok: false,
24991
+ conflict: false,
24992
+ worktree: dir,
24993
+ error: `${input.branch} vanished`
24994
+ };
24922
24995
  }
24923
24996
  var firstLine = (run) => (`${run.stderr}
24924
24997
  ${run.stdout}`.split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-opencode",
3
- "version": "8.35.0",
3
+ "version": "8.36.0",
4
4
  "private": false,
5
5
  "description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "typecheck": "tsc --noEmit"
40
40
  },
41
41
  "devDependencies": {
42
- "@brainervirus/workit-core": "^8.35.0",
42
+ "@brainervirus/workit-core": "^8.36.0",
43
43
  "@opencode/plugin": "2.0.18"
44
44
  },
45
45
  "engines": {