diff --git a/.gitignore b/.gitignore index 4199997..c7b2f70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1 @@ -``` -# Backup files -*.backup.* - -# Environment files -.env.local - -# Logs -*.log -``` \ No newline at end of file +Nothing should be ignored since the changes only include shell script source files (.sh) and no build artifacts, dependencies, or temporary files. \ No newline at end of file diff --git a/src/bootstrap.sh b/src/bootstrap.sh index 4c6255e..3812d2d 100755 --- a/src/bootstrap.sh +++ b/src/bootstrap.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash # ORCHAT Bootstrap - Phase 8 Security Hardened -set -euo pipefail -# Security: Enable strict mode -set -o nounset -set -o pipefail +# Security: Enable strict mode but handle errors gracefully +set -eo pipefail # Determine root directory ORCHAT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" diff --git a/src/core.sh b/src/core.sh index a5b8c28..1b1adaa 100644 --- a/src/core.sh +++ b/src/core.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail CURL_OPTS=(-sS --fail --show-error --max-time 30) diff --git a/src/encoding.sh b/src/encoding.sh index 110d3ad..064d4fe 100755 --- a/src/encoding.sh +++ b/src/encoding.sh @@ -2,7 +2,7 @@ # UTF-8 BOM Detection and CRLF Normalization # Handles encoding issues in input files and user input -set -euo pipefail +set -eo pipefail # UTF-8 BOM bytes (EF BB BF) UTF8_BOM=$'\xef\xbb\xbf' diff --git a/src/env.sh b/src/env.sh index 6373eec..17e3e84 100644 --- a/src/env.sh +++ b/src/env.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail validate_api_key() { # Check if API key is set diff --git a/src/interactive.sh b/src/interactive.sh index d9a0ff4..3f7fcb9 100644 --- a/src/interactive.sh +++ b/src/interactive.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail start_interactive() { local hist_file="${1:-${RESOLVED_HISTORY_FILE:-$HOME/.orchat_history}}" diff --git a/src/io.sh b/src/io.sh index bae9394..f4aed72 100644 --- a/src/io.sh +++ b/src/io.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail validate_input() { local input="$1" diff --git a/src/model_browser.sh b/src/model_browser.sh index 320db63..0f7f33f 100755 --- a/src/model_browser.sh +++ b/src/model_browser.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail # Main model_browser function for bootstrap dispatch model_browser() { diff --git a/src/session.sh b/src/session.sh index e4313ae..716f021 100644 --- a/src/session.sh +++ b/src/session.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail # Session management for Phase 3 diff --git a/src/streaming.sh b/src/streaming.sh index cc65529..15e6853 100644 --- a/src/streaming.sh +++ b/src/streaming.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail # Robust SSE/chunk handler with Python validation handle_stream_chunks() { diff --git a/src/utils.sh b/src/utils.sh index 2234764..3f06d40 100644 --- a/src/utils.sh +++ b/src/utils.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -eo pipefail log_debug() { [[ "${ORCHAT_DEBUG:-}" == "1" ]] && echo "[DEBUG] $*" >&2; } log_error() { echo "[ERROR] $*" >&2; }