Commit Graph

4 Commits

Author SHA1 Message Date
panda 83e801a0b8 fix: auto-inject JasperReports namespace before XSD validation
AI-generated JRXML often omits the xmlns declaration on the root element.
The XSD schema requires targetNamespace, so validation would fail with
"Element 'jasperReport': No matching global declaration available".

_ensure_jr_namespace() detects missing xmlns and injects it before
schema validation, making the validator tolerant of namespace-free JRXML.
2026-05-23 09:44:08 +08:00
panda 1e5ce9725b feat: FastAPI+SSE API server, JRXML auto-reorder, session integrity fixes 2026-05-22 17:53:59 +08:00
panda 6467fd4ae5 feat: v3 robustness upgrade — EasyOCR, failure recovery, minimum content check
- OCR: EasyOCR (primary, ch_sim+en) with PaddleOCR fallback for Windows compatibility
- Validation: _check_minimum_content() rejects empty-shell JRXML (no band/textField)
- Retry: MAX_RETRY 3→5, exhaustion records pending_failure_context for next-turn auto-injection
- Finalize: only saves jrxml_versions on pass, preserves last good final_jrxml on fail
- Extract JRXML: improved empty markdown block handling and XML fragment fallback
- UI: real-time node progress via placeholder updates, initial "analyzing" feedback
- UI: use agent_state (full) instead of node_state (partial) for summary card routing
- UI: unknown template_type now gives LLM meaningful image context instead of metadata
- Docs: updated CLAUDE.md and CODE_GUIDE.md to reflect all v3 changes

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 19:15:30 +08:00
panda 4b43c5d3e4 feat: LangGraph工作流核心 — Agent状态/节点/图 + 验证服务 + 知识库
agent/
  state.py: AgentState TypedDict(20字段含意图/压缩/会话/撤销)
  nodes.py: 17个节点函数(生成/修改/验证/纠错/意图分类/压缩/撤销/重置)
  graph.py: 17节点状态图,8意图路由分发

验证服务 validation_service/
  main.py: FastAPI服务,lxml XSD验证 + 结构化检查(字段引用/SQL/尺寸)

数据 data/
  sample_templates/: 4个JRXML示例模板
  corrections/: 3个错误修正案例

脚本 scripts/
  init_kb.py: Chroma知识库初始化
2026-05-14 23:21:10 +08:00