@synkro-sh/cli 1.3.32 → 1.3.33

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
@@ -1520,6 +1520,36 @@ SEVERITY=$(echo "$RESP" | jq -r '.severity // "low"' 2>/dev/null)
1520
1520
  CATEGORY=$(echo "$RESP" | jq -r '.category // "unspecified"' 2>/dev/null)
1521
1521
  REASON=$(echo "$RESP" | jq -r '.reason // ""' 2>/dev/null)
1522
1522
 
1523
+ # Fire-and-forget anonymized telemetry for local_only mode (post-edit grading verdict).
1524
+ if [ "$SYNKRO_CAPTURE_DEPTH" = "local_only" ]; then
1525
+ if [ "$OK" = "false" ]; then
1526
+ LOCAL_VERDICT="warn"; LOCAL_SEVERITY="block"; LOCAL_RISK="high"
1527
+ else
1528
+ LOCAL_VERDICT="allow"; LOCAL_SEVERITY="audit"; LOCAL_RISK="low"
1529
+ fi
1530
+ (
1531
+ ANON_BODY=$(jq -n \\
1532
+ --arg event_id "$(uuidgen 2>/dev/null || echo "evt_$(date +%s)_$$")" \\
1533
+ --arg timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \\
1534
+ --arg hook_type "edit_capture" \\
1535
+ --arg verdict "$LOCAL_VERDICT" \\
1536
+ --arg severity "$LOCAL_SEVERITY" \\
1537
+ --arg risk_level "$LOCAL_RISK" \\
1538
+ --arg category "$CATEGORY" \\
1539
+ --arg model "\${CC_MODEL:-claude-sonnet-4-6}" \\
1540
+ --arg tool_name "$TOOL_NAME" \\
1541
+ '{
1542
+ event_id: $event_id, timestamp: $timestamp, hook_type: $hook_type,
1543
+ verdict: $verdict, severity: $severity, risk_level: $risk_level,
1544
+ category: $category, model: $model, tool_name: $tool_name
1545
+ }')
1546
+ curl -sS -X POST "\${GATEWAY_URL}/api/v1/events/local-verdict" \\
1547
+ -H "Content-Type: application/json" \\
1548
+ -H "Authorization: Bearer $JWT" \\
1549
+ -d "$ANON_BODY" --max-time 2 >/dev/null 2>&1
1550
+ ) &
1551
+ fi
1552
+
1523
1553
  if [ "$OK" = "false" ] && [ -n "$REASON" ]; then
1524
1554
  synkro_log "editScan $BASENAME \u2192 FAIL ($CATEGORY): $REASON"
1525
1555
  SYS_MSG="[synkro] editScan $BASENAME \u2192 FAIL: \${REASON}"
@@ -3602,7 +3632,7 @@ function writeConfigEnv(opts) {
3602
3632
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
3603
3633
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
3604
3634
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
3605
- `SYNKRO_VERSION=${shellQuoteSingle("1.3.32")}`
3635
+ `SYNKRO_VERSION=${shellQuoteSingle("1.3.33")}`
3606
3636
  ];
3607
3637
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
3608
3638
  if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);