@elizaos/agent 2.0.3-beta.2 → 2.0.3-beta.3
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/__tests__/view-user-journeys.d.ts.map +1 -1
- package/__tests__/view-user-journeys.js +52 -41
- package/actions/context-signal.d.ts +2 -2
- package/actions/files.d.ts +9 -0
- package/actions/files.d.ts.map +1 -0
- package/actions/files.js +183 -0
- package/actions/index.d.ts +17 -17
- package/api/accounts-routes.d.ts +1 -1
- package/api/accounts-routes.js +1 -1
- package/api/agent-admin-routes.d.ts +1 -1
- package/api/agent-admin-routes.js +2 -2
- package/api/agent-model.d.ts +1 -1
- package/api/agent-status-routes.d.ts +1 -3
- package/api/agent-status-routes.d.ts.map +1 -1
- package/api/agent-status-routes.js +0 -2
- package/api/approval-routes.d.ts +38 -0
- package/api/approval-routes.d.ts.map +1 -0
- package/api/approval-routes.js +223 -0
- package/api/background-routes.d.ts +13 -0
- package/api/background-routes.d.ts.map +1 -0
- package/api/background-routes.js +91 -0
- package/api/binance-skill-helpers.d.ts +2 -2
- package/api/binance-skill-helpers.js +2 -2
- package/api/builtin-views.d.ts.map +1 -1
- package/api/builtin-views.js +44 -4
- package/api/character-routes.d.ts +1 -1
- package/api/chat-augmentation.d.ts.map +1 -1
- package/api/chat-augmentation.js +17 -0
- package/api/chat-routes.d.ts +29 -2
- package/api/chat-routes.d.ts.map +1 -1
- package/api/chat-routes.js +76 -1
- package/api/commands-routes.d.ts +10 -8
- package/api/commands-routes.d.ts.map +1 -1
- package/api/commands-routes.js +17 -59
- package/api/config-routes.d.ts +1 -1
- package/api/config-routes.d.ts.map +1 -1
- package/api/config-routes.js +0 -2
- package/api/connector-routes.d.ts +1 -1
- package/api/conversation-metadata.d.ts +1 -1
- package/api/conversation-metadata.d.ts.map +1 -1
- package/api/conversation-metadata.js +0 -1
- package/api/conversation-routes.d.ts +4 -3
- package/api/conversation-routes.d.ts.map +1 -1
- package/api/conversation-routes.js +34 -1
- package/api/documents-service-loader.d.ts +0 -4
- package/api/documents-service-loader.d.ts.map +1 -1
- package/api/documents-service-loader.js +0 -2
- package/api/files-routes.d.ts +14 -0
- package/api/files-routes.d.ts.map +1 -0
- package/api/files-routes.js +47 -0
- package/api/first-run-routes.d.ts +1 -1
- package/api/health-routes.d.ts +2 -2
- package/api/index.d.ts +40 -39
- package/api/index.d.ts.map +1 -1
- package/api/index.js +1 -0
- package/api/interactions-routes.d.ts +33 -0
- package/api/interactions-routes.d.ts.map +1 -0
- package/api/interactions-routes.js +63 -0
- package/api/media-runtime.d.ts +2 -1
- package/api/media-runtime.d.ts.map +1 -1
- package/api/media-runtime.js +64 -7
- package/api/media-store.d.ts +36 -0
- package/api/media-store.d.ts.map +1 -1
- package/api/media-store.js +141 -2
- package/api/memory-bounds.d.ts +0 -1
- package/api/memory-bounds.d.ts.map +1 -1
- package/api/memory-bounds.js +0 -1
- package/api/misc-routes.d.ts +1 -1
- package/api/model-provider-helpers.d.ts +2 -2
- package/api/model-provider-helpers.js +2 -2
- package/api/permissions-routes-extra.d.ts +1 -1
- package/api/permissions-routes.d.ts +1 -1
- package/api/permissions-routes.d.ts.map +1 -1
- package/api/permissions-routes.js +8 -7
- package/api/plugin-discovery-helpers.d.ts +5 -6
- package/api/plugin-discovery-helpers.d.ts.map +1 -1
- package/api/plugin-discovery-helpers.js +3 -4
- package/api/plugin-runtime-apply.d.ts +2 -2
- package/api/plugin-runtime-apply.d.ts.map +1 -1
- package/api/plugin-runtime-apply.js +74 -0
- package/api/provider-switch-config.d.ts +1 -1
- package/api/provider-switch-routes.d.ts +2 -2
- package/api/registry-routes.d.ts +1 -1
- package/api/registry-service.d.ts +1 -1
- package/api/remote-capability-routes.d.ts +2 -2
- package/api/remote-capability-routes.d.ts.map +1 -1
- package/api/remote-capability-routes.js +19 -0
- package/api/server-autonomy-helpers.d.ts +2 -2
- package/api/server-helpers-auth.d.ts +10 -0
- package/api/server-helpers-auth.d.ts.map +1 -1
- package/api/server-helpers-auth.js +16 -210
- package/api/server-helpers-config.d.ts +1 -1
- package/api/server-helpers-mcp.d.ts +2 -2
- package/api/server-helpers-plugin.d.ts +1 -1
- package/api/server-helpers-swarm.d.ts +3 -3
- package/api/server-helpers-swarm.d.ts.map +1 -1
- package/api/server-helpers-swarm.js +15 -5
- package/api/server-helpers-wallet.d.ts +1 -1
- package/api/server-helpers.d.ts +4 -4
- package/api/server-lazy-routes.d.ts +40 -38
- package/api/server-lazy-routes.d.ts.map +1 -1
- package/api/server-lazy-routes.js +7 -0
- package/api/server-route-dispatch.d.ts +2 -2
- package/api/server-route-dispatch.d.ts.map +1 -1
- package/api/server-route-dispatch.js +7 -0
- package/api/server-types.d.ts +9 -7
- package/api/server-types.d.ts.map +1 -1
- package/api/server.d.ts +19 -19
- package/api/server.d.ts.map +1 -1
- package/api/server.js +111 -17
- package/api/static-file-server.d.ts +2 -2
- package/api/static-file-server.js +2 -2
- package/api/subscription-routes.d.ts +4 -4
- package/api/subscription-routes.js +3 -4
- package/api/suggestions-routes.d.ts +1 -1
- package/api/suggestions-routes.d.ts.map +1 -1
- package/api/suggestions-routes.js +2 -3
- package/api/terminal-execution-routing.d.ts +1 -1
- package/api/training-service-like.d.ts +1 -1
- package/api/trajectory-fallback-routes.d.ts.map +1 -1
- package/api/trajectory-fallback-routes.js +21 -1
- package/api/update-routes.d.ts +1 -1
- package/api/view-registry-types.d.ts +1 -1
- package/api/views-registry.d.ts +14 -4
- package/api/views-registry.d.ts.map +1 -1
- package/api/views-registry.js +50 -26
- package/api/views-routes.d.ts +1 -1
- package/api/views-routes.d.ts.map +1 -1
- package/api/views-routes.js +131 -14
- package/api/views-search-index.d.ts +1 -1
- package/api/wallet-capability.d.ts +3 -3
- package/api/wallet-rpc.d.ts +1 -1
- package/api/wallet.d.ts +3 -3
- package/api/wallet.d.ts.map +1 -1
- package/api/wallet.js +4 -3
- package/api/workbench-context.d.ts +1 -1
- package/api/workbench-helpers.d.ts +3 -3
- package/api/workbench-helpers.js +3 -3
- package/api/workbench-routes.d.ts +2 -2
- package/api/workbench-vfs-routes.d.ts +1 -1
- package/api/ws-event-replay.d.ts +1 -2
- package/api/ws-event-replay.d.ts.map +1 -1
- package/api/ws-event-replay.js +1 -2
- package/api/x-relay-routes.d.ts +2 -2
- package/api/x402-route-validation.d.ts +4 -0
- package/api/x402-route-validation.d.ts.map +1 -0
- package/api/x402-route-validation.js +6 -0
- package/assets/view-heroes/background.png +0 -0
- package/auth/account-storage.d.ts +1 -1
- package/auth/anthropic.d.ts +1 -1
- package/auth/credentials.d.ts +2 -2
- package/auth/index.d.ts +7 -7
- package/auth/oauth-flow.d.ts +2 -2
- package/auth/openai-codex.d.ts +1 -1
- package/awareness/index.d.ts +1 -1
- package/config/config.js +0 -1
- package/config/env-vars.d.ts +1 -1
- package/config/env-vars.d.ts.map +1 -1
- package/config/env-vars.js +0 -1
- package/config/index.d.ts +10 -10
- package/config/model-metadata.d.ts +1 -1
- package/config/owner-contacts.d.ts +1 -1
- package/config/schema.d.ts +1 -1
- package/hooks/discovery.d.ts +1 -1
- package/hooks/eligibility.d.ts +2 -2
- package/hooks/index.d.ts +2 -2
- package/hooks/loader.d.ts +2 -2
- package/hooks/registry.d.ts +1 -1
- package/index.d.ts +87 -85
- package/index.d.ts.map +1 -1
- package/index.js +11 -3
- package/package.json +54 -44
- package/providers/media-provider.d.ts +1 -1
- package/providers/page-scoped-context.d.ts.map +1 -1
- package/providers/page-scoped-context.js +1 -70
- package/providers/relevant-conversations.d.ts.map +1 -1
- package/providers/relevant-conversations.js +8 -9
- package/providers/workspace.d.ts +1 -1
- package/runtime/actions/web-fetch.d.ts.map +1 -1
- package/runtime/actions/web-fetch.js +23 -3
- package/runtime/actions/web-search.d.ts +32 -0
- package/runtime/actions/web-search.d.ts.map +1 -0
- package/runtime/actions/web-search.js +245 -0
- package/runtime/advanced-capabilities-config.d.ts +1 -1
- package/runtime/boot-telemetry.d.ts +1 -1
- package/runtime/conversation-compactor-runtime.d.ts +1 -1
- package/runtime/conversation-compactor-runtime.js +1 -1
- package/runtime/conversation-compactor.d.ts +1 -1
- package/runtime/core-plugins.d.ts.map +1 -1
- package/runtime/core-plugins.js +9 -0
- package/runtime/custom-actions.d.ts +18 -9
- package/runtime/custom-actions.d.ts.map +1 -1
- package/runtime/custom-actions.js +85 -23
- package/runtime/eliza-plugin.d.ts.map +1 -1
- package/runtime/eliza-plugin.js +15 -1
- package/runtime/eliza.d.ts +9 -7
- package/runtime/eliza.d.ts.map +1 -1
- package/runtime/eliza.js +86 -23
- package/runtime/first-time-setup.d.ts +1 -3
- package/runtime/first-time-setup.d.ts.map +1 -1
- package/runtime/first-time-setup.js +0 -2
- package/runtime/index.d.ts +18 -18
- package/runtime/load-plugin-from-vfs.d.ts +2 -2
- package/runtime/mobile-dns.d.ts.map +1 -1
- package/runtime/mobile-dns.js +2 -5
- package/runtime/operations/classifier.d.ts +1 -1
- package/runtime/operations/cold-strategy.d.ts +1 -1
- package/runtime/operations/health-checks.d.ts +1 -1
- package/runtime/operations/health.d.ts +1 -1
- package/runtime/operations/index.d.ts +10 -10
- package/runtime/operations/manager.d.ts +3 -3
- package/runtime/operations/reload-hot.d.ts +1 -1
- package/runtime/operations/repository.d.ts +1 -1
- package/runtime/operations/vault-bridge.d.ts +1 -1
- package/runtime/plugin-collector.d.ts +6 -1
- package/runtime/plugin-collector.d.ts.map +1 -1
- package/runtime/plugin-collector.js +11 -28
- package/runtime/plugin-lifecycle.d.ts.map +1 -1
- package/runtime/plugin-lifecycle.js +1 -0
- package/runtime/plugin-resolver.d.ts +2 -2
- package/runtime/plugin-resolver.d.ts.map +1 -1
- package/runtime/plugin-resolver.js +113 -65
- package/runtime/plugin-types.d.ts +1 -1
- package/runtime/prompt-optimization.d.ts +4 -4
- package/runtime/remote-coding-runner-gate.d.ts +7 -0
- package/runtime/remote-coding-runner-gate.d.ts.map +1 -0
- package/runtime/remote-coding-runner-gate.js +36 -0
- package/runtime/roles/src/index.d.ts +4 -4
- package/runtime/roles.d.ts +2 -2
- package/runtime/sandbox-character.d.ts +1 -1
- package/runtime/tool-call-cache/cache.d.ts +1 -1
- package/runtime/tool-call-cache/disk-store.d.ts +1 -1
- package/runtime/tool-call-cache/index.d.ts +6 -6
- package/runtime/tool-call-cache/key.d.ts +1 -1
- package/runtime/tool-call-cache/redact.d.ts +1 -1
- package/runtime/tool-call-cache/registry.d.ts +1 -1
- package/runtime/tool-call-cache-wrapper.d.ts +7 -9
- package/runtime/tool-call-cache-wrapper.d.ts.map +1 -1
- package/runtime/tool-call-cache-wrapper.js +6 -11
- package/runtime/trajectory-export.d.ts +3 -3
- package/runtime/trajectory-internals.d.ts +2 -1
- package/runtime/trajectory-internals.d.ts.map +1 -1
- package/runtime/trajectory-persistence.d.ts +5 -5
- package/runtime/trajectory-steps-reader.d.ts +1 -1
- package/runtime/trajectory-steps-writer.d.ts +1 -1
- package/runtime/trajectory-storage.d.ts +4 -4
- package/runtime/view-action-affinity.d.ts +18 -15
- package/runtime/view-action-affinity.d.ts.map +1 -1
- package/runtime/view-action-affinity.js +26 -29
- package/runtime/web-search-tools.d.ts +4 -1
- package/runtime/web-search-tools.d.ts.map +1 -1
- package/runtime/web-search-tools.js +37 -9
- package/security/index.d.ts +3 -3
- package/services/approval/index.d.ts +9 -0
- package/services/approval/index.d.ts.map +1 -0
- package/services/approval/index.js +8 -0
- package/services/approval/service.d.ts +35 -0
- package/services/approval/service.d.ts.map +1 -0
- package/services/approval/service.js +40 -0
- package/services/approval/sql.d.ts +18 -0
- package/services/approval/sql.d.ts.map +1 -0
- package/services/approval/sql.js +104 -0
- package/services/approval/store.d.ts +39 -0
- package/services/approval/store.d.ts.map +1 -0
- package/services/approval/store.js +534 -0
- package/services/approval/types.d.ts +207 -0
- package/services/approval/types.d.ts.map +1 -0
- package/services/approval/types.js +34 -0
- package/services/character-persistence.d.ts +2 -2
- package/services/client-chat-sender.d.ts +1 -1
- package/services/config-plugin-manager.d.ts +2 -2
- package/services/connector-setup-service.d.ts +1 -1
- package/services/cove-quote-x509.d.ts +1 -1
- package/services/cove-quote.d.ts +2 -2
- package/services/dstack-tee-provider.d.ts +1 -1
- package/services/file-storage.d.ts +20 -0
- package/services/file-storage.d.ts.map +1 -0
- package/services/file-storage.js +70 -0
- package/services/global-pause/index.d.ts +8 -0
- package/services/global-pause/index.d.ts.map +1 -0
- package/services/global-pause/index.js +7 -0
- package/services/global-pause/service.d.ts +29 -0
- package/services/global-pause/service.d.ts.map +1 -0
- package/services/global-pause/service.js +34 -0
- package/services/global-pause/store.d.ts +31 -0
- package/services/global-pause/store.d.ts.map +1 -0
- package/services/global-pause/store.js +83 -0
- package/services/handoff/index.d.ts +8 -0
- package/services/handoff/index.d.ts.map +1 -0
- package/services/handoff/index.js +7 -0
- package/services/handoff/service.d.ts +29 -0
- package/services/handoff/service.d.ts.map +1 -0
- package/services/handoff/service.js +34 -0
- package/services/handoff/store.d.ts +76 -0
- package/services/handoff/store.d.ts.map +1 -0
- package/services/handoff/store.js +148 -0
- package/services/index.d.ts +30 -31
- package/services/index.d.ts.map +1 -1
- package/services/index.js +0 -6
- package/services/js-runtime-bridge.d.ts.map +1 -1
- package/services/js-runtime-bridge.js +8 -2
- package/services/knowledge-graph/index.d.ts +4 -4
- package/services/knowledge-graph/service.d.ts +2 -2
- package/services/pending-prompts/index.d.ts +8 -0
- package/services/pending-prompts/index.d.ts.map +1 -0
- package/services/pending-prompts/index.js +7 -0
- package/services/pending-prompts/service.d.ts +34 -0
- package/services/pending-prompts/service.d.ts.map +1 -0
- package/services/pending-prompts/service.js +68 -0
- package/services/pending-prompts/store.d.ts +70 -0
- package/services/pending-prompts/store.d.ts.map +1 -0
- package/services/pending-prompts/store.js +191 -0
- package/services/plugin-compiler.d.ts +1 -1
- package/services/plugin-installer.d.ts.map +1 -1
- package/services/plugin-installer.js +21 -11
- package/services/plugin-manager-types.d.ts +1 -1
- package/services/proactive-interaction-decider.d.ts +62 -11
- package/services/proactive-interaction-decider.d.ts.map +1 -1
- package/services/proactive-interaction-decider.js +223 -35
- package/services/push/apns-provider.d.ts +1 -1
- package/services/push/fcm-provider.d.ts +1 -1
- package/services/push/notification-push-service.d.ts +2 -2
- package/services/registry-client-app-meta.d.ts +1 -1
- package/services/registry-client-endpoints.d.ts +2 -2
- package/services/registry-client-local.d.ts +1 -1
- package/services/registry-client-network.d.ts +1 -1
- package/services/registry-client-queries.d.ts +1 -1
- package/services/registry-client.d.ts +3 -3
- package/services/relationships-graph.d.ts +1 -1
- package/services/remote-capability-cloud-sandbox.d.ts +3 -3
- package/services/remote-capability-endpoint-conformance.d.ts +1 -1
- package/services/remote-capability-endpoint-provider.d.ts +4 -4
- package/services/remote-capability-url-endpoint-providers.d.ts +1 -1
- package/services/remote-plugin-adapter.d.ts.map +1 -1
- package/services/remote-plugin-adapter.js +3 -0
- package/services/remote-plugin-bridge.d.ts.map +1 -1
- package/services/remote-plugin-bridge.js +97 -26
- package/services/remote-signing-service.d.ts +4 -4
- package/services/research-task-executor.d.ts +1 -1
- package/services/sandbox-manager.d.ts +1 -1
- package/services/self-updater.d.ts +1 -1
- package/services/self-updater.d.ts.map +1 -1
- package/services/self-updater.js +23 -9
- package/services/shell-execution-router.d.ts +1 -1
- package/services/shell-execution-router.d.ts.map +1 -1
- package/services/shell-execution-router.js +19 -2
- package/services/tee-boot-gate-state.d.ts +1 -1
- package/services/tee-boot-gate.d.ts +4 -4
- package/services/tee-confidential-inference.d.ts +3 -3
- package/services/tee-key-release.d.ts +2 -2
- package/services/tee-model-key-boot.d.ts +4 -4
- package/services/tee-policy.d.ts +1 -1
- package/services/tee-production-profile.d.ts +1 -1
- package/services/tee-release-policy.d.ts +1 -1
- package/services/tee-revocation.d.ts +2 -2
- package/services/tee-runtime-config.d.ts +1 -1
- package/services/tee-sealed-volume.d.ts +3 -3
- package/services/tee-signer-backend.d.ts +3 -3
- package/services/update-checker.d.ts +1 -1
- package/services/vault-signer-backend.d.ts +1 -1
- package/services/vfs-git.d.ts +1 -1
- package/test-support/index.d.ts +3 -3
- package/triggers/runtime.d.ts +1 -1
- package/triggers/scheduling.d.ts +3 -22
- package/triggers/scheduling.d.ts.map +1 -1
- package/triggers/scheduling.js +2 -214
- package/tui/agent-terminal-tui.d.ts.map +1 -1
- package/tui/agent-terminal-tui.js +174 -72
- package/types/index.d.ts +3 -3
- package/api/nfa-routes.d.ts +0 -6
- package/api/nfa-routes.d.ts.map +0 -1
- package/api/nfa-routes.js +0 -125
- package/api/server-auth.d.ts +0 -46
- package/api/server-auth.d.ts.map +0 -1
- package/api/server-auth.js +0 -504
- package/runtime/restart.d.ts +0 -9
- package/runtime/restart.d.ts.map +0 -1
- package/runtime/restart.js +0 -8
- package/test-utils/sqlite-compat.d.ts +0 -23
- package/test-utils/sqlite-compat.d.ts.map +0 -1
- package/test-utils/sqlite-compat.js +0 -214
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
* added each package is recorded so `resolvePlugins` (`plugin-resolver.ts`)
|
|
9
9
|
* can explain optional load failures (config vs env vs feature flag).
|
|
10
10
|
*
|
|
11
|
-
* Extracted from eliza.ts to reduce file size.
|
|
12
|
-
*
|
|
13
11
|
* @module plugin-collector
|
|
14
12
|
*/
|
|
15
13
|
import { existsSync } from "node:fs";
|
|
16
14
|
import path from "node:path";
|
|
15
|
+
import channelPluginMap from "@elizaos/registry/first-party/channel-plugin-map.json" with {
|
|
16
|
+
type: "json"
|
|
17
|
+
};
|
|
17
18
|
import { hasExplicitCanonicalRuntimeConfig, isAndroidMobile, isMobilePlatform, migrateLegacyRuntimeConfig, resolveDeploymentTargetInConfig, resolveElizaCloudTopology, resolveServiceRoutingInConfig, } from "@elizaos/shared";
|
|
18
19
|
import { CORE_PLUGINS, ELIZAOS_ANDROID_CORE_PLUGINS, ELIZAOS_ANDROID_TERMINAL_PLUGINS, LEAN_CHAT_EXCLUDED_PLUGINS, LEAN_CHAT_PLUGINS, MOBILE_CORE_PLUGINS, MOBILE_VIEW_PLUGINS, OPTIONAL_CORE_PLUGINS, } from "./core-plugins.js";
|
|
19
20
|
const OPTIONAL_CORE_PLUGIN_NAMES = new Set(OPTIONAL_CORE_PLUGINS);
|
|
@@ -119,36 +120,18 @@ function isStoreBuildVariant() {
|
|
|
119
120
|
process.env.ELIZA_BUILD_VARIANT?.trim();
|
|
120
121
|
return raw?.toLowerCase() === "store";
|
|
121
122
|
}
|
|
122
|
-
/**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
x: "@elizaos/plugin-x",
|
|
130
|
-
// Backward-compat alias: legacy "twitter" channel resolves to plugin-x.
|
|
131
|
-
twitter: "@elizaos/plugin-x",
|
|
132
|
-
// Internal connector built from src/plugins/whatsapp (not an npm package).
|
|
133
|
-
whatsapp: "@elizaos/plugin-whatsapp",
|
|
134
|
-
// Internal connector built from src/plugins/signal (not an npm package).
|
|
135
|
-
signal: "@elizaos/plugin-signal",
|
|
136
|
-
imessage: "@elizaos/plugin-imessage",
|
|
137
|
-
farcaster: "@elizaos/plugin-farcaster",
|
|
138
|
-
lens: "@elizaos/plugin-lens",
|
|
139
|
-
msteams: "@elizaos/plugin-msteams",
|
|
140
|
-
feishu: "@elizaos/plugin-feishu",
|
|
141
|
-
matrix: "@elizaos/plugin-matrix",
|
|
142
|
-
nostr: "@elizaos/plugin-nostr",
|
|
143
|
-
blooio: "@elizaos/plugin-blooio",
|
|
144
|
-
twitch: "@elizaos/plugin-twitch",
|
|
145
|
-
mattermost: "@elizaos/plugin-mattermost",
|
|
146
|
-
googlechat: "@elizaos/plugin-google-chat",
|
|
147
|
-
};
|
|
123
|
+
/**
|
|
124
|
+
* Maps Eliza channel names to plugin package names. Derived at registry build
|
|
125
|
+
* time from each connector entry's `channels` (e.g. x -> ["x", "twitter"]); see
|
|
126
|
+
* packages/registry/src/first-party. To add/rename a channel, edit the owning
|
|
127
|
+
* connector's registry-entry.json `channels` and regenerate — not this list.
|
|
128
|
+
*/
|
|
129
|
+
export const CHANNEL_PLUGIN_MAP = channelPluginMap;
|
|
148
130
|
/** Maps environment variable names to model-provider plugin packages. */
|
|
149
131
|
export const PROVIDER_PLUGIN_MAP = {
|
|
150
132
|
ANTHROPIC_API_KEY: "@elizaos/plugin-anthropic",
|
|
151
133
|
OPENAI_API_KEY: "@elizaos/plugin-openai",
|
|
134
|
+
CEREBRAS_API_KEY: "@elizaos/plugin-openai",
|
|
152
135
|
GEMINI_API_KEY: "@elizaos/plugin-google-genai",
|
|
153
136
|
GOOGLE_API_KEY: "@elizaos/plugin-google-genai",
|
|
154
137
|
GOOGLE_GENERATIVE_AI_API_KEY: "@elizaos/plugin-google-genai",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-lifecycle.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin-lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,YAAY,EACZ,MAAM,EAGN,eAAe,EAIhB,MAAM,eAAe,CAAC;AAwEvB,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAErD,KAAK,0BAA0B,GAAG,YAAY,GAAG;IAC/C,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAC9E,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,CAClB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC3B,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,sBAAsB,GAAG,IAAI,CAAC;IAC3E,qBAAqB,CAAC,EAAE,MAAM,sBAAsB,EAAE,CAAC;CACxD,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-lifecycle.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin-lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,YAAY,EACZ,MAAM,EAGN,eAAe,EAIhB,MAAM,eAAe,CAAC;AAwEvB,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAErD,KAAK,0BAA0B,GAAG,YAAY,GAAG;IAC/C,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAC9E,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,iBAAiB,CAAC,EAAE,CAClB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC3B,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,sBAAsB,GAAG,IAAI,CAAC;IAC3E,qBAAqB,CAAC,EAAE,MAAM,sBAAsB,EAAE,CAAC;CACxD,CAAC;AAkjBF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAwTzE;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,YAAY,GAAG,IAAI,GAC3B,OAAO,IAAI,0BAA0B,CAUvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ElizaConfig } from "../config/config.
|
|
2
|
-
import { type PluginModuleShape, type ResolvedPlugin } from "./plugin-types.
|
|
1
|
+
import { type ElizaConfig } from "../config/config.js";
|
|
2
|
+
import { type PluginModuleShape, type ResolvedPlugin } from "./plugin-types.js";
|
|
3
3
|
export declare function resolveRuntimePluginImportSpecifier(pluginName: string): string;
|
|
4
4
|
/**
|
|
5
5
|
* Import a plugin module from its install directory on disk.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-resolver.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-resolver.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin-resolver.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,qBAAqB,CAAC;AAiBxE,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAMpB,MAAM,mBAAmB,CAAC;AAoD3B,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,MAAM,GACjB,MAAM,CAMR;AA2mBD;;;;;;;;;;GAUG;AACH,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,SAAM,GAClB,OAAO,CAAC,iBAAiB,CAAC,CAsD5B;AAoCD,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAMnD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,KAAK,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAMD;AAuPD;;;;;;;;;;;;GAYG;AACH,wBAAsB,yBAAyB,CAC7C,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAqCf;AAoaD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpE,wBAAsB,cAAc,CAClC,MAAM,EAAE,WAAW,EACnB,IAAI,CAAC,EAAE;IACL,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,uBAAuB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,GACA,OAAO,CAAC,cAAc,EAAE,CAAC,CA4hB3B"}
|
|
@@ -14,8 +14,6 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
14
14
|
* directories. Each plugin is wrapped in an error boundary so a single
|
|
15
15
|
* failing plugin cannot crash the agent startup.
|
|
16
16
|
*
|
|
17
|
-
* Extracted from eliza.ts to reduce file size.
|
|
18
|
-
*
|
|
19
17
|
* @module plugin-resolver
|
|
20
18
|
*/
|
|
21
19
|
import crypto from "node:crypto";
|
|
@@ -37,6 +35,7 @@ import { CUSTOM_PLUGINS_DIRNAME, EJECTED_PLUGINS_DIRNAME, ensureBrowserServerLin
|
|
|
37
35
|
const LAST_FAILED_PLUGIN_NAMES = Symbol.for("@elizaos/plugin-resolver/last-failed-plugin-names");
|
|
38
36
|
const LAST_FAILED_PLUGIN_DETAILS = Symbol.for("@elizaos/plugin-resolver/last-failed-plugin-details");
|
|
39
37
|
const RUNTIME_APP_PLUGIN_SUBPATHS = new Set([
|
|
38
|
+
"@elizaos/plugin-calendar",
|
|
40
39
|
"@elizaos/plugin-companion",
|
|
41
40
|
"@elizaos/plugin-contacts",
|
|
42
41
|
"@elizaos/plugin-elizamaker",
|
|
@@ -429,6 +428,25 @@ async function hasNonSymlinkWorkspaceNodeModulesPackage(pluginName) {
|
|
|
429
428
|
}
|
|
430
429
|
return false;
|
|
431
430
|
}
|
|
431
|
+
async function resolveWorkspaceNodeModulesPackageRoot(packageName) {
|
|
432
|
+
for (const workspaceRoot of uniquePaths([
|
|
433
|
+
process.cwd(),
|
|
434
|
+
...resolveWorkspaceRoots(),
|
|
435
|
+
])) {
|
|
436
|
+
const candidate = path.join(workspaceRoot, "node_modules", ...packageName.split("/"));
|
|
437
|
+
try {
|
|
438
|
+
const stat = await fs.lstat(candidate);
|
|
439
|
+
if (stat.isDirectory() || stat.isSymbolicLink())
|
|
440
|
+
return candidate;
|
|
441
|
+
}
|
|
442
|
+
catch (error) {
|
|
443
|
+
if (error.code !== "ENOENT") {
|
|
444
|
+
throw error;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return null;
|
|
449
|
+
}
|
|
432
450
|
// ---------------------------------------------------------------------------
|
|
433
451
|
// Plugin error boundary wrapper
|
|
434
452
|
// ---------------------------------------------------------------------------
|
|
@@ -516,14 +534,15 @@ export async function importPluginModuleFromPath(installPath, packageName, expor
|
|
|
516
534
|
/* git layout — pkgRoot stays as absPath */
|
|
517
535
|
}
|
|
518
536
|
const packageRelativePath = pkgRoot === absPath ? [] : ["node_modules", ...packageName.split("/")];
|
|
519
|
-
// Cold-boot fast-path
|
|
520
|
-
//
|
|
521
|
-
//
|
|
522
|
-
//
|
|
523
|
-
//
|
|
524
|
-
//
|
|
525
|
-
|
|
526
|
-
|
|
537
|
+
// Cold-boot fast-path: on the FIRST import of this package in this process
|
|
538
|
+
// there is no ESM module record to bust, so staging's recursive `fs.cp` copy
|
|
539
|
+
// is pure I/O waste + unbounded `.runtime-imports/` growth. Import in place
|
|
540
|
+
// from the real package root instead, but ONLY when a stable built `dist/`
|
|
541
|
+
// exists. Any re-import (name already in the set) falls back to staging so
|
|
542
|
+
// hot-reloads still force a fresh module evaluation. This is a single
|
|
543
|
+
// behavior for every boot — local dev and the container resolve plugins
|
|
544
|
+
// identically.
|
|
545
|
+
const useColdFastPath = !importedPluginPackageNames.has(packageName) &&
|
|
527
546
|
existsSync(path.join(pkgRoot, "dist"));
|
|
528
547
|
const importRoot = useColdFastPath
|
|
529
548
|
? pkgRoot
|
|
@@ -782,24 +801,6 @@ function stageFullPluginPackageEnabled() {
|
|
|
782
801
|
const normalized = raw.trim().toLowerCase();
|
|
783
802
|
return normalized === "1" || normalized === "true" || normalized === "yes";
|
|
784
803
|
}
|
|
785
|
-
/**
|
|
786
|
-
* Cold-boot fast-path opt-in. When enabled, the *first* import of a given
|
|
787
|
-
* plugin package in this process is loaded in place from its real package root
|
|
788
|
-
* — skipping the `fs.cp` staging copy — provided a built `dist/` is present.
|
|
789
|
-
*
|
|
790
|
-
* Staging exists only to bust the ESM module graph when hot-reloading a mutated
|
|
791
|
-
* plugin (a fresh staged URL forces re-evaluation since ESM has no
|
|
792
|
-
* cache-eviction API). On a cold boot the plugin was never imported, so there
|
|
793
|
-
* is no module record to bust and staging is pure I/O waste. Default OFF; only
|
|
794
|
-
* the literal "1"/"true"/"yes" enables it.
|
|
795
|
-
*/
|
|
796
|
-
function coldImportInPlaceEnabled() {
|
|
797
|
-
const raw = process.env.ELIZA_PLUGIN_COLD_IMPORT_IN_PLACE;
|
|
798
|
-
if (!raw)
|
|
799
|
-
return false;
|
|
800
|
-
const normalized = raw.trim().toLowerCase();
|
|
801
|
-
return normalized === "1" || normalized === "true" || normalized === "yes";
|
|
802
|
-
}
|
|
803
804
|
const DEFAULT_PLUGIN_INSTANCE_KEEP = 3;
|
|
804
805
|
function pluginInstanceKeepCount() {
|
|
805
806
|
const raw = process.env.ELIZA_PLUGIN_INSTANCE_KEEP;
|
|
@@ -1031,36 +1032,58 @@ function computeVerdictFingerprint(config, isNativePlatform) {
|
|
|
1031
1032
|
return `${isNativePlatform ? "1" : "0"}${env}${JSON.stringify(config)}`;
|
|
1032
1033
|
}
|
|
1033
1034
|
/**
|
|
1034
|
-
* Cheap signature over the directories {@link discoverPluginCandidates} scans
|
|
1035
|
-
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1038
|
-
* changes when one appears.
|
|
1035
|
+
* Cheap signature over the directories {@link discoverPluginCandidates} scans.
|
|
1036
|
+
* Adding/removing a package mutates either `node_modules`, the package scope
|
|
1037
|
+
* dir, or `plugins`, invalidating the cache. Missing directories contribute a
|
|
1038
|
+
* sentinel so the signature still changes when one appears.
|
|
1039
1039
|
*/
|
|
1040
1040
|
async function computePluginCandidateSignature() {
|
|
1041
1041
|
const parts = [];
|
|
1042
1042
|
for (const root of resolveWorkspaceRoots()) {
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
]) {
|
|
1047
|
-
try {
|
|
1048
|
-
const stat = await fs.stat(dir);
|
|
1049
|
-
parts.push(`${dir}:${stat.mtimeMs}`);
|
|
1050
|
-
}
|
|
1051
|
-
catch (err) {
|
|
1052
|
-
if (err.code === "ENOENT") {
|
|
1053
|
-
parts.push(`${dir}:absent`);
|
|
1054
|
-
continue;
|
|
1055
|
-
}
|
|
1056
|
-
throw err;
|
|
1057
|
-
}
|
|
1043
|
+
await addDirectorySignature(parts, path.join(root, "node_modules"));
|
|
1044
|
+
for (const scopeDir of await listNodeModulesScopeDirs(root)) {
|
|
1045
|
+
await addDirectorySignature(parts, scopeDir);
|
|
1058
1046
|
}
|
|
1047
|
+
await addDirectorySignature(parts, path.join(root, "plugins"));
|
|
1059
1048
|
}
|
|
1060
1049
|
return parts.join("|");
|
|
1061
1050
|
}
|
|
1051
|
+
async function addDirectorySignature(parts, dir) {
|
|
1052
|
+
try {
|
|
1053
|
+
const stat = await fs.stat(dir);
|
|
1054
|
+
parts.push(`${dir}:${stat.mtimeMs}`);
|
|
1055
|
+
}
|
|
1056
|
+
catch (err) {
|
|
1057
|
+
if (err.code === "ENOENT") {
|
|
1058
|
+
parts.push(`${dir}:absent`);
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
throw err;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
async function listNodeModulesScopeDirs(root) {
|
|
1065
|
+
const nodeModulesDir = path.join(root, "node_modules");
|
|
1066
|
+
let entries;
|
|
1067
|
+
try {
|
|
1068
|
+
entries = (await fs.readdir(nodeModulesDir, {
|
|
1069
|
+
withFileTypes: true,
|
|
1070
|
+
}));
|
|
1071
|
+
}
|
|
1072
|
+
catch (err) {
|
|
1073
|
+
if (err.code === "ENOENT")
|
|
1074
|
+
return [];
|
|
1075
|
+
throw err;
|
|
1076
|
+
}
|
|
1077
|
+
return entries
|
|
1078
|
+
.filter((entry) => entry.name.startsWith("@") &&
|
|
1079
|
+
(entry.isDirectory() || entry.isSymbolicLink()))
|
|
1080
|
+
.map((entry) => path.join(nodeModulesDir, entry.name));
|
|
1081
|
+
}
|
|
1082
|
+
function isPluginPackageDirName(name) {
|
|
1083
|
+
return name.startsWith("plugin-") || name.startsWith("app-");
|
|
1084
|
+
}
|
|
1062
1085
|
/**
|
|
1063
|
-
* Walk
|
|
1086
|
+
* Walk plugin/app packages in node_modules + workspace `plugins/` dirs and
|
|
1064
1087
|
* return every package that has a `package.json`. The manifest evaluator
|
|
1065
1088
|
* filters these down to the ones that actually declare an `elizaos.plugin`
|
|
1066
1089
|
* block — this discovery step is intentionally cheap (a single readdir + stat
|
|
@@ -1087,13 +1110,13 @@ async function discoverPluginCandidatesUncached() {
|
|
|
1087
1110
|
seen.add(pkgName);
|
|
1088
1111
|
candidates.push({ packageName: pkgName, packageRoot: pkgRoot });
|
|
1089
1112
|
};
|
|
1090
|
-
// 1. node_modules
|
|
1091
|
-
// pointing at workspace packages.
|
|
1113
|
+
// 1. node_modules plugin/app packages — covers npm-installed official and
|
|
1114
|
+
// third-party plugins plus dev symlinks pointing at workspace packages.
|
|
1092
1115
|
for (const root of resolveWorkspaceRoots()) {
|
|
1093
|
-
const
|
|
1116
|
+
const nodeModulesDir = path.join(root, "node_modules");
|
|
1094
1117
|
let entries;
|
|
1095
1118
|
try {
|
|
1096
|
-
entries = (await fs.readdir(
|
|
1119
|
+
entries = (await fs.readdir(nodeModulesDir, {
|
|
1097
1120
|
withFileTypes: true,
|
|
1098
1121
|
}));
|
|
1099
1122
|
}
|
|
@@ -1105,16 +1128,34 @@ async function discoverPluginCandidatesUncached() {
|
|
|
1105
1128
|
for (const entry of entries) {
|
|
1106
1129
|
if (!entry.isDirectory() && !entry.isSymbolicLink())
|
|
1107
1130
|
continue;
|
|
1108
|
-
if (entry.name.startsWith("
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1131
|
+
if (entry.name.startsWith("@")) {
|
|
1132
|
+
const scopeDir = path.join(nodeModulesDir, entry.name);
|
|
1133
|
+
let scopedEntries;
|
|
1134
|
+
try {
|
|
1135
|
+
scopedEntries = (await fs.readdir(scopeDir, {
|
|
1136
|
+
withFileTypes: true,
|
|
1137
|
+
}));
|
|
1138
|
+
}
|
|
1139
|
+
catch (err) {
|
|
1140
|
+
if (err.code === "ENOENT")
|
|
1141
|
+
continue;
|
|
1142
|
+
throw err;
|
|
1143
|
+
}
|
|
1144
|
+
for (const scopedEntry of scopedEntries) {
|
|
1145
|
+
if (!scopedEntry.isDirectory() && !scopedEntry.isSymbolicLink()) {
|
|
1146
|
+
continue;
|
|
1147
|
+
}
|
|
1148
|
+
if (!isPluginPackageDirName(scopedEntry.name))
|
|
1149
|
+
continue;
|
|
1150
|
+
const pkgRoot = path.join(scopeDir, scopedEntry.name);
|
|
1151
|
+
await tryAdd(pkgRoot, `${entry.name}/${scopedEntry.name}`);
|
|
1152
|
+
}
|
|
1114
1153
|
continue;
|
|
1115
1154
|
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1155
|
+
if (!isPluginPackageDirName(entry.name))
|
|
1156
|
+
continue;
|
|
1157
|
+
const pkgRoot = path.join(nodeModulesDir, entry.name);
|
|
1158
|
+
await tryAdd(pkgRoot, entry.name);
|
|
1118
1159
|
}
|
|
1119
1160
|
}
|
|
1120
1161
|
// 2. workspace `plugins/` dir — covers cases where the plugin is in the
|
|
@@ -1186,8 +1227,8 @@ export async function resolvePlugins(config, opts) {
|
|
|
1186
1227
|
// silently dropped. Capture the result and assign back so both the allow
|
|
1187
1228
|
// list and any downstream config reads see the mutation.
|
|
1188
1229
|
//
|
|
1189
|
-
// Auto-enable is sourced exclusively from per-plugin manifests: walk
|
|
1190
|
-
//
|
|
1230
|
+
// Auto-enable is sourced exclusively from per-plugin manifests: walk plugin
|
|
1231
|
+
// and app package.json files on disk and run each plugin's
|
|
1191
1232
|
// autoEnableModule.shouldEnable(ctx). Each plugin owns its own enable
|
|
1192
1233
|
// conditions in auto-enable.ts — no central map exists.
|
|
1193
1234
|
//
|
|
@@ -1336,6 +1377,13 @@ export async function resolvePlugins(config, opts) {
|
|
|
1336
1377
|
const staticElizaPlugin = await resolveStaticElizaPlugin(pluginName);
|
|
1337
1378
|
const exportSubpath = runtimePluginExportSubpath(pluginName);
|
|
1338
1379
|
const importOfficialPluginFromNodeModules = async () => (await import(__rewriteRelativeImportExtension(resolveRuntimePluginImportSpecifier(pluginName))));
|
|
1380
|
+
const importPluginFromWorkspaceNodeModules = async () => {
|
|
1381
|
+
const packageRoot = await resolveWorkspaceNodeModulesPackageRoot(pluginName);
|
|
1382
|
+
if (!packageRoot) {
|
|
1383
|
+
return (await import(__rewriteRelativeImportExtension(runtimePluginImportSpecifier(pluginName))));
|
|
1384
|
+
}
|
|
1385
|
+
return importPluginModuleFromPath(packageRoot, pluginName, exportSubpath);
|
|
1386
|
+
};
|
|
1339
1387
|
// Pre-flight: opportunistically prepare special plugin dependencies.
|
|
1340
1388
|
// For plugin-browser, stagehand-server is only needed by the optional
|
|
1341
1389
|
// `stagehand` backend. The app workspace and Chrome/Safari bridge backends
|
|
@@ -1426,7 +1474,7 @@ export async function resolvePlugins(config, opts) {
|
|
|
1426
1474
|
const staticMod = await resolveStaticElizaPlugin(pluginName);
|
|
1427
1475
|
mod = staticMod
|
|
1428
1476
|
? staticMod
|
|
1429
|
-
:
|
|
1477
|
+
: await importPluginFromWorkspaceNodeModules();
|
|
1430
1478
|
if (repairBrokenInstallRecord(config, pluginName)) {
|
|
1431
1479
|
repairedInstallRecords.add(pluginName);
|
|
1432
1480
|
}
|
|
@@ -1450,7 +1498,7 @@ export async function resolvePlugins(config, opts) {
|
|
|
1450
1498
|
// node_modules resolution).
|
|
1451
1499
|
mod = staticElizaPlugin
|
|
1452
1500
|
? staticElizaPlugin
|
|
1453
|
-
:
|
|
1501
|
+
: await importPluginFromWorkspaceNodeModules();
|
|
1454
1502
|
}
|
|
1455
1503
|
const pluginInstance = findRuntimePluginExport(mod);
|
|
1456
1504
|
if (pluginInstance) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Plugin } from "@elizaos/core";
|
|
2
|
-
import type { PluginInstallRecord } from "../config/types.eliza.
|
|
2
|
+
import type { PluginInstallRecord } from "../config/types.eliza.js";
|
|
3
3
|
/** A successfully resolved plugin ready for AgentRuntime registration. */
|
|
4
4
|
export interface ResolvedPlugin {
|
|
5
5
|
/** npm package name (e.g. "@elizaos/plugin-anthropic"). */
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* and optional prompt tracing/capture. Controlled via ELIZA_* env vars.
|
|
6
6
|
*/
|
|
7
7
|
import { type AgentRuntime } from "@elizaos/core";
|
|
8
|
-
import type { ElizaConfig } from "../config/types.
|
|
9
|
-
import type { CompactorMessage, CompactorModelCall } from "./conversation-compactor.types.
|
|
10
|
-
import { type ApplyConversationCompactionResult, type ApplyConversationMessageCompactionResult } from "./conversation-compactor-runtime.
|
|
11
|
-
export { buildFullParamActionSet, compactActionsForIntent, detectIntentCategories, } from "./prompt-compaction.
|
|
8
|
+
import type { ElizaConfig } from "../config/types.js";
|
|
9
|
+
import type { CompactorMessage, CompactorModelCall } from "./conversation-compactor.types.js";
|
|
10
|
+
import { type ApplyConversationCompactionResult, type ApplyConversationMessageCompactionResult } from "./conversation-compactor-runtime.js";
|
|
11
|
+
export { buildFullParamActionSet, compactActionsForIntent, detectIntentCategories, } from "./prompt-compaction.js";
|
|
12
12
|
export interface CapturedModelUsage {
|
|
13
13
|
promptTokens: number;
|
|
14
14
|
completionTokens: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface RuntimeSettingSource {
|
|
2
|
+
getSetting(key: string): unknown;
|
|
3
|
+
}
|
|
4
|
+
type EnvSource = Record<string, string | undefined>;
|
|
5
|
+
export declare function shouldLoadRemoteCodingRunnerForBoot(runtime: RuntimeSettingSource, env?: EnvSource): boolean;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=remote-coding-runner-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-coding-runner-gate.d.ts","sourceRoot":"","sources":["../../src/runtime/remote-coding-runner-gate.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC5B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAClC;AAED,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAoCpD,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,oBAAoB,EAC7B,GAAG,GAAE,SAAuB,GAC3B,OAAO,CAQT"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const RUNNER_SETTING_KEYS = [
|
|
2
|
+
"ELIZA_CODING_REMOTE_RUNNER",
|
|
3
|
+
"ELIZA_REMOTE_RUNNER",
|
|
4
|
+
];
|
|
5
|
+
const REMOTE_RUNNER_URL_KEYS = [
|
|
6
|
+
"ELIZA_CLOUD_SANDBOX_BASE_URL",
|
|
7
|
+
"ELIZA_CLOUD_REMOTE_RUNNER_URL",
|
|
8
|
+
"ELIZA_CLOUD_RUNNER_URL",
|
|
9
|
+
"ELIZA_HOME_REMOTE_RUNNER_URL",
|
|
10
|
+
"ELIZA_HOME_RUNNER_URL",
|
|
11
|
+
];
|
|
12
|
+
function readSetting(runtime, env, key) {
|
|
13
|
+
const fromRuntime = runtime.getSetting(key);
|
|
14
|
+
if (typeof fromRuntime === "string" && fromRuntime.trim().length > 0) {
|
|
15
|
+
return fromRuntime.trim();
|
|
16
|
+
}
|
|
17
|
+
const fromEnv = env[key];
|
|
18
|
+
if (typeof fromEnv === "string" && fromEnv.trim().length > 0) {
|
|
19
|
+
return fromEnv.trim();
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
function truthySetting(value) {
|
|
24
|
+
if (!value)
|
|
25
|
+
return false;
|
|
26
|
+
return ["1", "true", "yes", "on"].includes(value.toLowerCase());
|
|
27
|
+
}
|
|
28
|
+
export function shouldLoadRemoteCodingRunnerForBoot(runtime, env = process.env) {
|
|
29
|
+
if (RUNNER_SETTING_KEYS.some((key) => readSetting(runtime, env, key))) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
if (truthySetting(readSetting(runtime, env, "ELIZA_E2B_REMOTE_RUNNER"))) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
return REMOTE_RUNNER_URL_KEYS.some((key) => readSetting(runtime, env, key));
|
|
36
|
+
}
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
import { type Plugin, roleAction } from "@elizaos/core";
|
|
17
|
-
export { rolesProvider } from "./provider.
|
|
18
|
-
export type { ConnectorAdminWhitelist, RoleCheckResult, RoleGrantSource, RoleName, RolesConfig, RolesWorldMetadata, } from "./types.
|
|
19
|
-
export { ROLE_RANK } from "./types.
|
|
20
|
-
export { canModifyRole, checkSenderPrivateAccess, checkSenderRole, getConfiguredOwnerEntityIds, getConnectorAdminWhitelist, getEntityRole, hasConfiguredCanonicalOwner, matchEntityToConnectorAdminWhitelist, normalizeRole, resolveCanonicalOwnerId, resolveCanonicalOwnerIdForMessage, resolveEntityRole, resolveWorldForMessage, setConnectorAdminWhitelist, setEntityRole, } from "./utils.
|
|
17
|
+
export { rolesProvider } from "./provider.js";
|
|
18
|
+
export type { ConnectorAdminWhitelist, RoleCheckResult, RoleGrantSource, RoleName, RolesConfig, RolesWorldMetadata, } from "./types.js";
|
|
19
|
+
export { ROLE_RANK } from "./types.js";
|
|
20
|
+
export { canModifyRole, checkSenderPrivateAccess, checkSenderRole, getConfiguredOwnerEntityIds, getConnectorAdminWhitelist, getEntityRole, hasConfiguredCanonicalOwner, matchEntityToConnectorAdminWhitelist, normalizeRole, resolveCanonicalOwnerId, resolveCanonicalOwnerIdForMessage, resolveEntityRole, resolveWorldForMessage, setConnectorAdminWhitelist, setEntityRole, } from "./utils.js";
|
|
21
21
|
export { roleAction };
|
|
22
22
|
declare const rolesPlugin: Plugin;
|
|
23
23
|
export default rolesPlugin;
|
package/runtime/roles.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./roles/src/index.
|
|
2
|
-
export { default } from "./roles/src/index.
|
|
1
|
+
export * from "./roles/src/index.js";
|
|
2
|
+
export { default } from "./roles/src/index.js";
|
|
3
3
|
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* config unchanged when the env var is absent or unparseable,
|
|
15
15
|
* so it is inert for every non-provisioned runtime.
|
|
16
16
|
*/
|
|
17
|
-
import type { ElizaConfig } from "../config/config.
|
|
17
|
+
import type { ElizaConfig } from "../config/config.js";
|
|
18
18
|
/**
|
|
19
19
|
* Whether this container should own (connect directly to) its platform
|
|
20
20
|
* connectors. Default false: the gateway owns the connection and forwards
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* forces this — a process-only cache could rely on the surrounding
|
|
15
15
|
* trajectory filter, but a shared on-disk store cannot.
|
|
16
16
|
*/
|
|
17
|
-
import type { CacheableToolDescriptor, PrivacyRedactor, ToolArgs, ToolCacheEntry, ToolOutput } from "./types.
|
|
17
|
+
import type { CacheableToolDescriptor, PrivacyRedactor, ToolArgs, ToolCacheEntry, ToolOutput } from "./types.js";
|
|
18
18
|
export interface ToolCallCacheOptions {
|
|
19
19
|
/** Root directory for the on-disk tier. Defaults to `<stateDir>/tool-cache`. */
|
|
20
20
|
diskRoot?: string;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* already cross network or shell boundaries, so a small fs touch is in the
|
|
10
10
|
* noise. Writes go through the privacy redactor before serialisation.
|
|
11
11
|
*/
|
|
12
|
-
import type { PrivacyRedactor, ToolCacheEntry } from "./types.
|
|
12
|
+
import type { PrivacyRedactor, ToolCacheEntry } from "./types.js";
|
|
13
13
|
export declare class DiskStore {
|
|
14
14
|
private readonly root;
|
|
15
15
|
private readonly redact;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type { ToolCallCacheOptions } from "./cache.
|
|
2
|
-
export { ToolCallCache } from "./cache.
|
|
3
|
-
export { buildCacheKey, canonicalizeJson } from "./key.
|
|
4
|
-
export { defaultPrivacyRedactor } from "./redact.
|
|
5
|
-
export { CACHEABLE_TOOL_REGISTRY, isCacheable, resolveToolDescriptor, } from "./registry.
|
|
6
|
-
export type { CacheableToolDescriptor, PrivacyRedactor, ToolArgs, ToolCacheEntry, ToolOutput, } from "./types.
|
|
1
|
+
export type { ToolCallCacheOptions } from "./cache.js";
|
|
2
|
+
export { ToolCallCache } from "./cache.js";
|
|
3
|
+
export { buildCacheKey, canonicalizeJson } from "./key.js";
|
|
4
|
+
export { defaultPrivacyRedactor } from "./redact.js";
|
|
5
|
+
export { CACHEABLE_TOOL_REGISTRY, isCacheable, resolveToolDescriptor, } from "./registry.js";
|
|
6
|
+
export type { CacheableToolDescriptor, PrivacyRedactor, ToolArgs, ToolCacheEntry, ToolOutput, } from "./types.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* argument shapes (e.g. `{a:1,b:2}` and `{b:2,a:1}`) collide on the same
|
|
6
6
|
* key. The final key is `sha256(toolName + ':' + canonicalJson)`.
|
|
7
7
|
*/
|
|
8
|
-
import type { ToolArgs } from "./types.
|
|
8
|
+
import type { ToolArgs } from "./types.js";
|
|
9
9
|
export declare function canonicalizeJson(value: unknown): string;
|
|
10
10
|
export declare function buildCacheKey(toolName: string, args: ToolArgs): string;
|
|
11
11
|
//# sourceMappingURL=key.d.ts.map
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
* - environment-variable values whose key name looks like a secret
|
|
13
13
|
* - geographic coordinates (matching the Location-plugin patterns)
|
|
14
14
|
*/
|
|
15
|
-
import type { PrivacyRedactor } from "./types.
|
|
15
|
+
import type { PrivacyRedactor } from "./types.js";
|
|
16
16
|
export declare const defaultPrivacyRedactor: PrivacyRedactor;
|
|
17
17
|
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* against a working tree) get short TTLs; tools whose results are stable
|
|
12
12
|
* across days (search results, immutable web archives) get longer ones.
|
|
13
13
|
*/
|
|
14
|
-
import type { CacheableToolDescriptor } from "./types.
|
|
14
|
+
import type { CacheableToolDescriptor } from "./types.js";
|
|
15
15
|
export declare const CACHEABLE_TOOL_REGISTRY: Record<string, CacheableToolDescriptor>;
|
|
16
16
|
export declare function resolveToolDescriptor(name: string, overrides?: Partial<Pick<CacheableToolDescriptor, "ttlMs" | "version">>): CacheableToolDescriptor;
|
|
17
17
|
export declare function isCacheable(name: string): boolean;
|
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
* Wraps the `handler` of every registered Action that the cache registry
|
|
5
5
|
* marks as `cacheable: true` so the result of a (toolName, args) pair is
|
|
6
6
|
* served from the two-tier `ToolCallCache` instead of re-running the
|
|
7
|
-
* underlying tool. Side-effect tools and any tool not
|
|
8
|
-
*
|
|
7
|
+
* underlying tool. Side-effect tools and any tool not in the cacheable-tool
|
|
8
|
+
* registry pass through unchanged.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* config block (see `zod-schema.agent-runtime.ts`).
|
|
10
|
+
* `plugin-lifecycle.ts` calls `wrapActionWithCache(action, cache, cfg)` per
|
|
11
|
+
* action after building the cache from config. Per-tool TTL overrides come
|
|
12
|
+
* from the `tools.cache` config block (see `zod-schema.agent-runtime.ts`).
|
|
14
13
|
*/
|
|
15
14
|
import type { Action } from "@elizaos/core";
|
|
16
|
-
import {
|
|
15
|
+
import { ToolCallCache } from "./tool-call-cache/index.js";
|
|
17
16
|
interface PerToolOverride {
|
|
18
17
|
ttlMinutes?: number;
|
|
19
18
|
version?: string;
|
|
@@ -34,6 +33,5 @@ export declare function createToolCallCacheFromConfig(cfg: ToolCacheConfig | und
|
|
|
34
33
|
* Non-cacheable actions are returned unchanged.
|
|
35
34
|
*/
|
|
36
35
|
export declare function wrapActionWithCache(action: Action, cache: ToolCallCache, cfg: ToolCacheConfig | undefined): Action;
|
|
37
|
-
export
|
|
38
|
-
export { CACHEABLE_TOOL_REGISTRY };
|
|
36
|
+
export {};
|
|
39
37
|
//# sourceMappingURL=tool-call-cache-wrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call-cache-wrapper.d.ts","sourceRoot":"","sources":["../../src/runtime/tool-call-cache-wrapper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tool-call-cache-wrapper.d.ts","sourceRoot":"","sources":["../../src/runtime/tool-call-cache-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,MAAM,EAIP,MAAM,eAAe,CAAC;AACvB,OAAO,EAKL,aAAa,EAEd,MAAM,4BAA4B,CAAC;AAEpC,UAAU,eAAe;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,eAAe,GAAG,SAAS,GAC/B,aAAa,GAAG,IAAI,CAOtB;AAyBD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,eAAe,GAAG,SAAS,GAC/B,MAAM,CAwBR"}
|
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
* Wraps the `handler` of every registered Action that the cache registry
|
|
5
5
|
* marks as `cacheable: true` so the result of a (toolName, args) pair is
|
|
6
6
|
* served from the two-tier `ToolCallCache` instead of re-running the
|
|
7
|
-
* underlying tool. Side-effect tools and any tool not
|
|
8
|
-
*
|
|
7
|
+
* underlying tool. Side-effect tools and any tool not in the cacheable-tool
|
|
8
|
+
* registry pass through unchanged.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* config block (see `zod-schema.agent-runtime.ts`).
|
|
10
|
+
* `plugin-lifecycle.ts` calls `wrapActionWithCache(action, cache, cfg)` per
|
|
11
|
+
* action after building the cache from config. Per-tool TTL overrides come
|
|
12
|
+
* from the `tools.cache` config block (see `zod-schema.agent-runtime.ts`).
|
|
14
13
|
*/
|
|
15
|
-
import {
|
|
14
|
+
import { defaultPrivacyRedactor, isCacheable, resolveToolDescriptor, ToolCallCache, } from "./tool-call-cache/index.js";
|
|
16
15
|
/**
|
|
17
16
|
* Build a ToolCallCache from agent runtime config. Returns null when the
|
|
18
17
|
* cache is disabled so callers can skip the wrap-step entirely.
|
|
@@ -66,7 +65,3 @@ export function wrapActionWithCache(action, cache, cfg) {
|
|
|
66
65
|
};
|
|
67
66
|
return { ...action, handler: wrapped };
|
|
68
67
|
}
|
|
69
|
-
export function wrapActionsWithCache(actions, cache, cfg) {
|
|
70
|
-
return actions.map((a) => wrapActionWithCache(a, cache, cfg));
|
|
71
|
-
}
|
|
72
|
-
export { CACHEABLE_TOOL_REGISTRY };
|