@morehao/trendradar-contract 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gen/ts/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import Ajv from 'ajv/dist/2020.js'
3
3
  import addFormats from 'ajv-formats'
4
4
 
5
- export const contractVersion = "0.3.0"
5
+ export const contractVersion = "0.4.0"
6
6
 
7
7
  export const errorCatalog = {
8
8
  "INTERNAL": {
@@ -301,10 +301,10 @@ export const fixtures = {
301
301
  ]
302
302
  },
303
303
  "releaseNormal": {
304
- "schema": 1,
304
+ "schema": 2,
305
305
  "date": "2026-10-31",
306
- "period": "daily",
307
- "contentHash": "sha256:6ffddcbca4448be9db6dcdfcc407183516c35ed78001b32c3d567ad8a4b4ff42",
306
+ "period": "weekly",
307
+ "contentHash": "sha256:87fe3cf94463a7011dbebfbeae9d77544a613751fdd0ba194a6e4534c1bb02ba",
308
308
  "contentHashAlgo": "jcs-sha256-v1",
309
309
  "coreVersion": "0.5.0",
310
310
  "generatedAt": "2026-10-31T13:04:00Z",
@@ -330,7 +330,10 @@ export const fixtures = {
330
330
  "summaryZh": "新增证据充分性决策模型与 Categorize 组件,兼容 rc2 schema,可直接升级。",
331
331
  "summarySource": "model"
332
332
  }
333
- ]
333
+ ],
334
+ "periodStart": "2026-10-26",
335
+ "periodEnd": "2026-11-01",
336
+ "summaryZh": "本周 1 个版本:v1.0.0-rc3。"
334
337
  },
335
338
  {
336
339
  "fullName": "deepseek-ai/deepseek-harness",
@@ -349,15 +352,18 @@ export const fixtures = {
349
352
  "summaryZh": "发布说明缺失,已回退到 commit 信息。",
350
353
  "summarySource": "model"
351
354
  }
352
- ]
355
+ ],
356
+ "periodStart": "2026-10-26",
357
+ "periodEnd": "2026-11-01",
358
+ "summaryZh": "本周 1 个版本:dsh-v0.2.2-alpha.2。"
353
359
  }
354
360
  ]
355
361
  },
356
362
  "releaseDegraded": {
357
- "schema": 1,
363
+ "schema": 2,
358
364
  "date": "2026-10-31",
359
- "period": "daily",
360
- "contentHash": "sha256:f952f1607ff1708120c35e7a9551f0691ae747edf2ee959445edcd53bc0edf25",
365
+ "period": "weekly",
366
+ "contentHash": "sha256:5f34a40370d022ed06a995e32917a0299a121973ef13eee0e2f1a747a0a6aecb",
361
367
  "contentHashAlgo": "jcs-sha256-v1",
362
368
  "count": 1,
363
369
  "degraded": true,
@@ -379,19 +385,506 @@ export const fixtures = {
379
385
  "summaryZh": "版本 v2.0.0(未获取到变更说明)",
380
386
  "summarySource": "original"
381
387
  }
382
- ]
388
+ ],
389
+ "periodStart": "2026-10-26",
390
+ "periodEnd": "2026-11-01",
391
+ "summaryZh": "本周 1 个版本:v2.0.0。"
383
392
  }
384
393
  ]
385
394
  },
