papilot 0.7.0 → 0.8.1

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.
Files changed (75) hide show
  1. package/README.md +53 -100
  2. package/README.zh-CN.md +52 -97
  3. package/bin/doctor.mjs +55 -6
  4. package/bin/installation.d.mts +2 -0
  5. package/bin/installation.mjs +7 -1
  6. package/dist/assets/{_virtual_papilot-licenses-BWIsfrQh.js → _virtual_papilot-licenses-CMfCtEYQ.js} +54 -3
  7. package/dist/assets/index-BlLyIqT9.js +265 -0
  8. package/dist/assets/index-DVZtyZvu.css +1 -0
  9. package/dist/assets/latex-BarqJFtQ.svg +1 -0
  10. package/dist/assets/{math-BsEl3u6P.js → math-Bu3xEyrC.js} +1 -1
  11. package/dist/assets/pdf-view-PbkCuTZ-.js +598 -0
  12. package/dist/index.html +2 -2
  13. package/examples/papilot-paper/main.tex +1 -1
  14. package/examples/papilot-paper/preview/main.pdf +0 -0
  15. package/examples/papilot-paper/preview/main.synctex.gz +0 -0
  16. package/examples/papilot-paper/sections/02-using.tex +3 -1
  17. package/examples/papilot-paper/sections/09-agents.tex +8 -5
  18. package/package.json +18 -8
  19. package/skills/ai-review.md +18 -0
  20. package/skills/latex-warnings.md +1 -1
  21. package/src/conversation.ts +6 -0
  22. package/src/server/acp.ts +387 -0
  23. package/src/server/agents.ts +220 -43
  24. package/src/server/ai-review-routes.ts +72 -0
  25. package/src/server/ai-review.ts +38 -0
  26. package/src/server/app.ts +56 -14
  27. package/src/server/build-problems.ts +329 -0
  28. package/src/server/changes.ts +25 -2
  29. package/src/server/codex.ts +2 -1
  30. package/src/server/cursor.ts +153 -0
  31. package/src/server/desktop-demo.ts +38 -0
  32. package/src/server/latex-installation.ts +43 -0
  33. package/src/server/manuscript.ts +183 -23
  34. package/src/server/paths.ts +1 -1
  35. package/src/server/reconcile.ts +20 -0
  36. package/src/server/references.ts +70 -0
  37. package/src/server/review.ts +6 -5
  38. package/src/server/skills.ts +5 -8
  39. package/src/server/start.ts +19 -4
  40. package/src/server/store.ts +20 -2
  41. package/src/server/update-install.ts +53 -2
  42. package/src/server/update-worker.ts +6 -6
  43. package/src/server/updates.ts +49 -14
  44. package/src/server/workspace.ts +236 -41
  45. package/src/shared.ts +88 -9
  46. package/src/skill-icons.ts +18 -0
  47. package/src/skill-metadata.ts +45 -0
  48. package/vendor/latex-review/dist/web/assets/index-CXdnUjct.js +19 -0
  49. package/vendor/latex-review/dist/web/assets/index-DEz-LsGl.css +1 -0
  50. package/vendor/latex-review/dist/web/index.html +2 -2
  51. package/vendor/latex-review/src/core/bib.ts +692 -0
  52. package/vendor/latex-review/src/core/changes.ts +39 -0
  53. package/vendor/latex-review/src/core/current-commit.ts +104 -0
  54. package/vendor/latex-review/src/core/delivery.ts +62 -16
  55. package/vendor/latex-review/src/core/git.ts +2 -1
  56. package/vendor/latex-review/src/core/publish.ts +7 -1
  57. package/vendor/latex-review/src/core/reconcile.ts +101 -0
  58. package/vendor/latex-review/src/core/review.ts +6 -2
  59. package/vendor/latex-review/src/core/store.ts +1 -0
  60. package/vendor/latex-review/src/core/tasks.ts +1 -1
  61. package/vendor/latex-review/src/core/verify.ts +784 -0
  62. package/vendor/latex-review/src/core/view.ts +204 -0
  63. package/vendor/latex-review/src/render/round.ts +11 -0
  64. package/vendor/latex-review/src/server.ts +77 -1
  65. package/vendor/latex-review/src/types.ts +130 -2
  66. package/vendor/latex-review/src/web/effect-preferences.ts +10 -0
  67. package/vendor/latex-review/src/web/references.tsx +499 -0
  68. package/vendor/latex-review/src/web/review.tsx +263 -133
  69. package/vendor/latex-review/src/web/style.css +285 -0
  70. package/vendor/latex-review/src/web/zh-CN.ts +79 -2
  71. package/dist/assets/index-CIJEYlP7.js +0 -252
  72. package/dist/assets/index-hOJEruFc.css +0 -1
  73. package/dist/assets/pdf-view-Cz9_vK5U.js +0 -598
  74. package/vendor/latex-review/dist/web/assets/index-Be9CtgcZ.css +0 -1
  75. package/vendor/latex-review/dist/web/assets/index-TvMWVSaw.js +0 -19
