@brainervirus/workit-pi 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.
package/dist/worker.js CHANGED
@@ -6835,7 +6835,11 @@ var releaseTrackSchema = object({
6835
6835
  ["requiredChecks", track.requiredChecks ?? []]
6836
6836
  ]) {
6837
6837
  if (new Set(values).size !== values.length) {
6838
- context.addIssue({ code: "custom", path: [field], message: "entries must be unique" });
6838
+ context.addIssue({
6839
+ code: "custom",
6840
+ path: [field],
6841
+ message: "entries must be unique"
6842
+ });
6839
6843
  }
6840
6844
  }
6841
6845
  if (track.versionSource?.kind === "package-json" && (path2.posix.isAbsolute(track.versionSource.path.replaceAll("\\", "/")) || /^[A-Za-z]:\//u.test(track.versionSource.path.replaceAll("\\", "/")) || track.versionSource.path.replaceAll("\\", "/").split("/").includes(".."))) {
@@ -6868,7 +6872,10 @@ var workspaceConfigSchema = object({
6868
6872
  kind,
6869
6873
  union([boolean2(), literal("verified")]).optional()
6870
6874
  ]))).passthrough().optional(),
6871
- youtrack: object({ baseUrl: nonBlank.optional(), link_issues: boolean2().optional() }).passthrough().optional(),
6875
+ youtrack: object({
6876
+ baseUrl: nonBlank.optional(),
6877
+ link_issues: boolean2().optional()
6878
+ }).passthrough().optional(),
6872
6879
  issues: object({
6873
6880
  provider: _enum(["github", "gitlab", "youtrack"]).optional(),
6874
6881
  link: boolean2().optional(),
@@ -7824,7 +7831,12 @@ function readLedger(cwd, options = {}) {
7824
7831
  });
7825
7832
  return {
7826
7833
  ok: true,
7827
- value: { path: file.value, rows, skipped, integrity: options.integrity ? integrity : null }
7834
+ value: {
7835
+ path: file.value,
7836
+ rows,
7837
+ skipped,
7838
+ integrity: options.integrity ? integrity : null
7839
+ }
7828
7840
  };
7829
7841
  }
7830
7842
  var TAMPER_REASONS = new Set(["hash_mismatch", "broken_link"]);
package/dist/workit.js CHANGED
@@ -8469,7 +8469,11 @@ var releaseTrackSchema = object({
8469
8469
  ["requiredChecks", track.requiredChecks ?? []]
8470
8470
  ]) {
8471
8471
  if (new Set(values).size !== values.length) {
8472
- context.addIssue({ code: "custom", path: [field], message: "entries must be unique" });
8472
+ context.addIssue({
8473
+ code: "custom",
8474
+ path: [field],
8475
+ message: "entries must be unique"
8476
+ });
8473
8477
  }
8474
8478
  }
8475
8479
  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(".."))) {
@@ -8502,7 +8506,10 @@ var workspaceConfigSchema = object({
8502
8506
  kind,
8503
8507
  union([boolean2(), literal("verified")]).optional()
8504
8508
  ]))).passthrough().optional(),
