@clawos-dev/clawd 0.2.724 → 0.2.725

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.
@@ -31785,7 +31785,9 @@ var DeployJobSchema = external_exports.object({
31785
31785
  /** GitHub 的 job databaseId,`gh run rerun --job` 要用。还没跑起来的段没有 */
31786
31786
  jobId: external_exports.number().optional(),
31787
31787
  startedAt: external_exports.number().optional(),
31788
- completedAt: external_exports.number().optional()
31788
+ completedAt: external_exports.number().optional(),
31789
+ /** 只有 build 段:构建期 CLI 校验没过、只报警没拦的条目(一条一句) */
31790
+ cliWarnings: external_exports.array(external_exports.string()).optional()
31789
31791
  }).strict();
31790
31792
  var DeployRunSchema = external_exports.object({
31791
31793
  runId: external_exports.number(),
package/dist/cli.cjs CHANGED
@@ -6763,7 +6763,9 @@ var init_deploy_schemas = __esm({
6763
6763
  /** GitHub 的 job databaseId,`gh run rerun --job` 要用。还没跑起来的段没有 */
6764
6764
  jobId: external_exports.number().optional(),
6765
6765
  startedAt: external_exports.number().optional(),
6766
- completedAt: external_exports.number().optional()
6766
+ completedAt: external_exports.number().optional(),
6767
+ /** 只有 build 段:构建期 CLI 校验没过、只报警没拦的条目(一条一句) */
6768
+ cliWarnings: external_exports.array(external_exports.string()).optional()
6767
6769
  }).strict();
6768
6770
  DeployRunSchema = external_exports.object({
6769
6771
  runId: external_exports.number(),
@@ -63913,6 +63915,15 @@ function packageNeedsRereport(pkg, probed) {
63913
63915
  init_protocol();
63914
63916
  var INTEGRATION_CONFIG_RUN_PREFIX = "persona-integration-config-";
63915
63917
  var runsOf = (slug, file, query) => `/repos/${slug}/actions/workflows/${encodeURIComponent(file)}/runs?${query}`;
63918
+ var CLI_WARNING_TITLE = "CLI version check";
63919
+ async function withCliWarnings(api, slug, jobs) {
63920
+ const build = jobs.find((j2) => j2.key === "build");
63921
+ if (build?.status !== "done" || build.jobId === void 0) return { jobs, read: true };
63922
+ const listed = await api.getJson(`/repos/${slug}/check-runs/${build.jobId}/annotations?per_page=100`);
63923
+ if (!Array.isArray(listed)) return { jobs, read: false };
63924
+ const warnings = listed.filter((a2) => a2?.annotation_level === "warning" && a2.title === CLI_WARNING_TITLE && typeof a2.message === "string").flatMap((a2) => String(a2.message).split("\n").filter(Boolean));
63925
+ return { jobs: warnings.length ? jobs.map((j2) => j2 === build ? { ...j2, cliWarnings: warnings } : j2) : jobs, read: true };
63926
+ }
63916
63927
  var pipelineJobKey = (name) => DEPLOY_STAGE_KEYS.find((k3) => name === k3 || name.startsWith(`${k3} `));
63917
63928
  function stageStatusOf(status, conclusion) {
63918
63929
  if (status === "queued" || status === "requested" || status === "pending") return "pending";
@@ -64001,8 +64012,9 @@ async function readPinnedRun(api, slug, raw, environment, promotionId, jobsCache
64001
64012
  if (listed.jobs.length < 100 && (listed.total_count === void 0 || page * 100 >= listed.total_count)) break;
64002
64013
  if (page === 30) return void 0;
64003
64014
  }
64004
- jobs = DEPLOY_STAGE_KEYS.map((key) => byKey.get(key)).filter((j2) => j2 !== void 0);
64005
- if (status === "completed" && jobsCache) {
64015
+ const annotated = await withCliWarnings(api, slug, DEPLOY_STAGE_KEYS.map((key) => byKey.get(key)).filter((j2) => j2 !== void 0));
64016
+ jobs = annotated.jobs;
64017
+ if (status === "completed" && jobsCache && annotated.read) {
64006
64018
  if (jobsCache.size >= COMPLETED_JOBS_CACHE_MAX) jobsCache.delete(jobsCache.keys().next().value);
64007
64019
  jobsCache.set(cacheKey, jobs);
64008
64020
  }
@@ -64041,7 +64053,7 @@ async function fetchRun(api, slug, query) {
64041
64053
  status: runStatusOf(String(raw.status ?? "")),
64042
64054
  htmlUrl: raw.html_url,
64043
64055
  // 按流水线的顺序排,不跟着 GitHub 返回的顺序走
64044
- jobs: DEPLOY_STAGE_KEYS.map((k3) => byKey.get(k3)).filter((j2) => j2 !== void 0)
64056
+ jobs: (await withCliWarnings(api, slug, DEPLOY_STAGE_KEYS.map((k3) => byKey.get(k3)).filter((j2) => j2 !== void 0))).jobs
64045
64057
  };
64046
64058
  }
64047
64059
  async function latestUnpublish(api, slug, environment) {
@@ -76133,7 +76145,7 @@ function computeMethodAccess(args) {
76133
76145
  }
76134
76146
 
76135
76147
  // src/version.ts
76136
- var version = "0.2.724".length > 0 ? "0.2.724" : "dev";
76148
+ var version = "0.2.725".length > 0 ? "0.2.725" : "dev";
76137
76149
 
76138
76150
  // src/cli-probe/probe.ts
76139
76151
  var fs87 = __toESM(require("fs"), 1);