@clawos-dev/clawd 0.2.575 → 0.2.577

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.
@@ -21518,7 +21518,18 @@ var EnvPackageSchema = external_exports.object({
21518
21518
  */
21519
21519
  localVersion: external_exports.string().optional(),
21520
21520
  /** `github:` 专用——那个版本是哪个文件。见 EnvArtifactSchema */
21521
- artifact: EnvArtifactSchema.optional()
21521
+ artifact: EnvArtifactSchema.optional(),
21522
+ /**
21523
+ * `apt:` 专用——daemon 上报时查过 Debian 12(bookworm)仓库,**没有**这个包。云上装不了,怎么办由老板在页面上定(换源 / 去掉 / 接受);
21524
+ * 不打回 butler(它也不见得找得到对的 npm / github 源)。有这个包时不写此字段,`version` 就是 Debian 12 会装的那一版(不是本机的)。
21525
+ */
21526
+ aptMissing: external_exports.literal(true).optional(),
21527
+ /**
21528
+ * `apt:` 专用——daemon 查到的 Debian 12 里这个包的版本(上游号,如 `3.11.2`;元包抠不出上游号时是 Debian 的版本串原样)。
21529
+ * 是**事实**不是要求:`version` 才是构建期要验的那个——Debian 版本满足 `min`(或没 `min`)时 `version` = 它;不满足时只记这里、不钉 `version`,
21530
+ * 页面把「Debian 12 只有 x,要求 ≥ min」摆出来让老板定。查不到(出网失败)时两者都不写,页面显示「没查到」。
21531
+ */
21532
+ aptVersion: external_exports.string().optional()
21522
21533
  });
21523
21534
  var EnvSecretSchema = external_exports.object({
21524
21535
  // 凭据的命名引用('aliyun-ak' / 'supabase-shared')。部署时按这个名字去解析实际的值。
@@ -24807,7 +24818,7 @@ var DEPLOY_FILE = import_node_path3.default.join(".clawd", "deploy.json");
24807
24818
  var SCAN_FILE = import_node_path3.default.join(".clawd", "deploy-scan.json");
24808
24819
  var z1 = DeployScanSchema.omit({ id: true, manifest: true }).extend({ releasedHead: DeployScanSchema.shape.head }).strict();
24809
24820
  var z2 = external_exports.object({ version: external_exports.literal(2), scans: external_exports.array(DeployScanSchema), released: DeployReleasedSchema.optional() }).strict();
24810
- var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true }).extend({
24821
+ var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true, aptMissing: true, aptVersion: true }).extend({
24811
24822
  artifact: external_exports.object({ url: external_exports.string().url(), bin: external_exports.string() }).strict().optional()
24812
24823
  });
24813
24824
 
package/dist/cli.cjs CHANGED
@@ -5983,13 +5983,20 @@ function connectorBlockers(c2) {
5983
5983
  if (c2.credentialSource === "shared" && c2.fields.length === 0) out.push(`\u8FDE\u63A5\u5668 ${c2.name} \u9009\u4E86\u53D1\u5E03\u8005\u7684\u8D26\u53F7\uFF0C\u4F46\u8981\u586B\u7684\u53D8\u91CF\u8FD8\u6CA1\u5217`);
5984
5984
  return out;
5985
5985
  }
5986
+ function packageBlockers(p3) {
5987
+ const provided = CLOUD_ROOT_PROVIDES.includes(p3.name) || CLOUD_BASE_PROVIDES.includes(p3.name);
5988
+ if (p3.from?.startsWith("github:") && !p3.artifact && !provided) {
5989
+ return [`${p3.name} \u8FD8\u6CA1\u9489\u4E0B\u8F7D\u8D44\u4EA7\uFF08github: \u8981\u5177\u4F53\u5230\u54EA\u4E2A\u6587\u4EF6\uFF09\u2014\u2014\u91CD\u65B0\u626B\u63CF`];
5990
+ }
5991
+ return [];
5992
+ }
5986
5993
  function sharedConnectorSecrets(m3) {
5987
5994
  return m3.connectors.filter((c2) => c2.credentialSource === "shared" && c2.fields.length > 0).map((c2) => ({ name: c2.name, env: [...c2.fields] }));
5988
5995
  }
