Skip to content

Releases: airmang/python-hwpx

v2.23.0

Choose a tag to compare

@github-actions github-actions released this 03 Jul 13:26

[2.23.0] - 2026-07-03

추가

  • 폰트 shrink-to-fit (M10 후속, S-064): hwpx.table_patch.fill_cellsfit_max_lines(+ 셀별 max_lines) — 셀 텍스트가 템플릿 폰트로 목표 줄수를 넘겨 wrap되면 form_fit FitEngine이 확신을 갖고 들어가는 가장 큰 폰트(≥ min_font_pt)를 골라 실제 <hh:charPr>로 재료화(base charPr 복제·height 변경)하고 셀 run을 그 charPr로 재지정. byte-preserving(header.xml의 새 charPr + 해당 섹션만 변경, opt-in이라 목표 없는 채움은 바이트 동일). FitEngine 정직 게이트가 borderline shrink는 거부(확실히 들어갈 때만 축소).

비고

  • 오라클 실증: 실제 3학년 양식 성취기준 셀을 긴 텍스트 + max_lines=4로 채우니 9pt→6.5pt 축소, 실한컴 clean 렌더(나머지 표는 9pt 유지). 정직: 도교육청 폼은 base 9pt라 축소 여지(→8pt)가 작아 autofit_columns(가로)가 주력이고 폰트 축소는 보조; base 폰트 큰 폼엔 효과적. README 3스택 정비(python-hwpx 425→171·mcp 599→184·skill 471→178줄) 동반.

v2.22.0

Choose a tag to compare

@github-actions github-actions released this 03 Jul 12:58

[2.22.0] - 2026-07-03

추가

  • 열 너비 조정 (M10 후속, S-064): hwpx.table_patch.apply_table_ops 새 op 2종 — set_column_widths(table_index, widths)(명시적 논리 열너비; 각 셀 cellSz.width = 걸친 열들의 합, 병합 인식)·autofit_columns(table_index)(내용에 맞춰 열너비 재균형: demand = 최장 단일-span 셀 텍스트폭[form_fit 어드밴스 모델], sqrt-damped로 문단 열 폭주 방지, 열별 최소폭 floor, 표 총폭 보존). 둘 다 byte-preserving(cellSz만 편집, charPr/header 불변)이며 grid 검증. 배경: 텍스트가 길어지면 한컴이 행 높이를 자동으로 늘려 넘침은 없으나 좁은 열은 촘촘히 wrap됨 — autofit이 내용 많은 열을 넓혀 완화한다(오라클 실증: 운영계획 성취기준 열 14186→16441, wrap 약 16→9줄, 총폭 보존).

v2.21.0

Choose a tag to compare

@github-actions github-actions released this 03 Jul 11:55

[2.21.0] - 2026-07-03

추가

  • M10 바이트보존 구조적 양식채움 (S-064): hwpx.table_patch — 2026-07-03 실전 실패(도교육청 평가계획 양식을 재생성으로 채워 서식 파괴)를 드라이버로, S-052 바이트 코어 위에 "양식 채움 층"을 완성. fill_cells(source, cells)(table_index, row, col) 주소로 셀 텍스트를 바이트보존 splice(빈/self-closing 셀 삽입, 다중 문단 셀 전체 교체, 병합 앵커 해석). 미변경 셀·표·섹션은 바이트 동일(원칙 VII), no-op=바이트동일, 미해결 주소는 mutate 없이 skipped.
  • 표 구조 프리미티브 apply_table_ops(source, ops): delete_column(자유폭 재분배 + 열삭제로 빈 행 생기면 캐스케이드 삭제·rowSpan 붕괴)·delete_row·delete_table·insert_row_by_clone(rowSpan==1 참조행 복제, 서식보존·문단 id 리프레시 — 균등 재생성 금지). 각 편집 후 build_grid 검증(overlap/hole/oob)으로 무효면 거부(fail-closed, 원칙 VI). 중첩표 거부.
  • 실한컴 오라클 게이트 verify_fill(before, after, require=): resolve_oracle+visual_check로 before/after를 실제 한컴 렌더 대조 → render_checked·overflow·overlap(글자겹침)·page_count. 오라클 없으면 정직 degrade(render_checked=False), require=True면 fail-closed. open-safety/HTML 프리뷰를 한컴 수용으로 오인 금지.

