feat(M3): Shared-source generator for agent variants

This commit is contained in:
Stefano Fiorini
2026-05-03 21:09:22 -05:00
parent be993429c1
commit 86ad783f82
339 changed files with 20650 additions and 145 deletions
@@ -0,0 +1,19 @@
{
"$schema": "https://ai-coding-skills.dev/schemas/generated-manifest/v1.json",
"generator": "scripts/generate-skills.mjs",
"generatedRoot": "skills/reviewer-runtime/pi",
"files": [
{
"path": "notify-telegram.sh",
"kind": "file",
"mode": "755",
"sha256": "d7e52e3d2f7de83691470467ff3fec230bea10f128d5b188604e1bb5883d6d58"
},
{
"path": "run-review.sh",
"kind": "file",
"mode": "755",
"sha256": "c5e4fd082ee1a14059183d2cd2c45653e16d63821edf9cf82e548c9307d29e75"
}
]
}
@@ -1,8 +1,7 @@
#!/usr/bin/env bash
# ⚠️ GENERATED FILE do not edit directly. Edit the canonical source in skills/reviewer-runtime/notify-telegram.sh and run `pnpm run sync:pi`.
set -euo pipefail
# Keep this file in sync with skills/reviewer-runtime/notify-telegram.sh.
DEFAULT_API_BASE_URL="https://api.telegram.org"
DEFAULT_PARSE_MODE="HTML"
MAX_MESSAGE_LENGTH=4096
+3 -7
View File
@@ -1,8 +1,7 @@
#!/usr/bin/env bash
# ⚠️ GENERATED FILE do not edit directly. Edit the canonical source in skills/reviewer-runtime/run-review.sh and run `pnpm run sync:pi`.
set -euo pipefail
# Keep this file in sync with skills/reviewer-runtime/run-review.sh.
DEFAULT_POLL_SECONDS=10
DEFAULT_HEARTBEAT_SECONDS=60
DEFAULT_SOFT_TIMEOUT_SECONDS=600
@@ -146,6 +145,7 @@ kill_child_process_group() {
fi
}
# shellcheck disable=SC2329
handle_signal() {
local signal_name=$1
INTERRUPTED=1
@@ -265,7 +265,6 @@ main() {
local last_output_change_time=$START_TIME
local last_heartbeat_time=$START_TIME
local soft_timeout_logged=0
local stall_warning_logged=0
local heartbeat_count=0
while kill -0 "$CHILD_PID" 2>/dev/null; do
@@ -285,7 +284,6 @@ main() {
if [[ "$stdout_bytes" -ne "$last_stdout_bytes" || "$stderr_bytes" -ne "$last_stderr_bytes" ]]; then
last_output_change_time=$now
stall_warning_logged=0
state=running-active
level=info
note="reviewer output changed"
@@ -296,7 +294,6 @@ main() {
state=stall-warning
level=warn
note="no output growth for ${silent_for}s; process still alive"
stall_warning_logged=1
else
state=running-silent
level=info
@@ -328,10 +325,9 @@ main() {
set -e
trap - EXIT
local final_stdout_bytes final_stderr_bytes
local final_stdout_bytes
local success_file success_bytes
final_stdout_bytes=$(file_bytes "$STDOUT_FILE")
final_stderr_bytes=$(file_bytes "$STDERR_FILE")
if [[ "$child_exit_code" -eq 0 ]]; then
if [[ "$final_stdout_bytes" -gt 0 ]]; then
+2 -5
View File
@@ -144,6 +144,7 @@ kill_child_process_group() {
fi
}
# shellcheck disable=SC2329
handle_signal() {
local signal_name=$1
INTERRUPTED=1
@@ -263,7 +264,6 @@ main() {
local last_output_change_time=$START_TIME
local last_heartbeat_time=$START_TIME
local soft_timeout_logged=0
local stall_warning_logged=0
local heartbeat_count=0
while kill -0 "$CHILD_PID" 2>/dev/null; do
@@ -283,7 +283,6 @@ main() {
if [[ "$stdout_bytes" -ne "$last_stdout_bytes" || "$stderr_bytes" -ne "$last_stderr_bytes" ]]; then
last_output_change_time=$now
stall_warning_logged=0
state=running-active
level=info
note="reviewer output changed"
@@ -294,7 +293,6 @@ main() {
state=stall-warning
level=warn
note="no output growth for ${silent_for}s; process still alive"
stall_warning_logged=1
else
state=running-silent
level=info
@@ -326,10 +324,9 @@ main() {
set -e
trap - EXIT
local final_stdout_bytes final_stderr_bytes
local final_stdout_bytes
local success_file success_bytes
final_stdout_bytes=$(file_bytes "$STDOUT_FILE")
final_stderr_bytes=$(file_bytes "$STDERR_FILE")
if [[ "$child_exit_code" -eq 0 ]]; then
if [[ "$final_stdout_bytes" -gt 0 ]]; then
@@ -31,6 +31,7 @@ check_skill_file() {
local file=$1
assert_contains "$file" "claude -p \\"
# shellcheck disable=SC2016
assert_contains "$file" '$(cat /tmp/'
assert_contains "$file" "--strict-mcp-config"
assert_contains "$file" "--setting-sources user"
+3 -1
View File
@@ -328,7 +328,9 @@ main() {
local tmp_dir
tmp_dir=$(mktemp -d)
trap "rm -rf '$tmp_dir'" EXIT
# Use SMOKE_TMP as a module-level var so the single-quoted trap expands lazily
SMOKE_TMP="$tmp_dir"
trap 'rm -rf "$SMOKE_TMP"' EXIT
test_delayed_success "$tmp_dir"
test_soft_timeout_continues "$tmp_dir"
@@ -144,7 +144,9 @@ main() {
local tmp_dir
tmp_dir=$(mktemp -d)
trap "rm -rf '$tmp_dir'" EXIT
# Use TG_TEST_TMP as a module-level var so the single-quoted trap expands lazily
TG_TEST_TMP="$tmp_dir"
trap 'rm -rf "$TG_TEST_TMP"' EXIT
test_missing_credentials "$tmp_dir"
test_rejects_message_and_message_file_together "$tmp_dir"