@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Proactive-interaction decider (#8792).
|
|
3
3
|
*
|
|
4
|
-
* Consumes UI interaction events (view switches
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Consumes UI interaction events (view switches, slash commands, shortcuts) and
|
|
5
|
+
* decides whether to surface a single scoped, helpful offer through either the
|
|
6
|
+
* existing `routeAutonomyTextToUser` → `proactive-message` pipeline with
|
|
7
|
+
* `source: "proactive-interaction"` or the low-priority notification rail.
|
|
8
8
|
*
|
|
9
9
|
* Two layers, both testable in isolation:
|
|
10
10
|
* - {@link decideProactiveComment} — the pure policy + governance decision
|
|
@@ -17,6 +17,71 @@ import { EventType, logger, ModelType, } from "@elizaos/core";
|
|
|
17
17
|
import { resolveProactiveGateConfig, } from "./proactive-interaction-gate.js";
|
|
18
18
|
/** Source tag for proactive comments driven by UI interactions. */
|
|
19
19
|
export const PROACTIVE_INTERACTION_SOURCE = "proactive-interaction";
|
|
20
|
+
/**
|
|
21
|
+
* Runtime setting key for the user-facing "Proactive suggestions" control
|
|
22
|
+
* (off/subtle/chatty). Read via `runtime.getSetting`, it takes precedence over
|
|
23
|
+
* the `ELIZA_PROACTIVE_INTERACTIONS` env default inside the gate resolver.
|
|
24
|
+
*/
|
|
25
|
+
export const PROACTIVE_CHATTINESS_SETTING_KEY = "ELIZA_PROACTIVE_INTERACTIONS";
|
|
26
|
+
/**
|
|
27
|
+
* Control / dismiss / help shortcuts that must never trigger a proactive comment
|
|
28
|
+
* (#8792). These are gestures, not intent: commenting on them is noise, and —
|
|
29
|
+
* critically — the small-model judge runs BEFORE the governance gate, so letting
|
|
30
|
+
* them reach the judge would spend a TEXT_SMALL call per keystroke. Denying them
|
|
31
|
+
* here (a surface of `null`) skips the judge entirely. Navigation-bearing
|
|
32
|
+
* shortcuts ("open X") report `VIEW_SWITCHED` through the navigate route instead,
|
|
33
|
+
* so SHORTCUT_FIRED stays a small, high-signal channel for non-navigation
|
|
34
|
+
* capability-invokes (e.g. opening the command palette).
|
|
35
|
+
*/
|
|
36
|
+
export const NON_PROACTIVE_SHORTCUT_IDS = new Set([
|
|
37
|
+
"close-modal",
|
|
38
|
+
"send-message",
|
|
39
|
+
"focus-composer",
|
|
40
|
+
"pause-resume-agent",
|
|
41
|
+
"restart-agent",
|
|
42
|
+
"toggle-terminal",
|
|
43
|
+
"show-keyboard-shortcuts",
|
|
44
|
+
]);
|
|
45
|
+
/**
|
|
46
|
+
* The governance surface for an interaction, or `null` when policy says never
|
|
47
|
+
* comment. Explicitly-typed slash commands return `null`: the user already
|
|
48
|
+
* expressed intent and the command produced its own reply, so a proactive
|
|
49
|
+
* comment would be double-talk (#8792 open question). Control/dismiss shortcuts
|
|
50
|
+
* are denied (see {@link NON_PROACTIVE_SHORTCUT_IDS}). View switches key on the
|
|
51
|
+
* view; remaining (intent-bearing) shortcuts key on the shortcut id.
|
|
52
|
+
*/
|
|
53
|
+
export function interactionSurface(payload) {
|
|
54
|
+
if ("command" in payload)
|
|
55
|
+
return null; // explicit slash — stay silent
|
|
56
|
+
if ("shortcutId" in payload) {
|
|
57
|
+
if (NON_PROACTIVE_SHORTCUT_IDS.has(payload.shortcutId))
|
|
58
|
+
return null;
|
|
59
|
+
return `shortcut:${payload.shortcutId}`;
|
|
60
|
+
}
|
|
61
|
+
if ("viewId" in payload && payload.viewId)
|
|
62
|
+
return payload.viewId;
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
function normalizeProactiveOffer(result) {
|
|
66
|
+
if (typeof result === "string") {
|
|
67
|
+
const text = result.trim();
|
|
68
|
+
if (!text || text.toLowerCase() === "none" || text === "null")
|
|
69
|
+
return null;
|
|
70
|
+
return { text, delivery: "chat" };
|
|
71
|
+
}
|
|
72
|
+
if (!result || typeof result !== "object")
|
|
73
|
+
return null;
|
|
74
|
+
const text = result.text.trim();
|
|
75
|
+
if (!text || text.toLowerCase() === "none" || text === "null")
|
|
76
|
+
return null;
|
|
77
|
+
return {
|
|
78
|
+
text,
|
|
79
|
+
delivery: result.delivery === "notify" ? "notify" : "chat",
|
|
80
|
+
title: result.title?.trim() || undefined,
|
|
81
|
+
deepLink: result.deepLink?.trim() || undefined,
|
|
82
|
+
groupKey: result.groupKey?.trim() || undefined,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
20
85
|
/**
|
|
21
86
|
* Decide whether to comment on a view switch. Policy + governance only:
|
|
22
87
|
* - Skip AGENT-initiated switches — the agent already acknowledged the move
|
|
@@ -29,38 +94,72 @@ export const PROACTIVE_INTERACTION_SOURCE = "proactive-interaction";
|
|
|
29
94
|
*/
|
|
30
95
|
export async function decideProactiveComment(input) {
|
|
31
96
|
const { payload, gate, judge, now } = input;
|
|
32
|
-
const surface = payload
|
|
33
|
-
if (!surface)
|
|
34
|
-
return {
|
|
97
|
+
const surface = interactionSurface(payload);
|
|
98
|
+
if (!surface) {
|
|
99
|
+
return {
|
|
100
|
+
text: null,
|
|
101
|
+
delivery: null,
|
|
102
|
+
reason: "no surface (policy-silent)",
|
|
103
|
+
};
|
|
104
|
+
}
|
|
35
105
|
if (payload.initiatedBy === "agent") {
|
|
36
|
-
return {
|
|
106
|
+
return {
|
|
107
|
+
text: null,
|
|
108
|
+
delivery: null,
|
|
109
|
+
reason: "agent-initiated (already acknowledged)",
|
|
110
|
+
};
|
|
37
111
|
}
|
|
38
112
|
if (!gate.isSettled(surface, now)) {
|
|
39
|
-
return {
|
|
113
|
+
return {
|
|
114
|
+
text: null,
|
|
115
|
+
delivery: null,
|
|
116
|
+
reason: "debounce: surface not settled",
|
|
117
|
+
};
|
|
40
118
|
}
|
|
41
|
-
const candidate = (await judge(payload))
|
|
119
|
+
const candidate = normalizeProactiveOffer(await judge(payload));
|
|
42
120
|
if (!candidate) {
|
|
43
|
-
return {
|
|
121
|
+
return {
|
|
122
|
+
text: null,
|
|
123
|
+
delivery: null,
|
|
124
|
+
reason: "judge: nothing helpful to offer",
|
|
125
|
+
};
|
|
44
126
|
}
|
|
45
|
-
const admit = gate.tryAdmit({ surface, text: candidate, now });
|
|
127
|
+
const admit = gate.tryAdmit({ surface, text: candidate.text, now });
|
|
46
128
|
if (!admit.admitted) {
|
|
47
|
-
return { text: null, reason: admit.reason };
|
|
129
|
+
return { text: null, delivery: null, reason: admit.reason };
|
|
48
130
|
}
|
|
49
|
-
return {
|
|
131
|
+
return {
|
|
132
|
+
text: candidate.text,
|
|
133
|
+
delivery: candidate.delivery,
|
|
134
|
+
title: candidate.title,
|
|
135
|
+
deepLink: candidate.deepLink,
|
|
136
|
+
groupKey: candidate.groupKey,
|
|
137
|
+
reason: "admitted",
|
|
138
|
+
};
|
|
50
139
|
}
|
|
51
140
|
const JUDGE_INSTRUCTION = [
|
|
52
|
-
"The user just
|
|
141
|
+
"The user just took an action in the app. Decide if there is ONE specific, helpful thing you can proactively offer right now.",
|
|
53
142
|
'Examples: switched to wallet → "Want me to pull your latest balances?"; opened task-coordinator → "Want me to summarize your open tasks?".',
|
|
54
|
-
"
|
|
55
|
-
|
|
143
|
+
'Use delivery "chat" only when the current view benefits from a visible suggestion. Use delivery "notify" for useful but low-urgency offers that should land quietly outside chat.',
|
|
144
|
+
"Stay silent (return null) for ambiguous or low-value interactions, settings/config screens, or anything where an offer would be noise.",
|
|
145
|
+
'Respond as JSON: {"comment": <a short offer, or null>, "delivery": "chat" | "notify", "confidence": 0..1, "urgency": "low" | "medium" | "high", "title": <optional notification title>}.',
|
|
56
146
|
].join("\n");
|
|
57
|
-
/**
|
|
58
|
-
|
|
147
|
+
/** Describe the interaction for the judge prompt. */
|
|
148
|
+
function describeInteraction(payload) {
|
|
149
|
+
if ("command" in payload) {
|
|
150
|
+
return `The user just ran the /${payload.command} command.`;
|
|
151
|
+
}
|
|
152
|
+
if ("shortcutId" in payload) {
|
|
153
|
+
return `The user just used the "${payload.shortcutId}" shortcut.`;
|
|
154
|
+
}
|
|
59
155
|
const where = payload.viewLabel ?? payload.viewId;
|
|
60
|
-
return
|
|
156
|
+
return `The user just opened the ${where} view.`;
|
|
61
157
|
}
|
|
62
|
-
/**
|
|
63
|
-
export function
|
|
158
|
+
/** Build the small-model judge prompt for an interaction. */
|
|
159
|
+
export function buildProactiveJudgePrompt(payload) {
|
|
160
|
+
return `${JUDGE_INSTRUCTION}\n${describeInteraction(payload)}`;
|
|
161
|
+
}
|
|
162
|
+
function parseProactiveJudgeObject(raw) {
|
|
64
163
|
let obj = raw;
|
|
65
164
|
if (typeof raw === "string") {
|
|
66
165
|
const trimmed = raw
|
|
@@ -76,6 +175,21 @@ export function parseProactiveJudgeOutput(raw) {
|
|
|
76
175
|
}
|
|
77
176
|
if (!obj || typeof obj !== "object")
|
|
78
177
|
return null;
|
|
178
|
+
return obj;
|
|
179
|
+
}
|
|
180
|
+
function parseOptionalNumber(raw) {
|
|
181
|
+
if (typeof raw === "number" && Number.isFinite(raw))
|
|
182
|
+
return raw;
|
|
183
|
+
if (typeof raw !== "string")
|
|
184
|
+
return null;
|
|
185
|
+
const parsed = Number(raw.trim());
|
|
186
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
187
|
+
}
|
|
188
|
+
/** Parse the judge model output into a typed offer or null. */
|
|
189
|
+
export function parseProactiveJudgeDecisionOutput(raw) {
|
|
190
|
+
const obj = parseProactiveJudgeObject(raw);
|
|
191
|
+
if (!obj)
|
|
192
|
+
return null;
|
|
79
193
|
const comment = obj.comment;
|
|
80
194
|
if (typeof comment !== "string")
|
|
81
195
|
return null;
|
|
@@ -83,7 +197,31 @@ export function parseProactiveJudgeOutput(raw) {
|
|
|
83
197
|
if (!trimmed || trimmed.toLowerCase() === "none" || trimmed === "null") {
|
|
84
198
|
return null;
|
|
85
199
|
}
|
|
86
|
-
|
|
200
|
+
const confidence = parseOptionalNumber(obj.confidence);
|
|
201
|
+
if (confidence !== null && confidence < 0.65) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
const rawDelivery = obj.delivery ?? obj.channel ?? obj.route;
|
|
205
|
+
const urgency = typeof obj.urgency === "string" ? obj.urgency.trim().toLowerCase() : "";
|
|
206
|
+
const delivery = urgency === "low" ||
|
|
207
|
+
rawDelivery === "notify" ||
|
|
208
|
+
rawDelivery === "notification"
|
|
209
|
+
? "notify"
|
|
210
|
+
: "chat";
|
|
211
|
+
const title = typeof obj.title === "string" ? obj.title.trim() : "";
|
|
212
|
+
const deepLink = typeof obj.deepLink === "string" ? obj.deepLink.trim() : "";
|
|
213
|
+
const groupKey = typeof obj.groupKey === "string" ? obj.groupKey.trim() : "";
|
|
214
|
+
return {
|
|
215
|
+
text: trimmed,
|
|
216
|
+
delivery,
|
|
217
|
+
title: title || undefined,
|
|
218
|
+
deepLink: deepLink || undefined,
|
|
219
|
+
groupKey: groupKey || undefined,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/** Parse the judge model output into an offer string or null. */
|
|
223
|
+
export function parseProactiveJudgeOutput(raw) {
|
|
224
|
+
return parseProactiveJudgeDecisionOutput(raw)?.text ?? null;
|
|
87
225
|
}
|
|
88
226
|
/**
|
|
89
227
|
* Subscribe the decider to the runtime event bus. Each VIEW_SWITCHED runs the
|
|
@@ -93,40 +231,79 @@ export function parseProactiveJudgeOutput(raw) {
|
|
|
93
231
|
*/
|
|
94
232
|
export function registerProactiveInteractionDecider(runtime, wiring) {
|
|
95
233
|
const clock = wiring.now ?? Date.now;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
234
|
+
// Resolve the live config PER interaction, not once at boot: the user-facing
|
|
235
|
+
// "Proactive suggestions" control (off/subtle/chatty) writes
|
|
236
|
+
// ELIZA_PROACTIVE_INTERACTIONS straight to process.env (config-routes), so
|
|
237
|
+
// re-reading here lets the setting + kill-switch take effect immediately
|
|
238
|
+
// without a runtime restart. The runtime setting overrides the env default.
|
|
239
|
+
const resolveConfig = () => {
|
|
240
|
+
const userSetting = runtime.getSetting(PROACTIVE_CHATTINESS_SETTING_KEY);
|
|
241
|
+
return resolveProactiveGateConfig(process.env, typeof userSetting === "string" ? userSetting : undefined);
|
|
242
|
+
};
|
|
243
|
+
const isSuppressed = () => {
|
|
244
|
+
try {
|
|
245
|
+
return wiring.shouldSuppress?.() === true;
|
|
246
|
+
}
|
|
247
|
+
catch (err) {
|
|
248
|
+
logger.debug({ err }, "[proactive-interaction] suppression guard failed");
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
102
252
|
const judge = async (payload) => {
|
|
103
253
|
try {
|
|
104
254
|
const raw = await runtime.useModel(ModelType.TEXT_SMALL, {
|
|
105
255
|
prompt: buildProactiveJudgePrompt(payload),
|
|
106
256
|
});
|
|
107
|
-
return
|
|
257
|
+
return parseProactiveJudgeDecisionOutput(raw);
|
|
108
258
|
}
|
|
109
259
|
catch (err) {
|
|
110
260
|
logger.debug({ err }, "[proactive-interaction] judge failed");
|
|
111
261
|
return null;
|
|
112
262
|
}
|
|
113
263
|
};
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
const surface = viewPayload.viewId;
|
|
264
|
+
const handle = (payload) => {
|
|
265
|
+
const surface = interactionSurface(payload);
|
|
117
266
|
if (!surface)
|
|
267
|
+
return; // policy-silent (e.g. explicit slash commands)
|
|
268
|
+
if (isSuppressed())
|
|
118
269
|
return;
|
|
270
|
+
const config = resolveConfig();
|
|
271
|
+
wiring.gate.setConfig(config);
|
|
272
|
+
if (config.chattiness === "off") {
|
|
273
|
+
logger.debug("[proactive-interaction] suppressed: chattiness=off");
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
119
276
|
wiring.gate.noteSwitch(surface, clock());
|
|
120
277
|
const run = async () => {
|
|
121
278
|
try {
|
|
279
|
+
if (isSuppressed())
|
|
280
|
+
return;
|
|
122
281
|
const decision = await decideProactiveComment({
|
|
123
|
-
payload
|
|
282
|
+
payload,
|
|
124
283
|
gate: wiring.gate,
|
|
125
284
|
judge,
|
|
126
285
|
now: clock(),
|
|
127
286
|
});
|
|
128
287
|
if (decision.text) {
|
|
129
|
-
|
|
288
|
+
if (isSuppressed())
|
|
289
|
+
return;
|
|
290
|
+
if (decision.delivery === "notify") {
|
|
291
|
+
if (wiring.notify) {
|
|
292
|
+
await wiring.notify({
|
|
293
|
+
text: decision.text,
|
|
294
|
+
delivery: "notify",
|
|
295
|
+
title: decision.title,
|
|
296
|
+
deepLink: decision.deepLink,
|
|
297
|
+
groupKey: decision.groupKey,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
logger.debug("[proactive-interaction] notify delivery requested without notification route");
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
await wiring.route(decision.text);
|
|
306
|
+
}
|
|
130
307
|
}
|
|
131
308
|
}
|
|
132
309
|
catch (err) {
|
|
@@ -141,5 +318,16 @@ export function registerProactiveInteractionDecider(runtime, wiring) {
|
|
|
141
318
|
else {
|
|
142
319
|
void run();
|
|
143
320
|
}
|
|
321
|
+
};
|
|
322
|
+
// All three interaction events flow through the same governed decider. Slash
|
|
323
|
+
// commands are consumed but stay silent by policy (see interactionSurface).
|
|
324
|
+
runtime.registerEvent(EventType.VIEW_SWITCHED, async (payload) => {
|
|
325
|
+
handle(payload);
|
|
326
|
+
});
|
|
327
|
+
runtime.registerEvent(EventType.SHORTCUT_FIRED, async (payload) => {
|
|
328
|
+
handle(payload);
|
|
329
|
+
});
|
|
330
|
+
runtime.registerEvent(EventType.SLASH_COMMAND_INVOKED, async (payload) => {
|
|
331
|
+
handle(payload);
|
|
144
332
|
});
|
|
145
333
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* and is NOT exercised in tests — it requires a real APNs auth key, a real
|
|
17
17
|
* bundle id, and a real device token.
|
|
18
18
|
*/
|
|
19
|
-
import { type PushMessage, type PushProvider } from "./push-types.
|
|
19
|
+
import { type PushMessage, type PushProvider } from "./push-types.js";
|
|
20
20
|
interface ApnsConfig {
|
|
21
21
|
/** PEM/p8 EC private key contents. */
|
|
22
22
|
key: string;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Google's servers and are NOT exercised in tests — they require a real Firebase
|
|
15
15
|
* service account and a real device token.
|
|
16
16
|
*/
|
|
17
|
-
import { type PushMessage, type PushProvider } from "./push-types.
|
|
17
|
+
import { type PushMessage, type PushProvider } from "./push-types.js";
|
|
18
18
|
interface ServiceAccount {
|
|
19
19
|
client_email: string;
|
|
20
20
|
private_key: string;
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
*/
|
|
27
27
|
import type { IAgentRuntime } from "@elizaos/core";
|
|
28
28
|
import { Service } from "@elizaos/core";
|
|
29
|
-
import { PushTokenRegistry } from "./push-token-registry.
|
|
30
|
-
import { type PushProvider } from "./push-types.
|
|
29
|
+
import { PushTokenRegistry } from "./push-token-registry.js";
|
|
30
|
+
import { type PushProvider } from "./push-types.js";
|
|
31
31
|
/** Service type identifier for the push delivery service. */
|
|
32
32
|
export declare const NOTIFICATION_PUSH_SERVICE_TYPE = "notification_push";
|
|
33
33
|
/** Providers the service can dispatch through, by platform. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryAppMeta } from "./registry-client-types.
|
|
1
|
+
import type { RegistryAppMeta } from "./registry-client-types.js";
|
|
2
2
|
export declare const LOCAL_APP_DEFAULT_SANDBOX = "allow-scripts allow-same-origin allow-popups";
|
|
3
3
|
export declare function sanitizeSandbox(rawSandbox?: string): string;
|
|
4
4
|
export declare function mergeAppMeta(base: RegistryAppMeta | undefined, patch: RegistryAppMeta | undefined): RegistryAppMeta | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RegistryEndpoint } from "../config/types.eliza.
|
|
2
|
-
import type { RegistryPluginInfo } from "./registry-client-types.
|
|
1
|
+
import type { RegistryEndpoint } from "../config/types.eliza.js";
|
|
2
|
+
import type { RegistryPluginInfo } from "./registry-client-types.js";
|
|
3
3
|
export declare function normaliseEndpointUrl(url: string): string;
|
|
4
4
|
export declare function isDefaultEndpoint(url: string, defaultUrl: string): boolean;
|
|
5
5
|
export declare function parseRegistryEndpointUrl(rawUrl: string): URL;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryPluginInfo } from "./registry-client-types.
|
|
1
|
+
import type { RegistryPluginInfo } from "./registry-client-types.js";
|
|
2
2
|
export declare function applyNodeModulePlugins(plugins: Map<string, RegistryPluginInfo>): Promise<void>;
|
|
3
3
|
export declare function applyLocalWorkspaceApps(plugins: Map<string, RegistryPluginInfo>): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=registry-client-local.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryPluginInfo } from "./registry-client-types.
|
|
1
|
+
import type { RegistryPluginInfo } from "./registry-client-types.js";
|
|
2
2
|
export declare class RegistryNetworkFallbackError extends Error {
|
|
3
3
|
readonly expectedLocalFallback = true;
|
|
4
4
|
constructor(message: string);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryAppInfo, RegistryPluginInfo, RegistryPluginListItem, RegistrySearchResult } from "./registry-client-types.
|
|
1
|
+
import type { RegistryAppInfo, RegistryPluginInfo, RegistryPluginListItem, RegistrySearchResult } from "./registry-client-types.js";
|
|
2
2
|
export declare function normalizePluginLookupAlias(name: string): string;
|
|
3
3
|
export declare function getPluginInfoFromRegistry(registry: Map<string, RegistryPluginInfo>, name: string): RegistryPluginInfo | null;
|
|
4
4
|
export declare function scoreEntries<T extends RegistryPluginInfo>(entries: Iterable<T>, query: string, limit: number, extraNames?: (p: T) => string[], extraTerms?: (p: T) => string[]): Array<{
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module services/registry-client
|
|
8
8
|
*/
|
|
9
|
-
import type { RegistryEndpoint } from "../config/types.eliza.
|
|
10
|
-
import type { RegistryAppInfo, RegistryPluginInfo, RegistryPluginListItem, RegistrySearchResult } from "./registry-client-types.
|
|
11
|
-
export type { AppUiExtensionConfig, RegistryAppInfo, RegistryAppMeta, RegistryAppViewerMeta, RegistryPluginInfo, RegistryPluginListItem, RegistrySearchResult, } from "./registry-client-types.
|
|
9
|
+
import type { RegistryEndpoint } from "../config/types.eliza.js";
|
|
10
|
+
import type { RegistryAppInfo, RegistryPluginInfo, RegistryPluginListItem, RegistrySearchResult } from "./registry-client-types.js";
|
|
11
|
+
export type { AppUiExtensionConfig, RegistryAppInfo, RegistryAppMeta, RegistryAppViewerMeta, RegistryPluginInfo, RegistryPluginListItem, RegistrySearchResult, } from "./registry-client-types.js";
|
|
12
12
|
/** Return the list of custom registry endpoints from config. */
|
|
13
13
|
export declare function getConfiguredEndpoints(): RegistryEndpoint[];
|
|
14
14
|
/** Add a custom registry endpoint. Blocks duplicate URLs. */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Import graph types and helpers from `@elizaos/core` directly.
|
|
4
4
|
*/
|
|
5
5
|
import type { IAgentRuntime, RelationshipsGraphService } from "@elizaos/core";
|
|
6
|
-
export { type ClusterMemoriesQuery, type ClusterSearchQuery, createNativeRelationshipsGraphService, getMemoriesForCluster, type RelationshipsConversationMessage, type RelationshipsConversationSnippet, type RelationshipsFactExtractedInformation, type RelationshipsFactProvenance, type RelationshipsGraphEdge, type RelationshipsGraphQuery, type RelationshipsGraphService, type RelationshipsGraphSnapshot, type RelationshipsGraphStats, type RelationshipsIdentityEdge, type RelationshipsIdentityHandle, type RelationshipsIdentitySummary, type RelationshipsMergeCandidate, type RelationshipsPersonDetail, type RelationshipsPersonFact, type RelationshipsPersonSummary, type RelationshipsProfile, type RelationshipsRelevantMemory, type RelationshipsServiceLike, type RelationshipsUserPersonalityPreference, searchMemoriesForCluster, } from "../../../core/src/services/relationships-graph-builder.
|
|
6
|
+
export { type ClusterMemoriesQuery, type ClusterSearchQuery, createNativeRelationshipsGraphService, getMemoriesForCluster, type RelationshipsConversationMessage, type RelationshipsConversationSnippet, type RelationshipsFactExtractedInformation, type RelationshipsFactProvenance, type RelationshipsGraphEdge, type RelationshipsGraphQuery, type RelationshipsGraphService, type RelationshipsGraphSnapshot, type RelationshipsGraphStats, type RelationshipsIdentityEdge, type RelationshipsIdentityHandle, type RelationshipsIdentitySummary, type RelationshipsMergeCandidate, type RelationshipsPersonDetail, type RelationshipsPersonFact, type RelationshipsPersonSummary, type RelationshipsProfile, type RelationshipsRelevantMemory, type RelationshipsServiceLike, type RelationshipsUserPersonalityPreference, searchMemoriesForCluster, } from "../../../core/src/services/relationships-graph-builder.js";
|
|
7
7
|
/**
|
|
8
8
|
* Resolve the merged RelationshipsService and wire its agent-side owner
|
|
9
9
|
* resolvers. Compatibility wrapper for the old factory; prefer
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IAgentRuntime } from "@elizaos/core";
|
|
2
|
-
import { buildRemoteCapabilityEndpointTrustPolicy, installRemoteCapabilityEndpoint, type RemoteCapabilityEndpointProvider, type RemoteCapabilityEndpointTrustPolicyOptions } from "./remote-capability-endpoint-provider.
|
|
3
|
-
import type { RemoteCapabilityEndpointConfig } from "./remote-capability-router.
|
|
4
|
-
import type { RemotePluginSyncResult } from "./remote-plugin-adapter.
|
|
2
|
+
import { buildRemoteCapabilityEndpointTrustPolicy, installRemoteCapabilityEndpoint, type RemoteCapabilityEndpointProvider, type RemoteCapabilityEndpointTrustPolicyOptions } from "./remote-capability-endpoint-provider.js";
|
|
3
|
+
import type { RemoteCapabilityEndpointConfig } from "./remote-capability-router.js";
|
|
4
|
+
import type { RemotePluginSyncResult } from "./remote-plugin-adapter.js";
|
|
5
5
|
export type CloudCapabilitySandboxProvisionOptions = {
|
|
6
6
|
cloudApiBase: string;
|
|
7
7
|
authToken: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CapabilityAvailability, type JsonValue, type PluginCallAppBridgeResult, type PluginCallRouteResult, type PluginCallServiceResult, type PluginEvaluatorPrepareResult, type PluginEvaluatorProcessResult, type PluginEvaluatorPromptResult, type PluginEvaluatorShouldRunResult, type PluginGetAssetResult, type PluginGetProviderResult, type PluginHandleEventResult, type PluginInvokeActionResult, type PluginInvokeModelResult, type PluginLifecycleCallResult, type PluginResponseHandlerEvaluatorEvaluateResult, type PluginResponseHandlerEvaluatorShouldRunResult, type PluginResponseHandlerFieldEvaluatorHandleResult, type PluginResponseHandlerFieldEvaluatorParseResult, type PluginResponseHandlerFieldEvaluatorShouldRunResult, type RuntimeBrokerCapabilityMethod } from "@elizaos/core";
|
|
2
|
-
import { type RemoteCapabilityEndpointConfig } from "./remote-capability-router.
|
|
2
|
+
import { type RemoteCapabilityEndpointConfig } from "./remote-capability-router.js";
|
|
3
3
|
export type RemoteCapabilityEndpointConformanceSurface = "action" | "provider" | "route" | "viewAsset" | "model" | "lifecycle" | "event" | "service" | "appBridge" | "evaluator" | "responseHandlerEvaluator" | "responseHandlerFieldEvaluator";
|
|
4
4
|
export type RemoteCapabilityEndpointConformanceRpcMethod = Exclude<Extract<RuntimeBrokerCapabilityMethod, `plugin.${string}`>, "plugin.modules.list">;
|
|
5
5
|
export type RemoteCapabilityEndpointConformanceOptions = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type IAgentRuntime } from "@elizaos/core";
|
|
2
|
-
import { type RemoteCapabilityEndpointConfig, type RemoteCapabilityRouterConfig, RemoteCapabilityRouterService } from "./remote-capability-router.
|
|
3
|
-
import { type RemotePluginSyncResult, type RemotePluginTrustPolicy } from "./remote-plugin-adapter.
|
|
4
|
-
import type { TeeEvidenceProvider } from "./tee-evidence.
|
|
5
|
-
import { type TeeEvidencePolicy, type TeeEvidencePolicyDecision } from "./tee-policy.
|
|
2
|
+
import { type RemoteCapabilityEndpointConfig, type RemoteCapabilityRouterConfig, RemoteCapabilityRouterService } from "./remote-capability-router.js";
|
|
3
|
+
import { type RemotePluginSyncResult, type RemotePluginTrustPolicy } from "./remote-plugin-adapter.js";
|
|
4
|
+
import type { TeeEvidenceProvider } from "./tee-evidence.js";
|
|
5
|
+
import { type TeeEvidencePolicy, type TeeEvidencePolicyDecision } from "./tee-policy.js";
|
|
6
6
|
export type RemoteCapabilityEndpointProviderId = "direct" | "cloud" | "dstack" | "dstack-cloud" | "cvm-direct" | "e2b" | "home-machine" | "mobile-companion" | "desktop-companion" | (string & {});
|
|
7
7
|
export type ProvisionedRemoteCapabilityEndpoint = {
|
|
8
8
|
providerId: RemoteCapabilityEndpointProviderId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RemoteCapabilityEndpointProvider, RemoteCapabilityEndpointProviderId } from "./remote-capability-endpoint-provider.
|
|
1
|
+
import type { RemoteCapabilityEndpointProvider, RemoteCapabilityEndpointProviderId } from "./remote-capability-endpoint-provider.js";
|
|
2
2
|
export type UrlRemoteCapabilityEndpointProviderOptions = {
|
|
3
3
|
baseUrl: string;
|
|
4
4
|
endpointId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-plugin-adapter.d.ts","sourceRoot":"","sources":["../../src/services/remote-plugin-adapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAML,KAAK,aAAa,EAIlB,KAAK,MAAM,EAQX,KAAK,0BAA0B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4BAA4B,CAC1C,MAAM,EAAE,0BAA0B,GACjC,MAAM,CA0aR"}
|
|
@@ -134,6 +134,9 @@ export function createRemoteCapabilityPlugin(module) {
|
|
|
134
134
|
id: view.id,
|
|
135
135
|
label: view.label,
|
|
136
136
|
viewType: view.viewType === "tui" ? "tui" : "gui",
|
|
137
|
+
...(view.backgroundPolicy === undefined
|
|
138
|
+
? {}
|
|
139
|
+
: { backgroundPolicy: view.backgroundPolicy }),
|
|
137
140
|
...(view.bundleUrl === undefined ? {} : { bundleUrl: view.bundleUrl }),
|
|
138
141
|
...(view.bundleUrl !== undefined || view.bundlePath === undefined
|
|
139
142
|
? {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-plugin-bridge.d.ts","sourceRoot":"","sources":["../../src/services/remote-plugin-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAEV,aAAa,EAOd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"remote-plugin-bridge.d.ts","sourceRoot":"","sources":["../../src/services/remote-plugin-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAEV,aAAa,EAOd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAKV,yBAAyB,EAK1B,MAAM,iCAAiC,CAAC;AAiGzC,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC/C,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC7E,KAAK,IAAI,IAAI,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MA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