re-uploading work

This commit is contained in:
2026-02-04 17:46:30 -06:00
commit 3b14c65998
1388 changed files with 381262 additions and 0 deletions

34
packs/core/actions/sleep.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# Sleep Action - Core Pack
# Pauses execution for a specified duration
set -e
# Parse parameters from environment variables
SLEEP_SECONDS="${ATTUNE_ACTION_SECONDS:-1}"
MESSAGE="${ATTUNE_ACTION_MESSAGE:-}"
# Validate seconds parameter
if ! [[ "$SLEEP_SECONDS" =~ ^[0-9]+$ ]]; then
echo "ERROR: seconds must be a positive integer" >&2
exit 1
fi
if [ "$SLEEP_SECONDS" -lt 0 ] || [ "$SLEEP_SECONDS" -gt 3600 ]; then
echo "ERROR: seconds must be between 0 and 3600" >&2
exit 1
fi
# Display message if provided
if [ -n "$MESSAGE" ]; then
echo "$MESSAGE"
fi
# Sleep for the specified duration
sleep "$SLEEP_SECONDS"
# Output result
echo "Slept for $SLEEP_SECONDS seconds"
# Exit successfully
exit 0