386
395
  "releaseEmpty": {
387
- "schema": 1,
396
+ "schema": 2,
388
397
  "date": "2026-10-31",
389
- "period": "daily",
390
- "contentHash": "sha256:501d8c4be30af9d1dacdf15b2e48ccd3134cbe439695f7685deea11e00c24de8",
398
+ "period": "weekly",
399
+ "contentHash": "sha256:e9cd2c19bcaf079d832114be1dff9ce81351d1643c5c6e8efd5da781ef18d5e4",
391
400
  "contentHashAlgo": "jcs-sha256-v1",
392
401
  "count": 0,
393
402
  "degraded": false,
394
403
  "repos": []
404
+ },
405
+ "releaseWeekly": {
406
+ "schema": 2,
407
+ "date": "2026-11-01",
408
+ "period": "weekly",
409
+ "contentHash": "sha256:0e93b38ea1e36f475161528332375d6e48a7fef1bad6125f96b27358d79b838e",
410
+ "contentHashAlgo": "jcs-sha256-v1",
411
+ "coreVersion": "0.7.0",
412
+ "generatedAt": "2026-11-01T00:30:00Z",
413
+ "count": 2,
414
+ "degraded": false,
415
+ "repos": [
416
+ {
417
+ "fullName": "vercel/next.js",
418
+ "url": "https://github.com/vercel/next.js",
419
+ "latestTag": "v15.2.0",
420
+ "newCount": 2,
421
+ "periodStart": "2026-10-26",
422
+ "periodEnd": "2026-11-01",
423
+ "summaryZh": "本周发布 v15.2.0 与 v15.1.9:构建缓存命中率提升,修复 App Router 下动态段预渲染的回归。",
424
+ "releases": [
425
+ {
426
+ "id": 428974490,
427
+ "tag": "v15.2.0",
428
+ "name": "v15.2.0",
429
+ "kind": "release",
430
+ "publishedAt": "2026-10-29T10:00:00Z",
431
+ "url": "https://github.com/vercel/next.js/releases/tag/v15.2.0",
432
+ "prerelease": false,
433
+ "draft": false,
434
+ "bodyExcerpt": "Faster builds and a fix for dynamic segment prerendering.",
435
+ "summarySource": "model"
436
+ },
437
+ {
438
+ "id": 428974480,
439
+ "tag": "v15.1.9",
440
+ "name": "v15.1.9",
441
+ "kind": "release",
442
+ "publishedAt": "2026-10-27T09:00:00Z",
443
+ "url": "https://github.com/vercel/next.js/releases/tag/v15.1.9",
444
+ "prerelease": false,
445
+ "draft": false,
446
+ "summarySource": "model"
447
+ }
448
+ ]
449
+ }
450
+ ]
451
+ },
452
+ "subscriptionsNormal": {
453
+ "repos": [
454
+ "vercel/next.js",
455
+ "infiniflow/ragflow",
456
+ "deepseek-ai/deepseek-harness",
457
+ "charmbracelet/bubbletea",
458
+ "golang/go"
459
+ ],
460
+ "items": [
461
+ {
462
+ "fullName": "vercel/next.js",
463
+ "url": "https://github.com/vercel/next.js",
464
+ "status": "ok",
465
+ "latestTag": "v15.2.0",
466
+ "latestSummaryAt": "2026-11-01",
467
+ "lastCheckedAt": "2026-11-01T00:30:00Z"
468
+ },
469
+ {
470
+ "fullName": "infiniflow/ragflow",
471
+ "url": "https://github.com/infiniflow/ragflow",
472
+ "status": "no_change",
473
+ "latestTag": "v1.0.0-rc3",
474
+ "latestSummaryAt": "2026-10-25",
475
+ "lastCheckedAt": "2026-11-01T00:30:00Z"
476
+ },
477
+ {
478
+ "fullName": "deepseek-ai/deepseek-harness",
479
+ "url": "https://github.com/deepseek-ai/deepseek-harness",
480
+ "status": "baseline",
481
+ "lastCheckedAt": "2026-11-01T00:30:00Z"
482
+ },
483
+ {
484
+ "fullName": "charmbracelet/bubbletea",
485
+ "url": "https://github.com/charmbracelet/bubbletea",
486
+ "status": "rate_limited",
487
+ "latestTag": "v0.2.2",
488
+ "latestSummaryAt": "2026-10-25",
489
+ "lastCheckedAt": "2026-11-01T00:30:00Z"
490
+ },
491
+ {
492
+ "fullName": "golang/go",
493
+ "url": "https://github.com/golang/go",
494
+ "status": "failed",
495
+ "latestTag": "v0.2.2",
496
+ "latestSummaryAt": "2026-10-25",
497
+ "lastCheckedAt": "2026-11-01T00:30:00Z"
498
+ }
499
+ ]
500
+ },
501
+ "subscriptions40": {
502
+ "repos": [
503
+ "vercel/repo-01",
504
+ "infiniflow/repo-02",
505
+ "deepseek-ai/repo-03",
506
+ "charmbracelet/repo-04",
507
+ "golang/repo-05",
508
+ "rust-lang/repo-06",
509
+ "microsoft/repo-07",
510
+ "google/repo-08",
511
+ "facebook/repo-09",
512
+ "kubernetes/repo-10",
513
+ "docker/repo-11",
514
+ "hashicorp/repo-12",
515
+ "grafana/repo-13",
516
+ "prometheus/repo-14",
517
+ "istio/repo-15",
518
+ "envoyproxy/repo-16",
519
+ "containerd/repo-17",
520
+ "etcd-io/repo-18",
521
+ "cilium/repo-19",
522
+ "helm/repo-20",
523
+ "argoproj/repo-21",
524
+ "fluxcd/repo-22",
525
+ "open-telemetry/repo-23",
526
+ "grpc/repo-24",
527
+ "protocolbuffers/repo-25",
528
+ "nats-io/repo-26",
529
+ "redis/repo-27",
530
+ "valkey-io/repo-28",
531
+ "apache/repo-29",
532
+ "elastic/repo-30",
533
+ "mozilla/repo-31",
534
+ "nodejs/repo-32",
535
+ "denoland/repo-33",
536
+ "oven-sh/repo-34",
537
+ "pytorch/repo-35",
538
+ "huggingface/repo-36",
539
+ "langchain-ai/repo-37",
540
+ "ollama/repo-38",
541
+ "ggerganov/repo-39",
542
+ "mudler/repo-40"
543
+ ],
544
+ "items": [
545
+ {
546
+ "fullName": "vercel/repo-01",
547
+ "url": "https://github.com/vercel/repo-01",
548
+ "latestTag": "v0.0.0",
549
+ "latestSummaryAt": "2026-11-01",
550
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
551
+ "status": "ok"
552
+ },
553
+ {
554
+ "fullName": "infiniflow/repo-02",
555
+ "url": "https://github.com/infiniflow/repo-02",
556
+ "latestTag": "v1.1.1",
557
+ "latestSummaryAt": "2026-11-01",
558
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
559
+ "status": "no_change"
560
+ },
561
+ {
562
+ "fullName": "deepseek-ai/repo-03",
563
+ "url": "https://github.com/deepseek-ai/repo-03",
564
+ "latestTag": "v2.2.2",
565
+ "latestSummaryAt": "2026-11-01",
566
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
567
+ "status": "baseline"
568
+ },
569
+ {
570
+ "fullName": "charmbracelet/repo-04",
571
+ "url": "https://github.com/charmbracelet/repo-04",
572
+ "latestTag": "v3.3.0",
573
+ "latestSummaryAt": "2026-11-01",
574
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
575
+ "status": "rate_limited"
576
+ },
577
+ {
578
+ "fullName": "golang/repo-05",
579
+ "url": "https://github.com/golang/repo-05",
580
+ "latestTag": "v4.4.1",
581
+ "latestSummaryAt": "2026-11-01",
582
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
583
+ "status": "failed"
584
+ },
585
+ {
586
+ "fullName": "rust-lang/repo-06",
587
+ "url": "https://github.com/rust-lang/repo-06",
588
+ "latestTag": "v5.0.2",
589
+ "latestSummaryAt": "2026-11-01",
590
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
591
+ "status": "ok"
592
+ },
593
+ {
594
+ "fullName": "microsoft/repo-07",
595
+ "url": "https://github.com/microsoft/repo-07",
596
+ "latestTag": "v6.1.0",
597
+ "latestSummaryAt": "2026-11-01",
598
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
599
+ "status": "no_change"
600
+ },
601
+ {
602
+ "fullName": "google/repo-08",
603
+ "url": "https://github.com/google/repo-08",
604
+ "latestTag": "v7.2.1",
605
+ "latestSummaryAt": "2026-11-01",
606
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
607
+ "status": "baseline"
608
+ },
609
+ {
610
+ "fullName": "facebook/repo-09",
611
+ "url": "https://github.com/facebook/repo-09",
612
+ "latestTag": "v8.3.2",
613
+ "latestSummaryAt": "2026-11-01",
614
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
615
+ "status": "rate_limited"
616
+ },
617
+ {
618
+ "fullName": "kubernetes/repo-10",
619
+ "url": "https://github.com/kubernetes/repo-10",
620
+ "latestTag": "v0.4.0",
621
+ "latestSummaryAt": "2026-11-01",
622
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
623
+ "status": "failed"
624
+ },
625
+ {
626
+ "fullName": "docker/repo-11",
627
+ "url": "https://github.com/docker/repo-11",
628
+ "latestTag": "v1.0.1",
629
+ "latestSummaryAt": "2026-11-01",
630
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
631
+ "status": "ok"
632
+ },
633
+ {
634
+ "fullName": "hashicorp/repo-12",
635
+ "url": "https://github.com/hashicorp/repo-12",
636
+ "latestTag": "v2.1.2",
637
+ "latestSummaryAt": "2026-11-01",
638
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
639
+ "status": "no_change"
640
+ },
641
+ {
642
+ "fullName": "grafana/repo-13",
643
+ "url": "https://github.com/grafana/repo-13",
644
+ "latestTag": "v3.2.0",
645
+ "latestSummaryAt": "2026-11-01",
646
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
647
+ "status": "baseline"
648
+ },
649
+ {
650
+ "fullName": "prometheus/repo-14",
651
+ "url": "https://github.com/prometheus/repo-14",
652
+ "latestTag": "v4.3.1",
653
+ "latestSummaryAt": "2026-11-01",
654
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
655
+ "status": "rate_limited"
656
+ },
657
+ {
658
+ "fullName": "istio/repo-15",
659
+ "url": "https://github.com/istio/repo-15",
660
+ "latestTag": "v5.4.2",
661
+ "latestSummaryAt": "2026-11-01",
662
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
663
+ "status": "failed"
664
+ },
665
+ {
666
+ "fullName": "envoyproxy/repo-16",
667
+ "url": "https://github.com/envoyproxy/repo-16",
668
+ "latestTag": "v6.0.0",
669
+ "latestSummaryAt": "2026-11-01",
670
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
671
+ "status": "ok"
672
+ },
673
+ {
674
+ "fullName": "containerd/repo-17",
675
+ "url": "https://github.com/containerd/repo-17",
676
+ "latestTag": "v7.1.1",
677
+ "latestSummaryAt": "2026-11-01",
678
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
679
+ "status": "no_change"
680
+ },
681
+ {
682
+ "fullName": "etcd-io/repo-18",
683
+ "url": "https://github.com/etcd-io/repo-18",
684
+ "latestTag": "v8.2.2",
685
+ "latestSummaryAt": "2026-11-01",
686
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
687
+ "status": "baseline"
688
+ },
689
+ {
690
+ "fullName": "cilium/repo-19",
691
+ "url": "https://github.com/cilium/repo-19",
692
+ "latestTag": "v0.3.0",
693
+ "latestSummaryAt": "2026-11-01",
694
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
695
+ "status": "rate_limited"
696
+ },
697
+ {
698
+ "fullName": "helm/repo-20",
699
+ "url": "https://github.com/helm/repo-20",
700
+ "latestTag": "v1.4.1",
701
+ "latestSummaryAt": "2026-11-01",
702
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
703
+ "status": "failed"
704
+ },
705
+ {
706
+ "fullName": "argoproj/repo-21",
707
+ "url": "https://github.com/argoproj/repo-21",
708
+ "latestTag": "v2.0.2",
709
+ "latestSummaryAt": "2026-11-01",
710
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
711
+ "status": "ok"
712
+ },
713
+ {
714
+ "fullName": "fluxcd/repo-22",
715
+ "url": "https://github.com/fluxcd/repo-22",
716
+ "latestTag": "v3.1.0",
717
+ "latestSummaryAt": "2026-11-01",
718
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
719
+ "status": "no_change"
720
+ },
721
+ {
722
+ "fullName": "open-telemetry/repo-23",
723
+ "url": "https://github.com/open-telemetry/repo-23",
724
+ "latestTag": "v4.2.1",
725
+ "latestSummaryAt": "2026-11-01",
726
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
727
+ "status": "baseline"
728
+ },
729
+ {
730
+ "fullName": "grpc/repo-24",
731
+ "url": "https://github.com/grpc/repo-24",
732
+ "latestTag": "v5.3.2",
733
+ "latestSummaryAt": "2026-11-01",
734
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
735
+ "status": "rate_limited"
736
+ },
737
+ {
738
+ "fullName": "protocolbuffers/repo-25",
739
+ "url": "https://github.com/protocolbuffers/repo-25",
740
+ "latestTag": "v6.4.0",
741
+ "latestSummaryAt": "2026-11-01",
742
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
743
+ "status": "failed"
744
+ },
745
+ {
746
+ "fullName": "nats-io/repo-26",
747
+ "url": "https://github.com/nats-io/repo-26",
748
+ "latestTag": "v7.0.1",
749
+ "latestSummaryAt": "2026-11-01",
750
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
751
+ "status": "ok"
752
+ },
753
+ {
754
+ "fullName": "redis/repo-27",
755
+ "url": "https://github.com/redis/repo-27",
756
+ "latestTag": "v8.1.2",
757
+ "latestSummaryAt": "2026-11-01",
758
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
759
+ "status": "no_change"
760
+ },
761
+ {
762
+ "fullName": "valkey-io/repo-28",
763
+ "url": "https://github.com/valkey-io/repo-28",
764
+ "latestTag": "v0.2.0",
765
+ "latestSummaryAt": "2026-11-01",
766
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
767
+ "status": "baseline"
768
+ },
769
+ {
770
+ "fullName": "apache/repo-29",
771
+ "url": "https://github.com/apache/repo-29",
772
+ "latestTag": "v1.3.1",
773
+ "latestSummaryAt": "2026-11-01",
774
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
775
+ "status": "rate_limited"
776
+ },
777
+ {
778
+ "fullName": "elastic/repo-30",
779
+ "url": "https://github.com/elastic/repo-30",
780
+ "latestTag": "v2.4.2",
781
+ "latestSummaryAt": "2026-11-01",
782
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
783
+ "status": "failed"
784
+ },
785
+ {
786
+ "fullName": "mozilla/repo-31",
787
+ "url": "https://github.com/mozilla/repo-31",
788
+ "latestTag": "v3.0.0",
789
+ "latestSummaryAt": "2026-11-01",
790
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
791
+ "status": "ok"
792
+ },
793
+ {
794
+ "fullName": "nodejs/repo-32",
795
+ "url": "https://github.com/nodejs/repo-32",
796
+ "latestTag": "v4.1.1",
797
+ "latestSummaryAt": "2026-11-01",
798
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
799
+ "status": "no_change"
800
+ },
801
+ {
802
+ "fullName": "denoland/repo-33",
803
+ "url": "https://github.com/denoland/repo-33",
804
+ "latestTag": "v5.2.2",
805
+ "latestSummaryAt": "2026-11-01",
806
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
807
+ "status": "baseline"
808
+ },
809
+ {
810
+ "fullName": "oven-sh/repo-34",
811
+ "url": "https://github.com/oven-sh/repo-34",
812
+ "latestTag": "v6.3.0",
813
+ "latestSummaryAt": "2026-11-01",
814
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
815
+ "status": "rate_limited"
816
+ },
817
+ {
818
+ "fullName": "pytorch/repo-35",
819
+ "url": "https://github.com/pytorch/repo-35",
820
+ "latestTag": "v7.4.1",
821
+ "latestSummaryAt": "2026-11-01",
822
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
823
+ "status": "failed"
824
+ },
825
+ {
826
+ "fullName": "huggingface/repo-36",
827
+ "url": "https://github.com/huggingface/repo-36",
828
+ "latestTag": "v8.0.2",
829
+ "latestSummaryAt": "2026-11-01",
830
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
831
+ "status": "ok"
832
+ },
833
+ {
834
+ "fullName": "langchain-ai/repo-37",
835
+ "url": "https://github.com/langchain-ai/repo-37",
836
+ "latestTag": "v0.1.0",
837
+ "latestSummaryAt": "2026-11-01",
838
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
839
+ "status": "no_change"
840
+ },
841
+ {
842
+ "fullName": "ollama/repo-38",
843
+ "url": "https://github.com/ollama/repo-38",
844
+ "latestTag": "v1.2.1",
845
+ "latestSummaryAt": "2026-11-01",
846
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
847
+ "status": "baseline"
848
+ },
849
+ {
850
+ "fullName": "ggerganov/repo-39",
851
+ "url": "https://github.com/ggerganov/repo-39",
852
+ "latestTag": "v2.3.2",
853
+ "latestSummaryAt": "2026-11-01",
854
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
855
+ "status": "rate_limited"
856
+ },
857
+ {
858
+ "fullName": "mudler/repo-40",
859
+ "url": "https://github.com/mudler/repo-40",
860
+ "latestTag": "v3.4.0",
861
+ "latestSummaryAt": "2026-11-01",
862
+ "lastCheckedAt": "2026-11-01T00:30:00Z",
863
+ "status": "failed"
864
+ }
865
+ ]
866
+ },
867
+ "subscriptionDocNormal": {
868
+ "fullName": "vercel/next.js",
869
+ "volume": 1,
870
+ "volumes": [
871
+ {
872
+ "index": 1,
873
+ "file": "vercel/next.js-01.md",
874
+ "from": "2026-10-19",
875
+ "to": "2026-11-01",
876
+ "lines": 18
877
+ },
878
+ {
879
+ "index": 2,
880
+ "file": "vercel/next.js-02.md",
881
+ "from": "2026-09-28",
882
+ "to": "2026-10-18",
883
+ "lines": 412
884
+ }
885
+ ],
886
+ "updatedAt": "2026-11-01",
887
+ "markdown": "# vercel/next.js\n\n> 发版记录 · 每周一次 · 最近更新 2026-11-01\n\n## 2026-10-26 ~ 2026-11-01\n\n- [v15.2.0](https://github.com/vercel/next.js/releases/tag/v15.2.0) · 10-29\n- [v15.1.9](https://github.com/vercel/next.js/releases/tag/v15.1.9) · 10-27\n\n本周发布 v15.2.0 与 v15.1.9:构建缓存命中率提升,修复 App Router 下动态段预渲染的回归。\n"
395
888
  }
