Files
th-hotel-simple/scripts/validate_fixed_channel_field_recovery_skill.py
鲨鱼辣椒 694c4317a3 checkpoint: complete recoverable V2 pre-separation baseline
Complete the selective V2 checkpoint with its minimal AgentBus, object-storage, replay persistence, and validated-workbench shared dependency closure.
2026-08-20 17:09:00 +08:00

34 lines
1.1 KiB
Python

#!/usr/bin/env python3
"""Validate fixed-channel field Recovery Skill source and optional `.skill` archive."""
from __future__ import annotations
import argparse
import sys
import zipfile
from pathlib import Path
from package_fixed_channel_field_recovery_skill import validate_archive, validate_source
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--source", required=True, type=Path, help="Editable Skill source directory")
parser.add_argument("--archive", type=Path, help="Optional packaged .skill archive")
args = parser.parse_args()
source = args.source.resolve()
files = validate_source(source)
if args.archive:
validate_archive(source, args.archive.resolve())
print(f"Validated fixed-channel field Recovery Skill: {source} ({len(files)} files)")
return 0
if __name__ == "__main__":
try:
raise SystemExit(main())
except (OSError, ValueError, zipfile.BadZipFile) as error:
print(f"Validation failed: {error}", file=sys.stderr)
raise SystemExit(1)