Closes#371.
- Add channel-agnostic /new, /reset, and /newsession handling in ChannelRuntime so IM users can start a fresh session without leaving the chat.
- Preserve existing session history while clearing only the channel session mapping.
- Document in-chat slash commands across README locales.
- Normalize pairing slash-command parsing so the documented case-insensitive command behavior matches runtime behavior.
Validation:
- PYTHONPATH=agent pytest agent/tests/test_channels_runtime.py -q
- python -m compileall -q agent/src/channels/runtime.py agent/src/channels/pairing/store.py agent/tests/test_channels_runtime.py
- git diff --check
- GitHub Actions CI: test
1. Remove nonExplicitSupportedLngs — it strips region codes from compound
language keys (zh-CN → zh) causing isSupportedCode to reject them and
fall back to English.
2. Add /channels to Vite proxy paths — Settings page calls /channels/status
via Promise.all with getLLMSettings and getDataSourceSettings; without a
proxy rule these requests return index.html causing JSON parse errors.
3. Fix LanguageSwitcher always showing 'English' — i18n.languages (plural)
always includes the fallback 'en', and SUPPORTED_LANGUAGES has 'en' first
so .find() always matched 'en'. Fixed by checking i18n.language (singular)
first.
Signed-off-by: hoc.s <a615828a615828@outlook.com>
Default the --host bind address to 127.0.0.1 instead of 0.0.0.0 to
match the secure-by-default posture already used in docker-compose.
Add a startup warning when binding to a non-loopback address without
API_AUTH_KEY configured — the existing loopback peer-IP and
DNS-rebinding checks still reject remote requests, but the warning
surfaces the misconfiguration at startup.
Also default the Typer `serve` command's --host to 127.0.0.1 so every
serve entry point agrees (the console script and `python -m cli` already
bound loopback; this covers the `python -m cli.main` path too).
Tests: _is_loopback_bind_host truth table (IPv4/IPv6/hostname/edge),
loopback default, and the warning firing only on a non-loopback bind
without a configured key.
Refs #333
Signed-off-by: Robin1987China <41602358+Robin1987China@users.noreply.github.com>
The frontend dev service published port 5899 on all interfaces
(0.0.0.0) while the backend was correctly bound to 127.0.0.1:8899.
On a shared/LAN network, this exposed the Vite dev server (source,
module graph, HMR websocket) to other hosts unnecessarily.
Add the 127.0.0.1 prefix to the frontend port mapping so both
services share the same loopback-only exposure discipline.
Closes#334
Co-Authored-By: OpenCode <noreply@opencode.ai>
AI-Model: qwen3.7-max
Co-Authored-By: opencode <noreply@ai-tool.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
AI-Contributed/Feature: 2/2
AI-Contributed/UT: 0/0
`vibe-trading dev` previously assumed the user had already run
`vibe-trading setup`. When they hadn't, the Vite spawn failed with
npm's confusing "vite is not a command" message and the user had to
know to install dependencies separately.
Add a quick `frontend/node_modules/.bin/vite` (or vite.cmd) existence
check before spawning. If missing, fail fast with a clear panel that
points the user at `vibe-trading setup`.
Signed-off-by: digger yu <digger-yu@outlook.com>
Address review findings from PR #328:
- Add module-level provider registry (register/clear/get_advisory_providers)
replacing the hardcoded AdvisoryOrchestrator([]) dead-code path
- Add public aliases in enforcement.py for 3 private helpers used by advisory
- Replace monkeypatch __init__ in test #9 with registry-based injection
- Sanitize exception messages: str(exc) → type(exc).__name__ in audit dicts
- Add exc_info=True to logger.warning for full traceback in logs only
- Add logger.info when advisory enabled but no providers registered
- Rename account_drawdown → utilization_ratio (semantic accuracy)
Co-Authored-By: OpenCode <noreply@opencode.ai>
AI-Model: qwen3.7-max
Co-Authored-By: opencode <noreply@ai-tool.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
AI-Contributed/Feature: 85/85
AI-Contributed/UT: 57/57
Add advisory review hook to LiveOrderGuardTool._allow() behind an opt-in
environment variable (VIBE_TRADING_ENABLE_ADVISORY). Advisory verdicts are
embedded in gate_decision['advisory'] for audit visibility but never block
or alter order execution.
- _advisory_review() builds AdvisoryContext from intent/positions/balance
- Fail-open: any exception → REVIEW_UNAVAILABLE, order proceeds
- Default off: env var unset = no advisory field in gate_decision
- _allow() accepts positions/balance kwargs threaded from execute()
Signed-off-by: shadowinlife <shadowinlife@gmail.com>
Configurable in-memory advisory provider for test suites. Supports verdict
injection, optional delay, forced failure, and call-history recording —
everything needed to exercise the orchestrator and gate integration without
any network dependency.
Signed-off-by: shadowinlife <shadowinlife@gmail.com>
Centralize Shadow Account price feature names in models.PRICE_FEATURES so extractor and codegen cannot drift, and keep price-context bounds at four decimals to avoid losing small return thresholds.
Includes regression coverage for feature-name sharing and prior_5d_return precision.
Thanks @Robin1987China.