This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
clw – Chunk-Line-Wrapper (robust stream version) | |
Keeps *every* write to stdout/stderr ≤1550 bytes so Codex Cloud | |
never triggers its 1 600-byte PTY crash guard, even when a program | |
prints megabytes without a single newline (pnpm, progress bars, | |
binary hexdumps, etc.). | |
""" | |
import binascii, os, re, sys, signal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
CLW – Chunk-Line-Wrapper (v4-pnpm-fix) | |
Break every stdout/stderr line – whether delimited by LF or CR – into | |
≤1550-byte slices so Codex Cloud never exceeds the 1 600-byte PTY limit. | |
""" | |
import binascii, os, re, sys, signal | |
signal.signal(signal.SIGPIPE, signal.SIG_DFL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export SHELL=/bin/bash | |
# Ensure non-interactive apt operations and higher open-file limits | |
export DEBIAN_FRONTEND=noninteractive | |
ulimit -n 1048576 | |
# Install build-essential, curl, git, and other utilities | |
apt-get update -qq >/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "@repo/docmd", | |
"private": true, | |
"scripts": { | |
"process-docs": "node scripts/process-docs.js", | |
"watch:docs": "onchange '../../docs/**/*' -- pnpm process-docs", | |
"build": "pnpm process-docs && docmd build", | |
"dev": "pnpm process-docs && concurrently \"docmd dev\" \"pnpm watch:docs\"", | |
"dev:simple": "pnpm process-docs && docmd dev" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
CLW – Chunk‑Line‑Wrapper | |
Breaks every stdout/stderr line into ≤1550‑byte slices so Codex Cloud never | |
hits the 1 600‑byte PTY limit. | |
Changes vs upstream v1 | |
---------------------- | |
* Handle SIGPIPE quietly → no BrokenPipeError stack‑trace. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
echo ">>> Installing universal 1 600‑byte guard (clw‑v1 + patches)" | |
############################################################################### | |
# 1. Download the clw-v3 # | |
############################################################################### | |
CLW_URL="https://gist.githubusercontent.com/amxv/9c930675a935cc10ed7fe2fc3068705a/raw" | |
curl -fsSL "$CLW_URL" -o /usr/local/bin/clw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
INFO FOR HUMANS: This script solves this error: | |
``` | |
Error: Output for session 'shell' contained a line exceeding the max of 1600 bytes (observed at least 12345 bytes). | |
The byte sequence which exceeded the limit started with: b'\x1b[35m\x1b[K./node_modul' | |
The exec session has been deleted. Please start a new session. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Ensure non-interactive apt operations and higher open-file limits | |
export DEBIAN_FRONTEND=noninteractive | |
ulimit -n 1048576 | |
# Install build-essential, curl, git, and other utilities | |
apt-get update -qq >/dev/null | |
apt-get install -y -qq --no-install-recommends apt-utils >/dev/null | |
apt-get install -y -qq --no-install-recommends \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# logdev - Run development commands with continuous logging to logs/server.log | |
# Usage: logdev <command> [args...] | |
# Example: logdev next dev --turbo | |
# Check if any arguments were provided | |
if [ $# -eq 0 ]; then | |
echo "Usage: logdev <command> [args...]" | |
echo "Example: logdev next dev --turbo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Ensure non-interactive apt operations and higher open-file limits | |
export DEBIAN_FRONTEND=noninteractive | |
ulimit -n 1048576 | |
# Install build-essential, curl, git, and other utilities | |
apt-get update -qq >/dev/null | |
apt-get install -y -qq --no-install-recommends apt-utils >/dev/null | |
apt-get install -y -qq --no-install-recommends \ |
NewerOlder