@morehao/dsh-github-trending 0.4.2 → 0.4.3

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.4.3] - 2026-10-31
4
+
5
+ ### 变更
6
+
7
+ - **默认三周期全产出,无需勾选**:`schedule.periods` 固定收敛为 `daily,weekly,monthly`,定时运行默认产出日榜、周榜、月榜;设置页移除周期多选框,改为静态说明。旧配置(只有 `daily` 或空数组)在归一化时自动升级为三周期。相应地移除了「调度开启却未选周期」的校验(周期已恒为三项)。
8
+ - **手动/工具运行也默认三榜**:新增 `Runner.runMany()`,`POST /run` 与 `trending_run` 在省略 `period` 时按顺序依次跑日/周/月三个周期(各自独立 id、日志、历史记录、`periodSuccess`),响应新增 `summaries` 数组;显式传 `period` 时仍只跑单周期。批次期间由 `batching` 标志挡住外部并发触发。
9
+
3
10
  ## [v0.4.2] - 2026-10-31
4
11
 
5
12
  ### Features
package/README.md CHANGED
@@ -97,7 +97,7 @@ dsh plugin --profile <profile> add @morehao/dsh-github-trending
97
97
  | `trending.since` / `languages` / `topN` | `daily` / `all,typescript,python,go,rust` / `25` | `since` 是单次运行周期(`daily`/`weekly`/`monthly`,抓取窗口=标的周期由核心保证);实际支持范围由核心决定 |
98
98
  | `output.dir` | `trending` | 仓库内相对目录 |
99
99
  | `schedule.enabled` / `time` / `timezone` | `true` / `08:30:00` / `Asia/Shanghai` | 插件自己的 60 s tick 驱动 |
100
- | `schedule.periods` | `daily` | 定时自动产出的周期(`daily`/`weekly`/`monthly` 多选):日=每天、周=周日、月=月末触发 |
100
+ | `schedule.periods` | `daily,weekly,monthly` | 定时自动产出的周期:默认三周期全产出(无需勾选),日=每天、周=周日、月=月末触发;旧配置自动升级为三周期 |
101
101
  | `corePath` | 空 | 等价于 `TRENDING_DIGEST_CORE`(仅开发/排障,界面不提供入口,用环境变量或直接改 `settings.json`;设了就完全不下载) |
102
102
  | `coreAutoDownload` | `true` | 缓存缺失时是否自动下载核心;关掉后只报 `CORE_NOT_DOWNLOADED`,由你在设置页点「下载核心」 |
103
103
 
