@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
package/runtime-env.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isTruthyEnvValue } from "./env-utils.
|
|
1
|
+
import { isTruthyEnvValue } from "./env-utils.js";
|
|
2
2
|
const DEFAULT_API_BIND_HOST = "127.0.0.1";
|
|
3
3
|
export const DEFAULT_SERVER_ONLY_PORT = 2138;
|
|
4
4
|
// Dev mode splits the API from the Vite UI: API on 31337, UI on 2138.
|
|
@@ -132,9 +132,17 @@ export function isLoopbackBindHost(host) {
|
|
|
132
132
|
const normalized = stripOptionalHostPort(host);
|
|
133
133
|
if (!normalized)
|
|
134
134
|
return true;
|
|
135
|
-
if (LOOPBACK_BIND_RE.test(normalized))
|
|
136
|
-
return
|
|
137
|
-
|
|
135
|
+
if (!LOOPBACK_BIND_RE.test(normalized))
|
|
136
|
+
return false;
|
|
137
|
+
const ipv4 = normalized.startsWith("::ffff:")
|
|
138
|
+
? normalized.slice("::ffff:".length)
|
|
139
|
+
: normalized;
|
|
140
|
+
if (/^127(?:\.\d{1,3}){3}$/.test(ipv4)) {
|
|
141
|
+
return ipv4
|
|
142
|
+
.split(".")
|
|
143
|
+
.every((octet) => Number.isInteger(Number(octet)) && Number(octet) <= 255);
|
|
144
|
+
}
|
|
145
|
+
return true;
|
|
138
146
|
}
|
|
139
147
|
export function isWildcardBindHost(host) {
|
|
140
148
|
const normalized = stripOptionalHostPort(host);
|
|
@@ -227,11 +235,11 @@ export function syncResolvedApiPort(env = process.env, actualPort, opts) {
|
|
|
227
235
|
/**
|
|
228
236
|
* `ELIZA_PLATFORM` values that the agent runtime treats as a mobile (Android /
|
|
229
237
|
* iOS) embedding. On these platforms many host capabilities the agent normally
|
|
230
|
-
* relies on (spawning subprocesses for
|
|
238
|
+
* relies on (spawning subprocesses for signal-cli / sandbox engines,
|
|
231
239
|
* `/usr/bin/open`, AppleScript, lsof, ffmpeg, etc.) either don't exist or
|
|
232
240
|
* aren't reachable from the app sandbox. Code that would shell out should call
|
|
233
|
-
* {@link isMobilePlatform} and
|
|
234
|
-
* throwing — the
|
|
241
|
+
* {@link isMobilePlatform} and return a logged mobile-unavailable status instead
|
|
242
|
+
* of throwing — the mobile-unavailable behaviour described in
|
|
235
243
|
* `docs/agent-on-mobile.md`.
|
|
236
244
|
*/
|
|
237
245
|
const MOBILE_PLATFORM_VALUES = new Set(["android", "ios"]);
|
package/runtime-env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-env.js","sourceRoot":"","sources":["../src/runtime-env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"runtime-env.js","sourceRoot":"","sources":["../src/runtime-env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAC7C,sEAAsE;AACtE,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAC9C,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,MAAM,gBAAgB,GACpB,2FAA2F,CAAC;AAC9F,MAAM,gBAAgB,GAAG,oCAAoC,CAAC;AAE9D,MAAM,aAAa,GAAG,CAAC,gBAAgB,CAAU,CAAC;AAClD,MAAM,cAAc,GAAG,CAAC,iBAAiB,CAAU,CAAC;AACpD,MAAM,wBAAwB,GAAG;IAC/B,uBAAuB;IACvB,cAAc;CACN,CAAC;AACX,MAAM,sBAAsB,GAAG,CAAC,qBAAqB,CAAU,CAAC;AAChE,MAAM,0BAA0B,GAAG,CAAC,yBAAyB,CAAU,CAAC;AACxE,MAAM,2BAA2B,GAAG,CAAC,8BAA8B,CAAU,CAAC;AAC9E,MAAM,qBAAqB,GAAG,CAAC,gBAAgB,EAAE,YAAY,CAAU,CAAC;AACxE,MAAM,oBAAoB,GAAG,CAAC,eAAe,CAAU,CAAC;AACxD,MAAM,wBAAwB,GAAG,CAAC,YA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EnC,MAAM,KAAK,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC;IAC/C,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,QAAQ;QAC1B,QAAQ,EAAE,QAAQ,CAAC,KAAK,IAAI,SAAS;QACrC,cAAc,EAAE,QAAQ,CAAC,cAAc;QACvC,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,eAAe,EAAE,QAAQ,CAAC,eAAe;QACzC,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;QACjD,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,iBAAiB,EAAE,KAAK,CAAC,cAAc;QACvC,MAAM,EAAE,KAAK,CAAC,aAAa;KAC5B,CAAC;AACJ,CAAC"}
|
package/self-edit.d.ts
CHANGED
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
/**
|
|
26
26
|
* Env var the operator sets to opt in to self-edit. Defaults off.
|
|
27
27
|
*/
|
|
28
|
-
export declare const SELF_EDIT_ENABLE_ENV = "
|
|
28
|
+
export declare const SELF_EDIT_ENABLE_ENV = "ELIZA_ENABLE_SELF_EDIT";
|
|
29
29
|
/**
|
|
30
30
|
* Env var that, when truthy, marks the process as a developer-mode runtime
|
|
31
31
|
* (in addition to / as an alternative to `NODE_ENV !== "production"`).
|
|
32
32
|
*/
|
|
33
|
-
export declare const DEV_MODE_ENV = "
|
|
33
|
+
export declare const DEV_MODE_ENV = "ELIZA_DEV_MODE";
|
|
34
34
|
/**
|
|
35
35
|
* Predicate: is self-edit enabled for the current process?
|
|
36
36
|
*
|
|
37
37
|
* Returns `true` only when **all** of the following hold:
|
|
38
|
-
* 1. `
|
|
38
|
+
* 1. `ELIZA_ENABLE_SELF_EDIT` is truthy (explicit operator opt-in).
|
|
39
39
|
* 2. The process is not a production build, i.e. `NODE_ENV !== "production"`
|
|
40
|
-
* OR `
|
|
40
|
+
* OR `ELIZA_DEV_MODE` is truthy. Either signal flips the gate on.
|
|
41
41
|
*
|
|
42
42
|
* The function is pure: pass an env snapshot for tests, default reads
|
|
43
43
|
* `process.env`.
|
package/self-edit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self-edit.d.ts","sourceRoot":"","sources":["../src/self-edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH;;GAEG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"self-edit.d.ts","sourceRoot":"","sources":["../src/self-edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH;;GAEG;AACH,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,GACC,MAAM,CAAC,UAAU,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAoB,GACxD,OAAO,CAYT;AAkBD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAalE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,MAAM,EAAE,CAE7D"}
|
package/self-edit.js
CHANGED
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
*
|
|
23
23
|
* @module self-edit
|
|
24
24
|
*/
|
|
25
|
-
import { isTruthyEnvValue } from "./env-utils.
|
|
25
|
+
import { isTruthyEnvValue } from "./env-utils.js";
|
|
26
26
|
/**
|
|
27
27
|
* Env var the operator sets to opt in to self-edit. Defaults off.
|
|
28
28
|
*/
|
|
29
|
-
export const SELF_EDIT_ENABLE_ENV = "
|
|
29
|
+
export const SELF_EDIT_ENABLE_ENV = "ELIZA_ENABLE_SELF_EDIT";
|
|
30
30
|
/**
|
|
31
31
|
* Env var that, when truthy, marks the process as a developer-mode runtime
|
|
32
32
|
* (in addition to / as an alternative to `NODE_ENV !== "production"`).
|
|
33
33
|
*/
|
|
34
|
-
export const DEV_MODE_ENV = "
|
|
34
|
+
export const DEV_MODE_ENV = "ELIZA_DEV_MODE";
|
|
35
35
|
/**
|
|
36
36
|
* Predicate: is self-edit enabled for the current process?
|
|
37
37
|
*
|
|
38
38
|
* Returns `true` only when **all** of the following hold:
|
|
39
|
-
* 1. `
|
|
39
|
+
* 1. `ELIZA_ENABLE_SELF_EDIT` is truthy (explicit operator opt-in).
|
|
40
40
|
* 2. The process is not a production build, i.e. `NODE_ENV !== "production"`
|
|
41
|
-
* OR `
|
|
41
|
+
* OR `ELIZA_DEV_MODE` is truthy. Either signal flips the gate on.
|
|
42
42
|
*
|
|
43
43
|
* The function is pure: pass an env snapshot for tests, default reads
|
|
44
44
|
* `process.env`.
|
package/self-edit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self-edit.js","sourceRoot":"","sources":["../src/self-edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"self-edit.js","sourceRoot":"","sources":["../src/self-edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAEyC,cAAc,EAAE;IAEzD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAE/D,MAAM,OAAO,GAAG,GAAG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,CAAC,CAAS;IACxC,yEAAyE;IACzE,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,qBAAqB,CAAC,UAAkB;IAC/C,4EAA4E;IAC5E,qFAAqF;IACrF,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IACzE,IAAI,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,OAAO,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,mBAAmB,CAAC,UAAkB,EAAE,MAAc;IAC7D,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACzD,IAAI,UAAU,KAAK,gBAAgB;QAAE,OAAO,IAAI,CAAC;IACjD,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAI,gBAAgB,EAAE,CAAC,CAAC;AACrD,CAAC"}
|
package/settings-debug.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-debug.d.ts","sourceRoot":"","sources":["../src/settings-debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,CAAC,EAAE;IACpD,6BAA6B;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC;IAChD,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAChD,GAAG,OAAO,CAkBV;
|
|
1
|
+
{"version":3,"file":"settings-debug.d.ts","sourceRoot":"","sources":["../src/settings-debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,CAAC,EAAE;IACpD,6BAA6B;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC;IAChD,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAChD,GAAG,OAAO,CAkBV;AAuDD;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,KAAK,SAAI,EACT,IAAI,GAAE,OAAO,CAAC,MAAM,CAAiB,GACpC,OAAO,CAiBT;AAED,qDAAqD;AACrD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAChD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB"}
|
package/settings-debug.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Opt-in verbose logging for settings load / change / save flows.
|
|
3
3
|
* Enable with ELIZA_SETTINGS_DEBUG=1 (and Vite: same env at build time, or VITE_ELIZA_SETTINGS_DEBUG=1).
|
|
4
4
|
*/
|
|
5
|
-
import { isTruthyEnvValue } from "./env-utils.
|
|
5
|
+
import { isTruthyEnvValue } from "./env-utils.js";
|
|
6
6
|
/** Keys whose values are always redacted in debug dumps. */
|
|
7
7
|
const SENSITIVE_KEY_RE = /(?:^|\.|_)(?:secret|password|token|apikey|api_key|privatekey|private_key|mnemonic|credential|authorization|bearer|cookie|sessionkey|session_id)(?:\.|_|$)|^apikey$|_api_key$|_key$/i;
|
|
8
8
|
const MAX_DEPTH = 14;
|
|
@@ -40,6 +40,46 @@ function maskString(s) {
|
|
|
40
40
|
return "[redacted:short]";
|
|
41
41
|
return `${t.slice(0, 4)}…${t.slice(-2)} (${t.length} chars)`;
|
|
42
42
|
}
|
|
43
|
+
function sanitizeDebugString(value) {
|
|
44
|
+
const trimmed = value.trim();
|
|
45
|
+
if (trimmed.length === 0)
|
|
46
|
+
return "";
|
|
47
|
+
if (trimmed.toUpperCase() === "[REDACTED]")
|
|
48
|
+
return "[REDACTED]";
|
|
49
|
+
if (trimmed.length > 48 || /^(sk-|pk_|Bearer\s)/i.test(trimmed)) {
|
|
50
|
+
return maskString(trimmed);
|
|
51
|
+
}
|
|
52
|
+
if (trimmed.length > MAX_STRING)
|
|
53
|
+
return `${trimmed.slice(0, MAX_STRING)}…`;
|
|
54
|
+
return trimmed;
|
|
55
|
+
}
|
|
56
|
+
function sanitizeDebugArray(value, depth, seen) {
|
|
57
|
+
const out = [];
|
|
58
|
+
const cap = Math.min(value.length, MAX_ARRAY);
|
|
59
|
+
for (let i = 0; i < cap; i++) {
|
|
60
|
+
out.push(sanitizeForSettingsDebug(value[i], depth + 1, seen));
|
|
61
|
+
}
|
|
62
|
+
if (value.length > cap) {
|
|
63
|
+
out.push(`… +${value.length - cap} more`);
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
function sanitizeSensitiveDebugValue(value) {
|
|
68
|
+
if (typeof value === "string" && value.trim())
|
|
69
|
+
return maskString(value);
|
|
70
|
+
if (value == null || value === "")
|
|
71
|
+
return value;
|
|
72
|
+
return "[redacted]";
|
|
73
|
+
}
|
|
74
|
+
function sanitizeDebugObject(value, depth, seen) {
|
|
75
|
+
const out = {};
|
|
76
|
+
for (const [key, item] of Object.entries(value)) {
|
|
77
|
+
out[key] = SENSITIVE_KEY_RE.test(key)
|
|
78
|
+
? sanitizeSensitiveDebugValue(item)
|
|
79
|
+
: sanitizeForSettingsDebug(item, depth + 1, seen);
|
|
80
|
+
}
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
43
83
|
/**
|
|
44
84
|
* Deep-clone-ish snapshot safe to log (secrets masked). Not for security boundaries — debug only.
|
|
45
85
|
*/
|
|
@@ -50,18 +90,8 @@ export function sanitizeForSettingsDebug(value, depth = 0, seen = new WeakSet())
|
|
|
50
90
|
return value;
|
|
51
91
|
if (typeof value === "boolean" || typeof value === "number")
|
|
52
92
|
return value;
|
|
53
|
-
if (typeof value === "string")
|
|
54
|
-
|
|
55
|
-
if (t.length === 0)
|
|
56
|
-
return "";
|
|
57
|
-
if (t.toUpperCase() === "[REDACTED]")
|
|
58
|
-
return "[REDACTED]";
|
|
59
|
-
if (t.length > 48 || /^(sk-|pk_|Bearer\s)/i.test(t))
|
|
60
|
-
return maskString(t);
|
|
61
|
-
if (t.length > MAX_STRING)
|
|
62
|
-
return `${t.slice(0, MAX_STRING)}…`;
|
|
63
|
-
return t;
|
|
64
|
-
}
|
|
93
|
+
if (typeof value === "string")
|
|
94
|
+
return sanitizeDebugString(value);
|
|
65
95
|
if (typeof value === "bigint")
|
|
66
96
|
return String(value);
|
|
67
97
|
if (typeof value === "function")
|
|
@@ -72,32 +102,9 @@ export function sanitizeForSettingsDebug(value, depth = 0, seen = new WeakSet())
|
|
|
72
102
|
return "[circular]";
|
|
73
103
|
seen.add(value);
|
|
74
104
|
if (Array.isArray(value)) {
|
|
75
|
-
|
|
76
|
-
const cap = Math.min(value.length, MAX_ARRAY);
|
|
77
|
-
for (let i = 0; i < cap; i++) {
|
|
78
|
-
out.push(sanitizeForSettingsDebug(value[i], depth + 1, seen));
|
|
79
|
-
}
|
|
80
|
-
if (value.length > cap) {
|
|
81
|
-
out.push(`… +${value.length - cap} more`);
|
|
82
|
-
}
|
|
83
|
-
return out;
|
|
84
|
-
}
|
|
85
|
-
const o = value;
|
|
86
|
-
const out = {};
|
|
87
|
-
for (const [k, v] of Object.entries(o)) {
|
|
88
|
-
if (SENSITIVE_KEY_RE.test(k)) {
|
|
89
|
-
out[k] =
|
|
90
|
-
typeof v === "string" && v.trim()
|
|
91
|
-
? maskString(v)
|
|
92
|
-
: v == null || v === ""
|
|
93
|
-
? v
|
|
94
|
-
: "[redacted]";
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
out[k] = sanitizeForSettingsDebug(v, depth + 1, seen);
|
|
98
|
-
}
|
|
105
|
+
return sanitizeDebugArray(value, depth, seen);
|
|
99
106
|
}
|
|
100
|
-
return
|
|
107
|
+
return sanitizeDebugObject(value, depth, seen);
|
|
101
108
|
}
|
|
102
109
|
/** Compact cloud slice for logs (no raw secrets). */
|
|
103
110
|
export function settingsDebugCloudSummary(cloud) {
|
package/settings-debug.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-debug.js","sourceRoot":"","sources":["../src/settings-debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"settings-debug.js","sourceRoot":"","sources":["../src/settings-debug.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,4DAA4D;AAC5D,MAAM,gBAAgB,GACpB,qLAAqL,CAAC;AAExL,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,UAAU,GAAG,GAAG,CAAC;AAEvB;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,OAK3C;IACC,MAAM,EAAE,GAAG,OAAO,EAAE,aAAa,CAAC;IAClC,IAAI,EAAE,EAAE,CAAC;QACP,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAChE,OAAO,IAAI,CAAC;QACd,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YACrE,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,CAAC,GAAG,OAAO,EAAE,GAAG,CAAC;IACvB,IAAI,CAAC,EAAE,CAAC;QACN,IAAI,gBAAgB,CAAC,CAAC,CAAC,oBAAoB,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1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E,CAAC;IAChE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,SAAS,EACP,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;KAC1E,CAAC;AACJ,CAAC"}
|
package/spoken-text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spoken-text.d.ts","sourceRoot":"","sources":["../src/spoken-text.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spoken-text.d.ts","sourceRoot":"","sources":["../src/spoken-text.ts"],"names":[],"mappings":"AA+DA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD"}
|
package/spoken-text.js
CHANGED
|
@@ -6,8 +6,8 @@ function stripUrls(input) {
|
|
|
6
6
|
}
|
|
7
7
|
function stripThinkingAndMarkup(input) {
|
|
8
8
|
let text = input;
|
|
9
|
-
text = text.replace(/<think\b[^>]*>[\s\S]
|
|
10
|
-
text = text.replace(/<(analysis|reasoning|
|
|
9
|
+
text = text.replace(/<(think|analysis|reasoning|tool_calls?|tools?)\b[^>]*>[\s\S]*?<\/\1>/gi, " ");
|
|
10
|
+
text = text.replace(/<(think|analysis|reasoning|tool_calls?|tools?)\b[^>]*>[\s\S]*$/gi, " ");
|
|
11
11
|
text = text.replace(/```[\s\S]*?```/g, " ");
|
|
12
12
|
text = text.replace(/`([^`]+)`/g, "$1");
|
|
13
13
|
text = text.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1");
|
|
@@ -41,6 +41,7 @@ function sanitizeSpeechPunctuation(input) {
|
|
|
41
41
|
text = text.replace(/[‘’]/g, "'");
|
|
42
42
|
text = text.replace(/[…]/g, "...");
|
|
43
43
|
text = text.replace(/[–—]/g, ", ");
|
|
44
|
+
text = text.replace(/([,.!?,。!?])\1+/g, "$1");
|
|
44
45
|
text = text.replace(/\s{0,32}([,;:,;:])\s{0,32}/g, "$1 ");
|
|
45
46
|
text = text.replace(/\s{0,32}([.!?。!?])\s{0,32}/g, "$1 ");
|
|
46
47
|
text = text.replace(/[^\p{L}\p{N}\s.,!?'"%/$:+,。!?;:-]/gu, " ");
|
package/spoken-text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spoken-text.js","sourceRoot":"","sources":["../src/spoken-text.ts"],"names":[],"mappings":"AAAA,SAAS,kBAAkB,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAa;IAC3C,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,GAAG,IAAI,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"spoken-text.js","sourceRoot":"","sources":["../src/spoken-text.ts"],"names":[],"mappings":"AAAA,SAAS,kBAAkB,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAa;IAC3C,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,GAAG,IAAI,CAAC,O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G,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAClC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC9C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;IAC1D,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;IAC1D,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAC;IAChE,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC9C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,MAAM,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;IACpD,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAC7D,OAAO,kBAAkB,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Steward session client.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for:
|
|
5
|
+
* - the storage / cookie / endpoint key names used across os-homepage
|
|
6
|
+
* (`elizaos.ai`), cloud-frontend (`elizacloud.ai`), and the cloud-api
|
|
7
|
+
* `/api/auth/steward-session` route handler;
|
|
8
|
+
* - the request / response / error shapes the route exchanges with the
|
|
9
|
+
* browser;
|
|
10
|
+
* - the small set of helpers each consumer needs (sync, clear, read).
|
|
11
|
+
*
|
|
12
|
+
* Browser-only helpers return cleanly under SSR (`typeof window === "undefined"`).
|
|
13
|
+
*/
|
|
14
|
+
/** localStorage key for the Steward access token (JWT). */
|
|
15
|
+
export declare const STEWARD_TOKEN_KEY = "steward_session_token";
|
|
16
|
+
/**
|
|
17
|
+
* localStorage key for the Steward refresh token.
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Refresh tokens are now persisted only as the HttpOnly
|
|
20
|
+
* `steward-refresh-token` cookie (set by `/api/auth/steward-session` and
|
|
21
|
+
* `/api/auth/steward-nonce-exchange`). The localStorage copy was XSS-
|
|
22
|
+
* reachable and is being removed; only the key constant and the
|
|
23
|
+
* read/write/clear helpers below remain so legacy tabs left over from
|
|
24
|
+
* before the rollout can still drain their stale value via
|
|
25
|
+
* `clearStoredStewardToken()`. Do NOT add new readers/writers.
|
|
26
|
+
*/
|
|
27
|
+
export declare const STEWARD_REFRESH_TOKEN_KEY = "steward_refresh_token";
|
|
28
|
+
/** Non-HttpOnly cookie set to "1" while the server-side session is live. */
|
|
29
|
+
export declare const STEWARD_AUTHED_COOKIE = "steward-authed";
|
|
30
|
+
/** Steward multi-tenant identifier for Eliza Cloud. */
|
|
31
|
+
export declare const STEWARD_TENANT_ID = "elizacloud";
|
|
32
|
+
/** Same-origin endpoint that exchanges the JWT for HttpOnly cookies. */
|
|
33
|
+
export declare const STEWARD_SESSION_ENDPOINT = "/api/auth/steward-session";
|
|
34
|
+
/**
|
|
35
|
+
* Same-origin endpoint that swaps a one-time OAuth `code` (the nonce-exchange
|
|
36
|
+
* flow's `?code=` query param) for HttpOnly cookies. The endpoint calls
|
|
37
|
+
* Steward's `POST /auth/oauth/exchange` server-side so the access and refresh
|
|
38
|
+
* tokens never touch the browser URL.
|
|
39
|
+
*/
|
|
40
|
+
export declare const STEWARD_NONCE_EXCHANGE_ENDPOINT = "/api/auth/steward-nonce-exchange";
|
|
41
|
+
/**
|
|
42
|
+
* Same-origin endpoint that rotates the Steward access + refresh tokens
|
|
43
|
+
* using the HttpOnly `steward-refresh-token` cookie. The browser POSTs
|
|
44
|
+
* with `credentials: "include"`; the cookie travels automatically. Trusted
|
|
45
|
+
* Cloud browser origins receive the short-lived access token so the SPA can
|
|
46
|
+
* refresh its localStorage mirror while route auth remains synchronous.
|
|
47
|
+
*/
|
|
48
|
+
export declare const STEWARD_REFRESH_ENDPOINT = "/api/auth/steward-refresh";
|
|
49
|
+
export interface StewardSessionRequest {
|
|
50
|
+
token: string;
|
|
51
|
+
refreshToken?: string | null;
|
|
52
|
+
}
|
|
53
|
+
export interface StewardSessionResponse {
|
|
54
|
+
ok: true;
|
|
55
|
+
userId: string;
|
|
56
|
+
stewardUserId: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Distinct outcomes the cloud-api route returns. The client uses these to
|
|
60
|
+
* decide whether to wipe localStorage (`invalid_token`) or hold steady
|
|
61
|
+
* (`server_secret_missing`).
|
|
62
|
+
*/
|
|
63
|
+
export type StewardSessionErrorCode = "missing_token" | "invalid_token" | "server_secret_missing" | "steward_user_sync_failed" | "internal_error" | "missing_code" | "code_invalid" | "code_expired" | "code_redirect_mismatch" | "code_tenant_mismatch" | "steward_upstream_unavailable" | "forbidden_origin";
|
|
64
|
+
export declare class StewardSessionError extends Error {
|
|
65
|
+
readonly status: number;
|
|
66
|
+
readonly code: StewardSessionErrorCode | string | null;
|
|
67
|
+
constructor(message: string, status: number, code: StewardSessionErrorCode | string | null);
|
|
68
|
+
}
|
|
69
|
+
export interface SyncOpts {
|
|
70
|
+
/**
|
|
71
|
+
* Absolute or relative URL to POST to. Defaults to STEWARD_SESSION_ENDPOINT
|
|
72
|
+
* (same-origin). Pass an absolute URL when crossing origins
|
|
73
|
+
* (e.g. elizaos.ai -> api.elizacloud.ai).
|
|
74
|
+
*/
|
|
75
|
+
endpoint?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Override the global fetch (mainly for tests and SSR shims).
|
|
78
|
+
*/
|
|
79
|
+
fetchImpl?: typeof fetch;
|
|
80
|
+
}
|
|
81
|
+
export interface ClearOpts {
|
|
82
|
+
/** Endpoints to DELETE. Defaults to [STEWARD_SESSION_ENDPOINT]. */
|
|
83
|
+
endpoints?: string[];
|
|
84
|
+
fetchImpl?: typeof fetch;
|
|
85
|
+
}
|
|
86
|
+
export declare function readStoredStewardToken(): string | null;
|
|
87
|
+
export declare function writeStoredStewardToken(token: string): void;
|
|
88
|
+
/**
|
|
89
|
+
* @deprecated The refresh token is now persisted only as the HttpOnly
|
|
90
|
+
* `steward-refresh-token` cookie. Reading it from localStorage is XSS-
|
|
91
|
+
* reachable and contradicts the cookie-only model. Callers should POST to
|
|
92
|
+
* `STEWARD_REFRESH_ENDPOINT` with `credentials: "include"` instead — the
|
|
93
|
+
* server reads the cookie and mints fresh tokens with no body payload.
|
|
94
|
+
* This helper is retained for one release window so legacy tabs can still
|
|
95
|
+
* be cleaned up via `clearStoredStewardToken()`; it will be removed once
|
|
96
|
+
* `os-homepage` and `cloud-frontend` have shipped the cookie-only flow.
|
|
97
|
+
*/
|
|
98
|
+
export declare function readStoredStewardRefreshToken(): string | null;
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Writing the refresh token to localStorage defeats the
|
|
101
|
+
* HttpOnly-cookie protection the server already provides. The cookie is
|
|
102
|
+
* set by `/api/auth/steward-session` and `/api/auth/steward-nonce-exchange`
|
|
103
|
+
* — there is no longer any reason for the browser to hold a copy. This
|
|
104
|
+
* helper intentionally does not write and is kept only for one release
|
|
105
|
+
* window; after that it will be deleted.
|
|
106
|
+
*/
|
|
107
|
+
export declare function writeStoredStewardRefreshToken(_token: string): void;
|
|
108
|
+
export declare function clearStoredStewardToken(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Returns true when the non-HttpOnly `steward-authed=1` marker cookie is
|
|
111
|
+
* present. The JWT cookie itself is HttpOnly, so JS uses this hint to know
|
|
112
|
+
* "there is a server session" without ever touching the token.
|
|
113
|
+
*/
|
|
114
|
+
export declare function hasStewardAuthedCookie(): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* POSTs the Steward JWT (+ optional refresh token) to the session endpoint
|
|
117
|
+
* so the server can set HttpOnly cookies. Throws `StewardSessionError` on
|
|
118
|
+
* non-2xx; caller decides whether to wipe localStorage based on `error.code`.
|
|
119
|
+
*/
|
|
120
|
+
export declare function syncStewardSession(token: string, refreshToken?: string | null, opts?: SyncOpts): Promise<StewardSessionResponse>;
|
|
121
|
+
export interface StewardNonceExchangeRequest {
|
|
122
|
+
/** One-time code from the Steward redirect (`?code=`). */
|
|
123
|
+
code: string;
|
|
124
|
+
/**
|
|
125
|
+
* The `redirect_uri` that was sent to Steward `/authorize`. Steward verifies
|
|
126
|
+
* this matches what was issued. If omitted, the cloud-api route falls back
|
|
127
|
+
* to the value provided server-side via env / convention; in practice the
|
|
128
|
+
* caller should send the same redirect_uri it used originally.
|
|
129
|
+
*/
|
|
130
|
+
redirectUri?: string;
|
|
131
|
+
/** Steward tenant ID (e.g. "elizacloud"). */
|
|
132
|
+
tenantId?: string;
|
|
133
|
+
/** PKCE verifier paired with the `code_challenge` sent to Steward. */
|
|
134
|
+
codeVerifier?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface StewardNonceExchangeResponse extends StewardSessionResponse {
|
|
137
|
+
expiresIn?: number;
|
|
138
|
+
expiresAt?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Steward JWT. Mirrored from the upstream Steward exchange so the SPA can
|
|
141
|
+
* write it to localStorage (required by `@stwd/react`'s `useAuth()` to
|
|
142
|
+
* report `isAuthenticated=true`). HttpOnly cookies are still the canonical
|
|
143
|
+
* session — this is the JS-readable copy that keeps the wallet and OAuth
|
|
144
|
+
* paths symmetric.
|
|
145
|
+
*/
|
|
146
|
+
token?: string;
|
|
147
|
+
refreshToken?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface ExchangeStewardCodeOpts extends SyncOpts {
|
|
150
|
+
/** redirect_uri that was sent to /authorize (must match exactly). */
|
|
151
|
+
redirectUri?: string;
|
|
152
|
+
/** Steward tenant id. */
|
|
153
|
+
tenantId?: string;
|
|
154
|
+
/** PKCE verifier paired with the `code_challenge` sent to Steward. */
|
|
155
|
+
codeVerifier?: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* POSTs the one-time OAuth code to the cloud-api nonce-exchange endpoint.
|
|
159
|
+
* The route calls Steward `POST /auth/oauth/exchange` server-side, sets the
|
|
160
|
+
* HttpOnly steward-token + steward-refresh-token cookies, and returns the
|
|
161
|
+
* Eliza Cloud user id. Some cross-origin checkout callers may also receive a
|
|
162
|
+
* browser bearer token. Throws `StewardSessionError` on non-2xx.
|
|
163
|
+
*/
|
|
164
|
+
export declare function exchangeStewardCode(code: string, opts?: ExchangeStewardCodeOpts): Promise<StewardNonceExchangeResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* Best-effort DELETE of every configured session endpoint. Failures are
|
|
167
|
+
* swallowed — the caller has already wiped localStorage and there's nothing
|
|
168
|
+
* useful to do about a cookie that won't clear.
|
|
169
|
+
*/
|
|
170
|
+
export { buildStewardOAuthAuthorizeUrl, consumeStewardPkceVerifier, createStewardPkceChallenge, createStewardPkcePair, generateStewardPkceVerifier, type StewardOAuthProvider, type StewardPkcePair, storeStewardPkceVerifier, } from "./steward-oauth-pkce.js";
|
|
171
|
+
export declare function clearStewardSession(opts?: ClearOpts): void;
|
|
172
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/steward-session-client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,0BAA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