HwpAutomation 프로젝트는 Idris2 형식 명세를 사용하여 타입 안전성을 보장합니다.
- Specs/HwpCommon.idr: 공통 타입 (DocumentState, HwpResult, ParamValue)
- Specs/ActionTableMCP.idr: ActionTable API 명세
- Specs/AutomationMCP.idr: Automation API 명세 (OLE Object Model)
Idris2는 ~/.bashrc에서 자동으로 로드됩니다 (PowerShell 프로필과 동일).
# 전체 스펙 체크
bash check_specs.sh
# 개별 파일 체크 (idris2.sh는 전역 사용 가능)
idris2.sh --check Specs/HwpCommon.idrIdris2 환경은 전역으로 설정되어 있으므로, 모든 프로젝트에서 자동으로 사용 가능합니다.
자세한 내용은 /c/Users/joonho.lee/Projects/InstallIdris2/BASH_SETUP.md 참조.
GitHub Actions 등에서 사용하려면:
- name: Setup Idris2
run: |
# WSL 또는 직접 설치
- name: Check Specs
run: bash check_specs.sh| Idris2 스펙 | Python 구현 |
|---|---|
| Specs/HwpCommon.idr | src/common/types.py |
| Specs/ActionTableMCP.idr | src/action_table/*.py |
| Specs/AutomationMCP.idr | src/automation/*.py |
Python 구현은 Idris2 스펙을 기반으로 타입 힌트와 런타임 검증을 제공합니다.