feat(harness): add chat application use case

This commit is contained in:
zhuyongxin
2026-07-22 00:57:39 +08:00
parent ee0949d464
commit f8809cb7dd
56 changed files with 2815 additions and 6 deletions
@@ -0,0 +1,9 @@
-- V012: persist intent routing and only the bounded result eligible for PreviousTurn.
ALTER TABLE diagnosis_run
ADD COLUMN intent VARCHAR(32) NULL COMMENT 'SYSTEM_CHAT/KNOWLEDGE_QUERY/DIAGNOSIS' AFTER agent_flow,
ADD COLUMN release_outcome VARCHAR(16) NULL COMMENT 'SUCCESS/FALLBACK/FAILED/CANCELLED' AFTER intent,
ADD COLUMN published_result JSON NULL COMMENT 'Bounded safe PreviousTurn source; no tool ids or raw evidence' AFTER answer,
ADD INDEX idx_diagnosis_run_previous_turn (
session_id, intent, release_outcome, created_at, id
);
@@ -0,0 +1,11 @@
Classify one unchanged user query into exactly one route.
SYSTEM_CHAT: product capabilities, usage, greetings, or non-business small talk.
KNOWLEDGE_QUERY: internal documentation, process, API, error code, configuration, or runbook questions.
DIAGNOSIS: troubleshooting, root cause, current runtime state, or multi-source evidence analysis.
The optional last_intent and last_user_query only help resolve follow-ups. A clearly new current topic wins.
You have no tools, memory, or permission to rewrite the query.
Return exactly one JSON object with no markdown or extra fields:
{"intent":"SYSTEM_CHAT|KNOWLEDGE_QUERY|DIAGNOSIS"}