비고

  • 오라클 실증: 실제 3학년 양식에서 delete_column(반영비율 7→5열 캐스케이드)·insert_row_by_clone(세부기준 +행, 85병합 표)·content-complete 운영계획 채움이 실한컴에서 서식보존·clean 렌더. MCP 표면(apply_table_ops·verify_form_fill)은 hwpx-mcp-server 2.13.0에서 합류.

v2.20.0

Choose a tag to compare

@github-actions github-actions released this 02 Jul 03:30

[2.20.0] - 2026-07-02

추가

  • M7 네이티브 자동 차례·상호참조 (S-062): hwpx.tools.toc_authoradd_native_toc(한컴 네이티브 TABLEOFCONTENTS 필드영역 + Command DSL, dirty=1 기본 = 한컴이 처음 여는 순간 항목·차례 스타일·쪽번호를 재계산), add_page_crossref(쪽 번호 CROSSREF 필드 + 캐시 결과런 — 한컴이 편집/저장 시 자동 재계산), mark_toc_dirty(편집 후 재번호 재트리거), ensure_paragraph_anchor_id/outline_heading_paragraphs. 계약은 실제 한컴 저작 gold pair에서 리버스엔지니어링(tests/fixtures/m7_toc_gold/).
  • 차례 충실도 하니스: hwpx.tools.toc_fidelityparse_toc_model(하이퍼링크·평문 재생성 항목 모두), structural_report(오라클 없이도 CROSSREF↔차례 캐시 모순으로 stale 탐지), toc_verify(한컴 렌더 대조 toc_correctness_ratio, 무오라클 시 정직 unverified), grow_paragraph.
  • Mac 오라클 새로고침 레그: MacHancomOracle.refresh_document(+_refresh_hwpx_mac.applescript) — 열기→dirty 필드 재생성→제자리 저장→닫기. dirty-재생성 직후 같은 세션 PDF export가 이 한컴 빌드를 크래시시키는 실측 때문에 refresh와 render는 의도적으로 별도 세션.

수정

  • Mac 렌더 스크립트 waitForFile%%EOF 트레일러를 요구 — size>0만으로는 비동기 export 도중의 잘린 PDF를 캡처했다(실측).

비고

  • E2E 오라클 증명: 저작→새로고침→ratio 1.0(2/5/8쪽) → 재페이지네이션+mark_toc_dirty→새로고침→ratio 1.0 + 페이지 SHIFT(2/7/10). 실측 수집 규칙: ContentsStyles:0:이 바탕글(스타일 0) 문단도 차례 항목으로 수집 — 본문은 본문(스타일 1) 등 비수집 스타일 권장. MCP 표면(add_toc·add_cross_reference·verify_toc)은 hwpx-mcp-server 2.12.0에서 합류.

v2.19.0

Choose a tag to compare

@github-actions github-actions released this 02 Jul 01:23

[2.19.0] - 2026-07-02

추가

  • M6 런서식 충실 읽기 하니스 (S-060): hwpx.tools.read_fidelityresolve_run_spans(런별 bold/italic/underline/strikeout/color/size_pt/font/super-subscript를 charPr+fontface 해석), collect_notes(각주/미주 본문 + 본문 서식), roundtrip_fidelity/corpus_fidelity(콘텐츠-레벨 라운드트립 충실도), spans_fidelity/notes_fidelity 비교기, 공개 fontface_maps/run_span. 요소-카운트만 재던 roundtrip_diff와 달리 charPr-해석 런-스팬 및 각주 본문의 무손실을 측정한다.
  • strikeout은 shape 속성으로 정규화(항상 존재하는 <hh:strikeout shape="NONE"/>가 상시-on으로 오독되던 문제 회피), underline type NONENone 정규화.

비고

  • 코퍼스 런서식 라운드트립 충실도 1.0(4075 런 / hwpxlib 47편). reading 차원 4→5(구조적 corpus-scale, 오라클 불요). 설치 MCP 표면 노출은 hwpx-mcp-server 2.11.0에서 합류.

