@clawos-dev/clawd 0.2.645 → 0.2.646

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/dist/cli.cjs CHANGED
@@ -6013,9 +6013,15 @@ var init_github_auth_schemas = __esm({
6013
6013
  });
6014
6014
 
6015
6015
  // ../protocol/src/environment-schemas.ts
6016
+ function isFeishuBotConnector(c2) {
6017
+ return c2.name === "feishu" && c2.runner === "cli" && c2.kind === "env" && c2.credentialSource === "shared";
6018
+ }
6016
6019
  function connectorBlockers(c2) {
6017
6020
  if (!c2.credentialSource) return [`\u8FDE\u63A5\u5668 ${c2.name} \u8FD8\u6CA1\u9009\u7528\u8C01\u7684\u8D26\u53F7`];
6018
6021
  const out = [];
6022
+ if (isFeishuBotConnector(c2)) {
6023
+ return FEISHU_BOT_FIELDS.filter((f2) => !c2.fields.includes(f2)).map((f2) => `\u8FDE\u63A5\u5668 feishu \u7684 Lark App Bot \u7F3A\u5C11 ${f2 === "LARKSUITE_CLI_APP_ID" ? "App ID" : "App Secret"}`);
6024
+ }
6019
6025
  if (c2.credentialSource === "personal") {
6020
6026
  if (!c2.auth) out.push(`\u8FDE\u63A5\u5668 ${c2.name} \u8FD8\u6CA1\u9009\u7528\u6237\u600E\u4E48\u5173\u8054\u8D26\u53F7`);
6021
6027
  else if (c2.auth === "oauth" && c2.kind === "env") out.push(`\u8FDE\u63A5\u5668 ${c2.name} \u662F\u8FDB\u7A0B\u578B\uFF08stdio MCP / CLI\uFF09\uFF0C\u53EA\u80FD\u7C98\u8D34 API key\uFF0C\u8D70\u4E0D\u4E86 OAuth`);
@@ -6037,7 +6043,7 @@ function sharedConnectorSecrets(m3) {
6037
6043
  function requiredSecretEnvNames(m3) {
6038
6044
  return [.../* @__PURE__ */ new Set([...m3.secrets.flatMap((s2) => s2.env), ...sharedConnectorSecrets(m3).flatMap((s2) => s2.env)])];
6039
6045
  }
6040
- var EnvArtifactSchema, CLOUD_DEBIAN, CLOUD_ROOT_PROVIDES, CLOUD_BASE_PROVIDES, EnvPackageSchema, EnvSecretSchema, ConnectorNameSchema, CONNECTOR_KINDS, CONNECTOR_RUNNERS, CONNECTOR_PROTOCOLS, CREDENTIAL_SOURCES, CONNECTOR_AUTHS, ConnectorFieldSchema, EnvConnectorSchema, normalizeLegacyManifest, PUBLISHER_TEST_NOTE_PREFIX, PublisherTestSchema, MANIFEST_BODY, EnvManifestBodySchema, EnvironmentManifestSchema, EnvEvidenceSchema;
6046
+ var EnvArtifactSchema, CLOUD_DEBIAN, CLOUD_ROOT_PROVIDES, CLOUD_BASE_PROVIDES, EnvPackageSchema, EnvSecretSchema, ConnectorNameSchema, CONNECTOR_KINDS, CONNECTOR_RUNNERS, CONNECTOR_PROTOCOLS, CREDENTIAL_SOURCES, CONNECTOR_AUTHS, ConnectorFieldSchema, EnvConnectorSchema, FEISHU_BOT_FIELDS, normalizeLegacyManifest, PUBLISHER_TEST_NOTE_PREFIX, PublisherTestSchema, MANIFEST_BODY, EnvManifestBodySchema, EnvironmentManifestSchema, EnvEvidenceSchema;
6041
6047
  var init_environment_schemas = __esm({
6042
6048
  "../protocol/src/environment-schemas.ts"() {
6043
6049
  "use strict";
@@ -6128,6 +6134,7 @@ var init_environment_schemas = __esm({
6128
6134
  fields: external_exports.array(ConnectorFieldSchema).default([]),
6129
6135
  http: external_exports.object({ url: external_exports.string().min(1), headers: external_exports.record(external_exports.string(), external_exports.string()) }).optional()
6130
6136
  });
6137
+ FEISHU_BOT_FIELDS = ["LARKSUITE_CLI_APP_ID", "LARKSUITE_CLI_APP_SECRET"];
6131
6138
  normalizeLegacyManifest = (v3) => {
6132
6139
  if (!v3 || typeof v3 !== "object") return v3;
6133
6140
  let o2 = v3;
@@ -57479,6 +57486,7 @@ function cliConnectorFromFinding(item) {
57479
57486
  }
57480
57487
  function mergeConnector(existing, incoming) {
57481
57488
  if (!existing) return incoming;
57489
+ if (isFeishuBotConnector(existing) && incoming.name === existing.name && incoming.runner === "cli") return existing;
57482
57490
  const reviewed = existing.credentialSource !== void 0;
57483
57491
  return {
57484
57492
  ...incoming,
@@ -63061,7 +63069,11 @@ function buildDeployHandlers(deps) {
63061
63069
  } catch (err) {
63062
63070
  throw invalid(err instanceof Error ? err.message : String(err));
63063
63071
  }
63064
- if (args.kind === "connector") item = cliConnectorFromFinding(item);
63072
+ if (args.kind === "connector") {
63073
+ const incoming = cliConnectorFromFinding(item);
63074
+ const previous = scan.manifest.connectors.some((c2) => c2.name === incoming.name) ? void 0 : [...file.scans].reverse().find((s2) => s2.status === "done")?.manifest.connectors.find((c2) => c2.name === incoming.name && isFeishuBotConnector(c2));
63075
+ item = mergeConnector(previous, incoming);
63076
+ }
63065
63077
  if (args.kind === "package") item = await settlePackage(item);
63066
63078
  const target = `${args.kind}:${item.name}`;
63067
63079
  await writeScanFile(dir, replaceScan(file, {
@@ -74083,7 +74095,7 @@ function computeMethodAccess(args) {
74083
74095
  }
74084
74096
 
74085
74097
  // src/version.ts
74086
- var version = "0.2.645".length > 0 ? "0.2.645" : "dev";
74098
+ var version = "0.2.646".length > 0 ? "0.2.646" : "dev";
74087
74099
 
74088
74100
  // src/cli-probe/probe.ts
74089
74101
  var fs85 = __toESM(require("fs"), 1);