@elizaos/shared 2.0.0-alpha.538 → 2.0.3-beta.2
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 +510 -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 +191 -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 +38 -0
- package/local-inference/routing-preferences.d.ts.map +1 -0
- package/local-inference/routing-preferences.js +90 -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 +139 -0
- package/transcripts.d.ts.map +1 -0
- package/transcripts.js +162 -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,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge streaming text updates that may arrive as pure deltas, cumulative
|
|
3
|
+
* snapshots, or overlapping suffix/prefix fragments.
|
|
4
|
+
*/
|
|
5
|
+
function commonPrefixLength(left, right) {
|
|
6
|
+
const maxLength = Math.min(left.length, right.length);
|
|
7
|
+
let index = 0;
|
|
8
|
+
while (index < maxLength &&
|
|
9
|
+
left.charCodeAt(index) === right.charCodeAt(index)) {
|
|
10
|
+
index += 1;
|
|
11
|
+
}
|
|
12
|
+
return index;
|
|
13
|
+
}
|
|
14
|
+
function commonSuffixLength(left, right, sharedPrefixLength) {
|
|
15
|
+
const maxLength = Math.min(left.length - sharedPrefixLength, right.length - sharedPrefixLength);
|
|
16
|
+
let length = 0;
|
|
17
|
+
while (length < maxLength &&
|
|
18
|
+
left.charCodeAt(left.length - 1 - length) ===
|
|
19
|
+
right.charCodeAt(right.length - 1 - length)) {
|
|
20
|
+
length += 1;
|
|
21
|
+
}
|
|
22
|
+
return length;
|
|
23
|
+
}
|
|
24
|
+
function isLikelySnapshotReplacement(existing, incoming) {
|
|
25
|
+
const sharedPrefixLength = commonPrefixLength(existing, incoming);
|
|
26
|
+
const sharedSuffixLength = commonSuffixLength(existing, incoming, sharedPrefixLength);
|
|
27
|
+
const sharedLength = sharedPrefixLength + sharedSuffixLength;
|
|
28
|
+
const minLength = Math.min(existing.length, incoming.length);
|
|
29
|
+
// For short strings, a modest shared prefix is strong evidence of a
|
|
30
|
+
// snapshot replacement (e.g. case correction, punctuation addition).
|
|
31
|
+
if (minLength < 30 && sharedPrefixLength >= 2) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
return (sharedPrefixLength >= 8 ||
|
|
35
|
+
sharedLength >= Math.max(4, Math.ceil(minLength * 0.7)));
|
|
36
|
+
}
|
|
37
|
+
export function mergeStreamingText(existing, incoming) {
|
|
38
|
+
if (!incoming)
|
|
39
|
+
return existing;
|
|
40
|
+
if (!existing)
|
|
41
|
+
return incoming;
|
|
42
|
+
// Normalize unicode for comparison, but return original incoming when selected.
|
|
43
|
+
const existingNorm = existing.normalize("NFC");
|
|
44
|
+
const incomingNorm = incoming.normalize("NFC");
|
|
45
|
+
if (incomingNorm === existingNorm) {
|
|
46
|
+
return incoming.length === 1 && /\S/u.test(incoming)
|
|
47
|
+
? `${existing}${incoming}`
|
|
48
|
+
: incoming;
|
|
49
|
+
}
|
|
50
|
+
// Common case: the stream sends the full text-so-far.
|
|
51
|
+
if (incomingNorm.startsWith(existingNorm)) {
|
|
52
|
+
return incoming;
|
|
53
|
+
}
|
|
54
|
+
// Some providers resend the full text with a revised prefix or wrapper.
|
|
55
|
+
if (incomingNorm.includes(existingNorm)) {
|
|
56
|
+
return incoming;
|
|
57
|
+
}
|
|
58
|
+
// Ignore clearly regressive snapshots.
|
|
59
|
+
if (existingNorm.startsWith(incomingNorm)) {
|
|
60
|
+
return existing;
|
|
61
|
+
}
|
|
62
|
+
// Use trimmed existing for overlap detection so trailing whitespace
|
|
63
|
+
// does not prevent finding a valid overlap.
|
|
64
|
+
const existingTrimmed = existingNorm.trimEnd();
|
|
65
|
+
const maxOverlap = Math.min(existingTrimmed.length, incomingNorm.length);
|
|
66
|
+
const existingTrimmedLength = existingTrimmed.length;
|
|
67
|
+
for (let overlap = maxOverlap; overlap > 0; overlap -= 1) {
|
|
68
|
+
const existingStart = existingTrimmedLength - overlap;
|
|
69
|
+
let match = true;
|
|
70
|
+
for (let index = 0; index < overlap; index += 1) {
|
|
71
|
+
if (existingTrimmed.charCodeAt(existingStart + index) !==
|
|
72
|
+
incomingNorm.charCodeAt(index)) {
|
|
73
|
+
match = false;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (!match)
|
|
78
|
+
continue;
|
|
79
|
+
if (overlap === incomingNorm.length) {
|
|
80
|
+
// Preserve repeated single-character deltas like "l" + "l", but avoid
|
|
81
|
+
// replaying larger suffix fragments already present in the buffer.
|
|
82
|
+
return incoming.length === 1 ? `${existing}${incoming}` : existing;
|
|
83
|
+
}
|
|
84
|
+
return `${existing.slice(0, existing.length - (existingNorm.length - existingTrimmedLength))}${incoming.slice(overlap)}`;
|
|
85
|
+
}
|
|
86
|
+
// Some providers revise earlier words in-place while still sending the full
|
|
87
|
+
// text-so-far. Treat those as snapshot replacements instead of appends.
|
|
88
|
+
if (isLikelySnapshotReplacement(existingNorm, incomingNorm)) {
|
|
89
|
+
return incoming;
|
|
90
|
+
}
|
|
91
|
+
return `${existing}${incoming}`;
|
|
92
|
+
}
|
|
93
|
+
export function computeStreamingDelta(existing, incoming) {
|
|
94
|
+
const merged = mergeStreamingText(existing, incoming);
|
|
95
|
+
if (merged === existing)
|
|
96
|
+
return "";
|
|
97
|
+
if (merged.startsWith(existing)) {
|
|
98
|
+
return merged.slice(existing.length);
|
|
99
|
+
}
|
|
100
|
+
return incoming;
|
|
101
|
+
}
|
|
102
|
+
export function resolveStreamingUpdate(existing, incoming) {
|
|
103
|
+
const merged = mergeStreamingText(existing, incoming);
|
|
104
|
+
if (merged === existing) {
|
|
105
|
+
return { kind: "unchanged", nextText: existing, emittedText: "" };
|
|
106
|
+
}
|
|
107
|
+
if (merged.startsWith(existing)) {
|
|
108
|
+
return {
|
|
109
|
+
kind: "append",
|
|
110
|
+
nextText: merged,
|
|
111
|
+
emittedText: merged.slice(existing.length),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return { kind: "replace", nextText: merged, emittedText: merged };
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=streaming-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-text.js","sourceRoot":"","sources":["../../src/utils/streaming-text.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function formatSubscriptionRequestError(err: unknown): string;
|
|
2
|
+
export declare function normalizeOpenAICallbackInput(input: string): {
|
|
3
|
+
ok: true;
|
|
4
|
+
code: string;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=subscription-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-auth.d.ts","sourceRoot":"","sources":["../../src/utils/subscription-auth.ts"],"names":[],"mappings":"AAAA,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAKnE;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GACtD;IACE,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAgDJ"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export function formatSubscriptionRequestError(err) {
|
|
2
|
+
if (err instanceof Error) {
|
|
3
|
+
return err.message;
|
|
4
|
+
}
|
|
5
|
+
return String(err);
|
|
6
|
+
}
|
|
7
|
+
export function normalizeOpenAICallbackInput(input) {
|
|
8
|
+
const trimmed = input.trim();
|
|
9
|
+
if (!trimmed) {
|
|
10
|
+
return {
|
|
11
|
+
ok: false,
|
|
12
|
+
error: "subscriptionstatus.PasteCallbackUrlFromLocalhost",
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const normalized = trimmed.startsWith("localhost:") || trimmed.startsWith("127.0.0.1:")
|
|
16
|
+
? `http://${trimmed}`
|
|
17
|
+
: trimmed;
|
|
18
|
+
// Allow raw codes in addition to full callback URLs.
|
|
19
|
+
if (!normalized.includes("://")) {
|
|
20
|
+
if (normalized.length > 4096) {
|
|
21
|
+
return { ok: false, error: "subscriptionstatus.CallbackCodeTooLong" };
|
|
22
|
+
}
|
|
23
|
+
return { ok: true, code: normalized };
|
|
24
|
+
}
|
|
25
|
+
let parsed;
|
|
26
|
+
try {
|
|
27
|
+
parsed = new URL(normalized);
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return { ok: false, error: "subscriptionstatus.InvalidCallbackUrl" };
|
|
31
|
+
}
|
|
32
|
+
const hostOk = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1";
|
|
33
|
+
if (!hostOk ||
|
|
34
|
+
parsed.port !== "1455" ||
|
|
35
|
+
parsed.pathname !== "/auth/callback") {
|
|
36
|
+
return {
|
|
37
|
+
ok: false,
|
|
38
|
+
error: "subscriptionstatus.ExpectedCallbackUrl",
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (!parsed.searchParams.get("code")) {
|
|
42
|
+
return {
|
|
43
|
+
ok: false,
|
|
44
|
+
error: "subscriptionstatus.CallbackUrlMissingCode",
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return { ok: true, code: normalized };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=subscription-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-auth.js","sourceRoot":"","sources":["../../src/utils/subscription-auth.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,8BAA8B,CAAC,GAAY;IACzD,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QACzB,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,KAAa;IASxD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,kDAAkD;SAC1D,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GACd,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;QAClE,CAAC,CAAC,UAAU,OAAO,EAAE;QACrB,CAAC,CAAC,OAAO,CAAC;IAEd,qDAAqD;IACrD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,IAAI,UAAU,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC;YAC7B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wCAAwC,EAAE,CAAC;QACxE,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IACxC,CAAC;IAED,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,uCAAuC,EAAE,CAAC;IACvE,CAAC;IAED,MAAM,MAAM,GACV,MAAM,CAAC,QAAQ,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC;IACrE,IACE,CAAC,MAAM;QACP,MAAM,CAAC,IAAI,KAAK,MAAM;QACtB,MAAM,CAAC,QAAQ,KAAK,gBAAgB,EACpC,CAAC;QACD,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,wCAAwC;SAChD,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACrC,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,2CAA2C;SACnD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function formatTrajectoryDuration(ms: number | null): string;
|
|
2
|
+
export declare function formatTrajectoryTimestamp(iso: string, mode: "smart" | "detailed"): string;
|
|
3
|
+
export declare function formatTrajectoryTokenCount(count: number | undefined, options: {
|
|
4
|
+
emptyLabel: string;
|
|
5
|
+
}): string;
|
|
6
|
+
//# sourceMappingURL=trajectory-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory-format.d.ts","sourceRoot":"","sources":["../../src/utils/trajectory-format.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAKlE;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,OAAO,GAAG,UAAU,GACzB,MAAM,CA8BR;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,OAAO,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAC9B,MAAM,CAIR"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export function formatTrajectoryDuration(ms) {
|
|
2
|
+
if (ms === null)
|
|
3
|
+
return "—";
|
|
4
|
+
if (ms < 1000)
|
|
5
|
+
return `${ms}ms`;
|
|
6
|
+
if (ms < 60000)
|
|
7
|
+
return `${(ms / 1000).toFixed(1)}s`;
|
|
8
|
+
return `${(ms / 60000).toFixed(1)}m`;
|
|
9
|
+
}
|
|
10
|
+
export function formatTrajectoryTimestamp(iso, mode) {
|
|
11
|
+
const date = new Date(iso);
|
|
12
|
+
if (mode === "smart") {
|
|
13
|
+
const now = new Date();
|
|
14
|
+
const isToday = date.toDateString() === now.toDateString();
|
|
15
|
+
if (isToday) {
|
|
16
|
+
return date.toLocaleTimeString(undefined, {
|
|
17
|
+
hour: "2-digit",
|
|
18
|
+
minute: "2-digit",
|
|
19
|
+
second: "2-digit",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return date.toLocaleString(undefined, {
|
|
23
|
+
month: "short",
|
|
24
|
+
day: "numeric",
|
|
25
|
+
hour: "2-digit",
|
|
26
|
+
minute: "2-digit",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return date.toLocaleString(undefined, {
|
|
30
|
+
month: "short",
|
|
31
|
+
day: "numeric",
|
|
32
|
+
hour: "2-digit",
|
|
33
|
+
minute: "2-digit",
|
|
34
|
+
second: "2-digit",
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export function formatTrajectoryTokenCount(count, options) {
|
|
38
|
+
if (count === undefined || count === 0)
|
|
39
|
+
return options.emptyLabel;
|
|
40
|
+
if (count < 1000)
|
|
41
|
+
return String(count);
|
|
42
|
+
return `${(count / 1000).toFixed(1)}k`;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=trajectory-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory-format.js","sourceRoot":"","sources":["../../src/utils/trajectory-format.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,wBAAwB,CAAC,EAAiB;IACxD,IAAI,EAAE,KAAK,IAAI;QAAE,OAAO,GAAG,CAAC;IAC5B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,GAAG,EAAE,IAAI,CAAC;IAChC,IAAI,EAAE,GAAG,KAAK;QAAE,OAAO,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACpD,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,GAAW,EACX,IAA0B;IAE1B,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IAE3B,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,CAAC,YAAY,EAAE,CAAC;QAE3D,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE;gBACxC,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,SAAS;aAClB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE;YACpC,KAAK,EAAE,OAAO;YACd,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;SAClB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE;QACpC,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,KAAyB,EACzB,OAA+B;IAE/B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,UAAU,CAAC;IAClE,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Same predicate as `ttsDebug` — use to attach optional debug headers / task metadata. */
|
|
2
|
+
export declare function isTtsDebugEnabled(): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Single-line preview of text for TTS debug logs (avoids huge console lines).
|
|
5
|
+
* Enable `ELIZA_TTS_DEBUG` only when you accept that spoken lines may appear in logs.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ttsDebugTextPreview(text: string, maxChars?: number): string;
|
|
8
|
+
export declare function setTtsDebugSink(sink: ((phase: string, detail?: Record<string, unknown>) => void) | null): void;
|
|
9
|
+
export declare function ttsDebug(phase: string, detail?: Record<string, unknown>): void;
|
|
10
|
+
//# sourceMappingURL=tts-debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tts-debug.d.ts","sourceRoot":"","sources":["../../src/utils/tts-debug.ts"],"names":[],"mappings":"AA4CA,2FAA2F;AAC3F,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAID;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAA4B,GACrC,MAAM,CAIR;AAUD,wBAAgB,eAAe,CAC7B,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,GACvE,IAAI,CAEN;AAED,wBAAgB,QAAQ,CACtB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI,CAGN"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
/**
|
|
3
|
+
* TTS pipeline tracing (opt-in). Prefix: `[eliza][tts]`.
|
|
4
|
+
* Never pass secrets in `detail`. With debug on, `preview` fields may contain
|
|
5
|
+
* user-visible spoken text — disable in shared logs / production.
|
|
6
|
+
*
|
|
7
|
+
* Playback phases (browser console): `play:web-audio:start|end` (ElevenLabs /
|
|
8
|
+
* cloud MP3), `speakBrowser:enter`, `play:browser:web-speech:enqueued`,
|
|
9
|
+
* `play:browser:speechSynthesis:start|end|error`, `play:talkmode:dispatch|speak-failed`,
|
|
10
|
+
* `play:browser:no-synth`. Server logs: `server:cloud-tts:*` (includes optional
|
|
11
|
+
* `messageId`, `clipSegment`, `hearingFull` when the client sends
|
|
12
|
+
* `x-elizaos-tts-*` headers on `/api/tts/cloud`), ChatView: `chat:*`.
|
|
13
|
+
*
|
|
14
|
+
* Enable with:
|
|
15
|
+
* - **Node / API:** `ELIZA_TTS_DEBUG=1` (or `true`, `yes`, `on`) — logs appear in the API
|
|
16
|
+
* terminal / `[api]` aggregator only for **server** routes (e.g. `server:cloud-tts:*`).
|
|
17
|
+
* - **Renderer (WebView / browser):** same env is mirrored via Vite `define` in
|
|
18
|
+
* `apps/app/vite.config.ts` when you start dev with `ELIZA_TTS_DEBUG=1`. Those lines
|
|
19
|
+
* go to the **renderer** JavaScript console (Electrobun: Web Inspector on the window),
|
|
20
|
+
* not `LOG_LEVEL` on the API process alone.
|
|
21
|
+
*/
|
|
22
|
+
function ttsDebugEnabled() {
|
|
23
|
+
const truthy = (raw) => {
|
|
24
|
+
if (raw == null)
|
|
25
|
+
return false;
|
|
26
|
+
const v = String(raw).trim().toLowerCase();
|
|
27
|
+
return v === "1" || v === "true" || v === "yes" || v === "on";
|
|
28
|
+
};
|
|
29
|
+
if (typeof process !== "undefined" && process.env) {
|
|
30
|
+
if (truthy(process.env.ELIZA_TTS_DEBUG))
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
// Use static `import.meta.env.*` so Vite `define` can replace ELIZA_TTS_DEBUG at build time.
|
|
35
|
+
if (truthy(String(import.meta.env.ELIZA_TTS_DEBUG ?? "")))
|
|
36
|
+
return true;
|
|
37
|
+
if (truthy(String(import.meta.env.VITE_ELIZA_TTS_DEBUG ?? "")))
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
/* no import.meta */
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
/** Same predicate as `ttsDebug` — use to attach optional debug headers / task metadata. */
|
|
46
|
+
export function isTtsDebugEnabled() {
|
|
47
|
+
return ttsDebugEnabled();
|
|
48
|
+
}
|
|
49
|
+
const DEFAULT_PREVIEW_MAX = 160;
|
|
50
|
+
/**
|
|
51
|
+
* Single-line preview of text for TTS debug logs (avoids huge console lines).
|
|
52
|
+
* Enable `ELIZA_TTS_DEBUG` only when you accept that spoken lines may appear in logs.
|
|
53
|
+
*/
|
|
54
|
+
export function ttsDebugTextPreview(text, maxChars = DEFAULT_PREVIEW_MAX) {
|
|
55
|
+
const singleLine = text.replace(/\r?\n/g, "↵ ").replace(/\s+/g, " ").trim();
|
|
56
|
+
if (singleLine.length <= maxChars)
|
|
57
|
+
return singleLine;
|
|
58
|
+
return `${singleLine.slice(0, maxChars)}…`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Sink for TTS debug output. Set by the host app (e.g. pino on the server,
|
|
62
|
+
* Web Inspector in the renderer). Null disables debug output.
|
|
63
|
+
*/
|
|
64
|
+
let _ttsSink = null;
|
|
65
|
+
export function setTtsDebugSink(sink) {
|
|
66
|
+
_ttsSink = sink;
|
|
67
|
+
}
|
|
68
|
+
export function ttsDebug(phase, detail) {
|
|
69
|
+
if (!ttsDebugEnabled() || !_ttsSink)
|
|
70
|
+
return;
|
|
71
|
+
_ttsSink(phase, detail);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=tts-debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tts-debug.js","sourceRoot":"","sources":["../../src/utils/tts-debug.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,eAAe;IACtB,MAAM,MAAM,GAAG,CAAC,GAA8B,EAAW,EAAE;QACzD,IAAI,GAAG,IAAI,IAAI;YAAE,OAAO,KAAK,CAAC;QAC9B,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC;IAChE,CAAC,CAAC;IAEF,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAClD,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;YAAE,OAAO,IAAI,CAAC;IACvD,CAAC;IAED,IAAI,CAAC;QACH,6FAA6F;QAC7F,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QACvE,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC;QACP,oBAAoB;IACtB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,iBAAiB;IAC/B,OAAO,eAAe,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAY,EACZ,WAAmB,mBAAmB;IAEtC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5E,IAAI,UAAU,CAAC,MAAM,IAAI,QAAQ;QAAE,OAAO,UAAU,CAAC;IACrD,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,IAAI,QAAQ,GAED,IAAI,CAAC;AAEhB,MAAM,UAAU,eAAe,CAC7B,IAAwE;IAExE,QAAQ,GAAG,IAAI,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,QAAQ,CACtB,KAAa,EACb,MAAgC;IAEhC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ;QAAE,OAAO;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branded hero-image generator for plugin **views**.
|
|
3
|
+
*
|
|
4
|
+
* A view is a mini-app contributed by a plugin (`Plugin.views`). Each one is
|
|
5
|
+
* served a square hero image at `/api/views/<id>/hero`. Real heroes live in the
|
|
6
|
+
* plugin at `assets/hero.<ext>`; when a plugin ships none, the agent serves a
|
|
7
|
+
* generated SVG produced here so the catalog never shows a broken or ugly tile.
|
|
8
|
+
*
|
|
9
|
+
* The composition is intentionally **no-blue-dominant** (the app surface forbids
|
|
10
|
+
* blue accents — orange/jewel tones only) and **deterministic**: the same input
|
|
11
|
+
* always yields byte-identical output, so `scripts/generate-view-heroes.mjs`
|
|
12
|
+
* (which commits real heroes into plugins) and the runtime fallback render the
|
|
13
|
+
* exact same art. This is the single source of truth for that art — the script
|
|
14
|
+
* and the agent both import `renderViewHeroSvg` from here.
|
|
15
|
+
*
|
|
16
|
+
* Pure string generation only: no Node APIs, so this module stays importable
|
|
17
|
+
* from the runtime-agnostic `@elizaos/shared` barrel (browser + server).
|
|
18
|
+
*/
|
|
19
|
+
export interface ViewHeroFrameInput {
|
|
20
|
+
/** Stable slug used to namespace SVG gradient/filter ids. */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Accent hue (0–359). Keep out of the pure-blue band for the app surface. */
|
|
23
|
+
hue: number;
|
|
24
|
+
/** Inline SVG markup for the centered line-icon glyph. */
|
|
25
|
+
iconSvg: string;
|
|
26
|
+
/** Display label rendered along the bottom. */
|
|
27
|
+
label: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Render the full branded hero SVG. Shared chrome (defs, background, depth
|
|
31
|
+
* blobs, faint grid, accent arc, bottom label + vignette) with the icon glyph
|
|
32
|
+
* slotted in. Output is deterministic and byte-identical for identical input.
|
|
33
|
+
*/
|
|
34
|
+
export declare function renderViewHeroSvg({ id, hue, iconSvg, label, }: ViewHeroFrameInput): string;
|
|
35
|
+
/**
|
|
36
|
+
* Hand-drawn vector line-icons, centered at (0,0) spanning roughly -150..150.
|
|
37
|
+
* Each inherits stroke styling from the parent <g>; fills are set explicitly
|
|
38
|
+
* where a filled glyph reads better. Keyed names map to the catalog below.
|
|
39
|
+
*/
|
|
40
|
+
export declare const VIEW_HERO_ICONS: {
|
|
41
|
+
readonly modelTester: " <rect x=\"-110\" y=\"-110\" width=\"220\" height=\"220\" rx=\"28\"/>\n <rect x=\"-58\" y=\"-58\" width=\"116\" height=\"116\" rx=\"14\"/>\n <line x1=\"-110\" y1=\"-66\" x2=\"-150\" y2=\"-66\"/>\n <line x1=\"-110\" y1=\"0\" x2=\"-150\" y2=\"0\"/>\n <line x1=\"-110\" y1=\"66\" x2=\"-150\" y2=\"66\"/>\n <line x1=\"110\" y1=\"-66\" x2=\"150\" y2=\"-66\"/>\n <line x1=\"110\" y1=\"0\" x2=\"150\" y2=\"0\"/>\n <line x1=\"110\" y1=\"66\" x2=\"150\" y2=\"66\"/>\n <line x1=\"-66\" y1=\"-110\" x2=\"-66\" y2=\"-150\"/>\n <line x1=\"0\" y1=\"-110\" x2=\"0\" y2=\"-150\"/>\n <line x1=\"66\" y1=\"-110\" x2=\"66\" y2=\"-150\"/>\n <line x1=\"-66\" y1=\"110\" x2=\"-66\" y2=\"150\"/>\n <line x1=\"0\" y1=\"110\" x2=\"0\" y2=\"150\"/>\n <line x1=\"66\" y1=\"110\" x2=\"66\" y2=\"150\"/>\n <circle cx=\"0\" cy=\"0\" r=\"14\" stroke-width=\"0\" fill=\"currentColor\"/>";
|
|
42
|
+
readonly views: " <rect x=\"-150\" y=\"-150\" width=\"130\" height=\"130\" rx=\"18\"/>\n <rect x=\"20\" y=\"-150\" width=\"130\" height=\"130\" rx=\"18\"/>\n <rect x=\"-150\" y=\"20\" width=\"130\" height=\"130\" rx=\"18\"/>\n <rect x=\"20\" y=\"20\" width=\"130\" height=\"130\" rx=\"18\"/>";
|
|
43
|
+
readonly focus: " <path d=\"M0 -150 L130 -100 L130 24 C130 110 70 152 0 175 C-70 152 -130 110 -130 24 L-130 -100 Z\"/>\n <circle cx=\"0\" cy=\"-2\" r=\"34\"/>\n <line x1=\"-92\" y1=\"-96\" x2=\"96\" y2=\"120\"/>";
|
|
44
|
+
readonly calendar: " <rect x=\"-140\" y=\"-118\" width=\"280\" height=\"248\" rx=\"24\"/>\n <line x1=\"-140\" y1=\"-52\" x2=\"140\" y2=\"-52\"/>\n <line x1=\"-78\" y1=\"-150\" x2=\"-78\" y2=\"-92\"/>\n <line x1=\"78\" y1=\"-150\" x2=\"78\" y2=\"-92\"/>\n <circle cx=\"-66\" cy=\"6\" r=\"11\" stroke-width=\"0\" fill=\"currentColor\"/>\n <circle cx=\"0\" cy=\"6\" r=\"11\" stroke-width=\"0\" fill=\"currentColor\"/>\n <circle cx=\"66\" cy=\"6\" r=\"11\" stroke-width=\"0\" fill=\"currentColor\"/>\n <circle cx=\"-66\" cy=\"72\" r=\"11\" stroke-width=\"0\" fill=\"currentColor\"/>\n <circle cx=\"0\" cy=\"72\" r=\"11\" stroke-width=\"0\" fill=\"currentColor\"/>";
|
|
45
|
+
readonly headphones: " <path d=\"M-140 30 V-10 A140 140 0 0 1 140 -10 V30\"/>\n <rect x=\"-160\" y=\"26\" width=\"58\" height=\"110\" rx=\"26\" fill=\"currentColor\" stroke-width=\"0\"/>\n <rect x=\"102\" y=\"26\" width=\"58\" height=\"110\" rx=\"26\" fill=\"currentColor\" stroke-width=\"0\"/>\n <rect x=\"-160\" y=\"26\" width=\"58\" height=\"110\" rx=\"26\"/>\n <rect x=\"102\" y=\"26\" width=\"58\" height=\"110\" rx=\"26\"/>";
|
|
46
|
+
readonly glasses: " <circle cx=\"-86\" cy=\"20\" r=\"68\"/>\n <circle cx=\"86\" cy=\"20\" r=\"68\"/>\n <path d=\"M-18 20 Q0 -2 18 20\"/>\n <line x1=\"-154\" y1=\"-12\" x2=\"-180\" y2=\"-44\"/>\n <line x1=\"154\" y1=\"-12\" x2=\"180\" y2=\"-44\"/>";
|
|
47
|
+
readonly finances: " <polyline points=\"-150,-150 -150,150 150,150\"/>\n <polyline points=\"-118,86 -50,-2 6,52 76,-62 132,-104\" fill=\"none\"/>\n <circle cx=\"-50\" cy=\"-2\" r=\"13\" stroke-width=\"0\" fill=\"currentColor\"/>\n <circle cx=\"76\" cy=\"-62\" r=\"13\" stroke-width=\"0\" fill=\"currentColor\"/>\n <circle cx=\"132\" cy=\"-104\" r=\"13\" stroke-width=\"0\" fill=\"currentColor\"/>";
|
|
48
|
+
readonly goals: " <circle cx=\"0\" cy=\"0\" r=\"150\"/>\n <circle cx=\"0\" cy=\"0\" r=\"92\"/>\n <circle cx=\"0\" cy=\"0\" r=\"34\"/>\n <circle cx=\"0\" cy=\"0\" r=\"9\" stroke-width=\"0\" fill=\"currentColor\"/>";
|
|
49
|
+
readonly health: " <path d=\"M0 150 C-180 18 -120 -120 0 -52 C120 -120 180 18 0 150 Z\"/>\n <polyline points=\"-150,-10 -64,-10 -28,-58 14,52 48,-10 150,-10\" fill=\"none\"/>";
|
|
50
|
+
readonly inbox: " <path d=\"M-150 -40 L-110 -130 H110 L150 -40 V120 A20 20 0 0 1 130 140 H-130 A20 20 0 0 1 -150 120 Z\"/>\n <path d=\"M-150 -40 H-44 L-10 24 H10 L44 -40 H150\"/>";
|
|
51
|
+
readonly messages: " <path d=\"M-150 -120 H150 A24 24 0 0 1 174 -96 V60 A24 24 0 0 1 150 84 H-30 L-100 150 V84 H-150 A24 24 0 0 1 -174 60 V-96 A24 24 0 0 1 -150 -120 Z\"/>\n <line x1=\"-100\" y1=\"-44\" x2=\"100\" y2=\"-44\"/>\n <line x1=\"-100\" y1=\"16\" x2=\"40\" y2=\"16\"/>";
|
|
52
|
+
readonly socialAlpha: " <polyline points=\"-150,80 -54,-22 6,38 150,-110\" fill=\"none\"/>\n <polyline points=\"92,-110 150,-110 150,-52\" fill=\"none\"/>\n <circle cx=\"-110\" cy=\"128\" r=\"26\"/>\n <circle cx=\"0\" cy=\"128\" r=\"26\"/>\n <circle cx=\"110\" cy=\"128\" r=\"26\"/>";
|
|
53
|
+
readonly todos: " <rect x=\"-150\" y=\"-150\" width=\"300\" height=\"300\" rx=\"36\"/>\n <polyline points=\"-92,-6 -36,52 92,-78\" fill=\"none\"/>";
|
|
54
|
+
readonly vectorBrowser: " <line x1=\"-110\" y1=\"-96\" x2=\"0\" y2=\"0\"/>\n <line x1=\"120\" y1=\"-110\" x2=\"0\" y2=\"0\"/>\n <line x1=\"-130\" y1=\"86\" x2=\"0\" y2=\"0\"/>\n <line x1=\"110\" y1=\"104\" x2=\"0\" y2=\"0\"/>\n <circle cx=\"0\" cy=\"0\" r=\"30\" fill=\"currentColor\" stroke-width=\"0\"/>\n <circle cx=\"0\" cy=\"0\" r=\"30\"/>\n <circle cx=\"-110\" cy=\"-96\" r=\"22\"/>\n <circle cx=\"120\" cy=\"-110\" r=\"22\"/>\n <circle cx=\"-130\" cy=\"86\" r=\"22\"/>\n <circle cx=\"110\" cy=\"104\" r=\"22\"/>";
|
|
55
|
+
};
|
|
56
|
+
export type ViewHeroIconKind = keyof typeof VIEW_HERO_ICONS;
|
|
57
|
+
/** Deterministically pick a non-blue accent hue for an arbitrary view key. */
|
|
58
|
+
export declare function hueForViewKey(key: string): number;
|
|
59
|
+
export interface ViewHeroSource {
|
|
60
|
+
id?: string;
|
|
61
|
+
label: string;
|
|
62
|
+
/** Lucide icon name declared by the view, used as a keyword hint. */
|
|
63
|
+
icon?: string;
|
|
64
|
+
tags?: readonly string[];
|
|
65
|
+
}
|
|
66
|
+
/** Pick the best-matching icon glyph for a view, defaulting to the grid. */
|
|
67
|
+
export declare function pickViewHeroIcon(source: ViewHeroSource): ViewHeroIconKind;
|
|
68
|
+
/**
|
|
69
|
+
* High-level entry point: render a branded hero SVG for a view, choosing the
|
|
70
|
+
* accent hue and icon glyph automatically from the view's metadata. Used by the
|
|
71
|
+
* agent's hero fallback and by view scaffolding/icon-regeneration so a generated
|
|
72
|
+
* hero looks the same everywhere.
|
|
73
|
+
*/
|
|
74
|
+
export declare function generateViewHeroSvgFor(source: ViewHeroSource): string;
|
|
75
|
+
//# sourceMappingURL=view-hero-art.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-hero-art.d.ts","sourceRoot":"","sources":["../src/view-hero-art.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA0DH,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,8EAA8E;IAC9E,GAAG,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,EAAE,EACF,GAAG,EACH,OAAO,EACP,KAAK,GACN,EAAE,kBAAkB,GAAG,MAAM,CAuE7B;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAsGlB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,eAAe,CAAC;AAmB5D,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGjD;AAyDD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,gBAAgB,CAazE;AAWD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAQrE"}
|