v2.18.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 23:30

[2.18.0] - 2026-07-01

추가

  • M5 개인정보(PII) 마스킹 엔진 (S-059): hwpx.tools.piidetect_pii / mask_pii / mask_value / PIIPolicy. 기계검증 세트(주민등록번호·휴대폰·이메일·카드+Luhn)는 항상-on high-confidence, 맥락형(계좌·주소·이름)은 라벨 게이트 low-confidence(과마스킹 방지). 필드 최소화 minimize_fields, 가명 Pseudonymizer(결정적 토큰맵), 비식별 deidentify(불가역 salted-SHA256), 로그 위생 PiiLogFilter / scrub_exception_message.
  • 메일머지·추출 경로 마스킹: mail_merge(masking_policy=DEFAULT_POLICY) 기본 ON — 명부 산출물의 기계검증 PII 자동 마스킹(마스킹 길이로 FitPolicy 재측정). export_text / export_html / export_markdown(masking_policy=...) opt-in 추출 마스킹(기본 None = 내부 placeholder 탐지 보존).

비고

  • 폼필(form-fill) 경로 마스킹·scan_personal_info·전 경로 0-누출 게이트는 MCP 표면(hwpx-mcp-server) 단계에서 합류합니다.

v2.17.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 15:01

[2.17.0] - 2026-06-30

추가

  • M4 변경추적(redline) 저작 (S-058): HwpxDocument.add_tracked_insert / add_tracked_delete / add_tracked_replace — 에이전트가 변경추적(삽입/삭제/치환)을 작성자·일자와 함께 저작하고, 사람이 한컴 검토 리본에서 개별 수락/거부할 수 있습니다. 헤더 trackChanges/trackChangeAuthors surgical splice(작성자 dedup·표시 플래그) + 본문 insertBegin/End·deleteBegin/End 마크(charPrIDRef 상속, paraend=0). 한컴 수용성은 measure-first 스파이크로 입증(실 Windows 한컴 COM IsTrackChange=1·opens-clean·roundtrip + 검토 리본 수락→반영/거부→취소 확인).
  • hwpx.tools.redline.verify_redline(before, after, *, oracle=None) — 구조 검증(변경 수·TcId 마크 연결·표시 플래그·opens-clean) + visual_check render_checked 를 정직하게 fold(오라클 없으면 unverified, 거짓 통과 없음).

수정

  • 메모(코멘트) 본문이 숫자로 표시되던 버그: attach_memo_field 가 MEMO 필드 subList에 코멘트 내용 대신 메모 ID(숫자)를 넣어, 한컴이 메모 박스에 숫자를 렌더했습니다. 한컴 오라클 구조에 맞춰 subList에 코멘트 텍스트를 넣고 MemoShapeIDRef(기본 65535)로 박스를 연결하도록 수정했습니다(실 Windows 한컴 검증).

비고

  • 수락/거부는 사람이 한컴 검토 리본에서 수행합니다(COM accept 액션 미노출 — 정석 워크플로).
  • byte-identity: 미수정 part(ZIP 엔트리)는 byte-identical. 수정 섹션 내부의 문단단위 완전 byte-identical(surgical splice)은 stretch로 연기(한컴 렌더·수용엔 무영향).

v2.16.0

Choose a tag to compare

@github-actions github-actions released this 29 Jun 02:30

[2.16.0] - 2026-06-29

추가

  • M3 문서 작성 (S-057): create_document_from_plandocument_type(공문/보고서/가정통신문)을 보고 실제 한컴-harvest 프로파일(hwpx.design.compose)로 라우팅합니다. 미매칭 유형은 기존 제로베이스 경로를 유지하고 -> HwpxDocument 반환 계약을 보존합니다. 공문은 결문 메타 document_plan.gyeolmun = {issuer, productionNumber, enforcementDate, disclosure} 를 지원합니다.
  • hwpx.design.profiles.home_notice — 실제 가정통신문에서 harvest한 디자인 프로파일.
  • 공문 구조 hard-gate: inspect_official_document_style(source, *, document_type="공문") 이 시행문 척추(수신·발신명의·시행·공개구분·끝.)를 ERROR 심각도로 검사하고 structure_pass 를 반환합니다. 표 셀까지 읽는 table-aware 텍스트 추출(실 시행문의 두문/결문은 표 안에 있음)을 추가했고, 진짜 시행문(tests/fixtures/m3_gongmun_gold/seoul_sihaengmun.hwpx)을 앵커로 삼습니다.
  • inspect_document_authoring_qualitykorean_proofing_status(정직 unverified / llm_proofed_not_oracle_verified, 거짓 통과 없음)와 verify_render=True 시 실제 한컴 렌더 영수증 render_checked/visual_complete 를 추가했습니다.

