Name:
Surface L4: drop cancelled viin_ai_api (+ webhook), ship viin_ai_livechat (ADR-027)
State:
Failed
finished in 44m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#100
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
0ce4eb3c95d175be4255a73e845f598b9c587786
Description:
[ADD] viin_ai_livechat: AI in live chat (scripted ai_agent step + operator-assist)
Surface-L4 module per ADR-027. (a) Autonomous scripted operator: chatbot.script.step gains step_type='ai_agent' + ai_agent_id; _process_step delegates to the agent + posts the answer to the visitor (over im_livechat's own bus; plaintext2html + message_post sanitize = no stored XSS); forward_operator fallback on defer. (b) Operator-assist reuses the shipped action_ai_draft (human reviews and sends). Double-reply gate: the viin_ai_chat channel-level auto-reply skips channels driven by an active chatbot script; non-script channels auto-reply as before. SECURITY (external-visitor boundary): the visitor turn runs as a constrained least-privilege service user (seeded user_livechat_ai_bot, base.group_user only) with env.su hard-asserted False so RAG/tool/memory reads are ACL-scoped (a visitor cannot pull internal records); PII redaction forced ON for the visitor path regardless of the company opt-out (ADR-022 precedent); tool-bearing agents and superuser/no-service-user runs are refused at runtime and handed to a human. Tool-less advisory seed. CE-safe (im_livechat/website_livechat LGPL). No viin_brain dep. 12 tests incl. 5 security controls; 0/0 of 718 on the co-install regression gate.
Branch:
17.0
Instance ID:
0
Age:
Up-time: