@boyingliu01/opencode-plugin 0.35.10 → 0.35.12
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tool } from "@opencode-ai/plugin"
|
|
2
2
|
import { z } from "zod"
|
|
3
|
-
import { exec, execSync, spawn } from "node:child_process"
|
|
3
|
+
import { exec, execFileSync, execSync, spawn } from "node:child_process"
|
|
4
4
|
import { promisify } from "node:util"
|
|
5
5
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, rmSync } from "node:fs"
|
|
6
6
|
import { join } from "node:path"
|
|
@@ -345,7 +345,7 @@ function generateSessionTitle(dbPath: string, sessionId: string): string {
|
|
|
345
345
|
ORDER BY m.time_created DESC
|
|
346
346
|
LIMIT 10
|
|
347
347
|
`
|
|
348
|
-
const raw =
|
|
348
|
+
const raw = execFileSync("sqlite3", [dbPath, sql], {
|
|
349
349
|
encoding: "utf8",
|
|
350
350
|
timeout: 5000,
|
|
351
351
|
})
|
|
@@ -492,7 +492,11 @@ function writeSessionModel(dbPath: string, sessionId: string, modelJson: string)
|
|
|
492
492
|
const escapedModel = modelJson.replace(/'/g, "''")
|
|
493
493
|
const sql = `UPDATE session SET model = '${escapedModel}', time_updated = ${Date.now()} WHERE id = '${escapedId}'`
|
|
494
494
|
try {
|
|
495
|
-
execSync
|
|
495
|
+
// execFileSync, NOT execSync: `dbPath` was interpolated into a shell string with
|
|
496
|
+
// only double quotes for protection, so a path containing `"` or `$()` broke out
|
|
497
|
+
// into shell (semgrep security-audit flagged it as a command-injection sink).
|
|
498
|
+
// Passing the arguments as an array removes the shell from the picture entirely.
|
|
499
|
+
execFileSync("sqlite3", [dbPath, sql], { timeout: SQLITE_TIMEOUT_MS })
|
|
496
500
|
} catch (err) {
|
|
497
501
|
// Contract is to propagate: the caller renders the failure as
|
|
498
502
|
// "Session reload failed: <message>". Wrapped so the IO sits inside
|
|
@@ -616,7 +620,7 @@ function renameSession(sessionId: string, newTitle?: string): string {
|
|
|
616
620
|
const escapedId = sessionId.replace(/'/g, "''")
|
|
617
621
|
const sql = `UPDATE session SET title = '${escapedTitle}', time_updated = ${Date.now()} WHERE id = '${escapedId}'`
|
|
618
622
|
try {
|
|
619
|
-
|
|
623
|
+
execFileSync("sqlite3", [dbPath, sql], { timeout: SQLITE_TIMEOUT_MS })
|
|
620
624
|
return `Session renamed to: "${trimmed}"`
|
|
621
625
|
} catch (err) {
|
|
622
626
|
const msg = err instanceof Error ? err.message : String(err)
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/DELPHI-REVIEW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-10-30
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** a92243d7
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.12.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/SPRINT-FLOW KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-10-30
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** a92243d7
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.12.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
**6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SKILLS/TEST-SPECIFICATION-ALIGNMENT KNOWLEDGE BASE
|
|
2
2
|
|
|
3
3
|
**Generated:** 2026-10-30
|
|
4
|
-
**Commit:**
|
|
4
|
+
**Commit:** a92243d7
|
|
5
5
|
**Branch:** main
|
|
6
|
-
**Version:** 0.35.
|
|
6
|
+
**Version:** 0.35.12.0
|
|
7
7
|
|
|
8
8
|
## OVERVIEW
|
|
9
9
|
Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
|