cclawd 2026.3.26 → 2026.3.28
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/.buildstamp +1 -1
- package/dist/{agents-C2_apaRl.js → agents-BNKB08km.js} +4 -4
- package/dist/{agents-jRHu-yVW.js → agents-BdtFdlIN.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/{channel-DbrLPVRk.js → channel-Dz1n3akq.js} +270 -11
- package/dist/{channels-CZH2hny_.js → channels-Bt0w3hbW.js} +4 -4
- package/dist/{channels-cli-DBYTAjRU.js → channels-cli-DgqDIEVC.js} +7 -7
- package/dist/{command-registry-BUCg5Yjv.js → command-registry-jlEvUAKq.js} +2 -2
- package/dist/{command-registry-DuepL5IT.js → command-registry-maV_byWv.js} +7 -7
- package/dist/{completion-cli-DEwxxtpl.js → completion-cli-B7KByNii.js} +2 -2
- package/dist/{completion-cli-BHl_-TbA.js → completion-cli-BgpfJ8GC.js} +3 -3
- package/dist/{config-cli-BUJXj3eo.js → config-cli-CkDay3qv.js} +1 -1
- package/dist/{configure-9-PQJTTK.js → configure-Bhpnr3RQ.js} +4 -4
- package/dist/{configure-CiRiSByg.js → configure-DEgPFToe.js} +1 -1
- package/dist/{doctor-completion-BKC_yRJu.js → doctor-completion-Bhbtito8.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensions/cclawd-guard/dashboard-launcher.js +1 -1
- package/dist/extensions/cclawd-guard/index.js +55 -376
- package/dist/extensions/discord/node_modules/.package-lock.json +3 -3
- package/dist/extensions/feishu/index.js +2 -2
- package/dist/extensions/feishu/node_modules/.package-lock.json +7 -7
- package/dist/extensions/feishu/node_modules/qs/CHANGELOG.md +6 -0
- package/dist/extensions/feishu/node_modules/qs/dist/qs.js +16 -16
- package/dist/extensions/feishu/node_modules/qs/lib/parse.js +2 -2
- package/dist/extensions/feishu/node_modules/qs/package.json +3 -3
- package/dist/extensions/feishu/node_modules/qs/test/parse.js +86 -0
- package/dist/extensions/feishu/node_modules/qs/test/stringify.js +9 -0
- package/dist/extensions/feishu/node_modules/qs/test/utils.js +31 -3
- package/dist/extensions/feishu/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/dist/extensions/feishu/node_modules/side-channel-list/index.js +1 -3
- package/dist/extensions/feishu/node_modules/side-channel-list/package.json +8 -8
- package/dist/extensions/feishu/node_modules/side-channel-list/test/index.js +50 -0
- package/dist/extensions/feishu/setup-entry.js +1 -1
- package/dist/extensions/slack/node_modules/.package-lock.json +10 -10
- package/dist/extensions/slack/node_modules/axios/CHANGELOG.md +1 -1
- package/dist/extensions/slack/node_modules/axios/README.md +90 -17
- package/dist/extensions/slack/node_modules/axios/dist/axios.js +47 -7
- package/dist/extensions/slack/node_modules/axios/dist/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js +3 -3
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs +56 -8
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js +56 -8
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs +123 -9
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/adapters/http.js +4 -2
- package/dist/extensions/slack/node_modules/axios/lib/core/Axios.js +19 -3
- package/dist/extensions/slack/node_modules/axios/lib/core/AxiosHeaders.js +35 -3
- package/dist/extensions/slack/node_modules/axios/lib/env/data.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/shouldBypassProxy.js +106 -0
- package/dist/extensions/slack/node_modules/axios/package.json +4 -1
- package/dist/extensions/slack/node_modules/qs/CHANGELOG.md +6 -0
- package/dist/extensions/slack/node_modules/qs/dist/qs.js +16 -16
- package/dist/extensions/slack/node_modules/qs/lib/parse.js +2 -2
- package/dist/extensions/slack/node_modules/qs/package.json +3 -3
- package/dist/extensions/slack/node_modules/qs/test/parse.js +86 -0
- package/dist/extensions/slack/node_modules/qs/test/stringify.js +9 -0
- package/dist/extensions/slack/node_modules/qs/test/utils.js +31 -3
- package/dist/extensions/slack/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/dist/extensions/slack/node_modules/side-channel-list/index.js +1 -3
- package/dist/extensions/slack/node_modules/side-channel-list/package.json +8 -8
- package/dist/extensions/slack/node_modules/side-channel-list/test/index.js +50 -0
- package/dist/{feishu-CaswV1Oq.js → feishu-p4QIwtc9.js} +1 -1
- package/dist/{gateway-cli-Du6MIaFO.js → gateway-cli-jjoIZrdZ.js} +1 -1
- package/dist/{gateway-manager-D_f5cQVk.js → gateway-manager-D66ezIC1.js} +2 -6
- package/dist/index.js +1 -1
- package/dist/{onboard-CVHxysXI.js → onboard-bnQMb8SY.js} +1 -1
- package/dist/{onboard-channels-CFM-GqSa.js → onboard-channels-CYyBfLIY.js} +3 -3
- package/dist/{onboard-channels-katsK5NE.js → onboard-channels-aMYUZrDN.js} +1 -1
- package/dist/plugin-sdk/extensions/feishu/src/bot.d.ts +2 -0
- package/dist/plugin-sdk/extensions/feishu/src/real-person-auth.d.ts +14 -0
- package/dist/{program-vgusBOnw.js → program-Xr3NHOnX.js} +2 -2
- package/dist/{prompt-select-styled-BoBpzerB.js → prompt-select-styled-ClRa2a-J.js} +1 -1
- package/dist/{register.agent-WOPQnmT4.js → register.agent-D2oBiVp5.js} +4 -4
- package/dist/{register.configure-Mll-Mq42.js → register.configure-DYLRiwv_.js} +4 -4
- package/dist/{register.maintenance-Rj539JWw.js → register.maintenance-C_px1a87.js} +5 -5
- package/dist/{register.onboard-u9mcSt7t.js → register.onboard-D3kGpBcj.js} +2 -2
- package/dist/{register.setup-CkZS2aXC.js → register.setup-BfTBJ7il.js} +2 -2
- package/dist/{register.subclis-B6HYIWdr.js → register.subclis-Dd2E6UgL.js} +4 -4
- package/dist/{register.subclis-mDzvRQMA.js → register.subclis-pNtiPM8G.js} +1 -1
- package/dist/{run-main-DvmjKiL6.js → run-main-CypZFyVz.js} +7 -7
- package/dist/{setup-BDaeBY6O.js → setup-CLruc3vw.js} +2 -2
- package/dist/{setup.finalize-Bs2AabmP.js → setup.finalize-DUXM1TZ3.js} +4 -4
- package/dist/{update-cli-BgZUMbWl.js → update-cli-8mkYBPsE.js} +5 -5
- package/package.json +1 -1
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1775727523888,"head":"eb993539ed3bdef773db4ffc7adb3e6399a0f57d"}
|
|
@@ -252,9 +252,9 @@ import "./setup-core-CcGzCpOK.js";
|
|
|
252
252
|
import "./shared-x4Yc8-25.js";
|
|
253
253
|
import "./setup-entry-CcHvI1Mu.js";
|
|
254
254
|
import "./reactions-CVOq_v6N.js";
|
|
255
|
-
import "./feishu-
|
|
255
|
+
import "./feishu-p4QIwtc9.js";
|
|
256
256
|
import "./runtime-api-lhuSYASv.js";
|
|
257
|
-
import "./channel-
|
|
257
|
+
import "./channel-Dz1n3akq.js";
|
|
258
258
|
import "./send-C3ijC8Mw.js";
|
|
259
259
|
import "./runtime-p5-el0rU.js";
|
|
260
260
|
import "./setup-core-Bw009yg5.js";
|
|
@@ -303,7 +303,7 @@ import "./agents.config-siTlMqn8.js";
|
|
|
303
303
|
import "./provider-auth-choice-helpers-fXJv3eWi.js";
|
|
304
304
|
import "./provider-auth-guidance-DXgeysMX.js";
|
|
305
305
|
import "./config-validation-9iWWSktF.js";
|
|
306
|
-
import { t as agentsListCommand } from "./agents-
|
|
306
|
+
import { t as agentsListCommand } from "./agents-BdtFdlIN.js";
|
|
307
307
|
import "./provider-auth-choices-D3uPSLCc.js";
|
|
308
308
|
import "./provider-wizard-D8q7vx9b.js";
|
|
309
309
|
import "./auth-choice-options-DGRXgwnh.js";
|
|
@@ -312,5 +312,5 @@ import "./provider-auth-choice-B6Vf-54o.js";
|
|
|
312
312
|
import "./auth-choice.apply-helpers-DnZSQbUl.js";
|
|
313
313
|
import "./provider-auth-choice-preference-MiQguMwm.js";
|
|
314
314
|
import "./auth-choice-DdOY5kEs.js";
|
|
315
|
-
import "./onboard-channels-
|
|
315
|
+
import "./onboard-channels-aMYUZrDN.js";
|
|
316
316
|
export { agentsListCommand };
|
|
@@ -20,7 +20,7 @@ import { i as loadAgentIdentity, n as buildAgentSummaries, o as pruneAgentConfig
|
|
|
20
20
|
import { a as parseBindingSpecs, i as describeBinding, n as applyAgentBindings, o as removeAgentBindings, r as buildChannelBindings, t as requireValidConfigSnapshot } from "./config-validation-9iWWSktF.js";
|
|
21
21
|
import { t as promptAuthChoiceGrouped } from "./auth-choice-prompt-Bkr-WsTr.js";
|
|
22
22
|
import { n as applyAuthChoice, t as warnIfModelConfigLooksOff } from "./auth-choice-DdOY5kEs.js";
|
|
23
|
-
import { i as setupChannels } from "./onboard-channels-
|
|
23
|
+
import { i as setupChannels } from "./onboard-channels-aMYUZrDN.js";
|
|
24
24
|
import path from "node:path";
|
|
25
25
|
import fs from "node:fs/promises";
|
|
26
26
|
//#region src/commands/agents.command-shared.ts
|
package/dist/build-info.json
CHANGED
|
@@ -33,7 +33,9 @@ import { A as listFeishuDirectoryPeers, C as sendMediaFeishu, E as getFeishuRunt
|
|
|
33
33
|
import fs from "node:fs";
|
|
34
34
|
import path from "node:path";
|
|
35
35
|
import os from "node:os";
|
|
36
|
+
import fs$1 from "node:fs/promises";
|
|
36
37
|
import crypto from "node:crypto";
|
|
38
|
+
import { config } from "dotenv";
|
|
37
39
|
import { z as z$2 } from "zod";
|
|
38
40
|
import * as http from "http";
|
|
39
41
|
import * as crypto$1 from "crypto";
|
|
@@ -904,8 +906,196 @@ function resolveFeishuReplyPolicy(params) {
|
|
|
904
906
|
}
|
|
905
907
|
//#endregion
|
|
906
908
|
//#region extensions/feishu/src/real-person-auth.ts
|
|
909
|
+
const REAL_PERSON_AUTH_API_BASE_URL = "https://cclawd.dbhl.cn";
|
|
910
|
+
const REAL_PERSON_AUTH_H5_BASE_URL = "https://h5.dabby.com.cn";
|
|
911
|
+
const MFA_AUTH_API_KEY = "MFA_AUTH_API_KEY";
|
|
912
|
+
const REAL_PERSON_AUTH_REQUEST_TIMEOUT_MS = 12e3;
|
|
913
|
+
function getResponseMessage(payload, fallback) {
|
|
914
|
+
if (typeof payload.data?.message === "string" && payload.data.message.trim()) return payload.data.message;
|
|
915
|
+
if (typeof payload.message === "string" && payload.message.trim()) return payload.message;
|
|
916
|
+
if (typeof payload.msg === "string" && payload.msg.trim()) return payload.msg;
|
|
917
|
+
return fallback;
|
|
918
|
+
}
|
|
919
|
+
async function parseJsonResponse(response, fallbackMessage) {
|
|
920
|
+
let payload = {};
|
|
921
|
+
try {
|
|
922
|
+
payload = await response.json();
|
|
923
|
+
} catch {
|
|
924
|
+
if (!response.ok) throw new Error(`${fallbackMessage}: ${response.status} ${response.statusText}`);
|
|
925
|
+
return {};
|
|
926
|
+
}
|
|
927
|
+
if (!response.ok) throw new Error(getResponseMessage(payload, `${fallbackMessage}: ${response.status} ${response.statusText}`));
|
|
928
|
+
return payload;
|
|
929
|
+
}
|
|
930
|
+
async function requestJson(input, init, fallbackMessage) {
|
|
931
|
+
const controller = new AbortController();
|
|
932
|
+
const timeout = setTimeout(() => controller.abort(), REAL_PERSON_AUTH_REQUEST_TIMEOUT_MS);
|
|
933
|
+
try {
|
|
934
|
+
return await parseJsonResponse(await fetch(input, {
|
|
935
|
+
...init,
|
|
936
|
+
signal: controller.signal
|
|
937
|
+
}), fallbackMessage);
|
|
938
|
+
} catch (err) {
|
|
939
|
+
if (err?.name === "AbortError") throw new Error(`${fallbackMessage}: request timed out after ${REAL_PERSON_AUTH_REQUEST_TIMEOUT_MS}ms`);
|
|
940
|
+
throw err;
|
|
941
|
+
} finally {
|
|
942
|
+
clearTimeout(timeout);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
async function getVerifyCode(apiKey) {
|
|
946
|
+
const trimmedApiKey = apiKey.trim();
|
|
947
|
+
if (!trimmedApiKey) throw new Error("MFA_AUTH_API_KEY is required");
|
|
948
|
+
const payload = await requestJson(new URL("/api/v1/getVerifyCode", REAL_PERSON_AUTH_API_BASE_URL), {
|
|
949
|
+
method: "POST",
|
|
950
|
+
headers: { "Content-Type": "application/json" },
|
|
951
|
+
body: JSON.stringify({
|
|
952
|
+
apiKey: trimmedApiKey,
|
|
953
|
+
authType: "ScanAuth",
|
|
954
|
+
mode: "66"
|
|
955
|
+
})
|
|
956
|
+
}, "Failed to create verification QR code");
|
|
957
|
+
const certToken = typeof payload.data?.certToken === "string" ? payload.data.certToken : "";
|
|
958
|
+
const qrCodeUrl = typeof payload.data?.qrCodeUrl === "string" ? payload.data.qrCodeUrl : "";
|
|
959
|
+
if (!certToken || !qrCodeUrl) throw new Error(getResponseMessage(payload, "Verification QR code response was incomplete"));
|
|
960
|
+
return {
|
|
961
|
+
certToken,
|
|
962
|
+
qrCodeUrl
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
async function checkAuthStatus(apiKey, certToken) {
|
|
966
|
+
const trimmedApiKey = apiKey.trim();
|
|
967
|
+
const trimmedCertToken = certToken.trim();
|
|
968
|
+
if (!trimmedApiKey) throw new Error("MFA_AUTH_API_KEY is required");
|
|
969
|
+
if (!trimmedCertToken) throw new Error("certToken is required");
|
|
970
|
+
const payload = await requestJson(new URL("/api/v1/checkAuthStatus", REAL_PERSON_AUTH_API_BASE_URL), {
|
|
971
|
+
method: "POST",
|
|
972
|
+
headers: { "Content-Type": "application/json" },
|
|
973
|
+
body: JSON.stringify({
|
|
974
|
+
apiKey: trimmedApiKey,
|
|
975
|
+
certToken: trimmedCertToken
|
|
976
|
+
})
|
|
977
|
+
}, "Failed to check verification status");
|
|
978
|
+
if (payload.data?.authSuccess === true) return "success";
|
|
979
|
+
if (payload.retCode === 4401) return "pending";
|
|
980
|
+
return "failed";
|
|
981
|
+
}
|
|
982
|
+
function resolveRealPersonAuthStorePath() {
|
|
983
|
+
return path.join(os.homedir(), ".openclaw", "cclawd-guard", "feishu-real-person-auth.json");
|
|
984
|
+
}
|
|
985
|
+
async function readRealPersonAuthStore(authFilePath, error) {
|
|
986
|
+
try {
|
|
987
|
+
const content = await fs$1.readFile(authFilePath, "utf-8");
|
|
988
|
+
return JSON.parse(content);
|
|
989
|
+
} catch (err) {
|
|
990
|
+
if (err.code === "ENOENT") {
|
|
991
|
+
await fs$1.mkdir(path.dirname(authFilePath), { recursive: true });
|
|
992
|
+
await fs$1.writeFile(authFilePath, "{}", "utf-8");
|
|
993
|
+
return {};
|
|
994
|
+
}
|
|
995
|
+
error(`Failed to read auth file: ${err.message}`, err);
|
|
996
|
+
return {};
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
async function writeRealPersonAuthStore(authFilePath, data) {
|
|
1000
|
+
await fs$1.writeFile(authFilePath, JSON.stringify(data, null, 2), "utf-8");
|
|
1001
|
+
}
|
|
1002
|
+
function resolveMfaApiKey(log, error) {
|
|
1003
|
+
config({ path: path.join(os.homedir(), ".openclaw", ".env") });
|
|
1004
|
+
const apiKey = process.env[MFA_AUTH_API_KEY];
|
|
1005
|
+
log(`[real-person-auth] MFA_AUTH_API_KEY exists: ${!!apiKey}`);
|
|
1006
|
+
if (!apiKey) {
|
|
1007
|
+
error("MFA_AUTH_API_KEY not found in environment variables", void 0);
|
|
1008
|
+
throw new Error("MFA_AUTH_API_KEY not configured");
|
|
1009
|
+
}
|
|
1010
|
+
return apiKey;
|
|
1011
|
+
}
|
|
1012
|
+
function resolveVerificationUrl(certToken) {
|
|
1013
|
+
return `${process.env.DABBY_AUTH_H5_BASE_URL || REAL_PERSON_AUTH_H5_BASE_URL}/authhtml/index.html#/auth?certToken=${certToken}&fromSource=Cclawd`;
|
|
1014
|
+
}
|
|
1015
|
+
async function checkFeishuRealPersonAuthStatus(params) {
|
|
1016
|
+
const authFilePath = resolveRealPersonAuthStorePath();
|
|
1017
|
+
const authData = await readRealPersonAuthStore(authFilePath, params.error);
|
|
1018
|
+
const userAuth = authData[params.senderId];
|
|
1019
|
+
if (!userAuth) return { status: "missing" };
|
|
1020
|
+
if (userAuth.authenticated) return { status: "success" };
|
|
1021
|
+
const certToken = userAuth.certToken?.trim() ?? "";
|
|
1022
|
+
if (!certToken) return { status: "missing" };
|
|
1023
|
+
const apiKey = resolveMfaApiKey(params.log, params.error);
|
|
1024
|
+
params.log(`[real-person-auth] checking auth status for certToken: ${certToken.slice(0, 8)}...`);
|
|
1025
|
+
const status = await checkAuthStatus(apiKey, certToken);
|
|
1026
|
+
params.log(`[real-person-auth] auth status: ${status}`);
|
|
1027
|
+
if (status === "success") {
|
|
1028
|
+
authData[params.senderId] = {
|
|
1029
|
+
authenticated: true,
|
|
1030
|
+
certToken,
|
|
1031
|
+
successNotified: true
|
|
1032
|
+
};
|
|
1033
|
+
await writeRealPersonAuthStore(authFilePath, authData);
|
|
1034
|
+
return { status: "success" };
|
|
1035
|
+
}
|
|
1036
|
+
if (status === "pending") return {
|
|
1037
|
+
status: "pending",
|
|
1038
|
+
verificationUrl: resolveVerificationUrl(certToken),
|
|
1039
|
+
certToken
|
|
1040
|
+
};
|
|
1041
|
+
return { status: "failed" };
|
|
1042
|
+
}
|
|
907
1043
|
async function resolveFeishuRealPersonAuthGate(params) {
|
|
908
|
-
|
|
1044
|
+
try {
|
|
1045
|
+
const authFilePath = resolveRealPersonAuthStorePath();
|
|
1046
|
+
const authData = await readRealPersonAuthStore(authFilePath, params.error);
|
|
1047
|
+
const apiKey = resolveMfaApiKey(params.log, params.error);
|
|
1048
|
+
const authH5BaseUrl = process.env.DABBY_AUTH_H5_BASE_URL || REAL_PERSON_AUTH_H5_BASE_URL;
|
|
1049
|
+
params.log(`[real-person-auth] authH5BaseUrl: ${authH5BaseUrl}`);
|
|
1050
|
+
const userAuth = authData[params.senderId];
|
|
1051
|
+
if (userAuth?.authenticated) {
|
|
1052
|
+
if (!userAuth.successNotified) {
|
|
1053
|
+
authData[params.senderId] = {
|
|
1054
|
+
...userAuth,
|
|
1055
|
+
successNotified: true
|
|
1056
|
+
};
|
|
1057
|
+
await writeRealPersonAuthStore(authFilePath, authData);
|
|
1058
|
+
return { action: "allow-with-success" };
|
|
1059
|
+
}
|
|
1060
|
+
return { action: "allow" };
|
|
1061
|
+
}
|
|
1062
|
+
if (userAuth?.certToken) {
|
|
1063
|
+
params.log(`[real-person-auth] checking auth status for certToken: ${userAuth.certToken.slice(0, 8)}...`);
|
|
1064
|
+
const status = await checkAuthStatus(apiKey, userAuth.certToken);
|
|
1065
|
+
params.log(`[real-person-auth] auth status: ${status}`);
|
|
1066
|
+
if (status === "success") {
|
|
1067
|
+
authData[params.senderId] = {
|
|
1068
|
+
authenticated: true,
|
|
1069
|
+
certToken: userAuth.certToken,
|
|
1070
|
+
successNotified: true
|
|
1071
|
+
};
|
|
1072
|
+
await writeRealPersonAuthStore(authFilePath, authData);
|
|
1073
|
+
return { action: "allow-with-success" };
|
|
1074
|
+
}
|
|
1075
|
+
if (status === "pending") return {
|
|
1076
|
+
action: "block",
|
|
1077
|
+
verificationUrl: `${authH5BaseUrl}/authhtml/index.html#/auth?certToken=${userAuth.certToken}&fromSource=Cclawd`,
|
|
1078
|
+
certToken: userAuth.certToken
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
params.log("[real-person-auth] calling getVerifyCode API...");
|
|
1082
|
+
const { certToken } = await getVerifyCode(apiKey);
|
|
1083
|
+
params.log(`[real-person-auth] got certToken: ${certToken.slice(0, 8)}...`);
|
|
1084
|
+
authData[params.senderId] = {
|
|
1085
|
+
authenticated: false,
|
|
1086
|
+
certToken,
|
|
1087
|
+
successNotified: false
|
|
1088
|
+
};
|
|
1089
|
+
await writeRealPersonAuthStore(authFilePath, authData);
|
|
1090
|
+
return {
|
|
1091
|
+
action: "block",
|
|
1092
|
+
verificationUrl: `${authH5BaseUrl}/authhtml/index.html#/auth?certToken=${certToken}&fromSource=Cclawd`,
|
|
1093
|
+
certToken
|
|
1094
|
+
};
|
|
1095
|
+
} catch (err) {
|
|
1096
|
+
params.error(`resolveFeishuRealPersonAuthGate error: ${err.message}`, err);
|
|
1097
|
+
throw err;
|
|
1098
|
+
}
|
|
909
1099
|
}
|
|
910
1100
|
//#endregion
|
|
911
1101
|
//#region extensions/feishu/src/streaming-card.ts
|
|
@@ -1667,6 +1857,18 @@ function createFeishuReplyDispatcher(params) {
|
|
|
1667
1857
|
//#region extensions/feishu/src/bot.ts
|
|
1668
1858
|
const permissionErrorNotifiedAt = /* @__PURE__ */ new Map();
|
|
1669
1859
|
const PERMISSION_ERROR_COOLDOWN_MS = 300 * 1e3;
|
|
1860
|
+
const REAL_PERSON_AUTH_POLL_INTERVAL_MS = 2e3;
|
|
1861
|
+
const REAL_PERSON_AUTH_POLL_TIMEOUT_MS = 300 * 1e3;
|
|
1862
|
+
const pendingAuthReplayByKey = /* @__PURE__ */ new Map();
|
|
1863
|
+
const activeAuthPollByKey = /* @__PURE__ */ new Map();
|
|
1864
|
+
function buildAuthReplayKey(accountId, senderId) {
|
|
1865
|
+
return `${accountId}:${senderId}`;
|
|
1866
|
+
}
|
|
1867
|
+
function sleep(ms) {
|
|
1868
|
+
return new Promise((resolve) => {
|
|
1869
|
+
setTimeout(resolve, ms);
|
|
1870
|
+
});
|
|
1871
|
+
}
|
|
1670
1872
|
function resolveBroadcastAgents(cfg, peerId) {
|
|
1671
1873
|
const broadcast = cfg.broadcast;
|
|
1672
1874
|
if (!broadcast || typeof broadcast !== "object") return null;
|
|
@@ -1733,7 +1935,7 @@ function buildFeishuAgentBody(params) {
|
|
|
1733
1935
|
return messageBody;
|
|
1734
1936
|
}
|
|
1735
1937
|
async function handleFeishuMessage(params) {
|
|
1736
|
-
const { cfg, event, botOpenId, botName, runtime, chatHistories, accountId, processingClaimHeld = false } = params;
|
|
1938
|
+
const { cfg, event, botOpenId, botName, runtime, chatHistories, accountId, processingClaimHeld = false, skipDedupe = false, skipRealPersonAuth = false } = params;
|
|
1737
1939
|
const account = resolveFeishuAccount({
|
|
1738
1940
|
cfg,
|
|
1739
1941
|
accountId
|
|
@@ -1742,14 +1944,16 @@ async function handleFeishuMessage(params) {
|
|
|
1742
1944
|
const log = runtime?.log ?? console.log;
|
|
1743
1945
|
const error = runtime?.error ?? console.error;
|
|
1744
1946
|
const messageId = event.message.message_id;
|
|
1745
|
-
if (!
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1947
|
+
if (!skipDedupe) {
|
|
1948
|
+
if (!await finalizeFeishuMessageProcessing({
|
|
1949
|
+
messageId,
|
|
1950
|
+
namespace: account.accountId,
|
|
1951
|
+
log,
|
|
1952
|
+
claimHeld: processingClaimHeld
|
|
1953
|
+
})) {
|
|
1954
|
+
log(`feishu: skipping duplicate message ${messageId}`);
|
|
1955
|
+
return;
|
|
1956
|
+
}
|
|
1753
1957
|
}
|
|
1754
1958
|
let ctx = parseFeishuMessageEvent(event, botOpenId, botName);
|
|
1755
1959
|
const isGroup = ctx.chatType === "group";
|
|
@@ -1776,7 +1980,10 @@ async function handleFeishuMessage(params) {
|
|
|
1776
1980
|
accountId: account.accountId
|
|
1777
1981
|
});
|
|
1778
1982
|
};
|
|
1779
|
-
|
|
1983
|
+
const requiresRealPersonAuth = !skipRealPersonAuth && (ctx.chatType === "p2p" || ctx.chatType === "private") && senderIdForAuth && senderIdForAuth !== botOpenId;
|
|
1984
|
+
log(`feishu[${account.accountId}]: auth check - chatType=${ctx.chatType}, senderIdForAuth=${senderIdForAuth}, botOpenId=${botOpenId}, requiresRealPersonAuth=${requiresRealPersonAuth}, hasSender=${!!senderIdForAuth}, notSelf=${senderIdForAuth !== botOpenId}`);
|
|
1985
|
+
if (requiresRealPersonAuth) {
|
|
1986
|
+
log(`feishu[${account.accountId}]: checking real-person auth for ${senderIdForAuth}`);
|
|
1780
1987
|
const gate = await resolveFeishuRealPersonAuthGate({
|
|
1781
1988
|
accountId: account.accountId,
|
|
1782
1989
|
senderId: senderIdForAuth,
|
|
@@ -1784,6 +1991,58 @@ async function handleFeishuMessage(params) {
|
|
|
1784
1991
|
error
|
|
1785
1992
|
});
|
|
1786
1993
|
if (gate.action === "block") {
|
|
1994
|
+
const replayKey = buildAuthReplayKey(account.accountId, senderIdForAuth);
|
|
1995
|
+
pendingAuthReplayByKey.set(replayKey, {
|
|
1996
|
+
cfg,
|
|
1997
|
+
event,
|
|
1998
|
+
botOpenId,
|
|
1999
|
+
botName,
|
|
2000
|
+
runtime,
|
|
2001
|
+
chatHistories,
|
|
2002
|
+
accountId: account.accountId
|
|
2003
|
+
});
|
|
2004
|
+
if (!activeAuthPollByKey.has(replayKey)) {
|
|
2005
|
+
const pollPromise = (async () => {
|
|
2006
|
+
const startedAt = Date.now();
|
|
2007
|
+
while (Date.now() - startedAt < REAL_PERSON_AUTH_POLL_TIMEOUT_MS) {
|
|
2008
|
+
await sleep(REAL_PERSON_AUTH_POLL_INTERVAL_MS);
|
|
2009
|
+
try {
|
|
2010
|
+
const status = await checkFeishuRealPersonAuthStatus({
|
|
2011
|
+
accountId: account.accountId,
|
|
2012
|
+
senderId: senderIdForAuth,
|
|
2013
|
+
log,
|
|
2014
|
+
error
|
|
2015
|
+
});
|
|
2016
|
+
log(`feishu[${account.accountId}]: real-person auth poll status for ${senderIdForAuth}: ${status.status}`);
|
|
2017
|
+
if (status.status === "pending") continue;
|
|
2018
|
+
if (status.status === "success") {
|
|
2019
|
+
const pending = pendingAuthReplayByKey.get(replayKey);
|
|
2020
|
+
pendingAuthReplayByKey.delete(replayKey);
|
|
2021
|
+
if (pending) {
|
|
2022
|
+
await sendAuthSuccess();
|
|
2023
|
+
await handleFeishuMessage({
|
|
2024
|
+
...pending,
|
|
2025
|
+
skipDedupe: true,
|
|
2026
|
+
skipRealPersonAuth: true
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
return;
|
|
2030
|
+
}
|
|
2031
|
+
pendingAuthReplayByKey.delete(replayKey);
|
|
2032
|
+
return;
|
|
2033
|
+
} catch (pollErr) {
|
|
2034
|
+
log(`feishu[${account.accountId}]: real-person auth poll retry for ${senderIdForAuth} after error: ${pollErr instanceof Error ? pollErr.message : String(pollErr)}`);
|
|
2035
|
+
error(`feishu[${account.accountId}]: real-person auth polling failed for ${senderIdForAuth}`, pollErr);
|
|
2036
|
+
continue;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
log(`feishu[${account.accountId}]: real-person auth poll timeout for ${senderIdForAuth}; keeping gate pending`);
|
|
2040
|
+
pendingAuthReplayByKey.delete(replayKey);
|
|
2041
|
+
})().finally(() => {
|
|
2042
|
+
activeAuthPollByKey.delete(replayKey);
|
|
2043
|
+
});
|
|
2044
|
+
activeAuthPollByKey.set(replayKey, pollPromise);
|
|
2045
|
+
}
|
|
1787
2046
|
await sendAuthPrompt(gate.verificationUrl);
|
|
1788
2047
|
return;
|
|
1789
2048
|
}
|
|
@@ -255,9 +255,9 @@ import "./setup-core-CcGzCpOK.js";
|
|
|
255
255
|
import "./shared-x4Yc8-25.js";
|
|
256
256
|
import "./setup-entry-CcHvI1Mu.js";
|
|
257
257
|
import "./reactions-CVOq_v6N.js";
|
|
258
|
-
import "./feishu-
|
|
258
|
+
import "./feishu-p4QIwtc9.js";
|
|
259
259
|
import "./runtime-api-lhuSYASv.js";
|
|
260
|
-
import "./channel-
|
|
260
|
+
import "./channel-Dz1n3akq.js";
|
|
261
261
|
import "./send-C3ijC8Mw.js";
|
|
262
262
|
import "./runtime-p5-el0rU.js";
|
|
263
263
|
import "./setup-core-Bw009yg5.js";
|
|
@@ -307,7 +307,7 @@ import { n as buildReadOnlySourceChannelAccountSnapshot, t as buildChannelAccoun
|
|
|
307
307
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-D1LfcYYR.js";
|
|
308
308
|
import { t as parseLogLine } from "./parse-log-line-fV0tN7JU.js";
|
|
309
309
|
import { i as describeBinding, n as applyAgentBindings, t as requireValidConfigSnapshot } from "./config-validation-9iWWSktF.js";
|
|
310
|
-
import { a as isCatalogChannelInstalled, r as runCollectedChannelOnboardingPostWriteHooks, t as createChannelOnboardingPostWriteHookCollector } from "./onboard-channels-
|
|
310
|
+
import { a as isCatalogChannelInstalled, r as runCollectedChannelOnboardingPostWriteHooks, t as createChannelOnboardingPostWriteHookCollector } from "./onboard-channels-aMYUZrDN.js";
|
|
311
311
|
import fs from "node:fs/promises";
|
|
312
312
|
//#region src/commands/channels/add-mutators.ts
|
|
313
313
|
function applyAccountName(params) {
|
|
@@ -377,7 +377,7 @@ async function channelsAddCommand(opts, runtime = defaultRuntime, params) {
|
|
|
377
377
|
if (!cfg) return;
|
|
378
378
|
let nextConfig = cfg;
|
|
379
379
|
if (shouldUseWizard(params)) {
|
|
380
|
-
const [{ buildAgentSummaries }, { setupChannels }] = await Promise.all([import("./agents.config-Nk87RmV3.js"), import("./onboard-channels-
|
|
380
|
+
const [{ buildAgentSummaries }, { setupChannels }] = await Promise.all([import("./agents.config-Nk87RmV3.js"), import("./onboard-channels-CYyBfLIY.js")]);
|
|
381
381
|
const prompter = createClackPrompter();
|
|
382
382
|
const postWriteHooks = createChannelOnboardingPostWriteHookCollector();
|
|
383
383
|
let selection = [];
|
|
@@ -365,25 +365,25 @@ function registerChannelsCli(program) {
|
|
|
365
365
|
])}\n\n${theme.muted("Docs:")} ${formatDocsLink("/cli/channels", "docs.openclaw.ai/cli/channels")}\n`);
|
|
366
366
|
channels.command("list").description("List configured channels + auth profiles").option("--no-usage", "Skip model provider usage/quota snapshots").option("--json", "Output JSON", false).action(async (opts) => {
|
|
367
367
|
await runChannelsCommand(async () => {
|
|
368
|
-
const { channelsListCommand } = await import("./channels-
|
|
368
|
+
const { channelsListCommand } = await import("./channels-Bt0w3hbW.js");
|
|
369
369
|
await channelsListCommand(opts, defaultRuntime);
|
|
370
370
|
});
|
|
371
371
|
});
|
|
372
372
|
channels.command("status").description("Show gateway channel status (use status --deep for local)").option("--probe", "Probe channel credentials", false).option("--timeout <ms>", "Timeout in ms", "10000").option("--json", "Output JSON", false).action(async (opts) => {
|
|
373
373
|
await runChannelsCommand(async () => {
|
|
374
|
-
const { channelsStatusCommand } = await import("./channels-
|
|
374
|
+
const { channelsStatusCommand } = await import("./channels-Bt0w3hbW.js");
|
|
375
375
|
await channelsStatusCommand(opts, defaultRuntime);
|
|
376
376
|
});
|
|
377
377
|
});
|
|
378
378
|
channels.command("capabilities").description("Show provider capabilities (intents/scopes + supported features)").option("--channel <name>", `Channel (${formatCliChannelOptions(["all"])})`).option("--account <id>", "Account id (only with --channel)").option("--target <dest>", "Channel target for permission audit (Discord channel:<id>)").option("--timeout <ms>", "Timeout in ms", "10000").option("--json", "Output JSON", false).action(async (opts) => {
|
|
379
379
|
await runChannelsCommand(async () => {
|
|
380
|
-
const { channelsCapabilitiesCommand } = await import("./channels-
|
|
380
|
+
const { channelsCapabilitiesCommand } = await import("./channels-Bt0w3hbW.js");
|
|
381
381
|
await channelsCapabilitiesCommand(opts, defaultRuntime);
|
|
382
382
|
});
|
|
383
383
|
});
|
|
384
384
|
channels.command("resolve").description("Resolve channel/user names to IDs").argument("<entries...>", "Entries to resolve (names or ids)").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (accountId)").option("--kind <kind>", "Target kind (auto|user|group)", "auto").option("--json", "Output JSON", false).action(async (entries, opts) => {
|
|
385
385
|
await runChannelsCommand(async () => {
|
|
386
|
-
const { channelsResolveCommand } = await import("./channels-
|
|
386
|
+
const { channelsResolveCommand } = await import("./channels-Bt0w3hbW.js");
|
|
387
387
|
await channelsResolveCommand({
|
|
388
388
|
channel: opts.channel,
|
|
389
389
|
account: opts.account,
|
|
@@ -395,19 +395,19 @@ function registerChannelsCli(program) {
|
|
|
395
395
|
});
|
|
396
396
|
channels.command("logs").description("Show recent channel logs from the gateway log file").option("--channel <name>", `Channel (${formatCliChannelOptions(["all"])})`, "all").option("--lines <n>", "Number of lines (default: 200)", "200").option("--json", "Output JSON", false).action(async (opts) => {
|
|
397
397
|
await runChannelsCommand(async () => {
|
|
398
|
-
const { channelsLogsCommand } = await import("./channels-
|
|
398
|
+
const { channelsLogsCommand } = await import("./channels-Bt0w3hbW.js");
|
|
399
399
|
await channelsLogsCommand(opts, defaultRuntime);
|
|
400
400
|
});
|
|
401
401
|
});
|
|
402
402
|
channels.command("add").description("Add or update a channel account").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (default when omitted)").option("--name <name>", "Display name for this account").option("--token <token>", "Bot token (Telegram/Discord)").option("--private-key <key>", "Nostr private key (nsec... or hex)").option("--token-file <path>", "Bot token file (Telegram)").option("--bot-token <token>", "Slack bot token (xoxb-...)").option("--app-token <token>", "Slack app token (xapp-...)").option("--signal-number <e164>", "Signal account number (E.164)").option("--cli-path <path>", "CLI path (signal-cli or imsg)").option("--db-path <path>", "iMessage database path").option("--service <service>", "iMessage service (imessage|sms|auto)").option("--region <region>", "iMessage region (for SMS)").option("--auth-dir <path>", "WhatsApp auth directory override").option("--http-url <url>", "Signal HTTP daemon base URL").option("--http-host <host>", "Signal HTTP host").option("--http-port <port>", "Signal HTTP port").option("--webhook-path <path>", "Webhook path (Google Chat/BlueBubbles)").option("--webhook-url <url>", "Google Chat webhook URL").option("--audience-type <type>", "Google Chat audience type (app-url|project-number)").option("--audience <value>", "Google Chat audience value (app URL or project number)").option("--homeserver <url>", "Matrix homeserver URL").option("--user-id <id>", "Matrix user ID").option("--access-token <token>", "Matrix access token").option("--password <password>", "Matrix password").option("--device-name <name>", "Matrix device name").option("--initial-sync-limit <n>", "Matrix initial sync limit").option("--ship <ship>", "Tlon ship name (~sampel-palnet)").option("--url <url>", "Tlon ship URL").option("--relay-urls <list>", "Nostr relay URLs (comma-separated)").option("--code <code>", "Tlon login code").option("--group-channels <list>", "Tlon group channels (comma-separated)").option("--dm-allowlist <list>", "Tlon DM allowlist (comma-separated ships)").option("--auto-discover-channels", "Tlon auto-discover group channels").option("--no-auto-discover-channels", "Disable Tlon auto-discovery").option("--use-env", "Use env token (default account only)", false).action(async (opts, command) => {
|
|
403
403
|
await runChannelsCommand(async () => {
|
|
404
|
-
const { channelsAddCommand } = await import("./channels-
|
|
404
|
+
const { channelsAddCommand } = await import("./channels-Bt0w3hbW.js");
|
|
405
405
|
await channelsAddCommand(opts, defaultRuntime, { hasFlags: hasExplicitOptions(command, optionNamesAdd) });
|
|
406
406
|
});
|
|
407
407
|
});
|
|
408
408
|
channels.command("remove").description("Disable or delete a channel account").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (default when omitted)").option("--delete", "Delete config entries (no prompt)", false).action(async (opts, command) => {
|
|
409
409
|
await runChannelsCommand(async () => {
|
|
410
|
-
const { channelsRemoveCommand } = await import("./channels-
|
|
410
|
+
const { channelsRemoveCommand } = await import("./channels-Bt0w3hbW.js");
|
|
411
411
|
await channelsRemoveCommand(opts, defaultRuntime, { hasFlags: hasExplicitOptions(command, optionNamesRemove) });
|
|
412
412
|
});
|
|
413
413
|
});
|
|
@@ -7,7 +7,7 @@ import "./subsystem-DISldKSB.js";
|
|
|
7
7
|
import "./ansi-BEJF8NKS.js";
|
|
8
8
|
import "./boolean-C3GkJetE.js";
|
|
9
9
|
import "./env-Dnra1IpT.js";
|
|
10
|
-
import "./register.subclis-
|
|
10
|
+
import "./register.subclis-Dd2E6UgL.js";
|
|
11
11
|
import "./core-command-descriptors-CCqK_2TG.js";
|
|
12
|
-
import { n as registerCoreCliByName } from "./command-registry-
|
|
12
|
+
import { n as registerCoreCliByName } from "./command-registry-maV_byWv.js";
|
|
13
13
|
export { registerCoreCliByName };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as getPrimaryCommand, k as hasHelpOrVersion } from "./logger-kwZIqwuw.js";
|
|
2
|
-
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-
|
|
2
|
+
import { a as removeCommandByName, i as registerSubCliCommands, o as reparseProgramFromActionArgs } from "./register.subclis-Dd2E6UgL.js";
|
|
3
3
|
import { t as getCoreCliCommandDescriptors } from "./core-command-descriptors-CCqK_2TG.js";
|
|
4
4
|
//#region src/cli/program/command-registry.ts
|
|
5
5
|
const shouldRegisterCorePrimaryOnly = (argv) => {
|
|
@@ -14,7 +14,7 @@ const coreEntries = [
|
|
|
14
14
|
hasSubcommands: false
|
|
15
15
|
}],
|
|
16
16
|
register: async ({ program }) => {
|
|
17
|
-
(await import("./register.setup-
|
|
17
|
+
(await import("./register.setup-BfTBJ7il.js")).registerSetupCommand(program);
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -24,7 +24,7 @@ const coreEntries = [
|
|
|
24
24
|
hasSubcommands: false
|
|
25
25
|
}],
|
|
26
26
|
register: async ({ program }) => {
|
|
27
|
-
(await import("./register.onboard-
|
|
27
|
+
(await import("./register.onboard-D3kGpBcj.js")).registerOnboardCommand(program);
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
{
|
|
@@ -34,7 +34,7 @@ const coreEntries = [
|
|
|
34
34
|
hasSubcommands: false
|
|
35
35
|
}],
|
|
36
36
|
register: async ({ program }) => {
|
|
37
|
-
(await import("./register.configure-
|
|
37
|
+
(await import("./register.configure-DYLRiwv_.js")).registerConfigureCommand(program);
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -44,7 +44,7 @@ const coreEntries = [
|
|
|
44
44
|
hasSubcommands: true
|
|
45
45
|
}],
|
|
46
46
|
register: async ({ program }) => {
|
|
47
|
-
(await import("./config-cli-
|
|
47
|
+
(await import("./config-cli-CkDay3qv.js")).registerConfigCli(program);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -81,7 +81,7 @@ const coreEntries = [
|
|
|
81
81
|
}
|
|
82
82
|
],
|
|
83
83
|
register: async ({ program }) => {
|
|
84
|
-
(await import("./register.maintenance-
|
|
84
|
+
(await import("./register.maintenance-C_px1a87.js")).registerMaintenanceCommands(program);
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
{
|
|
@@ -125,7 +125,7 @@ const coreEntries = [
|
|
|
125
125
|
hasSubcommands: true
|
|
126
126
|
}],
|
|
127
127
|
register: async ({ program, ctx }) => {
|
|
128
|
-
(await import("./register.agent-
|
|
128
|
+
(await import("./register.agent-D2oBiVp5.js")).registerAgentCommands(program, { agentChannelOptions: ctx.agentChannelOptions });
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
{
|
|
@@ -3,8 +3,8 @@ import { r as theme } from "./theme-CdOoMzRk.js";
|
|
|
3
3
|
import { c as routeLogsToStderr } from "./subsystem-DISldKSB.js";
|
|
4
4
|
import { h as pathExists } from "./utils-CS0Ikux6.js";
|
|
5
5
|
import { t as formatDocsLink } from "./links-8xRhWBQL.js";
|
|
6
|
-
import { r as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-
|
|
7
|
-
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-
|
|
6
|
+
import { r as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-Dd2E6UgL.js";
|
|
7
|
+
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-maV_byWv.js";
|
|
8
8
|
import { t as getProgramContext } from "./program-context-SgNgozNB.js";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import os from "node:os";
|
|
@@ -9,8 +9,8 @@ import "./boolean-C3GkJetE.js";
|
|
|
9
9
|
import "./env-Dnra1IpT.js";
|
|
10
10
|
import "./utils-CS0Ikux6.js";
|
|
11
11
|
import "./links-8xRhWBQL.js";
|
|
12
|
-
import { a as registerCompletionCli } from "./completion-cli-
|
|
13
|
-
import "./register.subclis-
|
|
14
|
-
import "./command-registry-
|
|
12
|
+
import { a as registerCompletionCli } from "./completion-cli-B7KByNii.js";
|
|
13
|
+
import "./register.subclis-Dd2E6UgL.js";
|
|
14
|
+
import "./command-registry-maV_byWv.js";
|
|
15
15
|
import "./program-context-SgNgozNB.js";
|
|
16
16
|
export { registerCompletionCli };
|
|
@@ -917,7 +917,7 @@ async function runConfigValidate(opts = {}) {
|
|
|
917
917
|
}
|
|
918
918
|
function registerConfigCli(program) {
|
|
919
919
|
const cmd = program.command("config").description("Non-interactive config helpers (get/set/unset/file/validate). Run without subcommand for guided setup.").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/config", "docs.openclaw.ai/cli/config")}\n`).option("--section <section>", "Configuration sections for guided setup (repeatable). Use with no subcommand.", (value, previous) => [...previous, value], []).action(async (opts) => {
|
|
920
|
-
const { configureCommandFromSectionsArg } = await import("./configure-
|
|
920
|
+
const { configureCommandFromSectionsArg } = await import("./configure-Bhpnr3RQ.js");
|
|
921
921
|
await configureCommandFromSectionsArg(opts.section, defaultRuntime);
|
|
922
922
|
});
|
|
923
923
|
cmd.command("get").description("Get a config value by dot path").argument("<path>", "Config path (dot or bracket notation)").option("--json", "Output JSON", false).action(async (path, opts) => {
|
|
@@ -259,9 +259,9 @@ import "./setup-core-CcGzCpOK.js";
|
|
|
259
259
|
import "./shared-x4Yc8-25.js";
|
|
260
260
|
import "./setup-entry-CcHvI1Mu.js";
|
|
261
261
|
import "./reactions-CVOq_v6N.js";
|
|
262
|
-
import "./feishu-
|
|
262
|
+
import "./feishu-p4QIwtc9.js";
|
|
263
263
|
import "./runtime-api-lhuSYASv.js";
|
|
264
|
-
import "./channel-
|
|
264
|
+
import "./channel-Dz1n3akq.js";
|
|
265
265
|
import "./send-C3ijC8Mw.js";
|
|
266
266
|
import "./runtime-p5-el0rU.js";
|
|
267
267
|
import "./setup-core-Bw009yg5.js";
|
|
@@ -324,8 +324,8 @@ import "./provider-auth-choice-B6Vf-54o.js";
|
|
|
324
324
|
import "./auth-choice.apply-helpers-DnZSQbUl.js";
|
|
325
325
|
import "./provider-auth-choice-preference-MiQguMwm.js";
|
|
326
326
|
import "./auth-choice-DdOY5kEs.js";
|
|
327
|
-
import "./onboard-channels-
|
|
328
|
-
import { n as configureCommandFromSectionsArg } from "./configure-
|
|
327
|
+
import "./onboard-channels-aMYUZrDN.js";
|
|
328
|
+
import { n as configureCommandFromSectionsArg } from "./configure-DEgPFToe.js";
|
|
329
329
|
import "./systemd-linger-BasN9UtI.js";
|
|
330
330
|
import "./model-picker-ewbext_V.js";
|
|
331
331
|
import "./onboard-custom-ojsh_yzx.js";
|
|
@@ -29,7 +29,7 @@ import { n as resolveProviderPluginChoice } from "./provider-wizard-D8q7vx9b.js"
|
|
|
29
29
|
import { t as promptAuthChoiceGrouped } from "./auth-choice-prompt-Bkr-WsTr.js";
|
|
30
30
|
import { t as resolvePreferredProviderForAuthChoice } from "./provider-auth-choice-preference-MiQguMwm.js";
|
|
31
31
|
import { n as applyAuthChoice } from "./auth-choice-DdOY5kEs.js";
|
|
32
|
-
import { i as setupChannels, n as noteChannelStatus } from "./onboard-channels-
|
|
32
|
+
import { i as setupChannels, n as noteChannelStatus } from "./onboard-channels-aMYUZrDN.js";
|
|
33
33
|
import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-BasN9UtI.js";
|
|
34
34
|
import { i as promptModelAllowlist, n as applyModelFallbacksFromSelection, r as promptDefaultModel, t as applyModelAllowlist } from "./model-picker-ewbext_V.js";
|
|
35
35
|
import { i as promptCustomApiConfig } from "./onboard-custom-ojsh_yzx.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-ax52pETb.js";
|
|
2
2
|
import { n as resolveCliName } from "./cli-name-CgLQPAaK.js";
|
|
3
3
|
import { t as note } from "./note-CrfOOz26.js";
|
|
4
|
-
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-B7KByNii.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawnSync } from "node:child_process";
|
|
7
7
|
//#region src/commands/doctor-completion.ts
|
package/dist/entry.js
CHANGED
|
@@ -200,7 +200,7 @@ function tryHandleRootHelpFastPath(argv, deps = {}) {
|
|
|
200
200
|
}
|
|
201
201
|
function runMainOrRootHelp(argv) {
|
|
202
202
|
if (tryHandleRootHelpFastPath(argv)) return;
|
|
203
|
-
import("./run-main-
|
|
203
|
+
import("./run-main-CypZFyVz.js").then(({ runCli }) => runCli(argv)).catch((error) => {
|
|
204
204
|
console.error("[openclaw] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
205
205
|
process$1.exitCode = 1;
|
|
206
206
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as openclawHome } from "../../env-CcGPS0ln.js";
|
|
2
|
-
import {
|
|
2
|
+
import { c as loadJsonSync, i as setDashboardPort } from "../../gateway-manager-D66ezIC1.js";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|