Skip to content

Commit b5bfa47

Browse files
author
Shaw
committed
Merge remote-tracking branch 'origin/develop' into shaw/wip-snapshot-2026-05-21
2 parents b9ff759 + 7bddb5d commit b5bfa47

10 files changed

Lines changed: 759 additions & 197 deletions
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { describe, expect, it } from "vitest";
2+
3+
import {
4+
BASELINE_BUNDLED_RUNTIME_PACKAGES,
5+
classifyRegistryPluginRelease,
6+
getBundledRuntimePackages,
7+
getBundledRuntimePluginIds,
8+
} from "./release-plugin-policy.ts";
9+
10+
describe("release plugin policy", () => {
11+
it("ships runtime support packages without marking them as bundled registry plugins", () => {
12+
const availableDependencies = [
13+
"@elizaos/plugin-remote-manifest",
14+
"@elizaos/plugin-worker-runtime",
15+
"@elizaos/plugin-app-manager",
16+
"@elizaos/plugin-openai",
17+
];
18+
19+
expect(BASELINE_BUNDLED_RUNTIME_PACKAGES).toEqual(
20+
expect.arrayContaining([
21+
"@elizaos/plugin-remote-manifest",
22+
"@elizaos/plugin-worker-runtime",
23+
]),
24+
);
25+
expect(getBundledRuntimePackages(availableDependencies)).toEqual(
26+
expect.arrayContaining([
27+
"@elizaos/plugin-remote-manifest",
28+
"@elizaos/plugin-worker-runtime",
29+
"@elizaos/plugin-app-manager",
30+
"@elizaos/plugin-openai",
31+
]),
32+
);
33+
34+
const bundledPluginIds = new Set(
35+
getBundledRuntimePluginIds(availableDependencies),
36+
);
37+
38+
expect([...bundledPluginIds]).toEqual(["openai"]);
39+
expect(
40+
classifyRegistryPluginRelease({
41+
packageName: "@elizaos/plugin-openai",
42+
bundledPluginIds,
43+
}).releaseAvailability,
44+
).toBe("bundled");
45+
expect(
46+
classifyRegistryPluginRelease({
47+
packageName: "@elizaos/plugin-remote-manifest",
48+
bundledPluginIds: new Set(["remote-manifest"]),
49+
}).releaseAvailability,
50+
).toBe("post-release");
51+
});
52+
});

packages/agent/src/runtime/release-plugin-policy.ts

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { CORE_PLUGINS, OPTIONAL_CORE_PLUGINS } from "./core-plugins.ts";
33
const BASELINE_RUNTIME_SUPPORT_PACKAGES = [
44
"@elizaos/core",
55
"@elizaos/prompts",
6+
"@elizaos/plugin-remote-manifest",
7+
"@elizaos/plugin-worker-runtime",
68
] as const;
79

810
const BASELINE_PROVIDER_PLUGINS = [
@@ -12,12 +14,31 @@ const BASELINE_PROVIDER_PLUGINS = [
1214
"@elizaos/plugin-ollama",
1315
] as const;
1416

17+
// Desktop loads this through the legacy "agent-orchestrator" compatibility id,
18+
// but the implementation ships as the scoped package below.
19+
const BASELINE_DESKTOP_RUNTIME_PLUGINS = [
20+
"@elizaos/plugin-agent-orchestrator",
21+
] as const;
22+
23+
// These are implementation dependencies of bundled core plugins. They need
24+
// to ship in the runtime bundle, but are not auto-loaded by collectPluginNames.
25+
const BASELINE_PLUGIN_SUPPORT_PACKAGES = [
26+
"@elizaos/plugin-calendly",
27+
"@elizaos/plugin-health",
28+
"@elizaos/plugin-app-manager",
29+
"@elizaos/plugin-registry",
30+
"@elizaos/plugin-wallet-ui",
31+
"@elizaos/plugin-wallet",
32+
] as const;
33+
1534
const DESKTOP_RUNTIME_ONLY_PLUGINS = new Set<string>([
35+
"@elizaos/plugin-agent-orchestrator",
1636
"@elizaos/plugin-browser",
1737
"@elizaos/plugin-computeruse",
1838
]);
1939

2040
const LOCAL_RUNTIME_ONLY_PLUGINS = new Set<string>([
41+
"@elizaos/plugin-agent-orchestrator",
2142
"@elizaos/plugin-browser",
2243
"@elizaos/plugin-computeruse",
2344
]);
@@ -36,6 +57,15 @@ export interface RegistryPluginReleaseCompatibility {
3657

3758
export const BASELINE_BUNDLED_RUNTIME_PACKAGES: readonly string[] = [
3859
...BASELINE_RUNTIME_SUPPORT_PACKAGES,
60+
...BASELINE_DESKTOP_RUNTIME_PLUGINS,
61+
...CORE_PLUGINS,
62+
...OPTIONAL_CORE_PLUGINS,
63+
...BASELINE_PLUGIN_SUPPORT_PACKAGES,
64+
...BASELINE_PROVIDER_PLUGINS,
65+
];
66+
67+
const BASELINE_REGISTRY_BUNDLED_PLUGIN_PACKAGES: readonly string[] = [
68+
...BASELINE_DESKTOP_RUNTIME_PLUGINS,
3969
...CORE_PLUGINS,
4070
...OPTIONAL_CORE_PLUGINS,
4171
...BASELINE_PROVIDER_PLUGINS,
@@ -48,6 +78,10 @@ export function derivePluginIdFromPackageName(packageName: string): string {
4878
.replace(/^plugin-/, "");
4979
}
5080

81+
const BASELINE_REGISTRY_BUNDLED_PLUGIN_IDS = new Set(
82+
BASELINE_REGISTRY_BUNDLED_PLUGIN_PACKAGES.map(derivePluginIdFromPackageName),
83+
);
84+
5185
export function getBundledRuntimePackages(
5286
availableDependencies: Iterable<string>,
5387
): string[] {
@@ -60,7 +94,10 @@ export function getBundledRuntimePackages(
6094
export function getBundledRuntimePluginIds(
6195
availableDependencies: Iterable<string>,
6296
): string[] {
63-
return getBundledRuntimePackages(availableDependencies)
97+
const available = new Set(availableDependencies);
98+
return BASELINE_REGISTRY_BUNDLED_PLUGIN_PACKAGES.filter((packageName) =>
99+
available.has(packageName),
100+
)
64101
.map(derivePluginIdFromPackageName)
65102
.filter((pluginId) => pluginId.length > 0)
66103
.sort();
@@ -85,7 +122,9 @@ export function classifyRegistryPluginRelease(params: {
85122
}
86123

87124
const pluginId = derivePluginIdFromPackageName(packageName);
88-
const bundled = bundledPluginIds.has(pluginId);
125+
const bundled =
126+
BASELINE_REGISTRY_BUNDLED_PLUGIN_IDS.has(pluginId) &&
127+
bundledPluginIds.has(pluginId);
89128
const requiresDesktopRuntime = DESKTOP_RUNTIME_ONLY_PLUGINS.has(packageName);
90129
const requiresLocalRuntime = LOCAL_RUNTIME_ONLY_PLUGINS.has(packageName);
91130

0 commit comments

Comments
 (0)