@boyingliu01/opencode-plugin 0.10.10 → 0.10.11

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.ts CHANGED
@@ -129,17 +129,19 @@ async function checkXpGateUpdate(): Promise<UpgradeResult> {
129
129
 
130
130
  writeCache(XP_GATE_CACHE_FILE, { ts: Date.now(), localVersion, remoteVersion })
131
131
  try {
132
- const child = spawn("npm", ["install", "-g", `${XP_GATE_NPM_PKG}@${remoteVersion}`], {
133
- stdio: "pipe",
134
- timeout: 120_000,
132
+ const exitCode = await new Promise<number | null>((resolve, reject) => {
133
+ const child = spawn("npm", ["install", "-g", `${XP_GATE_NPM_PKG}@${remoteVersion}`], {
134
+ stdio: "pipe",
135
+ timeout: 120_000,
136
+ })
137
+ child.on("close", (code) => resolve(code))
138
+ child.on("error", (err) => reject(err))
135
139
  })
136
- child.on("close", (code) => {
137
- if (code === 0) {
138
- writeCache(XP_GATE_CACHE_FILE, { ts: Date.now(), localVersion: remoteVersion, remoteVersion, status: "current" })
139
- }
140
- })
141
- child.on("error", () => { /* empty — cache won't get status:current, so next check retries */ })
142
- return { action: "upgraded", localVersion, remoteVersion }
140
+ if (exitCode === 0) {
141
+ writeCache(XP_GATE_CACHE_FILE, { ts: Date.now(), localVersion: remoteVersion, remoteVersion, status: "current" })
142
+ return { action: "upgraded", localVersion, remoteVersion }
143
+ }
144
+ return { action: "error", localVersion, remoteVersion, error: `npm install exited with code ${exitCode}` }
143
145
  } catch (err) {
144
146
  const msg = err instanceof Error ? err.message : String(err)
145
147
  return { action: "error", localVersion, remoteVersion, error: msg }
@@ -319,11 +321,9 @@ export const XpGatePlugin = async (input: OpenCodePluginInput) => {
319
321
  "chat.message": async (_input: { message: string }) => {
320
322
  if (!checked) {
321
323
  checked = true
322
- runBackgroundUpdates(directory).then((msg) => {
323
- if (msg) process.stderr.write(`${msg}\n`)
324
- })
324
+ const msg = await runBackgroundUpdates(directory).catch(() => null)
325
+ if (msg) process.stderr.write(`${msg}\n`)
325
326
  }
326
- return { action: "continue" }
327
327
  },
328
328
  }
329
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.10.10",
3
+ "version": "0.10.11",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "description": "XP-Gate quality gates + AI workflow skills + Sprint Flow TUI sidebar for OpenCode",
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-06-23
4
4
  **Commit:** bac916f
5
5
  **Branch:** main
6
- **Version:** 0.10.10.0
6
+ **Version:** 0.10.11.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, 3 experts from ≥2 providers, domestic models only). Supports design + code-walkthrough modes.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-06-23
4
4
  **Commit:** bac916f
5
5
  **Branch:** main
6
- **Version:** 0.10.10.0
6
+ **Version:** 0.10.11.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **11-phase** development pipeline: ISOLATE → AUTO-ESTIMATE → THINK → PLAN → BUILD → REVIEW → USER ACCEPTANCE → FEEDBACK → SHIP → LAND → CLEANUP. Phase 2 default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE in Phase 1: design must pass Delphi review (≥90% consensus) before any coding.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-06-23
4
4
  **Commit:** bac916f
5
5
  **Branch:** main
6
- **Version:** 0.10.10.0
6
+ **Version:** 0.10.11.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.