@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,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser and types for the `elizaos.app.permissions` manifest block declared
|
|
3
|
+
* by third-party apps in their `package.json`. Spec lives at
|
|
4
|
+
* `eliza/packages/docs/architecture/app-permissions-manifest.md` and is the
|
|
5
|
+
* source of truth — this module implements the validation rules described
|
|
6
|
+
* there. The manifest is advisory in this slice (no enforcement).
|
|
7
|
+
*
|
|
8
|
+
* Forward compatibility: only the recognised namespaces (`fs`, `net`) are
|
|
9
|
+
* validated and surfaced as typed slices. Unrecognised keys inside the
|
|
10
|
+
* `permissions` object are preserved verbatim under `raw` so a later
|
|
11
|
+
* Eliza version that recognises them can read them out of the persisted
|
|
12
|
+
* registry without re-parsing the source manifest.
|
|
13
|
+
*
|
|
14
|
+
* NOTE: this module is distinct from `./permissions.ts`, which describes
|
|
15
|
+
* OS-level system permissions (camera, microphone, accessibility). App
|
|
16
|
+
* permissions are an in-runtime sandbox concept declared by an app's
|
|
17
|
+
* package.json; system permissions are an OS concept granted to the
|
|
18
|
+
* Eliza binary itself.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MAX_PATTERN_LENGTH = 256;
|
|
21
|
+
/**
|
|
22
|
+
* Namespaces this Eliza version recognises in `elizaos.app.permissions`.
|
|
23
|
+
* The parser surfaces only these as typed slices; other namespace keys
|
|
24
|
+
* declared by an app are preserved verbatim under `raw` for forward
|
|
25
|
+
* compatibility but cannot be granted (a later Eliza version that
|
|
26
|
+
* recognises them adds them here).
|
|
27
|
+
*
|
|
28
|
+
* Source of truth for the granted-permission store's namespace
|
|
29
|
+
* intersection — see
|
|
30
|
+
* `eliza/packages/docs/architecture/app-permissions-granted-store.md`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const RECOGNISED_PERMISSION_NAMESPACES: readonly ["fs", "net"];
|
|
33
|
+
export type RecognisedPermissionNamespace = (typeof RECOGNISED_PERMISSION_NAMESPACES)[number];
|
|
34
|
+
/**
|
|
35
|
+
* Returns the recognised namespaces actually declared by a parsed
|
|
36
|
+
* manifest. This is what a consent UI should render as toggleable rows.
|
|
37
|
+
*/
|
|
38
|
+
export declare function recognisedNamespacesFor(manifest: AppPermissionsManifest): RecognisedPermissionNamespace[];
|
|
39
|
+
/**
|
|
40
|
+
* Returns the recognised namespaces actually declared by a raw
|
|
41
|
+
* `requestedPermissions` object as persisted on `AppRegistryEntry`.
|
|
42
|
+
* Equivalent to `recognisedNamespacesFor(parseAppPermissions(raw))`
|
|
43
|
+
* when the raw shape is well-formed, but tolerant of malformed
|
|
44
|
+
* persisted state (returns `[]` rather than throwing).
|
|
45
|
+
*/
|
|
46
|
+
export declare function recognisedNamespacesForRaw(raw: Record<string, unknown> | null | undefined): RecognisedPermissionNamespace[];
|
|
47
|
+
export interface FsPermissions {
|
|
48
|
+
read?: string[];
|
|
49
|
+
write?: string[];
|
|
50
|
+
}
|
|
51
|
+
export interface NetPermissions {
|
|
52
|
+
outbound?: string[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Source classification computed by the loader at register time. NOT
|
|
56
|
+
* declared by the app — the loader assigns this based on where the
|
|
57
|
+
* directory came from (in-tree first-party dir vs. external load).
|
|
58
|
+
*/
|
|
59
|
+
export type AppTrust = "first-party" | "external";
|
|
60
|
+
/**
|
|
61
|
+
* Execution-isolation mode an app can request in `elizaos.app.isolation`.
|
|
62
|
+
*
|
|
63
|
+
* - `"none"` (default): app runs in-process with the agent runtime, with
|
|
64
|
+
* full access. Fast path; intended for first-party and trusted apps.
|
|
65
|
+
* - `"worker"`: app runs in an isolated Bun worker. FS and network calls
|
|
66
|
+
* are gated against the app's declared + granted permissions at the
|
|
67
|
+
* bridge boundary. Phase 2 enforcement.
|
|
68
|
+
*
|
|
69
|
+
* Apps can request *more* isolation than the loader's policy ("worker"
|
|
70
|
+
* is always honoured if declared) but never *less* — Phase 3 may force
|
|
71
|
+
* `"worker"` for `trust: "external"` apps regardless of what they
|
|
72
|
+
* declared.
|
|
73
|
+
*/
|
|
74
|
+
export type AppIsolation = "none" | "worker";
|
|
75
|
+
/**
|
|
76
|
+
* Parses a raw `isolation` field from `elizaos.app.isolation` into the
|
|
77
|
+
* typed enum, defaulting to `"none"` when absent. Unknown values
|
|
78
|
+
* (including modes a later Eliza version might add) are
|
|
79
|
+
* coerced to `"none"` to keep the parser forward-compatible.
|
|
80
|
+
*/
|
|
81
|
+
export declare function parseAppIsolation(value: unknown): AppIsolation;
|
|
82
|
+
/**
|
|
83
|
+
* Merged view of declared + recognised + granted permission state for one
|
|
84
|
+
* app. Returned by the registry service and the
|
|
85
|
+
* `GET/PUT /api/apps/permissions/:slug` HTTP routes.
|
|
86
|
+
*/
|
|
87
|
+
export interface AppPermissionsView {
|
|
88
|
+
slug: string;
|
|
89
|
+
trust: AppTrust;
|
|
90
|
+
/** Effective execution isolation mode after loader policy is applied. */
|
|
91
|
+
isolation: AppIsolation;
|
|
92
|
+
/** Raw `elizaos.app.permissions` block from the app's package.json. */
|
|
93
|
+
requestedPermissions: Record<string, unknown> | null;
|
|
94
|
+
/** Intersection of declared namespaces with what this Eliza recognises. */
|
|
95
|
+
recognisedNamespaces: RecognisedPermissionNamespace[];
|
|
96
|
+
/** Subset of `recognisedNamespaces` the user / loader has granted. */
|
|
97
|
+
grantedNamespaces: RecognisedPermissionNamespace[];
|
|
98
|
+
/** ISO timestamp of the first grant, or null if never granted. */
|
|
99
|
+
grantedAt: string | null;
|
|
100
|
+
}
|
|
101
|
+
export interface AppPermissionsManifest {
|
|
102
|
+
/**
|
|
103
|
+
* Raw declared object as it appears under `elizaos.app.permissions`,
|
|
104
|
+
* or `null` when no `permissions` block was declared. This is what
|
|
105
|
+
* persists into `app-registry.json` and the audit log so later
|
|
106
|
+
* Eliza versions can read namespaces this version did not validate.
|
|
107
|
+
*/
|
|
108
|
+
raw: Record<string, unknown> | null;
|
|
109
|
+
fs?: FsPermissions;
|
|
110
|
+
net?: NetPermissions;
|
|
111
|
+
}
|
|
112
|
+
export interface ParseAppPermissionsError {
|
|
113
|
+
ok: false;
|
|
114
|
+
reason: string;
|
|
115
|
+
path: string;
|
|
116
|
+
}
|
|
117
|
+
export type ParseAppPermissionsResult = {
|
|
118
|
+
ok: true;
|
|
119
|
+
manifest: AppPermissionsManifest;
|
|
120
|
+
} | ParseAppPermissionsError;
|
|
121
|
+
export declare function parseAppPermissions(value: unknown): ParseAppPermissionsResult;
|
|
122
|
+
//# sourceMappingURL=app-permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-permissions.d.ts","sourceRoot":"","sources":["../../src/contracts/app-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,wBAAyB,CAAC;AACvE,MAAM,MAAM,6BAA6B,GACvC,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,sBAAsB,GAC/B,6BAA6B,EAAE,CAKjC;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAC9C,6BAA6B,EAAE,CAKjC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,UAAU,CAAC;AAElD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAG9D;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC;IAChB,yEAAyE;IACzE,SAAS,EAAE,YAAY,CAAC;IACxB,uEAAuE;IACvE,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrD,2EAA2E;IAC3E,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;IACtD,sEAAsE;IACtE,iBAAiB,EAAE,6BAA6B,EAAE,CAAC;IACnD,kEAAkE;IAClE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACpC,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,GAAG,CAAC,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,yBAAyB,GACjC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,sBAAsB,CAAA;CAAE,GAC9C,wBAAwB,CAAC;AAM7B,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,yBAAyB,CA2B7E"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser and types for the `elizaos.app.permissions` manifest block declared
|
|
3
|
+
* by third-party apps in their `package.json`. Spec lives at
|
|
4
|
+
* `eliza/packages/docs/architecture/app-permissions-manifest.md` and is the
|
|
5
|
+
* source of truth — this module implements the validation rules described
|
|
6
|
+
* there. The manifest is advisory in this slice (no enforcement).
|
|
7
|
+
*
|
|
8
|
+
* Forward compatibility: only the recognised namespaces (`fs`, `net`) are
|
|
9
|
+
* validated and surfaced as typed slices. Unrecognised keys inside the
|
|
10
|
+
* `permissions` object are preserved verbatim under `raw` so a later
|
|
11
|
+
* Eliza version that recognises them can read them out of the persisted
|
|
12
|
+
* registry without re-parsing the source manifest.
|
|
13
|
+
*
|
|
14
|
+
* NOTE: this module is distinct from `./permissions.ts`, which describes
|
|
15
|
+
* OS-level system permissions (camera, microphone, accessibility). App
|
|
16
|
+
* permissions are an in-runtime sandbox concept declared by an app's
|
|
17
|
+
* package.json; system permissions are an OS concept granted to the
|
|
18
|
+
* Eliza binary itself.
|
|
19
|
+
*/
|
|
20
|
+
export const MAX_PATTERN_LENGTH = 256;
|
|
21
|
+
/**
|
|
22
|
+
* Namespaces this Eliza version recognises in `elizaos.app.permissions`.
|
|
23
|
+
* The parser surfaces only these as typed slices; other namespace keys
|
|
24
|
+
* declared by an app are preserved verbatim under `raw` for forward
|
|
25
|
+
* compatibility but cannot be granted (a later Eliza version that
|
|
26
|
+
* recognises them adds them here).
|
|
27
|
+
*
|
|
28
|
+
* Source of truth for the granted-permission store's namespace
|
|
29
|
+
* intersection — see
|
|
30
|
+
* `eliza/packages/docs/architecture/app-permissions-granted-store.md`.
|
|
31
|
+
*/
|
|
32
|
+
export const RECOGNISED_PERMISSION_NAMESPACES = ["fs", "net"];
|
|
33
|
+
/**
|
|
34
|
+
* Returns the recognised namespaces actually declared by a parsed
|
|
35
|
+
* manifest. This is what a consent UI should render as toggleable rows.
|
|
36
|
+
*/
|
|
37
|
+
export function recognisedNamespacesFor(manifest) {
|
|
38
|
+
const out = [];
|
|
39
|
+
if (manifest.fs !== undefined)
|
|
40
|
+
out.push("fs");
|
|
41
|
+
if (manifest.net !== undefined)
|
|
42
|
+
out.push("net");
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns the recognised namespaces actually declared by a raw
|
|
47
|
+
* `requestedPermissions` object as persisted on `AppRegistryEntry`.
|
|
48
|
+
* Equivalent to `recognisedNamespacesFor(parseAppPermissions(raw))`
|
|
49
|
+
* when the raw shape is well-formed, but tolerant of malformed
|
|
50
|
+
* persisted state (returns `[]` rather than throwing).
|
|
51
|
+
*/
|
|
52
|
+
export function recognisedNamespacesForRaw(raw) {
|
|
53
|
+
if (!raw)
|
|
54
|
+
return [];
|
|
55
|
+
const result = parseAppPermissions(raw);
|
|
56
|
+
if (result.ok === false)
|
|
57
|
+
return [];
|
|
58
|
+
return recognisedNamespacesFor(result.manifest);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Parses a raw `isolation` field from `elizaos.app.isolation` into the
|
|
62
|
+
* typed enum, defaulting to `"none"` when absent. Unknown values
|
|
63
|
+
* (including modes a later Eliza version might add) are
|
|
64
|
+
* coerced to `"none"` to keep the parser forward-compatible.
|
|
65
|
+
*/
|
|
66
|
+
export function parseAppIsolation(value) {
|
|
67
|
+
if (value === "worker")
|
|
68
|
+
return "worker";
|
|
69
|
+
return "none";
|
|
70
|
+
}
|
|
71
|
+
export function parseAppPermissions(value) {
|
|
72
|
+
if (value === undefined || value === null) {
|
|
73
|
+
return { ok: true, manifest: { raw: null } };
|
|
74
|
+
}
|
|
75
|
+
if (typeof value !== "object" || Array.isArray(value)) {
|
|
76
|
+
return {
|
|
77
|
+
ok: false,
|
|
78
|
+
reason: "permissions must be an object",
|
|
79
|
+
path: "permissions",
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const raw = value;
|
|
83
|
+
const manifest = { raw };
|
|
84
|
+
if ("fs" in raw) {
|
|
85
|
+
const fsResult = parseFs(raw.fs, "permissions.fs");
|
|
86
|
+
if (fsResult.ok === false)
|
|
87
|
+
return fsResult;
|
|
88
|
+
if (fsResult.value !== null)
|
|
89
|
+
manifest.fs = fsResult.value;
|
|
90
|
+
}
|
|
91
|
+
if ("net" in raw) {
|
|
92
|
+
const netResult = parseNet(raw.net, "permissions.net");
|
|
93
|
+
if (netResult.ok === false)
|
|
94
|
+
return netResult;
|
|
95
|
+
if (netResult.value !== null)
|
|
96
|
+
manifest.net = netResult.value;
|
|
97
|
+
}
|
|
98
|
+
return { ok: true, manifest };
|
|
99
|
+
}
|
|
100
|
+
function parseFs(value, basePath) {
|
|
101
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
102
|
+
return { ok: false, reason: "fs must be an object", path: basePath };
|
|
103
|
+
}
|
|
104
|
+
const obj = value;
|
|
105
|
+
const out = {};
|
|
106
|
+
if ("read" in obj) {
|
|
107
|
+
const readResult = parseStringArray(obj.read, `${basePath}.read`, "fs.read must be an array of glob strings");
|
|
108
|
+
if (readResult.ok === false)
|
|
109
|
+
return readResult;
|
|
110
|
+
if (readResult.value !== null)
|
|
111
|
+
out.read = readResult.value;
|
|
112
|
+
}
|
|
113
|
+
if ("write" in obj) {
|
|
114
|
+
const writeResult = parseStringArray(obj.write, `${basePath}.write`, "fs.write must be an array of glob strings");
|
|
115
|
+
if (writeResult.ok === false)
|
|
116
|
+
return writeResult;
|
|
117
|
+
if (writeResult.value !== null)
|
|
118
|
+
out.write = writeResult.value;
|
|
119
|
+
}
|
|
120
|
+
return { ok: true, value: hasOwnKeys(out) ? out : null };
|
|
121
|
+
}
|
|
122
|
+
function parseNet(value, basePath) {
|
|
123
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
124
|
+
return { ok: false, reason: "net must be an object", path: basePath };
|
|
125
|
+
}
|
|
126
|
+
const obj = value;
|
|
127
|
+
const out = {};
|
|
128
|
+
if ("outbound" in obj) {
|
|
129
|
+
const outboundResult = parseStringArray(obj.outbound, `${basePath}.outbound`, "net.outbound must be an array of host pattern strings");
|
|
130
|
+
if (outboundResult.ok === false)
|
|
131
|
+
return outboundResult;
|
|
132
|
+
if (outboundResult.value !== null)
|
|
133
|
+
out.outbound = outboundResult.value;
|
|
134
|
+
}
|
|
135
|
+
return { ok: true, value: hasOwnKeys(out) ? out : null };
|
|
136
|
+
}
|
|
137
|
+
function parseStringArray(value, basePath, shapeError) {
|
|
138
|
+
if (value === undefined)
|
|
139
|
+
return { ok: true, value: null };
|
|
140
|
+
if (!Array.isArray(value)) {
|
|
141
|
+
return { ok: false, reason: shapeError, path: basePath };
|
|
142
|
+
}
|
|
143
|
+
for (let i = 0; i < value.length; i++) {
|
|
144
|
+
const item = value[i];
|
|
145
|
+
if (typeof item !== "string") {
|
|
146
|
+
return { ok: false, reason: shapeError, path: `${basePath}[${i}]` };
|
|
147
|
+
}
|
|
148
|
+
if (item.length > MAX_PATTERN_LENGTH) {
|
|
149
|
+
return {
|
|
150
|
+
ok: false,
|
|
151
|
+
reason: `${basePath}[${i}] exceeds ${MAX_PATTERN_LENGTH} characters`,
|
|
152
|
+
path: `${basePath}[${i}]`,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return { ok: true, value: value };
|
|
157
|
+
}
|
|
158
|
+
function hasOwnKeys(obj) {
|
|
159
|
+
for (const _ in obj)
|
|
160
|
+
return true;
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=app-permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-permissions.js","sourceRoot":"","sources":["../../src/contracts/app-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU,CAAC;AAIvE;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,QAAgC;IAEhC,MAAM,GAAG,GAAoC,EAAE,CAAC;IAChD,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS;QAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,QAAQ,CAAC,GAAG,KAAK,SAAS;QAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,GAA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,SAAS;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC3D,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC;QACtE,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;YACrC,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,GAAG,QAAQ,IAAI,CAAC,aAAa,kBAAkB,aAAa;gBACpE,IAAI,EAAE,GAAG,QAAQ,IAAI,CAAC,GAAG;aAC1B,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAiB,EAAE,CAAC;AAChD,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,KAAK,MAAM,CAAC,IAAI,GAAG;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for the apps-favorites HTTP routes — the per-user
|
|
3
|
+
* favorited-apps store. Fourth migration in the typed-routes
|
|
4
|
+
* initiative; same template as the rest.
|
|
5
|
+
*
|
|
6
|
+
* Routes covered:
|
|
7
|
+
* GET /api/apps/favorites
|
|
8
|
+
* 200: { favoriteApps: string[] } (no body to validate)
|
|
9
|
+
* PUT /api/apps/favorites
|
|
10
|
+
* body: { appName: string, isFavorite: boolean }
|
|
11
|
+
* 200: { favoriteApps: string[] }
|
|
12
|
+
* POST /api/apps/favorites/replace
|
|
13
|
+
* body: { favoriteAppNames: string[] }
|
|
14
|
+
* 200: { favoriteApps: string[] }
|
|
15
|
+
*
|
|
16
|
+
* Server-side, all three routes already pipe their writes through
|
|
17
|
+
* `sanitizeFavoriteAppNames(...)` — the schema's job is to reject
|
|
18
|
+
* malformed inputs at the wire boundary; sanitization stays as a
|
|
19
|
+
* second pass on top of validated data.
|
|
20
|
+
*/
|
|
21
|
+
import z from "zod";
|
|
22
|
+
export declare const PutFavoriteAppRequestSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
23
|
+
appName: z.ZodString;
|
|
24
|
+
isFavorite: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
26
|
+
appName: string;
|
|
27
|
+
isFavorite: boolean;
|
|
28
|
+
}, {
|
|
29
|
+
appName: string;
|
|
30
|
+
isFavorite: boolean;
|
|
31
|
+
}>>, z.ZodObject<{
|
|
32
|
+
appName: z.ZodString;
|
|
33
|
+
isFavorite: z.ZodBoolean;
|
|
34
|
+
}, z.core.$strict>>;
|
|
35
|
+
export declare const PostReplaceFavoritesRequestSchema: z.ZodObject<{
|
|
36
|
+
favoriteAppNames: z.ZodArray<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export declare const FavoritesResponseSchema: z.ZodObject<{
|
|
39
|
+
favoriteApps: z.ZodArray<z.ZodString>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
export type PutFavoriteAppRequest = z.infer<typeof PutFavoriteAppRequestSchema>;
|
|
42
|
+
export type PostReplaceFavoritesRequest = z.infer<typeof PostReplaceFavoritesRequestSchema>;
|
|
43
|
+
export type FavoritesResponse = z.infer<typeof FavoritesResponseSchema>;
|
|
44
|
+
//# sourceMappingURL=apps-favorites-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps-favorites-routes.d.ts","sourceRoot":"","sources":["../../src/contracts/apps-favorites-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;mBAiBrC,CAAC;AAEJ,eAAO,MAAM,iCAAiC;;kBAInC,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;kBAIzB,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for the apps-favorites HTTP routes — the per-user
|
|
3
|
+
* favorited-apps store. Fourth migration in the typed-routes
|
|
4
|
+
* initiative; same template as the rest.
|
|
5
|
+
*
|
|
6
|
+
* Routes covered:
|
|
7
|
+
* GET /api/apps/favorites
|
|
8
|
+
* 200: { favoriteApps: string[] } (no body to validate)
|
|
9
|
+
* PUT /api/apps/favorites
|
|
10
|
+
* body: { appName: string, isFavorite: boolean }
|
|
11
|
+
* 200: { favoriteApps: string[] }
|
|
12
|
+
* POST /api/apps/favorites/replace
|
|
13
|
+
* body: { favoriteAppNames: string[] }
|
|
14
|
+
* 200: { favoriteApps: string[] }
|
|
15
|
+
*
|
|
16
|
+
* Server-side, all three routes already pipe their writes through
|
|
17
|
+
* `sanitizeFavoriteAppNames(...)` — the schema's job is to reject
|
|
18
|
+
* malformed inputs at the wire boundary; sanitization stays as a
|
|
19
|
+
* second pass on top of validated data.
|
|
20
|
+
*/
|
|
21
|
+
import z from "zod";
|
|
22
|
+
export const PutFavoriteAppRequestSchema = z
|
|
23
|
+
.object({
|
|
24
|
+
appName: z.string().min(1, "appName is required"),
|
|
25
|
+
isFavorite: z.boolean(),
|
|
26
|
+
})
|
|
27
|
+
.strict()
|
|
28
|
+
.transform((value) => ({
|
|
29
|
+
appName: value.appName.trim(),
|
|
30
|
+
isFavorite: value.isFavorite,
|
|
31
|
+
}))
|
|
32
|
+
.pipe(z
|
|
33
|
+
.object({
|
|
34
|
+
appName: z.string().min(1, "appName is required"),
|
|
35
|
+
isFavorite: z.boolean(),
|
|
36
|
+
})
|
|
37
|
+
.strict());
|
|
38
|
+
export const PostReplaceFavoritesRequestSchema = z
|
|
39
|
+
.object({
|
|
40
|
+
favoriteAppNames: z.array(z.string()),
|
|
41
|
+
})
|
|
42
|
+
.strict();
|
|
43
|
+
export const FavoritesResponseSchema = z
|
|
44
|
+
.object({
|
|
45
|
+
favoriteApps: z.array(z.string()),
|
|
46
|
+
})
|
|
47
|
+
.strict();
|
|
48
|
+
//# sourceMappingURL=apps-favorites-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps-favorites-routes.js","sourceRoot":"","sources":["../../src/contracts/apps-favorites-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,qBAAqB,CAAC;IACjD,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC;KACD,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE;IAC7B,UAAU,EAAE,KAAK,CAAC,UAAU;CAC7B,CAAC,CAAC;KACF,IAAI,CACH,CAAC;KACE,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,qBAAqB,CAAC;IACjD,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC;KACD,MAAM,EAAE,CACZ,CAAC;AAEJ,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC/C,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAClC,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for the apps-lifecycle HTTP routes
|
|
3
|
+
* (launch / install / stop / relaunch / create / overlay-presence /
|
|
4
|
+
* refresh). Same template as the rest: schema in shared, safeParse on
|
|
5
|
+
* server, infer types on client.
|
|
6
|
+
*
|
|
7
|
+
* Routes covered:
|
|
8
|
+
* POST /api/apps/launch body: { name } → AppLaunchResult
|
|
9
|
+
* POST /api/apps/install body: { name, version? } → InstallAppResponse
|
|
10
|
+
* POST /api/apps/stop body: { name?, runId? } → AppStopResult
|
|
11
|
+
* (at least one of name/runId required)
|
|
12
|
+
* POST /api/apps/relaunch body: { name, runId?, verify? } → AppLaunchResult
|
|
13
|
+
* POST /api/apps/create body: { intent, editTarget? } → CreateAppResponse
|
|
14
|
+
* POST /api/apps/overlay-presence body: { appName?: string|null } → OverlayPresenceResponse
|
|
15
|
+
* POST /api/apps/refresh (no body) → RefreshAppsResponse
|
|
16
|
+
*
|
|
17
|
+
* Response shapes for the routes that delegate to AppLaunchResult or
|
|
18
|
+
* AppStopResult (launch, stop, relaunch) are still defined by the
|
|
19
|
+
* TypeScript interfaces in `./apps.ts` — those tree types have not
|
|
20
|
+
* been migrated to zod yet and are out of scope for this module.
|
|
21
|
+
*/
|
|
22
|
+
import z from "zod";
|
|
23
|
+
export declare const PostLaunchAppRequestSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
26
|
+
name: string;
|
|
27
|
+
}, {
|
|
28
|
+
name: string;
|
|
29
|
+
}>>, z.ZodObject<{
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
export declare const PostInstallAppRequestSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
version: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
36
|
+
version?: string | undefined;
|
|
37
|
+
name: string;
|
|
38
|
+
}, {
|
|
39
|
+
name: string;
|
|
40
|
+
version?: string | undefined;
|
|
41
|
+
}>>, z.ZodObject<{
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
version: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strict>>;
|
|
45
|
+
/**
|
|
46
|
+
* /stop accepts `{ name }`, `{ runId }`, or both — but at least one
|
|
47
|
+
* must be a non-empty string. The `.refine()` does the cross-field
|
|
48
|
+
* check the route used to do by hand.
|
|
49
|
+
*/
|
|
50
|
+
export declare const PostStopAppRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
51
|
+
name: z.ZodOptional<z.ZodString>;
|
|
52
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
54
|
+
runId?: string | undefined;
|
|
55
|
+
name?: string | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
name?: string | undefined;
|
|
58
|
+
runId?: string | undefined;
|
|
59
|
+
}>>;
|
|
60
|
+
/**
|
|
61
|
+
* /relaunch accepts the launch fields plus optional `runId` (used to
|
|
62
|
+
* stop a specific run before relaunching, instead of the broader
|
|
63
|
+
* "stop everything matching `name`" behaviour) and a `verify`
|
|
64
|
+
* boolean that triggers post-launch verification. The route already
|
|
65
|
+
* required `name` even when `runId` was supplied — so no
|
|
66
|
+
* cross-field refine like /stop has.
|
|
67
|
+
*/
|
|
68
|
+
export declare const PostRelaunchAppRequestSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
71
|
+
verify: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
73
|
+
verify?: boolean | undefined;
|
|
74
|
+
runId?: string | undefined;
|
|
75
|
+
name: string;
|
|
76
|
+
}, {
|
|
77
|
+
name: string;
|
|
78
|
+
runId?: string | undefined;
|
|
79
|
+
verify?: boolean | undefined;
|
|
80
|
+
}>>, z.ZodObject<{
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
83
|
+
verify: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
}, z.core.$strict>>;
|
|
85
|
+
/**
|
|
86
|
+
* /create maps onto the unified APP action — the `intent` is the
|
|
87
|
+
* natural-language prompt the orchestrator hands to the spawned coding
|
|
88
|
+
* sub-agent, and `editTarget` (when present) names an existing app to
|
|
89
|
+
* edit instead of scaffolding a new one. The handler used to require a
|
|
90
|
+
* non-empty trimmed intent by hand; the schema now does that, plus
|
|
91
|
+
* trims `editTarget` so empty strings round-trip back to "missing".
|
|
92
|
+
*/
|
|
93
|
+
export declare const PostCreateAppRequestSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
94
|
+
intent: z.ZodString;
|
|
95
|
+
editTarget: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
97
|
+
editTarget?: string | undefined;
|
|
98
|
+
intent: string;
|
|
99
|
+
}, {
|
|
100
|
+
intent: string;
|
|
101
|
+
editTarget?: string | undefined;
|
|
102
|
+
}>>, z.ZodObject<{
|
|
103
|
+
intent: z.ZodString;
|
|
104
|
+
editTarget: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, z.core.$strict>>;
|
|
106
|
+
/**
|
|
107
|
+
* /overlay-presence is the UI's "which app is currently visible" ping.
|
|
108
|
+
* The route accepts a string, an explicit `null`, or omission — all of
|
|
109
|
+
* the latter two clear presence. Empty/whitespace strings collapse to
|
|
110
|
+
* null too, matching the handler's prior `trim().length > 0 ? trim : null`
|
|
111
|
+
* normalisation.
|
|
112
|
+
*/
|
|
113
|
+
export declare const PostOverlayPresenceRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
114
|
+
appName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
|
|
115
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
116
|
+
appName: string | null;
|
|
117
|
+
}, {
|
|
118
|
+
appName?: string | null | undefined;
|
|
119
|
+
}>>;
|
|
120
|
+
/** /overlay-presence reply: `{ ok: true, appName: string | null }`. */
|
|
121
|
+
export declare const PostOverlayPresenceResponseSchema: z.ZodObject<{
|
|
122
|
+
ok: z.ZodLiteral<true>;
|
|
123
|
+
appName: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
124
|
+
}, z.core.$strict>;
|
|
125
|
+
/** /create reply from the unified APP action. */
|
|
126
|
+
export declare const PostCreateAppResponseSchema: z.ZodObject<{
|
|
127
|
+
success: z.ZodBoolean;
|
|
128
|
+
text: z.ZodString;
|
|
129
|
+
messages: z.ZodArray<z.ZodString>;
|
|
130
|
+
data: z.ZodNullable<z.ZodUnknown>;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
/** /refresh reply — registry refresh count. */
|
|
133
|
+
export declare const PostRefreshAppsResponseSchema: z.ZodObject<{
|
|
134
|
+
ok: z.ZodLiteral<true>;
|
|
135
|
+
count: z.ZodNumber;
|
|
136
|
+
}, z.core.$strict>;
|
|
137
|
+
/**
|
|
138
|
+
* Component schema: install-progress event the installer streams as it
|
|
139
|
+
* walks through phases (download, extract, register, …). Mirrors the
|
|
140
|
+
* `InstallProgressLike` interface in
|
|
141
|
+
* `packages/agent/src/services/plugin-manager-types.ts`.
|
|
142
|
+
*/
|
|
143
|
+
export declare const InstallProgressEventSchema: z.ZodObject<{
|
|
144
|
+
phase: z.ZodString;
|
|
145
|
+
message: z.ZodString;
|
|
146
|
+
pluginName: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
/**
|
|
149
|
+
* /install reply, discriminated on `success`:
|
|
150
|
+
* - success: full install metadata + replayed progress events
|
|
151
|
+
* - failure: error + the progress events that were captured before
|
|
152
|
+
* the failure
|
|
153
|
+
*/
|
|
154
|
+
export declare const PostInstallAppResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
155
|
+
success: z.ZodLiteral<true>;
|
|
156
|
+
pluginName: z.ZodString;
|
|
157
|
+
version: z.ZodString;
|
|
158
|
+
installPath: z.ZodString;
|
|
159
|
+
requiresRestart: z.ZodBoolean;
|
|
160
|
+
progress: z.ZodArray<z.ZodObject<{
|
|
161
|
+
phase: z.ZodString;
|
|
162
|
+
message: z.ZodString;
|
|
163
|
+
pluginName: z.ZodOptional<z.ZodString>;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
166
|
+
success: z.ZodLiteral<false>;
|
|
167
|
+
error: z.ZodOptional<z.ZodString>;
|
|
168
|
+
progress: z.ZodArray<z.ZodObject<{
|
|
169
|
+
phase: z.ZodString;
|
|
170
|
+
message: z.ZodString;
|
|
171
|
+
pluginName: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.core.$strict>>;
|
|
173
|
+
}, z.core.$strict>], "success">;
|
|
174
|
+
export type PostLaunchAppRequest = z.infer<typeof PostLaunchAppRequestSchema>;
|
|
175
|
+
export type PostInstallAppRequest = z.infer<typeof PostInstallAppRequestSchema>;
|
|
176
|
+
export type PostStopAppRequest = z.infer<typeof PostStopAppRequestSchema>;
|
|
177
|
+
export type PostRelaunchAppRequest = z.infer<typeof PostRelaunchAppRequestSchema>;
|
|
178
|
+
export type PostCreateAppRequest = z.infer<typeof PostCreateAppRequestSchema>;
|
|
179
|
+
export type PostOverlayPresenceRequest = z.infer<typeof PostOverlayPresenceRequestSchema>;
|
|
180
|
+
export type PostOverlayPresenceResponse = z.infer<typeof PostOverlayPresenceResponseSchema>;
|
|
181
|
+
export type PostCreateAppResponse = z.infer<typeof PostCreateAppResponseSchema>;
|
|
182
|
+
export type PostRefreshAppsResponse = z.infer<typeof PostRefreshAppsResponseSchema>;
|
|
183
|
+
export type InstallProgressEvent = z.infer<typeof InstallProgressEventSchema>;
|
|
184
|
+
export type PostInstallAppResponse = z.infer<typeof PostInstallAppResponseSchema>;
|
|
185
|
+
//# sourceMappingURL=apps-lifecycle-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps-lifecycle-routes.d.ts","sourceRoot":"","sources":["../../src/contracts/apps-lifecycle-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,CAAC,MAAM,KAAK,CAAC;AAepB,eAAO,MAAM,0BAA0B;;;;;;;;mBAEmC,CAAC;AAE3E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;mBAkBrC,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;GAehC,CAAC;AAEN;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;mBAoBtC,CAAC;AAEJ;;;;;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