@elizaos/shared 2.0.0-alpha.538 → 2.0.11-beta.7
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/api/agent-api-types.d.ts +210 -0
- package/api/agent-api-types.d.ts.map +1 -0
- package/api/agent-api-types.js +11 -0
- package/api/agent-api-types.js.map +1 -0
- package/api/http-helpers.d.ts +3 -0
- package/api/http-helpers.d.ts.map +1 -0
- package/api/http-helpers.js +2 -0
- package/api/http-helpers.js.map +1 -0
- package/api/route-helpers.d.ts +2 -0
- package/api/route-helpers.d.ts.map +1 -0
- package/api/route-helpers.js +2 -0
- package/api/route-helpers.js.map +1 -0
- package/app-hero-art.d.ts.map +1 -1
- package/app-hero-art.js +5 -13
- package/app-hero-art.js.map +1 -1
- package/brand/index.d.ts +130 -0
- package/brand/index.d.ts.map +1 -0
- package/brand/index.js +126 -0
- package/brand/index.js.map +1 -0
- package/brand-classic/index.d.ts +158 -0
- package/brand-classic/index.d.ts.map +1 -0
- package/brand-classic/index.js +91 -0
- package/brand-classic/index.js.map +1 -0
- package/character-language.d.ts +16 -0
- package/character-language.d.ts.map +1 -0
- package/character-language.js +58 -0
- package/character-language.js.map +1 -0
- package/{onboarding-presets.characters.d.ts → character-presets.characters.d.ts} +2 -2
- package/character-presets.characters.d.ts.map +1 -0
- package/{onboarding-presets.characters.js → character-presets.characters.js} +1 -1
- package/character-presets.characters.js.map +1 -0
- package/{onboarding-presets.d.ts → character-presets.d.ts} +7 -5
- package/character-presets.d.ts.map +1 -0
- package/{onboarding-presets.js → character-presets.js} +53 -58
- package/character-presets.js.map +1 -0
- package/{onboarding-presets.shared.d.ts → character-presets.shared.d.ts} +1 -1
- package/character-presets.shared.d.ts.map +1 -0
- package/{onboarding-presets.shared.js → character-presets.shared.js} +1 -1
- package/character-presets.shared.js.map +1 -0
- package/checkout/index.d.ts +48 -0
- package/checkout/index.d.ts.map +1 -0
- package/checkout/index.js +59 -0
- package/checkout/index.js.map +1 -0
- package/cli/parse-duration.d.ts +5 -0
- package/cli/parse-duration.d.ts.map +1 -0
- package/cli/parse-duration.js +26 -0
- package/cli/parse-duration.js.map +1 -0
- package/config/allowed-hosts.d.ts +8 -0
- package/config/allowed-hosts.d.ts.map +1 -0
- package/config/allowed-hosts.js +44 -0
- package/config/allowed-hosts.js.map +1 -0
- package/config/api-key-prefix-hints.d.ts +24 -0
- package/config/api-key-prefix-hints.d.ts.map +1 -0
- package/config/api-key-prefix-hints.js +26 -0
- package/config/api-key-prefix-hints.js.map +1 -0
- package/config/app-config.d.ts +274 -0
- package/config/app-config.d.ts.map +1 -0
- package/config/app-config.js +64 -0
- package/config/app-config.js.map +1 -0
- package/config/app-manifest.d.ts +75 -0
- package/config/app-manifest.d.ts.map +1 -0
- package/config/app-manifest.js +115 -0
- package/config/app-manifest.js.map +1 -0
- package/config/boot-config-store.d.ts +74 -0
- package/config/boot-config-store.d.ts.map +1 -0
- package/config/boot-config-store.js +121 -0
- package/config/boot-config-store.js.map +1 -0
- package/config/boot-config.d.ts +6 -0
- package/config/boot-config.d.ts.map +1 -0
- package/config/boot-config.js +6 -0
- package/config/boot-config.js.map +1 -0
- package/config/branding.d.ts +53 -0
- package/config/branding.d.ts.map +1 -0
- package/config/branding.js +23 -0
- package/config/branding.js.map +1 -0
- package/config/cloud-only.d.ts +8 -0
- package/config/cloud-only.d.ts.map +1 -0
- package/config/cloud-only.js +26 -0
- package/config/cloud-only.js.map +1 -0
- package/config/config-catalog.d.ts +371 -0
- package/config/config-catalog.d.ts.map +1 -0
- package/config/config-catalog.js +719 -0
- package/config/config-catalog.js.map +1 -0
- package/config/config-paths.d.ts +11 -0
- package/config/config-paths.d.ts.map +1 -0
- package/config/config-paths.js +74 -0
- package/config/config-paths.js.map +1 -0
- package/config/config.d.ts +11 -0
- package/config/config.d.ts.map +1 -0
- package/config/config.js +23 -0
- package/config/config.js.map +1 -0
- package/config/distribution-profile.d.ts +16 -0
- package/config/distribution-profile.d.ts.map +1 -0
- package/config/distribution-profile.js +29 -0
- package/config/distribution-profile.js.map +1 -0
- package/config/env-vars.d.ts +2 -0
- package/config/env-vars.d.ts.map +1 -0
- package/config/env-vars.js +2 -0
- package/config/env-vars.js.map +1 -0
- package/config/index.d.ts +12 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +15 -0
- package/config/index.js.map +1 -0
- package/config/plugin-auto-enable-engine.d.ts +4 -0
- package/config/plugin-auto-enable-engine.d.ts.map +1 -0
- package/config/plugin-auto-enable-engine.js +45 -0
- package/config/plugin-auto-enable-engine.js.map +1 -0
- package/config/plugin-auto-enable.d.ts +2 -0
- package/config/plugin-auto-enable.d.ts.map +1 -0
- package/config/plugin-auto-enable.js +8 -0
- package/config/plugin-auto-enable.js.map +1 -0
- package/config/plugin-manifest.d.ts +89 -0
- package/config/plugin-manifest.d.ts.map +1 -0
- package/config/plugin-manifest.js +281 -0
- package/config/plugin-manifest.js.map +1 -0
- package/config/plugin-ui-spec.d.ts +42 -0
- package/config/plugin-ui-spec.d.ts.map +1 -0
- package/config/plugin-ui-spec.js +257 -0
- package/config/plugin-ui-spec.js.map +1 -0
- package/config/runtime-mode.d.ts +54 -0
- package/config/runtime-mode.d.ts.map +1 -0
- package/config/runtime-mode.js +107 -0
- package/config/runtime-mode.js.map +1 -0
- package/config/runtime-overrides.d.ts +16 -0
- package/config/runtime-overrides.d.ts.map +1 -0
- package/config/runtime-overrides.js +49 -0
- package/config/runtime-overrides.js.map +1 -0
- package/config/schema.d.ts +7 -0
- package/config/schema.d.ts.map +1 -0
- package/config/schema.js +30 -0
- package/config/schema.js.map +1 -0
- package/config/types.agent-defaults.d.ts +6 -1
- package/config/types.agent-defaults.d.ts.map +1 -1
- package/config/types.agents.d.ts +9 -4
- package/config/types.agents.d.ts.map +1 -1
- package/config/types.eliza.d.ts +27 -49
- package/config/types.eliza.d.ts.map +1 -1
- package/config/types.messages.d.ts +2 -2
- package/config/types.messages.d.ts.map +1 -1
- package/config/types.tools.d.ts +2 -2
- package/config/types.tools.d.ts.map +1 -1
- package/config/ui-spec.d.ts +164 -0
- package/config/ui-spec.d.ts.map +1 -0
- package/config/ui-spec.js +14 -0
- package/config/ui-spec.js.map +1 -0
- package/config/wechat-config.d.ts +2 -0
- package/config/wechat-config.d.ts.map +1 -0
- package/config/wechat-config.js +2 -0
- package/config/wechat-config.js.map +1 -0
- package/config/zod-schema.agent-runtime.d.ts +1087 -0
- package/config/zod-schema.agent-runtime.d.ts.map +1 -0
- package/config/zod-schema.agent-runtime.js +764 -0
- package/config/zod-schema.agent-runtime.js.map +1 -0
- package/config/zod-schema.core.d.ts +1048 -0
- package/config/zod-schema.core.d.ts.map +1 -0
- package/config/zod-schema.core.js +707 -0
- package/config/zod-schema.core.js.map +1 -0
- package/connector-cred-types.d.ts +3 -3
- package/connector-cred-types.js +4 -4
- package/connectors.d.ts +0 -8
- package/connectors.d.ts.map +1 -1
- package/connectors.js +26 -50
- package/connectors.js.map +1 -1
- package/contracts/agent-routes.d.ts +63 -0
- package/contracts/agent-routes.d.ts.map +1 -0
- package/contracts/agent-routes.js +55 -0
- package/contracts/agent-routes.js.map +1 -0
- package/contracts/app-permissions-routes.d.ts +148 -0
- package/contracts/app-permissions-routes.d.ts.map +1 -0
- package/contracts/app-permissions-routes.js +96 -0
- package/contracts/app-permissions-routes.js.map +1 -0
- package/contracts/app-permissions.d.ts +122 -0
- package/contracts/app-permissions.d.ts.map +1 -0
- package/contracts/app-permissions.js +163 -0
- package/contracts/app-permissions.js.map +1 -0
- package/contracts/apps-favorites-routes.d.ts +44 -0
- package/contracts/apps-favorites-routes.d.ts.map +1 -0
- package/contracts/apps-favorites-routes.js +48 -0
- package/contracts/apps-favorites-routes.js.map +1 -0
- package/contracts/apps-lifecycle-routes.d.ts +185 -0
- package/contracts/apps-lifecycle-routes.d.ts.map +1 -0
- package/contracts/apps-lifecycle-routes.js +204 -0
- package/contracts/apps-lifecycle-routes.js.map +1 -0
- package/contracts/apps-loading-routes.d.ts +64 -0
- package/contracts/apps-loading-routes.d.ts.map +1 -0
- package/contracts/apps-loading-routes.js +65 -0
- package/contracts/apps-loading-routes.js.map +1 -0
- package/contracts/apps-runs-routes.d.ts +33 -0
- package/contracts/apps-runs-routes.d.ts.map +1 -0
- package/contracts/apps-runs-routes.js +38 -0
- package/contracts/apps-runs-routes.js.map +1 -0
- package/contracts/apps.d.ts +883 -3
- package/contracts/apps.d.ts.map +1 -1
- package/contracts/apps.js +278 -40
- package/contracts/apps.js.map +1 -1
- package/contracts/auth-routes.d.ts +23 -0
- package/contracts/auth-routes.d.ts.map +1 -0
- package/contracts/auth-routes.js +25 -0
- package/contracts/auth-routes.js.map +1 -0
- package/contracts/awareness.d.ts +1 -1
- package/contracts/calendar.d.ts +181 -0
- package/contracts/calendar.d.ts.map +1 -0
- package/contracts/calendar.js +19 -0
- package/contracts/calendar.js.map +1 -0
- package/contracts/character-routes.d.ts +70 -0
- package/contracts/character-routes.d.ts.map +1 -0
- package/contracts/character-routes.js +49 -0
- package/contracts/character-routes.js.map +1 -0
- package/contracts/cloud-coding-containers.d.ts +432 -0
- package/contracts/cloud-coding-containers.d.ts.map +1 -0
- package/contracts/cloud-coding-containers.js +135 -0
- package/contracts/cloud-coding-containers.js.map +1 -0
- package/contracts/cloud-topology.js +7 -7
- package/contracts/cloud-topology.js.map +1 -1
- package/contracts/config.d.ts +52 -4
- package/contracts/config.d.ts.map +1 -1
- package/contracts/connector-routes.d.ts +39 -0
- package/contracts/connector-routes.d.ts.map +1 -0
- package/contracts/connector-routes.js +50 -0
- package/contracts/connector-routes.js.map +1 -0
- package/contracts/content-pack.d.ts +2 -2
- package/contracts/content-pack.d.ts.map +1 -1
- package/contracts/content-pack.js +1 -1
- package/contracts/conversation-routes.d.ts +195 -0
- package/contracts/conversation-routes.d.ts.map +1 -0
- package/contracts/conversation-routes.js +107 -0
- package/contracts/conversation-routes.js.map +1 -0
- package/contracts/diagnostics-routes.d.ts +33 -0
- package/contracts/diagnostics-routes.d.ts.map +1 -0
- package/contracts/diagnostics-routes.js +26 -0
- package/contracts/diagnostics-routes.js.map +1 -0
- package/contracts/feature-result.d.ts +24 -0
- package/contracts/feature-result.d.ts.map +1 -0
- package/contracts/feature-result.js +7 -0
- package/contracts/feature-result.js.map +1 -0
- package/contracts/{onboarding.d.ts → first-run-options.d.ts} +172 -69
- package/contracts/first-run-options.d.ts.map +1 -0
- package/contracts/{onboarding.js → first-run-options.js} +222 -91
- package/contracts/first-run-options.js.map +1 -0
- package/contracts/first-run-routes.d.ts +167 -0
- package/contracts/first-run-routes.d.ts.map +1 -0
- package/contracts/first-run-routes.js +115 -0
- package/contracts/first-run-routes.js.map +1 -0
- package/contracts/health.d.ts +30 -0
- package/contracts/health.d.ts.map +1 -0
- package/contracts/health.js +29 -0
- package/contracts/health.js.map +1 -0
- package/contracts/inbox-routes.d.ts +37 -0
- package/contracts/inbox-routes.d.ts.map +1 -0
- package/contracts/inbox-routes.js +44 -0
- package/contracts/inbox-routes.js.map +1 -0
- package/contracts/index.d.ts +30 -3
- package/contracts/index.d.ts.map +1 -1
- package/contracts/index.js +30 -3
- package/contracts/index.js.map +1 -1
- package/contracts/memory-routes.d.ts +27 -0
- package/contracts/memory-routes.d.ts.map +1 -0
- package/contracts/memory-routes.js +23 -0
- package/contracts/memory-routes.js.map +1 -0
- package/contracts/misc-routes.d.ts +192 -0
- package/contracts/misc-routes.d.ts.map +1 -0
- package/contracts/misc-routes.js +155 -0
- package/contracts/misc-routes.js.map +1 -0
- package/contracts/permissions-routes.d.ts +31 -0
- package/contracts/permissions-routes.d.ts.map +1 -0
- package/contracts/permissions-routes.js +34 -0
- package/contracts/permissions-routes.js.map +1 -0
- package/contracts/permissions.d.ts +81 -11
- package/contracts/permissions.d.ts.map +1 -1
- package/contracts/permissions.js +37 -1
- package/contracts/permissions.js.map +1 -1
- package/contracts/{lifeops.d.ts → personal-assistant.d.ts} +368 -170
- package/contracts/personal-assistant.d.ts.map +1 -0
- package/contracts/{lifeops.js → personal-assistant.js} +39 -13
- package/contracts/personal-assistant.js.map +1 -0
- package/contracts/plugin-routes.d.ts +105 -0
- package/contracts/plugin-routes.d.ts.map +1 -0
- package/contracts/plugin-routes.js +81 -0
- package/contracts/plugin-routes.js.map +1 -0
- package/contracts/relationships-routes.d.ts +23 -0
- package/contracts/relationships-routes.d.ts.map +1 -0
- package/contracts/relationships-routes.js +22 -0
- package/contracts/relationships-routes.js.map +1 -0
- package/contracts/service-routing.d.ts +7 -121
- package/contracts/service-routing.d.ts.map +1 -1
- package/contracts/service-routing.js +19 -12
- package/contracts/service-routing.js.map +1 -1
- package/contracts/skills-routes.d.ts +116 -0
- package/contracts/skills-routes.d.ts.map +1 -0
- package/contracts/skills-routes.js +115 -0
- package/contracts/skills-routes.js.map +1 -0
- package/contracts/subscription-routes.d.ts +47 -0
- package/contracts/subscription-routes.d.ts.map +1 -0
- package/contracts/subscription-routes.js +50 -0
- package/contracts/subscription-routes.js.map +1 -0
- package/contracts/tail-routes.d.ts +78 -0
- package/contracts/tail-routes.d.ts.map +1 -0
- package/contracts/tail-routes.js +63 -0
- package/contracts/tail-routes.js.map +1 -0
- package/contracts/theme.d.ts +0 -2
- package/contracts/theme.d.ts.map +1 -1
- package/contracts/theme.js +0 -2
- package/contracts/theme.js.map +1 -1
- package/contracts/update-status.d.ts +100 -0
- package/contracts/update-status.d.ts.map +1 -0
- package/contracts/update-status.js +45 -0
- package/contracts/update-status.js.map +1 -0
- package/contracts/wallet-routes.d.ts +82 -0
- package/contracts/wallet-routes.d.ts.map +1 -0
- package/contracts/wallet-routes.js +49 -0
- package/contracts/wallet-routes.js.map +1 -0
- package/contracts/wallet.d.ts +12 -570
- package/contracts/wallet.d.ts.map +1 -1
- package/contracts/wallet.js +139 -0
- package/contracts/wallet.js.map +1 -1
- package/contracts/workbench-routes.d.ts +231 -0
- package/contracts/workbench-routes.d.ts.map +1 -0
- package/contracts/workbench-routes.js +183 -0
- package/contracts/workbench-routes.js.map +1 -0
- package/db/drizzle-database.d.ts +13 -0
- package/db/drizzle-database.d.ts.map +1 -0
- package/db/drizzle-database.js +2 -0
- package/db/drizzle-database.js.map +1 -0
- package/dev-settings-banner-style.d.ts +1 -1
- package/dev-settings-banner-style.js +2 -2
- package/dev-settings-banner-style.js.map +1 -1
- package/dev-settings-figlet-heading.d.ts.map +1 -1
- package/dev-settings-figlet-heading.js +1 -8
- package/dev-settings-figlet-heading.js.map +1 -1
- package/elizacloud/base-url.d.ts +6 -0
- package/elizacloud/base-url.d.ts.map +1 -0
- package/elizacloud/base-url.js +65 -0
- package/elizacloud/base-url.js.map +1 -0
- package/elizacloud/cloud-provisioning.d.ts +9 -0
- package/elizacloud/cloud-provisioning.d.ts.map +1 -0
- package/elizacloud/cloud-provisioning.js +25 -0
- package/elizacloud/cloud-provisioning.js.map +1 -0
- package/elizacloud/cloud-secrets.d.ts +23 -0
- package/elizacloud/cloud-secrets.d.ts.map +1 -0
- package/elizacloud/cloud-secrets.js +51 -0
- package/elizacloud/cloud-secrets.js.map +1 -0
- package/elizacloud/index.d.ts +6 -0
- package/elizacloud/index.d.ts.map +1 -0
- package/elizacloud/index.js +6 -0
- package/elizacloud/index.js.map +1 -0
- package/elizacloud/is-cloud-reachable.d.ts +19 -0
- package/elizacloud/is-cloud-reachable.d.ts.map +1 -0
- package/elizacloud/is-cloud-reachable.js +44 -0
- package/elizacloud/is-cloud-reachable.js.map +1 -0
- package/elizacloud/server-cloud-tts.d.ts +21 -0
- package/elizacloud/server-cloud-tts.d.ts.map +1 -0
- package/elizacloud/server-cloud-tts.js +293 -0
- package/elizacloud/server-cloud-tts.js.map +1 -0
- package/email-classification/email-classifier.d.ts +57 -0
- package/email-classification/email-classifier.d.ts.map +1 -0
- package/email-classification/email-classifier.js +348 -0
- package/email-classification/email-classifier.js.map +1 -0
- package/email-classification/index.d.ts +12 -0
- package/email-classification/index.d.ts.map +1 -0
- package/email-classification/index.js +12 -0
- package/email-classification/index.js.map +1 -0
- package/email-classification/wrap-untrusted-email-content.d.ts +15 -0
- package/email-classification/wrap-untrusted-email-content.d.ts.map +1 -0
- package/email-classification/wrap-untrusted-email-content.js +24 -0
- package/email-classification/wrap-untrusted-email-content.js.map +1 -0
- package/env-utils.d.ts +1 -4
- package/env-utils.d.ts.map +1 -1
- package/env-utils.js +9 -1
- package/env-utils.js.map +1 -1
- package/events/index.d.ts +68 -0
- package/events/index.d.ts.map +1 -0
- package/events/index.js +53 -0
- package/events/index.js.map +1 -0
- package/hardware-catalog/index.d.ts +204 -0
- package/hardware-catalog/index.d.ts.map +1 -0
- package/hardware-catalog/index.js +174 -0
- package/hardware-catalog/index.js.map +1 -0
- package/i18n/generated/validation-keyword-data.d.ts +2711 -748
- package/i18n/generated/validation-keyword-data.d.ts.map +1 -1
- package/i18n/generated/validation-keyword-data.js +2711 -748
- package/i18n/generated/validation-keyword-data.js.map +1 -1
- package/i18n/keyword-matching.d.ts.map +1 -1
- package/i18n/keyword-matching.js +4 -1
- package/i18n/keyword-matching.js.map +1 -1
- package/index.d.ts +82 -7
- package/index.d.ts.map +1 -1
- package/index.js +109 -13
- package/index.js.map +1 -1
- package/knowledge-graph/entity-types.d.ts +135 -0
- package/knowledge-graph/entity-types.d.ts.map +1 -0
- package/knowledge-graph/entity-types.js +75 -0
- package/knowledge-graph/entity-types.js.map +1 -0
- package/knowledge-graph/index.d.ts +13 -0
- package/knowledge-graph/index.d.ts.map +1 -0
- package/knowledge-graph/index.js +13 -0
- package/knowledge-graph/index.js.map +1 -0
- package/knowledge-graph/merge.d.ts +76 -0
- package/knowledge-graph/merge.d.ts.map +1 -0
- package/knowledge-graph/merge.js +175 -0
- package/knowledge-graph/merge.js.map +1 -0
- package/knowledge-graph/relationship-types.d.ts +105 -0
- package/knowledge-graph/relationship-types.d.ts.map +1 -0
- package/knowledge-graph/relationship-types.js +114 -0
- package/knowledge-graph/relationship-types.js.map +1 -0
- package/lifeops-constants/index.d.ts +9 -0
- package/lifeops-constants/index.d.ts.map +1 -0
- package/lifeops-constants/index.js +9 -0
- package/lifeops-constants/index.js.map +1 -0
- package/lifeops-constants/service-constants.d.ts +79 -0
- package/lifeops-constants/service-constants.d.ts.map +1 -0
- package/lifeops-constants/service-constants.js +123 -0
- package/lifeops-constants/service-constants.js.map +1 -0
- package/lifeops-normalize/index.d.ts +12 -0
- package/lifeops-normalize/index.d.ts.map +1 -0
- package/lifeops-normalize/index.js +12 -0
- package/lifeops-normalize/index.js.map +1 -0
- package/lifeops-normalize/service-error.d.ts +14 -0
- package/lifeops-normalize/service-error.d.ts.map +1 -0
- package/lifeops-normalize/service-error.js +19 -0
- package/lifeops-normalize/service-error.js.map +1 -0
- package/lifeops-normalize/service-normalize.d.ts +38 -0
- package/lifeops-normalize/service-normalize.d.ts.map +1 -0
- package/lifeops-normalize/service-normalize.js +205 -0
- package/lifeops-normalize/service-normalize.js.map +1 -0
- package/lifeops-normalize/time-zone.d.ts +12 -0
- package/lifeops-normalize/time-zone.d.ts.map +1 -0
- package/lifeops-normalize/time-zone.js +29 -0
- package/lifeops-normalize/time-zone.js.map +1 -0
- package/local-inference/catalog.d.ts +97 -0
- package/local-inference/catalog.d.ts.map +1 -0
- package/local-inference/catalog.js +547 -0
- package/local-inference/catalog.js.map +1 -0
- package/local-inference/gpu-profiles.d.ts +110 -0
- package/local-inference/gpu-profiles.d.ts.map +1 -0
- package/local-inference/gpu-profiles.js +214 -0
- package/local-inference/gpu-profiles.js.map +1 -0
- package/local-inference/index.d.ts +21 -0
- package/local-inference/index.d.ts.map +1 -0
- package/local-inference/index.js +18 -0
- package/local-inference/index.js.map +1 -0
- package/local-inference/manifest-signature.d.ts +61 -0
- package/local-inference/manifest-signature.d.ts.map +1 -0
- package/local-inference/manifest-signature.js +129 -0
- package/local-inference/manifest-signature.js.map +1 -0
- package/local-inference/network-policy.d.ts +115 -0
- package/local-inference/network-policy.d.ts.map +1 -0
- package/local-inference/network-policy.js +154 -0
- package/local-inference/network-policy.js.map +1 -0
- package/local-inference/paths.d.ts +24 -0
- package/local-inference/paths.d.ts.map +1 -0
- package/local-inference/paths.js +40 -0
- package/local-inference/paths.js.map +1 -0
- package/local-inference/providers-types.d.ts +56 -0
- package/local-inference/providers-types.d.ts.map +1 -0
- package/local-inference/providers-types.js +19 -0
- package/local-inference/providers-types.js.map +1 -0
- package/local-inference/routing-preferences.d.ts +31 -0
- package/local-inference/routing-preferences.d.ts.map +1 -0
- package/local-inference/routing-preferences.js +73 -0
- package/local-inference/routing-preferences.js.map +1 -0
- package/local-inference/throughput.d.ts +74 -0
- package/local-inference/throughput.d.ts.map +1 -0
- package/local-inference/throughput.js +84 -0
- package/local-inference/throughput.js.map +1 -0
- package/local-inference/types.d.ts +510 -0
- package/local-inference/types.d.ts.map +1 -0
- package/local-inference/types.js +22 -0
- package/local-inference/types.js.map +1 -0
- package/local-inference/verify.d.ts +39 -0
- package/local-inference/verify.d.ts.map +1 -0
- package/local-inference/verify.js +105 -0
- package/local-inference/verify.js.map +1 -0
- package/local-inference/voice-models.d.ts +156 -0
- package/local-inference/voice-models.d.ts.map +1 -0
- package/local-inference/voice-models.js +746 -0
- package/local-inference/voice-models.js.map +1 -0
- package/local-inference-gpu/gpu-overrides.d.ts +97 -0
- package/local-inference-gpu/gpu-overrides.d.ts.map +1 -0
- package/local-inference-gpu/gpu-overrides.js +76 -0
- package/local-inference-gpu/gpu-overrides.js.map +1 -0
- package/local-inference-gpu/gpu-profile-loader.d.ts +83 -0
- package/local-inference-gpu/gpu-profile-loader.d.ts.map +1 -0
- package/local-inference-gpu/gpu-profile-loader.js +196 -0
- package/local-inference-gpu/gpu-profile-loader.js.map +1 -0
- package/local-inference-gpu/gpu-profile-schema.d.ts +208 -0
- package/local-inference-gpu/gpu-profile-schema.d.ts.map +1 -0
- package/local-inference-gpu/gpu-profile-schema.js +123 -0
- package/local-inference-gpu/gpu-profile-schema.js.map +1 -0
- package/local-inference-gpu/gpu-tier-detect.d.ts +61 -0
- package/local-inference-gpu/gpu-tier-detect.d.ts.map +1 -0
- package/local-inference-gpu/gpu-tier-detect.js +93 -0
- package/local-inference-gpu/gpu-tier-detect.js.map +1 -0
- package/local-inference-gpu/gpu-tier-profiles.d.ts +110 -0
- package/local-inference-gpu/gpu-tier-profiles.d.ts.map +1 -0
- package/local-inference-gpu/gpu-tier-profiles.js +235 -0
- package/local-inference-gpu/gpu-tier-profiles.js.map +1 -0
- package/package.json +111 -160
- package/platform/is-native-server.d.ts +9 -0
- package/platform/is-native-server.d.ts.map +1 -0
- package/platform/is-native-server.js +12 -0
- package/platform/is-native-server.js.map +1 -0
- package/restart.d.ts +2 -1
- package/restart.d.ts.map +1 -1
- package/restart.js +3 -2
- package/restart.js.map +1 -1
- package/runtime-env.d.ts +2 -2
- package/runtime-env.d.ts.map +1 -1
- package/runtime-env.js +15 -7
- package/runtime-env.js.map +1 -1
- package/self-edit.d.ts +4 -4
- package/self-edit.d.ts.map +1 -1
- package/self-edit.js +5 -5
- package/self-edit.js.map +1 -1
- package/settings-debug.d.ts.map +1 -1
- package/settings-debug.js +45 -38
- package/settings-debug.js.map +1 -1
- package/spoken-text.d.ts.map +1 -1
- package/spoken-text.js +3 -2
- package/spoken-text.js.map +1 -1
- package/steward-session-client/index.d.ts +172 -0
- package/steward-session-client/index.d.ts.map +1 -0
- package/steward-session-client/index.js +248 -0
- package/steward-session-client/index.js.map +1 -0
- package/steward-session-client/steward-oauth-pkce.d.ts +24 -0
- package/steward-session-client/steward-oauth-pkce.d.ts.map +1 -0
- package/steward-session-client/steward-oauth-pkce.js +105 -0
- package/steward-session-client/steward-oauth-pkce.js.map +1 -0
- package/terminal/links.d.ts +9 -0
- package/terminal/links.d.ts.map +1 -0
- package/terminal/links.js +21 -0
- package/terminal/links.js.map +1 -0
- package/terminal/palette.d.ts +11 -0
- package/terminal/palette.d.ts.map +1 -0
- package/terminal/palette.js +13 -0
- package/terminal/palette.js.map +1 -0
- package/terminal/theme.d.ts +17 -0
- package/terminal/theme.d.ts.map +1 -0
- package/terminal/theme.js +25 -0
- package/terminal/theme.js.map +1 -0
- package/test-support/process-helpers.d.ts +13 -0
- package/test-support/process-helpers.d.ts.map +1 -0
- package/test-support/process-helpers.js +24 -0
- package/test-support/process-helpers.js.map +1 -0
- package/test-support/test-helpers.d.ts +79 -0
- package/test-support/test-helpers.d.ts.map +1 -0
- package/test-support/test-helpers.js +341 -0
- package/test-support/test-helpers.js.map +1 -0
- package/transcripts.d.ts +111 -0
- package/transcripts.d.ts.map +1 -0
- package/transcripts.js +106 -0
- package/transcripts.js.map +1 -0
- package/type-guards.d.ts +1 -23
- package/type-guards.d.ts.map +1 -1
- package/type-guards.js +6 -23
- package/type-guards.js.map +1 -1
- package/types/index.d.ts +654 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +5 -0
- package/types/index.js.map +1 -0
- package/utils/asset-url.d.ts +24 -0
- package/utils/asset-url.d.ts.map +1 -0
- package/utils/asset-url.js +151 -0
- package/utils/asset-url.js.map +1 -0
- package/utils/assistant-text.d.ts +13 -0
- package/utils/assistant-text.d.ts.map +1 -0
- package/utils/assistant-text.js +292 -0
- package/utils/assistant-text.js.map +1 -0
- package/utils/browser-tab-kit-types.d.ts +81 -0
- package/utils/browser-tab-kit-types.d.ts.map +1 -0
- package/utils/browser-tab-kit-types.js +23 -0
- package/utils/browser-tab-kit-types.js.map +1 -0
- package/utils/browser-tabs-renderer-registry.d.ts +56 -0
- package/utils/browser-tabs-renderer-registry.d.ts.map +1 -0
- package/utils/browser-tabs-renderer-registry.js +1282 -0
- package/utils/browser-tabs-renderer-registry.js.map +1 -0
- package/utils/character-message-examples.d.ts +7 -0
- package/utils/character-message-examples.d.ts.map +1 -0
- package/utils/character-message-examples.js +123 -0
- package/utils/character-message-examples.js.map +1 -0
- package/utils/cloud-status.d.ts +3 -0
- package/utils/cloud-status.d.ts.map +1 -0
- package/utils/cloud-status.js +11 -0
- package/utils/cloud-status.js.map +1 -0
- package/utils/documents-upload-image.d.ts +27 -0
- package/utils/documents-upload-image.d.ts.map +1 -0
- package/utils/documents-upload-image.js +147 -0
- package/utils/documents-upload-image.js.map +1 -0
- package/utils/eliza-cloud-model-route.d.ts +3 -0
- package/utils/eliza-cloud-model-route.d.ts.map +1 -0
- package/utils/eliza-cloud-model-route.js +10 -0
- package/utils/eliza-cloud-model-route.js.map +1 -0
- package/utils/eliza-globals.d.ts +13 -0
- package/utils/eliza-globals.d.ts.map +1 -0
- package/utils/eliza-globals.js +49 -0
- package/utils/eliza-globals.js.map +1 -0
- package/utils/eliza-root.d.ts +9 -0
- package/utils/eliza-root.d.ts.map +1 -0
- package/utils/eliza-root.js +102 -0
- package/utils/eliza-root.js.map +1 -0
- package/utils/env.d.ts +34 -0
- package/utils/env.d.ts.map +1 -0
- package/utils/env.js +142 -0
- package/utils/env.js.map +1 -0
- package/utils/errors.d.ts +13 -0
- package/utils/errors.d.ts.map +1 -0
- package/utils/errors.js +26 -0
- package/utils/errors.js.map +1 -0
- package/utils/exec-safety.d.ts +2 -0
- package/utils/exec-safety.d.ts.map +1 -0
- package/utils/exec-safety.js +25 -0
- package/utils/exec-safety.js.map +1 -0
- package/utils/format.d.ts +85 -0
- package/utils/format.d.ts.map +1 -0
- package/utils/format.js +140 -0
- package/utils/format.js.map +1 -0
- package/utils/labels.d.ts +6 -0
- package/utils/labels.d.ts.map +1 -0
- package/utils/labels.js +42 -0
- package/utils/labels.js.map +1 -0
- package/utils/log-prefix.d.ts +2 -0
- package/utils/log-prefix.d.ts.map +1 -0
- package/utils/log-prefix.js +44 -0
- package/utils/log-prefix.js.map +1 -0
- package/utils/name-tokens.d.ts +24 -0
- package/utils/name-tokens.d.ts.map +1 -0
- package/utils/name-tokens.js +37 -0
- package/utils/name-tokens.js.map +1 -0
- package/utils/namespace-defaults.d.ts +10 -0
- package/utils/namespace-defaults.d.ts.map +1 -0
- package/utils/namespace-defaults.js +17 -0
- package/utils/namespace-defaults.js.map +1 -0
- package/utils/number-parsing.d.ts +26 -0
- package/utils/number-parsing.d.ts.map +1 -0
- package/utils/number-parsing.js +57 -0
- package/utils/number-parsing.js.map +1 -0
- package/utils/owner-name.d.ts +3 -0
- package/utils/owner-name.d.ts.map +1 -0
- package/utils/owner-name.js +8 -0
- package/utils/owner-name.js.map +1 -0
- package/utils/permission-deep-links.d.ts +35 -0
- package/utils/permission-deep-links.d.ts.map +1 -0
- package/utils/permission-deep-links.js +95 -0
- package/utils/permission-deep-links.js.map +1 -0
- package/utils/rate-limiter.d.ts +32 -0
- package/utils/rate-limiter.d.ts.map +1 -0
- package/utils/rate-limiter.js +53 -0
- package/utils/rate-limiter.js.map +1 -0
- package/utils/serialise.d.ts +12 -0
- package/utils/serialise.d.ts.map +1 -0
- package/utils/serialise.js +22 -0
- package/utils/serialise.js.map +1 -0
- package/utils/sql-compat.d.ts +10 -0
- package/utils/sql-compat.d.ts.map +1 -0
- package/utils/sql-compat.js +112 -0
- package/utils/sql-compat.js.map +1 -0
- package/utils/streaming-text.d.ts +9 -0
- package/utils/streaming-text.d.ts.map +1 -0
- package/utils/streaming-text.js +116 -0
- package/utils/streaming-text.js.map +1 -0
- package/utils/subscription-auth.d.ts +9 -0
- package/utils/subscription-auth.d.ts.map +1 -0
- package/utils/subscription-auth.js +49 -0
- package/utils/subscription-auth.js.map +1 -0
- package/utils/trajectory-format.d.ts +6 -0
- package/utils/trajectory-format.d.ts.map +1 -0
- package/utils/trajectory-format.js +44 -0
- package/utils/trajectory-format.js.map +1 -0
- package/utils/tts-debug.d.ts +10 -0
- package/utils/tts-debug.d.ts.map +1 -0
- package/utils/tts-debug.js +73 -0
- package/utils/tts-debug.js.map +1 -0
- package/view-hero-art.d.ts +75 -0
- package/view-hero-art.d.ts.map +1 -0
- package/view-hero-art.js +360 -0
- package/view-hero-art.js.map +1 -0
- package/voice/first-sentence-snip.d.ts +68 -0
- package/voice/first-sentence-snip.d.ts.map +1 -0
- package/voice/first-sentence-snip.js +284 -0
- package/voice/first-sentence-snip.js.map +1 -0
- package/voice/voice-cancellation-token.d.ts +127 -0
- package/voice/voice-cancellation-token.d.ts.map +1 -0
- package/voice/voice-cancellation-token.js +186 -0
- package/voice/voice-cancellation-token.js.map +1 -0
- package/voice-wer.d.ts +19 -0
- package/voice-wer.d.ts.map +1 -0
- package/voice-wer.js +42 -0
- package/voice-wer.js.map +1 -0
- package/voice.d.ts +55 -0
- package/voice.d.ts.map +1 -0
- package/voice.js +337 -0
- package/voice.js.map +1 -0
- package/contracts/lifeops-extensions.d.ts +0 -340
- package/contracts/lifeops-extensions.d.ts.map +0 -1
- package/contracts/lifeops-extensions.js +0 -37
- package/contracts/lifeops-extensions.js.map +0 -1
- package/contracts/lifeops.d.ts.map +0 -1
- package/contracts/lifeops.js.map +0 -1
- package/contracts/onboarding.d.ts.map +0 -1
- package/contracts/onboarding.js.map +0 -1
- package/contracts/scratchpad.d.ts +0 -136
- package/contracts/scratchpad.d.ts.map +0 -1
- package/contracts/scratchpad.js +0 -91
- package/contracts/scratchpad.js.map +0 -1
- package/eliza-core-roles.d.ts +0 -79
- package/eliza-core-roles.d.ts.map +0 -1
- package/eliza-core-roles.js +0 -600
- package/eliza-core-roles.js.map +0 -1
- package/env-utils.impl.d.ts +0 -2
- package/env-utils.impl.d.ts.map +0 -1
- package/env-utils.impl.js +0 -10
- package/env-utils.impl.js.map +0 -1
- package/onboarding-presets.characters.d.ts.map +0 -1
- package/onboarding-presets.characters.js.map +0 -1
- package/onboarding-presets.d.ts.map +0 -1
- package/onboarding-presets.js.map +0 -1
- package/onboarding-presets.shared.d.ts.map +0 -1
- package/onboarding-presets.shared.js.map +0 -1
- package/themes/index.d.ts +0 -7
- package/themes/index.d.ts.map +0 -1
- package/themes/index.js +0 -6
- package/themes/index.js.map +0 -1
- package/themes/presets.d.ts +0 -15
- package/themes/presets.d.ts.map +0 -1
- package/themes/presets.js +0 -789
- package/themes/presets.js.map +0 -1
- package/types.d.ts +0 -27
- package/types.d.ts.map +0 -1
- package/types.js +0 -2
- package/types.js.map +0 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity types for the knowledge graph (canonical, runtime-level).
|
|
3
|
+
*
|
|
4
|
+
* An Entity is a node — a person, organization, place, project, or concept —
|
|
5
|
+
* with per-connector identities and open-keyed extracted attributes. The user
|
|
6
|
+
* is the special `self` Entity.
|
|
7
|
+
*
|
|
8
|
+
* Canonical home: `@elizaos/shared`. The DB-backed `EntityStore` lives in
|
|
9
|
+
* `@elizaos/plugin-personal-assistant`; the `LifeOpsEntity` wire contract in
|
|
10
|
+
* `@elizaos/shared/contracts/personal-assistant` re-exports these shapes.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Built-in entity types. The registry accepts any string, but these are the
|
|
14
|
+
* shapes the runtime understands without registration. Open string with
|
|
15
|
+
* registered metadata via {@link EntityTypeRegistry}.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BUILT_IN_ENTITY_TYPES: readonly ["person", "organization", "place", "project", "concept"];
|
|
18
|
+
export type BuiltInEntityType = (typeof BUILT_IN_ENTITY_TYPES)[number];
|
|
19
|
+
/**
|
|
20
|
+
* The identifier of the `self` Entity. Bootstrapped on first store init.
|
|
21
|
+
* All ego-network edges originate from `self`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SELF_ENTITY_ID = "self";
|
|
24
|
+
export type EntityIdentityAddedVia = "user_chat" | "merge" | "platform_observation" | "extraction" | "import";
|
|
25
|
+
export type EntityVisibility = "owner_only" | "agent_and_admin" | "owner_agent_admin";
|
|
26
|
+
/**
|
|
27
|
+
* Per-connector identity claim. An Entity carries N of these — one per
|
|
28
|
+
* platform handle the runtime has observed or imported. Identity merge
|
|
29
|
+
* collapses two entities when (platform, handle) match and confidence
|
|
30
|
+
* thresholds align.
|
|
31
|
+
*/
|
|
32
|
+
export interface EntityIdentity {
|
|
33
|
+
platform: string;
|
|
34
|
+
handle: string;
|
|
35
|
+
displayName?: string;
|
|
36
|
+
/** Operator-confirmed (true) vs auto-merged / observed (false). */
|
|
37
|
+
verified: boolean;
|
|
38
|
+
/** 0..1 confidence in this identity claim. */
|
|
39
|
+
confidence: number;
|
|
40
|
+
addedAt: string;
|
|
41
|
+
addedVia: EntityIdentityAddedVia;
|
|
42
|
+
/** Observation ids contributing evidence for this identity. */
|
|
43
|
+
evidence: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Open-keyed extracted attribute (location, employer, role, birthday, ...).
|
|
47
|
+
* The runtime does not branch on attribute keys; the only structural
|
|
48
|
+
* commitment is "value + provenance + freshness".
|
|
49
|
+
*/
|
|
50
|
+
export interface EntityAttribute {
|
|
51
|
+
value: unknown;
|
|
52
|
+
/** 0..1 confidence in the current value. */
|
|
53
|
+
confidence: number;
|
|
54
|
+
evidence: string[];
|
|
55
|
+
updatedAt: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Per-Entity interaction state (last-observed-at, last-inbound-at, etc.).
|
|
59
|
+
* Distinct from {@link RelationshipState} — Entity state is "what platform
|
|
60
|
+
* carried the most recent interaction"; Relationship state is "what was the
|
|
61
|
+
* last interaction on this specific edge".
|
|
62
|
+
*/
|
|
63
|
+
export interface EntityState {
|
|
64
|
+
lastObservedAt?: string;
|
|
65
|
+
lastInboundAt?: string;
|
|
66
|
+
lastOutboundAt?: string;
|
|
67
|
+
lastInteractionPlatform?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The canonical Entity shape. Stored in `app_lifeops.life_entities` and
|
|
71
|
+
* paired with rows in `life_entity_identities` and `life_entity_attributes`.
|
|
72
|
+
*/
|
|
73
|
+
export interface Entity {
|
|
74
|
+
entityId: string;
|
|
75
|
+
type: string;
|
|
76
|
+
preferredName: string;
|
|
77
|
+
fullName?: string;
|
|
78
|
+
identities: EntityIdentity[];
|
|
79
|
+
attributes?: Record<string, EntityAttribute>;
|
|
80
|
+
state: EntityState;
|
|
81
|
+
tags: string[];
|
|
82
|
+
visibility: EntityVisibility;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Filter for `EntityStore.list`. All fields are optional and AND-combined.
|
|
88
|
+
*/
|
|
89
|
+
export interface EntityFilter {
|
|
90
|
+
type?: string;
|
|
91
|
+
tag?: string;
|
|
92
|
+
/** Substring match against `preferredName` and `fullName`, case-insensitive. */
|
|
93
|
+
nameContains?: string;
|
|
94
|
+
/** Match entities that have an identity on this platform. */
|
|
95
|
+
hasPlatform?: string;
|
|
96
|
+
limit?: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Result of `EntityStore.resolve`: a single entity candidate with the
|
|
100
|
+
* confidence that the query refers to this entity. `safeToSend` is `true`
|
|
101
|
+
* when the entity has at least one verified identity on a sendable platform
|
|
102
|
+
* — this is what the planner reads before dispatching outbound messages.
|
|
103
|
+
*/
|
|
104
|
+
export interface EntityResolveCandidate {
|
|
105
|
+
entity: Entity;
|
|
106
|
+
confidence: number;
|
|
107
|
+
evidence: string[];
|
|
108
|
+
safeToSend: boolean;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Open-string registry of entity types. Built-ins always validate; new types
|
|
112
|
+
* are registered with optional metadata (display label, default visibility).
|
|
113
|
+
*
|
|
114
|
+
* Registration is idempotent (re-registering the same key with the same
|
|
115
|
+
* metadata is a no-op). Conflicting metadata throws.
|
|
116
|
+
*/
|
|
117
|
+
export declare class EntityTypeRegistry {
|
|
118
|
+
private readonly registered;
|
|
119
|
+
constructor();
|
|
120
|
+
register(type: string, metadata?: {
|
|
121
|
+
label?: string;
|
|
122
|
+
defaultVisibility?: EntityVisibility;
|
|
123
|
+
}): void;
|
|
124
|
+
has(type: string): boolean;
|
|
125
|
+
list(): string[];
|
|
126
|
+
metadataFor(type: string): {
|
|
127
|
+
label: string;
|
|
128
|
+
defaultVisibility: EntityVisibility;
|
|
129
|
+
} | null;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Shared default registry instance. Tests construct their own.
|
|
133
|
+
*/
|
|
134
|
+
export declare const defaultEntityTypeRegistry: EntityTypeRegistry;
|
|
135
|
+
//# sourceMappingURL=entity-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-types.d.ts","sourceRoot":"","sources":["../../src/knowledge-graph/entity-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,oEAMxB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,cAAc,SAAS,CAAC;AAErC,MAAM,MAAM,sBAAsB,GAC9B,WAAW,GACX,OAAO,GACP,sBAAsB,GACtB,YAAY,GACZ,QAAQ,CAAC;AAEb,MAAM,MAAM,gBAAgB,GACxB,YAAY,GACZ,iBAAiB,GACjB,mBAAmB,CAAC;AAExB;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACv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IAAI,MAAM,EAAE;IAIhB,WAAW,CACT,IAAI,EAAE,MAAM,GACX;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,gBAAgB,CAAA;KAAE,GAAG,IAAI;CAGjE;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,oBAA2B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity types for the knowledge graph (canonical, runtime-level).
|
|
3
|
+
*
|
|
4
|
+
* An Entity is a node — a person, organization, place, project, or concept —
|
|
5
|
+
* with per-connector identities and open-keyed extracted attributes. The user
|
|
6
|
+
* is the special `self` Entity.
|
|
7
|
+
*
|
|
8
|
+
* Canonical home: `@elizaos/shared`. The DB-backed `EntityStore` lives in
|
|
9
|
+
* `@elizaos/plugin-personal-assistant`; the `LifeOpsEntity` wire contract in
|
|
10
|
+
* `@elizaos/shared/contracts/personal-assistant` re-exports these shapes.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Built-in entity types. The registry accepts any string, but these are the
|
|
14
|
+
* shapes the runtime understands without registration. Open string with
|
|
15
|
+
* registered metadata via {@link EntityTypeRegistry}.
|
|
16
|
+
*/
|
|
17
|
+
export const BUILT_IN_ENTITY_TYPES = [
|
|
18
|
+
"person",
|
|
19
|
+
"organization",
|
|
20
|
+
"place",
|
|
21
|
+
"project",
|
|
22
|
+
"concept",
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
* The identifier of the `self` Entity. Bootstrapped on first store init.
|
|
26
|
+
* All ego-network edges originate from `self`.
|
|
27
|
+
*/
|
|
28
|
+
export const SELF_ENTITY_ID = "self";
|
|
29
|
+
/**
|
|
30
|
+
* Open-string registry of entity types. Built-ins always validate; new types
|
|
31
|
+
* are registered with optional metadata (display label, default visibility).
|
|
32
|
+
*
|
|
33
|
+
* Registration is idempotent (re-registering the same key with the same
|
|
34
|
+
* metadata is a no-op). Conflicting metadata throws.
|
|
35
|
+
*/
|
|
36
|
+
export class EntityTypeRegistry {
|
|
37
|
+
registered = new Map();
|
|
38
|
+
constructor() {
|
|
39
|
+
for (const type of BUILT_IN_ENTITY_TYPES) {
|
|
40
|
+
this.registered.set(type, {
|
|
41
|
+
label: type,
|
|
42
|
+
defaultVisibility: "owner_agent_admin",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
register(type, metadata = {}) {
|
|
47
|
+
const next = {
|
|
48
|
+
label: metadata.label ?? type,
|
|
49
|
+
defaultVisibility: metadata.defaultVisibility ?? "owner_agent_admin",
|
|
50
|
+
};
|
|
51
|
+
const existing = this.registered.get(type);
|
|
52
|
+
if (existing) {
|
|
53
|
+
if (existing.label !== next.label ||
|
|
54
|
+
existing.defaultVisibility !== next.defaultVisibility) {
|
|
55
|
+
throw new Error(`[EntityTypeRegistry] type "${type}" already registered with different metadata`);
|
|
56
|
+
}
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
this.registered.set(type, next);
|
|
60
|
+
}
|
|
61
|
+
has(type) {
|
|
62
|
+
return this.registered.has(type);
|
|
63
|
+
}
|
|
64
|
+
list() {
|
|
65
|
+
return Array.from(this.registered.keys()).sort();
|
|
66
|
+
}
|
|
67
|
+
metadataFor(type) {
|
|
68
|
+
return this.registered.get(type) ?? null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Shared default registry instance. Tests construct their own.
|
|
73
|
+
*/
|
|
74
|
+
export const defaultEntityTypeRegistry = new EntityTypeRegistry();
|
|
75
|
+
//# sourceMappingURL=entity-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-types.js","sourceRoot":"","sources":["../../src/knowledge-graph/entity-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ;IACR,cAAc;IACd,OAAO;IACP,SAAS;IACT,SAAS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AC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC3C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge-graph primitives (canonical, runtime-level).
|
|
3
|
+
*
|
|
4
|
+
* Pure types + the identity-merge engine for the Entity/Relationship graph.
|
|
5
|
+
* Dependency-free: no DB, no `@elizaos/core`, no plugin imports. The DB-backed
|
|
6
|
+
* `EntityStore` / `RelationshipStore` live in
|
|
7
|
+
* `@elizaos/plugin-personal-assistant`; the wire contracts in
|
|
8
|
+
* `@elizaos/shared/contracts/personal-assistant` re-export these shapes.
|
|
9
|
+
*/
|
|
10
|
+
export * from "./entity-types.js";
|
|
11
|
+
export * from "./merge.js";
|
|
12
|
+
export * from "./relationship-types.js";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/knowledge-graph/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge-graph primitives (canonical, runtime-level).
|
|
3
|
+
*
|
|
4
|
+
* Pure types + the identity-merge engine for the Entity/Relationship graph.
|
|
5
|
+
* Dependency-free: no DB, no `@elizaos/core`, no plugin imports. The DB-backed
|
|
6
|
+
* `EntityStore` / `RelationshipStore` live in
|
|
7
|
+
* `@elizaos/plugin-personal-assistant`; the wire contracts in
|
|
8
|
+
* `@elizaos/shared/contracts/personal-assistant` re-export these shapes.
|
|
9
|
+
*/
|
|
10
|
+
export * from "./entity-types.js";
|
|
11
|
+
export * from "./merge.js";
|
|
12
|
+
export * from "./relationship-types.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/knowledge-graph/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity-merge engine for the knowledge graph (canonical, runtime-level).
|
|
3
|
+
*
|
|
4
|
+
* Pure functions: given a set of Entity records and a new identity
|
|
5
|
+
* observation, decide which existing entities (if any) are the same and
|
|
6
|
+
* how to fold the new identity in. Preserves provenance — every collapsed
|
|
7
|
+
* identity keeps its evidence trail, no observation is silently discarded.
|
|
8
|
+
*
|
|
9
|
+
* The DB-backed `EntityStore` (in `@elizaos/plugin-personal-assistant`) calls
|
|
10
|
+
* into this from both `observeIdentity` (auto-merge on (platform, handle)
|
|
11
|
+
* match) and explicit `merge(target, sources)`.
|
|
12
|
+
*/
|
|
13
|
+
import type { Entity, EntityIdentity } from "./entity-types.js";
|
|
14
|
+
/**
|
|
15
|
+
* Threshold at which `observeIdentity` will auto-merge a new observation
|
|
16
|
+
* into an existing entity without surfacing an approval task. Below this,
|
|
17
|
+
* the observation is recorded but the merge becomes a proposal that the
|
|
18
|
+
* scheduled-task layer surfaces for user confirmation.
|
|
19
|
+
*/
|
|
20
|
+
export declare const AUTO_MERGE_CONFIDENCE_THRESHOLD = 0.85;
|
|
21
|
+
/** Confidence at which a new identity claim outright overrides an existing
|
|
22
|
+
* lower-confidence claim with the same (platform, handle). */
|
|
23
|
+
export declare const OVERRIDE_CONFIDENCE_DELTA = 0.15;
|
|
24
|
+
export interface IdentityMatchInput {
|
|
25
|
+
platform: string;
|
|
26
|
+
handle: string;
|
|
27
|
+
confidence: number;
|
|
28
|
+
/** Operator-confirmed (true) overrides auto-observed (false) on ties. */
|
|
29
|
+
verified?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Find the entities whose identities collide on `(platform, handle)`.
|
|
33
|
+
* Multiple matches indicate a conflict (the same handle is claimed by
|
|
34
|
+
* different entities) — the caller surfaces this for approval.
|
|
35
|
+
*/
|
|
36
|
+
export declare function findIdentityMatches(entities: Entity[], match: IdentityMatchInput): Entity[];
|
|
37
|
+
/**
|
|
38
|
+
* Decide the outcome of an `observeIdentity` call:
|
|
39
|
+
* - "create": no match; create a new entity with this identity.
|
|
40
|
+
* - "merge": exactly one match; fold the new identity in.
|
|
41
|
+
* - "conflict": multiple matches OR the match is below the auto-merge
|
|
42
|
+
* threshold; surface for user approval.
|
|
43
|
+
*/
|
|
44
|
+
export type IdentityObserveOutcome = {
|
|
45
|
+
kind: "create";
|
|
46
|
+
} | {
|
|
47
|
+
kind: "merge";
|
|
48
|
+
targetEntityId: string;
|
|
49
|
+
} | {
|
|
50
|
+
kind: "conflict";
|
|
51
|
+
candidateEntityIds: string[];
|
|
52
|
+
reason: string;
|
|
53
|
+
};
|
|
54
|
+
export declare function decideIdentityOutcome(args: {
|
|
55
|
+
candidates: Entity[];
|
|
56
|
+
newConfidence: number;
|
|
57
|
+
}): IdentityObserveOutcome;
|
|
58
|
+
/**
|
|
59
|
+
* Fold a new identity into an existing entity's identities array. If the
|
|
60
|
+
* (platform, handle) already exists, evidence is concatenated (deduped) and
|
|
61
|
+
* the higher-confidence claim wins. Otherwise, the new identity is
|
|
62
|
+
* appended.
|
|
63
|
+
*/
|
|
64
|
+
export declare function foldIdentity(existing: EntityIdentity[], next: EntityIdentity): EntityIdentity[];
|
|
65
|
+
/**
|
|
66
|
+
* Explicit merge: take a target entity and fold N source entities into it,
|
|
67
|
+
* preserving every identity, attribute, and tag. Returns the merged entity
|
|
68
|
+
* (caller persists it and removes the sources). Provenance is preserved
|
|
69
|
+
* verbatim — no identity is dropped, only deduplicated by (platform, handle).
|
|
70
|
+
*/
|
|
71
|
+
export declare function mergeEntities(args: {
|
|
72
|
+
target: Entity;
|
|
73
|
+
sources: Entity[];
|
|
74
|
+
now: string;
|
|
75
|
+
}): Entity;
|
|
76
|
+
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/knowledge-graph/merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD;8DAC8D;AAC9D,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,kBAAkB,GACxB,MAAM,EAAE,CAUV;AAED;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,sBAAsB,CA0BzB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,cAAc,EAAE,EAC1B,IAAI,EAAE,cAAc,GACnB,cAAc,EAAE,CAmDlB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,MAAM,CAiET"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity-merge engine for the knowledge graph (canonical, runtime-level).
|
|
3
|
+
*
|
|
4
|
+
* Pure functions: given a set of Entity records and a new identity
|
|
5
|
+
* observation, decide which existing entities (if any) are the same and
|
|
6
|
+
* how to fold the new identity in. Preserves provenance — every collapsed
|
|
7
|
+
* identity keeps its evidence trail, no observation is silently discarded.
|
|
8
|
+
*
|
|
9
|
+
* The DB-backed `EntityStore` (in `@elizaos/plugin-personal-assistant`) calls
|
|
10
|
+
* into this from both `observeIdentity` (auto-merge on (platform, handle)
|
|
11
|
+
* match) and explicit `merge(target, sources)`.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Threshold at which `observeIdentity` will auto-merge a new observation
|
|
15
|
+
* into an existing entity without surfacing an approval task. Below this,
|
|
16
|
+
* the observation is recorded but the merge becomes a proposal that the
|
|
17
|
+
* scheduled-task layer surfaces for user confirmation.
|
|
18
|
+
*/
|
|
19
|
+
export const AUTO_MERGE_CONFIDENCE_THRESHOLD = 0.85;
|
|
20
|
+
/** Confidence at which a new identity claim outright overrides an existing
|
|
21
|
+
* lower-confidence claim with the same (platform, handle). */
|
|
22
|
+
export const OVERRIDE_CONFIDENCE_DELTA = 0.15;
|
|
23
|
+
/**
|
|
24
|
+
* Find the entities whose identities collide on `(platform, handle)`.
|
|
25
|
+
* Multiple matches indicate a conflict (the same handle is claimed by
|
|
26
|
+
* different entities) — the caller surfaces this for approval.
|
|
27
|
+
*/
|
|
28
|
+
export function findIdentityMatches(entities, match) {
|
|
29
|
+
const platformKey = match.platform.toLowerCase();
|
|
30
|
+
const handleKey = match.handle.toLowerCase();
|
|
31
|
+
return entities.filter((entity) => entity.identities.some((identity) => identity.platform.toLowerCase() === platformKey &&
|
|
32
|
+
identity.handle.toLowerCase() === handleKey));
|
|
33
|
+
}
|
|
34
|
+
export function decideIdentityOutcome(args) {
|
|
35
|
+
if (args.candidates.length === 0) {
|
|
36
|
+
return { kind: "create" };
|
|
37
|
+
}
|
|
38
|
+
if (args.candidates.length === 1) {
|
|
39
|
+
const target = args.candidates[0];
|
|
40
|
+
if (!target) {
|
|
41
|
+
return { kind: "create" };
|
|
42
|
+
}
|
|
43
|
+
if (args.newConfidence >= AUTO_MERGE_CONFIDENCE_THRESHOLD) {
|
|
44
|
+
return { kind: "merge", targetEntityId: target.entityId };
|
|
45
|
+
}
|
|
46
|
+
// Below threshold — store the observation but flag for approval.
|
|
47
|
+
return {
|
|
48
|
+
kind: "conflict",
|
|
49
|
+
candidateEntityIds: [target.entityId],
|
|
50
|
+
reason: "low_confidence_observation",
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
kind: "conflict",
|
|
55
|
+
candidateEntityIds: args.candidates.map((entity) => entity.entityId),
|
|
56
|
+
reason: "multiple_candidate_entities",
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Fold a new identity into an existing entity's identities array. If the
|
|
61
|
+
* (platform, handle) already exists, evidence is concatenated (deduped) and
|
|
62
|
+
* the higher-confidence claim wins. Otherwise, the new identity is
|
|
63
|
+
* appended.
|
|
64
|
+
*/
|
|
65
|
+
export function foldIdentity(existing, next) {
|
|
66
|
+
const platformKey = next.platform.toLowerCase();
|
|
67
|
+
const handleKey = next.handle.toLowerCase();
|
|
68
|
+
const matchIndex = existing.findIndex((identity) => identity.platform.toLowerCase() === platformKey &&
|
|
69
|
+
identity.handle.toLowerCase() === handleKey);
|
|
70
|
+
if (matchIndex < 0) {
|
|
71
|
+
return [...existing, next];
|
|
72
|
+
}
|
|
73
|
+
const match = existing[matchIndex];
|
|
74
|
+
if (!match) {
|
|
75
|
+
return [...existing, next];
|
|
76
|
+
}
|
|
77
|
+
const mergedEvidence = Array.from(new Set([...match.evidence, ...next.evidence]));
|
|
78
|
+
// Conflict resolution per W1-E spec:
|
|
79
|
+
// - highest-confidence claim wins
|
|
80
|
+
// - on confidence ties, verified: true wins over verified: false
|
|
81
|
+
// - if still ambiguous, keep the existing (older) claim's metadata
|
|
82
|
+
// and merely strengthen evidence + bump confidence to the higher of
|
|
83
|
+
// the two; the merger surfaces the ambiguity through the conflict
|
|
84
|
+
// path before reaching this point.
|
|
85
|
+
let chosen = match;
|
|
86
|
+
if (next.confidence > match.confidence) {
|
|
87
|
+
chosen = next;
|
|
88
|
+
}
|
|
89
|
+
else if (next.confidence === match.confidence &&
|
|
90
|
+
next.verified &&
|
|
91
|
+
!match.verified) {
|
|
92
|
+
chosen = next;
|
|
93
|
+
}
|
|
94
|
+
const merged = {
|
|
95
|
+
...chosen,
|
|
96
|
+
confidence: Math.max(match.confidence, next.confidence),
|
|
97
|
+
verified: match.verified || next.verified,
|
|
98
|
+
evidence: mergedEvidence,
|
|
99
|
+
addedAt: match.addedAt,
|
|
100
|
+
addedVia: chosen.addedVia,
|
|
101
|
+
...(chosen.displayName ? { displayName: chosen.displayName } : {}),
|
|
102
|
+
};
|
|
103
|
+
const result = [...existing];
|
|
104
|
+
result[matchIndex] = merged;
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Explicit merge: take a target entity and fold N source entities into it,
|
|
109
|
+
* preserving every identity, attribute, and tag. Returns the merged entity
|
|
110
|
+
* (caller persists it and removes the sources). Provenance is preserved
|
|
111
|
+
* verbatim — no identity is dropped, only deduplicated by (platform, handle).
|
|
112
|
+
*/
|
|
113
|
+
export function mergeEntities(args) {
|
|
114
|
+
let identities = [...args.target.identities];
|
|
115
|
+
const tags = new Set(args.target.tags);
|
|
116
|
+
const attributes = { ...(args.target.attributes ?? {}) };
|
|
117
|
+
const seenLastObserved = [args.target.state.lastObservedAt ?? ""];
|
|
118
|
+
const seenLastInbound = [args.target.state.lastInboundAt ?? ""];
|
|
119
|
+
const seenLastOutbound = [args.target.state.lastOutboundAt ?? ""];
|
|
120
|
+
for (const source of args.sources) {
|
|
121
|
+
for (const identity of source.identities) {
|
|
122
|
+
identities = foldIdentity(identities, identity);
|
|
123
|
+
}
|
|
124
|
+
for (const tag of source.tags) {
|
|
125
|
+
tags.add(tag);
|
|
126
|
+
}
|
|
127
|
+
for (const [key, attr] of Object.entries(source.attributes ?? {})) {
|
|
128
|
+
const existing = attributes[key];
|
|
129
|
+
if (!existing || attr.confidence > existing.confidence) {
|
|
130
|
+
attributes[key] = attr;
|
|
131
|
+
}
|
|
132
|
+
else if (attr.confidence === existing.confidence) {
|
|
133
|
+
attributes[key] = {
|
|
134
|
+
...existing,
|
|
135
|
+
evidence: Array.from(new Set([...existing.evidence, ...attr.evidence])),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (source.state.lastObservedAt) {
|
|
140
|
+
seenLastObserved.push(source.state.lastObservedAt);
|
|
141
|
+
}
|
|
142
|
+
if (source.state.lastInboundAt) {
|
|
143
|
+
seenLastInbound.push(source.state.lastInboundAt);
|
|
144
|
+
}
|
|
145
|
+
if (source.state.lastOutboundAt) {
|
|
146
|
+
seenLastOutbound.push(source.state.lastOutboundAt);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const pickLatest = (values) => {
|
|
150
|
+
const filtered = values.filter((v) => v.length > 0);
|
|
151
|
+
if (filtered.length === 0)
|
|
152
|
+
return undefined;
|
|
153
|
+
return filtered.reduce((acc, cur) => (cur > acc ? cur : acc));
|
|
154
|
+
};
|
|
155
|
+
return {
|
|
156
|
+
...args.target,
|
|
157
|
+
identities,
|
|
158
|
+
tags: Array.from(tags).sort(),
|
|
159
|
+
attributes: Object.keys(attributes).length > 0 ? attributes : args.target.attributes,
|
|
160
|
+
state: {
|
|
161
|
+
...args.target.state,
|
|
162
|
+
...(pickLatest(seenLastObserved)
|
|
163
|
+
? { lastObservedAt: pickLatest(seenLastObserved) }
|
|
164
|
+
: {}),
|
|
165
|
+
...(pickLatest(seenLastInbound)
|
|
166
|
+
? { lastInboundAt: pickLatest(seenLastInbound) }
|
|
167
|
+
: {}),
|
|
168
|
+
...(pickLatest(seenLastOutbound)
|
|
169
|
+
? { lastOutboundAt: pickLatest(seenLastOutbound) }
|
|
170
|
+
: {}),
|
|
171
|
+
},
|
|
172
|
+
updatedAt: args.now,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/knowledge-graph/merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;AAEpD;8DAC8D;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAU9C;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAkB,EAClB,KAAyB;IAEzB,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IACjD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;IAC7C,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAChC,MAAM,CAAC,UAAU,CAAC,IAAI,CACpB,CAAC,QAAQ,EAAE,EAAE,CACX,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,WAAW;QAC/C,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,SAAS,CAC9C,CACF,CAAC;AACJ,CAAC;AAcD,MAAM,UAAU,qBAAqB,CAAC,IAGrC;IACC,IAAI,IAAI,CAAC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,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC;IAEF,OAAO;QACL,GAAG,IAAI,CAAC,MAAM;QACd,UAAU;QACV,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAC7B,UAAU,EACR,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU;QAC1E,KAAK,EAAE;YACL,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK;YACpB,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC;gBAC9B,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE;gBAClD,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC;gBAC7B,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,CAAC,eAAe,CAAC,EAAE;gBAChD,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC;gBAC9B,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE;gBAClD,CAAC,CAAC,EAAE,CAAC;SACR;QACD,SAAS,EAAE,IAAI,CAAC,GAAG;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relationship types for the knowledge graph (canonical, runtime-level).
|
|
3
|
+
*
|
|
4
|
+
* A Relationship is a typed edge between two Entities, carrying its own
|
|
5
|
+
* metadata (cadence, role, sentiment) and state (last-interaction, count,
|
|
6
|
+
* sentiment trend). Each edge has its own provenance trail.
|
|
7
|
+
*
|
|
8
|
+
* Canonical home: `@elizaos/shared`. The DB-backed `RelationshipStore` lives in
|
|
9
|
+
* `@elizaos/plugin-personal-assistant`; the `LifeOpsGraphRelationship` wire
|
|
10
|
+
* contract in `@elizaos/shared/contracts/personal-assistant` re-exports these
|
|
11
|
+
* shapes.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Built-in relationship types. The registry accepts any string, but these
|
|
15
|
+
* are the shapes the planner / followup-watcher / extraction know about
|
|
16
|
+
* without registration.
|
|
17
|
+
*/
|
|
18
|
+
export declare const BUILT_IN_RELATIONSHIP_TYPES: readonly ["follows", "colleague_of", "partner_of", "manages", "managed_by", "lives_at", "works_at", "knows", "owns"];
|
|
19
|
+
export type BuiltInRelationshipType = (typeof BUILT_IN_RELATIONSHIP_TYPES)[number];
|
|
20
|
+
export type RelationshipSource = "user_chat" | "platform_observation" | "extraction" | "import" | "system";
|
|
21
|
+
export type RelationshipSentiment = "positive" | "neutral" | "negative";
|
|
22
|
+
export type RelationshipStatus = "active" | "retired";
|
|
23
|
+
/**
|
|
24
|
+
* Per-edge interaction state. Distinct from `Entity.state` — this is the
|
|
25
|
+
* cadence + last-interaction tied to a specific (from, to, type) triple.
|
|
26
|
+
* The cadence override (`metadata.cadenceDays`) lives on the edge so that
|
|
27
|
+
* "Pat as colleague" and "Pat as friend" can have separate follow-up
|
|
28
|
+
* cadences against the same person.
|
|
29
|
+
*/
|
|
30
|
+
export interface RelationshipState {
|
|
31
|
+
lastObservedAt?: string;
|
|
32
|
+
lastInteractionAt?: string;
|
|
33
|
+
interactionCount?: number;
|
|
34
|
+
sentimentTrend?: RelationshipSentiment;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The canonical Relationship shape. A typed edge from `fromEntityId` to
|
|
38
|
+
* `toEntityId`; the user is `entityId === "self"` for ego-network edges.
|
|
39
|
+
*/
|
|
40
|
+
export interface Relationship {
|
|
41
|
+
relationshipId: string;
|
|
42
|
+
fromEntityId: string;
|
|
43
|
+
toEntityId: string;
|
|
44
|
+
type: string;
|
|
45
|
+
/**
|
|
46
|
+
* Per-type metadata. Examples:
|
|
47
|
+
* - `{ cadenceDays: 14 }` for `follows`
|
|
48
|
+
* - `{ role: "engineer" }` for `works_at`
|
|
49
|
+
* - `{ sinceDate: "2020-01-01" }` for `partner_of`
|
|
50
|
+
*/
|
|
51
|
+
metadata?: Record<string, unknown>;
|
|
52
|
+
state: RelationshipState;
|
|
53
|
+
evidence: string[];
|
|
54
|
+
/** 0..1 confidence in the edge. */
|
|
55
|
+
confidence: number;
|
|
56
|
+
source: RelationshipSource;
|
|
57
|
+
/**
|
|
58
|
+
* Soft-delete state. Retired edges remain queryable for audit but are
|
|
59
|
+
* filtered out of `list()` by default and never strengthened by new
|
|
60
|
+
* observations — new evidence on a retired edge is logged but does NOT
|
|
61
|
+
* flip it back to active.
|
|
62
|
+
*/
|
|
63
|
+
status: RelationshipStatus;
|
|
64
|
+
retiredAt?: string;
|
|
65
|
+
retiredReason?: string;
|
|
66
|
+
createdAt: string;
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Filter for `RelationshipStore.list`. All fields optional, AND-combined.
|
|
71
|
+
*/
|
|
72
|
+
export interface RelationshipFilter {
|
|
73
|
+
fromEntityId?: string;
|
|
74
|
+
toEntityId?: string;
|
|
75
|
+
type?: string | string[];
|
|
76
|
+
metadataMatch?: Record<string, unknown>;
|
|
77
|
+
/**
|
|
78
|
+
* Returns edges where `metadata.cadenceDays` exists AND
|
|
79
|
+
* `state.lastInteractionAt < (asOf - cadenceDays)`. Read by the
|
|
80
|
+
* followup-starter watcher (W1-D).
|
|
81
|
+
*/
|
|
82
|
+
cadenceOverdueAsOf?: string;
|
|
83
|
+
/** Include retired edges. Default false. */
|
|
84
|
+
includeRetired?: boolean;
|
|
85
|
+
limit?: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Open-string registry for relationship types. Built-ins always validate;
|
|
89
|
+
* new types may register typed metadata schemas via {@link metadataKeys}.
|
|
90
|
+
* The runtime does not branch on type — the registry is informational.
|
|
91
|
+
*/
|
|
92
|
+
export declare class RelationshipTypeRegistry {
|
|
93
|
+
private readonly registered;
|
|
94
|
+
constructor();
|
|
95
|
+
register(type: string, metadata?: {
|
|
96
|
+
label?: string;
|
|
97
|
+
metadataKeys?: string[];
|
|
98
|
+
symmetric?: boolean;
|
|
99
|
+
}): void;
|
|
100
|
+
has(type: string): boolean;
|
|
101
|
+
isSymmetric(type: string): boolean;
|
|
102
|
+
list(): string[];
|
|
103
|
+
}
|
|
104
|
+
export declare const defaultRelationshipTypeRegistry: RelationshipTypeRegistry;
|
|
105
|
+
//# sourceMappingURL=relationship-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationship-types.d.ts","sourceRoot":"","sources":["../../src/knowledge-graph/relationship-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,sHAU9B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,sBAAsB,GACtB,YAAY,GACZ,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,E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