feat(business): exclude intercompany transfer orders

Allow operators to configure internal company names and identifiers, then apply the filter consistently across business templates and query routing. Preserve direct external-customer orders and provide explicit CLI and environment overrides for internal-flow audits.

Validation: python -m unittest tests.test_business_facts tests.test_wiki_skills tests.test_user_ops -v (25 tests)
This commit is contained in:
Codex
2026-07-10 05:40:54 +00:00
parent 7eb9b987ab
commit 4c5454da90
7 changed files with 416 additions and 34 deletions
+11
View File
@@ -36,6 +36,17 @@ OBSIDIAN_FILE_ASSET_DB=
# Do not put real app secrets or access tokens in this example file.
OBSIDIAN_BUSINESS_FACTS_DB=
# Optional intercompany dedupe for multi-company sales data. When configured,
# business templates exclude orders where both the sales organization and the
# ordering customer match internal parties. This removes internal transfer
# orders while preserving direct external-customer orders to factories.
# Comma-separated name substrings, e.g. 北极大,捷康,众创.
OBSIDIAN_BUSINESS_INTERNAL_PARTIES=
# Optional exact org/customer codes for internal parties, comma-separated.
OBSIDIAN_BUSINESS_INTERNAL_PARTY_IDS=
# Set true only when auditing internal transfer orders.
OBSIDIAN_BUSINESS_INCLUDE_INTERNAL_ORDERS=false
# --- Source File MCP Server (optional) ---
#
# Run with: obsidian-wiki-mcp