@workit-dev/pi 1.2.2 → 1.4.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
@@ -8270,6 +8270,7 @@ var PR_ROW_TYPES = new Set([
8270
8270
  "pr.merged",
8271
8271
  "pr.linked"
8272
8272
  ]);
8273
+ var HOLD_ROW_TYPES = new Set(["branch.hold", "branch.hold.cleared"]);
8273
8274
  var err = (code, error, unblock) => ({
8274
8275
  ok: false,
8275
8276
  code,
@@ -8590,6 +8591,7 @@ var OBSERVED_ONLY = new Set([
8590
8591
  "merge.unverified",
8591
8592
  "policy.judged",
8592
8593
  "verdict.voided",
8594
+ ...HOLD_ROW_TYPES,
8593
8595
  ...PR_ROW_TYPES
8594
8596
  ]);
8595
8597
 
package/dist/workit.js CHANGED
@@ -15604,6 +15604,19 @@ var PR_ROW_TYPES = new Set([
15604
15604
  "pr.merged",
15605
15605
  "pr.linked"
15606
15606
  ]);
15607
+ var HOLD_ROW_TYPES = new Set(["branch.hold", "branch.hold.cleared"]);
15608
+ function branchHold(rows, branch) {
15609
+ let hold = null;
15610
+ for (const row of rows) {
15611
+ if (row.branch !== branch || row.observer !== "workit_cli")
15612
+ continue;
15613
+ if (row.type === "branch.hold")
15614
+ hold = row;
15615
+ else if (row.type === "branch.hold.cleared" || row.type === "push.verified")
15616
+ hold = null;
15617
+ }
15618
+ return hold;
15619
+ }
15607
15620
  var err = (code, error, unblock) => ({
15608
15621
  ok: false,
15609
15622
  code,
@@ -16671,6 +16684,7 @@ var OBSERVED_ONLY = new Set([
16671
16684
  "merge.unverified",
16672
16685
  "policy.judged",
16673
16686
  "verdict.voided",
16687
+ ...HOLD_ROW_TYPES,
16674
16688
  ...PR_ROW_TYPES
16675
16689
  ]);
16676
16690
 
@@ -26579,7 +26593,7 @@ var unpushed = (cwd, branch, endpoint, mine, merged) => {
26579
26593
  return null;
26580
26594
  return {
26581
26595
  kind: "unpushed",
26582
- reason: `${branch} has ${count} commit(s) of this session not on ${remote}, and this workspace's endpoint is \`${endpoint}\` (\`workit grant show\`): push them with \`workit git push\`${endpoint === "pr" ? ", then open or update the PR (`workit pr create --fill`)" : ""}.`
26596
+ reason: `${branch} has ${count} commit(s) of this session not on ${remote}, and this workspace's endpoint is \`${endpoint}\` (\`workit grant show\`): push them with \`workit git push\`${endpoint === "pr" ? ", then open or update the PR (`workit pr create --fill`)" : ""}. If the user said not yet, record it once with \`workit git hold --why "<their words>"\` and stop.`
26583
26597
  };
26584
26598
  };
26585
26599
  var redChecks = (cwd, rows, pr, head, endpoint) => {
@@ -26658,7 +26672,7 @@ function stopObligation(input, descriptor) {
26658
26672
  return null;
26659
26673
  const autonomy = resolveAutonomy(input.cwd);
26660
26674
  const endpoint = autonomy.effectiveEndpoint;
26661
- if (endpoint !== "commit") {
26675
+ if (endpoint !== "commit" && !branchHold(rows, branch)) {
26662
26676
  const left = unpushed(input.cwd, branch, endpoint, commits, mergedHeads(rows));
26663
26677
  if (left)
26664
26678
  return { ...left, head };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/pi",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "description": "Workit native extension for Pi — tools, method skills, and session continuity",
5
5
  "keywords": [
6
6
  "agentic-coding",