@elizaos/agent 2.0.0-alpha.421 → 2.0.0-alpha.425

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.
Files changed (79) hide show
  1. package/package.json +4 -4
  2. package/packages/agent/src/api/accounts-routes.d.ts +11 -3
  3. package/packages/agent/src/api/accounts-routes.d.ts.map +1 -1
  4. package/packages/agent/src/api/accounts-routes.js +70 -123
  5. package/packages/agent/src/api/subscription-routes.js +27 -23
  6. package/packages/agent/src/runtime/plugin-role-gating.js +4 -3
  7. package/packages/app-core/src/api/client-agent.d.ts +63 -1
  8. package/packages/app-core/src/api/client-agent.d.ts.map +1 -1
  9. package/packages/app-core/src/api/client-agent.js +51 -0
  10. package/packages/app-core/src/components/accounts/AccountCard.d.ts +30 -0
  11. package/packages/app-core/src/components/accounts/AccountCard.d.ts.map +1 -0
  12. package/packages/app-core/src/components/accounts/AccountCard.js +183 -0
  13. package/packages/app-core/src/components/accounts/AccountList.d.ts +15 -0
  14. package/packages/app-core/src/components/accounts/AccountList.d.ts.map +1 -0
  15. package/packages/app-core/src/components/accounts/AccountList.js +80 -0
  16. package/packages/app-core/src/components/accounts/AddAccountDialog.d.ts +33 -0
  17. package/packages/app-core/src/components/accounts/AddAccountDialog.d.ts.map +1 -0
  18. package/packages/app-core/src/components/accounts/AddAccountDialog.js +277 -0
  19. package/packages/app-core/src/components/accounts/RotationStrategyPicker.d.ts +16 -0
  20. package/packages/app-core/src/components/accounts/RotationStrategyPicker.d.ts.map +1 -0
  21. package/packages/app-core/src/components/accounts/RotationStrategyPicker.js +50 -0
  22. package/packages/app-core/src/components/pages/PluginsView.d.ts.map +1 -1
  23. package/packages/app-core/src/components/pages/PluginsView.js +3 -34
  24. package/packages/app-core/src/components/settings/ProviderSwitcher.d.ts.map +1 -1
  25. package/packages/app-core/src/components/settings/ProviderSwitcher.js +2 -1
  26. package/packages/app-core/src/hooks/useAccounts.d.ts +41 -0
  27. package/packages/app-core/src/hooks/useAccounts.d.ts.map +1 -0
  28. package/packages/app-core/src/hooks/useAccounts.js +250 -0
  29. package/packages/app-core/src/i18n/locales/en.json +31 -31
  30. package/packages/app-core/src/i18n/locales/es.json +31 -31
  31. package/packages/app-core/src/i18n/locales/ko.json +31 -31
  32. package/packages/app-core/src/i18n/locales/pt.json +31 -31
  33. package/packages/app-core/src/i18n/locales/tl.json +31 -31
  34. package/packages/app-core/src/i18n/locales/vi.json +31 -31
  35. package/packages/app-core/src/i18n/locales/zh-CN.json +31 -31
  36. package/packages/typescript/src/features/basic-capabilities/index.d.ts +1 -0
  37. package/packages/typescript/src/features/basic-capabilities/index.d.ts.map +1 -1
  38. package/packages/typescript/src/features/basic-capabilities/index.js +4 -0
  39. package/packages/typescript/src/features/index.d.ts.map +1 -1
  40. package/packages/typescript/src/features/index.js +2 -7
  41. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/core-status.d.ts +14 -0
  42. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/core-status.d.ts.map +1 -0
  43. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/core-status.js +48 -0
  44. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/create.d.ts +32 -0
  45. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/create.d.ts.map +1 -0
  46. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/create.js +502 -0
  47. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/eject.d.ts +16 -0
  48. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/eject.d.ts.map +1 -0
  49. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/eject.js +47 -0
  50. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/install.d.ts +18 -0
  51. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/install.d.ts.map +1 -0
  52. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/install.js +59 -0
  53. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/list-ejected.d.ts +14 -0
  54. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/list-ejected.d.ts.map +1 -0
  55. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/list-ejected.js +31 -0
  56. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/list.d.ts +14 -0
  57. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/list.d.ts.map +1 -0
  58. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/list.js +51 -0
  59. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/reinject.d.ts +15 -0
  60. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/reinject.d.ts.map +1 -0
  61. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/reinject.js +43 -0
  62. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/search.d.ts +15 -0
  63. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/search.d.ts.map +1 -0
  64. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/search.js +52 -0
  65. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/sync.d.ts +15 -0
  66. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/sync.d.ts.map +1 -0
  67. package/packages/typescript/src/features/plugin-manager/actions/plugin-handlers/sync.js +48 -0
  68. package/packages/typescript/src/features/plugin-manager/actions/plugin.d.ts +25 -0
  69. package/packages/typescript/src/features/plugin-manager/actions/plugin.d.ts.map +1 -0
  70. package/packages/typescript/src/features/plugin-manager/actions/plugin.js +439 -0
  71. package/packages/typescript/src/features/plugin-manager/index.d.ts +2 -0
  72. package/packages/typescript/src/features/plugin-manager/index.d.ts.map +1 -1
  73. package/packages/typescript/src/features/plugin-manager/index.js +7 -10
  74. package/packages/typescript/src/features/plugin-manager/security.d.ts +33 -0
  75. package/packages/typescript/src/features/plugin-manager/security.d.ts.map +1 -0
  76. package/packages/typescript/src/features/plugin-manager/security.js +80 -0
  77. package/packages/app-core/src/runtime/plugin-manager-guard.d.ts +0 -12
  78. package/packages/app-core/src/runtime/plugin-manager-guard.d.ts.map +0 -1
  79. package/packages/app-core/src/runtime/plugin-manager-guard.js +0 -82
