@synkro-sh/cli 1.3.45 → 1.3.47

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/dist/bootstrap.js CHANGED
@@ -584,16 +584,15 @@ ensure_fresh_jwt() {
584
584
 
585
585
  ensure_fresh_jwt
586
586
 
587
- # Resolve tier + capture_depth (cached 60 min) \u2014 server is canonical via /cli/me.
587
+ # Resolve tier (cached 60 min) + capture_depth (cached 2 min) via /cli/me.
588
588
  TIER_CACHE_FILE="$HOME/.synkro/.tier-cache-\${SYNKRO_USER_ID:-default}"
589
589
  CD_CACHE_FILE="\${TIER_CACHE_FILE}.cd"
590
590
  SYNKRO_INFERENCE_TIER=""
591
591
  SYNKRO_CAPTURE_DEPTH=""
592
592
  if find "$TIER_CACHE_FILE" -mmin -60 2>/dev/null | grep -q .; then
593
593
  SYNKRO_INFERENCE_TIER=$(cat "$TIER_CACHE_FILE" 2>/dev/null)
594
- SYNKRO_CAPTURE_DEPTH=$(cat "$CD_CACHE_FILE" 2>/dev/null)
595
594
  fi
596
- if [ -z "$SYNKRO_INFERENCE_TIER" ]; then
595
+ if [ -z "$SYNKRO_INFERENCE_TIER" ] || [ -z "$SYNKRO_CAPTURE_DEPTH" ]; then
597
596
  ME_RESP=$(curl -sS "\${GATEWAY_URL}/api/v1/cli/me" -H "Authorization: Bearer $JWT" --max-time 2 2>/dev/null || echo "")
598
597
  if [ -n "$ME_RESP" ]; then
599
598
  SYNKRO_INFERENCE_TIER=$(echo "$ME_RESP" | jq -r '.tier // empty' 2>/dev/null)
@@ -1081,16 +1080,15 @@ ensure_fresh_jwt() {
1081
1080
  ensure_fresh_jwt
1082
1081
 
1083
1082
 
1084
- # Resolve tier + capture_depth (cached 60 min) \u2014 server is canonical via /cli/me.
1083
+ # Resolve tier (cached 60 min) + capture_depth (cached 2 min) via /cli/me.
1085
1084
  TIER_CACHE_FILE="$HOME/.synkro/.tier-cache-\${SYNKRO_USER_ID:-default}"
1086
1085
  CD_CACHE_FILE="\${TIER_CACHE_FILE}.cd"
1087
1086
  SYNKRO_INFERENCE_TIER=""
1088
1087
  SYNKRO_CAPTURE_DEPTH=""
1089
1088
  if find "$TIER_CACHE_FILE" -mmin -60 2>/dev/null | grep -q .; then
1090
1089
  SYNKRO_INFERENCE_TIER=$(cat "$TIER_CACHE_FILE" 2>/dev/null)
1091
- SYNKRO_CAPTURE_DEPTH=$(cat "$CD_CACHE_FILE" 2>/dev/null)
1092
1090
  fi
1093
- if [ -z "$SYNKRO_INFERENCE_TIER" ]; then
1091
+ if [ -z "$SYNKRO_INFERENCE_TIER" ] || [ -z "$SYNKRO_CAPTURE_DEPTH" ]; then
1094
1092
  ME_RESP=$(curl -sS "\${GATEWAY_URL}/api/v1/cli/me" -H "Authorization: Bearer $JWT" --max-time 2 2>/dev/null || echo "")
1095
1093
  if [ -n "$ME_RESP" ]; then
1096
1094
  SYNKRO_INFERENCE_TIER=$(echo "$ME_RESP" | jq -r '.tier // empty' 2>/dev/null)
@@ -1523,7 +1521,7 @@ if find "$TIER_CACHE_FILE" -mmin -60 2>/dev/null | grep -q .; then
1523
1521
  SYNKRO_INFERENCE_TIER=$(cat "$TIER_CACHE_FILE" 2>/dev/null || true)
1524
1522
  SYNKRO_CAPTURE_DEPTH=$(cat "$CD_CACHE_FILE" 2>/dev/null || true)
1525
1523
  fi
1526
- if [ -z "$SYNKRO_INFERENCE_TIER" ]; then
1524
+ if [ -z "$SYNKRO_INFERENCE_TIER" ] || [ -z "$SYNKRO_CAPTURE_DEPTH" ]; then
1527
1525
  ME_RESP=$(curl -sS "\${GATEWAY_URL}/api/v1/cli/me" -H "Authorization: Bearer $JWT" --max-time 2 2>/dev/null || echo "")
1528
1526
  if [ -n "$ME_RESP" ]; then
1529
1527
  SYNKRO_INFERENCE_TIER=$(echo "$ME_RESP" | jq -r '.tier // empty' 2>/dev/null || true)
@@ -3856,7 +3854,7 @@ function writeConfigEnv(opts) {
3856
3854
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
3857
3855
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
3858
3856
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
3859
- `SYNKRO_VERSION=${shellQuoteSingle("1.3.45")}`
3857
+ `SYNKRO_VERSION=${shellQuoteSingle("1.3.47")}`
3860
3858
  ];
3861
3859
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
3862
3860
  if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);