@webpresso/opencode-plugin 3.3.3 → 3.3.4

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/index.js CHANGED
@@ -151,12 +151,40 @@ function currentAgentKitPackageRoot() {
151
151
  return null;
152
152
  }
153
153
 
154
+ // Bun's global bin dir is stable ($BUN_INSTALL/bin, else ~/.bun/bin) even though
155
+ // its global PACKAGE dir is not: that follows $BUN_INSTALL, bunfig
156
+ // install.globalDir, and version defaults, and can land at $HOME/node_modules.
157
+ // Discover through the bin symlink bun itself writes rather than guessing a
158
+ // package layout. Keep in sync with packages/{claude,codex}-plugin/bin/wp.
159
+ function bunGlobalWpCandidate() {
160
+ const home = process.env.HOME || homedir();
161
+ return join(process.env.BUN_INSTALL || join(home, ".bun"), "bin", "wp");
162
+ }
163
+
164
+ /**
165
+ * The package root reached through bun's own global bin link, or null. Trusted
166
+ * for the same reason the hardcoded anchors are: bun wrote the link inside the
167
+ * user's own bun install, and the target must still be a real agent-kit package
168
+ * root. It does NOT widen trust to arbitrary PATH entries.
169
+ */
170
+ function bunGlobalInstallPackageRoot() {
171
+ try {
172
+ const resolved = realpathSync(bunGlobalWpCandidate());
173
+ const packageRoot = dirname(dirname(resolved));
174
+ if (resolved !== join(packageRoot, "bin", "wp")) return null;
175
+ return isUsableWebpressoPackageRoot(packageRoot) ? packageRoot : null;
176
+ } catch {
177
+ return null;
178
+ }
179
+ }
180
+
154
181
  function trustedHomeInstallPackageRoots() {
155
182
  const home = process.env.HOME || homedir();
156
183
  return [
157
184
  join(home, ".claude", "plugins", "cache", "webpresso", "agent-kit"),
158
185
  join(home, ".bun", "install", "global", "node_modules", "@webpresso", "agent-kit"),
159
- ];
186
+ bunGlobalInstallPackageRoot(),
187
+ ].filter(Boolean);
160
188
  }
161
189
 
162
190
  function isTrustedWebpressoPackageRoot(packageRoot) {
@@ -194,6 +222,13 @@ async function resolveWpHookCommand($, directory, hookName) {
194
222
  }
195
223
  }
196
224
 
