feat(business): add schema-driven query templates
Expose a business schema catalog and explicit template runner for Kingdee sales-order facts. Update wiki-query guidance so the LLM routes operational questions through templates first and guarded SQL only when needed. Refresh user docs and ops aliases, and add coverage for schema metadata, template execution, and CLI JSON output. Validation: python3 -m unittest discover -v; python3 -m compileall obsidian_wiki tests scripts; git diff --check
This commit is contained in:
@@ -34,7 +34,8 @@ Usage:
|
||||
scripts/obsidian-wiki-ops.py kingdee config [args...]
|
||||
scripts/obsidian-wiki-ops.py kingdee auth-test [args...]
|
||||
scripts/obsidian-wiki-ops.py kingdee sync [args...]
|
||||
scripts/obsidian-wiki-ops.py kingdee query "2026年6月接了多少单" [args...]
|
||||
scripts/obsidian-wiki-ops.py kingdee schema --json
|
||||
scripts/obsidian-wiki-ops.py kingdee template order_count --vault /path/to/vault --year 2026 --month 6 --json
|
||||
scripts/obsidian-wiki-ops.py kingdee sql "SELECT COUNT(*) FROM orders" [args...]
|
||||
|
||||
scripts/obsidian-wiki-ops.py timer install [args...]
|
||||
@@ -89,6 +90,10 @@ def route_kingdee(args: Sequence[str]) -> int:
|
||||
return obsidian_cli_main(["business", "sync", "kingdee", "--dry-run-auth", *rest])
|
||||
if action == "sync":
|
||||
return obsidian_cli_main(["business", "sync", "kingdee", *rest])
|
||||
if action == "schema":
|
||||
return obsidian_cli_main(["business", "schema", *rest])
|
||||
if action == "template":
|
||||
return obsidian_cli_main(["business", "template", *rest])
|
||||
if action == "query":
|
||||
return obsidian_cli_main(["business", "query", *rest])
|
||||
if action == "sql":
|
||||
|
||||
Reference in New Issue
Block a user