cclawd 1.0.7 → 1.0.8
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/{active-listener-DYmI7imH.js → active-listener-Dkhmfuwx.js} +2 -2
- package/dist/{api-key-rotation-DLU4jvSu.js → api-key-rotation-BOfI3cG3.js} +1 -1
- package/dist/{audio-preflight-C9TMbRb4.js → audio-preflight-CtkZ5SAs.js} +15 -15
- package/dist/{audio-transcription-runner-Q5zG_hYd.js → audio-transcription-runner-CbPqoiHX.js} +10 -10
- package/dist/{audit-membership-runtime-DhxSwFnF.js → audit-membership-runtime-hXUuer4x.js} +6 -6
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +35 -35
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +35 -35
- package/dist/{channel-activity-Bx08UTAg.js → channel-activity-DWAER4wd.js} +2 -2
- package/dist/{commands-registry-llLVCTH9.js → commands-registry-BUyiA7nE.js} +2 -2
- package/dist/compact.runtime-DpcZpcTl.js +39 -0
- package/dist/{deliver-DJf2ZBpe.js → deliver-aHOaRbkt.js} +19 -19
- package/dist/deliver-runtime-D4bCsr6d.js +19 -0
- package/dist/deps-send-discord.runtime-BziKU-pE.js +19 -0
- package/dist/deps-send-imessage.runtime-CFRnDTqp.js +18 -0
- package/dist/deps-send-signal.runtime-BuOtABJm.js +17 -0
- package/dist/deps-send-slack.runtime-BOLqvMxW.js +17 -0
- package/dist/deps-send-telegram.runtime-DeEoFLv5.js +20 -0
- package/dist/deps-send-whatsapp.runtime-CG1uXYLY.js +43 -0
- package/dist/{diagnostic-BCCMF3O_.js → diagnostic-BdcXX9iJ.js} +2 -2
- package/dist/{env-aYXLHjfZ.js → env-lw2hsIUY.js} +1 -1
- package/dist/{fetch-bvgIiupu.js → fetch-C0iyt-Iz.js} +3 -3
- package/dist/{fetch-DCTUdr1U.js → fetch-D9NUULbj.js} +5 -5
- package/dist/{fetch-guard-CqpEmMQ2.js → fetch-guard-B5ZMnGaN.js} +2 -2
- package/dist/{frontmatter-DjZuS525.js → frontmatter-C_obXuTp.js} +3 -3
- package/dist/{github-copilot-token-CQmATy5E.js → github-copilot-token-8N63GdbE.js} +7 -7
- package/dist/{image-Q8E1-lZn.js → image-4x07m4Jl.js} +4 -4
- package/dist/image-runtime-smkMrIol.js +12 -0
- package/dist/{ir-CzM3SxId.js → ir-CsgNUpOU.js} +6 -6
- package/dist/llm-slug-generator.js +35 -35
- package/dist/{logger-ChbX1G7s.js → logger-CbUVl62f.js} +7 -7
- package/dist/{login-B0mtU11X.js → login-p_O59TVQ.js} +4 -4
- package/dist/{login-qr-DY_i60f5.js → login-qr-BCJpDsAy.js} +10 -10
- package/dist/{manager-FAQPC0uO.js → manager-CwYv8O3T.js} +12 -12
- package/dist/manager-runtime-D_jEoBr9.js +15 -0
- package/dist/{model-selection-wf3OY5DX.js → model-selection-Cv2Puf5z.js} +122 -122
- package/dist/{outbound-Bw0dOVS7.js → outbound-Chpiwybe.js} +6 -6
- package/dist/{outbound-attachment-1R6r9Pg_.js → outbound-attachment-BnAVJDLe.js} +2 -2
- package/dist/{paths-C0HLtPu0.js → paths-CehYKFsO.js} +7 -7
- package/dist/{paths-hfkBoC7i.js → paths-DkxwiA8g.js} +5 -5
- package/dist/{pi-embedded-BAHaY-Oh.js → pi-embedded-CJVNBk0y.js} +150 -150
- package/dist/pi-model-discovery-7IzK0Uc3.js +131 -0
- package/dist/pi-model-discovery-runtime-DABef3qy.js +12 -0
- package/dist/{pi-tools.before-tool-call.runtime-D_mthvtC.js → pi-tools.before-tool-call.runtime-BP2UvGJb.js} +10 -10
- package/dist/plugin-sdk/active-listener-CN-tMEvN.js +35 -0
- package/dist/plugin-sdk/api-key-rotation-CimGYMBc.js +176 -0
- package/dist/plugin-sdk/audio-preflight-C-xXBoE2.js +51 -0
- package/dist/plugin-sdk/audio-transcription-runner-CTIHpebA.js +2173 -0
- package/dist/plugin-sdk/audit-membership-runtime-BFatB2LJ.js +58 -0
- package/dist/plugin-sdk/channel-activity-DO0FEzyj.js +95 -0
- package/dist/plugin-sdk/channel-web-Da-__nUF.js +2238 -0
- package/dist/plugin-sdk/commands-registry-6no2NNrY.js +1118 -0
- package/dist/plugin-sdk/compact.runtime-CCoclu5e.js +35 -0
- package/dist/plugin-sdk/compat.js +35 -35
- package/dist/plugin-sdk/config-B9ODwgpz.js +37426 -0
- package/dist/plugin-sdk/deliver-B1fFpKjV.js +1757 -0
- package/dist/plugin-sdk/deliver-runtime-DB-VRMe1.js +15 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-DklqycYG.js +15 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-Chs8zeon.js +14 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-clW9aSJP.js +13 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-BUx0LYY1.js +13 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-LECSHgMG.js +16 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-D2d65fw0.js +40 -0
- package/dist/plugin-sdk/diagnostic-CxIvS-C2.js +315 -0
- package/dist/plugin-sdk/dispatch-BqlR4dPx.js +105863 -0
- package/dist/plugin-sdk/env-b9k1PHMI.js +34 -0
- package/dist/plugin-sdk/fetch-PoxzAANT.js +326 -0
- package/dist/plugin-sdk/fetch-guard-4UVSZ0uS.js +164 -0
- package/dist/plugin-sdk/image-Ch6M4tnJ.js +2420 -0
- package/dist/plugin-sdk/image-runtime-CSh2o5wY.js +8 -0
- package/dist/plugin-sdk/ir-CugsqGH8.js +1312 -0
- package/dist/plugin-sdk/local-roots-adnEg9zb.js +217 -0
- package/dist/plugin-sdk/logger-D6zRubj0.js +1164 -0
- package/dist/plugin-sdk/login-CYvkQ0At.js +54 -0
- package/dist/plugin-sdk/login-qr-ll4NtaT5.js +316 -0
- package/dist/plugin-sdk/manager-CHy8IclH.js +3959 -0
- package/dist/plugin-sdk/manager-runtime-C70EkEr7.js +11 -0
- package/dist/plugin-sdk/outbound-Wzs2iN7X.js +216 -0
- package/dist/plugin-sdk/outbound-attachment-khXJwucX.js +17 -0
- package/dist/plugin-sdk/paths-BtVqCdw4.js +3063 -0
- package/dist/{pi-model-discovery-ItS07aJB.js → plugin-sdk/pi-model-discovery-Dh4ziodY.js} +2 -2
- package/dist/plugin-sdk/pi-model-discovery-runtime-b83Xe-HT.js +8 -0
- package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-C1z5CDBF.js +349 -0
- package/dist/{proxy-fetch-c1ZUFFcO.js → plugin-sdk/proxy-fetch-CJEmoBxi.js} +1 -1
- package/dist/plugin-sdk/pw-ai-Dj3Cvlzl.js +1990 -0
- package/dist/plugin-sdk/qmd-manager-egHUAseQ.js +1581 -0
- package/dist/plugin-sdk/resolve-outbound-target-BiICvIKs.js +38 -0
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-DNApufzW.js +9 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-CBmtfIQ8.js +13 -0
- package/dist/plugin-sdk/send-CScblaI4.js +532 -0
- package/dist/plugin-sdk/send-CeHhnld6.js +407 -0
- package/dist/plugin-sdk/send-DP_c8JfR.js +3277 -0
- package/dist/plugin-sdk/send-Dc5fI6e8.js +495 -0
- package/dist/plugin-sdk/send-l-77_s1_.js +2507 -0
- package/dist/plugin-sdk/session-CkOKZaqa.js +166 -0
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/plugin-sdk/skill-commands-BohYCgkq.js +336 -0
- package/dist/plugin-sdk/slash-commands.runtime-DpLfVTM6.js +8 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-CASMHwpm.js +35 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-D7rrJEci.js +9 -0
- package/dist/plugin-sdk/sqlite-CJE3X7Mv.js +1005 -0
- package/dist/plugin-sdk/subagent-registry-runtime-B1oo5bih.js +35 -0
- package/dist/plugin-sdk/tables-D5VgpTmm.js +53 -0
- package/dist/plugin-sdk/target-errors-C6zZ_OpA.js +191 -0
- package/dist/{tokens-BWDIKewp.js → plugin-sdk/tokens-DUnJnpMS.js} +1 -1
- package/dist/plugin-sdk/web-TfUM1nSi.js +39 -0
- package/dist/plugin-sdk/whatsapp-actions-DuWJ0j1r.js +71 -0
- package/dist/proxy-fetch-BOh1PLOW.js +54 -0
- package/dist/{pw-ai-Ok6KGelf.js → pw-ai-DwH5GpEO.js} +9 -9
- package/dist/{qmd-manager-DhfEz4Ar.js → qmd-manager-DEscZz5_.js} +6 -6
- package/dist/{query-expansion-GqNV2iIE.js → query-expansion-BErUY8P2.js} +4 -4
- package/dist/runtime-whatsapp-login.runtime-BI3U306v.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-Bsc2uD09.js +17 -0
- package/dist/{send-DwAoiT2p.js → send-BDnOgWIp.js} +25 -25
- package/dist/{send-CS0ocZHl.js → send-C-Q_WPMf.js} +3 -3
- package/dist/{send-6R8b9zsj.js → send-DUibfNQD.js} +5 -5
- package/dist/{send-DPflcjM5.js → send-DtBvCnPQ.js} +6 -6
- package/dist/{send-CEg4P96c.js → send-ORtn50qg.js} +5 -5
- package/dist/{session-BoIID5UR.js → session-B7imi6T5.js} +7 -7
- package/dist/{skill-commands-DhdiziMs.js → skill-commands-B9brPuiL.js} +9 -9
- package/dist/slash-commands.runtime-Cf6ygfBp.js +12 -0
- package/dist/slash-dispatch.runtime-CsmvhO5K.js +39 -0
- package/dist/slash-skill-commands.runtime-CX7stIEP.js +13 -0
- package/dist/subagent-registry-runtime-B_S1nf7y.js +39 -0
- package/dist/{subsystem-C8z6w6xC.js → subsystem-DfXy5gUB.js} +14 -14
- package/dist/{tables-DQusRhkD.js → tables-CjQqTOdD.js} +1 -1
- package/dist/{target-errors-CfavnC9U.js → target-errors-BZE1mc-W.js} +1 -1
- package/dist/tokens-6ul2IrzG.js +50 -0
- package/dist/{web-CrcrTQ2c.js → web-Cd8yK1Zq.js} +39 -39
- package/dist/{whatsapp-actions-B0u0ZAme.js → whatsapp-actions-CYEzUMBI.js} +15 -15
- package/dist/{workspace-CWDYHR27.js → workspace-DGIcKCCW.js} +20 -20
- package/extensions/cclawd-mfa-auth/README.md +118 -0
- package/extensions/cclawd-mfa-auth/index.ts +382 -0
- package/extensions/cclawd-mfa-auth/openclaw.plugin.json +34 -0
- package/extensions/cclawd-mfa-auth/package.json +27 -0
- package/extensions/cclawd-mfa-auth/src/auth-manager.ts +536 -0
- package/extensions/cclawd-mfa-auth/src/config.ts +82 -0
- package/extensions/cclawd-mfa-auth/src/dabby-client.ts +200 -0
- package/extensions/cclawd-mfa-auth/src/notification-service.ts +417 -0
- package/extensions/cclawd-mfa-auth/src/polling-manager.ts +232 -0
- package/extensions/cclawd-mfa-auth/src/providers/base.ts +25 -0
- package/extensions/cclawd-mfa-auth/src/providers/qr-code.ts +98 -0
- package/extensions/cclawd-mfa-auth/src/sensitive-detector.ts +159 -0
- package/extensions/cclawd-mfa-auth/src/session-resolver.ts +159 -0
- package/extensions/cclawd-mfa-auth/src/types.ts +156 -0
- package/extensions/mfa-auth/index.ts +675 -1028
- package/extensions/mfa-auth/openclaw.plugin.json +1 -1
- package/extensions/mfa-auth/src/notification-service.ts +2 -8
- package/package.json +453 -453
- package/dist/compact.runtime-BEn3giMt.js +0 -39
- package/dist/deliver-runtime-DkQ3XzGv.js +0 -19
- package/dist/deps-send-discord.runtime-BLpqSj6s.js +0 -19
- package/dist/deps-send-imessage.runtime-BFzyYqvR.js +0 -18
- package/dist/deps-send-signal.runtime-DT0TYCy1.js +0 -17
- package/dist/deps-send-slack.runtime-BhaGFfMX.js +0 -17
- package/dist/deps-send-telegram.runtime-B6Cic9NX.js +0 -20
- package/dist/deps-send-whatsapp.runtime-WtEhIq2S.js +0 -43
- package/dist/image-runtime-B1LFYfQ2.js +0 -12
- package/dist/manager-runtime-Da7ME9vS.js +0 -15
- package/dist/pi-model-discovery-runtime-DjM7Z1fx.js +0 -12
- package/dist/runtime-whatsapp-login.runtime-D4BRhQkK.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-DJPpS6g-.js +0 -17
- package/dist/slash-commands.runtime-Cu1lTjV9.js +0 -12
- package/dist/slash-dispatch.runtime-DRVJEF4l.js +0 -39
- package/dist/slash-skill-commands.runtime-C373PJjv.js +0 -13
- package/dist/subagent-registry-runtime-D7hWBo1G.js +0 -39
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cclawd MFA Auth Plugin - Type Definitions
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// ==================== 认证方法类型 ====================
|
|
6
|
+
|
|
7
|
+
export type AuthMethodType = 'qr-code' | 'image-captcha' | 'sms' | 'email';
|
|
8
|
+
|
|
9
|
+
export type AuthStatus = 'pending' | 'scanned' | 'verified' | 'failed' | 'expired';
|
|
10
|
+
|
|
11
|
+
// ==================== 认证会话 ====================
|
|
12
|
+
|
|
13
|
+
export interface AuthSession {
|
|
14
|
+
sessionId: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
authMethod: AuthMethodType;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
originalContext: PendingAuthContext;
|
|
19
|
+
certToken?: string;
|
|
20
|
+
qrCodeUrl?: string;
|
|
21
|
+
expireTimeMs?: number;
|
|
22
|
+
authStatus?: AuthStatus;
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// ==================== 认证触发类型 ====================
|
|
27
|
+
|
|
28
|
+
export type AuthTriggerType = 'first_message' | 'sensitive_operation';
|
|
29
|
+
|
|
30
|
+
// ==================== 待认证上下文 ====================
|
|
31
|
+
|
|
32
|
+
export interface PendingAuthContext {
|
|
33
|
+
sessionKey: string;
|
|
34
|
+
senderId: string;
|
|
35
|
+
commandBody: string;
|
|
36
|
+
channel?: string;
|
|
37
|
+
to?: string;
|
|
38
|
+
accountId?: string;
|
|
39
|
+
threadId?: number;
|
|
40
|
+
toolName: string;
|
|
41
|
+
toolParams: Record<string, unknown>;
|
|
42
|
+
timestamp: number;
|
|
43
|
+
pendingExecutionId?: string;
|
|
44
|
+
triggerType?: AuthTriggerType;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ==================== 配置类型 ====================
|
|
48
|
+
|
|
49
|
+
export interface MfaConfig {
|
|
50
|
+
timeout: number;
|
|
51
|
+
verificationDuration: number;
|
|
52
|
+
domain?: string;
|
|
53
|
+
debug: boolean;
|
|
54
|
+
sensitiveKeywords: string[];
|
|
55
|
+
allowlistUsers: string[];
|
|
56
|
+
enabledAuthMethods: AuthMethodType[];
|
|
57
|
+
defaultAuthMethod: AuthMethodType;
|
|
58
|
+
persistAuthStateDir?: string;
|
|
59
|
+
requireAuthOnSensitiveOperation?: boolean;
|
|
60
|
+
requireAuthOnFirstMessage?: boolean;
|
|
61
|
+
firstMessageAuthDuration?: number;
|
|
62
|
+
gatewayHost?: string;
|
|
63
|
+
enableAuthNotification?: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface DabbyConfig {
|
|
67
|
+
apiKey: string;
|
|
68
|
+
apiBaseUrl: string;
|
|
69
|
+
pollInterval: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ==================== 认证提供者接口 ====================
|
|
73
|
+
|
|
74
|
+
export interface AuthMethodProvider {
|
|
75
|
+
readonly methodType: AuthMethodType;
|
|
76
|
+
readonly name: string;
|
|
77
|
+
readonly description: string;
|
|
78
|
+
|
|
79
|
+
initialize(session: AuthSession): Promise<void>;
|
|
80
|
+
verify(sessionId: string, userInput?: string): Promise<AuthResult>;
|
|
81
|
+
cleanup(sessionId: string): void;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface AuthResult {
|
|
85
|
+
success: boolean;
|
|
86
|
+
error?: string;
|
|
87
|
+
status?: AuthStatus;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ==================== Dabby API 响应类型 ====================
|
|
91
|
+
|
|
92
|
+
export interface DabbyVerifyCodeResponse {
|
|
93
|
+
retCode: number;
|
|
94
|
+
retMessage: string;
|
|
95
|
+
message?: string;
|
|
96
|
+
data: {
|
|
97
|
+
certToken: string;
|
|
98
|
+
qrCodeUrl: string;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface DabbyCheckAuthStatusResponse {
|
|
103
|
+
retCode: number;
|
|
104
|
+
message: string;
|
|
105
|
+
data: {
|
|
106
|
+
authSuccess: boolean;
|
|
107
|
+
authResult: {
|
|
108
|
+
idNum: string;
|
|
109
|
+
fullName: string;
|
|
110
|
+
};
|
|
111
|
+
message: string;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ==================== 轮询管理 ====================
|
|
116
|
+
|
|
117
|
+
export interface PollingTask {
|
|
118
|
+
taskId: string;
|
|
119
|
+
sessionId: string;
|
|
120
|
+
userId: string;
|
|
121
|
+
triggerType: AuthTriggerType;
|
|
122
|
+
startTime: number;
|
|
123
|
+
interval: NodeJS.Timeout;
|
|
124
|
+
context: {
|
|
125
|
+
channel?: string;
|
|
126
|
+
accountId?: string;
|
|
127
|
+
to?: string;
|
|
128
|
+
sessionKey?: string;
|
|
129
|
+
isReauth: boolean;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ==================== 会话解析 ====================
|
|
134
|
+
|
|
135
|
+
export interface ResolvedSession {
|
|
136
|
+
userId: string;
|
|
137
|
+
channel?: string;
|
|
138
|
+
accountId?: string;
|
|
139
|
+
to?: string;
|
|
140
|
+
sessionKey: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ==================== 敏感操作检测 ====================
|
|
144
|
+
|
|
145
|
+
export interface SensitiveCheckResult {
|
|
146
|
+
isSensitive: boolean;
|
|
147
|
+
preview: string;
|
|
148
|
+
matchedKeywords?: string[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// ==================== 通知信息 ====================
|
|
152
|
+
|
|
153
|
+
export interface NotificationInfo {
|
|
154
|
+
triggerType: AuthTriggerType;
|
|
155
|
+
isReauth: boolean;
|
|
156
|
+
}
|