mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:30:48 +08:00
Cache inventory MCP lists and accept YES as WhatsApp confirm.
Extend short TTL reuse to listManagedNe/queryUmeNeInventory to cut list self-loops, and treat short YES/continue as confirmation when a token is pending. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
f1d025ed60
commit
d3f621b58b
6 changed files with 130 additions and 42 deletions
13
tests/test_confirm_affirmative.py
Normal file
13
tests/test_confirm_affirmative.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from runtime.orchestration.security import has_explicit_confirmation_token
|
||||
|
||||
|
||||
def test_whatsapp_yes_confirms_outstanding_token() -> None:
|
||||
assert has_explicit_confirmation_token("@bot YES", "abc123")
|
||||
assert has_explicit_confirmation_token("YES", "abc123")
|
||||
assert has_explicit_confirmation_token("please continue", "abc123")
|
||||
assert has_explicit_confirmation_token("确认", "abc123")
|
||||
assert not has_explicit_confirmation_token("YES", None)
|
||||
assert not has_explicit_confirmation_token("maybe later", "abc123")
|
||||
assert has_explicit_confirmation_token("confirm abc123", "abc123")
|
||||
Loading…
Add table
Add a link
Reference in a new issue