Add examples/python/_shared/console.py with safe_print/icon helpers that
degrade emoji to ASCII on legacy Windows code pages (cp1252) instead of
crashing, mirroring the CLI _supports_unicode/_icon pattern. Wire the helper
into the high-severity gateway (16, 17, 18) and channel (20-23) examples so
they start on default Windows PowerShell without PYTHONUTF8.
Co-authored-by: Mervin Praison <[email protected]>
* feat: add StreamBridge for thread-safe async streaming (fixes#68)
- Create StreamBridge abstraction in examples/_shared/ with thread-safe async-sync bridge
- Fix examples 07, 08, 13 to use call_soon_threadsafe instead of unsafe put_nowait
- Fix example 07 lifecycle ordering bug by concurrent event draining
- Add comprehensive unit tests for StreamBridge functionality
- All examples now use consistent thread-safe streaming pattern
Co-authored-by: Mervin Praison <[email protected]>
* fix: resolve thread-safety and performance issues in StreamBridge
- Initialize asyncio.Queue in __init__ to ensure thread-safe creation
- Remove race condition by eliminating lazy initialization
- Fix 1.0-second performance delay in provider example using sentinel pattern
- Remove unused imports and StreamBridge instance in provider
- Update tests to match new initialization behavior
- All tests pass and linting clean
Co-authored-by: Mervin Praison <[email protected]>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mervin Praison <[email protected]>
* feat: implement channel config secret security validation (fixes#58)
- Add secret field detection to prevent inline API keys/passwords in channel configs
- Implement config validation that rejects secrets, requires env:VAR_NAME references
- Add response redaction to hide secrets from GET endpoints
- Update examples 20, 22 and seed data to use secure env: pattern
- Covers major secret types: api_key, bot_token, app_password, etc.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* fix: resolve _ref keys in bot startup and add defensive validation
- Add _get_config_secret() helper to resolve bot_token_ref, api_key_ref, app_token_ref
- Update _start_channel_bot() to use new helper for token resolution
- Add defensive input validation to _validate_config_security() and _redact_config_secrets()
- Fix defensive dictionary access in API endpoints (_list, _get)
- Update _resolve_slack_app_token() and test endpoint to use new helper
Fixes critical issue where bots configured with _ref keys could not start.
Co-authored-by: Mervin Praison <[email protected]>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Mervin Praison <[email protected]>
feat(examples): add new email bot and email channel examples
Added two new examples: an Email Bot demonstrating IMAP/SMTP
features and an Email Channel for using Email as an AIUI dashboard
channel. Updated README to include links to these new examples.
```
- Refactored navigation in `aiui.template.yaml` for improved
organization, adding an "API Reference" tab.
- Updated `features-api.md` with new endpoints and examples,
including enhanced approval management and session handling features.
- Improved clarity and consistency in API request/response examples.
Removed outdated demo data functions in the full dashboard example and consolidated shared seed data usage. Updated the README to reflect changes in dashboards and documentation structure. Reduced overall lines of code by eliminating unnecessary files and code blocks.