@@ -1,82 +0,0 @@
1
- /**
2
- * Auto-enable `@elizaos/plugin-plugin-manager` via `plugins.allow` so the
3
- * dashboard "Install Plugin" flow works. The plugin is bundled but optional
4
- * (see OPTIONAL_CORE_PLUGINS in the agent runtime).
5
- *
6
- * Skipped when `ELIZA_DISABLE_PLUGIN_MANAGER_AUTO_ENABLE=1` is set.
7
- */
8
- let _checked = false;
9
- let _lastResult = "error";
10
- export const PLUGIN_MANAGER_UNAVAILABLE_ERROR = "Plugin manager service not found";
11
- export function getPluginManagerBlockReason(result) {
12
- if (result === "disabled-by-user") {
13
- return "plugin-manager is explicitly disabled in config";
14
- }
15
- if (result === "disabled-by-env") {
16
- return "plugin-manager auto-enable is disabled by ELIZA_DISABLE_PLUGIN_MANAGER_AUTO_ENABLE=1";
17
- }
18
- return null;
19
- }
20
- export async function ensurePluginManagerAllowed() {
21
- if (_checked)
22
- return _lastResult;
23
- if (process.env.ELIZA_DISABLE_PLUGIN_MANAGER_AUTO_ENABLE === "1") {
24
- _checked = true;
25
- _lastResult = "disabled-by-env";
26
- return _lastResult;
27
- }
28
- // Renderer/browser bundles cannot safely load the local config helpers from
29
- // the agent runtime. In that environment we surface a non-fatal error state
30
- // and let the server-side action path handle plugin-manager recovery.
31
- if (typeof window !== "undefined") {
32
- _checked = true;
33
- _lastResult = "error";
34
- return _lastResult;
35
- }
36
- try {
37
- const { loadElizaConfig, saveElizaConfig } = await import("@elizaos/agent");
38
- const config = loadElizaConfig();
39
- const PKG = "@elizaos/plugin-plugin-manager";
40
- const entries = config.plugins?.entries ?? {};
41
- const id = "plugin-manager";
42
- const allow = config.plugins?.allow ?? [];
43
- if (entries[id]?.enabled === false) {
44
- _checked = true;
45
- _lastResult = "disabled-by-user";
46
- return _lastResult;
47
- }
48
- if (allow.includes(PKG) ||
49
- allow.includes("plugin-manager") ||
50
- entries[id]?.enabled === true) {
51
- _checked = true;
52
- _lastResult = "already-enabled";
53
- return _lastResult;
54
- }
55
- // The upstream ElizaConfig type marks `plugins` as a complex branded type
56
- // that doesn't allow direct property assignment. We know the runtime shape
57
- // is a plain object with an `entries` record, so we cast through unknown.
58
- config.plugins ??= {};
59
- const nextAllow = [...allow];
60
- if (!nextAllow.includes(PKG)) {
61
- nextAllow.push(PKG);
62
- }
63
- config.plugins.allow = nextAllow;
64
- saveElizaConfig(config);
65
- console.info("[eliza] Auto-enabled plugin-manager for dashboard plugin installs. " +
66
- "Set ELIZA_DISABLE_PLUGIN_MANAGER_AUTO_ENABLE=1 to prevent this.");
67
- _checked = true;
68
- _lastResult = "enabled";
69
- return _lastResult;
70
- }
71
- catch {
72
- // Non-fatal — plugin install button won't work but everything else is fine
73
- _checked = true;
74
- _lastResult = "error";
75
- return _lastResult;
76
- }
77
- }
78
- /** Reset the in-process guard (for testing only). @internal */
79
- export function _resetPluginManagerChecked() {
80
- _checked = false;
81
- _lastResult = "error";
82
- }