@morehao/dsh-github-trending 0.7.10 → 0.7.11

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.7.11] - 2026-11-01
4
+
5
+ ### Refactors
6
+
7
+ - **settings**: merge schedule into scope card and link subscription repos (#65)
8
+
9
+ ### Docs
10
+
11
+ - 新增英文版 README.en.md,中文 README 默认并加语言切换 (#64)
12
+
13
+ **Full Changelog**: https://github.com/morehao/dsh-github-trending/compare/v0.7.10...v0.7.11
14
+
3
15
  ## [v0.7.10] - 2026-11-01
4
16
 
5
17
  > 修复 peer / engine 版本区间漏掉 `0.2.2-*` 预发布的问题,让插件在宿主升到 `0.2.2` 线后仍能正常安装。
package/README.en.md ADDED
@@ -0,0 +1,92 @@
1
+ <p align="center">
2
+ <img src="icon.svg" alt="dsh-github-trending logo" width="88" height="88">
3
+ </p>
4
+
5
+ <h1 align="center">dsh-github-trending</h1>
6
+
7
+ <p align="center">
8
+ A DeepSeek Harness plugin for the GitHub Trending board
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="README.md">简体中文</a> | English
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://github.com/morehao/dsh-github-trending/actions/workflows/check.yml"><img alt="check" src="https://github.com/morehao/dsh-github-trending/actions/workflows/check.yml/badge.svg"></a>
17
+ <a href="https://www.npmjs.com/package/@morehao/dsh-github-trending"><img alt="npm version" src="https://img.shields.io/npm/v/@morehao/dsh-github-trending.svg"></a>
18
+ </p>
19
+
20
+ A **DeepSeek Harness plugin** for the GitHub Trending board: it schedules daily / weekly / monthly digests, hands them to the local [`trendradar`](https://github.com/morehao/trendradar) core to scrape Trending, write Chinese intros and period summaries, and commits the result to your own repository with a PR merged automatically. You follow status, read digests and manage subscriptions from the workbench — no command line needed.
21
+
22
+ ## Positioning
23
+
24
+ - **An entry point, not an engine**. Scraping, parsing, model summarization, rendering, git and PR all live in one place — the local `trendradar` core. The plugin only handles **configuration, scheduling, spawning the core and displaying results**, so there is no second implementation to drift.
25
+ - **Deliver the artifact as-is**. Content is written byte-for-byte exactly as the core produces it; the plugin does not rewrite, reorder or re-invoke a model on it.
26
+ - **Local execution, no telemetry**. The core runs on your machine; the plugin has no cloud account, and secrets are handed to the core only over a runtime channel — never written to config files or logs.
27
+
28
+ > For deeper material — requirements, config fields, error codes, subscription stages and implementation details — see **[docs/reference.md](docs/reference.md)**.
29
+
30
+ ## Features
31
+
32
+ Open the workbench from the sidebar **GitHub Trending** or `Settings → GitHub Trending`. It has five views:
33
+
34
+ ### Overview
35
+
36
+ Answers "when will it run next, are the four readiness checks all green, what was delivered last time" at a glance. The top shows the plugin identity bar (version / package name / check for updates); the right side keeps the next run and readiness N/4 always visible.
37
+
38
+ ![Overview](docs/images/overview.png)
39
+
40
+ ### Digest
41
+
42
+ Browse past digests by period (daily / weekly / monthly). Markdown is rendered directly (headings, lists, tables, links), and you can switch to **Raw**. Only issues whose preview copy was kept can be read; failed / unchanged / dry-run / old records each have their own empty state.
43
+
44
+ ![Digest](docs/images/digest.png)
45
+
46
+ ### Runs
47
+
48
+ The last 30 runs, filterable by success / failure / dry-run. Expand a run to see its deliverables (commit, content hash, branch, PR link) and a read-only log; the footer shows cumulative tokens.
49
+
50
+ ![Runs](docs/images/runs.png)
51
+
52
+ ### Settings
53
+
54
+ Six sections — Content source / Model / Repository / Auth / Digest / Schedule — each saved and validated independently; an unsaved section shows a yellow dot next to its item on the left.
55
+
56
+ ![Settings](docs/images/settings.png)
57
+
58
+ ### Subscriptions
59
+
60
+ (Optional) Subscribe to a set of repositories; each week the new Releases from each of them are merged into one Chinese summary and committed alongside the digest on the same branch and PR. The subscription list is versioned with the data repo, auditable and reproducible.
61
+
62
+ ![Subscriptions](docs/images/subscriptions.png)
63
+
64
+ ## Installation
65
+
66
+ ```bash
67
+ dsh plugin --profile <profile> add @morehao/dsh-github-trending
68
+ ```
69
+
70
+ Restart the host after installing, then open **GitHub Trending** from the sidebar or `Settings → GitHub Trending`.
71
+
72
+ ### Quick start in three steps
73
+
74
+ 1. **Pick a repository**: enter the absolute path of a local git repository (the plugin does not run `git init` for you; a non-repo path returns `REPO_NOT_GIT`).
75
+ 2. **Pick a model**: click "Use DSH config" to choose a provider and model from the host's provider directory; providers that can export a key pass it straight to the core, while OAuth-type credentials go through a local loopback proxy.
76
+ 3. **Dry-run once**: "Dry run (no commit)" only scrapes and renders — it writes no files and makes no commit.
77
+
78
+ Requirements: DSH `0.2.1-rc.3` or later, Node.js `^22.20.0 || >=24.0.0`, a local git ≥ 2.30 with a writable remote, and git / GitHub credentials (needed only for push and opening PRs). On first run the core binary is downloaded from GitHub Releases and verified by sha256, then reused offline.
79
+
80
+ ## Development and release
81
+
82
+ ```bash
83
+ npm install
84
+ npm run check # typecheck + contract check + build + all tests
85
+ node scripts/ac/run.mjs # AC-P mechanical checks
86
+ ```
87
+
88
+ Releases go through **tag-triggered CI** (Trusted Publishing / OIDC): merge the PR → push an annotated tag `vX.Y.Z` on `main` → CI publishes to npm and creates the Release from the annotation body. See [docs/publishing.md](docs/publishing.md) for details.
89
+
90
+ ## License
91
+
92
+ MIT
package/README.md CHANGED
@@ -8,6 +8,10 @@
8
8
  GitHub 趋势榜的 DeepSeek Harness 插件
9
9
  </p>
10
10
 
11
+ <p align="center">
12
+ 简体中文 | <a href="README.en.md">English</a>
13
+ </p>
14
+
11
15
  <p align="center">
12
16
  <a href="https://github.com/morehao/dsh-github-trending/actions/workflows/check.yml"><img alt="check" src="https://github.com/morehao/dsh-github-trending/actions/workflows/check.yml/badge.svg"></a>
13
17
  <a href="https://www.npmjs.com/package/@morehao/dsh-github-trending"><img alt="npm version" src="https://img.shields.io/npm/v/@morehao/dsh-github-trending.svg"></a>
package/client.js CHANGED
@@ -54,7 +54,7 @@ var DICT = {
54
54
  "st.model": "模型",
55
55
  "st.repo": "仓库",
56
56
  "st.auth": "认证",
57
- "st.scope": "榜单",
57
+ "st.scope": "榜单与调度",
58
58
  "st.summarize": "摘要与用量",
59
59
  "st.releases": "订阅",
60
60
  "st.schedule": "调度",
@@ -583,7 +583,7 @@ var DICT = {
583
583
  "st.model": "Model",
584
584
  "st.repo": "Repository",
585
585
  "st.auth": "Auth",
586
- "st.scope": "Scope",
586
+ "st.scope": "Scope & Schedule",
587
587
  "st.summarize": "Summary & usage",
588
588
  "st.releases": "Subscriptions",
589
589
  "st.schedule": "Schedule",
@@ -1147,6 +1147,7 @@ var CSS = `
1147
1147
  .dshgt-card-h h3{margin:0;font-size:13px;font-weight:600;white-space:nowrap;}
1148
1148
  .dshgt-hint{color:var(--gt-muted);font-size:12px;}
1149
1149
  .dshgt-desc{margin:0;color:var(--gt-muted);font-size:12px;}
1150
+ .dshgt-subhead{margin:4px 0 0;padding-top:8px;border-top:1px solid var(--gt-border);font-size:12px;font-weight:600;color:var(--gt-muted);}
1150
1151
  .dshgt-row{display:flex;gap:10px;align-items:center;min-height:28px;flex-wrap:wrap;}
1151
1152
  .dshgt-row>label.dshgt-label{width:96px;color:var(--gt-muted);flex:none;font-size:12px;display:flex;align-items:flex-start;gap:5px;}
1152
1153
  .dshgt-label-text{flex:1;min-width:0;}
@@ -1521,6 +1522,8 @@ var CSS = `
1521
1522
  .dshgt-subs-cb{width:14px;height:14px;margin:0;accent-color:var(--gt-accent);justify-self:center;}
1522
1523
  .dshgt-subs-ident{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
1523
1524
  .dshgt-subs-ident mark{background:color-mix(in srgb,var(--gt-accent) 18%,transparent);color:inherit;border-radius:3px;padding:0 1px;}
1525
+ .dshgt-subs-ident-link{color:inherit;text-decoration:none;min-width:0;overflow:hidden;text-overflow:ellipsis;}
1526
+ .dshgt-subs-ident-link:hover{color:var(--gt-accent);text-decoration:underline;text-underline-offset:2px;}
1524
1527
  .dshgt-subs-ver{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--gt-fg);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
1525
1528
  .dshgt-subs-sum{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;color:var(--gt-muted);text-align:right;white-space:nowrap;}
1526
1529
  .dshgt-subs-stat{display:flex;align-items:center;gap:6px;padding-left:4px;font-size:12px;color:var(--gt-muted);white-space:nowrap;}
@@ -2024,8 +2027,8 @@ function credentialView(model, t) {
2024
2027
 
2025
2028
  // client/settings.ts
2026
2029
  var LANGUAGES = ["all", "typescript", "python", "go", "rust", "java", "c", "cpp", "javascript", "csharp"];
2027
- var SECTIONS = ["source", "model", "repo", "auth", "scope", "summarize", "releases", "schedule"];
2028
- var EMPTY_DIRTY = { source: false, model: false, repo: false, auth: false, scope: false, summarize: false, releases: false, schedule: false };
2030
+ var SECTIONS = ["source", "model", "repo", "auth", "scope", "summarize", "releases"];
2031
+ var EMPTY_DIRTY = { source: false, model: false, repo: false, auth: false, scope: false, summarize: false, releases: false };
2029
2032
  function cloneSettings(settings) {
2030
2033
  return JSON.parse(JSON.stringify(settings));
2031
2034
  }
@@ -2040,13 +2043,11 @@ function sectionSlice(settings, section) {
2040
2043
  case "auth":
2041
2044
  return { github: settings.github };
2042
2045
  case "scope":
2043
- return { trending: settings.trending };
2046
+ return { trending: settings.trending, schedule: settings.schedule };
2044
2047
  case "summarize":
2045
2048
  return { summarize: settings.summarize };
2046
2049
  case "releases":
2047
2050
  return { releases: settings.releases };
2048
- case "schedule":
2049
- return { schedule: settings.schedule };
2050
2051
  }
2051
2052
  }
2052
2053
  var NOTICE_TTL_MS = 5e3;
@@ -2249,8 +2250,7 @@ function SettingsView(props) {
2249
2250
  { id: "auth", label: t("st.auth") },
2250
2251
  { id: "scope", label: t("st.scope") },
2251
2252
  { id: "summarize", label: t("st.summarize") },
2252
- { id: "releases", label: t("st.releases") },
2253
- { id: "schedule", label: t("st.schedule") }
2253
+ { id: "releases", label: t("st.releases") }
2254
2254
  ];
2255
2255
  const sourceCard = h(
2256
2256
  Card,
@@ -2449,7 +2449,10 @@ function SettingsView(props) {
2449
2449
  );
2450
2450
  const scopeCard = h(
2451
2451
  Card,
2452
- { title: t("card.scope.title") },
2452
+ {
2453
+ title: t("card.scope.title"),
2454
+ hint: state.schedule.nextRunAt === void 0 ? void 0 : `${t("schedule.next")} ${localTime(state.schedule.nextRunAt)}`
2455
+ },
2453
2456
  h(
2454
2457
  Row,
2455
2458
  { label: t("scope.period") },
@@ -2483,11 +2486,8 @@ function SettingsView(props) {
2483
2486
  draftNext.trending.languages = next;
2484
2487
  })
2485
2488
  })
2486
- )
2487
- );
2488
- const scheduleCard = h(
2489
- Card,
2490
- { title: t("card.schedule.title"), hint: state.schedule.nextRunAt === void 0 ? void 0 : `${t("schedule.next")} ${localTime(state.schedule.nextRunAt)}` },
2489
+ ),
2490
+ h("h4", { className: "dshgt-subhead" }, t("card.schedule.title")),
2491
2491
  h(
2492
2492
  Row,
2493
2493
  { label: t("schedule.enabled") },
@@ -2657,7 +2657,7 @@ function SettingsView(props) {
2657
2657
  })
2658
2658
  )
2659
2659
  );
2660
- const currentCard = section === "source" ? sourceCard : section === "model" ? modelCard : section === "repo" ? repoCard : section === "auth" ? authCard : section === "scope" ? scopeCard : section === "summarize" ? summarizeCard : section === "releases" ? releasesCard : scheduleCard;
2660
+ const currentCard = section === "source" ? sourceCard : section === "model" ? modelCard : section === "repo" ? repoCard : section === "auth" ? authCard : section === "scope" ? scopeCard : section === "summarize" ? summarizeCard : releasesCard;
2661
2661
  return h(
2662
2662
  "div",
2663
2663
  { className: "dshgt-settings" },
@@ -4574,6 +4574,9 @@ function highlight(text, needle) {
4574
4574
  if (index < text.length) parts.push(text.slice(index));
4575
4575
  return parts;
4576
4576
  }
4577
+ function repoUrl(name) {
4578
+ return /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(name) ? `https://github.com/${name}` : void 0;
4579
+ }
4577
4580
  function isMissingDoc(code, message) {
4578
4581
  if (code !== void 0 && /NOT_?FOUND|MISSING|NO_?DOC/i.test(code)) return true;
4579
4582
  return /not\s*found|no such file|enoent|404|不存在|no release document|has no release|无发版记录/i.test(message);
@@ -4885,7 +4888,21 @@ function SubscriptionsView(props) {
4885
4888
  }
4886
4889
  },
4887
4890
  checkbox,
4888
- h("span", { key: "name", role: "cell", className: "dshgt-subs-ident", title: row.name }, highlight(row.name, needle)),
4891
+ h(
4892
+ "span",
4893
+ { key: "name", role: "cell", className: "dshgt-subs-ident", title: row.name },
4894
+ repoUrl(row.name) === void 0 ? highlight(row.name, needle) : h(
4895
+ "a",
4896
+ {
4897
+ className: "dshgt-subs-ident-link",
4898
+ href: repoUrl(row.name),
4899
+ target: "_blank",
4900
+ rel: "noreferrer",
4901
+ onClick: (event) => event.stopPropagation()
4902
+ },
4903
+ highlight(row.name, needle)
4904
+ )
4905
+ ),
4889
4906
  h("span", { key: "tag", role: "cell", className: "dshgt-subs-ver", title: item?.latestTag ?? "" }, item?.latestTag ?? "—"),
4890
4907
  h(
4891
4908
  "span",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morehao/dsh-github-trending",
3
- "version": "0.7.10",
3
+ "version": "0.7.11",
4
4
  "description": "GitHub 趋势日报的 DeepSeek Harness 插件:按日 / 周 / 月周期定时 spawn 本地 trendradar 核心,抓取 Trending、生成中文简介与周期总结,并可选把订阅仓库的新 Release 合成中文摘要,一起提交到你的仓库、自动开 PR 合并;内置概览 / 榜单 / 运行记录 / 订阅 / 设置工作台。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -23,6 +23,7 @@
23
23
  "cordis.patch.yml",
24
24
  "icon.svg",
25
25
  "README.md",
26
+ "README.en.md",
26
27
  "CHANGELOG.md",
27
28
  "LICENSE"
28
29
  ],