@synkro-sh/cli 1.3.36 → 1.3.38
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 +14 -6
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -2
package/dist/bootstrap.js
CHANGED
|
@@ -790,6 +790,7 @@ if [ "$SYNKRO_CAPTURE_DEPTH" = "local_only" ] && [ -n "$VERDICT_KIND" ]; then
|
|
|
790
790
|
--arg category "$CATEGORY" \\
|
|
791
791
|
--arg model "\${CC_MODEL:-claude-sonnet-4-6}" \\
|
|
792
792
|
--arg tool_name "$TOOL_NAME" \\
|
|
793
|
+
--arg repo "\${GIT_REPO:-}" \\
|
|
793
794
|
'{
|
|
794
795
|
event_id: $event_id,
|
|
795
796
|
timestamp: $timestamp,
|
|
@@ -800,7 +801,7 @@ if [ "$SYNKRO_CAPTURE_DEPTH" = "local_only" ] && [ -n "$VERDICT_KIND" ]; then
|
|
|
800
801
|
category: $category,
|
|
801
802
|
model: $model,
|
|
802
803
|
tool_name: $tool_name
|
|
803
|
-
}')
|
|
804
|
+
} + (if $repo != "" then {repo: $repo} else {} end)')
|
|
804
805
|
curl -sS -X POST "\${GATEWAY_URL}/api/v1/events/local-verdict" \\
|
|
805
806
|
-H "Content-Type: application/json" \\
|
|
806
807
|
-H "Authorization: Bearer $JWT" \\
|
|
@@ -1267,6 +1268,7 @@ if [ "$SYNKRO_CAPTURE_DEPTH" = "local_only" ] && [ -n "$DECISION" ]; then
|
|
|
1267
1268
|
--arg category "$LOCAL_CATEGORY" \\
|
|
1268
1269
|
--arg model "\${CC_MODEL:-claude-sonnet-4-6}" \\
|
|
1269
1270
|
--arg tool_name "$TOOL_NAME" \\
|
|
1271
|
+
--arg repo "\${GIT_REPO:-}" \\
|
|
1270
1272
|
'{
|
|
1271
1273
|
event_id: $event_id,
|
|
1272
1274
|
timestamp: $timestamp,
|
|
@@ -1276,7 +1278,7 @@ if [ "$SYNKRO_CAPTURE_DEPTH" = "local_only" ] && [ -n "$DECISION" ]; then
|
|
|
1276
1278
|
category: $category,
|
|
1277
1279
|
model: $model,
|
|
1278
1280
|
tool_name: $tool_name
|
|
1279
|
-
}')
|
|
1281
|
+
} + (if $repo != "" then {repo: $repo} else {} end)')
|
|
1280
1282
|
curl -sS -X POST "\${GATEWAY_URL}/api/v1/events/local-verdict" \\
|
|
1281
1283
|
-H "Content-Type: application/json" \\
|
|
1282
1284
|
-H "Authorization: Bearer $JWT" \\
|
|
@@ -1506,7 +1508,11 @@ if [ "$USE_LOCAL" = "true" ]; then
|
|
|
1506
1508
|
if [ -n "$V_INNER" ]; then
|
|
1507
1509
|
LOCAL_OK=$(printf '%s' "$V_INNER" | sed -nE 's|.*<ok>(.*)</ok>.*|\\1|p' | head -1)
|
|
1508
1510
|
LOCAL_OK="\${LOCAL_OK:-true}"
|
|
1509
|
-
#
|
|
1511
|
+
# Top-level <reason> (clean diff). Skip text inside <violation>...</violation>
|
|
1512
|
+
# by stripping those blocks first so the regex doesn't grab a violation reason.
|
|
1513
|
+
OUTER_V=$(printf '%s' "$V_INNER" | sed -E 's|<violation>[^<]*(<[^/]+>[^<]*</[^>]+>[^<]*)*</violation>||g')
|
|
1514
|
+
OUTER_REASON=$(printf '%s' "$OUTER_V" | sed -nE 's|.*<reason>(.*)</reason>.*|\\1|p' | head -1)
|
|
1515
|
+
# First violation block fields (when ok=false).
|
|
1510
1516
|
FIRST_V=$(printf '%s' "$V_INNER" | awk -v RS='</violation>' '/<violation>/{print; exit}')
|
|
1511
1517
|
LOCAL_SEV=$(printf '%s' "$FIRST_V" | sed -nE 's|.*<severity>(.*)</severity>.*|\\1|p' | head -1)
|
|
1512
1518
|
LOCAL_CAT=$(printf '%s' "$FIRST_V" | sed -nE 's|.*<category>(.*)</category>.*|\\1|p' | head -1)
|
|
@@ -1517,10 +1523,11 @@ if [ "$USE_LOCAL" = "true" ]; then
|
|
|
1517
1523
|
--arg sev "\${LOCAL_SEV:-low}" \\
|
|
1518
1524
|
--arg cat "\${LOCAL_CAT:-unspecified}" \\
|
|
1519
1525
|
--arg reason "$LOCAL_REASON" \\
|
|
1526
|
+
--arg outer_reason "$OUTER_REASON" \\
|
|
1520
1527
|
'if $ok == "false" then
|
|
1521
1528
|
{ok: false, severity: $sev, category: $cat, reason: $reason}
|
|
1522
1529
|
else
|
|
1523
|
-
{ok: true, severity: "low", category: "clean", reason:
|
|
1530
|
+
{ok: true, severity: "low", category: "clean", reason: $outer_reason}
|
|
1524
1531
|
end')
|
|
1525
1532
|
else
|
|
1526
1533
|
RESP=""
|
|
@@ -1573,11 +1580,12 @@ if [ "$SYNKRO_CAPTURE_DEPTH" = "local_only" ]; then
|
|
|
1573
1580
|
--arg category "$CATEGORY" \\
|
|
1574
1581
|
--arg model "\${CC_MODEL:-claude-sonnet-4-6}" \\
|
|
1575
1582
|
--arg tool_name "$TOOL_NAME" \\
|
|
1583
|
+
--arg repo "\${GIT_REPO:-}" \\
|
|
1576
1584
|
'{
|
|
1577
1585
|
event_id: $event_id, timestamp: $timestamp, hook_type: $hook_type,
|
|
1578
1586
|
verdict: $verdict, severity: $severity, risk_level: $risk_level,
|
|
1579
1587
|
category: $category, model: $model, tool_name: $tool_name
|
|
1580
|
-
}')
|
|
1588
|
+
} + (if $repo != "" then {repo: $repo} else {} end)')
|
|
1581
1589
|
curl -sS -X POST "\${GATEWAY_URL}/api/v1/events/local-verdict" \\
|
|
1582
1590
|
-H "Content-Type: application/json" \\
|
|
1583
1591
|
-H "Authorization: Bearer $JWT" \\
|
|
@@ -3715,7 +3723,7 @@ function writeConfigEnv(opts) {
|
|
|
3715
3723
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
3716
3724
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
3717
3725
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
3718
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.3.
|
|
3726
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.3.38")}`
|
|
3719
3727
|
];
|
|
3720
3728
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
3721
3729
|
if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);
|