prjct-cli 3.82.0 → 3.84.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 CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [3.84.0] - 2026-08-11
6
+
7
+ ### Added
8
+ - efficiency
9
+
10
+ ## [3.83.0] - 2026-08-10
11
+
12
+ ### Added
13
+
14
+ - Document MCP 2026 compatibility and efficiency controls
15
+ - MCP `2026-07-28` stdio negotiation with transparent 2025-era compatibility, cacheable discovery/tool catalogs, and a static-list capability that avoids unused subscriptions.
16
+
17
+ ### Changed
18
+
19
+ - Migrated to the split MCP TypeScript SDK v2 and Zod 4. The default 10-tool catalog is 36.7% smaller than v3.82.0 (7,699 → 4,871 serialized bytes) with an effectively flat server bundle (+0.09%).
20
+
5
21
  ## [3.82.0] - 2026-08-10
6
22
 
7
23
  ### Added
package/README.md CHANGED
@@ -359,6 +359,8 @@ Remove with `prjct claude uninstall` (hooks only) or `prjct uninstall` (everythi
359
359
 
360
360
  prjct-cli exposes an MCP server with 6 tool groups (every tool is prefixed `prjct_`):
361
361
 
362
+ The stdio server negotiates MCP `2026-07-28` while retaining the legacy 2025 handshake for existing hosts. Modern clients skip `initialize`, cache discovery and the static tool catalog privately for 24 hours, and avoid unnecessary list-change subscriptions. The default `core` tier exposes only 10 high-signal tools; set `PRJCT_MCP_TOOLS=standard|all` when a host needs the larger surface.
363
+
362
364
  | Group | Tools |
363
365
  |---|---|
364
366
  | **memory** | `mem_save`, `mem_list`, `mem_similar`, `mem_forget`, `guard`, `record_decision` / `record_gotcha` / `record_learning` / `record_fact`, `capture_inbox` |
@@ -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
@@ -362,6 +362,7 @@ async function main() {
362
362
  'hook',
363
363
  '__internal-auto-update',
364
364
  '__post-upgrade',
365
+ '__internal-ensure-daemon',
365
366
  ])
366
367
  const version = packageVersion()
367
368
  if (!setupSkipCommands.has(args[0]) && shouldRunSetup(version)) {