@elizaos/agent 2.0.3-beta.2 → 2.0.3-beta.4
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 +107 -72
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-time-setup.d.ts","sourceRoot":"","sources":["../../src/runtime/first-time-setup.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"first-time-setup.d.ts","sourceRoot":"","sources":["../../src/runtime/first-time-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAiBH,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,qBAAqB,CAAC;AASxE,KAAK,yBAAyB,GAAG,mBAAmB,CAAC;AAErD,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE;IACJ,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;CACxD,GACA,WAAW,CA+Db;AAyFD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC1E;AAMD,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,WAAW,CAAC,CAwjBtB"}
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
* 7. GitHub access (local runtime only)
|
|
15
15
|
* 8. Persist agent + style + provider + embedding config
|
|
16
16
|
*
|
|
17
|
-
* Extracted from eliza.ts to reduce file size.
|
|
18
|
-
*
|
|
19
17
|
* @module first-time-setup
|
|
20
18
|
*/
|
|
21
19
|
import { buildDefaultElizaCloudServiceRouting, buildElizaCloudServiceRoute, formatError, getStylePresets, migrateLegacyRuntimeConfig, } from "@elizaos/shared";
|
package/runtime/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from "./advanced-capabilities-config.
|
|
2
|
-
export * from "./agent-event-service.
|
|
3
|
-
export * from "./conversation-compactor.
|
|
4
|
-
export * from "./conversation-compactor.types.
|
|
5
|
-
export * from "./eliza.
|
|
6
|
-
export * from "./eliza-plugin.
|
|
7
|
-
export * from "./first-run-names.
|
|
8
|
-
export * from "./owner-entity.
|
|
9
|
-
export * from "./plugin-collector.
|
|
10
|
-
export * from "./plugin-lifecycle.
|
|
11
|
-
export { getLastFailedPluginDetails, getLastFailedPluginNames, resolvePlugins, } from "./plugin-resolver.
|
|
12
|
-
export * from "./plugin-types.
|
|
13
|
-
export * from "./release-plugin-policy.
|
|
14
|
-
export * from "./roles.
|
|
15
|
-
export * from "./trajectory-internals.
|
|
16
|
-
export * from "./trajectory-persistence.
|
|
17
|
-
export * from "./trajectory-query.
|
|
18
|
-
export * from "./version.
|
|
1
|
+
export * from "./advanced-capabilities-config.js";
|
|
2
|
+
export * from "./agent-event-service.js";
|
|
3
|
+
export * from "./conversation-compactor.js";
|
|
4
|
+
export * from "./conversation-compactor.types.js";
|
|
5
|
+
export * from "./eliza.js";
|
|
6
|
+
export * from "./eliza-plugin.js";
|
|
7
|
+
export * from "./first-run-names.js";
|
|
8
|
+
export * from "./owner-entity.js";
|
|
9
|
+
export * from "./plugin-collector.js";
|
|
10
|
+
export * from "./plugin-lifecycle.js";
|
|
11
|
+
export { getLastFailedPluginDetails, getLastFailedPluginNames, resolvePlugins, } from "./plugin-resolver.js";
|
|
12
|
+
export * from "./plugin-types.js";
|
|
13
|
+
export * from "./release-plugin-policy.js";
|
|
14
|
+
export * from "./roles.js";
|
|
15
|
+
export * from "./trajectory-internals.js";
|
|
16
|
+
export * from "./trajectory-persistence.js";
|
|
17
|
+
export * from "./trajectory-query.js";
|
|
18
|
+
export * from "./version.js";
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentRuntime, Plugin } from "@elizaos/core";
|
|
2
|
-
import { PluginCompiler } from "../services/plugin-compiler.
|
|
3
|
-
import type { VirtualFilesystemService } from "../services/virtual-filesystem.
|
|
2
|
+
import { PluginCompiler } from "../services/plugin-compiler.js";
|
|
3
|
+
import type { VirtualFilesystemService } from "../services/virtual-filesystem.js";
|
|
4
4
|
export interface LoadPluginFromVfsOptions {
|
|
5
5
|
runtime: AgentRuntime;
|
|
6
6
|
vfs: VirtualFilesystemService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-dns.d.ts","sourceRoot":"","sources":["../../src/runtime/mobile-dns.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mobile-dns.d.ts","sourceRoot":"","sources":["../../src/runtime/mobile-dns.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAwFjD"}
|
package/runtime/mobile-dns.js
CHANGED
|
@@ -3,6 +3,7 @@ import http from "node:http";
|
|
|
3
3
|
import https from "node:https";
|
|
4
4
|
import net from "node:net";
|
|
5
5
|
import zlib from "node:zlib";
|
|
6
|
+
import { isMobilePlatform } from "@elizaos/shared";
|
|
6
7
|
/**
|
|
7
8
|
* Public resolvers the on-device agent dials directly. Android/iOS expose no
|
|
8
9
|
* `/etc/resolv.conf` (DNS is brokered by the OS resolver — netd on Android),
|
|
@@ -14,10 +15,6 @@ import zlib from "node:zlib";
|
|
|
14
15
|
*/
|
|
15
16
|
const MOBILE_DNS_SERVERS = ["1.1.1.1", "8.8.8.8"];
|
|
16
17
|
let configured = false;
|
|
17
|
-
function isMobilePlatform() {
|
|
18
|
-
const platform = process.env.ELIZA_PLATFORM?.toLowerCase();
|
|
19
|
-
return platform === "android" || platform === "ios";
|
|
20
|
-
}
|
|
21
18
|
/** A real external hostname needing resolution (not an IP literal or loopback). */
|
|
22
19
|
function needsResolution(hostname) {
|
|
23
20
|
if (!hostname)
|
|
@@ -93,7 +90,7 @@ export function configureMobileDnsIfNeeded() {
|
|
|
93
90
|
if (err)
|
|
94
91
|
reject(err);
|
|
95
92
|
else
|
|
96
|
-
resolve(options?.all ? address : { address, family });
|
|
93
|
+
resolve((options?.all ? address : { address, family }));
|
|
97
94
|
});
|
|
98
95
|
}));
|
|
99
96
|
installFetchOverNodeHttp(lookup);
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* - all changedPaths under env./vars./models. → hot
|
|
21
21
|
* - otherwise → cold
|
|
22
22
|
*/
|
|
23
|
-
import type { OperationIntent, ReloadTier } from "./types.
|
|
23
|
+
import type { OperationIntent, ReloadTier } from "./types.js";
|
|
24
24
|
export interface ClassifyContext {
|
|
25
25
|
currentProvider?: string;
|
|
26
26
|
currentApiKey?: string;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* synthetic timestamp-only sub-phases.
|
|
8
8
|
*/
|
|
9
9
|
import type { AgentRuntime } from "@elizaos/core";
|
|
10
|
-
import type { ReloadStrategy } from "./types.
|
|
10
|
+
import type { ReloadStrategy } from "./types.js";
|
|
11
11
|
export interface ColdStrategyOptions {
|
|
12
12
|
/**
|
|
13
13
|
* Restart closure injected from the API server boot path. Returns the
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* - Treat optional/missing runtime surface as "not applicable, ok".
|
|
12
12
|
* - Treat real failures (DB ping false, provider unreachable) as failures.
|
|
13
13
|
*/
|
|
14
|
-
import type { HealthCheck } from "./types.
|
|
14
|
+
import type { HealthCheck } from "./types.js";
|
|
15
15
|
export declare function describeError(err: unknown): string;
|
|
16
16
|
export declare const runtimeReadyCheck: HealthCheck;
|
|
17
17
|
export declare const essentialServicesCheck: HealthCheck;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* Logging prefix: `[runtime-ops:health]`.
|
|
16
16
|
*/
|
|
17
17
|
import { type AgentRuntime } from "@elizaos/core";
|
|
18
|
-
import type { HealthCheck, HealthCheckReport } from "./types.
|
|
18
|
+
import type { HealthCheck, HealthCheckReport } from "./types.js";
|
|
19
19
|
export declare class HealthChecker {
|
|
20
20
|
private readonly checks;
|
|
21
21
|
register(check: HealthCheck): void;
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* Implementations are sibling files; this barrel keeps consumers off the
|
|
5
5
|
* individual paths.
|
|
6
6
|
*/
|
|
7
|
-
export { type ClassifyContext, classifyOperation, defaultClassifier, } from "./classifier.
|
|
8
|
-
export type { ColdStrategyOptions } from "./cold-strategy.
|
|
9
|
-
export { createColdStrategy } from "./cold-strategy.
|
|
10
|
-
export { getDefaultHealthChecker, HealthChecker } from "./health.
|
|
11
|
-
export { builtInHealthChecks, dbConnectionCheck, essentialServicesCheck, providerSmokeCheck, runtimeReadyCheck, } from "./health-checks.
|
|
12
|
-
export { DefaultRuntimeOperationManager, type DefaultRuntimeOperationManagerOptions, type IntentClassifier, } from "./manager.
|
|
13
|
-
export { createHotStrategy, type HotStrategyDeps } from "./reload-hot.
|
|
14
|
-
export { FilesystemRuntimeOperationRepository, getDefaultRepository, } from "./repository.
|
|
15
|
-
export * from "./types.
|
|
16
|
-
export { _resetDefaultSecretsManagerForTesting, defaultSecretsManager, formatVaultRef, isVaultRef, parseVaultRef, persistProviderApiKey, resolveConfigEnvForProcess, resolveProviderApiKey, type VaultLike, vaultKeyForProviderApiKey, } from "./vault-bridge.
|
|
7
|
+
export { type ClassifyContext, classifyOperation, defaultClassifier, } from "./classifier.js";
|
|
8
|
+
export type { ColdStrategyOptions } from "./cold-strategy.js";
|
|
9
|
+
export { createColdStrategy } from "./cold-strategy.js";
|
|
10
|
+
export { getDefaultHealthChecker, HealthChecker } from "./health.js";
|
|
11
|
+
export { builtInHealthChecks, dbConnectionCheck, essentialServicesCheck, providerSmokeCheck, runtimeReadyCheck, } from "./health-checks.js";
|
|
12
|
+
export { DefaultRuntimeOperationManager, type DefaultRuntimeOperationManagerOptions, type IntentClassifier, } from "./manager.js";
|
|
13
|
+
export { createHotStrategy, type HotStrategyDeps } from "./reload-hot.js";
|
|
14
|
+
export { FilesystemRuntimeOperationRepository, getDefaultRepository, } from "./repository.js";
|
|
15
|
+
export * from "./types.js";
|
|
16
|
+
export { _resetDefaultSecretsManagerForTesting, defaultSecretsManager, formatVaultRef, isVaultRef, parseVaultRef, persistProviderApiKey, resolveConfigEnvForProcess, resolveProviderApiKey, type VaultLike, vaultKeyForProviderApiKey, } from "./vault-bridge.js";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* `executeOperation` calls via a Promise chain.
|
|
16
16
|
*/
|
|
17
17
|
import type { AgentRuntime } from "@elizaos/core";
|
|
18
|
-
import type { ClassifyContext } from "./classifier.
|
|
19
|
-
import type { HealthChecker } from "./health.
|
|
20
|
-
import type { OperationIntent, ReloadStrategy, ReloadTier, RuntimeOperation, RuntimeOperationListOptions, RuntimeOperationManager, RuntimeOperationRepository, StartOperationOutcome, StartOperationRequest } from "./types.
|
|
18
|
+
import type { ClassifyContext } from "./classifier.js";
|
|
19
|
+
import type { HealthChecker } from "./health.js";
|
|
20
|
+
import type { OperationIntent, ReloadStrategy, ReloadTier, RuntimeOperation, RuntimeOperationListOptions, RuntimeOperationManager, RuntimeOperationRepository, StartOperationOutcome, StartOperationRequest } from "./types.js";
|
|
21
21
|
export type IntentClassifier = (intent: OperationIntent, ctx: ClassifyContext) => ReloadTier;
|
|
22
22
|
export interface DefaultRuntimeOperationManagerOptions {
|
|
23
23
|
repository: RuntimeOperationRepository;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import type { AgentRuntime } from "@elizaos/core";
|
|
18
18
|
import type { SecretsManager } from "@elizaos/vault";
|
|
19
|
-
import type { ProviderSwitchIntent, ReloadStrategy } from "./types.
|
|
19
|
+
import type { ProviderSwitchIntent, ReloadStrategy } from "./types.js";
|
|
20
20
|
export interface HotStrategyDeps {
|
|
21
21
|
/**
|
|
22
22
|
* Apply env-var / config mutations for a provider switch. Defaults wrap the
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* Pruning also runs opportunistically after each `create` so a long-running
|
|
20
20
|
* process doesn't accumulate state between hydrations.
|
|
21
21
|
*/
|
|
22
|
-
import type { OperationPhase, RuntimeOperation, RuntimeOperationListOptions, RuntimeOperationRepository } from "./types.
|
|
22
|
+
import type { OperationPhase, RuntimeOperation, RuntimeOperationListOptions, RuntimeOperationRepository } from "./types.js";
|
|
23
23
|
export interface FilesystemRuntimeOperationRepositoryOptions {
|
|
24
24
|
/** Override the retention window for terminal ops. */
|
|
25
25
|
retentionMs?: number;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* which constructs a fresh manager backed by the OS-keychain vault.
|
|
15
15
|
*/
|
|
16
16
|
import { type SecretsManager, type Vault } from "@elizaos/vault";
|
|
17
|
-
import type { OperationErrorCode } from "./types.
|
|
17
|
+
import type { OperationErrorCode } from "./types.js";
|
|
18
18
|
export declare class VaultResolveError extends Error {
|
|
19
19
|
readonly code: OperationErrorCode;
|
|
20
20
|
constructor(apiKeyRef: string, cause: unknown);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export declare function resolvePluginPackageAlias(packageName: string): string;
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Maps Eliza channel names to plugin package names. Derived at registry build
|
|
4
|
+
* time from each connector entry's `channels` (e.g. x -> ["x", "twitter"]); see
|
|
5
|
+
* packages/registry/src/first-party. To add/rename a channel, edit the owning
|
|
6
|
+
* connector's registry-entry.json `channels` and regenerate — not this list.
|
|
7
|
+
*/
|
|
3
8
|
export declare const CHANNEL_PLUGIN_MAP: Readonly<Record<string, string>>;
|
|
4
9
|
/** Maps environment variable names to model-provider plugin packages. */
|
|
5
10
|
export declare const PROVIDER_PLUGIN_MAP: Readonly<Record<string, string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-collector.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin-collector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-collector.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin-collector.ts"],"names":[],"mappings":"AAoIA,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAErE;AAuBD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAC9C,CAAC;AAEnB,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2BhE,CAAC;AAuCF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqDhE,CAAC;AAMF;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -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;
|