prjct-cli 3.83.0 → 3.87.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 +20 -0
- package/assets/statusline/statusline.sh +36 -2
- package/bin/prjct.cjs +1 -0
- package/dist/bin/prjct-core.mjs +813 -713
- package/dist/bin/prjct-hooks.mjs +425 -356
- package/dist/bin/prjct.mjs +9 -3
- package/dist/daemon/entry.mjs +697 -619
- package/dist/mcp/server.mjs +316 -290
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [3.87.0] - 2026-08-12
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- efficiency
|
|
9
|
+
|
|
10
|
+
## [3.86.0] - 2026-08-12
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- efficiency
|
|
14
|
+
|
|
15
|
+
## [3.85.0] - 2026-08-12
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- Review AGENTS.md and CLAUDE.md surface optimization using canonical-file symlinks
|
|
19
|
+
|
|
20
|
+
## [3.84.0] - 2026-08-11
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- efficiency
|
|
24
|
+
|
|
5
25
|
## [3.83.0] - 2026-08-10
|
|
6
26
|
|
|
7
27
|
### Added
|
|
@@ -4,6 +4,34 @@
|
|
|
4
4
|
# Modular component system with graceful degradation
|
|
5
5
|
# ============================================================================
|
|
6
6
|
|
|
7
|
+
# Render cache: Claude Code re-renders constantly, so cache the full rendered
|
|
8
|
+
# line for 2s keyed by project (PWD hash). This fast path runs BEFORE the
|
|
9
|
+
# bash 4 re-exec, so it must stay bash 3.2 / POSIX compatible (no assoc
|
|
10
|
+
# arrays, no mapfile). The epoch is stored inside the cache file (line 1) to
|
|
11
|
+
# avoid stat differences between macOS and Linux.
|
|
12
|
+
PRJCT_RENDER_TTL=2
|
|
13
|
+
_prjct_hash=$(printf '%s' "$PWD" | cksum 2>/dev/null)
|
|
14
|
+
_prjct_hash=${_prjct_hash%% *}
|
|
15
|
+
[[ -z "$_prjct_hash" ]] && _prjct_hash="default"
|
|
16
|
+
PRJCT_RENDER_CACHE="${TMPDIR:-/tmp}/prjct-statusline-cache.${_prjct_hash}"
|
|
17
|
+
_prjct_now=$(date +%s)
|
|
18
|
+
|
|
19
|
+
if [[ -z "$PRJCT_STATUSLINE_NO_CACHE" && -f "$PRJCT_RENDER_CACHE" ]]; then
|
|
20
|
+
{
|
|
21
|
+
IFS= read -r _prjct_epoch
|
|
22
|
+
IFS= read -r _prjct_cached_render
|
|
23
|
+
} < "$PRJCT_RENDER_CACHE"
|
|
24
|
+
case $_prjct_epoch in
|
|
25
|
+
''|*[!0-9]*) _prjct_epoch=0 ;;
|
|
26
|
+
esac
|
|
27
|
+
if (( _prjct_now - _prjct_epoch < PRJCT_RENDER_TTL )); then
|
|
28
|
+
# Drain stdin with shell builtins so Claude Code isn't left hanging on the pipe.
|
|
29
|
+
while IFS= read -r _prjct_discard || [[ -n "$_prjct_discard" ]]; do :; done
|
|
30
|
+
printf '%s\n' "$_prjct_cached_render"
|
|
31
|
+
exit 0
|
|
32
|
+
fi
|
|
33
|
+
fi
|
|
34
|
+
|
|
7
35
|
# Require bash 4.0+ for associative arrays
|
|
8
36
|
if [[ ${BASH_VERSINFO[0]} -lt 4 ]]; then
|
|
9
37
|
# Try to find a modern bash and re-exec
|
|
@@ -99,5 +127,11 @@ build_statusline() {
|
|
|
99
127
|
echo -e "$line"
|
|
100
128
|
}
|
|
101
129
|
|
|
102
|
-
# Output the statusline
|
|
103
|
-
build_statusline
|
|
130
|
+
# Output the statusline (and refresh the render cache)
|
|
131
|
+
rendered=$(build_statusline)
|
|
132
|
+
if [[ -z "$PRJCT_STATUSLINE_NO_CACHE" ]]; then
|
|
133
|
+
PRJCT_RENDER_CACHE_TMP="${PRJCT_RENDER_CACHE}.$$"
|
|
134
|
+
{ printf '%s\n' "$_prjct_now"; printf '%s\n' "$rendered"; } > "$PRJCT_RENDER_CACHE_TMP" 2>/dev/null
|
|
135
|
+
mv -f "$PRJCT_RENDER_CACHE_TMP" "$PRJCT_RENDER_CACHE" 2>/dev/null || true
|
|
136
|
+
fi
|
|
137
|
+
printf '%s\n' "$rendered"
|
package/bin/prjct.cjs
CHANGED