비고

  • 각주(footnote) 작성은 한컴 렌더가 확인되지 않아 honest-deferred(unverified) 상태입니다.

v2.15.0

Choose a tag to compare

@github-actions github-actions released this 27 Jun 05:05

[2.15.0] - 2026-06-27

추가

  • HwpxDocument.set_paragraph_format(keep_with_next=, keep_lines=, page_break_before=) — 문단 keep-together 플래그를 엔진 ensure_paragraph_format(break_setting=)로 전달한다(새 paraPr 발행, 기존 paraPr 미수정 = 무손실). 시험지 조판 등에서 한 문항이 단/쪽 경계에서 잘리지 않게 묶을 때 쓴다.
  • hwpx.exam: re-typeset an authored exam (Markdown) into a school form .hwpx
    — Exam IR + strict md parser, form profiler (role→existing form style),
    keep-together body composition (insert into the form's body region, never
    append; 관리박스 + footer preserved byte-identical), and an oracle convergence
    driver compose_exam_into_form. The driver renders via Hancom and, when the
    composed 문항 are in the extractable text layer, verifies 문항-split / overflow
    / placeholder integrity (inserting column/page breaks to converge); when they
    are not (forms whose body Hancom exports as vector curves) or no oracle is
    available, it returns render_checked/splits=None + needs_review rather
    than a silent pass (Constitution V — honest unverified).
  • find_seal_anchor — 발신명의가 좁은 표 셀에서 여러 줄로 wrap된 경우도 앵커를 찾는 fallback(연속 줄 윈도우, 최대 3줄). 단일 줄 매칭이 우선이라 기존 동작 불변; spurious 다중줄 매칭은 윈도우·동일페이지로 차단.

수정

  • paragraph.add_picturetreat_as_char=True(inline)인데 pos_overrides(PAPER relTo/offset)를 주면 모순된 inline/floating <hp:pos>를 방출하던 것을 ValueError로 fail-fast. floating 배치는 treat_as_char=False에서만.

v2.13.0

Choose a tag to compare

@github-actions github-actions released this 24 Jun 13:43

[2.13.0] - 2026-06-24

추가

  • hwpx.conformance — VisualComplete 적합성 코퍼스 + 배지 등급(plan §2 Phase G). hwpx-conformance run이 코퍼스를 4개 배지 등급(Open-Safe/Semantic-Safe/Form-Safe/VisualComplete)으로 채점하고 등급별 통과율을 산출합니다. 임계값은 엄격 기본값(구조 등급 100%, 폼셋 overflow 0%, VisualComplete ≥95%). golden 베이스라인(tests/conformance/golden/structural.json) 대비 회귀를 숫자로 감지하며(--check), CI가 구조 등급을 추적합니다. 어슈어런스 등급은 절대 섞지 않습니다(§0.0): 한컴이 없는 구조 실행은 VisualComplete를 unverified로 보고하고, 오라클 실행(도달 가능한 한컴 백엔드)만 VisualComplete를 검증합니다. 케이스에 before(+선택적 editMask)를 선언하면 VisualComplete가 오라클의 before/after diff 경로로 게이트됩니다(마스크 밖 변경·글자 겹침을 잡음). expectVisualDefect는 일부러 깨뜨린 쌍을 positive control로 삼아 게이트가 결함을 실제로 잡는지 검증합니다. (실측: 실제 한컴-저장 코퍼스에서 clean 쌍은 통과, out-of-slot 변경은 catch.)