@synkro-sh/cli 1.3.45 → 1.3.46
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 +3 -5
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -584,14 +584,13 @@ ensure_fresh_jwt() {
|
|
|
584
584
|
|
|
585
585
|
ensure_fresh_jwt
|
|
586
586
|
|
|
587
|
-
# Resolve tier
|
|
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
595
|
if [ -z "$SYNKRO_INFERENCE_TIER" ]; then
|
|
597
596
|
ME_RESP=$(curl -sS "\${GATEWAY_URL}/api/v1/cli/me" -H "Authorization: Bearer $JWT" --max-time 2 2>/dev/null || echo "")
|
|
@@ -1081,14 +1080,13 @@ ensure_fresh_jwt() {
|
|
|
1081
1080
|
ensure_fresh_jwt
|
|
1082
1081
|
|
|
1083
1082
|
|
|
1084
|
-
# Resolve tier
|
|
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
1091
|
if [ -z "$SYNKRO_INFERENCE_TIER" ]; then
|
|
1094
1092
|
ME_RESP=$(curl -sS "\${GATEWAY_URL}/api/v1/cli/me" -H "Authorization: Bearer $JWT" --max-time 2 2>/dev/null || echo "")
|
|
@@ -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.
|
|
3857
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.3.46")}`
|
|
3860
3858
|
];
|
|
3861
3859
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
3862
3860
|
if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);
|