@@ -32,6 +32,11 @@
32
32
  --after: #eef8f1;
33
33
  --after-edge: #68ab82;
34
34
  --head: #fafafa;
35
+ --warn: #8a5300;
36
+ --warn-soft: #fff8e6;
37
+ --warn-line: #f1d48c;
38
+ --ok-soft: #eef8f1;
39
+ --bad-soft: #fbeeee;
35
40
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 18px rgb(0 0 0 / 0.05);
36
41
  --paper-top: 24px;
37
42
  font: 14px/1.5 var(--sans);
@@ -442,6 +447,14 @@ kbd {
442
447
  .effects-head {
443
448
  font-weight: 600;
444
449
  }
450
+ .effects-toggle {
451
+ font: inherit;
452
+ color: inherit;
453
+ }
454
+ .effects-toggle:focus-visible {
455
+ outline: 2px solid var(--accent);
456
+ outline-offset: 3px;
457
+ }
445
458
  .more-places {
446
459
  margin: 6px 14px 0;
447
460
  font-size: 12px;
@@ -589,6 +602,278 @@ kbd {
589
602
  text-decoration: none;
590
603
  }
591
604
 
605
+ /* Bibliography entries of a .bib change, every field shown, with what the
606
+ online check found. */
607
+ .references {
608
+ border-top: 1px solid var(--line);
609
+ background: var(--paper);
610
+ }
611
+ .reference-entry {
612
+ padding: 10px 14px 12px;
613
+ border-left: 3px solid var(--line);
614
+ }
615
+ .reference-entry + .reference-entry {
616
+ border-top: 1px solid var(--line);
617
+ }
618
+ .reference-entry[data-check="verified"],
619
+ .reference-entry[data-check="confirmed"] {
620
+ border-left-color: var(--accept);
621
+ }
622
+ .reference-entry[data-check="mismatch"],
623
+ .reference-entry[data-check="unreadable"] {
624
+ border-left-color: var(--reject);
625
+ }
626
+ /* Not found is a reason to look, not proof of an error: amber, not red. */
627
+ .reference-entry[data-check="unverified"],
628
+ .reference-entry[data-check="failed"],
629
+ .reference-entry[data-check="skipped"],
630
+ .reference-entry[data-check="off"],
631
+ .reference-entry[data-check="checking"] {
632
+ border-left-color: var(--warn-line);
633
+ }
634
+ .reference-head {
635
+ display: flex;
636
+ flex-wrap: wrap;
637
+ align-items: baseline;
638
+ gap: 4px 10px;
639
+ margin-bottom: 6px;
640
+ }
641
+ .reference-key {
642
+ font:
643
+ 600 12.5px ui-monospace,
644
+ SFMono-Regular,
645
+ Menlo,
646
+ monospace;
647
+ overflow-wrap: anywhere;
648
+ }
649
+ .reference-key del,
650
+ .reference-entry td del {
651
+ background: var(--bad-soft);
652
+ color: var(--reject);
653
+ text-decoration: line-through;
654
+ }
655
+ .reference-key ins,
656
+ .reference-entry td ins {
657
+ background: var(--ok-soft);
658
+ color: var(--accept);
659
+ text-decoration: none;
660
+ }
661
+ .reference-status {
662
+ font-size: 12px;
663
+ color: var(--muted);
664
+ }
665
+ .reference-check {
666
+ font-size: 12px;
667
+ font-weight: 600;
668
+ padding: 0 7px;
669
+ border-radius: 999px;
670
+ border: 1px solid var(--line);
671
+ white-space: nowrap;
672
+ }
673
+ .reference-check[data-check="verified"],
674
+ .reference-check[data-check="confirmed"] {
675
+ color: var(--accept);
676
+ background: var(--ok-soft);
677
+ border-color: transparent;
678
+ }
679
+ .reference-check[data-check="mismatch"] {
680
+ color: var(--reject);
681
+ background: var(--bad-soft);
682
+ border-color: transparent;
683
+ }
684
+ .reference-check[data-check="unverified"],
685
+ .reference-check[data-check="failed"],
686
+ .reference-check[data-check="skipped"],
687
+ .reference-check[data-check="off"],
688
+ .reference-check[data-check="checking"] {
689
+ color: var(--warn);
690
+ background: var(--warn-soft);
691
+ border-color: transparent;
692
+ }
693
+ .reference-lines {
694
+ margin-left: auto;
695
+ font:
696
+ 11px ui-monospace,
697
+ SFMono-Regular,
698
+ Menlo,
699
+ monospace;
700
+ color: var(--muted);
701
+ }
702
+ .reference-problem {
703
+ margin: 4px 0 8px;
704
+ padding: 6px 10px;
705
+ border-radius: 6px;
706
+ background: var(--bad-soft);
707
+ color: var(--reject);
708
+ font-size: 13px;
709
+ }
710
+ .reference-uncited {
711
+ margin: 0;
712
+ border-radius: 0;
713
+ border-top: 1px solid var(--line);
714
+ }
715
+ .reference-fields {
716
+ width: 100%;
717
+ border-collapse: collapse;
718
+ font:
719
+ 12.5px/1.55 ui-monospace,
720
+ SFMono-Regular,
721
+ Menlo,
722
+ monospace;
723
+ }
724
+ .reference-fields th {
725
+ width: 1%;
726
+ padding: 2px 12px 2px 0;
727
+ text-align: left;
728
+ vertical-align: top;
729
+ font-weight: 400;
730
+ color: var(--muted);
731
+ white-space: nowrap;
732
+ }
733
+ .reference-fields td {
734
+ padding: 2px 0;
735
+ overflow-wrap: anywhere;
736
+ }
737
+ .reference-entry[data-status="modified"] tr:not([data-change]) td {
738
+ color: var(--muted);
739
+ }
740
+ .reference-entry[data-status="removed"] td {
741
+ text-decoration: line-through;
742
+ text-decoration-color: var(--reject);
743
+ color: var(--muted);
744
+ }
745
+ .reference-resolved {
746
+ color: var(--muted);
747
+ }
748
+ .reference-cited {
749
+ margin: 6px 0 0;
750
+ font-size: 12px;
751
+ color: var(--muted);
752
+ }
753
+ .reference-verdict {
754
+ margin-top: 8px;
755
+ padding: 8px 10px;
756
+ border-radius: 6px;
757
+ background: var(--head);
758
+ font-size: 13px;
759
+ }
760
+ .reference-verdict p {
761
+ margin: 0;
762
+ }
763
+ .reference-verdict[data-check="mismatch"] {
764
+ background: var(--bad-soft);
765
+ }
766
+ .reference-verdict[data-check="unverified"],
767
+ .reference-verdict[data-check="failed"],
768
+ .reference-verdict[data-check="off"],
769
+ .reference-verdict[data-check="skipped"] {
770
+ background: var(--warn-soft);
771
+ }
772
+ .reference-differences {
773
+ display: grid;
774
+ grid-template-columns: auto 1fr;
775
+ gap: 6px 12px;
776
+ margin: 8px 0 0;
777
+ }
778
+ .reference-differences dt {
779
+ font-weight: 600;
780
+ white-space: nowrap;
781
+ }
782
+ .reference-differences dd {
783
+ margin: 0;
784
+ display: grid;
785
+ gap: 2px;
786
+ min-width: 0;
787
+ overflow-wrap: anywhere;
788
+ }
789
+ .reference-side {
790
+ display: inline-block;
791
+ min-width: 5.5em;
792
+ margin-right: 6px;
793
+ font-size: 11px;
794
+ letter-spacing: 0.02em;
795
+ color: var(--muted);
796
+ }
797
+ .reference-record {
798
+ margin: 8px 0 0 !important;
799
+ overflow-wrap: anywhere;
800
+ }
801
+ .reference-record a {
802
+ color: var(--accent);
803
+ }
804
+ .reference-confirmation {
805
+ margin: 8px 0 0 !important;
806
+ }
807
+ .reference-confirm {
808
+ border: 1px solid var(--line);
809
+ background: var(--paper);
810
+ border-radius: 6px;
811
+ padding: 3px 10px;
812
+ font-size: 12.5px;
813
+ }
814
+ .reference-entry[data-check="confirmed"] .reference-verdict {
815
+ background: var(--head);
816
+ }
817
+ .references-banner summary strong {
818
+ font-weight: 600;
819
+ }
820
+ .references-flagged {
821
+ margin: 6px 0 2px;
822
+ padding-left: 18px;
823
+ }
824
+ .references-flagged li + li {
825
+ margin-top: 3px;
826
+ }
827
+ .references-confirm ul {
828
+ margin: 0 0 12px;
829
+ padding-left: 18px;
830
+ font-size: 13px;
831
+ }
832
+ .references-confirm li + li {
833
+ margin-top: 4px;
834
+ }
835
+ .references-confirm code {
836
+ font-size: 12.5px;
837
+ overflow-wrap: anywhere;
838
+ }
839
+ .references-confirm-actions {
840
+ display: flex;
841
+ justify-content: flex-end;
842
+ gap: 8px;
843
+ flex-wrap: wrap;
844
+ }
845
+ .references-confirm-actions .accept {
846
+ color: var(--accept);
847
+ font-weight: 600;
848
+ }
849
+ @media (max-width: 560px) {
850
+ .reference-fields,
851
+ .reference-fields tbody,
852
+ .reference-fields tr,
853
+ .reference-fields th,
854
+ .reference-fields td {
855
+ display: block;
856
+ width: auto;
857
+ }
858
+ .reference-fields tr + tr {
859
+ margin-top: 4px;
860
+ }
861
+ .reference-fields th {
862
+ padding: 0;
863
+ font-size: 11px;
864
+ }
865
+ .reference-differences {
866
+ grid-template-columns: 1fr;
867
+ gap: 2px;
868
+ }
869
+ .reference-differences dd + dt {
870
+ margin-top: 6px;
871
+ }
872
+ .reference-lines {
873
+ margin-left: 0;
874
+ }
875
+ }
876
+
592
877
  /* Messages above the document */
593
878
  .banner {
594
879
  max-width: 980px;
@@ -1,7 +1,9 @@
1
1
  // Simplified Chinese for the review viewer, keyed by the English text.
2
2
  export const zhCN: Record<string, string> = {
3
- "Accepted changes are saved in this task. Choose where to save them below.": "已接受的改动保存在此任务中,请在下方选择保存方式。",
4
- "Accepted changes are committed to the task branch.": "已接受的改动已提交到任务分支。",
3
+ "Merge review": "合并审阅",
4
+ "Your manuscript is unchanged until you save the merged result.": "保存合并结果前,论文保持不变。",
5
+ "Wait for the merge suggestion before changing review decisions.": "请等待合并建议生成后再审核。",
6
+ "Choose how to save the accepted changes to your manuscript.": "请选择如何将已接受的改动保存到论文。",
5
7
  "There are no accepted changes to save.": "没有需要保存的已接受改动。",
6
8
 
7
9
  // Overview
@@ -219,4 +221,79 @@ export const zhCN: Record<string, string> = {
219
221
  "Finish or abort the merge in the Git panel before staging or reverting changes.":
220
222
  "请先在 Git 面板中完成或中止合并,再暂存或还原修改。",
221
223
  "The last commit changed. The comparison is being updated.": "上次提交已变化,正在更新比较。",
224
+
225
+ // Bibliography entries and their online checks
226
+ Bibliography: "参考文献",
227
+ Title: "标题",
228
+ Authors: "作者",
229
+ Year: "年份",
230
+ DOI: "DOI",
231
+ arXiv: "arXiv",
232
+ "New entry": "新增条目",
233
+ "Changed entry": "修改的条目",
234
+ "Removed entry": "删除的条目",
235
+ Verified: "已核实",
236
+ "Differs from the record": "与记录有出入",
237
+ "Not verified": "未核实",
238
+ "Could not check": "未能核对",
239
+ "Nothing to check": "无从核对",
240
+ "Checking…": "核对中…",
241
+ "Not checked online": "未联网核对",
242
+ "The paper still cites this key, and no entry defines it now.":
243
+ "正文仍在引用这个 key,但现在没有条目定义它。",
244
+ "Another entry in the bibliography has the same key.": "参考文献里还有一个条目用了同一个 key。",
245
+ "BibTeX cannot read this entry.": "BibTeX 读不了这个条目。",
246
+ "The paper does not use this .bib file, so the entry will not appear.":
247
+ "论文没有用到这个 .bib 文件,这个条目不会出现在参考文献里。",
248
+ "No bibliography entry has this key.": "没有参考文献条目用这个 key。",
249
+ "Cited {n} time: {places}": "正文引用 {n} 处:{places}",
250
+ "Cited {n} times: {places}": "正文引用 {n} 处:{places}",
251
+ "Not cited in the paper, so it does not appear in the PDF.": "正文没有引用,所以不会出现在 PDF 里。",
252
+ "{sources} could not be reached.": "无法访问 {sources}。",
253
+ "Looking this entry up in Crossref, DBLP and arXiv…": "正在 Crossref、DBLP 和 arXiv 中查找这个条目…",
254
+ "Online checks are off in Settings, so this entry was not looked up.":
255
+ "设置里关闭了联网核对,这个条目没有查找。",
256
+ "Matches the record in {source}, apart from the small differences below.":
257
+ "与 {source} 的记录一致,只有下面几处小差别。",
258
+ "Matches the record in {source}.": "与 {source} 的记录一致。",
259
+ "{source} has this work with other details. Compare them below.":
260
+ "{source} 里有这篇文献,但信息不一样,请对照下面几项。",
261
+ "The DOI is not registered, and no record matches the title.": "这个 DOI 没有注册,按标题也没有找到对应记录。",
262
+ "No arXiv paper has this identifier, and no record matches the title.":
263
+ "arXiv 上没有这个编号的论文,按标题也没有找到对应记录。",
264
+ "No record in Crossref, DBLP or arXiv matches this entry. Theses, reports and many books are in none of them, so check it yourself.":
265
+ "Crossref、DBLP 和 arXiv 中都没有与这个条目对应的记录。学位论文、技术报告和很多书都不在这些库里,请自己核对。",
266
+ "The sources could not be reached.": "无法访问这些数据源。",
267
+ "The entry has no title, DOI or arXiv identifier to look up.": "这个条目没有标题、DOI 或 arXiv 编号,无从查找。",
268
+ "Check again": "重新核对",
269
+ small: "小差别",
270
+ Entry: "条目",
271
+ Record: "记录",
272
+ "(not registered)": "(未注册)",
273
+ "(no such paper)": "(没有这篇论文)",
274
+ "Closest record": "最接近的记录",
275
+ "{n} entry changed": "{n} 个条目有改动",
276
+ "{n} entries changed": "{n} 个条目有改动",
277
+ "{n} citation without an entry": "{n} 处引用没有对应条目",
278
+ "{n} citations without an entry": "{n} 处引用没有对应条目",
279
+ "{n} verified": "{n} 个已核实",
280
+ "{n} differs from its record": "{n} 个与记录有出入",
281
+ "{n} differ from their records": "{n} 个与记录有出入",
282
+ "{n} not verified": "{n} 个未核实",
283
+ "{n} could not be checked": "{n} 个未能核对",
284
+ "checking {n}…": "核对中 {n} 个…",
285
+ "online checks are off": "联网核对已关闭",
286
+ "Stage bibliography entries that are not verified?": "暂存未核实的参考文献条目?",
287
+ "Accept bibliography entries that are not verified?": "接受未核实的参考文献条目?",
288
+ "An agent can write an entry for a work that does not exist, or with the wrong authors, year or DOI. Check each one before it goes into your paper.":
289
+ "agent 可能写出根本不存在的文献,或者写错作者、年份、DOI。放进论文之前请逐条确认。",
290
+ "Stage anyway": "仍然暂存",
291
+ "Accept anyway": "仍然接受",
292
+ "Cites {key}, which no bibliography entry defines.": "引用了 {key},但没有参考文献条目定义它。",
293
+ "Leaves {n} change with bibliography entries to check.": "留下 {n} 处含待核对参考文献的改动。",
294
+ "Leaves {n} changes with bibliography entries to check.": "留下 {n} 处含待核对参考文献的改动。",
295
+ "Checked by you": "已人工确认",
296
+ "You checked this entry yourself.": "你已人工确认过这个条目。",
297
+ "I checked it myself": "我已人工确认",
298
+ "{n} checked by you": "{n} 个已人工确认",
222
299
  };