225
+ // `command -v wp` misses a bun global install whose bin dir is not on PATH —
226
+ // the common case for a host-launched hook with a sanitized environment.
227
+ const bunWp = bunGlobalWpCandidate();
228
+ if (isAgentKitWp(bunWp, directory)) {
229
+ return `${shellQuote(bunWp)} hook ${hookName}`;
230
+ }
231
+
197
232
  throw new Error(
198
233
  "webpresso wp launcher not found; run wp setup after installing @webpresso/agent-kit",
199
234
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpresso/opencode-plugin",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "private": false,
5
5
  "description": "OpenCode plugin adapter package for Webpresso agent-kit.",
6
6
  "homepage": "https://github.com/webpresso/agent-kit#readme",
@@ -2,14 +2,14 @@
2
2
  "schemaVersion": 1,
3
3
  "host": "opencode",
4
4
  "packageName": "@webpresso/opencode-plugin",
5
- "packageVersion": "3.3.3",
5
+ "packageVersion": "3.3.4",
6
6
  "runtimeDirs": [],
7
7
  "skills": {
8
8
  "ai-deslop": {
9
9
  "digest": "sha256:c1da1003009073dd3923454947e1141efc2e7df5ad8d725a511ed5cff03bfb5c"
10
10
  },
11
11
  "autopilot": {
12
- "digest": "sha256:1d2f1ff0902f283c273395e474d9b7841b206b8635457b3c238e8e1df149b6ef"
12
+ "digest": "sha256:9205e5af016d0c4a665b0a64716c0c0a808044b37bbb61e939f74b55a7ca2d17"
13
13
  },
14
14
  "autoresearch": {
15
15
  "digest": "sha256:b4d51cd53beb4a3271827172dfbd0b1d27bd58761ca07a35d49a5d6324b87fdf"
@@ -87,7 +87,7 @@
87
87
  "digest": "sha256:bed3684a850651534f315d355cdeae50d951c429817df0f105cccdb7f4e1561b"
88
88
  },
89
89
  "ultragoal": {
90
- "digest": "sha256:7ed3e728027a9d1047a1dd030f88f23a6120450bf336fa73b1c9037857ab56ee"
90
+ "digest": "sha256:1eddfd05c48fb2abf26e5796e5f659a1e8ae3de466a847f1ba9ca635bf5e1a44"
91
91
  },
92
92
  "verify": {
93
93
  "digest": "sha256:bb22b3c997ef3b003e5558c01f0b1e844158a48f1bb5d7169851e5b0b343cd64"
@@ -20,7 +20,7 @@ using `wp_ultragoal_run` / `wp ultragoal run` and the current handoff.
20
20
 
21
21
  ## Outside-voice (required)
22
22
 
23
- After each ultragoal **phase or plan-gate milestone**, run an **OpenCode Go** outside-voice review and pick the model by purpose (plan critique DeepSeek Pro; coding quality Kimi Code first; cheap recheck DeepSeek Flash). Resolve IDs from live `opencode models opencode-go`. Lifecycle authority only via converged `wp review gate` — never self-approve. Full protocol: the `ultragoal` skill. Respect `review_budget` (default one sequential path; no multi-host stampede).
23
+ After each ultragoal **phase or plan-gate milestone**, run an **OpenCode Go** outside-voice review and pick the model by purpose. The purposefamily ordering lives in one place the committed reviewer policy rendered into the `opencode-go` skill — so follow that skill and do not restate the ordering here. Resolve IDs from live `opencode models opencode-go`. Lifecycle authority only via converged `wp review gate` — never self-approve. Full protocol: the `ultragoal` skill. Respect `review_budget` (default owned by `workflow-skills-routing.md`): one sequential path, no multi-host stampede.
24
24
 
25
25
  ## Vague gate
26
26
 
@@ -34,8 +34,9 @@ A brief is anchored when it includes a file path, symbol, issue number, test nam
34
34
  A leading `force:` is the only explicit bypass; strip it before creating the goal and
35
35
  record the bypass in the blueprint.
36
36
 
37
- Default budgets if the user omits them: `concurrency=4`, `fix_budget=1`,
38
- `review_budget=1`, no `/loop`. See `ultragoal` skill.
37
+ Default budgets if the user omits them: `concurrency=4`, `fix_budget=1`, no
38
+ `/loop`; `review_budget` per `workflow-skills-routing.md`. See `ultragoal`
39
+ skill.
39
40
 
40
41
  ## Tooling map
41
42
 
@@ -21,12 +21,12 @@ multi-agent swarms.
21
21
 
22
22
  ## Default budgets (override only when the user sets them)
23
23
 
24
- | Budget | Default | Meaning |
25
- | --------------- | --------- | ---------------------------------------------------------- |
26
- | `concurrency` | 4 (max 8) | Parallel ready tasks / implementer lanes |
27
- | `fix_budget` | 1 | Pre-existing issues fixable via `/fix` this phase |
28
- | `review_budget` | 1 | Outside-voice reviewers for merge-ready (0 for local work) |
29
- | `loop` | off | Do not run `/loop` or unbounded stop-hooks |
24
+ | Budget | Default | Meaning |
25
+ | --------------- | -------------------------------- | -------------------------------------------------- |
26
+ | `concurrency` | 4 (max 8) | Parallel ready tasks / implementer lanes |
27
+ | `fix_budget` | 1 | Pre-existing issues fixable via `/fix` this phase |
28
+ | `review_budget` | see `workflow-skills-routing.md` | Outside-voice reviewer paths, local vs merge-ready |
29
+ | `loop` | off | Do not run `/loop` or unbounded stop-hooks |
30
30
 
31
31
  Reject unbudgeted sleep-mode briefs (“complete all”, “full autopilot”, “go to sleep”)
32
32
  unless they name a blueprint/slug, budgets, and a stop condition. Route vague briefs
@@ -66,7 +66,8 @@ Fallback to `wp …` CLI only when the matching MCP tool is unavailable. Prefer
66
66
  6. **Opportunistic `/fix`:** at most `fix_budget` pre-existing issues per phase, each with
67
67
  named invariant + failing proof. Excess → handoff backlog (do not expand epic).
68
68
  7. **Validate / land:** local proof with `wp_qa` / targeted tools; outside review only when
69
- merge-ready and within `review_budget` (default **exactly 1** sequential outside voice).
69
+ merge-ready and within `review_budget` **exactly one sequential** outside voice unless
70
+ the user sets N (the default value lives in `workflow-skills-routing.md`).
70
71
  Prefer `wp review gate` for lifecycle authority. Use `wp_pr_*` for PR babysit — no
71
72
  multi-sleep poll loops; no parallel multi-reviewer stampede.
72
73
  8. Stop on `complete`, `cancelled`, blocked guard exhaustion, or `WP_ULTRAGOAL_DISABLE=1`.
@@ -87,7 +88,7 @@ primary checkout.
87
88
 
88
89
  Autopilot and agent-driven ultragoal loops **must** request an **OpenCode Go** outside-voice review after each **goal/phase milestone**, and must pick the model by purpose. Direct `wp review run` output is advisory only. Lifecycle authority that can satisfy promotion/completion gates comes only from a converged **`wp review gate`** (content-addressed ledger + bound artifact).
89
90
 
90
- Count each milestone review against `review_budget` for merge-ready claims: **exactly one sequential** reviewer path unless the user sets N. Prefer purpose-matched OpenCode Go first; do not fan out multi-host review swarms.
91
+ Count each milestone review against `review_budget` for merge-ready claims: **exactly one sequential** reviewer path unless the user sets N; the default value is owned by `workflow-skills-routing.md`. Prefer purpose-matched OpenCode Go first; do not fan out multi-host review swarms.
91
92
 
92
93
  ### Milestones that require a review
93
94
 
@@ -147,7 +148,8 @@ Use `--purpose plan` for plan-phase promotion and `--purpose delivery` for imple
147
148
  - If no PR-bound green CI is available, fall back to local **`wp_qa`**.
148
149
  - Open a PR early so CI can satisfy QA. Do **not** raise timeouts.
149
150
  - **Land** still requires a **MERGED** PR with green required checks bound to the projected
150
- source snapshot. Use `/verify --merge-ready` (review_budget=1), not default local verify.
151
+ source snapshot. Use `/verify --merge-ready` (merge-ready `review_budget`, per
152
+ `workflow-skills-routing.md`), not default local verify.
151
153
 
152
154
  ## Snapshot / dirty worktree
153
155