@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,24 @@
|
|
|
1
|
+
type AssetUrlResolveOptions = {
|
|
2
|
+
currentUrl?: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Resolve an app public asset path into a URL safe across http(s), custom
|
|
7
|
+
* schemes, and packaged file:// runtimes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveAppAssetUrl(assetPath: string, options?: AssetUrlResolveOptions): string;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve an API path (e.g. "/api/avatar/vrm") to a full URL reachable from
|
|
12
|
+
* the renderer. In desktop shells the page origin is electrobun:// or
|
|
13
|
+
* file://, so bare /api/... paths resolve to the SPA instead of the backend.
|
|
14
|
+
*
|
|
15
|
+
* Resolution order: boot `apiBase` → shell-injected `__ELIZAOS_API_BASE__` →
|
|
16
|
+
* `sessionStorage` fallback. The boot config is the current client-owned
|
|
17
|
+
* source of truth because `client.setBaseUrl()` updates it whenever the user
|
|
18
|
+
* switches servers. Injection still beats stale session state from prior
|
|
19
|
+
* sessions, but it must not override the active runtime target once the client
|
|
20
|
+
* has changed it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveApiUrl(apiPath: string): string;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=asset-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-url.d.ts","sourceRoot":"","sources":["../../src/utils/asset-url.ts"],"names":[],"mappings":"AAWA,KAAK,sBAAsB,GAAG;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AA0EF;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAgCR;AAgBD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAYrD"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve app-shipped public assets (e.g. vrms/, animations/) to runtime-safe URLs.
|
|
3
|
+
*
|
|
4
|
+
* In packaged desktop builds, the renderer can run on file:// and later navigate to
|
|
5
|
+
* absolute paths (e.g. /chat). Root-relative assets like /vrms/1.vrm then
|
|
6
|
+
* resolve to file:///vrms/1.vrm and fail. We lock the asset base URL once from
|
|
7
|
+
* initial startup and resolve assets against that stable base.
|
|
8
|
+
*/
|
|
9
|
+
import { getBootConfig } from "../config/boot-config.js";
|
|
10
|
+
import { getElizaApiBase } from "./eliza-globals.js";
|
|
11
|
+
let cachedRuntimeBaseHref = null;
|
|
12
|
+
function stripLeadingPathMarkers(assetPath) {
|
|
13
|
+
return assetPath
|
|
14
|
+
.trim()
|
|
15
|
+
.replace(/^\.?\//, "")
|
|
16
|
+
.replace(/^\/+/, "");
|
|
17
|
+
}
|
|
18
|
+
function isAlreadyAbsolute(assetPath) {
|
|
19
|
+
if (assetPath.startsWith("//"))
|
|
20
|
+
return true;
|
|
21
|
+
return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(assetPath);
|
|
22
|
+
}
|
|
23
|
+
function normalizeBaseHref(baseHref) {
|
|
24
|
+
return baseHref.endsWith("/") ? baseHref : `${baseHref}/`;
|
|
25
|
+
}
|
|
26
|
+
function inferBaseForUrl(url) {
|
|
27
|
+
if (url.protocol !== "file:")
|
|
28
|
+
return "/";
|
|
29
|
+
const pathname = url.pathname || "/";
|
|
30
|
+
if (pathname.endsWith("/"))
|
|
31
|
+
return pathname;
|
|
32
|
+
const lastSlash = pathname.lastIndexOf("/");
|
|
33
|
+
if (lastSlash < 0)
|
|
34
|
+
return "/";
|
|
35
|
+
const tail = pathname.slice(lastSlash + 1);
|
|
36
|
+
// If the path ends in a file name, use that file's directory.
|
|
37
|
+
if (tail.includes("."))
|
|
38
|
+
return pathname.slice(0, lastSlash + 1) || "/";
|
|
39
|
+
return "/";
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* For http/https origins (web + Electrobun dev static server) the static asset
|
|
43
|
+
* root is always the origin root. We must NOT honor Vite's `base: "./"` here
|
|
44
|
+
* because relative resolution against the current SPA route URL produces
|
|
45
|
+
* `/apps/app-heroes/...` etc., which the SPA's catch-all returns HTML for —
|
|
46
|
+
* silently breaking <img> tags via decode errors.
|
|
47
|
+
*/
|
|
48
|
+
function shouldIgnoreViteBase(url) {
|
|
49
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
50
|
+
}
|
|
51
|
+
function computeBaseHref(currentUrl, baseUrl) {
|
|
52
|
+
const current = new URL(currentUrl);
|
|
53
|
+
const explicit = baseUrl?.trim();
|
|
54
|
+
const base = explicit && !shouldIgnoreViteBase(current)
|
|
55
|
+
? explicit
|
|
56
|
+
: inferBaseForUrl(current);
|
|
57
|
+
return new URL(base, current).href;
|
|
58
|
+
}
|
|
59
|
+
function runtimeBaseHref() {
|
|
60
|
+
if (cachedRuntimeBaseHref)
|
|
61
|
+
return cachedRuntimeBaseHref;
|
|
62
|
+
if (typeof window === "undefined")
|
|
63
|
+
return null;
|
|
64
|
+
const href = window.location?.href;
|
|
65
|
+
if (typeof href !== "string" || !href)
|
|
66
|
+
return null;
|
|
67
|
+
try {
|
|
68
|
+
const viteBaseUrl = import.meta.env
|
|
69
|
+
?.BASE_URL;
|
|
70
|
+
cachedRuntimeBaseHref = computeBaseHref(href, viteBaseUrl);
|
|
71
|
+
return cachedRuntimeBaseHref;
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Resolve an app public asset path into a URL safe across http(s), custom
|
|
79
|
+
* schemes, and packaged file:// runtimes.
|
|
80
|
+
*/
|
|
81
|
+
export function resolveAppAssetUrl(assetPath, options) {
|
|
82
|
+
if (!assetPath)
|
|
83
|
+
return assetPath;
|
|
84
|
+
if (isAlreadyAbsolute(assetPath))
|
|
85
|
+
return assetPath;
|
|
86
|
+
const normalized = stripLeadingPathMarkers(assetPath);
|
|
87
|
+
if (!normalized)
|
|
88
|
+
return normalized;
|
|
89
|
+
const configuredBaseUrl = getBootConfig().assetBaseUrl?.trim();
|
|
90
|
+
if (configuredBaseUrl) {
|
|
91
|
+
try {
|
|
92
|
+
return new URL(normalized, normalizeBaseHref(configuredBaseUrl)).toString();
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
// Fall through to local runtime resolution when the configured CDN base is invalid.
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (options?.currentUrl) {
|
|
99
|
+
try {
|
|
100
|
+
const baseHref = computeBaseHref(options.currentUrl, options.baseUrl);
|
|
101
|
+
return new URL(normalized, baseHref).toString();
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return `/${normalized}`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const baseHref = runtimeBaseHref();
|
|
108
|
+
if (!baseHref)
|
|
109
|
+
return `/${normalized}`;
|
|
110
|
+
return new URL(normalized, baseHref).toString();
|
|
111
|
+
}
|
|
112
|
+
/** Keep in sync with `ElizaClient` SESSION_STORAGE_API_BASE_KEY. */
|
|
113
|
+
const ELIZA_API_BASE_SESSION_KEY = "elizaos_api_base";
|
|
114
|
+
function readSessionStorageApiBase() {
|
|
115
|
+
try {
|
|
116
|
+
if (typeof window === "undefined")
|
|
117
|
+
return undefined;
|
|
118
|
+
const raw = window.sessionStorage.getItem(ELIZA_API_BASE_SESSION_KEY);
|
|
119
|
+
const trimmed = raw?.trim();
|
|
120
|
+
return trimmed && trimmed.length > 0 ? trimmed : undefined;
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Resolve an API path (e.g. "/api/avatar/vrm") to a full URL reachable from
|
|
128
|
+
* the renderer. In desktop shells the page origin is electrobun:// or
|
|
129
|
+
* file://, so bare /api/... paths resolve to the SPA instead of the backend.
|
|
130
|
+
*
|
|
131
|
+
* Resolution order: boot `apiBase` → shell-injected `__ELIZAOS_API_BASE__` →
|
|
132
|
+
* `sessionStorage` fallback. The boot config is the current client-owned
|
|
133
|
+
* source of truth because `client.setBaseUrl()` updates it whenever the user
|
|
134
|
+
* switches servers. Injection still beats stale session state from prior
|
|
135
|
+
* sessions, but it must not override the active runtime target once the client
|
|
136
|
+
* has changed it.
|
|
137
|
+
*/
|
|
138
|
+
export function resolveApiUrl(apiPath) {
|
|
139
|
+
const bootRaw = getBootConfig().apiBase?.trim();
|
|
140
|
+
const boot = bootRaw && bootRaw.length > 0 ? bootRaw : undefined;
|
|
141
|
+
const injectedRaw = getElizaApiBase()?.trim();
|
|
142
|
+
const injected = injectedRaw && injectedRaw.length > 0 ? injectedRaw : undefined;
|
|
143
|
+
const stored = readSessionStorageApiBase();
|
|
144
|
+
const base = boot ?? injected ?? stored;
|
|
145
|
+
if (!base)
|
|
146
|
+
return apiPath;
|
|
147
|
+
const normalized = base.replace(/\/+$/, "");
|
|
148
|
+
const suffix = apiPath.startsWith("/") ? apiPath : `/${apiPath}`;
|
|
149
|
+
return `${normalized}${suffix}`;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=asset-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-url.js","sourceRoot":"","sources":["../../src/utils/asset-url.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAOrD,IAAI,qBAAqB,GAAkB,IAAI,CAAC;AAEhD,SAAS,uBAAuB,CAAC,SAAiB;IAChD,OAAO,SAAS;SACb,IAAI,EAAE;SACN,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,iBAAiB,CAAC,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IAAI,EAAE,CAAC;IAChD,MAAM,IAAI,GAAG,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,MAAM,WAAW,GAAG,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC;IAC9C,MAAM,QAAQ,GACZ,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IAClE,MAAM,MAAM,GAAG,yBAAyB,EAAE,CAAC;IAC3C,MAAM,IAAI,GAAG,IAAI,IAAI,QAAQ,IAAI,MAAM,CAAC;IACxC,IAAI,CAAC,IAAI;QAAE,OAAO,OAAO,CAAC;IAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;IACjE,OAAO,GAAG,UAAU,GAAG,MAAM,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the user-facing reply from a response-handler payload that leaked as
|
|
3
|
+
* plain text. Local models can emit tool arguments as text when function-call
|
|
4
|
+
* transport is unavailable, for example:
|
|
5
|
+
*
|
|
6
|
+
* "RESPOND", "contexts": ["simple"], "replyText": "Hello"
|
|
7
|
+
*
|
|
8
|
+
* That string is valid object content once the first value is named
|
|
9
|
+
* `shouldRespond`, so parse that shape without touching ordinary chat text.
|
|
10
|
+
*/
|
|
11
|
+
export declare function extractAssistantReplyText(input: string): string | null;
|
|
12
|
+
export declare function stripAssistantStageDirections(input: string): string;
|
|
13
|
+
//# sourceMappingURL=assistant-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-text.d.ts","sourceRoot":"","sources":["../../src/utils/assistant-text.ts"],"names":[],"mappings":"AA0PA;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6CtE;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMnE"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
const STAGE_DIRECTION_FIRST_WORDS = new Set([
|
|
2
|
+
"beam",
|
|
3
|
+
"beams",
|
|
4
|
+
"beaming",
|
|
5
|
+
"blink",
|
|
6
|
+
"blinks",
|
|
7
|
+
"blinking",
|
|
8
|
+
"blush",
|
|
9
|
+
"blushes",
|
|
10
|
+
"blushing",
|
|
11
|
+
"bow",
|
|
12
|
+
"bows",
|
|
13
|
+
"bowing",
|
|
14
|
+
"breathe",
|
|
15
|
+
"breathes",
|
|
16
|
+
"breathing",
|
|
17
|
+
"cheer",
|
|
18
|
+
"cheers",
|
|
19
|
+
"cheering",
|
|
20
|
+
"chuckle",
|
|
21
|
+
"chuckles",
|
|
22
|
+
"chuckling",
|
|
23
|
+
"clap",
|
|
24
|
+
"claps",
|
|
25
|
+
"clapping",
|
|
26
|
+
"cry",
|
|
27
|
+
"cries",
|
|
28
|
+
"crying",
|
|
29
|
+
"curtsy",
|
|
30
|
+
"curtsies",
|
|
31
|
+
"curtsying",
|
|
32
|
+
"dance",
|
|
33
|
+
"dances",
|
|
34
|
+
"dancing",
|
|
35
|
+
"frown",
|
|
36
|
+
"frowns",
|
|
37
|
+
"frowning",
|
|
38
|
+
"gasp",
|
|
39
|
+
"gasps",
|
|
40
|
+
"gasping",
|
|
41
|
+
"gesture",
|
|
42
|
+
"gestures",
|
|
43
|
+
"gesturing",
|
|
44
|
+
"giggle",
|
|
45
|
+
"giggles",
|
|
46
|
+
"giggling",
|
|
47
|
+
"glance",
|
|
48
|
+
"glances",
|
|
49
|
+
"glancing",
|
|
50
|
+
"grin",
|
|
51
|
+
"grins",
|
|
52
|
+
"grinning",
|
|
53
|
+
"laugh",
|
|
54
|
+
"laughs",
|
|
55
|
+
"laughing",
|
|
56
|
+
"lean",
|
|
57
|
+
"leans",
|
|
58
|
+
"leaning",
|
|
59
|
+
"look",
|
|
60
|
+
"looks",
|
|
61
|
+
"looking",
|
|
62
|
+
"nod",
|
|
63
|
+
"nods",
|
|
64
|
+
"nodding",
|
|
65
|
+
"pause",
|
|
66
|
+
"pauses",
|
|
67
|
+
"pausing",
|
|
68
|
+
"point",
|
|
69
|
+
"points",
|
|
70
|
+
"pointing",
|
|
71
|
+
"pose",
|
|
72
|
+
"poses",
|
|
73
|
+
"posing",
|
|
74
|
+
"pout",
|
|
75
|
+
"pouts",
|
|
76
|
+
"pouting",
|
|
77
|
+
"raise",
|
|
78
|
+
"raises",
|
|
79
|
+
"raising",
|
|
80
|
+
"shrug",
|
|
81
|
+
"shrugs",
|
|
82
|
+
"shrugging",
|
|
83
|
+
"sigh",
|
|
84
|
+
"sighs",
|
|
85
|
+
"sighing",
|
|
86
|
+
"smile",
|
|
87
|
+
"smiles",
|
|
88
|
+
"smiling",
|
|
89
|
+
"smirk",
|
|
90
|
+
"smirks",
|
|
91
|
+
"smirking",
|
|
92
|
+
"spin",
|
|
93
|
+
"spins",
|
|
94
|
+
"spinning",
|
|
95
|
+
"stare",
|
|
96
|
+
"stares",
|
|
97
|
+
"staring",
|
|
98
|
+
"stretch",
|
|
99
|
+
"stretches",
|
|
100
|
+
"stretching",
|
|
101
|
+
"sway",
|
|
102
|
+
"sways",
|
|
103
|
+
"swaying",
|
|
104
|
+
"tilt",
|
|
105
|
+
"tilts",
|
|
106
|
+
"tilting",
|
|
107
|
+
"wave",
|
|
108
|
+
"waves",
|
|
109
|
+
"waving",
|
|
110
|
+
"whisper",
|
|
111
|
+
"whispers",
|
|
112
|
+
"whispering",
|
|
113
|
+
"wink",
|
|
114
|
+
"winks",
|
|
115
|
+
"winking",
|
|
116
|
+
"yawn",
|
|
117
|
+
"yawns",
|
|
118
|
+
"yawning",
|
|
119
|
+
]);
|
|
120
|
+
function collapseInlineWhitespace(input) {
|
|
121
|
+
return input.replace(/[ \t]+/g, " ").trim();
|
|
122
|
+
}
|
|
123
|
+
function looksLikeStageDirection(input) {
|
|
124
|
+
const normalized = collapseInlineWhitespace(input).trim();
|
|
125
|
+
if (!normalized || normalized.length > 100)
|
|
126
|
+
return false;
|
|
127
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: intentional ASCII-range check to reject non-ASCII input
|
|
128
|
+
if (/[^\x00-\x7F]/.test(normalized)) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
const wordMatch = normalized.match(/^[^\w]*([A-Za-z]+)/);
|
|
132
|
+
if (!wordMatch)
|
|
133
|
+
return false;
|
|
134
|
+
const firstWord = wordMatch[1].toLowerCase();
|
|
135
|
+
return STAGE_DIRECTION_FIRST_WORDS.has(firstWord);
|
|
136
|
+
}
|
|
137
|
+
function stripWrappedStageDirections(input, pattern) {
|
|
138
|
+
return input.replace(pattern, (match, inner, offset, source) => {
|
|
139
|
+
const prev = source[offset - 1] ?? "";
|
|
140
|
+
const next = source[offset + match.length] ?? "";
|
|
141
|
+
const hasSafeLeftBoundary = offset === 0 || /[\s([{>"'“‘.!?,;:-]/.test(prev);
|
|
142
|
+
const hasSafeRightBoundary = offset + match.length >= source.length ||
|
|
143
|
+
/[\s)\]}<"'”’.!?,;:-]/.test(next);
|
|
144
|
+
if (!hasSafeLeftBoundary ||
|
|
145
|
+
!hasSafeRightBoundary ||
|
|
146
|
+
!looksLikeStageDirection(inner)) {
|
|
147
|
+
return match;
|
|
148
|
+
}
|
|
149
|
+
return " ";
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function tidyAssistantTextSpacing(input) {
|
|
153
|
+
const safe = input.length > 200_000 ? input.slice(0, 200_000) : input;
|
|
154
|
+
return safe
|
|
155
|
+
.replace(/[ \t]+\n/g, "\n")
|
|
156
|
+
.replace(/\n[ \t]+/g, "\n")
|
|
157
|
+
.replace(/[ \t]{2,}/g, " ")
|
|
158
|
+
.replace(/ ?([,.;!?])/g, "$1")
|
|
159
|
+
.replace(/\(\s+/g, "(")
|
|
160
|
+
.replace(/\s+\)/g, ")");
|
|
161
|
+
}
|
|
162
|
+
function tryParseObject(input) {
|
|
163
|
+
try {
|
|
164
|
+
const parsed = JSON.parse(input);
|
|
165
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed)
|
|
166
|
+
? parsed
|
|
167
|
+
: null;
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function isResponseHandlerPayload(value) {
|
|
174
|
+
const shouldRespond = value.shouldRespond;
|
|
175
|
+
return (typeof value.replyText === "string" &&
|
|
176
|
+
(shouldRespond === "RESPOND" ||
|
|
177
|
+
shouldRespond === "IGNORE" ||
|
|
178
|
+
shouldRespond === "STOP" ||
|
|
179
|
+
Array.isArray(value.contexts) ||
|
|
180
|
+
Array.isArray(value.intents) ||
|
|
181
|
+
Array.isArray(value.threadOps) ||
|
|
182
|
+
Array.isArray(value.candidateActionNames)));
|
|
183
|
+
}
|
|
184
|
+
// Structural keys an elizaOS reply object may legitimately carry alongside the
|
|
185
|
+
// user-facing `reply`. When a parsed object's keys are ALL within this set and
|
|
186
|
+
// it has a string `reply`, the model emitted its whole response object as text
|
|
187
|
+
// (e.g. `{"reply":"107"}` or `{"reply":"…","action":"NONE"}`) — unwrap it. The
|
|
188
|
+
// allow-list keeps us from stripping real chat content that merely happens to be
|
|
189
|
+
// JSON with a `reply` field plus unrelated data.
|
|
190
|
+
const REPLY_PAYLOAD_KEYS = new Set([
|
|
191
|
+
"reply",
|
|
192
|
+
"response",
|
|
193
|
+
"text",
|
|
194
|
+
"message",
|
|
195
|
+
"thought",
|
|
196
|
+
"action",
|
|
197
|
+
"actions",
|
|
198
|
+
"simple",
|
|
199
|
+
"providers",
|
|
200
|
+
"evaluators",
|
|
201
|
+
"inReplyTo",
|
|
202
|
+
"attachments",
|
|
203
|
+
]);
|
|
204
|
+
// The model wraps its answer under `reply` or `response` (the key drifts by
|
|
205
|
+
// model/image — both observed on cloud agents). Return the primitive value from
|
|
206
|
+
// whichever is present, but only when EVERY key is a known response-shape key,
|
|
207
|
+
// so ordinary chat text that merely contains JSON is never rewritten. Allows a
|
|
208
|
+
// primitive value (`{"reply":42}` / `{"response":true}`), not just strings;
|
|
209
|
+
// objects/arrays aren't user-facing text and are rejected.
|
|
210
|
+
const PRIMARY_REPLY_KEYS = ["reply", "response"];
|
|
211
|
+
function getSimpleReplyValue(value) {
|
|
212
|
+
let found;
|
|
213
|
+
for (const key of PRIMARY_REPLY_KEYS) {
|
|
214
|
+
const candidate = value[key];
|
|
215
|
+
if (typeof candidate === "string" ||
|
|
216
|
+
typeof candidate === "number" ||
|
|
217
|
+
typeof candidate === "boolean") {
|
|
218
|
+
found = candidate;
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (found === undefined)
|
|
223
|
+
return null;
|
|
224
|
+
for (const key of Object.keys(value)) {
|
|
225
|
+
if (!REPLY_PAYLOAD_KEYS.has(key))
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
return String(found);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Extracts the user-facing reply from a response-handler payload that leaked as
|
|
232
|
+
* plain text. Local models can emit tool arguments as text when function-call
|
|
233
|
+
* transport is unavailable, for example:
|
|
234
|
+
*
|
|
235
|
+
* "RESPOND", "contexts": ["simple"], "replyText": "Hello"
|
|
236
|
+
*
|
|
237
|
+
* That string is valid object content once the first value is named
|
|
238
|
+
* `shouldRespond`, so parse that shape without touching ordinary chat text.
|
|
239
|
+
*/
|
|
240
|
+
export function extractAssistantReplyText(input) {
|
|
241
|
+
if (typeof input !== "string")
|
|
242
|
+
return null;
|
|
243
|
+
const trimmed = input.trim();
|
|
244
|
+
// Shape 1: a leaked response-handler payload keyed by `replyText` — either the
|
|
245
|
+
// full object or a bare argument fragment (`"RESPOND", "replyText": "Hi"`).
|
|
246
|
+
if (trimmed.includes("replyText")) {
|
|
247
|
+
const candidates = [trimmed];
|
|
248
|
+
if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) {
|
|
249
|
+
candidates.push(`{"shouldRespond":${trimmed}}`);
|
|
250
|
+
if (trimmed.endsWith("}")) {
|
|
251
|
+
candidates.push(`{"shouldRespond":${trimmed.slice(0, -1)}}`);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
for (const candidate of candidates) {
|
|
255
|
+
const parsed = tryParseObject(candidate);
|
|
256
|
+
if (!parsed || !isResponseHandlerPayload(parsed))
|
|
257
|
+
continue;
|
|
258
|
+
const replyText = parsed.replyText.trim();
|
|
259
|
+
if (!replyText)
|
|
260
|
+
return null;
|
|
261
|
+
return stripAssistantStageDirections(replyText).trim() || null;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// Shape 2: the model emitted its whole reply object as text, e.g.
|
|
265
|
+
// `{"reply":"107"}`, `{"response":"54"}`, or `{"reply":"…","action":"NONE"}`
|
|
266
|
+
// (observed from gpt-oss/glm on cloud agents; the wrapper key drifts between
|
|
267
|
+
// `reply` and `response`). Only unwrap a well-formed object whose keys are all
|
|
268
|
+
// known response-shape keys, so ordinary chat text that merely contains JSON
|
|
269
|
+
// is never rewritten.
|
|
270
|
+
if (trimmed.startsWith("{") &&
|
|
271
|
+
trimmed.endsWith("}") &&
|
|
272
|
+
(trimmed.includes('"reply"') || trimmed.includes('"response"'))) {
|
|
273
|
+
const parsed = tryParseObject(trimmed);
|
|
274
|
+
const reply = parsed ? getSimpleReplyValue(parsed) : null;
|
|
275
|
+
if (reply !== null) {
|
|
276
|
+
const trimmedReply = reply.trim();
|
|
277
|
+
if (!trimmedReply)
|
|
278
|
+
return null;
|
|
279
|
+
return stripAssistantStageDirections(trimmedReply).trim() || null;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
export function stripAssistantStageDirections(input) {
|
|
285
|
+
if (typeof input !== "string")
|
|
286
|
+
return "";
|
|
287
|
+
let normalized = input;
|
|
288
|
+
normalized = stripWrappedStageDirections(normalized, /\*([^*\n]+)\*/g);
|
|
289
|
+
normalized = stripWrappedStageDirections(normalized, /_([^_\n]+)_/g);
|
|
290
|
+
return tidyAssistantTextSpacing(normalized);
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=assistant-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-text.js","sourceRoot":"","sources":["../../src/utils/assistant-text.ts"],"names":[],"mappings":"AAAA,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAC;IAC1C,MAAM;IACN,OAAO;IACP,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,SAAS;IACT,UAAU;IACV,KAAK;IACL,MAAM;IACN,QAAQ;IACR,SAAS;IACT,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,UAAU;IACV,SAAS;IACT,UAAU;IACV,WAAW;IACX,MAAM;IACN,OAAO;IACP,UAAU;IACV,KAAK;IACL,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,MAAM;IACN,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;IACV,WAAW;IACX,QAAQ;IACR,SAAS;IACT,UAAU;IACV,QAAQ;IACR,SAAS;IACT,UAAU;IACV,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IACP,QAAQ;IACR,UAAU;IACV,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM;IACN,OAAO;IACP,SAAS;IACT,KAAK;IACL,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS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AAC;AACd,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,KAAa;IACzD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzC,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,UAAU,GAAG,2BAA2B,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IACvE,UAAU,GAAG,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACrE,OAAO,wBAAwB,CAAC,UAAU,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed contract for the in-tab kit installed by BROWSER_TAB_PRELOAD_SCRIPT.
|
|
3
|
+
*
|
|
4
|
+
* The kit lives at `window.__elizaTabKit` inside every <electrobun-webview>
|
|
5
|
+
* tab and provides:
|
|
6
|
+
* - a visual cursor overlay the user sees moving as the agent works,
|
|
7
|
+
* - faithful pointer-event sequences (vs the bare `element.click()` of the
|
|
8
|
+
* legacy command path),
|
|
9
|
+
* - keyboard-accurate typing that triggers React controlled-input change
|
|
10
|
+
* detection.
|
|
11
|
+
*
|
|
12
|
+
* The host (running in the main webview) calls these via short
|
|
13
|
+
* `tag.executeJavascript(...)` snippets that reference `window.__elizaTabKit.*`.
|
|
14
|
+
* The original `__elizaTabExec(requestId, script)` channel is unchanged — the
|
|
15
|
+
* kit is additive.
|
|
16
|
+
*
|
|
17
|
+
* Synthetic events have `isTrusted === false` (not forge-able from script).
|
|
18
|
+
* That's acceptable for React-driven sites and most Web3 UIs; sites that
|
|
19
|
+
* specifically gate on `isTrusted` cannot be driven by this kit; callers must
|
|
20
|
+
* use a CDP-backed browser automation path for those pages.
|
|
21
|
+
*/
|
|
22
|
+
export interface BrowserTabKitCursorPoint {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}
|
|
26
|
+
export interface BrowserTabKitMoveOptions {
|
|
27
|
+
/** Animation duration in ms; defaults to 220. */
|
|
28
|
+
durationMs?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface BrowserTabKitDispatchOptions {
|
|
31
|
+
/** Center of the click in viewport CSS pixels. Defaults to element center. */
|
|
32
|
+
x?: number;
|
|
33
|
+
y?: number;
|
|
34
|
+
/** Mouse button: 0 = primary, 1 = middle, 2 = secondary. Default 0. */
|
|
35
|
+
button?: 0 | 1 | 2;
|
|
36
|
+
/** True for double-click semantics. */
|
|
37
|
+
doubleClick?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface BrowserTabKitTypeOptions {
|
|
40
|
+
/** Per-character delay in ms (uniform). Defaults to 18. */
|
|
41
|
+
perCharDelayMs?: number;
|
|
42
|
+
/** True to clear the existing value first. */
|
|
43
|
+
replace?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Fully-formed RPC surface attached to `window.__elizaTabKit` inside every
|
|
47
|
+
* agent-driven tab. Methods are async (returning Promise) when they involve
|
|
48
|
+
* animation or fetch; sync otherwise.
|
|
49
|
+
*/
|
|
50
|
+
export interface BrowserTabKit {
|
|
51
|
+
cursor: {
|
|
52
|
+
moveTo: (target: BrowserTabKitCursorPoint, options?: BrowserTabKitMoveOptions) => Promise<void>;
|
|
53
|
+
click: (target: BrowserTabKitCursorPoint) => Promise<void>;
|
|
54
|
+
highlight: (element: Element, durationMs?: number) => void;
|
|
55
|
+
show: () => void;
|
|
56
|
+
hide: () => void;
|
|
57
|
+
};
|
|
58
|
+
dispatchPointerSequence: (target: Element, options?: BrowserTabKitDispatchOptions) => Promise<void>;
|
|
59
|
+
typeRealistic: (target: Element, text: string, options?: BrowserTabKitTypeOptions) => Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Populate an `<input type=file>` from a URL or data: URI by fetching the
|
|
62
|
+
* bytes, wrapping them in a File, and assigning via DataTransfer. Real
|
|
63
|
+
* browser file inputs cannot be set from script otherwise — security
|
|
64
|
+
* sandbox blocks direct .files assignment of arbitrary paths. DataTransfer
|
|
65
|
+
* is the standard workaround that fires the file's `change` event.
|
|
66
|
+
*/
|
|
67
|
+
setFileInput: (target: HTMLInputElement, url: string, options?: {
|
|
68
|
+
fileName?: string;
|
|
69
|
+
mimeType?: string;
|
|
70
|
+
}) => Promise<{
|
|
71
|
+
name: string;
|
|
72
|
+
size: number;
|
|
73
|
+
type: string;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
declare global {
|
|
77
|
+
interface Window {
|
|
78
|
+
__elizaTabKit?: BrowserTabKit;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=browser-tab-kit-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-tab-kit-types.d.ts","sourceRoot":"","sources":["../../src/utils/browser-tab-kit-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,wBAAwB;IACvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,wBAAwB;IACvC,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,uEAAuE;IACvE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACvC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE;QACN,MAAM,EAAE,CACN,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,wBAAwB,KAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;QACnB,KAAK,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3D,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;QAC3D,IAAI,EAAE,MAAM,IAAI,CAAC;QACjB,IAAI,EAAE,MAAM,IAAI,CAAC;KAClB,CAAC;IACF,uBAAuB,EAAE,CACvB,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,4BAA4B,KACnC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,EAAE,CACb,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,wBAAwB,KAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB;;;;;;OAMG;IACH,YAAY,EAAE,CACZ,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,KAC/C,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5D;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,CAAC,EAAE,aAAa,CAAC;KAC/B;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed contract for the in-tab kit installed by BROWSER_TAB_PRELOAD_SCRIPT.
|
|
3
|
+
*
|
|
4
|
+
* The kit lives at `window.__elizaTabKit` inside every <electrobun-webview>
|
|
5
|
+
* tab and provides:
|
|
6
|
+
* - a visual cursor overlay the user sees moving as the agent works,
|
|
7
|
+
* - faithful pointer-event sequences (vs the bare `element.click()` of the
|
|
8
|
+
* legacy command path),
|
|
9
|
+
* - keyboard-accurate typing that triggers React controlled-input change
|
|
10
|
+
* detection.
|
|
11
|
+
*
|
|
12
|
+
* The host (running in the main webview) calls these via short
|
|
13
|
+
* `tag.executeJavascript(...)` snippets that reference `window.__elizaTabKit.*`.
|
|
14
|
+
* The original `__elizaTabExec(requestId, script)` channel is unchanged — the
|
|
15
|
+
* kit is additive.
|
|
16
|
+
*
|
|
17
|
+
* Synthetic events have `isTrusted === false` (not forge-able from script).
|
|
18
|
+
* That's acceptable for React-driven sites and most Web3 UIs; sites that
|
|
19
|
+
* specifically gate on `isTrusted` cannot be driven by this kit; callers must
|
|
20
|
+
* use a CDP-backed browser automation path for those pages.
|
|
21
|
+
*/
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=browser-tab-kit-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-tab-kit-types.js","sourceRoot":"","sources":["../../src/utils/browser-tab-kit-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
|