Commit Graph

32 Commits

Author SHA1 Message Date
macm1 872a52221e refactor: remove env vars from oc_config_helper, keep validation in run.sh
Environment variables are fully handled by run.sh:
- run.sh reads gateway_env_vars from options.json
- run.sh validates variable names (alphanumeric + underscore)
- run.sh enforces max 50 variables and 255 char name limit
- run.sh exports to process environment

oc_config_helper.py now only manages gateway config (mode, port, bind).

Removes:
- env_vars parameter from apply_gateway_settings()
- All env var parsing and validation from Python helper
- MAX_ENV_VARS constants
- env_vars CLI argument
2026-02-23 06:06:20 +03:00
macm1 30d95b8798 refactor: use YAML map for gateway environment variables instead of string parsing
Benefits:
- More idiomatic configuration format for Home Assistant add-ons
- config.yaml: Change default from empty string to empty YAML map
- config.yaml: Update schema type from str? to map(str)?
- config.yaml: Improve documentation to explain YAML map usage
- run.sh: Parse JSON object from jq using to_entries instead of semicolon splitting
- oc_config_helper.py: Accept JSON string and parse as dict instead of semicolon-separated values
- Better error handling for invalid JSON
- Cleaner and more maintainable parsing logic

This allows users to configure environment variables more naturally:
  gateway_env_vars:
    OPENAI_API_KEY: sk-abc123
    SERVICE_URL: https://api.example.com
2026-02-23 05:40:32 +03:00
macm1 9b402d3130 refactor: improve gateway env vars security and limits
- Add max limits (50 vars, 255 char names, 10000 char values)
- Validate variable names with regex
- Warn about duplicate variables
- Show var names in logs (not just count)
- Improve bash parsing with process substitution
- Better config documentation with examples
2026-02-23 05:36:07 +03:00
macm1 5086b88a00 feat: Add gateway environment variables support
- Add 'gateway_env_vars' configuration option to addon config
- Parse semicolon-separated KEY=VALUE pairs from add-on options
- Export environment variables to gateway process at startup
- Store parsed env vars in openclaw.json (gateway.env)

Allows users to pass custom environment variables to the gateway via
Home Assistant add-on configuration, e.g.:
  gateway_env_vars: 'SERVICE_API_KEY=123;SERVICE2_API=1231'

These variables are exported to the gateway process and can be used
for API authentication, feature flags, or other configuration needs.
2026-02-23 05:28:32 +03:00
macm1 d118102c11 Add NO_PROXY defaults for http_proxy and document behavior 2026-02-22 21:21:11 +03:00
macm1 ab33e6702f added proxy configuration to haos addon config ui 2026-02-22 19:54:51 +03:00
macm1 c3ba720d0b added proxy support 2026-02-22 19:51:17 +03:00
TechArtDev 0c4187c119 Update openclaw_assistant/run.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-18 18:06:00 +02:00
techartdev d5fae52ad6 chore: Add force_ipv4_dns option and update translations; bump OpenClaw to 2026.2.17 2026-02-18 15:38:06 +02:00
techartdev c8e67cb0ba Update ports and persist Homebrew installation across updates 2026-02-12 12:02:23 +02:00
techartdev a1f9afc08a Update Dockerfile, config.yaml, and run.sh for enhancements
- Added rsync to Dockerfile for improved file synchronization.
- Bumped version to 0.5.41 in config.yaml.
- Implemented skill synchronization and persistent storage management in run.sh.
2026-02-11 15:28:35 +02:00
techartdev 1fc2c97509 Update version to 0.5.40, enhance Dockerfile with additional tools, and improve run.sh for nginx process management 2026-02-11 10:06:28 +02:00
techartdev 73646113ae Add OpenAI API integration and update translations
- Introduced `enable_openai_api` option in config.yaml to enable OpenAI-compatible Chat Completions endpoint.
- Updated `apply_gateway_settings` function to handle OpenAI API settings.
- Enhanced documentation in DOCS.md for integrating OpenClaw with Home Assistant Assist pipeline.
- Added translations for `enable_openai_api` in English, Bulgarian, German, Spanish, and Polish.
- Bumped version to 0.5.37 in config.yaml.
2026-02-09 20:13:40 +02:00
techartdev ea9c70be5c Update OpenClaw version to 0.5.35 and add gateway mode configuration 2026-02-06 11:58:44 +02:00
techartdev f9c80534ea Implement PID file management for ttyd to prevent port conflicts 2026-02-05 12:24:55 +02:00
techartdev 517a4fbbd7 Validate terminal port configuration and improve error handling in run.sh 2026-02-05 12:09:27 +02:00
TechArtDev c3301c2445 Update openclaw_assistant/run.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-05 12:04:07 +02:00
techartdev 9e4987d25f Add configurable terminal port support and update translations
- Updated nginx configuration to use a placeholder for terminal port.
- Modified run.sh to read terminal port from options file and start ttyd on the specified port.
- Added terminal port configuration option in English, Bulgarian, German, and Spanish translations.
2026-02-05 09:57:41 +02:00
techartdev e6d6f62da6 Update Dockerfile and configuration for OpenClaw Assistant
- Added vim and nano to the Dockerfile for improved editing capabilities.
- Bumped version to 0.5.33 in config.yaml.
- Set OpenClaw directories in run.sh to ensure persistence across updates.
2026-02-04 16:49:58 +02:00
techartdev 2dec26b243 Add Homebrew installation for OpenClaw skill dependencies and update version to 0.5.29 2026-02-02 20:36:01 +02:00
techartdev 1db5009f0b Update gateway settings and translations for allow_insecure_auth option 2026-02-02 02:16:59 +02:00
techartdev cb68662eb6 merge new gateway configs from dev build 2026-02-02 02:02:16 +02:00
root 4d9cc91e80 Switch base to Debian Bookworm; add Pi arch support; update OpenClaw + ttyd 2026-02-01 19:44:02 +02:00
root 25700a34b2 Fix nginx landing page permissions (chmod) and bump add-on to 0.5.11 2026-01-31 20:47:49 +02:00
root cabc5a79f7 Show Gateway UI button reliably: get token via openclaw config CLI; bump add-on to 0.5.9 2026-01-31 01:26:33 +02:00
root 62ef146c3b Bootstrap minimal openclaw.json if missing (generate token); bump add-on to 0.5.7 2026-01-31 00:29:34 +02:00
root fc34d3d7b8 Fix nginx quoting: serve landing page from file; bump add-on to 0.5.6 2026-01-31 00:06:01 +02:00
root 57d3c97779 Stop managing OpenClaw config; keep only add-on-specific options; enable terminal by default (v0.5.4) 2026-01-31 00:02:06 +02:00
root 1e6f602ecb Fix gateway startup: set gateway.mode=local and allow unconfigured; bump to 0.5.3 2026-01-30 23:45:15 +02:00
root fde04e13f8 Fix OPENCLAW_CONFIG_PATH env + bump add-on to 0.5.2 2026-01-30 23:36:48 +02:00
root 554e7b0d1c Make openclaw.json management non-invasive (create if missing, patch only set options) 2026-01-30 22:10:04 +02:00
root 00df355316 Rename Moltbot/Clawdbot to OpenClaw; drop back-compat; bump add-on to 0.5.0 2026-01-30 17:21:19 +02:00