396
889
  }
397
890
 
@@ -604,15 +1097,33 @@ const ipc = {
604
1097
  "enum": [
605
1098
  "list",
606
1099
  "add",
607
- "remove"
1100
+ "remove",
1101
+ "releases"
608
1102
  ]
609
1103
  },
610
1104
  "repo": {
611
1105
  "type": "string",
612
1106
  "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
1107
+ },
1108
+ "volume": {
1109
+ "type": "integer",
1110
+ "minimum": 1,
1111
+ "description": "subscribe action=releases only: which volume of the repo's release document to read. Defaults to the newest volume."
1112
+ },
1113
+ "stages": {
1114
+ "type": "array",
1115
+ "description": "command=run only: which stages to execute. Absent means every enabled stage (backwards compatible); an explicit list narrows the run, e.g. ['releases'] for a release-only run.",
1116
+ "items": {
1117
+ "type": "string",
1118
+ "enum": [
1119
+ "trending",
1120
+ "digest",
1121
+ "releases"
1122
+ ]
1123
+ }
613
1124
  }
614
1125
  },
615
- "description": "Strict request envelope. command=subscribe manages the repo subscription list: action=list needs no repo; action=add/remove require exactly one repo.",
1126
+ "description": "Strict request envelope. command=subscribe manages the repo subscription list: action=list needs no repo; action=add/remove require exactly one repo; action=releases requires a repo and may name a volume. command=run may narrow its work with stages.",
616
1127
  "allOf": [
617
1128
  {
618
1129
  "if": {
@@ -634,7 +1145,8 @@ const ipc = {
634
1145
  "enum": [
635
1146
  "list",
636
1147
  "add",
637
- "remove"
1148
+ "remove",
1149
+ "releases"
638
1150
  ]
639
1151
  }
640
1152
  },
@@ -652,8 +1164,17 @@ const ipc = {
652
1164
  },
653
1165
  "then": {
654
1166
  "not": {
655
- "required": [
656
- "repo"
1167
+ "anyOf": [
1168
+ {
1169
+ "required": [
1170
+ "repo"
1171
+ ]
1172
+ },
1173
+ {
1174
+ "required": [
1175
+ "volume"
1176
+ ]
1177
+ }
657
1178
  ]
658
1179
  }
659
1180
  }
@@ -672,6 +1193,28 @@ const ipc = {
672
1193
  "action"
673
1194
  ]
674
1195
  },
1196
+ "then": {
1197
+ "required": [
1198
+ "repo"
1199
+ ],
1200
+ "not": {
1201
+ "required": [
1202
+ "volume"
1203
+ ]
1204
+ }
1205
+ }
1206
+ },
1207
+ {
1208
+ "if": {
1209
+ "properties": {
1210
+ "action": {
1211
+ "const": "releases"
1212
+ }
1213
+ },
1214
+ "required": [
1215
+ "action"
1216
+ ]
1217
+ },
675
1218
  "then": {
676
1219
  "required": [
677
1220
  "repo"
@@ -709,10 +1252,39 @@ const ipc = {
709
1252
  "required": [
710
1253
  "repo"
711
1254
  ]
1255
+ },
1256
+ {
1257
+ "required": [
1258
+ "volume"
1259
+ ]
712
1260
  }
713
1261
  ]
714
1262
  }
715
1263
  }
1264
+ },
1265
+ {
1266
+ "if": {
1267
+ "properties": {
1268
+ "command": {
1269
+ "enum": [
1270
+ "subscribe",
1271
+ "serve",
1272
+ "config",
1273
+ "version"
1274
+ ]
1275
+ }
1276
+ },
1277
+ "required": [
1278
+ "command"
1279
+ ]
1280
+ },
1281
+ "then": {
1282
+ "not": {
1283
+ "required": [
1284
+ "stages"
1285
+ ]
1286
+ }
1287
+ }
716
1288
  }
