|
1 | 1 | import { beforeEach, describe, expect, it, vi } from "vitest"; |
2 | 2 | import type { InstalledPluginIndex } from "../plugins/installed-plugin-index.js"; |
| 3 | +import type { InstalledPluginStartupInfo } from "../plugins/installed-plugin-index.js"; |
3 | 4 | import type { PluginManifestRegistry } from "../plugins/manifest-registry.js"; |
4 | 5 | |
5 | 6 | const readPersistedInstalledPluginIndexMock = vi.fn(); |
6 | 7 | const loadPluginManifestRegistryForInstalledIndexMock = vi.fn(); |
7 | 8 | |
| 9 | +const startupInfo: InstalledPluginStartupInfo = { |
| 10 | +sidecar: false, |
| 11 | +memory: false, |
| 12 | +deferConfiguredChannelFullLoadUntilAfterListen: false, |
| 13 | +agentHarnesses: [], |
| 14 | +}; |
| 15 | + |
8 | 16 | vi.mock("../plugins/installed-plugin-index-store.js", () => ({ |
9 | 17 | readPersistedInstalledPluginIndex: (...args: unknown[]) => |
10 | 18 | readPersistedInstalledPluginIndexMock(...args), |
@@ -25,9 +33,10 @@ function makeIndex(record: InstalledPluginIndex["plugins"][number]): InstalledPl
|
25 | 33 | migrationVersion: 1, |
26 | 34 | policyHash: "test", |
27 | 35 | generatedAtMs: 1, |
28 | | -refreshReason: "test", |
| 36 | +refreshReason: "manual", |
29 | 37 | installRecords: {}, |
30 | 38 | plugins: [record], |
| 39 | +diagnostics: [], |
31 | 40 | }; |
32 | 41 | } |
33 | 42 | |
@@ -78,7 +87,7 @@ describe("listPersistedBundledPluginLocationBridges", () => {
|
78 | 87 | rootDir: "/app/dist/extensions/diagnostics-otel", |
79 | 88 | origin: "bundled", |
80 | 89 | enabled: true, |
81 | | -startup: {}, |
| 90 | +startup: startupInfo, |
82 | 91 | compat: [], |
83 | 92 | packageInstall: { |
84 | 93 | defaultChoice: "clawhub", |
@@ -123,7 +132,7 @@ describe("listPersistedBundledPluginLocationBridges", () => {
|
123 | 132 | rootDir: "/app/dist/extensions/diagnostics-otel", |
124 | 133 | origin: "bundled", |
125 | 134 | enabled: true, |
126 | | -startup: {}, |
| 135 | +startup: startupInfo, |
127 | 136 | compat: [], |
128 | 137 | packageInstall: { |
129 | 138 | defaultChoice: "clawhub", |
|