mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-26 15:40:18 +00:00
Three security/stability improvements in EffectBridgeAdapter:
1. V1-only tool blocking:
- routine_create, create_job, build_software (and hyphenated variants)
return helpful error: "use the slash command instead"
- Filtered out of available_actions() so system prompt doesn't list them
- Prevents crash from tools needing RoutineEngine/Scheduler refs
2. Per-step tool call limit:
- Max 50 tool calls per code block (AtomicU32 counter)
- Prevents amplification: `for i in range(10000): shell(...)`
- Returns "call limit reached, break into multiple steps"
3. Rate limiting:
- Per-user per-tool sliding window via RateLimiter
- Checks tool.rate_limit_config() before every execution
- Returns "rate limited, try again in Ns"
Architecture plan updated:
- Gateway integration: DONE
- Routines: BLOCKED (gracefully, with slash command fallback)
- Rate limiting: DONE
- Call limit: DONE
- Phase 6 status: DONE (remaining: acceptance tests, two-phase commit)
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>