8505
- youtrack: object({ baseUrl: nonBlank.optional(), link_issues: boolean2().optional() }).passthrough().optional(),
8509
+ youtrack: object({
8510
+ baseUrl: nonBlank.optional(),
8511
+ link_issues: boolean2().optional()
8512
+ }).passthrough().optional(),
8506
8513
  issues: object({
8507
8514
  provider: _enum(["github", "gitlab", "youtrack"]).optional(),
8508
8515
  link: boolean2().optional(),
@@ -8543,9 +8550,16 @@ var workspacesFileSchema = object({
8543
8550
  var workspacesRevision = (contents) => createHash2("sha256").update(contents ?? "<missing>").digest("hex");
8544
8551
  var validateWorkspacesDocument = (parsed, file) => {
8545
8552
  if (!isConfigObject(parsed)) {
8546
- return { status: "malformed", path: file, entries: [], error: `${file} is not a JSON object` };
8553
+ return {
8554
+ status: "malformed",
8555
+ path: file,
8556
+ entries: [],
8557
+ error: `${file} is not a JSON object`
8558
+ };
8547
8559
  }
8548
- const validated = workspacesFileSchema.safeParse(parsed, { reportInput: true });
8560
+ const validated = workspacesFileSchema.safeParse(parsed, {
8561
+ reportInput: true
8562
+ });
8549
8563
  if (!validated.success) {
8550
8564
  const detail = validated.error.issues.map((issue) => {
8551
8565
  const field = String(issue.path[issue.path.length - 1] ?? "");
@@ -8585,7 +8599,12 @@ var readWorkspacesResult = (dir = configDir()) => {
8585
8599
  raw = readFileSync2(file, "utf8");
8586
8600
  } catch (error) {
8587
8601
  if (error.code === "ENOENT")
8588
- return { status: "missing", path: file, entries: [], revision: workspacesRevision(null) };
8602
+ return {
8603
+ status: "missing",
8604
+ path: file,
8605
+ entries: [],
8606
+ revision: workspacesRevision(null)
8607
+ };
8589
8608
  return {
8590
8609
  status: "malformed",
8591
8610
  path: file,
@@ -8605,7 +8624,10 @@ var readWorkspacesResult = (dir = configDir()) => {
8605
8624
  error: `${file} is not valid JSON`
8606
8625
  };
8607
8626
  }
8608
- return { ...validateWorkspacesDocument(parsed, file), revision: workspacesRevision(raw) };
8627
+ return {
8628
+ ...validateWorkspacesDocument(parsed, file),
8629
+ revision: workspacesRevision(raw)
8630
+ };
8609
8631
  };
8610
8632
  var globToRegExp = (glob) => {
8611
8633
  let out = "";
@@ -8816,7 +8838,10 @@ var matchRuntimeWorkspace = (cwd, dir = configDir()) => {
8816
8838
  };
8817
8839
  var resolveRuntimeReleaseTracks = (cwd) => {
8818
8840
  const matched = matchRuntimeWorkspace(cwd);
8819
- return matched ? { workspace: matched.selected.name, releaseTracks: matched.selected.releaseTracks } : null;
8841
+ return matched ? {
8842
+ workspace: matched.selected.name,
8843
+ releaseTracks: matched.selected.releaseTracks
8844
+ } : null;
8820
8845
  };
8821
8846
  var inheritedSetting = (cwd, dir, has) => {
8822
8847
  let matched;
@@ -8829,7 +8854,10 @@ var inheritedSetting = (cwd, dir, has) => {
8829
8854
  return null;
8830
8855
  const { selected, matches } = matched;
8831
8856
  const enclosing = matches.filter((entry) => entry !== selected).toSorted((a, b) => globSpecificity(b.glob) - globSpecificity(a.glob));
8832
- return { workspace: selected.name, source: [selected, ...enclosing].find(has) ?? null };
8857
+ return {
8858
+ workspace: selected.name,
8859
+ source: [selected, ...enclosing].find(has) ?? null
8860
+ };
8833
8861
  };
8834
8862
  var workspaceTrailers = (cwd, dir) => {
8835
8863
  const found = inheritedSetting(cwd, dir, (entry) => typeof entry.trailers === "boolean");
@@ -14551,7 +14579,12 @@ function readLedger(cwd, options = {}) {
14551
14579
  });
14552
14580
  return {
14553
14581
  ok: true,
14554
- value: { path: file.value, rows, skipped, integrity: options.integrity ? integrity : null }
14582
+ value: {
14583
+ path: file.value,
14584
+ rows,
14585
+ skipped,
14586
+ integrity: options.integrity ? integrity : null
14587
+ }
14555
14588
  };
14556
14589
  }
14557
14590
  var TAMPER_REASONS = new Set(["hash_mismatch", "broken_link"]);
@@ -14644,7 +14677,10 @@ var renameAwareBranch = (scopeOf, branch) => {
14644
14677
  return scopeOf(own)({ branch: theirs, at: target.at });
14645
14678
  };
14646
14679
  };
14647
- function authorSessions(cwd, rows, branch, range = { base: null, head: null }, scope = branchScope(cwd, branch)) {
14680
+ function authorSessions(cwd, rows, branch, range = {
14681
+ base: null,
14682
+ head: null
14683
+ }, scope = branchScope(cwd, branch)) {
14648
14684
  const sessions = new Set;
14649
14685
  for (const row of rows) {
14650
14686
  if (!scope(row) || row.type !== "commit.recorded" && row.type !== "task.opened")
@@ -14755,12 +14791,13 @@ function restackCarries(exactIn, rows, branch, from, to) {
14755
14791
  const cwd = exactIn;
14756
14792
  let known = restackExact.get(row);
14757
14793
  if (known === undefined) {
14758
- known = typeof row.fromBase === "string" && typeof row.toBase === "string" && sameOwnChange(cwd, {
14794
+ const range = typeof row.fromBase === "string" && typeof row.toBase === "string" ? {
14759
14795
  from: fromHead,
14760
14796
  to: head,
14761
14797
  fromBase: row.fromBase,
14762
14798
  toBase: row.toBase
14763
- });
14799
+ } : null;
14800
+ known = range !== null && (sameOwnChange(cwd, range) || cleanRebase(cwd, range));
14764
14801
  restackExact.set(row, known);
14765
14802
  }
14766
14803
  return known;
@@ -14795,7 +14832,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14795
14832
  const cacheKey = `${base}\x00${at}`;
14796
14833
  let key = keyCache.get(cacheKey);
14797
14834
  if (!key) {
14798
- key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
14835
+ key = {
14836
+ patchId: patchId(cwd, base, at),
14837
+ diffHash: diffHash(cwd, base, at)
14838
+ };
14799
14839
  keyCache.set(cacheKey, key);
14800
14840
  }
14801
14841
  return key;
@@ -14835,7 +14875,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14835
14875
  };
14836
14876
  const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
14837
14877
  const keyBasis = (row) => {
14838
- const basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
14878
+ const basis = verdictBasis(row, {
14879
+ head,
14880
+ ...keyFor(row.base ?? fallbackBase)
14881
+ });
14839
14882
  return basis === "carried" && !exactCarry(row) ? "stale" : basis;
14840
14883
  };
14841
14884
  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;
@@ -14940,7 +14983,11 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14940
14983
  const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
14941
14984
  const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
14942
14985
  const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
14943
- const accepted = tampered.length ? { accepted: false, verdict: null, reasons: ["ledger_tampered"] } : newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
14986
+ const accepted = tampered.length ? {
14987
+ accepted: false,
14988
+ verdict: null,
14989
+ reasons: ["ledger_tampered"]
14990
+ } : newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
14944
14991
  accepted: false,
14945
14992
  verdict: failing?.verdict ?? null,
14946
14993
  reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
@@ -14958,7 +15005,10 @@ function checkVerdicts(cwd, branch, ledgerRows) {
14958
15005
  selfVerdict: accepted.accepted ? null : selfEntry?.verdict ?? null,
14959
15006
  base: newestCurrent?.verdict.base ?? fallbackBase,
14960
15007
  patchId: keyFor(newestCurrent?.verdict.base ?? fallbackBase).patchId,
14961
- current: { basis: newestCurrent?.basis ?? "none", verdict: newestCurrent?.verdict ?? null },
15008
+ current: {
15009
+ basis: newestCurrent?.basis ?? "none",
15010
+ verdict: newestCurrent?.verdict ?? null
15011
+ },
14962
15012
  carry: carryEntry?.carry ?? null,
14963
15013
  reverify,
14964
15014
  accepted,
@@ -21613,7 +21663,10 @@ function entryCompactContext(store, entry, session, context) {
21613
21663
  const task = entry ? store.readTask(entry.id) : null;
21614
21664
  if (task && !task.ok)
21615
21665
  return null;
21616
- const freshness = { mode: "signal", current: () => recentSignal(store.root) };
21666
+ const freshness = {
21667
+ mode: "signal",
21668
+ current: () => recentSignal(store.root)
21669
+ };
21617
21670
  const observed = task?.data.evidence.some(isObservedCheck) ?? false;
21618
21671
  const files = (task?.data.decisions ?? []).flatMap((decision) => decision.data.binding.contentRefs.flatMap((ref) => ref.kind === "file" ? [path27.resolve(store.root, ref.path)] : []));
21619
21672
  const observedFiles = filesKey(files);
@@ -21679,7 +21732,10 @@ var checkoutAt = (cwd) => {
21679
21732
  if (fs19.existsSync(dotGit)) {
21680
21733
  const admin = fs19.statSync(dotGit).isFile() ? path27.resolve(dir, /^gitdir:\s*(.+)$/mu.exec(fs19.readFileSync(dotGit, "utf8"))?.[1]?.trim() ?? "") : dotGit;
21681
21734
  const head = fs19.readFileSync(path27.join(admin, "HEAD"), "utf8").trim();
21682
- return { root: dir, branch: /^ref: refs\/heads\/(.+)$/u.exec(head)?.[1] ?? null };
21735
+ return {
21736
+ root: dir,
21737
+ branch: /^ref: refs\/heads\/(.+)$/u.exec(head)?.[1] ?? null
21738
+ };
21683
21739
  }
21684
21740
  if (path27.dirname(dir) === dir)
21685
21741
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-pi",
3
- "version": "8.35.0",
3
+ "version": "8.36.0",
4
4
  "description": "Workit native extension for Pi — tools, method skills, and session continuity",
5
5
  "keywords": [
6
6
  "agentic-coding",
@@ -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 (read the `workit-verify-app` skill's SKILL.md and follow it). 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 (read the `workit-f
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 (read the `workit-review` skill's SKILL.md and follow it), 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