package/client.js CHANGED
@@ -143,6 +143,7 @@ var DICT = {
143
143
  "card.schedule.title": "调度",
144
144
  "schedule.enabled": "定时运行",
145
145
  "schedule.periods": "自动产出周期",
146
+ "schedule.periods.value": "日榜 / 周榜 / 月榜(默认全部产出,无需勾选)",
146
147
  "schedule.time": "时间",
147
148
  "schedule.timezone": "时区",
148
149
  "schedule.next": "下次运行",
@@ -469,6 +470,7 @@ var DICT = {
469
470
  "card.schedule.title": "Schedule",
470
471
  "schedule.enabled": "Scheduled runs",
471
472
  "schedule.periods": "Auto periods",
473
+ "schedule.periods.value": "Daily / Weekly / Monthly (all produced by default, no selection needed)",
472
474
  "schedule.time": "Time",
473
475
  "schedule.timezone": "Time zone",
474
476
  "schedule.next": "Next run",
@@ -1785,19 +1787,7 @@ function SettingsView(props) {
1785
1787
  h(
1786
1788
  Row,
1787
1789
  { label: t("schedule.periods") },
1788
- ...["daily", "weekly", "monthly"].map(
1789
- (period) => h(Toggle, {
1790
- key: period,
1791
- checked: draft.schedule.periods.includes(period),
1792
- onChange: (on) => update((next) => {
1793
- const set = new Set(next.schedule.periods);
1794
- if (on) set.add(period);
1795
- else set.delete(period);
1796
- next.schedule.periods = ["daily", "weekly", "monthly"].filter((p) => set.has(p));
1797
- }),
1798
- label: t(`scope.${period}`)
1799
- })
1800
- )
1790
+ h("span", { className: "dshgt-hint" }, t("schedule.periods.value"))
1801
1791
  ),
1802
1792
  h("p", { className: "dshgt-hint" }, t("schedule.source"))
1803
1793
  );
@@ -56,7 +56,7 @@ var DEFAULT_SETTINGS = {
56
56
  github: { authMode: "gh", tokenRef: "GITHUB_TOKEN" },
57
57
  trending: { since: "daily", languages: ["all", "typescript", "python", "go", "rust"], topN: 25 },
58
58
  output: { dir: "trending" },
59
- schedule: { enabled: true, time: "08:30:00", timezone: "Asia/Shanghai", periods: ["daily"] },
59
+ schedule: { enabled: true, time: "08:30:00", timezone: "Asia/Shanghai", periods: ["daily", "weekly", "monthly"] },
60
60
  corePath: "",
61
61
  coreAutoDownload: true
62
62
  };
@@ -117,10 +117,8 @@ function strArray(value, fallback) {
117
117
  const items = value.filter((item) => typeof item === "string" && item.trim() !== "");
118
118
  return items.length > 0 ? items.map((item) => item.trim()) : fallback;
119
119
  }
120
- function periodList(value, fallback) {
121
- if (value === void 0 || !Array.isArray(value)) return [...fallback];
122
- const set = new Set(value.filter(isPeriod));
123
- return PERIODS.filter((period) => set.has(period));
120
+ function periodList(_value, _fallback) {
121
+ return [...PERIODS];
124
122
  }
125
123
  function normalizeSettings(input) {
126
124
  const raw = typeof input === "object" && input !== null ? input : {};
@@ -243,9 +241,6 @@ function validateSettings(settings, providers = CORE_PROVIDERS) {
243
241
  if (!isValidTimezone(schedule.timezone)) {
244
242
  problems.push({ field: "schedule.timezone", code: "CONFIG_INVALID", message: "\u65F6\u533A\u5FC5\u987B\u662F IANA \u540D\u79F0\uFF08\u5982 Asia/Shanghai\uFF09" });
245
243
  }
246
- if (schedule.enabled && schedule.periods.length === 0) {
247
- problems.push({ field: "schedule.periods", code: "CONFIG_INVALID", message: "\u5B9A\u65F6\u8FD0\u884C\u5F00\u542F\u65F6\u81F3\u5C11\u8981\u9009\u62E9\u4E00\u4E2A\u4EA7\u51FA\u5468\u671F\uFF08\u65E5/\u5468/\u6708\uFF09" });
248
- }
249
244
  return problems;
250
245
  }
251
246
  function effectiveBaseURL(model) {
@@ -2170,7 +2165,7 @@ var Scheduler = class {
2170
2165
  for (const key of this.attempts.keys()) {
2171
2166
  if (!key.endsWith(`:${today}`)) this.attempts.delete(key);
2172
2167
  }
2173
- const periods = schedule.periods.length > 0 ? schedule.periods : ["daily"];
2168
+ const periods = schedule.periods.length > 0 ? schedule.periods : PERIODS;
2174
2169
  let ran = false;
2175
2170
  for (const period of periods) {
2176
2171
  if (!isPeriodTriggerDay(period, now, schedule.timezone)) continue;
@@ -2215,7 +2210,7 @@ var Scheduler = class {
2215
2210
  next() {
2216
2211
  const schedule = this.readSchedule();
2217
2212
  if (!schedule.enabled) return void 0;
2218
- const periods = schedule.periods.length > 0 ? schedule.periods : ["daily"];
2213
+ const periods = schedule.periods.length > 0 ? schedule.periods : PERIODS;
2219
2214
  try {
2220
2215
  const now = /* @__PURE__ */ new Date();
2221
2216
  let earliest;
@@ -2304,6 +2299,8 @@ function periodFileBase(period, date) {
2304
2299
  }
2305
2300
  var Runner = class {
2306
2301
  active;
2302
+ /** 批量运行(一次触发跑多个周期)期间为 true,挡住外部并发触发。 */
2303
+ batching = false;
2307
2304
  deps;
2308
2305
  constructor(deps) {
2309
2306
  this.deps = deps;
@@ -2316,13 +2313,13 @@ var Runner = class {
2316
2313
  this.active.controller.abort();
2317
2314
  return true;
2318
2315
  }
2319
- async run(options) {
2316
+ async run(options, _internal = false) {
2320
2317
  const env = this.deps.env ?? process.env;
2321
2318
  const store = this.deps.store;
2322
2319
  const settings = store.readSettings();
2323
2320
  const credentials = credentialServices(this.deps.get);
2324
- if (this.active !== void 0) {
2325
- throw new IpcError("CONFIG_INVALID", `\u5DF2\u6709\u4E00\u6B21\u8FD0\u884C\u5728\u8FDB\u884C\u4E2D\uFF08${this.active.id}\uFF09\uFF0C\u8BF7\u5148\u7B49\u5F85\u6216\u53D6\u6D88`);
2321
+ if (!_internal && (this.active !== void 0 || this.batching)) {
2322
+ throw new IpcError("CONFIG_INVALID", `\u5DF2\u6709\u4E00\u6B21\u8FD0\u884C\u5728\u8FDB\u884C\u4E2D\uFF08${this.active?.id ?? "\u6279\u91CF\u8FD0\u884C"}\uFF09\uFF0C\u8BF7\u5148\u7B49\u5F85\u6216\u53D6\u6D88`);
2326
2323
  }
2327
2324
  const problems = validateSettings(settings);
2328
2325
  if (problems.length > 0) {
@@ -2444,6 +2441,28 @@ var Runner = class {
2444
2441
  this.active = void 0;
2445
2442
  }
2446
2443
  }
2444
+ /**
2445
+ * 批量运行:按顺序对多个周期各跑一次(手动/工具触发时默认产出日/周/月三榜)。
2446
+ * 每次内部独享 id / 日志 / 摘要;整个批次期间置 `batching`,挡住外部并发触发。
2447
+ * 取消只中止当前周期,批次继续跑后续周期(用户取消单次即可)。
2448
+ */
2449
+ async runMany(options) {
2450
+ if (this.active !== void 0 || this.batching) {
2451
+ throw new IpcError("CONFIG_INVALID", `\u5DF2\u6709\u4E00\u6B21\u8FD0\u884C\u5728\u8FDB\u884C\u4E2D\uFF08${this.active?.id ?? "\u6279\u91CF\u8FD0\u884C"}\uFF09\uFF0C\u8BF7\u5148\u7B49\u5F85\u6216\u53D6\u6D88`);
2452
+ }
2453
+ const periods = options.periods !== void 0 && options.periods.length > 0 ? options.periods : [...PERIODS];
2454
+ this.batching = true;
2455
+ const summaries = [];
2456
+ try {
2457
+ for (const period of periods) {
2458
+ summaries.push(await this.run({ ...options, period }, true));
2459
+ }
2460
+ } finally {
2461
+ this.batching = false;
2462
+ this.active = void 0;
2463
+ }
2464
+ return summaries;
2465
+ }
2447
2466
  summarize(input) {
2448
2467
  const { outcome } = input;
2449
2468
  const error = outcome.error === void 0 ? void 0 : (() => {
@@ -3341,13 +3360,17 @@ async function dispatch(method, pathname, url, request, deps) {
3341
3360
  }
3342
3361
  if (method === "POST" && pathname === "/run") {
3343
3362
  const body = await readBody2(request);
3344
- const summary = await deps.runner.run({
3363
+ const base = {
3345
3364
  dryRun: body.dryRun === true,
3346
3365
  ...typeof body.date === "string" && body.date !== "" ? { date: body.date } : {},
3347
- ...isPeriod(body.period) ? { period: body.period } : {},
3348
3366
  trigger: "manual"
3349
- });
3350
- return { summary };
3367
+ };
3368
+ if (isPeriod(body.period)) {
3369
+ const summary = await deps.runner.run({ ...base, period: body.period });
3370
+ return { summary, summaries: [summary] };
3371
+ }
3372
+ const summaries = await deps.runner.runMany(base);
3373
+ return { summary: summaries[summaries.length - 1], summaries };
3351
3374
  }
3352
3375
  if (method === "POST" && pathname === "/run/cancel") {
3353
3376
  return { cancelled: deps.runner.cancel() };
@@ -3617,11 +3640,11 @@ function describeRecord(record) {
3617
3640
  function createTrendingRunTool(runner) {
3618
3641
  return {
3619
3642
  name: "trending_run",
3620
- description: "\u6267\u884C\u4E00\u6B21 GitHub \u8D8B\u52BF\u699C\u5355\uFF1A\u5B9A\u4F4D\u5E76\u63E1\u624B\u672C\u5730\u6838\u5FC3\uFF0Cspawn \u4E00\u6B21 run\uFF0C\u8FD4\u56DE\u7ED3\u6784\u5316\u6458\u8981\uFF08\u6587\u4EF6\u6570\u3001commit\u3001PR\u3001\u9519\u8BEF\u7801\uFF09\u3002dryRun=true \u53EA\u6293\u53D6\u4E0E\u6E32\u67D3\u3001\u4E0D\u5199\u6587\u4EF6\u4E5F\u4E0D\u63D0\u4EA4\u3002\u540C\u65E5\u540C\u5185\u5BB9\u91CD\u8DD1\u4F1A\u8FD4\u56DE skipped=true\uFF08\u96F6\u65B0\u589E commit\uFF09\u3002",
3643
+ description: "\u6267\u884C GitHub \u8D8B\u52BF\u699C\u5355\uFF1A\u5B9A\u4F4D\u5E76\u63E1\u624B\u672C\u5730\u6838\u5FC3\uFF0Cspawn \u6838\u5FC3 run\uFF0C\u8FD4\u56DE\u7ED3\u6784\u5316\u6458\u8981\uFF08\u6587\u4EF6\u6570\u3001commit\u3001PR\u3001\u9519\u8BEF\u7801\uFF09\u3002\u7701\u7565 period \u65F6\u9ED8\u8BA4\u4EA7\u51FA\u65E5/\u5468/\u6708\u4E09\u699C\uFF08\u4F9D\u6B21\u8FD0\u884C\u4E09\u6B21\uFF0C\u8FD4\u56DE summaries\uFF09\u3002dryRun=true \u53EA\u6293\u53D6\u4E0E\u6E32\u67D3\u3001\u4E0D\u5199\u6587\u4EF6\u4E5F\u4E0D\u63D0\u4EA4\u3002\u540C\u65E5\u540C\u5185\u5BB9\u91CD\u8DD1\u4F1A\u8FD4\u56DE skipped=true\uFF08\u96F6\u65B0\u589E commit\uFF09\u3002",
3621
3644
  parameters: {
3622
3645
  dryRun: { type: "boolean", description: "\u53EA\u8BD5\u8DD1\uFF1A\u4E0D\u5199\u6587\u4EF6\u3001\u4E0D\u63D0\u4EA4\u3001\u4E0D\u5F00 PR" },
3623
3646
  date: { type: "string", description: "\u6307\u5B9A\u65E5\u671F\uFF08YYYY-MM-DD\uFF09\uFF1B\u7701\u7565\u5219\u7528\u8C03\u5EA6\u65F6\u533A\u7684\u4ECA\u5929" },
3624
- period: { type: "string", enum: ["daily", "weekly", "monthly"], description: "\u4EA7\u51FA\u5468\u671F\uFF1B\u7701\u7565\u5219\u7528\u8BBE\u7F6E\u91CC\u7684\u9ED8\u8BA4\u5468\u671F" }
3647
+ period: { type: "string", enum: ["daily", "weekly", "monthly"], description: "\u53EA\u8DD1\u6307\u5B9A\u5468\u671F\uFF1B\u7701\u7565\u5219\u9ED8\u8BA4\u4EA7\u51FA\u65E5/\u5468/\u6708\u4E09\u699C" }
3625
3648
  },
3626
3649
  output: {
3627
3650
  schema: RUN_OUTPUT_SCHEMA,
@@ -3629,37 +3652,51 @@ function createTrendingRunTool(runner) {
3629
3652
  },
3630
3653
  async execute(args = {}, exec = {}) {
3631
3654
  void exec;
3632
- const summary = await runner.run({
3655
+ const base = {
3633
3656
  dryRun: args.dryRun === true,
3634
3657
  ...typeof args.date === "string" && args.date !== "" ? { date: args.date } : {},
3635
- ...isPeriod(args.period) ? { period: args.period } : {},
3636
3658
  trigger: "tool"
3637
- });
3659
+ };
3660
+ const summaries = isPeriod(args.period) ? [await runner.run({ ...base, period: args.period })] : await runner.runMany(base);
3638
3661
  const lines = [];
3639
- const head = summary.ok ? summary.skipped ? "\u65E0\u53D8\u66F4\uFF08skipped\uFF09" : summary.dryRun ? "\u8BD5\u8DD1\u5B8C\u6210" : "\u8FD0\u884C\u6210\u529F" : `\u8FD0\u884C\u5931\u8D25\uFF1A${summary.error?.code ?? "INTERNAL"}`;
3640
- lines.push(`${summary.ok ? "\u2713" : "\u2717"} ${head}`);
3641
- lines.push(`\xB7 \u6838\u5FC3 ${summary.coreVersion || "(\u672A\u77E5)"} \xB7 ${formatDuration(summary.durationMs)} \xB7 ${summary.files} \u4E2A\u6587\u4EF6`);
3642
- if (summary.contentHash !== void 0) lines.push(`\xB7 contentHash ${summary.contentHash.slice(0, 12)}`);
3643
- if (summary.branch !== void 0) lines.push(`\xB7 \u5206\u652F ${summary.branch}`);
3644
- if (summary.prUrl !== void 0) lines.push(`\xB7 PR ${summary.prUrl}`);
3645
- if (summary.error !== void 0) {
3646
- lines.push(`\xB7 ${summary.error.message}`);
3647
- lines.push(`\xB7 \u4E0B\u4E00\u6B65\uFF1A${summary.error.hint}`);
3662
+ for (const summary of summaries) {
3663
+ const periodLabel = summary.period ?? "\u2014";
3664
+ const head = summary.ok ? summary.skipped ? "\u65E0\u53D8\u66F4\uFF08skipped\uFF09" : summary.dryRun ? "\u8BD5\u8DD1\u5B8C\u6210" : "\u8FD0\u884C\u6210\u529F" : `\u8FD0\u884C\u5931\u8D25\uFF1A${summary.error?.code ?? "INTERNAL"}`;
3665
+ lines.push(`${summary.ok ? "\u2713" : "\u2717"} [${periodLabel}] ${head}`);
3666
+ lines.push(`\xB7 \u6838\u5FC3 ${summary.coreVersion || "(\u672A\u77E5)"} \xB7 ${formatDuration(summary.durationMs)} \xB7 ${summary.files} \u4E2A\u6587\u4EF6`);
3667
+ if (summary.contentHash !== void 0) lines.push(`\xB7 contentHash ${summary.contentHash.slice(0, 12)}`);
3668
+ if (summary.branch !== void 0) lines.push(`\xB7 \u5206\u652F ${summary.branch}`);
3669
+ if (summary.prUrl !== void 0) lines.push(`\xB7 PR ${summary.prUrl}`);
3670
+ if (summary.error !== void 0) {
3671
+ lines.push(`\xB7 ${summary.error.message}`);
3672
+ lines.push(`\xB7 \u4E0B\u4E00\u6B65\uFF1A${summary.error.hint}`);
3673
+ }
3648
3674
  }
3649
- if (summary.dryRun) lines.push("\xB7 \u8FD9\u662F\u8BD5\u8DD1\uFF0C\u6CA1\u6709\u5199\u6587\u4EF6\u3001\u6CA1\u6709\u63D0\u4EA4");
3675
+ if (summaries.length > 1) lines.push(`\xB7 \u672C\u6B21\u5171\u8DD1 ${summaries.length} \u4E2A\u5468\u671F\uFF08\u65E5/\u5468/\u6708\uFF09`);
3676
+ if (summaries.some((summary) => summary.dryRun)) lines.push("\xB7 \u8FD9\u662F\u8BD5\u8DD1\uFF0C\u6CA1\u6709\u5199\u6587\u4EF6\u3001\u6CA1\u6709\u63D0\u4EA4");
3677
+ const ok = summaries.every((summary) => summary.ok);
3678
+ const primary = summaries[summaries.length - 1];
3650
3679
  return {
3651
- id: summary.id,
3652
- ok: summary.ok,
3653
- skipped: summary.skipped,
3654
- dryRun: summary.dryRun,
3655
- durationMs: summary.durationMs,
3656
- coreVersion: summary.coreVersion,
3657
- files: summary.files,
3658
- ...summary.contentHash === void 0 ? {} : { contentHash: summary.contentHash },
3659
- ...summary.branch === void 0 ? {} : { branch: summary.branch },
3660
- ...summary.prUrl === void 0 ? {} : { prUrl: summary.prUrl },
3661
- ...summary.error === void 0 ? {} : { errorCode: summary.error.code, errorMessage: summary.error.message, errorHint: summary.error.hint },
3662
- warnings: summary.warnings,
3680
+ ok,
3681
+ summaries: summaries.map((summary) => ({
3682
+ id: summary.id,
3683
+ period: summary.period,
3684
+ ok: summary.ok,
3685
+ skipped: summary.skipped,
3686
+ dryRun: summary.dryRun,
3687
+ durationMs: summary.durationMs,
3688
+ files: summary.files,
3689
+ ...summary.branch === void 0 ? {} : { branch: summary.branch },
3690
+ ...summary.prUrl === void 0 ? {} : { prUrl: summary.prUrl },
3691
+ ...summary.error === void 0 ? {} : { errorCode: summary.error.code, errorMessage: summary.error.message }
3692
+ })),
3693
+ id: primary?.id,
3694
+ skipped: summaries.every((summary) => summary.skipped),
3695
+ dryRun: base.dryRun,
3696
+ durationMs: summaries.reduce((sum, summary) => sum + summary.durationMs, 0),
3697
+ files: summaries.reduce((sum, summary) => sum + summary.files, 0),
3698
+ warnings: summaries.flatMap((summary) => summary.warnings),
3699
+ ...primary?.error === void 0 ? {} : { errorCode: primary.error.code, errorMessage: primary.error.message, errorHint: primary.error.hint },
3663
3700
  markdown: lines.join("\n")
3664
3701
  };
3665
3702
  }
package/lib/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  createTrendingRunTool,
9
9
  createUpdateService,
10
10
  readPluginInfo
11
- } from "./chunk-WTVBXQYN.js";
11
+ } from "./chunk-GBXP2NGW.js";
12
12
  import "./chunk-XLIFTAVL.js";
13
13
 
14
14
  // src/index.ts
package/lib/internal.d.ts CHANGED
@@ -222,6 +222,8 @@ interface ScheduleSettings {
222
222
  /**
223
223
  * 定时自动产出的周期(插件侧调度概念,核心无此字段)。
224
224
  * 每个周期按自己的节奏触发:日=每天、周=周日、月=月末。
225
+ * 现在固定为三周期全产出(`['daily','weekly','monthly']`),不再由用户勾选;
226
+ * 保留该字段以兼容旧设置、并驱动调度与去重逻辑。
225
227
  */
226
228
  periods: Period[];
227
229
  }
@@ -1272,6 +1274,8 @@ declare function isoWeekName(date: string): string;
1272
1274
  declare function periodFileBase(period: Period, date: string): string;
1273
1275
  declare class Runner {
1274
1276
  private active;
1277
+ /** 批量运行(一次触发跑多个周期)期间为 true,挡住外部并发触发。 */
1278
+ private batching;
1275
1279
  private readonly deps;
1276
1280
  constructor(deps: RunnerDeps);
1277
1281
  get running(): {
@@ -1279,7 +1283,15 @@ declare class Runner {
1279
1283
  startedAt: string;
1280
1284
  } | undefined;
1281
1285
  cancel(): boolean;
1282
- run(options: RunRequestOptions): Promise<RunSummary>;
1286
+ run(options: RunRequestOptions, _internal?: boolean): Promise<RunSummary>;
1287
+ /**
1288
+ * 批量运行:按顺序对多个周期各跑一次(手动/工具触发时默认产出日/周/月三榜)。
1289
+ * 每次内部独享 id / 日志 / 摘要;整个批次期间置 `batching`,挡住外部并发触发。
1290
+ * 取消只中止当前周期,批次继续跑后续周期(用户取消单次即可)。
1291
+ */
1292
+ runMany(options: RunRequestOptions & {
1293
+ periods?: Period[];
1294
+ }): Promise<RunSummary[]>;
1283
1295
  private summarize;
1284
1296
  private failureSummary;
1285
1297
  /**
@@ -1324,17 +1336,6 @@ declare namespace pluginInfo {
1324
1336
  export { type pluginInfo_PluginInfo as PluginInfo, pluginInfo_normalizeRepositoryUrl as normalizeRepositoryUrl, pluginInfo_readPluginInfo as readPluginInfo };
1325
1337
  }
1326
1338
 
1327
- /**
1328
- * 调度(FR-P-08 / 规格 §9)。
1329
- *
1330
- * 规格原本设想「复用宿主 schedule 服务」,但实测:宿主的 `ctx.schedule` 是 **会话本地**
1331
- * 的提醒(rc.5 才引入,create 需要 sessionId,冷会话不投递),而本插件的运行完全不依赖会话。
1332
- * 因此这里实现规格 §9 已经写明的兜底:宿主 `timer` 服务(或 `setInterval`)60 s tick、
1333
- * 按 IANA 时区判当日、6 h 内补跑、同日不重复。
1334
- *
1335
- * 「下一次运行」也由同一份时区算术给出,界面与工具都用它。
1336
- */
1337
-
1338
1339
  interface ScheduleConfig {
1339
1340
  enabled: boolean;
1340
1341
  time: string;
@@ -1591,21 +1592,30 @@ declare function createTrendingRunTool(runner: Runner): {
1591
1592
  }, exec?: {
1592
1593
  signal?: AbortSignal;
1593
1594
  }): Promise<{
1594
- warnings: string[];
1595
1595
  markdown: string;
1596
1596
  errorCode?: string | undefined;
1597
1597
  errorMessage?: string | undefined;
1598
1598
  errorHint?: string | undefined;
1599
- prUrl?: string | undefined;
1600
- branch?: string | undefined;
1601
- contentHash?: string | undefined;
1602
- id: string;
1603
1599
  ok: boolean;
1600
+ summaries: {
1601
+ errorCode?: string | undefined;
1602
+ errorMessage?: string | undefined;
1603
+ prUrl?: string | undefined;
1604
+ branch?: string | undefined;
1605
+ id: string;
1606
+ period: Period | undefined;
1607
+ ok: boolean;
1608
+ skipped: boolean;
1609
+ dryRun: boolean;
1610
+ durationMs: number;
1611
+ files: number;
1612
+ }[];
1613
+ id: string | undefined;
1604
1614
  skipped: boolean;
1605
1615
  dryRun: boolean;
1606
1616
  durationMs: number;
1607
- coreVersion: string;
1608
1617
  files: number;
1618
+ warnings: string[];
1609
1619
  }>;
1610
1620
  };
1611
1621
  declare function createTrendingHistoryTool(store: Store, scheduler: Scheduler): {
package/lib/internal.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  state_exports,
25
25
  tools_exports,
26
26
  update_exports
27
- } from "./chunk-WTVBXQYN.js";
27
+ } from "./chunk-GBXP2NGW.js";
28
28
  import {
29
29
  exec_exports
30
30
  } from "./chunk-XLIFTAVL.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morehao/dsh-github-trending",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "GitHub 趋势日报插件:每天定时 spawn 本地 trendradar 核心,抓取 Trending、生成中文简介与总结,提交到你的仓库并自动合并 PR。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",