use super::{cmd, cmd_json};
pub(super) fn extend(commands: &mut Vec<serde_json::Value>) {
commands.extend([
cmd_json(
"info",
"문서 메타(포맷·버전·마지막 저장 제품·페이지/문단 수·폰트·제목) 표시",
&["--json", "--font-plan"],
&[
"schemaVersion",
"source",
"format",
"sizeBytes",
"version",
"sections",
"pageCount",
"paraCount",
"fonts",
"title",
"lastSavedWith",
"warnings",
],
),
cmd_json(
"word-count",
"문서 분량(구역·문단·글자·어절·쪽 수) — IR 본문만 센다",
&["--json"],
&[
"schemaVersion",
"source",
"sectionCount",
"paragraphCount",
"charCount",
"wordCount",
"pageCount",
],
),
cmd_json(
"bookmarks",
"문서 책갈피 목록 — 코어 get_bookmarks_native",
&["--json"],
&[
"schemaVersion",
"source",
"count",
"bookmarks",
],
),
cmd_json(
"header-footer",
"구역 머리말/꼬리말 한 건 조회 — 코어 get_header_footer_native",
&["--json"],
&[
"schemaVersion",
"source",
"section",
"isHeader",
"applyTo",
"exists",
],
),
cmd_json(
"headers-footers",
"문서 머리말/꼬리말 목록 — 코어 get_header_footer_list_native",
&["--json"],
&[
"schemaVersion",
"source",
"count",
"headersFooters",
],
),
cmd_json(
"charts",
"문서 차트 목록 — 코어 list_charts_native",
&["--json"],
&[
"schemaVersion",
"source",
"count",
"charts",
],
),
cmd_json(
"form-value",
"양식 개체 값 조회 — 코어 get_form_value_native",
&["--section", "--para", "--ctrl", "--json"],
&[
"schemaVersion",
"source",
"section",
"paragraph",
"ctrl",
"ok",
"formType",
"name",
"value",
"text",
"caption",
"enabled",
],
),
cmd_json(
"export-text",
"페이지별 텍스트 추출 (TXT 파일 또는 --json stdout)",
&["-o", "-p", "--max-chars", "--json"],
&[
"schemaVersion",
"source",
"pageCount",
"truncated",
"omittedCount",
"pages",
],
),
cmd_json(
"export-structure",
"문서 개요/조문 계층을 JSON 트리로 추출",
&["--mode", "-o", "--json"],
&["schemaVersion", "source", "mode", "nodeCount", "structure"],
),
cmd_json(
"digest",
"문서 요약 봉투(메타·개요·발췌·nextStep)를 한 번 호출로 출력",
&["--sections", "--pages", "--max-chars", "--json"],
&[
"schemaVersion",
"source",
"format",
"pageCount",
"paraCount",
"outline",
"excerpt",
"sections",
"truncated",
"nextStep",
],
),
cmd_json(
"export-ir-schema",
"공개 IR 의 JSON Schema 산출 — 외부 바인딩 코드 생성의 단일 출처 (#3762)",
&["--json", "--bare", "-o"],
&["schemaVersion", "irSchemaVersion", "dialect", "definitionCount", "schema"],
),
cmd_json(
"run",
"선언적 편집 계획 실행 — 정적 선검증·원자 실행·저널 (#3703). 선택 필드 \
preconditions.inputSha256 을 실으면 실행 입구에서 입력 지문을 대조해 낡은 기준을 \
거부한다 — 실행 0·디스크 무변경·preconditionFailed+nextCall·exit 3, --dry-run 도 \
같은 판정 (#4378 R22). import_paragraph_block은 source{path,sha256}+request를 받는 단독 step이며 원본 SHA 불일치는 실행/저장 없이 exit 3이다. fill_template·repeat_and_fill_paragraph_block·repeat_and_fill_table_rows는 request를 받는 단독 step이며, dry-run도 동일 detached 준비를 수행한다 (#3587).",
&["--json", "--plan-json", "--dry-run"],
&[
"schemaVersion",
"planVersion",
"input",
"output",
"outputFormat",
"steps",
"verify",
"invalid",
"preconditionFailed",
"nextCall",
"preview",
"steps[].operationResult",
"steps[].source",
"steps[].workload",
"inputSha256",
"outputSha256",
],
),
cmd_json(
"replay",
"계획을 임시 산출로 재실행해 작업 영수증(입력·계획·산출 SHA-256)을 발급하고, --expect-output-sha256 로 타인의 작업 주장을 재현 검증한다 — 불일치는 exit 3 (#4391)",
&["--json", "--plan-json", "--expect-output-sha256", "--capsule", "--parent", "--sign-key"],
&[
"schemaVersion",
"mode",
"input",
"inputSha256",
"planSha256",
"outputSha256",
"toolVersion",
"steps",
"reproduced",
"expectedOutputSha256",
],
),
cmd_json(
"lineage",
"작업 캡슐 해시 체인을 거슬러 연대기를 검증 — 부모 파일 무결·계보 불변식(부모 산출=자식 입력)·(--deep) 링크별 재현·(--keyring) 링크별 서명 귀속. 깨진 체인은 exit 3, brokenAt 명세 (#4401·#4509)",
&["--json", "--deep", "--keyring", "--anchor-log"],
&[
"schemaVersion",
"head",
"depth",
"valid",
"brokenAt",
"links",
],
),
cmd_json(
"keygen",
"Ed25519 서명키 파일 발급 — 캡슐 귀속(4년 축)의 시작점. 비밀키가 담기므로 기존 파일 덮어쓰기 금지, 보관 책임은 소유자 (#4509)",
&["--json", "--key-id", "--out"],
&["schemaVersion", "keyId", "publicKey", "keyFile"],
),
cmd_json(
"verify-signature",
"캡슐 분리 서명(<캡슐>.sig.json)을 파일 바이트·키 등록부와 대조 — verdict(valid|invalid|unknownKey|revoked|malformed)는 봉투 데이터, 유효 아님 = exit 3 (#4509)",
&["--json", "--sig", "--keyring"],
&[
"schemaVersion",
"capsule",
"sigPath",
"capsuleSha256",
"capsuleShaMatches",
"signatureOk",
"keyId",
"keyKnown",
"revoked",
"verdict",
],
),
cmd_json(
"harness",
"검증 루프의 쓰는 쪽 — init(작업장 규약)·wrap(실산출+영수증+캡슐+자동 부모 연결+서명 한 방). 판정은 harness-status (#4537)",
&["--json", "--plan", "--dir", "--sign-key", "--key-id"],
&[
"schemaVersion",
"dir",
"capsule",
"output",
"parent",
"signed",
],
),
cmd_json(
"harness-status",
"작업장 통합 판정 — 캡슐 체인 무결·(--keyring) 서명 집계·(--deep) 전수 재현을 한 봉투로. 깨짐 exit 3, brokenAt 이 원인 캡슐 (#4537)",
&["--json", "--keyring", "--deep"],
&[
"schemaVersion",
"dir",
"capsules",
"chainValid",
"brokenAt",
"signed",
"reproduced",
"verdict",
],
),
cmd_json(
"anchor",
"투명성 로그(T7 방어) — add(append-only 등재, 깨진 로그 거부)·checkpoint(머클 루트)·verify(등재·자기 무결·머클 경로 판정, 아님 exit 3). 공표는 운영 절차 (#4543)",
&["--json", "--log", "--checkpoint", "-o"],
&[
"schemaVersion",
"log",
"capsuleSha256",
"seq",
"upToSeq",
"merkleRoot",
"entries",
"logChainOk",
"logged",
"inCheckpoint",
"merklePath",
],
),
cmd_json(
"gate",
"반입 정책 기계 판정 — admissionPolicy(연산자 eq·in·gte·lte 4종 고정, deny 기본, 미지 키 로드 거부)를 캡슐에 적용. 재료는 자기 신고가 아니라 재계산(계보·서명·앵커·--deep 재실행), 거부는 exit 3 + violations[] (#4545)",
&["--json", "--policy", "--keyring", "--anchor-log", "--policy-keyring", "--deep"],
&[
"schemaVersion",
"policy",
"policyPath",
"policySigned",
"target",
"targetSha256",
"verdict",
"evaluated",
"violations",
],
),
cmd_json(
"bundle",
"연합 교환 — export(계보 폐쇄집합+서명+머클 증명을 zip 하나로)·verify(컨테이너·폐쇄집합·계보·서명[도메인 키링만, 동봉 불신]·앵커 5단 오프라인 판정, 깨짐 exit 3) (#4549)",
&["--json", "-o", "--anchor-log", "--checkpoint", "--domain", "--trust-domain"],
&[
"schemaVersion",
"bundle",
"head",
"capsules",
"signatures",
"proofs",
"trustDomain",
"containerOk",
"closureOk",
"lineageValid",
"signed",
"anchored",
"brokenAt",
"verdict",
],
),
cmd_json(
"disclose",
"선택적 공개 — redact(plan 문자열 잎을 salt 커밋으로 치환한 가림 캡슐+비밀 개봉 파일)·verify(부분 개봉 필드 대조, 불일치 exit 3)·restore(전체 개봉으로 바이트 완전 복원 — 원본 서명 그대로 valid) (#4551)",
&["--json", "-o", "--opening-out", "--opening"],
&[
"schemaVersion",
"capsule",
"redacted",
"opening",
"committedFields",
"originalCapsuleSha256",
"verifiedFields",
"mismatched",
"unopened",
"restored",
"restoredSha256",
"byteIdentical",
"verdict",
],
),
cmd_json(
"settle",
"정산 증빙 — propose(명세서·캡슐·게이트 봉투 3해시 고정 청구 발급, 4년 서명 선택)·verify(3해시 대조+게이트 verdict 재확인+서명·이중청구 opt-in 축, 실패 exit 3)·record(원장 append-only 기입, 이중 청구 전역 검사 exit 3) — 돈은 움직이지 않는다, 산출물은 제3자 검증 가능한 지불 근거뿐 (#4553)",
&[
"--json",
"--workorder",
"--capsule",
"--gate-envelope",
"-o",
"--sign-key",
"--keyring",
"--ledger",
"--sig",
"--verdict",
],
&[
"schemaVersion",
"claim",
"workorderSha256",
"capsuleSha256",
"gateEnvelopeSha256",
"signed",
"workorderOk",
"capsuleOk",
"gateOk",
"gateVerdict",
"signerOk",
"workorderSignerOk",
"ledgerOk",
"duplicate",
"ledger",
"seq",
"claimSha256",
"existingSeq",
"verdict",
],
),
cmd_json(
"audit-report",
"감사 보고 표준 — 캡슐 폴더의 재현(--deep)·계보·귀속(--keyring)·앵커(--anchor-log)·게이트(--policy) 수치를 기존 축 검증의 기계 합산으로 산출하고(kind agentLaborAuditReport) 보고서 자체를 4년 사이드카로 서명(--sign-key)한다 — \"감사 보고서를 감사할 수 있다\"가 표준의 요건 (#4558)",
&["--json", "--deep", "--keyring", "--anchor-log", "--policy", "--sign-key", "-o"],
&[
"schemaVersion",
"report",
"capsules",
"reproduction",
"lineage",
"attribution",
"anchoring",
"gate",
"toolVersions",
"signed",
],
),
cmd_json(
"recall-scope",
"오염 리콜 범위 — 오염 캡슐(경로 또는 sha256)의 후손 폐쇄집합을 계보 걷기로 계산해 영향/미영향을 가르고, --ledger 를 주면 영향 캡슐의 정산 청구 좌표까지 짚는다(리콜의 회계 연결) (#4558)",
&["--json", "--contaminated", "--among", "--ledger"],
&[
"schemaVersion",
"contaminated",
"affected",
"unaffected",
"claims",
],
),
cmd_json(
"conformance",
"적합성 자가진단 L1~L5 — 영수증(1년)→감사가능+계보(2·3년)→귀속+앵커(4·5년)→게이트(6년)→원장(9년) 누적 요건을 기존 판정기 재사용으로 검사(신규 판정기 발명 0), 미달은 exit 3 이고 항목별 판정은 checks 가 말한다 (#4558)",
&["--json", "--level", "--deep", "--keyring", "--anchor-log", "--policy", "--ledger"],
&[
"schemaVersion",
"level",
"capsules",
"checks",
"achieved",
"verdict",
],
),
cmd_json(
"audit",
"작업 캡슐(*.capsule.json) 폴더 전수 재실행·대조 — 에이전트 노동의 재현율 회계. 불일치 1건이라도 있으면 exit 3 (#4393)",
&["--json"],
&[
"schemaVersion",
"root",
"total",
"reproduced",
"failed",
"reproducedRate",
],
),
cmd_json(
"export-plan-schema",
"계획서(run) 문법의 JSON Schema 산출 — 계획 생성의 단일 출처 (#3719 §6-4)",
&["--json", "--bare", "-o"],
&[
"schemaVersion",
"planSchemaVersion",
"dialect",
"definitionCount",
"schema",
],
),
cmd_json(
"capabilities",
"본 자기서술 JSON 출력",
&["--search"],
&[
"schemaVersion",
"schemaRegistry",
"tool",
"version",
"exitCodes",
"commands",
"batch",
],
),
cmd_json(
"export-provenance-map",
"명령별 문서 파생(신뢰 불가) 봉투 필드 지도 — 봉투의 untrustedContent/untrustedFields 표지의 원천",
&["--json"],
&[
"schemaVersion",
"tool",
"version",
"envelopeFlags",
"pathSyntax",
"policy",
"commands",
],
),
cmd_json(
"export-agent-manifest",
"capabilities+irSchema+provenanceMap+planSchema 를 한 번의 호출로 조립 — 누락 축이 생기면 missingAxes 로 명시 (#3828 B2)",
&["--json", "--bare"],
&["schemaVersion", "capabilities", "irSchema", "provenanceMap", "planSchema", "missingAxes"],
),
cmd(
"mcp-serve",
"MCP 서버 (stdio JSON-RPC) — capabilities --mcp 도구 전부 + 세션 도구 실행 (#3140)",
),
]);
}