@cyanautomation/kaseki-agent 1.26.0 → 1.26.1

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.
Files changed (2) hide show
  1. package/kaseki-agent.sh +12 -5
  2. package/package.json +1 -1
package/kaseki-agent.sh CHANGED
@@ -1391,6 +1391,7 @@ run_validation_commands() {
1391
1391
  elif [ "$command_exit" -ne 0 ] && [ "$validation_exit_ref" -eq 0 ]; then
1392
1392
  validation_exit_ref="$command_exit"
1393
1393
  validation_detail_ref="first failing command was \"$trimmed\" with exit $command_exit"
1394
+ # shellcheck disable=SC2034 # Reference variable assigned for external use via nameref
1394
1395
  validation_reason_ref="$failure_reason_prefix: $trimmed (exit $command_exit)"
1395
1396
  # Enhanced diagnostics for getcwd-type errors.
1396
1397
  if grep -q 'getcwd\|No such file or directory\|cannot access parent directories' "$log_file"; then
@@ -1408,6 +1409,7 @@ run_validation_commands() {
1408
1409
  fi
1409
1410
  # Fail-fast: if enabled, stop validation loop at first failure.
1410
1411
  if [ "$KASEKI_VALIDATION_FAIL_FAST" -eq 1 ]; then
1412
+ # shellcheck disable=SC2034 # Reference variable assigned for external use via nameref
1411
1413
  validation_stopped_ref=true
1412
1414
  printf 'Validation stopped at first failure (fail-fast mode enabled).\n' | tee -a "$log_file"
1413
1415
  break
@@ -1621,11 +1623,12 @@ parse_github_app_token_helper_failure() {
1621
1623
  helper_stderr="$2"
1622
1624
  helper_exit_code="$3"
1623
1625
 
1626
+ # shellcheck disable=SC2016,SC1078,SC1079,SC2026
1624
1627
  printf '%s' "$helper_stdout" | TOKEN_HELPER_STDERR="$helper_stderr" TOKEN_HELPER_EXIT_CODE="$helper_exit_code" node -e '
1625
- const fs = require("fs");
1626
- const stdout = fs.readFileSync(0, "utf8");
1627
- const stderr = process.env.TOKEN_HELPER_STDERR || "";
1628
- const exitCode = process.env.TOKEN_HELPER_EXIT_CODE || "unknown";
1628
+ const fs = require(\"fs\");
1629
+ const stdout = fs.readFileSync(0, 'utf8');
1630
+ const stderr = process.env.TOKEN_HELPER_STDERR || '';
1631
+ const exitCode = process.env.TOKEN_HELPER_EXIT_CODE || 'unknown';
1629
1632
  const sanitize = (value) => String(value || "")
1630
1633
  .replace(/-----BEGIN [^-]+ PRIVATE KEY-----[\s\S]*?-----END [^-]+ PRIVATE KEY-----/g, "[redacted private key]")
1631
1634
  .replace(/\b(?:gh[opsru]_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,})\b/g, "[redacted token]")
@@ -2358,6 +2361,8 @@ NODE
2358
2361
  $json_text
2359
2362
  EOF_JSON_SUMMARY
2360
2363
  else
2364
+ # shellcheck disable=SC2094 # File is only read, not written; output goes to stdout
2365
+ summary_file_content="$(cat "$summary_source" 2>/dev/null || echo '')"
2361
2366
  while IFS= read -r raw_line || [ -n "$raw_line" ]; do
2362
2367
  case "$raw_line" in
2363
2368
  \#*)
@@ -2384,7 +2389,9 @@ EOF_JSON_SUMMARY
2384
2389
  printf -- '- %s\n' "$safe_line"
2385
2390
  summary_rows=$((summary_rows + 1))
2386
2391
  [ "$summary_rows" -lt 4 ] || break
2387
- done < "$summary_source"
2392
+ done <<EOF_SUMMARY_FILE
2393
+ $summary_file_content
2394
+ EOF_SUMMARY_FILE
2388
2395
  fi
2389
2396
  fi
2390
2397
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanautomation/kaseki-agent",
3
- "version": "1.26.0",
3
+ "version": "1.26.1",
4
4
  "description": "Ephemeral coding-agent runner: orchestrates Pi CLI via Docker for automated code modifications with validation",
5
5
  "type": "module",
6
6
  "license": "MIT",