


























@@ -95,34 +95,84 @@ describe("setupOfficialPluginInstalls", () => {
9595const prompter = createWizardPrompter({
9696multiselect: multiselect as WizardPrompter["multiselect"],
9797});
98+const runtime = createNonExitingRuntime();
989999100await setupOfficialPluginInstalls({
100101config: {},
101102 prompter,
102-runtime: createNonExitingRuntime(),
103+ runtime,
103104workspaceDir: "/tmp/workspace",
104105});
105106106-expect(multiselect).toHaveBeenCalledWith(
107-expect.objectContaining({
108-message: "Install optional plugins",
109-}),
110-);
111-expect(ensureOnboardingPluginInstalled).toHaveBeenCalledWith(
112-expect.objectContaining({
113-entry: expect.objectContaining({
114-pluginId: "diagnostics-otel",
115-trustedSourceLinkedOfficialInstall: true,
116-install: expect.objectContaining({
117-clawhubSpec: "clawhub:@openclaw/diagnostics-otel",
118-npmSpec: "@openclaw/diagnostics-otel",
119-defaultChoice: "npm",
120-}),
121-}),
122-promptInstall: false,
123-workspaceDir: "/tmp/workspace",
124-}),
125-);
107+expect(multiselect).toHaveBeenCalledExactlyOnceWith({
108+message: "Install optional plugins",
109+options: [
110+{
111+value: "__skip__",
112+label: "Skip for now",
113+hint: "Continue without installing optional plugins",
114+},
115+{
116+value: "acpx",
117+label: "ACPX Runtime",
118+hint: "OpenClaw ACP runtime backend",
119+},
120+{
121+value: "diagnostics-otel",
122+label: "Diagnostics OpenTelemetry",
123+hint: "OpenClaw diagnostics OpenTelemetry exporter",
124+},
125+{
126+value: "diagnostics-prometheus",
127+label: "Diagnostics Prometheus",
128+hint: "OpenClaw diagnostics Prometheus exporter",
129+},
130+{
131+value: "diffs",
132+label: "Diffs",
133+hint: "OpenClaw diff viewer plugin",
134+},
135+{
136+value: "google-meet",
137+label: "Google Meet",
138+hint: "OpenClaw Google Meet participant plugin",
139+},
140+{
141+value: "lobster",
142+label: "Lobster",
143+hint: "Lobster workflow tool plugin (typed pipelines + resumable approvals)",
144+},
145+{
146+value: "memory-lancedb",
147+label: "Memory LanceDB",
148+hint: "OpenClaw LanceDB-backed long-term memory plugin with auto-recall/capture",
149+},
150+{
151+value: "voice-call",
152+label: "Voice Call",
153+hint: "OpenClaw voice-call plugin",
154+},
155+],
156+});
157+expect(ensureOnboardingPluginInstalled).toHaveBeenCalledExactlyOnceWith({
158+cfg: {},
159+entry: {
160+pluginId: "diagnostics-otel",
161+label: "Diagnostics OpenTelemetry",
162+description: "OpenClaw diagnostics OpenTelemetry exporter",
163+install: {
164+clawhubSpec: "clawhub:@openclaw/diagnostics-otel",
165+npmSpec: "@openclaw/diagnostics-otel",
166+defaultChoice: "npm",
167+minHostVersion: ">=2026.4.25",
168+},
169+trustedSourceLinkedOfficialInstall: true,
170+},
171+ prompter,
172+ runtime,
173+workspaceDir: "/tmp/workspace",
174+promptInstall: false,
175+});
126176});
127177128178it("does not install when the user skips optional plugins", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。