Initial commit: OpenClaw ops workspace

This commit is contained in:
2026-03-28 00:15:47 +00:00
commit f1aeaeefb5
42 changed files with 4297 additions and 0 deletions

28
scripts/safe-jsonl-peek.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "Usage: $0 <jsonl-file> [max-bytes-per-file]" >&2
exit 1
fi
FILE="$1"
MAX_BYTES="${2:-1048576}"
if [[ ! -f "$FILE" ]]; then
echo "error: file not found: $FILE" >&2
exit 1
fi
SIZE=$(wc -c < "$FILE")
if [[ "$SIZE" -le "$MAX_BYTES" ]]; then
cat "$FILE"
exit 0
fi
HALF=$(( MAX_BYTES / 2 ))
head -c "$HALF" "$FILE"
printf '\n...TRUNCATED...\n'
tail -c "$HALF" "$FILE"