@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
package/api/views-routes.js
CHANGED
|
@@ -22,7 +22,9 @@ import { promises as fs } from "node:fs";
|
|
|
22
22
|
import path from "node:path";
|
|
23
23
|
import { EventType, logger, } from "@elizaos/core";
|
|
24
24
|
import { readJsonBody } from "@elizaos/shared";
|
|
25
|
-
import {
|
|
25
|
+
import { AGENT_SURFACE_CAPABILITY_IDS } from "@elizaos/ui/agent-surface/types";
|
|
26
|
+
import { STANDARD_CAPABILITIES } from "@elizaos/ui/views/view-interact-protocol";
|
|
27
|
+
import { clearActiveViewContext, getActiveViewContext, setActiveViewContext, setActiveViewElements, } from "../runtime/view-action-affinity.js";
|
|
26
28
|
import { PendingRequestMap, } from "./pending-request-map.js";
|
|
27
29
|
import { detectClientPlatform, isDynamicLoadingAllowed, } from "./platform-detect.js";
|
|
28
30
|
import { findHeroOnDisk, generateViewHeroSvg, getBundleDiskPath, getView, listViews, } from "./views-registry.js";
|
|
@@ -150,14 +152,17 @@ function parseHostExternalSpecifiers(url) {
|
|
|
150
152
|
.map((item) => item.trim())
|
|
151
153
|
.filter(Boolean);
|
|
152
154
|
}
|
|
153
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* Capabilities accepted on any view without a matching declaration in
|
|
157
|
+
* `entry.capabilities` — the protocol's standard caps (get-state / refresh /
|
|
158
|
+
* focus-element / get-text / click-element / fill-input) plus the agent-surface
|
|
159
|
+
* caps the shell registry handles generically (list-elements / agent-click /
|
|
160
|
+
* agent-fill / …). Derived from the single canonical ui-side sources so the
|
|
161
|
+
* route never drifts from what the frontend actually dispatches. (#8798)
|
|
162
|
+
*/
|
|
154
163
|
const STANDARD_CAPABILITY_IDS = new Set([
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
"focus-element",
|
|
158
|
-
"get-text",
|
|
159
|
-
"click-element",
|
|
160
|
-
"fill-input",
|
|
164
|
+
...Object.values(STANDARD_CAPABILITIES),
|
|
165
|
+
...AGENT_SURFACE_CAPABILITY_IDS,
|
|
161
166
|
]);
|
|
162
167
|
/** Module-level map of pending interact requests awaiting a frontend result. */
|
|
163
168
|
const pendingInteractRequests = new PendingRequestMap();
|
|
@@ -271,11 +276,14 @@ export async function handleViewsRoutes(ctx) {
|
|
|
271
276
|
}
|
|
272
277
|
// ── GET /api/views ────────────────────────────────────────────────────────
|
|
273
278
|
if (method === "GET" && (pathname === PREFIX || pathname === `${PREFIX}/`)) {
|
|
274
|
-
const developerMode = ctx.developerMode ?? url.searchParams.get("developerMode") === "true";
|
|
275
279
|
const platform = detectClientPlatform(req);
|
|
276
280
|
const dynamicAllowed = isDynamicLoadingAllowed(platform);
|
|
277
281
|
const viewType = parseViewTypeParam(url.searchParams.get("viewType"));
|
|
278
|
-
|
|
282
|
+
// Return every view (all four kinds) with its `viewKind` so the client can
|
|
283
|
+
// apply the user's Settings toggles + build defaults itself. The server has
|
|
284
|
+
// no way to know whether it is talking to a dev build or which kinds the
|
|
285
|
+
// user enabled, so kind-gating is a client responsibility.
|
|
286
|
+
const allViews = listViews({ includeAllKinds: true, viewType });
|
|
279
287
|
// On restricted platforms (iOS/Android store builds), only surface views
|
|
280
288
|
// without a dynamic bundle URL (already in-process).
|
|
281
289
|
const filtered = dynamicAllowed
|
|
@@ -453,7 +461,7 @@ export async function handleViewsRoutes(ctx) {
|
|
|
453
461
|
// `/api/views/:id/chunk-abc.js`, so serve files beside the root bundle.
|
|
454
462
|
if ((method === "GET" || method === "HEAD") &&
|
|
455
463
|
subResource !== "" &&
|
|
456
|
-
!["hero", "navigate", "interact"].includes(subResource)) {
|
|
464
|
+
!["hero", "navigate", "interact", "elements", "activate"].includes(subResource)) {
|
|
457
465
|
const clientPlatform = detectClientPlatform(req);
|
|
458
466
|
if (!isDynamicLoadingAllowed(clientPlatform)) {
|
|
459
467
|
error(res, "Dynamic view asset loading is not permitted on this platform.", 403);
|
|
@@ -642,6 +650,9 @@ export async function handleViewsRoutes(ctx) {
|
|
|
642
650
|
viewLabel,
|
|
643
651
|
viewType: resolvedViewType,
|
|
644
652
|
viewPath,
|
|
653
|
+
// Carry freshness so Stage-1 can acknowledge a just-happened switch (#8788).
|
|
654
|
+
...(switchedAt ? { switchedAt } : {}),
|
|
655
|
+
...(source ? { source } : {}),
|
|
645
656
|
});
|
|
646
657
|
// Emit the first-class VIEW_SWITCHED interaction event (#8792) so a
|
|
647
658
|
// proactive decider can comment. Only on a real change (no spam on
|
|
@@ -702,6 +713,60 @@ export async function handleViewsRoutes(ctx) {
|
|
|
702
713
|
json(res, { ok: true, viewId: id, accepted, count: elements.length });
|
|
703
714
|
return true;
|
|
704
715
|
}
|
|
716
|
+
// ── POST /api/views/:id/activate ─────────────────────────────────────────
|
|
717
|
+
// Activate one addressable control in a view by its element id (the focused
|
|
718
|
+
// button's agent id in a spatial/TUI mount). This is the terminal host's
|
|
719
|
+
// "a focused view button was pressed" → agent path.
|
|
720
|
+
//
|
|
721
|
+
// Contract:
|
|
722
|
+
// body: { elementId: string }
|
|
723
|
+
// - The element is resolved against the active-view element snapshot
|
|
724
|
+
// (reported via POST /:id/elements) for observability/context — absent
|
|
725
|
+
// when no snapshot was reported, which is fine.
|
|
726
|
+
// - The activation is dispatched as the STANDARD `click-element` capability
|
|
727
|
+
// through the exact same interact path as POST /:id/interact (a
|
|
728
|
+
// `serverInteract` handler when present, else a frontend round-trip),
|
|
729
|
+
// reusing the established CLICK_ELEMENT semantics rather than inventing a
|
|
730
|
+
// new dispatch.
|
|
731
|
+
// response: { ok, viewId, elementId, element?, dispatch: <interact result> }
|
|
732
|
+
if (method === "POST" && subResource === "activate") {
|
|
733
|
+
const body = await readJsonBody(req, res);
|
|
734
|
+
if (!body)
|
|
735
|
+
return true;
|
|
736
|
+
const elementId = typeof body.elementId === "string" && body.elementId.length > 0
|
|
737
|
+
? body.elementId
|
|
738
|
+
: null;
|
|
739
|
+
if (!elementId) {
|
|
740
|
+
error(res, "Missing elementId in activate body", 400);
|
|
741
|
+
return true;
|
|
742
|
+
}
|
|
743
|
+
const viewType = parseViewTypeValue(body.viewType) ??
|
|
744
|
+
parseViewTypeParam(url.searchParams.get("viewType"));
|
|
745
|
+
const entry = getView(id, { viewType });
|
|
746
|
+
if (!entry) {
|
|
747
|
+
error(res, `View "${id}" not found`, 404);
|
|
748
|
+
return true;
|
|
749
|
+
}
|
|
750
|
+
// Resolve the element from the active-view snapshot for context (the planner
|
|
751
|
+
// reports it via /:id/elements). Only used when this view is the foreground
|
|
752
|
+
// active view; absent otherwise — the click still dispatches by id.
|
|
753
|
+
const active = getActiveViewContext();
|
|
754
|
+
const element = active?.viewId === id
|
|
755
|
+
? active.elements?.find((el) => el.id === elementId)
|
|
756
|
+
: undefined;
|
|
757
|
+
const capability = STANDARD_CAPABILITIES.CLICK_ELEMENT;
|
|
758
|
+
const params = { elementId, id: elementId };
|
|
759
|
+
logger.info({ src: "ViewsRoutes", viewId: id, elementId, capability }, `[ViewsRoutes] Activate element "${elementId}" on view "${id}"`);
|
|
760
|
+
const dispatch = await dispatchViewInteract(entry, id, capability, params, ctx.broadcastWs);
|
|
761
|
+
json(res, {
|
|
762
|
+
ok: dispatch.success,
|
|
763
|
+
viewId: id,
|
|
764
|
+
elementId,
|
|
765
|
+
...(element ? { element } : {}),
|
|
766
|
+
dispatch,
|
|
767
|
+
});
|
|
768
|
+
return true;
|
|
769
|
+
}
|
|
705
770
|
// ── POST /api/views/interact-result ──────────────────────────────────────
|
|
706
771
|
// Called by the frontend over HTTP (or proxied from WS) when a view has
|
|
707
772
|
// finished handling an interact request. Resolves the pending promise so
|
|
@@ -818,9 +883,61 @@ export async function handleViewsRoutes(ctx) {
|
|
|
818
883
|
}
|
|
819
884
|
return false;
|
|
820
885
|
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
886
|
+
/**
|
|
887
|
+
* Dispatch a capability to a view, reusing the established interact semantics:
|
|
888
|
+
* a `serverInteract` handler when the view declares one, else a frontend
|
|
889
|
+
* `view:interact` WebSocket round-trip resolved via the pending-request map.
|
|
890
|
+
* Shared by POST /:id/activate (CLICK_ELEMENT) so activation never re-implements
|
|
891
|
+
* the dispatch.
|
|
892
|
+
*/
|
|
893
|
+
async function dispatchViewInteract(entry, viewId, capability, params, broadcastWs, timeoutMs = 5_000) {
|
|
894
|
+
const requestId = randomUUID();
|
|
895
|
+
if (typeof entry.serverInteract === "function") {
|
|
896
|
+
try {
|
|
897
|
+
const result = await entry.serverInteract(capability, params);
|
|
898
|
+
broadcastWs?.({
|
|
899
|
+
type: "view:event",
|
|
900
|
+
viewEventType: `view:${viewId}:updated`,
|
|
901
|
+
payload: { viewId, capability },
|
|
902
|
+
});
|
|
903
|
+
return { requestId, success: resultSuccess(result), result };
|
|
904
|
+
}
|
|
905
|
+
catch (err) {
|
|
906
|
+
logger.warn({ src: "ViewsRoutes", viewId, capability, requestId, err }, `[ViewsRoutes] Server interaction failed for view "${viewId}"`);
|
|
907
|
+
return {
|
|
908
|
+
requestId,
|
|
909
|
+
success: false,
|
|
910
|
+
error: err instanceof Error ? err.message : String(err),
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
const resultPromise = pendingInteractRequests.waitFor(requestId, timeoutMs);
|
|
915
|
+
broadcastWs?.({
|
|
916
|
+
type: "view:interact",
|
|
917
|
+
viewId,
|
|
918
|
+
viewType: entry.viewType,
|
|
919
|
+
capability,
|
|
920
|
+
params,
|
|
921
|
+
requestId,
|
|
922
|
+
});
|
|
923
|
+
try {
|
|
924
|
+
const result = (await resultPromise);
|
|
925
|
+
return {
|
|
926
|
+
requestId,
|
|
927
|
+
success: result.success,
|
|
928
|
+
result: result.result,
|
|
929
|
+
...(result.error ? { error: result.error } : {}),
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
catch (err) {
|
|
933
|
+
logger.warn({ src: "ViewsRoutes", viewId, capability, requestId, err }, `[ViewsRoutes] Interact timed out for view "${viewId}"`);
|
|
934
|
+
return {
|
|
935
|
+
requestId,
|
|
936
|
+
success: false,
|
|
937
|
+
error: `View "${viewId}" did not respond to capability "${capability}" within ${timeoutMs}ms`,
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
}
|
|
824
941
|
function resultSuccess(result) {
|
|
825
942
|
if (!result || typeof result !== "object" || Array.isArray(result)) {
|
|
826
943
|
return true;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* const results = await viewSearchIndex.search(query, runtime, 10);
|
|
11
11
|
*/
|
|
12
12
|
import type { IAgentRuntime } from "@elizaos/core";
|
|
13
|
-
import type { ViewRegistryEntry } from "./view-registry-types.
|
|
13
|
+
import type { ViewRegistryEntry } from "./view-registry-types.js";
|
|
14
14
|
export interface ViewSearchEntry {
|
|
15
15
|
viewId: string;
|
|
16
16
|
viewType: ViewRegistryEntry["viewType"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentRuntime } from "@elizaos/core";
|
|
2
|
-
import type { ElizaConfig } from "../config/config.
|
|
3
|
-
import { type EvmSigningCapabilityKind, resolveEvmSigningCapability } from "../services/evm-signing-capability.
|
|
4
|
-
import { getWalletAddresses } from "./wallet.
|
|
2
|
+
import type { ElizaConfig } from "../config/config.js";
|
|
3
|
+
import { type EvmSigningCapabilityKind, resolveEvmSigningCapability } from "../services/evm-signing-capability.js";
|
|
4
|
+
import { getWalletAddresses } from "./wallet.js";
|
|
5
5
|
export declare const EVM_PLUGIN_PACKAGE = "@elizaos/plugin-wallet";
|
|
6
6
|
export interface WalletCapabilityStatus {
|
|
7
7
|
walletSource: "local" | "managed" | "none";
|
package/api/wallet-rpc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type WalletConfigUpdateRequest, type WalletRpcChain, type WalletRpcCredentialKey, type WalletRpcSelections } from "@elizaos/shared";
|
|
2
|
-
import type { ElizaConfig } from "../config/config.
|
|
2
|
+
import type { ElizaConfig } from "../config/config.js";
|
|
3
3
|
export declare const DEFAULT_PUBLIC_BSC_RPC_URLS: readonly ["https://bsc.publicnode.com/", "https://bsc-rpc.publicnode.com/", "https://binance.llamarpc.com/", "https://rpc.ankr.com/bsc", "https://bsc-dataseed.bnbchain.org/", "https://bsc-dataseed1.binance.org/", "https://bsc-dataseed2.binance.org/", "https://bsc-dataseed3.binance.org/"];
|
|
4
4
|
export declare const DEFAULT_PUBLIC_BSC_TESTNET_RPC_URLS: readonly ["https://bsc-testnet.publicnode.com/", "https://bsc-testnet-rpc.publicnode.com/", "https://data-seed-prebsc-1-s1.binance.org:8545/"];
|
|
5
5
|
export declare const DEFAULT_PUBLIC_ETHEREUM_RPC_URLS: readonly ["https://ethereum.publicnode.com/", "https://ethereum-rpc.publicnode.com/", "https://eth.llamarpc.com/", "https://rpc.ankr.com/eth"];
|
package/api/wallet.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { KeyValidationResult, SolanaTokenBalance, WalletAddresses, WalletChain, WalletGenerateResult, WalletImportResult, WalletKeys } from "@elizaos/shared";
|
|
2
2
|
export type { BscTradeExecuteRequest, BscTradeExecuteResponse, BscTradeExecutionResult, BscTradePreflightRequest, BscTradePreflightResponse, BscTradeQuoteRequest, BscTradeQuoteResponse, BscTradeSide, BscTradeTxStatus, BscTradeTxStatusResponse, BscTransferExecuteRequest, BscTransferExecuteResponse, BscTransferExecutionResult, BscUnsignedApprovalTx, BscUnsignedTradeTx, BscUnsignedTransferTx, EvmChainBalance, EvmTokenBalance, KeyValidationResult, SolanaTokenBalance, TradePermissionMode, WalletAddresses, WalletBalancesResponse, WalletChain, WalletConfigStatus, WalletGenerateResult, WalletImportResult, WalletKeys, WalletTradeLedgerEntry, WalletTradeSource, WalletTradingProfileResponse, WalletTradingProfileSourceFilter, WalletTradingProfileWindow, } from "@elizaos/shared";
|
|
3
|
-
export { computeValueUsd, DEX_PRICE_TIMEOUT_MS, DEXPAPRIKA_CHAIN_MAP, DEXSCREENER_CHAIN_MAP, type DexScreenerPair, type DexTokenMeta, fetchDexPaprikaPrices, fetchDexPrices, fetchDexScreenerPrices, WRAPPED_NATIVE, } from "./wallet-dex-prices.
|
|
4
|
-
export { type AnkrTokenAsset, DEFAULT_EVM_CHAINS, type EvmProviderKeys, fetchEvmBalances, resolveEvmProviderKeys, } from "./wallet-evm-balance.
|
|
3
|
+
export { computeValueUsd, DEX_PRICE_TIMEOUT_MS, DEXPAPRIKA_CHAIN_MAP, DEXSCREENER_CHAIN_MAP, type DexScreenerPair, type DexTokenMeta, fetchDexPaprikaPrices, fetchDexPrices, fetchDexScreenerPrices, WRAPPED_NATIVE, } from "./wallet-dex-prices.js";
|
|
4
|
+
export { type AnkrTokenAsset, DEFAULT_EVM_CHAINS, type EvmProviderKeys, fetchEvmBalances, resolveEvmProviderKeys, } from "./wallet-evm-balance.js";
|
|
5
5
|
export declare const MANAGED_EVM_ADDRESS_ENV_KEY = "ELIZA_MANAGED_EVM_ADDRESS";
|
|
6
6
|
export declare const MANAGED_SOLANA_ADDRESS_ENV_KEY = "ELIZA_MANAGED_SOLANA_ADDRESS";
|
|
7
7
|
export declare const CLOUD_EVM_ADDRESS_ENV_KEY = "ELIZA_CLOUD_EVM_ADDRESS";
|
|
@@ -18,7 +18,7 @@ export declare function validatePrivateKey(key: string): KeyValidationResult;
|
|
|
18
18
|
export declare function maskSecret(value: string): string;
|
|
19
19
|
export declare function generateWalletKeys(): WalletKeys;
|
|
20
20
|
export declare function generateWalletForChain(chain: WalletChain): WalletGenerateResult;
|
|
21
|
-
export { syncSolanaPublicKeyEnv } from "./wallet-env-sync.
|
|
21
|
+
export { syncSolanaPublicKeyEnv } from "./wallet-env-sync.js";
|
|
22
22
|
export declare function setSolanaWalletEnv(privateKey: string): string | null;
|
|
23
23
|
/** Validate key, store in process.env. Caller persists to config if needed. */
|
|
24
24
|
export declare function importWallet(chain: WalletChain, privateKey: string): WalletImportResult;
|
package/api/wallet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/api/wallet.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACX,MAAM,iBAAiB,CAAC;AAWzB,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,4BAA4B,EAC5B,gCAAgC,EAChC,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,YAA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M,EACf,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC,CA4FD"}
|
package/api/wallet.js
CHANGED
|
@@ -346,9 +346,10 @@ export function generateWalletForChain(chain) {
|
|
|
346
346
|
privateKey: sol.privateKey,
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
//
|
|
350
|
-
//
|
|
351
|
-
//
|
|
349
|
+
// `syncSolanaPublicKeyEnv` lives in wallet-env-sync.ts to avoid a circular
|
|
350
|
+
// dependency with config/config.ts. Imported here for internal use
|
|
351
|
+
// (setSolanaWalletEnv below) and re-exported so consumers of this module
|
|
352
|
+
// (e.g. runtime/eliza.ts) can reach it through wallet.ts.
|
|
352
353
|
import { syncSolanaPublicKeyEnv } from "./wallet-env-sync.js";
|
|
353
354
|
export { syncSolanaPublicKeyEnv } from "./wallet-env-sync.js";
|
|
354
355
|
export function setSolanaWalletEnv(privateKey) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type http from "node:http";
|
|
10
10
|
import type { AgentRuntime, Task, UUID } from "@elizaos/core";
|
|
11
11
|
import type { ReadJsonBodyOptions } from "@elizaos/shared";
|
|
12
|
-
import type { TriggerSummary } from "../triggers/types.
|
|
12
|
+
import type { TriggerSummary } from "../triggers/types.js";
|
|
13
13
|
export interface WorkbenchTodoView {
|
|
14
14
|
id: string;
|
|
15
15
|
name: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Workbench task/todo normalization helpers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Used exclusively by workbench-routes.ts to transform elizaOS Task records
|
|
5
|
+
* into the WorkbenchTaskView / WorkbenchTodoView shapes consumed by the
|
|
6
|
+
* dashboard UI.
|
|
7
7
|
*/
|
|
8
8
|
import type { Task } from "@elizaos/core";
|
|
9
9
|
export declare const WORKBENCH_TODO_TAG = "workbench-todo";
|
package/api/workbench-helpers.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Workbench task/todo normalization helpers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Used exclusively by workbench-routes.ts to transform elizaOS Task records
|
|
5
|
+
* into the WorkbenchTaskView / WorkbenchTodoView shapes consumed by the
|
|
6
|
+
* dashboard UI.
|
|
7
7
|
*/
|
|
8
8
|
import { readTriggerConfig } from "../triggers/runtime.js";
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { WorkbenchRouteContext } from "./workbench-context.
|
|
2
|
-
import type { WorkbenchRouteContext } from "./workbench-context.
|
|
1
|
+
export type { WorkbenchRouteContext } from "./workbench-context.js";
|
|
2
|
+
import type { WorkbenchRouteContext } from "./workbench-context.js";
|
|
3
3
|
export declare const WORKBENCH_BOOTSTRAP_TODO_NAME = "Get the user's name and understand what they need help with";
|
|
4
4
|
export declare function handleWorkbenchRoutes(ctx: WorkbenchRouteContext): Promise<boolean>;
|
|
5
5
|
//# sourceMappingURL=workbench-routes.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { WorkbenchRouteContext } from "./workbench-context.
|
|
1
|
+
import type { WorkbenchRouteContext } from "./workbench-context.js";
|
|
2
2
|
export declare function handleWorkbenchVfsRoutes(ctx: WorkbenchRouteContext): Promise<boolean>;
|
|
3
3
|
//# sourceMappingURL=workbench-vfs-routes.d.ts.map
|
package/api/ws-event-replay.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure helpers for the WebSocket event-buffer replay on (re)connect.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* in isolation. See loadperf research report 05 (Network & Data Sync),
|
|
4
|
+
* See loadperf research report 05 (Network & Data Sync),
|
|
6
5
|
* Finding 4: on every (re)connect the server replays the tail of
|
|
7
6
|
* `state.eventBuffer`, re-flooding the client with up to `DEFAULT_REPLAY_LIMIT`
|
|
8
7
|
* historical envelopes even after a brief reconnect. A client that tracks the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-event-replay.d.ts","sourceRoot":"","sources":["../../src/api/ws-event-replay.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ws-event-replay.d.ts","sourceRoot":"","sources":["../../src/api/ws-event-replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAYnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7B,MAAM,GAAG,IAAI,CAQf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,EAC1D,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,GAAE,MAA6B,GACnC,CAAC,EAAE,CAUL"}
|
package/api/ws-event-replay.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pure helpers for the WebSocket event-buffer replay on (re)connect.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* in isolation. See loadperf research report 05 (Network & Data Sync),
|
|
4
|
+
* See loadperf research report 05 (Network & Data Sync),
|
|
6
5
|
* Finding 4: on every (re)connect the server replays the tail of
|
|
7
6
|
* `state.eventBuffer`, re-flooding the client with up to `DEFAULT_REPLAY_LIMIT`
|
|
8
7
|
* historical envelopes even after a brief reconnect. A client that tracks the
|
package/api/x-relay-routes.d.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type http from "node:http";
|
|
10
10
|
import { type Service } from "@elizaos/core";
|
|
11
|
-
import type { ElizaConfig } from "../config/config.
|
|
12
|
-
import type { CloudProxyConfigLike } from "../types/config-like.
|
|
11
|
+
import type { ElizaConfig } from "../config/config.js";
|
|
12
|
+
import type { CloudProxyConfigLike } from "../types/config-like.js";
|
|
13
13
|
interface XRelayRuntime {
|
|
14
14
|
getService(serviceType: string): Service | null;
|
|
15
15
|
getSetting?: (key: string) => unknown;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Route } from "@elizaos/core";
|
|
2
|
+
export declare function routeNeedsX402Validation(route: Route): boolean;
|
|
3
|
+
export declare function runtimeRoutesNeedX402Validation(routes: readonly Route[] | null | undefined): boolean;
|
|
4
|
+
//# sourceMappingURL=x402-route-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x402-route-validation.d.ts","sourceRoot":"","sources":["../../src/api/x402-route-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAM3C,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAE9D;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAET"}
|
|
Binary file
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* atomic writes). Multiple accounts per provider are supported.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountCredentialProvider, type OAuthCredentials } from "./types.
|
|
8
|
+
import { type AccountCredentialProvider, type OAuthCredentials } from "./types.js";
|
|
9
9
|
export interface AccountCredentialRecord {
|
|
10
10
|
/** accountId, e.g. "default" or a uuid */
|
|
11
11
|
id: string;
|
package/auth/anthropic.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Uses inlined PKCE + token exchange (vendored OAuth helpers).
|
|
5
5
|
* The callback API is adapted to a start/exchange pattern for HTTP route handlers.
|
|
6
6
|
*/
|
|
7
|
-
import type { OAuthCredentials } from "./types.
|
|
7
|
+
import type { OAuthCredentials } from "./types.js";
|
|
8
8
|
export interface AnthropicFlow {
|
|
9
9
|
authUrl: string;
|
|
10
10
|
/** Provide the authorization code (format: code#state) to complete the flow */
|
package/auth/credentials.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* multi-account support keep working without changes.
|
|
10
10
|
*/
|
|
11
11
|
import type { SubscriptionCredentialSource } from "@elizaos/shared";
|
|
12
|
-
import { type AccountCredentialRecord } from "./account-storage.
|
|
13
|
-
import { type AccountCredentialProvider, type OAuthCredentials, type StoredCredentials, type SubscriptionProvider } from "./types.
|
|
12
|
+
import { type AccountCredentialRecord } from "./account-storage.js";
|
|
13
|
+
import { type AccountCredentialProvider, type OAuthCredentials, type StoredCredentials, type SubscriptionProvider } from "./types.js";
|
|
14
14
|
/**
|
|
15
15
|
* Save credentials for a provider account.
|
|
16
16
|
*
|
package/auth/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./account-storage.
|
|
2
|
-
export * from "./anthropic.
|
|
3
|
-
export * from "./claude-code-stealth.
|
|
4
|
-
export * from "./credentials.
|
|
5
|
-
export * from "./oauth-flow.
|
|
6
|
-
export * from "./openai-codex.
|
|
7
|
-
export * from "./types.
|
|
1
|
+
export * from "./account-storage.js";
|
|
2
|
+
export * from "./anthropic.js";
|
|
3
|
+
export * from "./claude-code-stealth.js";
|
|
4
|
+
export * from "./credentials.js";
|
|
5
|
+
export * from "./oauth-flow.js";
|
|
6
|
+
export * from "./openai-codex.js";
|
|
7
|
+
export * from "./types.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/auth/oauth-flow.d.ts
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
* through this module — there is no direct caller of the vendor-level
|
|
18
18
|
* OAuth helpers anymore.
|
|
19
19
|
*/
|
|
20
|
-
import { type AccountCredentialRecord } from "./account-storage.
|
|
21
|
-
import type { SubscriptionProvider } from "./types.
|
|
20
|
+
import { type AccountCredentialRecord } from "./account-storage.js";
|
|
21
|
+
import type { SubscriptionProvider } from "./types.js";
|
|
22
22
|
/** Server-tracked status of an in-flight OAuth flow. */
|
|
23
23
|
export type FlowStatus = "pending" | "success" | "error" | "cancelled" | "timeout";
|
|
24
24
|
export interface FlowState {
|
package/auth/openai-codex.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Uses inlined OAuth (vendored helpers).
|
|
5
5
|
* Handles local callback server + manual code paste fallback.
|
|
6
6
|
*/
|
|
7
|
-
import type { OAuthCredentials } from "./types.
|
|
7
|
+
import type { OAuthCredentials } from "./types.js";
|
|
8
8
|
export interface CodexFlow {
|
|
9
9
|
authUrl: string;
|
|
10
10
|
state: string;
|
package/awareness/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./registry.
|
|
1
|
+
export * from "./registry.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/config/config.js
CHANGED
package/config/env-vars.d.ts
CHANGED
package/config/env-vars.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-vars.d.ts","sourceRoot":"","sources":["../../src/config/env-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"env-vars.d.ts","sourceRoot":"","sources":["../../src/config/env-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAkD9C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CACtC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAuFjD,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,GAAG,CAAC,EAAE,WAAW,GAChB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkCxB;AAED,wBAAgB,uBAAuB,CACrC,GAAG,CAAC,EAAE,WAAW,GAChB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsIxB"}
|
package/config/env-vars.js
CHANGED
package/config/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./character-schema.
|
|
2
|
-
export * from "./config.
|
|
3
|
-
export * from "./env-vars.
|
|
4
|
-
export * from "./includes.
|
|
5
|
-
export * from "./model-metadata.
|
|
6
|
-
export * from "./owner-contacts.
|
|
7
|
-
export * from "./paths.
|
|
8
|
-
export * from "./schema.
|
|
9
|
-
export * from "./telegram-custom-commands.
|
|
10
|
-
export type { CustomActionDef, CustomActionHandler, DatabaseProviderType, } from "./types.eliza.
|
|
1
|
+
export * from "./character-schema.js";
|
|
2
|
+
export * from "./config.js";
|
|
3
|
+
export * from "./env-vars.js";
|
|
4
|
+
export * from "./includes.js";
|
|
5
|
+
export * from "./model-metadata.js";
|
|
6
|
+
export * from "./owner-contacts.js";
|
|
7
|
+
export * from "./paths.js";
|
|
8
|
+
export * from "./schema.js";
|
|
9
|
+
export * from "./telegram-custom-commands.js";
|
|
10
|
+
export type { CustomActionDef, CustomActionHandler, DatabaseProviderType, } from "./types.eliza.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ElizaConfig, ModelDefinitionConfig } from "./types.
|
|
1
|
+
import type { ElizaConfig, ModelDefinitionConfig } from "./types.js";
|
|
2
2
|
export declare const DEFAULT_MODEL_CONTEXT_WINDOW = 128000;
|
|
3
3
|
export declare const DEFAULT_MODEL_MAX_TOKENS = 8192;
|
|
4
4
|
export type ModelTokenMetadataSource = "model-config" | "agent-defaults" | "runtime-default";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAgentRuntime } from "@elizaos/core";
|
|
2
|
-
import type { OwnerContactEntry, OwnerContactsConfig } from "./types.agent-defaults.
|
|
2
|
+
import type { OwnerContactEntry, OwnerContactsConfig } from "./types.agent-defaults.js";
|
|
3
3
|
type OwnerContactsLoadContext = {
|
|
4
4
|
boundary: string;
|
|
5
5
|
operation: string;
|
package/config/schema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Known connector IDs for config schema generation. Keep in sync with runtime/plugin maps. */
|
|
2
2
|
export declare const CONNECTOR_IDS: readonly ["bluebubbles", "telegram", "telegramAccount", "discord", "discordLocal", "slack", "twitter", "whatsapp", "signal", "imessage", "farcaster", "lens", "msteams", "feishu", "matrix", "nostr", "blooio", "twitch", "mattermost", "googlechat"];
|
|
3
|
-
import { ElizaSchema } from "./zod-schema.
|
|
3
|
+
import { ElizaSchema } from "./zod-schema.js";
|
|
4
4
|
export type ShowIfCondition = {
|
|
5
5
|
field: string;
|
|
6
6
|
op: "eq" | "neq" | "in" | "truthy" | "falsy";
|
package/hooks/discovery.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Discover hooks from workspace, managed state-dir hooks, and bundled dirs.
|
|
3
3
|
* Later sources win on name conflicts.
|
|
4
4
|
*/
|
|
5
|
-
import type { HookEntry } from "./types.
|
|
5
|
+
import type { HookEntry } from "./types.js";
|
|
6
6
|
export interface DiscoveryOptions {
|
|
7
7
|
workspacePath?: string;
|
|
8
8
|
bundledDir?: string;
|
package/hooks/eligibility.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hook eligibility: checks OS, binary, env, and config requirements.
|
|
3
3
|
*/
|
|
4
|
-
import type { HookConfig, InternalHooksConfig } from "../config/types.hooks.
|
|
5
|
-
import type { ElizaHookMetadata } from "./types.
|
|
4
|
+
import type { HookConfig, InternalHooksConfig } from "../config/types.hooks.js";
|
|
5
|
+
import type { ElizaHookMetadata } from "./types.js";
|
|
6
6
|
export interface EligibilityResult {
|
|
7
7
|
eligible: boolean;
|
|
8
8
|
missing: string[];
|
package/hooks/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type LoadHooksOptions, loadHooks, } from "./loader.
|
|
2
|
-
export { createHookEvent, triggerHook, } from "./registry.
|
|
1
|
+
export { type LoadHooksOptions, loadHooks, } from "./loader.js";
|
|
2
|
+
export { createHookEvent, triggerHook, } from "./registry.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/hooks/loader.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module hooks/loader
|
|
7
7
|
*/
|
|
8
|
-
import type { InternalHooksConfig } from "../config/types.hooks.
|
|
9
|
-
import { type DiscoveryOptions } from "./discovery.
|
|
8
|
+
import type { InternalHooksConfig } from "../config/types.hooks.js";
|
|
9
|
+
import { type DiscoveryOptions } from "./discovery.js";
|
|
10
10
|
export interface LoadHooksOptions extends DiscoveryOptions {
|
|
11
11
|
/** Internal hooks configuration. */
|
|
12
12
|
internalConfig?: InternalHooksConfig;
|
package/hooks/registry.d.ts
CHANGED