@synkro-sh/cli 1.4.83 → 1.4.84

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
@@ -1991,7 +1991,7 @@ async function main() {
1991
1991
  const tagStr = tag(rt, config);
1992
1992
 
1993
1993
  if (config.silent) {
1994
- outputJson({ systemMessage: tagStr + ' editGuard \\u2192 skipped (silent mode)' });
1994
+ outputJson({ systemMessage: tagStr + ' editGuard \u2192 skipped (silent mode)' });
1995
1995
  return;
1996
1996
  }
1997
1997
 
@@ -2013,7 +2013,7 @@ async function main() {
2013
2013
  try {
2014
2014
  gradeResp = await localGrade('edit', graderPrompt);
2015
2015
  } catch {
2016
- outputJson({ systemMessage: tagStr + ' editGuard ' + fileShort + ' \\u2192 local grader unavailable, skipped' });
2016
+ outputJson({ systemMessage: tagStr + ' editGuard ' + fileShort + ' \u2192 local grader unavailable, skipped' });
2017
2017
  return;
2018
2018
  }
2019
2019
 
@@ -2034,7 +2034,7 @@ async function main() {
2034
2034
  ccModel: transcript.ccModel,
2035
2035
  });
2036
2036
  outputJson({
2037
- systemMessage: tagStr + ' editGuard ' + fileShort + ' \\u2192 blocked: ' + guardReason,
2037
+ systemMessage: tagStr + ' editGuard ' + fileShort + ' \u2192 blocked: ' + guardReason,
2038
2038
  hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'deny', permissionDecisionReason: denyReason, additionalContext: denyReason },
2039
2039
  });
2040
2040
  return;
@@ -2047,7 +2047,7 @@ async function main() {
2047
2047
  rulesChecked: config.rules, violatedRules,
2048
2048
  ccModel: transcript.ccModel,
2049
2049
  });
2050
- outputJson({ systemMessage: tagStr + ' editGuard ' + fileShort + ' \\u2192 warning: ' + guardReason, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: 'Synkro local edit judge (audit). ' + guardReason } });
2050
+ outputJson({ systemMessage: tagStr + ' editGuard ' + fileShort + ' \u2192 warning: ' + guardReason, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: 'Synkro local edit judge (audit). ' + guardReason } });
2051
2051
  return;
2052
2052
  }
2053
2053
 
@@ -2058,7 +2058,7 @@ async function main() {
2058
2058
  rulesChecked: config.rules, violatedRules: [],
2059
2059
  ccModel: transcript.ccModel,
2060
2060
  });
2061
- const passLine = tagStr + ' editGuard ' + fileShort + ' \\u2192 pass: ' + (verdict.reason || 'no policy violations detected');
2061
+ const passLine = tagStr + ' editGuard ' + fileShort + ' \u2192 pass: ' + (verdict.reason || 'no policy violations detected');
2062
2062
  outputJson({ systemMessage: passLine, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: 'Synkro local edit judge. ' + (verdict.reason || 'no policy violations detected') } });
2063
2063
  return;
2064
2064
  }
