opencode-copilot-account-switcher 0.13.6 → 0.14.0
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/common-settings-actions.d.ts +1 -1
- package/dist/common-settings-actions.js +36 -0
- package/dist/common-settings-store.d.ts +4 -0
- package/dist/common-settings-store.js +26 -0
- package/dist/menu-runtime.js +12 -1
- package/dist/plugin-hooks.d.ts +8 -0
- package/dist/plugin-hooks.js +96 -0
- package/dist/providers/codex-menu-adapter.js +8 -1
- package/dist/providers/copilot-menu-adapter.js +7 -0
- package/dist/store-paths.d.ts +1 -0
- package/dist/store-paths.js +3 -0
- package/dist/ui/menu.d.ts +33 -0
- package/dist/ui/menu.js +85 -0
- package/dist/wechat/bridge.d.ts +69 -0
- package/dist/wechat/bridge.js +180 -0
- package/dist/wechat/broker-client.d.ts +33 -0
- package/dist/wechat/broker-client.js +257 -0
- package/dist/wechat/broker-entry.d.ts +17 -0
- package/dist/wechat/broker-entry.js +182 -0
- package/dist/wechat/broker-launcher.d.ts +27 -0
- package/dist/wechat/broker-launcher.js +191 -0
- package/dist/wechat/broker-server.d.ts +25 -0
- package/dist/wechat/broker-server.js +540 -0
- package/dist/wechat/command-parser.d.ts +7 -0
- package/dist/wechat/command-parser.js +16 -0
- package/dist/wechat/compat/openclaw-guided-smoke.d.ts +178 -0
- package/dist/wechat/compat/openclaw-guided-smoke.js +1133 -0
- package/dist/wechat/compat/openclaw-public-helpers.d.ts +101 -0
- package/dist/wechat/compat/openclaw-public-helpers.js +207 -0
- package/dist/wechat/compat/openclaw-smoke.d.ts +48 -0
- package/dist/wechat/compat/openclaw-smoke.js +100 -0
- package/dist/wechat/compat/slash-guard.d.ts +11 -0
- package/dist/wechat/compat/slash-guard.js +24 -0
- package/dist/wechat/handle.d.ts +8 -0
- package/dist/wechat/handle.js +46 -0
- package/dist/wechat/ipc-auth.d.ts +6 -0
- package/dist/wechat/ipc-auth.js +39 -0
- package/dist/wechat/operator-store.d.ts +8 -0
- package/dist/wechat/operator-store.js +59 -0
- package/dist/wechat/protocol.d.ts +29 -0
- package/dist/wechat/protocol.js +75 -0
- package/dist/wechat/request-store.d.ts +41 -0
- package/dist/wechat/request-store.js +215 -0
- package/dist/wechat/session-digest.d.ts +41 -0
- package/dist/wechat/session-digest.js +134 -0
- package/dist/wechat/state-paths.d.ts +14 -0
- package/dist/wechat/state-paths.js +45 -0
- package/dist/wechat/status-format.d.ts +14 -0
- package/dist/wechat/status-format.js +174 -0
- package/dist/wechat/token-store.d.ts +18 -0
- package/dist/wechat/token-store.js +100 -0
- package/dist/wechat/wechat-status-runtime.d.ts +24 -0
- package/dist/wechat/wechat-status-runtime.js +238 -0
- package/package.json +8 -3
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { type OpenClawWeixinPublicHelpers, type OpenClawWeixinPublicHelpersLoaderOptions, type PublicWeixinMessage } from "./openclaw-public-helpers.js";
|
|
2
|
+
import type { SlashOnlyCommand } from "./slash-guard.js";
|
|
3
|
+
type GuidedSmokeStatus = "running" | "blocked" | "completed";
|
|
4
|
+
type GuidedSmokeConclusion = "known-unknown" | "no-go" | "go";
|
|
5
|
+
type GuidedSmokeSelfTestResult = {
|
|
6
|
+
ok: boolean;
|
|
7
|
+
reason?: string;
|
|
8
|
+
};
|
|
9
|
+
type GuidedSmokeDependencyVersions = {
|
|
10
|
+
"@tencent-weixin/openclaw-weixin": string;
|
|
11
|
+
openclaw: string;
|
|
12
|
+
};
|
|
13
|
+
type GuidedSmokeCheckStatus = "pass" | "fail" | "known-unknown";
|
|
14
|
+
type GuidedSmokeNonSlashAttempt = {
|
|
15
|
+
input?: string;
|
|
16
|
+
inbound?: Record<string, unknown> | null;
|
|
17
|
+
warningReply?: {
|
|
18
|
+
ok?: boolean;
|
|
19
|
+
text?: string;
|
|
20
|
+
messageId?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
} | null;
|
|
23
|
+
persisted?: boolean;
|
|
24
|
+
};
|
|
25
|
+
type SlashCaptureState = {
|
|
26
|
+
getUpdatesBuf?: string;
|
|
27
|
+
pendingMessages?: PublicWeixinMessage[];
|
|
28
|
+
};
|
|
29
|
+
type GuidedPublicHelpers = Pick<OpenClawWeixinPublicHelpers, "entry" | "qrGateway" | "latestAccountState" | "getUpdates" | "sendMessageWeixin">;
|
|
30
|
+
type GuidedPublicHelpersLoader = (options?: OpenClawWeixinPublicHelpersLoaderOptions) => Promise<GuidedPublicHelpers>;
|
|
31
|
+
type GuidedSmokeKeyFieldsCheck = {
|
|
32
|
+
login: {
|
|
33
|
+
status: GuidedSmokeCheckStatus;
|
|
34
|
+
detail?: string;
|
|
35
|
+
};
|
|
36
|
+
getupdates: {
|
|
37
|
+
status: GuidedSmokeCheckStatus;
|
|
38
|
+
detail?: string;
|
|
39
|
+
};
|
|
40
|
+
slashInbound: {
|
|
41
|
+
status: GuidedSmokeCheckStatus;
|
|
42
|
+
detail?: string;
|
|
43
|
+
};
|
|
44
|
+
warningReply: {
|
|
45
|
+
status: GuidedSmokeCheckStatus;
|
|
46
|
+
detail?: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const GUIDED_SMOKE_EVIDENCE_FILES: {
|
|
50
|
+
readonly preflight: "001-preflight.md";
|
|
51
|
+
readonly qrStart: "002-qr-start.md";
|
|
52
|
+
readonly loginSuccess: "003-login-success.md";
|
|
53
|
+
readonly statusCommand: "004-status-command.json";
|
|
54
|
+
readonly replyCommand: "005-reply-command.json";
|
|
55
|
+
readonly allowCommand: "006-allow-command.json";
|
|
56
|
+
};
|
|
57
|
+
export type GuidedSmokeRun = {
|
|
58
|
+
runId: string;
|
|
59
|
+
cwd: string;
|
|
60
|
+
evidenceBaseDir: string;
|
|
61
|
+
evidenceDir: string;
|
|
62
|
+
status: GuidedSmokeStatus;
|
|
63
|
+
conclusion: GuidedSmokeConclusion;
|
|
64
|
+
};
|
|
65
|
+
export type GuidedSmokeResult = {
|
|
66
|
+
runId: string;
|
|
67
|
+
status: GuidedSmokeStatus;
|
|
68
|
+
conclusion: GuidedSmokeConclusion;
|
|
69
|
+
evidenceDir: string;
|
|
70
|
+
reason?: string;
|
|
71
|
+
};
|
|
72
|
+
export type RunGuidedSmokeOptions = {
|
|
73
|
+
runId?: string;
|
|
74
|
+
cwd?: string;
|
|
75
|
+
evidenceBaseDir?: string;
|
|
76
|
+
qrWaitTimeoutMs?: number;
|
|
77
|
+
apiSamplesDocPath?: string;
|
|
78
|
+
goNoGoDocPath?: string;
|
|
79
|
+
loadPublicEntry?: () => Promise<{
|
|
80
|
+
entryRelativePath: string;
|
|
81
|
+
}>;
|
|
82
|
+
runSelfTest?: () => Promise<GuidedSmokeSelfTestResult>;
|
|
83
|
+
runQrLogin?: (input: {
|
|
84
|
+
waitTimeoutMs: number;
|
|
85
|
+
}) => Promise<{
|
|
86
|
+
status: "success" | "timeout";
|
|
87
|
+
connected?: boolean;
|
|
88
|
+
qrPrinted?: boolean;
|
|
89
|
+
qrUrl?: string;
|
|
90
|
+
qrDataUrl?: string;
|
|
91
|
+
} | void>;
|
|
92
|
+
captureSlashInbound?: (command: SlashOnlyCommand) => Promise<Record<string, unknown> | null>;
|
|
93
|
+
runNonSlashVerification?: () => Promise<{
|
|
94
|
+
passed: number;
|
|
95
|
+
total: number;
|
|
96
|
+
failedChecks?: string[];
|
|
97
|
+
attempts?: GuidedSmokeNonSlashAttempt[];
|
|
98
|
+
keyFieldsCheck?: Partial<GuidedSmokeKeyFieldsCheck>;
|
|
99
|
+
} | void>;
|
|
100
|
+
getDependencyVersions?: () => GuidedSmokeDependencyVersions;
|
|
101
|
+
loadOpenClawWeixinPublicHelpers?: GuidedPublicHelpersLoader;
|
|
102
|
+
publicHelpersOptions?: OpenClawWeixinPublicHelpersLoaderOptions;
|
|
103
|
+
slashCaptureWaitTimeoutMs?: number;
|
|
104
|
+
slashCapturePollIntervalMs?: number;
|
|
105
|
+
};
|
|
106
|
+
type PreflightData = {
|
|
107
|
+
runId: string;
|
|
108
|
+
cwd: string;
|
|
109
|
+
nodeVersion: string;
|
|
110
|
+
dependencyVersions: GuidedSmokeDependencyVersions;
|
|
111
|
+
dependencyVersionResolution: {
|
|
112
|
+
status: "pass" | "fail";
|
|
113
|
+
detail: string;
|
|
114
|
+
};
|
|
115
|
+
publicEntryLoad: {
|
|
116
|
+
status: "pass" | "fail";
|
|
117
|
+
detail: string;
|
|
118
|
+
};
|
|
119
|
+
evidenceDirectoryCreation: {
|
|
120
|
+
status: "pass" | "fail";
|
|
121
|
+
detail: string;
|
|
122
|
+
};
|
|
123
|
+
selfTest: {
|
|
124
|
+
status: "pass" | "fail";
|
|
125
|
+
detail: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export declare function createGuidedSmokeRun(options?: Pick<RunGuidedSmokeOptions, "runId" | "cwd" | "evidenceBaseDir">): GuidedSmokeRun;
|
|
129
|
+
export declare function failGuidedSmoke(run: GuidedSmokeRun, reason?: string): GuidedSmokeResult;
|
|
130
|
+
export declare function getGuidedSmokeExitCode(result: Pick<GuidedSmokeResult, "status">): number;
|
|
131
|
+
export declare function writePreflightEvidence(run: GuidedSmokeRun, data: PreflightData): Promise<void>;
|
|
132
|
+
declare function normalizeSlashInboundSample(input: {
|
|
133
|
+
command: SlashOnlyCommand;
|
|
134
|
+
input: string;
|
|
135
|
+
message: PublicWeixinMessage;
|
|
136
|
+
}): Record<string, unknown>;
|
|
137
|
+
export declare const normalizeSlashInboundSampleForTest: typeof normalizeSlashInboundSample;
|
|
138
|
+
declare function captureSlashInboundFromPublicMessages(input: {
|
|
139
|
+
command: SlashOnlyCommand;
|
|
140
|
+
input: string;
|
|
141
|
+
waitTimeoutMs?: number;
|
|
142
|
+
pollIntervalMs?: number;
|
|
143
|
+
getMessages: () => Promise<PublicWeixinMessage[]>;
|
|
144
|
+
stashMessages?: (messages: PublicWeixinMessage[]) => void;
|
|
145
|
+
}): Promise<Record<string, unknown> | null>;
|
|
146
|
+
export declare const captureSlashInboundFromPublicMessagesForTest: typeof captureSlashInboundFromPublicMessages;
|
|
147
|
+
declare function captureSlashInboundDefault(command: SlashOnlyCommand, deps?: {
|
|
148
|
+
state?: SlashCaptureState;
|
|
149
|
+
loadOpenClawWeixinPublicHelpers?: GuidedPublicHelpersLoader;
|
|
150
|
+
publicHelpersOptions?: OpenClawWeixinPublicHelpersLoaderOptions;
|
|
151
|
+
waitTimeoutMs?: number;
|
|
152
|
+
pollIntervalMs?: number;
|
|
153
|
+
}): Promise<Record<string, unknown>>;
|
|
154
|
+
export declare const captureSlashInboundDefaultForTest: typeof captureSlashInboundDefault;
|
|
155
|
+
declare function runDefaultNonSlashVerification(input: {
|
|
156
|
+
state?: SlashCaptureState;
|
|
157
|
+
loadOpenClawWeixinPublicHelpers?: GuidedPublicHelpersLoader;
|
|
158
|
+
publicHelpersOptions?: OpenClawWeixinPublicHelpersLoaderOptions;
|
|
159
|
+
inputs?: string[];
|
|
160
|
+
waitTimeoutMs?: number;
|
|
161
|
+
pollIntervalMs?: number;
|
|
162
|
+
}): Promise<{
|
|
163
|
+
passed: number;
|
|
164
|
+
total: number;
|
|
165
|
+
failedChecks: string[];
|
|
166
|
+
attempts: GuidedSmokeNonSlashAttempt[];
|
|
167
|
+
keyFieldsCheck: GuidedSmokeKeyFieldsCheck;
|
|
168
|
+
}>;
|
|
169
|
+
export declare const runDefaultNonSlashVerificationForTest: typeof runDefaultNonSlashVerification;
|
|
170
|
+
declare function normalizeQrLoginResult(result: unknown): {
|
|
171
|
+
status: "success" | "timeout";
|
|
172
|
+
connected?: boolean;
|
|
173
|
+
qrPrinted?: boolean;
|
|
174
|
+
qrUrl?: string;
|
|
175
|
+
} | null;
|
|
176
|
+
export declare const normalizeQrLoginResultForTest: typeof normalizeQrLoginResult;
|
|
177
|
+
export declare function runGuidedSmoke(options?: RunGuidedSmokeOptions): Promise<GuidedSmokeResult>;
|
|
178
|
+
export {};
|