prjct-cli 2.50.0 → 2.51.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/CHANGELOG.md +10 -0
- package/bin/prjct +21 -15
- package/dist/bin/prjct-core.mjs +371 -368
- package/dist/daemon/entry.mjs +285 -282
- package/dist/mcp/server.mjs +258 -255
- package/dist/templates.json +1 -1
- package/package.json +1 -2
- package/templates/skills/prjct/SKILL.md +1 -0
- package/scripts/ensure-bun.sh +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.51.0] - 2026-06-20
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **`prjct tdd` — opt-in Test-Driven Development mode.** For dev teams that want test-first discipline, set an intensity per project (mirrors `lean`): `off` (default, zero change), `assist` (skill biases the implement loop test-first; `ship` reminds), or `strict` (test-first expected; `ship` surfaces a hard gate). `prjct tdd check` runs the auto-detected test command (per-stack via `detectProjectCommands`) and reports red/green — the real teeth; `prjct tdd` alone shows the mode + detected command. Enforcement stays consistent with prjct's model: the CLI surfaces the gate, `prjct tdd check` is the actual red/green, the agent honours it (no new engine). `prjct ship --no-test-gate` overrides.
|
|
7
|
+
|
|
8
|
+
## [2.50.1] - 2026-06-20
|
|
9
|
+
|
|
10
|
+
### Security
|
|
11
|
+
- **Removed the runtime Bun auto-installer (supply-chain hardening).** The CLI no longer runs `scripts/ensure-bun.sh` (an unpinned, unverified `curl -fsSL https://bun.sh/install | bash`) on first invocation when only Node is present — `bin/prjct` now falls straight back to Node (a first-class runtime). The script is deleted and dropped from the published tarball (`files[]`), so the package ships **zero `curl | bash`**. The install-time variant was already gone (no `postinstall` since #391); this closes the same pattern on the runtime path. Addresses the OSV **MAL-2026-4647** false-positive (Amazon Inspector "alternate-runtime-dropper", pinned to 2.21.0) at its root. Bun is still preferred when already installed; users who want it install it themselves (https://bun.sh).
|
|
12
|
+
|
|
3
13
|
## [2.50.0] - 2026-06-20
|
|
4
14
|
|
|
5
15
|
### Added
|
package/bin/prjct
CHANGED
|
@@ -153,9 +153,22 @@ run_with_node() {
|
|
|
153
153
|
fi
|
|
154
154
|
fi
|
|
155
155
|
|
|
156
|
-
# prjct uses node's built-in `node:sqlite` (zero native deps, no postinstall)
|
|
157
|
-
#
|
|
158
|
-
#
|
|
156
|
+
# prjct uses node's built-in `node:sqlite` (zero native deps, no postinstall),
|
|
157
|
+
# which requires Node >=22.5. Below that — and since we no longer auto-install
|
|
158
|
+
# Bun (MAL-2026-4647) — prjct can't run: fail with a clear, actionable message
|
|
159
|
+
# instead of a cryptic `--experimental-sqlite` flag error.
|
|
160
|
+
NODE_VER="$(node -v 2>/dev/null | sed 's/^v//')"
|
|
161
|
+
NODE_MAJ="${NODE_VER%%.*}"
|
|
162
|
+
NODE_MIN_REST="${NODE_VER#*.}"
|
|
163
|
+
NODE_MIN="${NODE_MIN_REST%%.*}"
|
|
164
|
+
if [ "${NODE_MAJ:-0}" -lt 22 ] || { [ "${NODE_MAJ:-0}" -eq 22 ] && [ "${NODE_MIN:-0}" -lt 5 ]; }; then
|
|
165
|
+
echo "Error: prjct needs Node >=22.5 (for node:sqlite) or Bun — found Node ${NODE_VER:-unknown}."
|
|
166
|
+
echo " Upgrade Node (https://nodejs.org) or install Bun (https://bun.sh)."
|
|
167
|
+
exit 1
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
# On Node 22.5–23.x node:sqlite lives behind `--experimental-sqlite`; on Node
|
|
171
|
+
# 24+ it's unflagged and the flag is a tolerated no-op. Exporting it (vs an
|
|
159
172
|
# argv flag) means the daemon + any node child prjct spawns inherit it too.
|
|
160
173
|
# Prepended so a user's existing NODE_OPTIONS is preserved.
|
|
161
174
|
export NODE_OPTIONS="--experimental-sqlite${NODE_OPTIONS:+ $NODE_OPTIONS}"
|
|
@@ -167,21 +180,14 @@ main() {
|
|
|
167
180
|
# ALWAYS ensure setup first (self-healing)
|
|
168
181
|
ensure_setup
|
|
169
182
|
|
|
170
|
-
# Prefer bun if available (faster, native TS support)
|
|
183
|
+
# Prefer bun if available (faster, native TS support); otherwise fall back to
|
|
184
|
+
# node. We deliberately do NOT auto-install bun: fetching an unpinned
|
|
185
|
+
# `curl | bash` installer at runtime is a supply-chain risk (it triggered the
|
|
186
|
+
# MAL-2026-4647 false-positive). Node is a first-class runtime here — if a
|
|
187
|
+
# user wants bun for speed, they install it themselves (https://bun.sh).
|
|
171
188
|
if check_bun; then
|
|
172
189
|
run_with_bun "$@"
|
|
173
190
|
elif check_node; then
|
|
174
|
-
# Bun not found but Node available — try auto-install Bun (one-time)
|
|
175
|
-
ENSURE_BUN="$ROOT_DIR/scripts/ensure-bun.sh"
|
|
176
|
-
if [ -f "$ENSURE_BUN" ]; then
|
|
177
|
-
sh "$ENSURE_BUN"
|
|
178
|
-
# Re-source PATH in case Bun was just installed
|
|
179
|
-
export BUN_INSTALL="${BUN_INSTALL:-$HOME/.bun}"
|
|
180
|
-
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
181
|
-
if check_bun; then
|
|
182
|
-
run_with_bun "$@"
|
|
183
|
-
fi
|
|
184
|
-
fi
|
|
185
191
|
run_with_node "$@"
|
|
186
192
|
else
|
|
187
193
|
echo "Error: Neither bun nor node is installed."
|