|
|
|
merged
[BRAIN] Cụm Brain v17 Phase A (viin_web_editor + viin_brain + account_reports + viin_ai_brain)
|
[DOC] docs/brain: reflect cluster relocation to ai17
4 Brain modules (viin_web_editor, viin_brain, viin_brain_account_reports, viin_ai_brain) now co-located in ai17 after strategic re-route from erponline-enterprise17. Only runtime cross-repo dep remaining: to_account_reports for viin_brain_account_reports. See delivery/audit_campaign_brain_repo_retarget_2026-04-18.md (viinforge) for full re-route history.
|
Failed
|
|
|
|
|
|
|
|
merged
[BRAIN] Cụm Brain v17 Phase A (viin_web_editor + viin_brain + account_reports + viin_ai_brain)
|
[ADD] viin_ai_brain: WI-13 — AI Brain bridge (RAG + 9 tools + ChatGPT hookup, Phase A v1.0)
Layer-3 connector tying viin_brain (knowledge engine) to the viin_ai stack.
Ships the v1.0 commit line for the Brain cluster per CEO R1.
Data layer
* source_type ``brain_page`` / ``brain_vault`` on ``viin.ai.source``
* block-aware chunker — one chunk per block, glue short neighbours into
the next (>= 200 chars signal per chunk); falls back to plain-text
paragraph chunking when content_blocks is empty.
* ``viin.brain.page.write`` hook: content_html / content_blocks /
content_plain changes flip attached sources back to status='draft' so
the upstream cron re-embeds.
9 tools mapped to the 5 brain philosophies
T3 semantic — brain_semantic_search (pgvector similarity + ACL)
T2+T3 struct — brain_graph_traverse (BFS on viin.brain.link)
T3 temporal — brain_timeline_query (write_date range + filters)
T1 getter — brain_get_page_content (content_plain + links)
T5 writers — brain_create_page / brain_create_block /
brain_update_property (confidence + attribution)
T2+T5 — brain_create_link (non-destructive edge)
T4+T5 — brain_link_record (page↔Odoo record binding)
Topic "Knowledge Base Assistant" wires the 9 tools. Every writer reads
``agent_id`` / ``trace_id`` / ``confidence`` from context, stamps
``is_ai_authored`` + ``ai_review_status='pending_review'`` (or
``approved`` when vault.auto_approve_ai_content=True), and refuses when
vault.allow_ai_authoring=False.
Controllers
* /viin_ai_brain/wysiwyg/prompt — run agent once, return trace+content
* /viin_ai_brain/wysiwyg/alternatives — N rephrase / shorten / lengthen
* /viin_ai_brain/ai_block/fill — resolve inline ai_block via agent
OWL services
* viin_web_editor.chatgpt_backend_provider — force-override, routes
OdooEditor ChatGPT dialog prompts through Viindoo agent stack.
* viin_brain.ai_bridge — force-override, exposes openChat / runInlinePrompt
/ regenerate. Three slash commands (/ai_write, /ai_chat, /ai_block).
Tests (27 passed on v17_test_brain_wi13, 0 failed, 0 errors)
* test_brain_rag — source extension, chunking (blocks + fallback + glue),
re-embed on write, content-only field gating, full _process_pending pass.
* test_brain_tools — shape/ACL/attribution for each of the 9 tools,
auto-approve vault path, blocked-vault AccessError.
* test_chatgpt_backend — wysiwyg/prompt, wysiwyg/alternatives,
ai_block/fill (controller methods invoked directly with mocked
request + AIAgent.run, so no LLM call + no HttpCase server startup).
Dependencies: viin_ai_agent, viin_ai_rag, viin_brain, viin_web_editor.
Campaign 2026-04-17-viindoo-brain-v17 WI-13 (Phase A v1.0 commit line).
STATUS: DONE
SPRINT_DONE: job_id=2026-04-17-brain-wi13-ai-brain-bridge
|
Failed
|
|
|
|
|
|
|
|
merged
[BRAIN] Cụm Brain v17 Phase A (viin_web_editor + viin_brain + account_reports + viin_ai_brain)
|
[ADD] viin_ai_brain: WI-13 — AI Brain bridge (RAG + 9 tools + ChatGPT hookup, Phase A v1.0)
Layer-3 connector tying viin_brain (knowledge engine) to the viin_ai stack.
Ships the v1.0 commit line for the Brain cluster per CEO R1.
Data layer
* source_type ``brain_page`` / ``brain_vault`` on ``viin.ai.source``
* block-aware chunker — one chunk per block, glue short neighbours into
the next (>= 200 chars signal per chunk); falls back to plain-text
paragraph chunking when content_blocks is empty.
* ``viin.brain.page.write`` hook: content_html / content_blocks /
content_plain changes flip attached sources back to status='draft' so
the upstream cron re-embeds.
9 tools mapped to the 5 brain philosophies
T3 semantic — brain_semantic_search (pgvector similarity + ACL)
T2+T3 struct — brain_graph_traverse (BFS on viin.brain.link)
T3 temporal — brain_timeline_query (write_date range + filters)
T1 getter — brain_get_page_content (content_plain + links)
T5 writers — brain_create_page / brain_create_block /
brain_update_property (confidence + attribution)
T2+T5 — brain_create_link (non-destructive edge)
T4+T5 — brain_link_record (page↔Odoo record binding)
Topic "Knowledge Base Assistant" wires the 9 tools. Every writer reads
``agent_id`` / ``trace_id`` / ``confidence`` from context, stamps
``is_ai_authored`` + ``ai_review_status='pending_review'`` (or
``approved`` when vault.auto_approve_ai_content=True), and refuses when
vault.allow_ai_authoring=False.
Controllers
* /viin_ai_brain/wysiwyg/prompt — run agent once, return trace+content
* /viin_ai_brain/wysiwyg/alternatives — N rephrase / shorten / lengthen
* /viin_ai_brain/ai_block/fill — resolve inline ai_block via agent
OWL services
* viin_web_editor.chatgpt_backend_provider — force-override, routes
OdooEditor ChatGPT dialog prompts through Viindoo agent stack.
* viin_brain.ai_bridge — force-override, exposes openChat / runInlinePrompt
/ regenerate. Three slash commands (/ai_write, /ai_chat, /ai_block).
Tests (27 passed on v17_test_brain_wi13, 0 failed, 0 errors)
* test_brain_rag — source extension, chunking (blocks + fallback + glue),
re-embed on write, content-only field gating, full _process_pending pass.
* test_brain_tools — shape/ACL/attribution for each of the 9 tools,
auto-approve vault path, blocked-vault AccessError.
* test_chatgpt_backend — wysiwyg/prompt, wysiwyg/alternatives,
ai_block/fill (controller methods invoked directly with mocked
request + AIAgent.run, so no LLM call + no HttpCase server startup).
Dependencies: viin_ai_agent, viin_ai_rag, viin_brain, viin_web_editor.
Campaign 2026-04-17-viindoo-brain-v17 WI-13 (Phase A v1.0 commit line).
STATUS: DONE
SPRINT_DONE: job_id=2026-04-17-brain-wi13-ai-brain-bridge
|
Failed
|
|
|
|
|