Commit Graph
7 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek acb32b0101 feat: use XDG Base Directories for log storage
Change the default LOG_DIR from ~/.open-terminal/logs to
$XDG_STATE_HOME/open-terminal/logs (defaults to
~/.local/state/open-terminal/logs when XDG_STATE_HOME is unset).

The OPEN_TERMINAL_LOG_DIR env var override is unchanged.

Closes #12
2026-03-02 12:26:12 -06:00
Timothy Jaeryang Baek 26090678d4 feat: add Docker secrets support for OPEN_TERMINAL_API_KEY_FILE
Allow loading the API key from a file via OPEN_TERMINAL_API_KEY_FILE,
following the convention used by the official PostgreSQL Docker image.

- Add _resolve_file_env() helper in env.py
- Add file_env shell function in entrypoint.sh
- Add _FILE fallback in cli.py run command
- Update README with Docker Compose example
- Bump version to 0.4.3

Closes #14
2026-03-02 12:17:54 -06:00
Timothy Jaeryang Baek 19543ee983 refac 2026-02-25 19:56:20 -06:00
Timothy Jaeryang Baek 6c08563b56 refactor: read_file returns raw binary for supported types, rejects others
- Text files: return JSON with content string (unchanged)
- Supported binary types (image/* by default): return raw binary
  with proper Content-Type header
- Unsupported binary types: 415 error
- New env var OPEN_TERMINAL_BINARY_MIME_PREFIXES (comma-separated,
  default: 'image') controls which binary types are allowed
2026-02-24 18:49:47 -06:00
Timothy Jaeryang Baek dd5649b696 v0.2.1: file-backed process output with offset-based polling
- Persist all process stdout/stderr to JSONL log files for audit
- Add offset-based polling (next_offset) for stateless incremental reads
- Add tail parameter to bound response size for AI agents
- Remove in-memory output buffer and drain-on-read pattern
- Organize logs under ~/.open-terminal/logs/processes/
- Add aiofiles dependency for async file I/O
- Remove OPEN_TERMINAL_MAX_OUTPUT_LINES (no longer needed)
2026-02-14 19:35:20 -06:00
Timothy Jaeryang Baek af21be471c refac 2026-02-14 17:05:15 -06:00
Timothy Jaeryang Baek 3103f34ee7 refac 2026-02-12 13:45:59 -06:00