@workit-dev/opencode 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.
Files changed (2) hide show
  1. package/dist/plugin.js +16 -2
  2. package/package.json +2 -2
package/dist/plugin.js CHANGED
@@ -15807,6 +15807,19 @@ var PR_ROW_TYPES = new Set([
15807
15807
  "pr.merged",
15808
15808
  "pr.linked"
15809
15809
  ]);
15810
+ var HOLD_ROW_TYPES = new Set(["branch.hold", "branch.hold.cleared"]);
15811
+ function branchHold(rows, branch) {
15812
+ let hold = null;
15813
+ for (const row of rows) {
15814
+ if (row.branch !== branch || row.observer !== "workit_cli")
15815
+ continue;
15816
+ if (row.type === "branch.hold")
15817
+ hold = row;
15818
+ else if (row.type === "branch.hold.cleared" || row.type === "push.verified")
15819
+ hold = null;
15820
+ }
15821
+ return hold;
15822
+ }
15810
15823
  var err = (code, error, unblock) => ({
15811
15824
  ok: false,
15812
15825
  code,
@@ -16874,6 +16887,7 @@ var OBSERVED_ONLY = new Set([
16874
16887
  "merge.unverified",
16875
16888
  "policy.judged",
16876
16889
  "verdict.voided",
16890
+ ...HOLD_ROW_TYPES,
16877
16891
  ...PR_ROW_TYPES
16878
16892
  ]);
16879
16893
 
@@ -26715,7 +26729,7 @@ var unpushed = (cwd, branch, endpoint, mine, merged) => {
26715
26729
  return null;
26716
26730
  return {
26717
26731
  kind: "unpushed",
26718
- 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`)" : ""}.`
26732
+ 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.`
26719
26733
  };
26720
26734
  };
26721
26735
  var redChecks = (cwd, rows, pr, head, endpoint) => {
@@ -26794,7 +26808,7 @@ function stopObligation(input, descriptor) {
26794
26808
  return null;
26795
26809
  const autonomy = resolveAutonomy(input.cwd);
26796
26810
  const endpoint = autonomy.effectiveEndpoint;
26797
- if (endpoint !== "commit") {
26811
+ if (endpoint !== "commit" && !branchHold(rows, branch)) {
26798
26812
  const left = unpushed(input.cwd, branch, endpoint, commits, mergedHeads(rows));
26799
26813
  if (left)
26800
26814
  return { ...left, head };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/opencode",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "private": false,
5
5
  "description": "Workit OpenCode plugin — native tools, adaptive policy, and sixteen method skills",
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@opencode/plugin": "2.0.18",
44
- "@workit-dev/core": "^1.2.2"
44
+ "@workit-dev/core": "^1.4.0"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=24"