717
1289
  ]
718
1290
  },
@@ -741,7 +1313,8 @@ const ipc = {
741
1313
  "run",
742
1314
  "serve",
743
1315
  "config",
744
- "version"
1316
+ "version",
1317
+ "subscribe"
745
1318
  ]
746
1319
  },
747
1320
  "startedAt": {
@@ -789,6 +1362,12 @@ const ipc = {
789
1362
  },
790
1363
  "releases": {
791
1364
  "$ref": "releases.v2.json#/$defs/ReleasesReport"
1365
+ },
1366
+ "subscriptions": {
1367
+ "$ref": "releases.v2.json#/$defs/SubscriptionList"
1368
+ },
1369
+ "subscriptionDoc": {
1370
+ "$ref": "releases.v2.json#/$defs/SubscriptionDoc"
792
1371
  }
793
1372
  }
794
1373
  },
@@ -968,7 +1547,7 @@ const releases = {
968
1547
  "$schema": "https://json-schema.org/draft/2020-12/schema",
969
1548
  "$id": "https://github.com/morehao/trendradar/contract/schema/releases.v2.json",
970
1549
  "title": "trendradar releases v2",
971
- "description": "Repo release subscription documents. ReleaseDigest is the rendered on-disk document; ReleasesReport is the per-run diagnostic carried in RunResult.releases. Token cost lives in ReleasesReport.usage (always present), never in ReleaseDigest, because cost is a property of one run and cannot be reproduced from a stored document.",
1550
+ "description": "Repo release subscription documents. ReleaseDigest is the rendered on-disk document; ReleasesReport is the per-run diagnostic carried in RunResult.releases. Token cost lives in ReleasesReport.usage (always present), never in ReleaseDigest, because cost is a property of one run and cannot be reproduced from a stored document. schema=2 adds the per-repo weekly batch summary (repos[].summaryZh + periodStart/periodEnd); the per-item summaryZh stays readable for old documents but is no longer written.",
972
1551
  "type": "object",
973
1552
  "additionalProperties": true,
974
1553
  "required": [
@@ -983,7 +1562,7 @@ const releases = {
983
1562
  ],
984
1563
  "properties": {
985
1564
  "schema": {
986
- "const": 1
1565
+ "const": 2
987
1566
  },
988
1567
  "date": {
989
1568
  "type": "string",
@@ -1032,7 +1611,7 @@ const releases = {
1032
1611
  "ReleaseItem": {
1033
1612
  "type": "object",
1034
1613
  "additionalProperties": true,
1035
- "description": "One release or tag. kind distinguishes a GitHub release (has notes) from a tag fallback (commit message used as the summary basis).",
1614
+ "description": "One release or tag. kind distinguishes a GitHub release (has notes) from a tag fallback (commit message used as the summary basis). summaryZh is optional and no longer written by schema 2: the summary now lives once per repo per week in RepoReleases.summaryZh.",
1036
1615
  "required": [
1037
1616
  "id",
1038
1617
  "tag",
@@ -1041,7 +1620,6 @@ const releases = {
1041
1620
  "url",
1042
1621
  "prerelease",
1043
1622
  "draft",
1044
- "summaryZh",
1045
1623
  "summarySource"
1046
1624
  ],
1047
1625
  "properties": {
@@ -1082,7 +1660,8 @@ const releases = {
1082
1660
  "description": "Truncated raw release notes. Untrusted text: display only, never execute."
1083
1661
  },
1084
1662
  "summaryZh": {
1085
- "type": "string"
1663
+ "type": "string",
1664
+ "description": "Legacy per-item summary. Still accepted so documents written before schema 2 stay readable; schema 2 writers leave it empty."
1086
1665
  },
1087
1666
  "summarySource": {
1088
1667
  "type": "string",
@@ -1096,6 +1675,7 @@ const releases = {
1096
1675
  "RepoReleases": {
1097
1676
  "type": "object",
1098
1677
  "additionalProperties": true,
1678
+ "description": "One repo's release batch for one summary period. summaryZh covers the whole week in a single model call; periodStart/periodEnd bound that week so a consumer can label it without parsing dates.",
1099
1679
  "required": [
1100
1680
  "fullName",
1101
1681
  "url",
@@ -1119,6 +1699,18 @@ const releases = {
1119
1699
  "type": "integer",
1120
1700
  "minimum": 0
1121
1701
  },
1702
+ "periodStart": {
1703
+ "type": "string",
1704
+ "format": "date"
1705
+ },
1706
+ "periodEnd": {
1707
+ "type": "string",
1708
+ "format": "date"
1709
+ },
1710
+ "summaryZh": {
1711
+ "type": "string",
1712
+ "description": "One Chinese summary for every version in this period. Empty when no summary was produced."
1713
+ },
1122
1714
  "releases": {
1123
1715
  "type": "array",
1124
1716
  "items": {
@@ -1130,10 +1722,12 @@ const releases = {
1130
1722
  "ReleasesReport": {
1131
1723
  "type": "object",
1132
1724
  "additionalProperties": true,
1133
- "description": "Per-run diagnostic for the releases stage. usage is required and always serialized so a consumer can tell 'nothing spent' (calls=0) from 'spent but not reported' (calls>0 with usageKnown=false).",
1725
+ "description": "Per-run diagnostic for the releases stage. usage, checked and changed are required and always serialized so a consumer can tell 'nothing spent / checked / changed' (0) from 'not reported' (missing). checked counts repos the stage examined; changed counts repos that produced a document write.",
1134
1726
  "required": [
1135
1727
  "enabled",
1136
1728
  "repos",
1729
+ "checked",
1730
+ "changed",
1137
1731
  "newReleases",
1138
1732
  "durationMs",
1139
1733
  "usage"
@@ -1146,6 +1740,14 @@ const releases = {
1146
1740
  "type": "integer",
1147
1741
  "minimum": 0
1148
1742
  },
1743
+ "checked": {
1744
+ "type": "integer",
1745
+ "minimum": 0
1746
+ },
1747
+ "changed": {
1748
+ "type": "integer",
1749
+ "minimum": 0
1750
+ },
1149
1751
  "newReleases": {
1150
1752
  "type": "integer",
1151
1753
  "minimum": 0
@@ -1223,10 +1825,55 @@ const releases = {
1223
1825
  }
1224
1826
  }
1225
1827
  },
1828
+ "SubscriptionStatus": {
1829
+ "type": "string",
1830
+ "description": "Per-repo check state of the most recent weekly release run: baseline (first sighting, no section written), ok (a week section was written), no_change (checked, nothing new), rate_limited / failed (check failed, cursor kept so the next run retries).",
1831
+ "enum": [
1832
+ "baseline",
1833
+ "ok",
1834
+ "no_change",
1835
+ "rate_limited",
1836
+ "failed"
1837
+ ]
1838
+ },
1839
+ "SubscriptionItem": {
1840
+ "type": "object",
1841
+ "additionalProperties": true,
1842
+ "description": "One row of the subscriptions table. Deliberately small: the full markdown lives behind SubscriptionDoc so the list stays under the first-paint payload budget.",
1843
+ "required": [
1844
+ "fullName",
1845
+ "status"
1846
+ ],
1847
+ "properties": {
1848
+ "fullName": {
1849
+ "type": "string",
1850
+ "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
1851
+ },
1852
+ "url": {
1853
+ "type": "string",
1854
+ "format": "uri"
1855
+ },
1856
+ "latestTag": {
1857
+ "type": "string"
1858
+ },
1859
+ "latestSummaryAt": {
1860
+ "type": "string",
1861
+ "format": "date",
1862
+ "description": "Date of the newest week section (its period end), used as the 'last summary' column."
1863
+ },
1864
+ "lastCheckedAt": {
1865
+ "type": "string",
1866
+ "format": "date-time"
1867
+ },
1868
+ "status": {
1869
+ "$ref": "#/$defs/SubscriptionStatus"
1870
+ }
1871
+ }
1872
+ },
1226
1873
  "SubscriptionList": {
1227
1874
  "type": "object",
1228
1875
  "additionalProperties": true,
1229
- "description": "Response of GET /api/v2/subscriptions.",
1876
+ "description": "Response of GET /api/v2/subscriptions and of the IPC subscribe list command. repos stays the only field old consumers read; items is the additive per-repo detail.",
1230
1877
  "required": [
1231
1878
  "repos"
1232
1879
  ],
@@ -1237,6 +1884,76 @@ const releases = {
1237
1884
  "type": "string",
1238
1885
  "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
1239
1886
  }
1887
+ },
1888
+ "items": {
1889
+ "type": "array",
1890
+ "items": {
1891
+ "$ref": "#/$defs/SubscriptionItem"
1892
+ }
1893
+ }
1894
+ }
1895
+ },
1896
+ "SubscriptionVolume": {
1897
+ "type": "object",
1898
+ "additionalProperties": true,
1899
+ "description": "One volume file of a repo's release document. Every volume is numbered: index N is <repo>-0N.md (zero padded), so the first volume is -01. from/to are the oldest/newest week bounds present in that file.",
1900
+ "required": [
1901
+ "index",
1902
+ "file"
1903
+ ],
1904
+ "properties": {
1905
+ "index": {
1906
+ "type": "integer",
1907
+ "minimum": 1
1908
+ },
1909
+ "file": {
1910
+ "type": "string",
1911
+ "description": "Path relative to the releases document root (e.g. vercel/next.js-01.md)."
1912
+ },
1913
+ "from": {
1914
+ "type": "string",
1915
+ "format": "date"
1916
+ },
1917
+ "to": {
1918
+ "type": "string",
1919
+ "format": "date"
1920
+ },
1921
+ "lines": {
1922
+ "type": "integer",
1923
+ "minimum": 0
1924
+ }
1925
+ }
1926
+ },
1927
+ "SubscriptionDoc": {
1928
+ "type": "object",
1929
+ "additionalProperties": true,
1930
+ "description": "Response of the IPC subscribe releases command and of GET /api/v2/repos/{owner}/{repo}/releases. markdown is the exact file content: the panel renders it verbatim (single source of truth, no re-summarizing).",
1931
+ "required": [
1932
+ "fullName",
1933
+ "volume",
1934
+ "markdown"
1935
+ ],
1936
+ "properties": {
1937
+ "fullName": {
1938
+ "type": "string",
1939
+ "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"
1940
+ },
1941
+ "volume": {
1942
+ "type": "integer",
1943
+ "minimum": 1
1944
+ },
1945
+ "volumes": {
1946
+ "type": "array",
1947
+ "items": {
1948
+ "$ref": "#/$defs/SubscriptionVolume"
1949
+ }
1950
+ },
1951
+ "updatedAt": {
1952
+ "type": "string",
1953
+ "format": "date"
1954
+ },
1955
+ "markdown": {
1956
+ "type": "string"
1240
1957
  }
1241
1958
  }
1242
1959
  }
@@ -1622,7 +2339,7 @@ const errors = {
1622
2339
  }
1623
2340
  }
1624
2341
  }
1625
- const api = "openapi: 3.1.0\ninfo:\n title: trendradar serve API\n version: 0.3.0\n description: |\n Read-only HTTP surface exposed by `trendradar serve`. All payloads reuse the\n contract schemas, so the plugin and any web UI consume the same shapes\n whether data comes from the filesystem or over HTTP. Historical v1 digests\n read from disk are normalized to the v2 shape with\n contentHashAlgo=legacy-struct-marshal-v1.\n\n Release endpoints are read-only. Token cost for a releases run is NOT part of\n a stored document (it describes one run and cannot be reproduced); it is\n reported in `releases.usage` of `trendradar run --json` and appended to\n `<repo>/.git/trendradar-usage.jsonl` with stage=\"releases\".\nservers:\n - url: http://127.0.0.1:8787\npaths:\n /api/v2/digests/{date}:\n get:\n operationId: getDigest\n summary: Fetch one day's digest\n parameters:\n - name: date\n in: path\n required: true\n schema:\n type: string\n format: date\n responses:\n \"200\":\n description: The digest document\n content:\n application/json:\n schema:\n $ref: \"./digest.v2.json\"\n \"404\":\n description: No digest for that date\n /api/v2/manifest:\n get:\n operationId: getManifest\n summary: List available dates and their content identity\n responses:\n \"200\":\n description: Manifest of available digests\n content:\n application/json:\n schema:\n type: object\n required: [entries]\n properties:\n coreVersion:\n type: string\n entries:\n type: array\n items:\n type: object\n required: [date, contentHash, schema, contentHashAlgo]\n properties:\n date:\n type: string\n format: date\n contentHash:\n type: string\n schema:\n type: integer\n contentHashAlgo:\n type: string\n enum: [jcs-sha256-v1, legacy-struct-marshal-v1]\n degraded:\n type: boolean\n /api/v2/releases:\n get:\n operationId: listReleases\n summary: List available release digests (newest first)\n description: |\n Returns an empty array (not 404) when no release digest exists yet.\n Entries carry no token cost because stored documents do not record it.\n parameters:\n - name: period\n in: query\n required: false\n schema:\n type: string\n enum: [daily, weekly, monthly]\n responses:\n \"200\":\n description: Manifest of release digests\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: \"./releases.v2.json#/$defs/ReleaseManifestEntry\"\n /api/v2/releases/{date}:\n get:\n operationId: getReleases\n summary: Fetch one period's release digest\n parameters:\n - name: date\n in: path\n required: true\n schema:\n type: string\n format: date\n - name: period\n in: query\n required: false\n schema:\n type: string\n enum: [daily, weekly, monthly]\n responses:\n \"200\":\n description: The release digest document\n content:\n application/json:\n schema:\n $ref: \"./releases.v2.json\"\n \"404\":\n description: No release digest for that date\n /api/v2/subscriptions:\n get:\n operationId: listSubscriptions\n summary: List the repo subscriptions the core will poll\n description: |\n Read-only. Returns an empty array when the subscription file is missing\n or empty. Writing subscriptions stays on the CLI / IPC subscribe command.\n responses:\n \"200\":\n description: Current subscription list\n content:\n application/json:\n schema:\n $ref: \"./releases.v2.json#/$defs/SubscriptionList\"\n /feed.xml:\n get:\n operationId: getFeed\n summary: RSS feed of the most recent digests\n responses:\n \"200\":\n description: RSS 2.0 feed\n content:\n application/rss+xml:\n schema:\n type: string\n"
2342
+ const api = "openapi: 3.1.0\ninfo:\n title: trendradar serve API\n version: 0.4.0\n description: |\n Read-only HTTP surface exposed by `trendradar serve`. All payloads reuse the\n contract schemas, so the plugin and any web UI consume the same shapes\n whether data comes from the filesystem or over HTTP. Historical v1 digests\n read from disk are normalized to the v2 shape with\n contentHashAlgo=legacy-struct-marshal-v1.\n\n Release endpoints are read-only. Token cost for a releases run is NOT part of\n a stored document (it describes one run and cannot be reproduced); it is\n reported in `releases.usage` of `trendradar run --json` and appended to\n `<repo>/.git/trendradar-usage.jsonl` with stage=\"releases\".\nservers:\n - url: http://127.0.0.1:8787\npaths:\n /api/v2/digests/{date}:\n get:\n operationId: getDigest\n summary: Fetch one day's digest\n parameters:\n - name: date\n in: path\n required: true\n schema:\n type: string\n format: date\n responses:\n \"200\":\n description: The digest document\n content:\n application/json:\n schema:\n $ref: \"./digest.v2.json\"\n \"404\":\n description: No digest for that date\n /api/v2/manifest:\n get:\n operationId: getManifest\n summary: List available dates and their content identity\n responses:\n \"200\":\n description: Manifest of available digests\n content:\n application/json:\n schema:\n type: object\n required: [entries]\n properties:\n coreVersion:\n type: string\n entries:\n type: array\n items:\n type: object\n required: [date, contentHash, schema, contentHashAlgo]\n properties:\n date:\n type: string\n format: date\n contentHash:\n type: string\n schema:\n type: integer\n contentHashAlgo:\n type: string\n enum: [jcs-sha256-v1, legacy-struct-marshal-v1]\n degraded:\n type: boolean\n /api/v2/releases:\n get:\n operationId: listReleases\n summary: List available release digests (newest first)\n description: |\n Returns an empty array (not 404) when no release digest exists yet.\n Entries carry no token cost because stored documents do not record it.\n parameters:\n - name: period\n in: query\n required: false\n schema:\n type: string\n enum: [daily, weekly, monthly]\n responses:\n \"200\":\n description: Manifest of release digests\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: \"./releases.v2.json#/$defs/ReleaseManifestEntry\"\n /api/v2/releases/{date}:\n get:\n operationId: getReleases\n summary: Fetch one period's release digest\n parameters:\n - name: date\n in: path\n required: true\n schema:\n type: string\n format: date\n - name: period\n in: query\n required: false\n schema:\n type: string\n enum: [daily, weekly, monthly]\n responses:\n \"200\":\n description: The release digest document\n content:\n application/json:\n schema:\n $ref: \"./releases.v2.json\"\n \"404\":\n description: No release digest for that date\n /api/v2/subscriptions:\n get:\n operationId: listSubscriptions\n summary: List the repo subscriptions the core will poll\n description: |\n Read-only mirror of the IPC `subscribe list` command: both return the\n same SubscriptionList. `repos` is the legacy field; `items` adds the\n per-repo row detail (latest tag, last summary date, check status) and is\n optional, so an older core still satisfies this schema. Writing\n subscriptions stays on the CLI / IPC subscribe command and is never\n exposed over HTTP.\n responses:\n \"200\":\n description: Current subscription list\n content:\n application/json:\n schema:\n $ref: \"./releases.v2.json#/$defs/SubscriptionList\"\n /api/v2/repos/{owner}/{repo}/releases:\n get:\n operationId: getSubscriptionDoc\n summary: Read one repo's release document\n description: |\n Read-only mirror of the IPC `subscribe releases` command. Returns the\n exact markdown file content (plus the volume index) so a client renders\n what the data repo stores instead of re-summarizing it. `volume`\n defaults to the newest volume. Only repos matching\n ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ are served: the path is resolved\n inside the releases document root and never escapes it.\n parameters:\n - name: owner\n in: path\n required: true\n schema:\n type: string\n pattern: \"^[A-Za-z0-9_.-]+$\"\n - name: repo\n in: path\n required: true\n schema:\n type: string\n pattern: \"^[A-Za-z0-9_.-]+$\"\n - name: volume\n in: query\n required: false\n schema:\n type: integer\n minimum: 1\n responses:\n \"200\":\n description: The repo's release document\n content:\n application/json:\n schema:\n $ref: \"./releases.v2.json#/$defs/SubscriptionDoc\"\n \"400\":\n description: Malformed owner/repo or non-positive volume\n \"404\":\n description: The repo has no release document, or that volume is absent\n /feed.xml:\n get:\n operationId: getFeed\n summary: RSS feed of the most recent digests\n responses:\n \"200\":\n description: RSS 2.0 feed\n content:\n application/rss+xml:\n schema:\n type: string\n"
1626
2343
 
1627
2344
  export const rawSchema = { model, ipc, digest, releases, errors, versionInfo, api }
1628
2345
 
@@ -1640,5 +2357,7 @@ export const validators = {
1640
2357
  digest: ajv.getSchema(digest.$id),
1641
2358
  releases: ajv.getSchema(releases.$id),
1642
2359
  releasesReport: ajv.compile({ $ref: releases.$id + '#/$defs/ReleasesReport' }),
2360
+ subscriptionList: ajv.compile({ $ref: releases.$id + '#/$defs/SubscriptionList' }),
2361
+ subscriptionDoc: ajv.compile({ $ref: releases.$id + '#/$defs/SubscriptionDoc' }),
1643
2362
  versionInfo: ajv.getSchema(versionInfo.$id),
1644
2363
  }