5989
5996
  function requiredSecretEnvNames(m3) {
5990
5997
  return [.../* @__PURE__ */ new Set([...m3.secrets.flatMap((s2) => s2.env), ...sharedConnectorSecrets(m3).flatMap((s2) => s2.env)])];
5991
5998
  }
5992
- var EnvArtifactSchema, EnvPackageSchema, EnvSecretSchema, ConnectorNameSchema, CONNECTOR_KINDS, CONNECTOR_RUNNERS, CONNECTOR_PROTOCOLS, CREDENTIAL_SOURCES, CONNECTOR_AUTHS, ConnectorFieldSchema, EnvConnectorSchema, normalizeLegacyManifest, MANIFEST_BODY, EnvManifestBodySchema, EnvironmentManifestSchema, EnvEvidenceSchema;
5999
+ var EnvArtifactSchema, CLOUD_ROOT_PROVIDES, CLOUD_BASE_PROVIDES, EnvPackageSchema, EnvSecretSchema, ConnectorNameSchema, CONNECTOR_KINDS, CONNECTOR_RUNNERS, CONNECTOR_PROTOCOLS, CREDENTIAL_SOURCES, CONNECTOR_AUTHS, ConnectorFieldSchema, EnvConnectorSchema, normalizeLegacyManifest, MANIFEST_BODY, EnvManifestBodySchema, EnvironmentManifestSchema, EnvEvidenceSchema;
5993
6000
  var init_environment_schemas = __esm({
5994
6001
  "../protocol/src/environment-schemas.ts"() {
5995
6002
  "use strict";
@@ -6001,6 +6008,25 @@ var init_environment_schemas = __esm({
6001
6008
  sha256: external_exports.string().regex(/^[0-9a-f]{64}$/),
6002
6009
  size: external_exports.number().int().positive()
6003
6010
  });
6011
+ CLOUD_ROOT_PROVIDES = ["node", "npm"];
6012
+ CLOUD_BASE_PROVIDES = [
6013
+ "codex",
6014
+ "git",
6015
+ "lark-cli",
6016
+ "pi",
6017
+ "pi-mcp-bridge",
6018
+ "pi-cliproxyapi-provider",
6019
+ "python3",
6020
+ "jq",
6021
+ "rsync",
6022
+ "psql",
6023
+ "pnpm",
6024
+ "whiteboard-cli",
6025
+ "s",
6026
+ "supabase-mcp",
6027
+ "mcp-server-kibana",
6028
+ "aliyun"
6029
+ ];
6004
6030
  EnvPackageSchema = external_exports.object({
6005
6031
  // 装完后在 PATH 里能直接调到的名字('aliyun' / 's' / 'pnpm' / 'python3');npm 包报 bin 名,包名进 from
6006
6032
  name: external_exports.string().min(1),
@@ -6039,7 +6065,18 @@ var init_environment_schemas = __esm({
6039
6065
  */
6040
6066
  localVersion: external_exports.string().optional(),
6041
6067
  /** `github:` 专用——那个版本是哪个文件。见 EnvArtifactSchema */
6042
- artifact: EnvArtifactSchema.optional()
6068
+ artifact: EnvArtifactSchema.optional(),
6069
+ /**
6070
+ * `apt:` 专用——daemon 上报时查过 Debian 12(bookworm)仓库,**没有**这个包。云上装不了,怎么办由老板在页面上定(换源 / 去掉 / 接受);
6071
+ * 不打回 butler(它也不见得找得到对的 npm / github 源)。有这个包时不写此字段,`version` 就是 Debian 12 会装的那一版(不是本机的)。
6072
+ */
6073
+ aptMissing: external_exports.literal(true).optional(),
6074
+ /**
6075
+ * `apt:` 专用——daemon 查到的 Debian 12 里这个包的版本(上游号,如 `3.11.2`;元包抠不出上游号时是 Debian 的版本串原样)。
6076
+ * 是**事实**不是要求:`version` 才是构建期要验的那个——Debian 版本满足 `min`(或没 `min`)时 `version` = 它;不满足时只记这里、不钉 `version`,
6077
+ * 页面把「Debian 12 只有 x,要求 ≥ min」摆出来让老板定。查不到(出网失败)时两者都不写,页面显示「没查到」。
6078
+ */
6079
+ aptVersion: external_exports.string().optional()
6043
6080
  });
6044
6081
  EnvSecretSchema = external_exports.object({
6045
6082
  // 凭据的命名引用('aliyun-ak' / 'supabase-shared')。部署时按这个名字去解析实际的值。
@@ -55654,7 +55691,7 @@ function replaceScan(file, entry) {
55654
55691
  function emptyDeployFile() {
55655
55692
  return { version: 1, manifest: { version: 1, packages: [], secrets: [], connectors: [] } };
55656
55693
  }
55657
- var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true }).extend({
55694
+ var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true, aptMissing: true, aptVersion: true }).extend({
55658
55695
  artifact: external_exports.object({ url: external_exports.string().url(), bin: external_exports.string() }).strict().optional()
55659
55696
  });
55660
55697
  var FINDING_SCHEMAS = {
@@ -55759,6 +55796,50 @@ function downloadArtifact(exec) {
55759
55796
  };
55760
55797
  }
55761
55798
 
55799
+ // src/deploy/debian-apt.ts
55800
+ var DEBIAN_SUITE = "bookworm";
55801
+ var MADISON_TIMEOUT_MS = 1e4;
55802
+ function aptPackageName(from) {
55803
+ const m3 = /^apt:([A-Za-z0-9][A-Za-z0-9+.-]*)$/.exec(from ?? "");
55804
+ return m3?.[1];
55805
+ }
55806
+ function madisonUrl(pkg, suite = DEBIAN_SUITE) {
55807
+ return `https://api.ftp-master.debian.org/madison?package=${encodeURIComponent(pkg)}&s=${encodeURIComponent(suite)}&a=amd64,all&text=on`;
55808
+ }
55809
+ function upstreamVersion(debianVersion) {
55810
+ const noEpoch = debianVersion.replace(/^\d+:/, "");
55811
+ const m3 = /^(\d+\.\d+(?:\.\d+)?)(?:[-+~]|$)/.exec(noEpoch);
55812
+ return m3?.[1];
55813
+ }
55814
+ function parseMadison(text, pkg) {
55815
+ for (const line of String(text).split("\n")) {
55816
+ const cols = line.split("|").map((s2) => s2.trim());
55817
+ if (cols.length < 3 || cols[0] !== pkg || !cols[1]) continue;
55818
+ return { debianVersion: cols[1], upstream: upstreamVersion(cols[1]) };
55819
+ }
55820
+ return void 0;
55821
+ }
55822
+ function gteVersion(a2, b3) {
55823
+ const A4 = a2.split(".").map(Number);
55824
+ const B3 = b3.split(".").map(Number);
55825
+ for (let i2 = 0; i2 < Math.max(A4.length, B3.length); i2++) {
55826
+ const x2 = A4[i2] ?? 0;
55827
+ const y3 = B3[i2] ?? 0;
55828
+ if (x2 !== y3) return x2 > y3;
55829
+ }
55830
+ return true;
55831
+ }
55832
+ function lookupDebianPackage(fetchFn = fetch) {
55833
+ return async (pkg) => {
55834
+ const res = await fetchFn(madisonUrl(pkg), { signal: AbortSignal.timeout(MADISON_TIMEOUT_MS) });
55835
+ if (!res.ok) throw new Error(`madison HTTP ${res.status}`);
55836
+ return parseMadison(await res.text(), pkg);
55837
+ };
55838
+ }
55839
+
55840
+ // src/handlers/deploy.ts
55841
+ init_protocol();
55842
+
55762
55843
  // src/deploy/repo.ts
55763
55844
  var import_promises6 = __toESM(require("fs/promises"), 1);
55764
55845
  var import_node_path35 = __toESM(require("path"), 1);
@@ -60163,8 +60244,12 @@ function buildDeployHandlers(deps) {
60163
60244
  };
60164
60245
  async function settlePackage(pkg) {
60165
60246
  const localVersion = await deps.probeLocalVersion(pkg);
60166
- const version2 = localVersion ?? pkg.version;
60167
60247
  const { artifact: reported, ...rest } = pkg;
60248
+ if (pkg.from?.startsWith("apt:")) {
60249
+ if (reported) throw invalid(`\`${pkg.name}\` \u662F apt \u6761\u76EE\uFF0C\u4E0D\u5E26 artifact\uFF08\u90A3\u662F github: \u4E13\u7528\uFF09`);
60250
+ return settleApt(aptPackageName(pkg.from), rest, localVersion, pkg.min);
60251
+ }
60252
+ const version2 = localVersion ?? pkg.version;
60168
60253
  const out = { ...rest, ...version2 ? { version: version2 } : {}, ...localVersion ? { localVersion } : {} };
60169
60254
  if (!reported) return out;
60170
60255
  if (!pkg.version) throw invalid(`\u9489\u8D44\u4EA7\u8981\u5148\u8BF4\u6E05\u662F\u54EA\u4E2A\u7248\u672C\u7684\uFF1A\`${pkg.name}\` \u5E26 artifact \u7684\u4E0A\u62A5\u5FC5\u987B\u540C\u65F6\u5E26 version`);
@@ -60177,6 +60262,26 @@ function buildDeployHandlers(deps) {
60177
60262
  }
60178
60263
  return { ...out, artifact: { ...reported, ...verified } };
60179
60264
  }
60265
+ async function settleApt(aptName, fields, localVersion, min) {
60266
+ const { version: _agentVersion, ...rest } = fields;
60267
+ const local = localVersion ? { localVersion } : {};
60268
+ if (CLOUD_ROOT_PROVIDES.includes(fields.name)) return { ...rest, ...local };
60269
+ if (!aptName) {
60270
+ deps.warn?.("deploy.apt.badName", { from: fields.from });
60271
+ return { ...rest, ...local };
60272
+ }
60273
+ let found;
60274
+ try {
60275
+ found = await deps.debianPackage(aptName);
60276
+ } catch (err) {
60277
+ deps.warn?.("deploy.apt.lookupFailed", { pkg: aptName, error: err instanceof Error ? err.message : String(err) });
60278
+ return { ...rest, ...local };
60279
+ }
60280
+ if (!found) return { ...rest, ...local, aptMissing: true };
60281
+ const aptVersion = found.upstream ?? (found.debianVersion || void 0);
60282
+ const pin = found.upstream && !(min && !gteVersion(found.upstream, min)) ? { version: found.upstream } : {};
60283
+ return { ...rest, ...pin, ...local, ...aptVersion ? { aptVersion } : {} };
60284
+ }
60180
60285
  const reportFinding = async (frame, _client, ctx) => {
60181
60286
  ensureOwner(ctx);
60182
60287
  const args = parseArgs2(DeployReportFindingArgsSchema, frame, "deploy:reportFinding");
@@ -60281,6 +60386,7 @@ function buildDeployHandlers(deps) {
60281
60386
  const missing = requiredEnvNames(entry.manifest).filter((e) => !present.has(e));
60282
60387
  if (missing.length > 0) blockers.push(`${missing.join(" / ")} \u8FD8\u6CA1\u586B`);
60283
60388
  for (const c2 of entry.manifest.connectors) blockers.push(...connectorBlockers(c2));
60389
+ for (const p3 of entry.manifest.packages) blockers.push(...packageBlockers(p3));
60284
60390
  if (!deps.personaEngine(personaId2)?.model) {
60285
60391
  blockers.push("\u8FD8\u6CA1\u9009\u6A21\u578B\uFF08\u5207\u5F15\u64CE\u65F6\u4F1A\u6E05\u7A7A\uFF09\u2014\u2014\u53BB persona \u8BBE\u7F6E\u91CC\u9009\u4E00\u4E2A");
60286
60392
  }
@@ -71503,7 +71609,7 @@ function computeMethodAccess(args) {
71503
71609
  }
71504
71610
 
71505
71611
  // src/version.ts
71506
- var version = "0.2.575".length > 0 ? "0.2.575" : "dev";
71612
+ var version = "0.2.577".length > 0 ? "0.2.577" : "dev";
71507
71613
 
71508
71614
  // src/cli-probe/probe.ts
71509
71615
  var fs79 = __toESM(require("fs"), 1);
@@ -75173,6 +75279,8 @@ async function startDaemon(config) {
75173
75279
  return probeLocalVersion(runCommand, pkg);
75174
75280
  },
75175
75281
  fetchArtifact: downloadArtifact(runCommand),
75282
+ // apt 条目的 version 按 Debian 12 仓库定(不是本机):一次出网查 madison,只要元数据不下载
75283
+ debianPackage: lookupDebianPackage(),
75176
75284
  githubIdentity,
75177
75285
  githubApi: (token) => createGithubApi({ token }),
75178
75286
  org: PERSONA_REPO_ORG,
@@ -21332,7 +21332,18 @@ var EnvPackageSchema = external_exports.object({
21332
21332
  */
21333
21333
  localVersion: external_exports.string().optional(),
21334
21334
  /** `github:` 专用——那个版本是哪个文件。见 EnvArtifactSchema */
21335
- artifact: EnvArtifactSchema.optional()
21335
+ artifact: EnvArtifactSchema.optional(),
21336
+ /**
21337
+ * `apt:` 专用——daemon 上报时查过 Debian 12(bookworm)仓库,**没有**这个包。云上装不了,怎么办由老板在页面上定(换源 / 去掉 / 接受);
21338
+ * 不打回 butler(它也不见得找得到对的 npm / github 源)。有这个包时不写此字段,`version` 就是 Debian 12 会装的那一版(不是本机的)。
21339
+ */
21340
+ aptMissing: external_exports.literal(true).optional(),
21341
+ /**
21342
+ * `apt:` 专用——daemon 查到的 Debian 12 里这个包的版本(上游号,如 `3.11.2`;元包抠不出上游号时是 Debian 的版本串原样)。
21343
+ * 是**事实**不是要求:`version` 才是构建期要验的那个——Debian 版本满足 `min`(或没 `min`)时 `version` = 它;不满足时只记这里、不钉 `version`,
21344
+ * 页面把「Debian 12 只有 x,要求 ≥ min」摆出来让老板定。查不到(出网失败)时两者都不写,页面显示「没查到」。
21345
+ */
21346
+ aptVersion: external_exports.string().optional()
21336
21347
  });
21337
21348
  var EnvSecretSchema = external_exports.object({
21338
21349
  // 凭据的命名引用('aliyun-ak' / 'supabase-shared')。部署时按这个名字去解析实际的值。
@@ -21518,7 +21518,18 @@ var EnvPackageSchema = external_exports.object({
21518
21518
  */
21519
21519
  localVersion: external_exports.string().optional(),
21520
21520
  /** `github:` 专用——那个版本是哪个文件。见 EnvArtifactSchema */
21521
- artifact: EnvArtifactSchema.optional()
21521
+ artifact: EnvArtifactSchema.optional(),
21522
+ /**
21523
+ * `apt:` 专用——daemon 上报时查过 Debian 12(bookworm)仓库,**没有**这个包。云上装不了,怎么办由老板在页面上定(换源 / 去掉 / 接受);
21524
+ * 不打回 butler(它也不见得找得到对的 npm / github 源)。有这个包时不写此字段,`version` 就是 Debian 12 会装的那一版(不是本机的)。
21525
+ */
21526
+ aptMissing: external_exports.literal(true).optional(),
21527
+ /**
21528
+ * `apt:` 专用——daemon 查到的 Debian 12 里这个包的版本(上游号,如 `3.11.2`;元包抠不出上游号时是 Debian 的版本串原样)。
21529
+ * 是**事实**不是要求:`version` 才是构建期要验的那个——Debian 版本满足 `min`(或没 `min`)时 `version` = 它;不满足时只记这里、不钉 `version`,
21530
+ * 页面把「Debian 12 只有 x,要求 ≥ min」摆出来让老板定。查不到(出网失败)时两者都不写,页面显示「没查到」。
21531
+ */
21532
+ aptVersion: external_exports.string().optional()
21522
21533
  });
21523
21534
  var EnvSecretSchema = external_exports.object({
21524
21535
  // 凭据的命名引用('aliyun-ak' / 'supabase-shared')。部署时按这个名字去解析实际的值。
@@ -24807,7 +24818,7 @@ var DEPLOY_FILE = import_node_path3.default.join(".clawd", "deploy.json");
24807
24818
  var SCAN_FILE = import_node_path3.default.join(".clawd", "deploy-scan.json");
24808
24819
  var z1 = DeployScanSchema.omit({ id: true, manifest: true }).extend({ releasedHead: DeployScanSchema.shape.head }).strict();
24809
24820
  var z2 = external_exports.object({ version: external_exports.literal(2), scans: external_exports.array(DeployScanSchema), released: DeployReleasedSchema.optional() }).strict();
24810
- var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true }).extend({
24821
+ var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true, aptMissing: true, aptVersion: true }).extend({
24811
24822
  artifact: external_exports.object({ url: external_exports.string().url(), bin: external_exports.string() }).strict().optional()
24812
24823
  });
24813
24824
 
@@ -42,6 +42,8 @@ git diff --name-only <任务里给的 sha> -- .
42
42
  - `evidence` 用记录里 `target` 等于 `package:<name>` 那条的 `reason` / `file` / `quote` 原样回传。
43
43
  - 记录里**没有**这条 evidence 的(老板在页面上手工补的条目)跳过不报——上报口要求 evidence,编一条就是造假。
44
44
  - 被拒就按错误里说的做:`github:` 包本机版本变了,daemon 会告诉你新版本,按它重找资产再报(规则见 package 那节第 2 步)。
45
+ - **记录里没有 `artifact` 的 `github:` 包(早先扫的旧单据),重报之后接着把资产钉上**:按 package 那节「`github:` 要钉资产」
46
+ 第 2 步,用这次返回的 `version` 找 linux-amd64 资产再报一次。没钉资产的 `github:` 包云上装不了,页面会拦着不让发布。
45
47
  3. 然后再去读改动文件。改动涉及的条目在那一趟会再报一次,新结论盖过这里的,顺序不能反。
46
48
 
47
49
  两件最容易做错的事:
@@ -129,11 +131,14 @@ call({ method: "deploy:reportFinding", args: {
129
131
  只有本机没装时才由你按官方文档填一个 `version`,并在收尾的 `notes` 里写明「本机未装 <name>,取的 x.y.z」。
130
132
  `min` 只在你确知下限时填。**不要猜版本号。**
131
133
 
132
- **`from` 必须能装出 `version` 那个确切版本。** 这是选源的硬规则:
133
- - `apt:` 只在 Debian 12 (bookworm) 仓库里有该版本时才报——去 packages.debian.org 核一眼(本机 brew 装的 jq 1.7.1,
134
- bookworm 只有 1.6,那就不能报 `apt:jq`);
135
- - 没有就找上游 release 走 `github:`(jq 有 GitHub release 裸二进制);
136
- - 哪种都装不出本机那一版 → 写进 `notes` 作为存疑项,让老板决定。**不要报一个装出来版本不对的源。**
134
+ **`apt:` 条目的版本由 daemon 按 Debian 12 定,你只管报 `apt:<包名>`。** apt 每个包只有 Debian 12 (bookworm) 冻结的那一个版本,
135
+ 本机 brew 装的永远比它新,「本机是啥就上云啥」对 apt 不成立。daemon 收到 `apt:` 条目会去查 Debian 官方仓库(一次元数据查询,不下载),
136
+ 把云上会装的版本写进 `version`,本机的记在 `localVersion`,页面那一行直接显示「云上装 Debian 12 的 3.11.2,本机 3.12.9」;
137
+ Debian 12 没有这个包也照样记下(页面显示「云上装不了」)。**你不要因为版本对不上就自己换成 npm / github 源,也不要下包来验证**——
138
+ 怎么办由老板在页面上定。想先看一眼 Debian 12 有没有、是哪版,用这条(只回一行元数据):
139
+ `curl -s 'https://api.ftp-master.debian.org/madison?package=<包名>&s=bookworm&a=amd64,all&text=on'`,空输出就是没有。
140
+
141
+ **`npm:` / `github:` 必须能装出 `version` 那个确切版本**:npm 注册表和 GitHub release 每个历史版本都在,选错了就是源选错了,不要报一个装出来版本不对的源。
137
142
 
138
143
  **`github:` 要钉资产。** GitHub 不是包注册表,从「仓库 + 版本」推不出该下哪个文件,构建器不猜。分两步:
139
144
  1. 先报 `{ name, from: "github:<owner>/<repo>" }`,从返回的 view 里读 daemon 定下的 `version`;
@@ -21518,7 +21518,18 @@ var EnvPackageSchema = external_exports.object({
21518
21518
  */
21519
21519
  localVersion: external_exports.string().optional(),
21520
21520
  /** `github:` 专用——那个版本是哪个文件。见 EnvArtifactSchema */
21521
- artifact: EnvArtifactSchema.optional()
21521
+ artifact: EnvArtifactSchema.optional(),
21522
+ /**
21523
+ * `apt:` 专用——daemon 上报时查过 Debian 12(bookworm)仓库,**没有**这个包。云上装不了,怎么办由老板在页面上定(换源 / 去掉 / 接受);
21524
+ * 不打回 butler(它也不见得找得到对的 npm / github 源)。有这个包时不写此字段,`version` 就是 Debian 12 会装的那一版(不是本机的)。
21525
+ */
21526
+ aptMissing: external_exports.literal(true).optional(),
21527
+ /**
21528
+ * `apt:` 专用——daemon 查到的 Debian 12 里这个包的版本(上游号,如 `3.11.2`;元包抠不出上游号时是 Debian 的版本串原样)。
21529
+ * 是**事实**不是要求:`version` 才是构建期要验的那个——Debian 版本满足 `min`(或没 `min`)时 `version` = 它;不满足时只记这里、不钉 `version`,
21530
+ * 页面把「Debian 12 只有 x,要求 ≥ min」摆出来让老板定。查不到(出网失败)时两者都不写,页面显示「没查到」。
21531
+ */
21532
+ aptVersion: external_exports.string().optional()
21522
21533
  });
21523
21534
  var EnvSecretSchema = external_exports.object({
21524
21535
  // 凭据的命名引用('aliyun-ak' / 'supabase-shared')。部署时按这个名字去解析实际的值。
@@ -24807,7 +24818,7 @@ var DEPLOY_FILE = import_node_path3.default.join(".clawd", "deploy.json");
24807
24818
  var SCAN_FILE = import_node_path3.default.join(".clawd", "deploy-scan.json");
24808
24819
  var z1 = DeployScanSchema.omit({ id: true, manifest: true }).extend({ releasedHead: DeployScanSchema.shape.head }).strict();
24809
24820
  var z2 = external_exports.object({ version: external_exports.literal(2), scans: external_exports.array(DeployScanSchema), released: DeployReleasedSchema.optional() }).strict();
24810
- var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true }).extend({
24821
+ var PackageFindingSchema = EnvPackageSchema.omit({ localVersion: true, artifact: true, aptMissing: true, aptVersion: true }).extend({
24811
24822
  artifact: external_exports.object({ url: external_exports.string().url(), bin: external_exports.string() }).strict().optional()
24812
24823
  });
24813
24824