@@ -2093,13 +2093,13 @@ async function main() {
2093
2093
  const resp = await postWithRetry(GATEWAY_URL + '/api/v1/hook/judge', body, jwt, 8000);
2094
2094
 
2095
2095
  if (!resp) {
2096
- log('editGuard ' + fileShort + ' \\u2192 error (timeout)');
2096
+ log('editGuard ' + fileShort + ' \u2192 error (timeout)');
2097
2097
  outputEmpty();
2098
2098
  return;
2099
2099
  }
2100
2100
 
2101
2101
  if (!resp.hook_response || typeof resp.hook_response !== 'object') {
2102
- log('editGuard ' + fileShort + ' \\u2192 pass (no hook_response)');
2102
+ log('editGuard ' + fileShort + ' \u2192 pass (no hook_response)');
2103
2103
  outputEmpty();
2104
2104
  return;
2105
2105
  }
@@ -2108,7 +2108,7 @@ async function main() {
2108
2108
  const decision = hookResp?.hookSpecificOutput?.permissionDecision;
2109
2109
 
2110
2110
  if (decision === 'deny' || decision === 'ask') {
2111
- log('editGuard ' + fileShort + ' \\u2192 BLOCKED');
2111
+ log('editGuard ' + fileShort + ' \u2192 BLOCKED');
2112
2112
  // Strip permissionDecision \u2014 we use systemMessage only
2113
2113
  const cleaned = { ...hookResp };
2114
2114
  if (cleaned.hookSpecificOutput) {
@@ -2119,7 +2119,7 @@ async function main() {
2119
2119
  outputJson(cleaned);
2120
2120
  } else {
2121
2121
  const reason = hookResp.reason || '';
2122
- log('editGuard ' + fileShort + ' \\u2192 pass' + (reason ? ': ' + reason : ''));
2122
+ log('editGuard ' + fileShort + ' \u2192 pass' + (reason ? ': ' + reason : ''));
2123
2123
  outputJson(hookResp);
2124
2124
  }
2125
2125
  } catch (err) {
@@ -2594,7 +2594,7 @@ async function main() {
2594
2594
  const rt = await route(config);
2595
2595
 
2596
2596
  if (config.silent) {
2597
- outputJson({ systemMessage: '[synkro:' + rt + ':cveScan] ' + fileShort + ' \\u2192 skipped (silent mode)' });
2597
+ outputJson({ systemMessage: '[synkro:' + rt + ':cveScan] ' + fileShort + ' \u2192 skipped (silent mode)' });
2598
2598
  return;
2599
2599
  }
2600
2600
 
@@ -2603,7 +2603,7 @@ async function main() {
2603
2603
  // Reconstruct proposed content
2604
2604
  const proposed = reconstructContent(toolName, toolInput, filePath, cwd);
2605
2605
  if (!proposed) {
2606
- outputJson({ systemMessage: cveTag + ' ' + fileShort + ' \\u2192 skip (no content)' });
2606
+ outputJson({ systemMessage: cveTag + ' ' + fileShort + ' \u2192 skip (no content)' });
2607
2607
  return;
2608
2608
  }
2609
2609
 
@@ -2632,7 +2632,7 @@ async function main() {
2632
2632
  });
2633
2633
  cveResp = await resp.json();
2634
2634
  } catch {
2635
- outputJson({ systemMessage: cveTag + ' ' + fileShort + ' \\u2192 error (timeout)' });
2635
+ outputJson({ systemMessage: cveTag + ' ' + fileShort + ' \u2192 error (timeout)' });
2636
2636
  return;
2637
2637
  }
2638
2638
 
@@ -2669,7 +2669,7 @@ async function main() {
2669
2669
  const top3 = findings.slice(0, 3).map(formatFinding).join('; ');
2670
2670
  const count = findings.length;
2671
2671
  const label = count === 1 ? 'advisory' : 'advisories';
2672
- const cveMsg = cveTag + ' ' + fileShort + ' \\u2192 ' + count + ' ' + label;
2672
+ const cveMsg = cveTag + ' ' + fileShort + ' \u2192 ' + count + ' ' + label;
2673
2673
  const ctx = 'CVE: ' + top3 + '\\nFix all issues before retrying. Do NOT ask the user to make the edit manually \u2014 upgrade the vulnerable dependencies yourself.';
2674
2674
 
2675
2675
  const cveIds = findings.slice(0, 10).map((f: any) =>
@@ -2689,7 +2689,7 @@ async function main() {
2689
2689
  return;
2690
2690
  }
2691
2691
 
2692
- outputJson({ systemMessage: cveTag + ' ' + fileShort + ' \\u2192 clean' });
2692
+ outputJson({ systemMessage: cveTag + ' ' + fileShort + ' \u2192 clean' });
2693
2693
  } catch (err) {
2694
2694
  process.stderr.write('[synkro] cveGuard error: ' + String(err) + '\\n');
2695
2695
  outputEmpty();
@@ -2862,7 +2862,7 @@ async function main() {
2862
2862
  const tagStr = tag(rt, config);
2863
2863
 
2864
2864
  if (config.silent) {
2865
- const msg = (installScanMsg ? installScanMsg + '\\n' : '') + tagStr + ' bashGuard \\u2192 skipped (silent mode)';
2865
+ const msg = (installScanMsg ? installScanMsg + '\\n' : '') + tagStr + ' bashGuard skipped (silent mode)';
2866
2866
  outputJson({ systemMessage: msg, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: msg } });
2867
2867
  return;
2868
2868
  }
@@ -2881,7 +2881,7 @@ async function main() {
2881
2881
  try {
2882
2882
  gradeResp = await localGrade('bash', graderPrompt);
2883
2883
  } catch {
2884
- outputJson({ systemMessage: tagStr + ' bashGuard \\u2192 local grader unavailable, skipped' });
2884
+ outputJson({ systemMessage: tagStr + ' bashGuard local grader unavailable, skipped' });
2885
2885
  return;
2886
2886
  }
2887
2887
 
@@ -2893,7 +2893,7 @@ async function main() {
2893
2893
  const guardReason = (verdict.ruleId ? '(' + verdict.ruleId + ') ' : '') + (verdict.reason || 'policy violation');
2894
2894
 
2895
2895
  if (mode === 'audit') {
2896
- const reason = tagStr + ' bashGuard \\u2192 warning' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation');
2896
+ const reason = tagStr + ' bashGuard warning' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation');
2897
2897
  const combined = (installScanMsg ? installScanMsg + '\\n' : '') + reason;
2898
2898
  outputJson({ systemMessage: combined, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: combined } });
2899
2899
  dispatchCapture(jwt, 'bash', 'warning', verdict.severity || 'medium', verdict.category || 'security',
@@ -2902,7 +2902,7 @@ async function main() {
2902
2902
  recentUserMessages: transcript.recentUserMessages, ccModel: transcript.ccModel,
2903
2903
  });
2904
2904
  } else {
2905
- const reason = tagStr + ' bashGuard \\u2192 blocked' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation') + '. Ask the user for explicit consent before retrying.';
2905
+ const reason = tagStr + ' bashGuard blocked' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation') + '. Ask the user for explicit consent before retrying.';
2906
2906
  const combined = (installScanMsg ? installScanMsg + '\\n' : '') + reason;
2907
2907
  outputJson({
2908
2908
  systemMessage: combined,
@@ -2915,7 +2915,7 @@ async function main() {
2915
2915
  });
2916
2916
  }
2917
2917
  } else {
2918
- const reason = tagStr + ' bashGuard \\u2192 pass: ' + (verdict.reason || 'no policy violations detected');
2918
+ const reason = tagStr + ' bashGuard pass: ' + (verdict.reason || 'no policy violations detected');
2919
2919
  const combined = (installScanMsg ? installScanMsg + '\\n' : '') + reason;
2920
2920
  outputJson({ systemMessage: combined, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: combined } });
2921
2921
  dispatchCapture(jwt, 'bash', 'pass', 'audit', verdict.category || 'trivial_utility',
@@ -2955,7 +2955,7 @@ async function main() {
2955
2955
  const resp = await postWithRetry(GATEWAY_URL + '/api/v1/hook/judge', body, jwt, 8000);
2956
2956
 
2957
2957
  if (!resp) {
2958
- log('bashGuard ' + cmdShort + ' \\u2192 error (timeout)');
2958
+ log('bashGuard ' + cmdShort + ' error (timeout)');
2959
2959
  if (installScanMsg) {
2960
2960
  outputJson({ systemMessage: installScanMsg, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: installScanMsg } });
2961
2961
  } else { outputEmpty(); }
@@ -2963,7 +2963,7 @@ async function main() {
2963
2963
  }
2964
2964
 
2965
2965
  if (!resp.hook_response || typeof resp.hook_response !== 'object') {
2966
- log('bashGuard ' + cmdShort + ' \\u2192 pass (no hook_response)');
2966
+ log('bashGuard ' + cmdShort + ' pass (no hook_response)');
2967
2967
  if (installScanMsg) {
2968
2968
  outputJson({ systemMessage: installScanMsg, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: installScanMsg } });
2969
2969
  } else { outputEmpty(); }
@@ -3039,7 +3039,7 @@ async function main() {
3039
3039
  const tagStr = tag(rt, config);
3040
3040
 
3041
3041
  if (config.silent) {
3042
- const msg = tagStr + ' agentGuard \\u2192 skipped (silent mode)';
3042
+ const msg = tagStr + ' agentGuard \u2192 skipped (silent mode)';
3043
3043
  outputJson({ systemMessage: msg, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: msg } });
3044
3044
  return;
3045
3045
  }
@@ -3062,7 +3062,7 @@ async function main() {
3062
3062
  try {
3063
3063
  gradeResp = await localGrade('bash', graderPrompt);
3064
3064
  } catch {
3065
- outputJson({ systemMessage: tagStr + ' agentGuard \\u2192 local grader unavailable, skipped' });
3065
+ outputJson({ systemMessage: tagStr + ' agentGuard \u2192 local grader unavailable, skipped' });
3066
3066
  return;
3067
3067
  }
3068
3068
 
@@ -3075,7 +3075,7 @@ async function main() {
3075
3075
  const guardReason = (verdict.ruleId ? '(' + verdict.ruleId + ') ' : '') + (verdict.reason || 'policy violation');
3076
3076
 
3077
3077
  if (mode === 'audit') {
3078
- const reason = tagStr + ' agentGuard \\u2192 warning' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation');
3078
+ const reason = tagStr + ' agentGuard \u2192 warning' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation');
3079
3079
  outputJson({ systemMessage: reason, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: reason } });
3080
3080
  dispatchCapture(jwt, 'agent', 'warning', verdict.severity || 'medium', verdict.category || 'security',
3081
3081
  toolName, gitRepo, sessionId, config.captureDepth, {
@@ -3083,7 +3083,7 @@ async function main() {
3083
3083
  recentUserMessages: transcript.recentUserMessages, ccModel: transcript.ccModel,
3084
3084
  });
3085
3085
  } else {
3086
- const reason = tagStr + ' agentGuard \\u2192 blocked' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation') + '. Ask the user for explicit consent before retrying.';
3086
+ const reason = tagStr + ' agentGuard \u2192 blocked' + (verdict.ruleId ? ' (' + verdict.ruleId + ')' : '') + ': ' + (verdict.reason || 'policy violation') + '. Ask the user for explicit consent before retrying.';
3087
3087
  outputJson({
3088
3088
  systemMessage: reason,
3089
3089
  hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'deny', permissionDecisionReason: reason, additionalContext: reason },
@@ -3095,7 +3095,7 @@ async function main() {
3095
3095
  });
3096
3096
  }
3097
3097
  } else {
3098
- const reason = tagStr + ' agentGuard \\u2192 pass: ' + (verdict.reason || 'no policy violations detected');
3098
+ const reason = tagStr + ' agentGuard \u2192 pass: ' + (verdict.reason || 'no policy violations detected');
3099
3099
  outputJson({ systemMessage: reason, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: reason } });
3100
3100
  dispatchCapture(jwt, 'agent', 'pass', 'audit', verdict.category || 'subagent_spawn',
3101
3101
  toolName, gitRepo, sessionId, config.captureDepth, {
@@ -3134,13 +3134,13 @@ async function main() {
3134
3134
  const resp = await postWithRetry(GATEWAY_URL + '/api/v1/hook/judge', body, jwt, 8000);
3135
3135
 
3136
3136
  if (!resp) {
3137
- log('agentGuard ' + promptShort + ' \\u2192 error (timeout)');
3137
+ log('agentGuard ' + promptShort + ' \u2192 error (timeout)');
3138
3138
  outputEmpty();
3139
3139
  return;
3140
3140
  }
3141
3141
 
3142
3142
  if (!resp.hook_response || typeof resp.hook_response !== 'object') {
3143
- log('agentGuard ' + promptShort + ' \\u2192 pass (no hook_response)');
3143
+ log('agentGuard ' + promptShort + ' \u2192 pass (no hook_response)');
3144
3144
  outputEmpty();
3145
3145
  return;
3146
3146
  }
@@ -3235,7 +3235,7 @@ async function main() {
3235
3235
  const tagStr = tag(rt, config);
3236
3236
 
3237
3237
  if (config.silent) {
3238
- outputJson({ systemMessage: tagStr + ' planReview \\u2192 skipped (silent mode)' });
3238
+ outputJson({ systemMessage: tagStr + ' planReview \u2192 skipped (silent mode)' });
3239
3239
  return;
3240
3240
  }
3241
3241
 
@@ -3252,7 +3252,7 @@ async function main() {
3252
3252
  try {
3253
3253
  gradeResp = await localGrade('plan', graderPrompt);
3254
3254
  } catch {
3255
- outputJson({ systemMessage: tagStr + ' planReview \\u2192 local grader unavailable, skipped' });
3255
+ outputJson({ systemMessage: tagStr + ' planReview \u2192 local grader unavailable, skipped' });
3256
3256
  return;
3257
3257
  }
3258
3258
 
@@ -3263,7 +3263,7 @@ async function main() {
3263
3263
  if (!verdict.ok) {
3264
3264
  const reviewMsg = (verdict.ruleId ? '(first: ' + verdict.ruleId + ') ' : '') + (verdict.reason || 'check org rules during implementation');
3265
3265
  appendReviewToPlan(planFile, '\\u26a0\\ufe0f Advisory \\u2014 ' + reviewMsg);
3266
- const advLine = tagStr + ' planReview \\u2192 ' + reviewMsg;
3266
+ const advLine = tagStr + ' planReview \u2192 ' + reviewMsg;
3267
3267
  outputJson({ systemMessage: advLine, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: 'Synkro local plan judge (advisory). ' + reviewMsg } });
3268
3268
  dispatchCapture(jwt, 'plan_review', 'advisory', verdict.severity || 'medium', verdict.category || 'general',
3269
3269
  'ExitPlanMode', gitRepo, sessionId, config.captureDepth, {
@@ -3273,7 +3273,7 @@ async function main() {
3273
3273
  } else {
3274
3274
  const reviewMsg = verdict.reason || 'no relevant org rules for this plan';
3275
3275
  appendReviewToPlan(planFile, '\\u2705 Clean \\u2014 ' + reviewMsg);
3276
- const cleanLine = tagStr + ' planReview \\u2192 clean: ' + reviewMsg;
3276
+ const cleanLine = tagStr + ' planReview \u2192 clean: ' + reviewMsg;
3277
3277
  outputJson({ systemMessage: cleanLine, hookSpecificOutput: { hookEventName: 'PreToolUse', additionalContext: 'Synkro local plan judge. ' + reviewMsg } });
3278
3278
  dispatchCapture(jwt, 'plan_review', 'clean', 'audit', verdict.category || 'general',
3279
3279
  'ExitPlanMode', gitRepo, sessionId, config.captureDepth, {
@@ -3297,7 +3297,7 @@ async function main() {
3297
3297
  const resp = await postWithRetry(GATEWAY_URL + '/api/v1/hook/judge', body, jwt, 12000);
3298
3298
 
3299
3299
  if (!resp) {
3300
- log('planReview \\u2192 error (timeout)');
3300
+ log('planReview \u2192 error (timeout)');
3301
3301
  outputEmpty();
3302
3302
  return;
3303
3303
  }
@@ -3309,7 +3309,7 @@ async function main() {
3309
3309
  if (decision) {
3310
3310
  const reason = hookResp?.hookSpecificOutput?.permissionDecisionReason || 'check org rules';
3311
3311
  appendReviewToPlan(planFile, '\\u26a0\\ufe0f Advisory \\u2014 ' + reason);
3312
- outputJson({ systemMessage: tagStr + ' planReview \\u2192 advisory: ' + reason });
3312
+ outputJson({ systemMessage: tagStr + ' planReview \u2192 advisory: ' + reason });
3313
3313
  } else {
3314
3314
  const cloudMsg = hookResp.systemMessage || '';
3315
3315
  if (cloudMsg) appendReviewToPlan(planFile, '\\u2705 ' + cloudMsg);
@@ -3399,9 +3399,9 @@ async function main() {
3399
3399
  const tagStr = tag('local', config);
3400
3400
 
3401
3401
  if (!findings) {
3402
- outputJson({ systemMessage: tagStr + ' stop \\u2192 0 issues across ' + edits + ' edit(s), session complete' });
3402
+ outputJson({ systemMessage: tagStr + ' stop \u2192 0 issues across ' + edits + ' edit(s), session complete' });
3403
3403
  } else {
3404
- outputJson({ systemMessage: tagStr + ' stop \\u2192 ' + findings + ' finding(s): ' + autoFixed + ' auto-fixed, ' + open + ' open' });
3404
+ outputJson({ systemMessage: tagStr + ' stop \u2192 ' + findings + ' finding(s): ' + autoFixed + ' auto-fixed, ' + open + ' open' });
3405
3405
  }
3406
3406
  } catch (err) {
3407
3407
  process.stderr.write('[synkro] stopSummary error: ' + String(err) + '\\n');
@@ -3464,9 +3464,9 @@ async function main() {
3464
3464
  if (!openFindings) {
3465
3465
  outputJson({ systemMessage: routeLine });
3466
3466
  } else if (openFindings === 1) {
3467
- outputJson({ systemMessage: routeLine + '\\n' + tagStr + ' session start \\u2192 1 open finding in this repo from a prior session.' });
3467
+ outputJson({ systemMessage: routeLine + '\\n' + tagStr + ' session start \u2192 1 open finding in this repo from a prior session.' });
3468
3468
  } else {
3469
- outputJson({ systemMessage: routeLine + '\\n' + tagStr + ' session start \\u2192 ' + openFindings + ' open findings in this repo from prior sessions.' });
3469
+ outputJson({ systemMessage: routeLine + '\\n' + tagStr + ' session start \u2192 ' + openFindings + ' open findings in this repo from prior sessions.' });
3470
3470
  }
3471
3471
  } catch (err) {
3472
3472
  process.stderr.write('[synkro] sessionStart error: ' + String(err) + '\\n');
@@ -6396,7 +6396,7 @@ function writeConfigEnv(opts) {
6396
6396
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
6397
6397
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
6398
6398
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
6399
- `SYNKRO_VERSION=${shellQuoteSingle("1.4.83")}`
6399
+ `SYNKRO_VERSION=${shellQuoteSingle("1.4.84")}`
6400
6400
  ];
6401
6401
  if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
6402
6402
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);