//go:build llm_script && !scripts_pkg package main import ( "flag" "fmt" "os" "time" ) func main() { loadSubscriptionImportEnv() var url string var fixture string var snapshotDir string var baselinePath string var timeoutSeconds int var allowBootstrap bool flag.StringVar(&url, "url", defaultDeepSeekNewsFetchURL, "DeepSeek 官方新闻页") flag.StringVar(&fixture, "fixture", "", "DeepSeek 新闻页样例文件") flag.StringVar(&snapshotDir, "snapshot-dir", "", "DeepSeek news snapshot 输出目录") flag.StringVar(&baselinePath, "baseline-path", "", "DeepSeek news 结构基线签名路径") flag.IntVar(&timeoutSeconds, "timeout", 20, "请求超时(秒)") flag.BoolVar(&allowBootstrap, "allow-bootstrap", true, "当 baseline 缺失时自动初始化") flag.Parse() now := time.Now() cfg := deepseekNewsSignatureGuardConfig{ URL: url, Fixture: fixture, SnapshotDir: snapshotDir, BaselinePath: baselinePath, Timeout: time.Duration(timeoutSeconds) * time.Second, AllowBootstrap: allowBootstrap, } result, err := runDeepSeekNewsSignatureGuard(cfg, now) if auditErr := persistDeepSeekNewsSignatureAuditIfConfigured(cfg, result, now, err); auditErr != nil { fmt.Fprintf(os.Stderr, "deepseek_news_signature_guard audit: %v\n", auditErr) if err == nil { err = auditErr } } fmt.Println(formatDeepSeekNewsSignatureGuardSummary(result)) if err != nil { fmt.Fprintf(os.Stderr, "deepseek_news_signature_guard: %v\n", err) os.Exit(1) } }