@vibesdotdev/config 0.0.1
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/README.md +85 -0
- package/SPEC.md +71 -0
- package/dist/adapters/cli/flags.d.ts +75 -0
- package/dist/adapters/cli/flags.d.ts.map +1 -0
- package/dist/adapters/cli/flags.js +221 -0
- package/dist/adapters/cli/flags.js.map +1 -0
- package/dist/adapters/cli/index.d.ts +12 -0
- package/dist/adapters/cli/index.d.ts.map +1 -0
- package/dist/adapters/cli/index.js +9 -0
- package/dist/adapters/cli/index.js.map +1 -0
- package/dist/adapters/cli/mappings.d.ts +17 -0
- package/dist/adapters/cli/mappings.d.ts.map +1 -0
- package/dist/adapters/cli/mappings.js +32 -0
- package/dist/adapters/cli/mappings.js.map +1 -0
- package/dist/adapters/cli/prompts.d.ts +28 -0
- package/dist/adapters/cli/prompts.d.ts.map +1 -0
- package/dist/adapters/cli/prompts.js +55 -0
- package/dist/adapters/cli/prompts.js.map +1 -0
- package/dist/adapters/cli/schemas/flags.schema.d.ts +8 -0
- package/dist/adapters/cli/schemas/flags.schema.d.ts.map +1 -0
- package/dist/adapters/cli/schemas/flags.schema.js +2 -0
- package/dist/adapters/cli/schemas/flags.schema.js.map +1 -0
- package/dist/adapters/cli/schemas/mappings.schema.d.ts +2 -0
- package/dist/adapters/cli/schemas/mappings.schema.d.ts.map +1 -0
- package/dist/adapters/cli/schemas/mappings.schema.js +2 -0
- package/dist/adapters/cli/schemas/mappings.schema.js.map +1 -0
- package/dist/adapters/cli/schemas/prompts.schema.d.ts +5 -0
- package/dist/adapters/cli/schemas/prompts.schema.d.ts.map +1 -0
- package/dist/adapters/cli/schemas/prompts.schema.js +2 -0
- package/dist/adapters/cli/schemas/prompts.schema.js.map +1 -0
- package/dist/adapters/cli/schemas/wizard.schema.d.ts +19 -0
- package/dist/adapters/cli/schemas/wizard.schema.d.ts.map +1 -0
- package/dist/adapters/cli/schemas/wizard.schema.js +2 -0
- package/dist/adapters/cli/schemas/wizard.schema.js.map +1 -0
- package/dist/adapters/cli/wizard.d.ts +33 -0
- package/dist/adapters/cli/wizard.d.ts.map +1 -0
- package/dist/adapters/cli/wizard.js +77 -0
- package/dist/adapters/cli/wizard.js.map +1 -0
- package/dist/browser/index.d.ts +7 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +4 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/cli/settings.descriptor.d.ts +9 -0
- package/dist/cli/settings.descriptor.d.ts.map +1 -0
- package/dist/cli/settings.descriptor.js +18 -0
- package/dist/cli/settings.descriptor.js.map +1 -0
- package/dist/cli/types.d.ts +57 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +9 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/client/index.d.ts +19 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +145 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/storage.d.ts +48 -0
- package/dist/client/storage.d.ts.map +1 -0
- package/dist/client/storage.js +46 -0
- package/dist/client/storage.js.map +1 -0
- package/dist/collection/collection.d.ts +46 -0
- package/dist/collection/collection.d.ts.map +1 -0
- package/dist/collection/collection.js +93 -0
- package/dist/collection/collection.js.map +1 -0
- package/dist/collection/index.d.ts +6 -0
- package/dist/collection/index.d.ts.map +1 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/common/index.d.ts +7 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +4 -0
- package/dist/common/index.js.map +1 -0
- package/dist/config.context.descriptor.d.ts +21 -0
- package/dist/config.context.descriptor.d.ts.map +1 -0
- package/dist/config.context.descriptor.js +11 -0
- package/dist/config.context.descriptor.js.map +1 -0
- package/dist/config.plugin.d.ts +15 -0
- package/dist/config.plugin.d.ts.map +1 -0
- package/dist/config.plugin.js +166 -0
- package/dist/config.plugin.js.map +1 -0
- package/dist/crud/base-types.d.ts +10 -0
- package/dist/crud/base-types.d.ts.map +1 -0
- package/dist/crud/base-types.js +10 -0
- package/dist/crud/base-types.js.map +1 -0
- package/dist/crud/index.d.ts +4 -0
- package/dist/crud/index.d.ts.map +1 -0
- package/dist/crud/index.js +2 -0
- package/dist/crud/index.js.map +1 -0
- package/dist/crud/schemas/base-types.schema.d.ts +19 -0
- package/dist/crud/schemas/base-types.schema.d.ts.map +1 -0
- package/dist/crud/schemas/base-types.schema.js +2 -0
- package/dist/crud/schemas/base-types.schema.js.map +1 -0
- package/dist/crud/schemas/shared.schema.d.ts +13 -0
- package/dist/crud/schemas/shared.schema.d.ts.map +1 -0
- package/dist/crud/schemas/shared.schema.js +2 -0
- package/dist/crud/schemas/shared.schema.js.map +1 -0
- package/dist/crud/shared.d.ts +8 -0
- package/dist/crud/shared.d.ts.map +1 -0
- package/dist/crud/shared.js +8 -0
- package/dist/crud/shared.js.map +1 -0
- package/dist/crud/types.d.ts +250 -0
- package/dist/crud/types.d.ts.map +1 -0
- package/dist/crud/types.js +22 -0
- package/dist/crud/types.js.map +1 -0
- package/dist/docs/environment.docs.descriptor.d.ts +4 -0
- package/dist/docs/environment.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/environment.docs.descriptor.js +383 -0
- package/dist/docs/environment.docs.descriptor.js.map +1 -0
- package/dist/docs/manifests.docs.descriptor.d.ts +4 -0
- package/dist/docs/manifests.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/manifests.docs.descriptor.js +503 -0
- package/dist/docs/manifests.docs.descriptor.js.map +1 -0
- package/dist/docs/validation.docs.descriptor.d.ts +4 -0
- package/dist/docs/validation.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/validation.docs.descriptor.js +441 -0
- package/dist/docs/validation.docs.descriptor.js.map +1 -0
- package/dist/doctor.d.ts +42 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +119 -0
- package/dist/doctor.js.map +1 -0
- package/dist/env.d.ts +28 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +75 -0
- package/dist/env.js.map +1 -0
- package/dist/env.runtime.d.ts +19 -0
- package/dist/env.runtime.d.ts.map +1 -0
- package/dist/env.runtime.js +37 -0
- package/dist/env.runtime.js.map +1 -0
- package/dist/environment/current.d.ts +32 -0
- package/dist/environment/current.d.ts.map +1 -0
- package/dist/environment/current.js +91 -0
- package/dist/environment/current.js.map +1 -0
- package/dist/environment/environment.config.descriptor.d.ts +11 -0
- package/dist/environment/environment.config.descriptor.d.ts.map +1 -0
- package/dist/environment/environment.config.descriptor.js +51 -0
- package/dist/environment/environment.config.descriptor.js.map +1 -0
- package/dist/environment/environment.config.schema.d.ts +47 -0
- package/dist/environment/environment.config.schema.d.ts.map +1 -0
- package/dist/environment/environment.config.schema.js +19 -0
- package/dist/environment/environment.config.schema.js.map +1 -0
- package/dist/environment/environment.local.descriptor.d.ts +11 -0
- package/dist/environment/environment.local.descriptor.d.ts.map +1 -0
- package/dist/environment/environment.local.descriptor.js +42 -0
- package/dist/environment/environment.local.descriptor.js.map +1 -0
- package/dist/environment/environment.plugin.d.ts +9 -0
- package/dist/environment/environment.plugin.d.ts.map +1 -0
- package/dist/environment/environment.plugin.js +27 -0
- package/dist/environment/environment.plugin.js.map +1 -0
- package/dist/environment/environment.production.descriptor.d.ts +10 -0
- package/dist/environment/environment.production.descriptor.d.ts.map +1 -0
- package/dist/environment/environment.production.descriptor.js +37 -0
- package/dist/environment/environment.production.descriptor.js.map +1 -0
- package/dist/environment/environment.staging.descriptor.d.ts +11 -0
- package/dist/environment/environment.staging.descriptor.d.ts.map +1 -0
- package/dist/environment/environment.staging.descriptor.js +22 -0
- package/dist/environment/environment.staging.descriptor.js.map +1 -0
- package/dist/environment/index.d.ts +8 -0
- package/dist/environment/index.d.ts.map +1 -0
- package/dist/environment/index.js +9 -0
- package/dist/environment/index.js.map +1 -0
- package/dist/environment/kinds/environment.default.d.ts +23 -0
- package/dist/environment/kinds/environment.default.d.ts.map +1 -0
- package/dist/environment/kinds/environment.default.js +49 -0
- package/dist/environment/kinds/environment.default.js.map +1 -0
- package/dist/environment/kinds/environment.interface.d.ts +7 -0
- package/dist/environment/kinds/environment.interface.d.ts.map +1 -0
- package/dist/environment/kinds/environment.interface.js +7 -0
- package/dist/environment/kinds/environment.interface.js.map +1 -0
- package/dist/environment/kinds/environment.kind.d.ts +10 -0
- package/dist/environment/kinds/environment.kind.d.ts.map +1 -0
- package/dist/environment/kinds/environment.kind.js +57 -0
- package/dist/environment/kinds/environment.kind.js.map +1 -0
- package/dist/environment/kinds/environment.schema.d.ts +34 -0
- package/dist/environment/kinds/environment.schema.d.ts.map +1 -0
- package/dist/environment/kinds/environment.schema.js +46 -0
- package/dist/environment/kinds/environment.schema.js.map +1 -0
- package/dist/environment/kinds/index.d.ts +8 -0
- package/dist/environment/kinds/index.d.ts.map +1 -0
- package/dist/environment/kinds/index.js +7 -0
- package/dist/environment/kinds/index.js.map +1 -0
- package/dist/environment/kinds/schemas/environment.interface.schema.d.ts +11 -0
- package/dist/environment/kinds/schemas/environment.interface.schema.d.ts.map +1 -0
- package/dist/environment/kinds/schemas/environment.interface.schema.js +2 -0
- package/dist/environment/kinds/schemas/environment.interface.schema.js.map +1 -0
- package/dist/environment/kinds/schemas/environment.schema.d.ts +30 -0
- package/dist/environment/kinds/schemas/environment.schema.d.ts.map +1 -0
- package/dist/environment/kinds/schemas/environment.schema.js +2 -0
- package/dist/environment/kinds/schemas/environment.schema.js.map +1 -0
- package/dist/environment/schemas/current.schema.d.ts +20 -0
- package/dist/environment/schemas/current.schema.d.ts.map +1 -0
- package/dist/environment/schemas/current.schema.js +2 -0
- package/dist/environment/schemas/current.schema.js.map +1 -0
- package/dist/environment/schemas/environment.config.schema.d.ts +4 -0
- package/dist/environment/schemas/environment.config.schema.d.ts.map +1 -0
- package/dist/environment/schemas/environment.config.schema.js +2 -0
- package/dist/environment/schemas/environment.config.schema.js.map +1 -0
- package/dist/extensions/index.d.ts +8 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +8 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/registry.d.ts +41 -0
- package/dist/extensions/registry.d.ts.map +1 -0
- package/dist/extensions/registry.js +142 -0
- package/dist/extensions/registry.js.map +1 -0
- package/dist/extensions/types.d.ts +101 -0
- package/dist/extensions/types.d.ts.map +1 -0
- package/dist/extensions/types.js +8 -0
- package/dist/extensions/types.js.map +1 -0
- package/dist/form/core/field-resolver.d.ts +42 -0
- package/dist/form/core/field-resolver.d.ts.map +1 -0
- package/dist/form/core/field-resolver.js +293 -0
- package/dist/form/core/field-resolver.js.map +1 -0
- package/dist/form/core/groups.d.ts +20 -0
- package/dist/form/core/groups.d.ts.map +1 -0
- package/dist/form/core/groups.js +69 -0
- package/dist/form/core/groups.js.map +1 -0
- package/dist/form/core/index.d.ts +8 -0
- package/dist/form/core/index.d.ts.map +1 -0
- package/dist/form/core/index.js +6 -0
- package/dist/form/core/index.js.map +1 -0
- package/dist/form/core/nested-utils.d.ts +40 -0
- package/dist/form/core/nested-utils.d.ts.map +1 -0
- package/dist/form/core/nested-utils.js +98 -0
- package/dist/form/core/nested-utils.js.map +1 -0
- package/dist/form/core/schemas/validation.schema.d.ts +9 -0
- package/dist/form/core/schemas/validation.schema.d.ts.map +1 -0
- package/dist/form/core/schemas/validation.schema.js +2 -0
- package/dist/form/core/schemas/validation.schema.js.map +1 -0
- package/dist/form/core/types.d.ts +103 -0
- package/dist/form/core/types.d.ts.map +1 -0
- package/dist/form/core/types.js +2 -0
- package/dist/form/core/types.js.map +1 -0
- package/dist/form/core/validation.d.ts +23 -0
- package/dist/form/core/validation.d.ts.map +1 -0
- package/dist/form/core/validation.js +103 -0
- package/dist/form/core/validation.js.map +1 -0
- package/dist/form/core/visibility.d.ts +37 -0
- package/dist/form/core/visibility.d.ts.map +1 -0
- package/dist/form/core/visibility.js +128 -0
- package/dist/form/core/visibility.js.map +1 -0
- package/dist/form/index.d.ts +8 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/index.js +2 -0
- package/dist/form/index.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/loader/cli/index.d.ts +61 -0
- package/dist/loader/cli/index.d.ts.map +1 -0
- package/dist/loader/cli/index.js +263 -0
- package/dist/loader/cli/index.js.map +1 -0
- package/dist/loader/cli/loaders.d.ts +13 -0
- package/dist/loader/cli/loaders.d.ts.map +1 -0
- package/dist/loader/cli/loaders.js +132 -0
- package/dist/loader/cli/loaders.js.map +1 -0
- package/dist/loader/cli/types.d.ts +152 -0
- package/dist/loader/cli/types.d.ts.map +1 -0
- package/dist/loader/cli/types.js +5 -0
- package/dist/loader/cli/types.js.map +1 -0
- package/dist/loader/cli/utils.d.ts +53 -0
- package/dist/loader/cli/utils.d.ts.map +1 -0
- package/dist/loader/cli/utils.js +198 -0
- package/dist/loader/cli/utils.js.map +1 -0
- package/dist/loader/client.d.ts +18 -0
- package/dist/loader/client.d.ts.map +1 -0
- package/dist/loader/client.js +109 -0
- package/dist/loader/client.js.map +1 -0
- package/dist/loader/discovery.d.ts +48 -0
- package/dist/loader/discovery.d.ts.map +1 -0
- package/dist/loader/discovery.js +253 -0
- package/dist/loader/discovery.js.map +1 -0
- package/dist/loader/file-loader.d.ts +17 -0
- package/dist/loader/file-loader.d.ts.map +1 -0
- package/dist/loader/file-loader.js +237 -0
- package/dist/loader/file-loader.js.map +1 -0
- package/dist/loader/index.d.ts +9 -0
- package/dist/loader/index.d.ts.map +1 -0
- package/dist/loader/index.js +8 -0
- package/dist/loader/index.js.map +1 -0
- package/dist/loader/index.server.d.ts +66 -0
- package/dist/loader/index.server.d.ts.map +1 -0
- package/dist/loader/index.server.js +256 -0
- package/dist/loader/index.server.js.map +1 -0
- package/dist/loader/merge.d.ts +88 -0
- package/dist/loader/merge.d.ts.map +1 -0
- package/dist/loader/merge.js +301 -0
- package/dist/loader/merge.js.map +1 -0
- package/dist/loader/schemas/merge.schema.d.ts +8 -0
- package/dist/loader/schemas/merge.schema.d.ts.map +1 -0
- package/dist/loader/schemas/merge.schema.js +2 -0
- package/dist/loader/schemas/merge.schema.js.map +1 -0
- package/dist/loader/schemas/validation.schema.d.ts +17 -0
- package/dist/loader/schemas/validation.schema.d.ts.map +1 -0
- package/dist/loader/schemas/validation.schema.js +2 -0
- package/dist/loader/schemas/validation.schema.js.map +1 -0
- package/dist/loader/server.d.ts +3 -0
- package/dist/loader/server.d.ts.map +1 -0
- package/dist/loader/server.js +2 -0
- package/dist/loader/server.js.map +1 -0
- package/dist/loader/types.d.ts +136 -0
- package/dist/loader/types.d.ts.map +1 -0
- package/dist/loader/types.js +24 -0
- package/dist/loader/types.js.map +1 -0
- package/dist/loader/validation.d.ts +59 -0
- package/dist/loader/validation.d.ts.map +1 -0
- package/dist/loader/validation.js +218 -0
- package/dist/loader/validation.js.map +1 -0
- package/dist/manifest/builder.d.ts +172 -0
- package/dist/manifest/builder.d.ts.map +1 -0
- package/dist/manifest/builder.js +336 -0
- package/dist/manifest/builder.js.map +1 -0
- package/dist/manifest/config-manifest.d.ts +199 -0
- package/dist/manifest/config-manifest.d.ts.map +1 -0
- package/dist/manifest/config-manifest.js +388 -0
- package/dist/manifest/config-manifest.js.map +1 -0
- package/dist/manifest/index.d.ts +10 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +20 -0
- package/dist/manifest/index.js.map +1 -0
- package/dist/manifest/schema.d.ts +460 -0
- package/dist/manifest/schema.d.ts.map +1 -0
- package/dist/manifest/schema.js +187 -0
- package/dist/manifest/schema.js.map +1 -0
- package/dist/manifest/schemas/builder.schema.d.ts +20 -0
- package/dist/manifest/schemas/builder.schema.d.ts.map +1 -0
- package/dist/manifest/schemas/builder.schema.js +2 -0
- package/dist/manifest/schemas/builder.schema.js.map +1 -0
- package/dist/manifest/schemas/config-manifest.schema.d.ts +2 -0
- package/dist/manifest/schemas/config-manifest.schema.d.ts.map +1 -0
- package/dist/manifest/schemas/config-manifest.schema.js +2 -0
- package/dist/manifest/schemas/config-manifest.schema.js.map +1 -0
- package/dist/manifest/schemas/schema.schema.d.ts +83 -0
- package/dist/manifest/schemas/schema.schema.d.ts.map +1 -0
- package/dist/manifest/schemas/schema.schema.js +2 -0
- package/dist/manifest/schemas/schema.schema.js.map +1 -0
- package/dist/manifest/types.d.ts +563 -0
- package/dist/manifest/types.d.ts.map +1 -0
- package/dist/manifest/types.js +9 -0
- package/dist/manifest/types.js.map +1 -0
- package/dist/routing/index.d.ts +29 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +35 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/merge.d.ts +164 -0
- package/dist/routing/merge.d.ts.map +1 -0
- package/dist/routing/merge.js +460 -0
- package/dist/routing/merge.js.map +1 -0
- package/dist/routing/registry.d.ts +145 -0
- package/dist/routing/registry.d.ts.map +1 -0
- package/dist/routing/registry.js +459 -0
- package/dist/routing/registry.js.map +1 -0
- package/dist/routing/schemas/merge.schema.d.ts +5 -0
- package/dist/routing/schemas/merge.schema.d.ts.map +1 -0
- package/dist/routing/schemas/merge.schema.js +2 -0
- package/dist/routing/schemas/merge.schema.js.map +1 -0
- package/dist/routing/types.d.ts +358 -0
- package/dist/routing/types.d.ts.map +1 -0
- package/dist/routing/types.js +89 -0
- package/dist/routing/types.js.map +1 -0
- package/dist/schema/extend-zod.d.ts +137 -0
- package/dist/schema/extend-zod.d.ts.map +1 -0
- package/dist/schema/extend-zod.js +243 -0
- package/dist/schema/extend-zod.js.map +1 -0
- package/dist/schema/index.d.ts +9 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +10 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/references.d.ts +9 -0
- package/dist/schema/references.d.ts.map +1 -0
- package/dist/schema/references.js +9 -0
- package/dist/schema/references.js.map +1 -0
- package/dist/schema/resolver.d.ts +45 -0
- package/dist/schema/resolver.d.ts.map +1 -0
- package/dist/schema/resolver.js +267 -0
- package/dist/schema/resolver.js.map +1 -0
- package/dist/schema/schemas/extend-zod.schema.d.ts +16 -0
- package/dist/schema/schemas/extend-zod.schema.d.ts.map +1 -0
- package/dist/schema/schemas/extend-zod.schema.js +2 -0
- package/dist/schema/schemas/extend-zod.schema.js.map +1 -0
- package/dist/schema/schemas/references.schema.d.ts +70 -0
- package/dist/schema/schemas/references.schema.d.ts.map +1 -0
- package/dist/schema/schemas/references.schema.js +2 -0
- package/dist/schema/schemas/references.schema.js.map +1 -0
- package/dist/schemas/collection.d.ts +31 -0
- package/dist/schemas/collection.d.ts.map +1 -0
- package/dist/schemas/collection.js +22 -0
- package/dist/schemas/collection.js.map +1 -0
- package/dist/schemas/config-manifest-descriptor.d.ts +495 -0
- package/dist/schemas/config-manifest-descriptor.d.ts.map +1 -0
- package/dist/schemas/config-manifest-descriptor.js +210 -0
- package/dist/schemas/config-manifest-descriptor.js.map +1 -0
- package/dist/schemas/config-registry-state.d.ts +8 -0
- package/dist/schemas/config-registry-state.d.ts.map +1 -0
- package/dist/schemas/config-registry-state.js +6 -0
- package/dist/schemas/config-registry-state.js.map +1 -0
- package/dist/schemas/doctor.schema.d.ts +25 -0
- package/dist/schemas/doctor.schema.d.ts.map +1 -0
- package/dist/schemas/doctor.schema.js +2 -0
- package/dist/schemas/doctor.schema.js.map +1 -0
- package/dist/schemas/index.d.ts +8 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +21 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +4 -0
- package/dist/server/index.js.map +1 -0
- package/dist/services/config-accessor.d.ts +40 -0
- package/dist/services/config-accessor.d.ts.map +1 -0
- package/dist/services/config-accessor.js +180 -0
- package/dist/services/config-accessor.js.map +1 -0
- package/dist/services/config-storage/index.d.ts +8 -0
- package/dist/services/config-storage/index.d.ts.map +1 -0
- package/dist/services/config-storage/index.js +7 -0
- package/dist/services/config-storage/index.js.map +1 -0
- package/dist/services/config-storage/service.d.ts +63 -0
- package/dist/services/config-storage/service.d.ts.map +1 -0
- package/dist/services/config-storage/service.js +234 -0
- package/dist/services/config-storage/service.js.map +1 -0
- package/dist/services/config.d.ts +3 -0
- package/dist/services/config.d.ts.map +1 -0
- package/dist/services/config.js +30 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/encryption.d.ts +114 -0
- package/dist/services/encryption.d.ts.map +1 -0
- package/dist/services/encryption.js +232 -0
- package/dist/services/encryption.js.map +1 -0
- package/dist/services/index.d.ts +12 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +16 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/loader/loader.descriptor.d.ts +103 -0
- package/dist/services/loader/loader.descriptor.d.ts.map +1 -0
- package/dist/services/loader/loader.descriptor.js +60 -0
- package/dist/services/loader/loader.descriptor.js.map +1 -0
- package/dist/services/loader/loader.impl.cloud.d.ts +55 -0
- package/dist/services/loader/loader.impl.cloud.d.ts.map +1 -0
- package/dist/services/loader/loader.impl.cloud.js +182 -0
- package/dist/services/loader/loader.impl.cloud.js.map +1 -0
- package/dist/services/loader/loader.impl.consumer.d.ts +48 -0
- package/dist/services/loader/loader.impl.consumer.d.ts.map +1 -0
- package/dist/services/loader/loader.impl.consumer.js +175 -0
- package/dist/services/loader/loader.impl.consumer.js.map +1 -0
- package/dist/services/loader/loader.impl.consumer.local-first.d.ts +59 -0
- package/dist/services/loader/loader.impl.consumer.local-first.d.ts.map +1 -0
- package/dist/services/loader/loader.impl.consumer.local-first.js +347 -0
- package/dist/services/loader/loader.impl.consumer.local-first.js.map +1 -0
- package/dist/services/manifest-utils.d.ts +47 -0
- package/dist/services/manifest-utils.d.ts.map +1 -0
- package/dist/services/manifest-utils.js +105 -0
- package/dist/services/manifest-utils.js.map +1 -0
- package/dist/services/schemas/config-accessor.schema.d.ts +10 -0
- package/dist/services/schemas/config-accessor.schema.d.ts.map +1 -0
- package/dist/services/schemas/config-accessor.schema.js +2 -0
- package/dist/services/schemas/config-accessor.schema.js.map +1 -0
- package/dist/services/schemas/encryption.schema.d.ts +22 -0
- package/dist/services/schemas/encryption.schema.d.ts.map +1 -0
- package/dist/services/schemas/encryption.schema.js +2 -0
- package/dist/services/schemas/encryption.schema.js.map +1 -0
- package/dist/services/schemas/manifest-utils.schema.d.ts +4 -0
- package/dist/services/schemas/manifest-utils.schema.d.ts.map +1 -0
- package/dist/services/schemas/manifest-utils.schema.js +2 -0
- package/dist/services/schemas/manifest-utils.schema.js.map +1 -0
- package/dist/settings/assemble.d.ts +28 -0
- package/dist/settings/assemble.d.ts.map +1 -0
- package/dist/settings/assemble.js +30 -0
- package/dist/settings/assemble.js.map +1 -0
- package/dist/settings/index.d.ts +10 -0
- package/dist/settings/index.d.ts.map +1 -0
- package/dist/settings/index.js +10 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/settings-section.schema.d.ts +49 -0
- package/dist/settings/settings-section.schema.d.ts.map +1 -0
- package/dist/settings/settings-section.schema.js +70 -0
- package/dist/settings/settings-section.schema.js.map +1 -0
- package/dist/storage/adapter.d.ts +11 -0
- package/dist/storage/adapter.d.ts.map +1 -0
- package/dist/storage/adapter.js +8 -0
- package/dist/storage/adapter.js.map +1 -0
- package/dist/storage/index.d.ts +8 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +8 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/schemas.d.ts +257 -0
- package/dist/storage/schemas.d.ts.map +1 -0
- package/dist/storage/schemas.js +179 -0
- package/dist/storage/schemas.js.map +1 -0
- package/dist/storage/types.d.ts +74 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +7 -0
- package/dist/storage/types.js.map +1 -0
- package/dist/system-constants.d.ts +95 -0
- package/dist/system-constants.d.ts.map +1 -0
- package/dist/system-constants.js +110 -0
- package/dist/system-constants.js.map +1 -0
- package/package.json +417 -0
- package/src/adapters/cli/flags.ts +260 -0
- package/src/adapters/cli/index.ts +24 -0
- package/src/adapters/cli/mappings.ts +43 -0
- package/src/adapters/cli/prompts.ts +70 -0
- package/src/adapters/cli/schemas/flags.schema.ts +8 -0
- package/src/adapters/cli/schemas/mappings.schema.ts +3 -0
- package/src/adapters/cli/schemas/prompts.schema.ts +4 -0
- package/src/adapters/cli/schemas/wizard.schema.ts +21 -0
- package/src/adapters/cli/wizard.ts +106 -0
- package/src/adapters/web/components/ManifestForm.svelte +817 -0
- package/src/browser/index.ts +86 -0
- package/src/cli/settings.descriptor.ts +23 -0
- package/src/cli/types.ts +59 -0
- package/src/client/index.ts +169 -0
- package/src/client/storage.ts +76 -0
- package/src/collection/collection.ts +121 -0
- package/src/collection/index.ts +6 -0
- package/src/common/index.ts +86 -0
- package/src/config.context.descriptor.ts +12 -0
- package/src/config.plugin.ts +214 -0
- package/src/crud/base-types.ts +10 -0
- package/src/crud/index.ts +15 -0
- package/src/crud/schemas/base-types.schema.ts +20 -0
- package/src/crud/schemas/shared.schema.ts +14 -0
- package/src/crud/shared.ts +8 -0
- package/src/crud/types.ts +299 -0
- package/src/docs/environment.docs.descriptor.ts +385 -0
- package/src/docs/manifests.docs.descriptor.ts +505 -0
- package/src/docs/validation.docs.descriptor.ts +443 -0
- package/src/doctor.ts +143 -0
- package/src/env.runtime.ts +49 -0
- package/src/env.ts +91 -0
- package/src/environment/current.ts +108 -0
- package/src/environment/environment.config.descriptor.ts +60 -0
- package/src/environment/environment.config.schema.ts +24 -0
- package/src/environment/environment.local.descriptor.ts +45 -0
- package/src/environment/environment.plugin.ts +31 -0
- package/src/environment/environment.production.descriptor.ts +40 -0
- package/src/environment/environment.staging.descriptor.ts +25 -0
- package/src/environment/index.ts +22 -0
- package/src/environment/kinds/environment.default.ts +57 -0
- package/src/environment/kinds/environment.interface.ts +10 -0
- package/src/environment/kinds/environment.kind.ts +69 -0
- package/src/environment/kinds/environment.schema.ts +57 -0
- package/src/environment/kinds/index.ts +8 -0
- package/src/environment/kinds/schemas/environment.interface.schema.ts +11 -0
- package/src/environment/kinds/schemas/environment.schema.ts +24 -0
- package/src/environment/schemas/current.schema.ts +21 -0
- package/src/environment/schemas/environment.config.schema.ts +3 -0
- package/src/extensions/index.ts +26 -0
- package/src/extensions/registry.ts +179 -0
- package/src/extensions/types.ts +123 -0
- package/src/form/core/field-resolver.ts +380 -0
- package/src/form/core/groups.ts +96 -0
- package/src/form/core/index.ts +41 -0
- package/src/form/core/nested-utils.ts +115 -0
- package/src/form/core/schemas/validation.schema.ts +9 -0
- package/src/form/core/types.ts +115 -0
- package/src/form/core/validation.ts +137 -0
- package/src/form/core/visibility.ts +172 -0
- package/src/form/index.ts +36 -0
- package/src/index.ts +69 -0
- package/src/js-yaml.d.ts +4 -0
- package/src/loader/cli/index.ts +386 -0
- package/src/loader/cli/loaders.ts +153 -0
- package/src/loader/cli/types.ts +181 -0
- package/src/loader/cli/utils.ts +236 -0
- package/src/loader/client.ts +140 -0
- package/src/loader/discovery.ts +291 -0
- package/src/loader/file-loader.ts +262 -0
- package/src/loader/index.server.ts +389 -0
- package/src/loader/index.ts +18 -0
- package/src/loader/merge.ts +366 -0
- package/src/loader/schemas/merge.schema.ts +8 -0
- package/src/loader/schemas/validation.schema.ts +18 -0
- package/src/loader/server.ts +15 -0
- package/src/loader/types.ts +142 -0
- package/src/loader/validation.ts +261 -0
- package/src/manifest/builder.ts +452 -0
- package/src/manifest/config-manifest.ts +482 -0
- package/src/manifest/index.ts +92 -0
- package/src/manifest/schema.ts +249 -0
- package/src/manifest/schemas/builder.schema.ts +33 -0
- package/src/manifest/schemas/config-manifest.schema.ts +1 -0
- package/src/manifest/schemas/schema.schema.ts +99 -0
- package/src/manifest/types.ts +726 -0
- package/src/routing/index.ts +105 -0
- package/src/routing/merge.ts +589 -0
- package/src/routing/registry.ts +595 -0
- package/src/routing/schemas/merge.schema.ts +6 -0
- package/src/routing/types.ts +470 -0
- package/src/schema/extend-zod.ts +289 -0
- package/src/schema/index.ts +44 -0
- package/src/schema/references.ts +21 -0
- package/src/schema/resolver.ts +343 -0
- package/src/schema/schemas/extend-zod.schema.ts +16 -0
- package/src/schema/schemas/references.schema.ts +86 -0
- package/src/schemas/collection.ts +38 -0
- package/src/schemas/config-manifest-descriptor.ts +259 -0
- package/src/schemas/config-registry-state.ts +13 -0
- package/src/schemas/doctor.schema.ts +27 -0
- package/src/schemas/index.ts +53 -0
- package/src/server/index.ts +4 -0
- package/src/services/config-accessor.ts +218 -0
- package/src/services/config-storage/index.ts +8 -0
- package/src/services/config-storage/service.ts +355 -0
- package/src/services/config.ts +37 -0
- package/src/services/encryption.ts +260 -0
- package/src/services/index.ts +34 -0
- package/src/services/loader/loader.descriptor.ts +96 -0
- package/src/services/loader/loader.impl.cloud.ts +214 -0
- package/src/services/loader/loader.impl.consumer.local-first.ts +417 -0
- package/src/services/loader/loader.impl.consumer.ts +213 -0
- package/src/services/manifest-utils.ts +119 -0
- package/src/services/schemas/config-accessor.schema.ts +11 -0
- package/src/services/schemas/encryption.schema.ts +23 -0
- package/src/services/schemas/manifest-utils.schema.ts +4 -0
- package/src/settings/assemble.ts +46 -0
- package/src/settings/index.ts +19 -0
- package/src/settings/settings-section.schema.ts +84 -0
- package/src/storage/adapter.ts +12 -0
- package/src/storage/index.ts +48 -0
- package/src/storage/schemas.ts +215 -0
- package/src/storage/types.ts +88 -0
- package/src/system-constants.ts +121 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Catalog & Selection
|
|
3
|
+
*
|
|
4
|
+
* Manages the catalog of known environments (local, staging, production, etc.)
|
|
5
|
+
* and persists the user's current selection via the config manifest system.
|
|
6
|
+
*
|
|
7
|
+
* Uses ConfigManifest (runtime-resolved storage adapter) instead of raw fs.
|
|
8
|
+
* Storage adapter selection is runtime-resolved per scope.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { ConfigManifest } from '../manifest/config-manifest.ts';
|
|
12
|
+
|
|
13
|
+
import type { EnvironmentCatalogEntry, CurrentEnvironmentConfig } from './schemas/current.schema.ts';
|
|
14
|
+
|
|
15
|
+
export type { EnvironmentTier, EnvironmentCatalogEntry, CurrentEnvironmentConfig } from './schemas/current.schema.ts';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get the environment config manifest.
|
|
19
|
+
* Lazily instantiated; safe to call multiple times.
|
|
20
|
+
*/
|
|
21
|
+
function getManifest(): ConfigManifest<{ currentEnvironment?: string; catalog: EnvironmentCatalogEntry[] }> {
|
|
22
|
+
return ConfigManifest.fromId('environment');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Load all known environments from persistent storage. */
|
|
26
|
+
export async function loadEnvironmentCatalog(): Promise<EnvironmentCatalogEntry[]> {
|
|
27
|
+
const manifest = getManifest();
|
|
28
|
+
const data = await manifest.load();
|
|
29
|
+
return data?.catalog ?? [];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Resolve the currently-selected environment configuration. */
|
|
33
|
+
export async function resolveCurrentEnvironmentConfig(): Promise<CurrentEnvironmentConfig> {
|
|
34
|
+
const manifest = getManifest();
|
|
35
|
+
const data = await manifest.load();
|
|
36
|
+
const selected = data?.currentEnvironment;
|
|
37
|
+
const catalog = data?.catalog ?? [];
|
|
38
|
+
|
|
39
|
+
if (selected && catalog.length > 0) {
|
|
40
|
+
const entry = catalog.find((e) => (e.id ?? e.name) === selected);
|
|
41
|
+
if (entry) {
|
|
42
|
+
return {
|
|
43
|
+
id: entry.id ?? entry.name,
|
|
44
|
+
name: entry.name,
|
|
45
|
+
apiUrl: entry.apiUrl,
|
|
46
|
+
tier: entry.tier
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Default to local
|
|
52
|
+
return { id: 'local', name: 'local', apiUrl: 'http://localhost:5173', tier: 'local' };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Persist an environment selection (single entry). */
|
|
56
|
+
export async function saveEnvironmentSelection(entry: EnvironmentCatalogEntry): Promise<void> {
|
|
57
|
+
const manifest = getManifest();
|
|
58
|
+
const data = (await manifest.load()) ?? { catalog: [] };
|
|
59
|
+
const id = entry.id ?? entry.name;
|
|
60
|
+
const idx = data.catalog.findIndex((e) => (e.id ?? e.name) === id);
|
|
61
|
+
if (idx >= 0) {
|
|
62
|
+
data.catalog[idx] = entry;
|
|
63
|
+
} else {
|
|
64
|
+
data.catalog.push(entry);
|
|
65
|
+
}
|
|
66
|
+
await manifest.save(data);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Load the name/id of the currently-selected environment. */
|
|
70
|
+
export async function loadCurrentEnvironmentSelection(): Promise<string | null> {
|
|
71
|
+
const manifest = getManifest();
|
|
72
|
+
const data = await manifest.load();
|
|
73
|
+
return data?.currentEnvironment ?? null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Persist the currently-selected environment name/id. */
|
|
77
|
+
export async function saveCurrentEnvironmentSelection(id: string): Promise<void> {
|
|
78
|
+
const manifest = getManifest();
|
|
79
|
+
const data = (await manifest.load()) ?? { catalog: [] };
|
|
80
|
+
data.currentEnvironment = id;
|
|
81
|
+
await manifest.save(data);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Persist the full environment catalog. */
|
|
85
|
+
export async function saveEnvironmentCatalog(catalog: EnvironmentCatalogEntry[]): Promise<void> {
|
|
86
|
+
const manifest = getManifest();
|
|
87
|
+
const data = (await manifest.load()) ?? { catalog: [] };
|
|
88
|
+
data.catalog = catalog;
|
|
89
|
+
await manifest.save(data);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
import type { EnvironmentDescriptor } from './kinds/environment.schema';
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Resolve the configured environment descriptor from a list of candidates.
|
|
96
|
+
*
|
|
97
|
+
* Checks the persisted current environment selection and returns the matching
|
|
98
|
+
* descriptor from the candidates list.
|
|
99
|
+
*/
|
|
100
|
+
export async function resolveConfiguredEnvironmentDescriptor(
|
|
101
|
+
candidates: EnvironmentDescriptor[]
|
|
102
|
+
): Promise<EnvironmentDescriptor | undefined> {
|
|
103
|
+
if (candidates.length === 0) return undefined;
|
|
104
|
+
|
|
105
|
+
const currentConfig = await resolveCurrentEnvironmentConfig();
|
|
106
|
+
const configured = candidates.find((d) => d.id === currentConfig.id);
|
|
107
|
+
return configured;
|
|
108
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Config Manifest Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Declares configuration options for the environment module.
|
|
5
|
+
* Used to store user preferences like currentEnvironment.
|
|
6
|
+
* Auto-discovered by the runtime.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { ConfigManifestDescriptor } from '@vibesdotdev/config/schemas/config-manifest-descriptor';
|
|
10
|
+
import { EnvironmentPreferencesSchema } from './environment.config.schema';
|
|
11
|
+
|
|
12
|
+
const descriptor: ConfigManifestDescriptor = {
|
|
13
|
+
kind: 'config/manifest',
|
|
14
|
+
id: 'environment',
|
|
15
|
+
name: 'Environment Settings',
|
|
16
|
+
description: 'Environment module configuration',
|
|
17
|
+
|
|
18
|
+
customTables: false,
|
|
19
|
+
version: 1,
|
|
20
|
+
internal: false,
|
|
21
|
+
|
|
22
|
+
// Storage configuration
|
|
23
|
+
namespace: 'environment',
|
|
24
|
+
schema: EnvironmentPreferencesSchema,
|
|
25
|
+
allowedAdapters: ['storage.localdb'],
|
|
26
|
+
scope: 'global',
|
|
27
|
+
|
|
28
|
+
// Config tier and classification
|
|
29
|
+
tier: 'user',
|
|
30
|
+
category: 'system',
|
|
31
|
+
|
|
32
|
+
// Field metadata for UI
|
|
33
|
+
fields: {
|
|
34
|
+
currentEnvironment: {
|
|
35
|
+
ui: {
|
|
36
|
+
label: 'Current Environment',
|
|
37
|
+
description: 'The environment to use for API calls',
|
|
38
|
+
component: 'select'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
catalog: {
|
|
42
|
+
ui: {
|
|
43
|
+
label: 'Environment Catalog',
|
|
44
|
+
description: 'List of configured environments',
|
|
45
|
+
component: 'list'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// Navigation
|
|
51
|
+
navigation: {
|
|
52
|
+
page: 'settings',
|
|
53
|
+
section: 'environment',
|
|
54
|
+
order: 10
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
enabled: true
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default descriptor;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
|
|
3
|
+
export const EnvironmentTierSchema = z.enum(['local', 'dev', 'staging', 'production']);
|
|
4
|
+
|
|
5
|
+
export const EnvironmentCatalogEntrySchema = z.object({
|
|
6
|
+
id: z.string().optional(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
apiUrl: z.string().url(),
|
|
9
|
+
tier: EnvironmentTierSchema.optional(),
|
|
10
|
+
description: z.string().optional(),
|
|
11
|
+
isDefault: z.boolean().optional(),
|
|
12
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
13
|
+
variables: z.record(z.string(), z.string()).optional(),
|
|
14
|
+
databaseUrl: z.string().optional(),
|
|
15
|
+
secrets: z.record(z.string(), z.string()).optional()
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const EnvironmentPreferencesSchema = z.object({
|
|
19
|
+
currentEnvironment: z.string().optional(),
|
|
20
|
+
catalog: z.array(EnvironmentCatalogEntrySchema).optional().default([])
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export type EnvironmentPreferences = z.infer<typeof EnvironmentPreferencesSchema>;
|
|
24
|
+
export type EnvironmentCatalogEntry = z.infer<typeof EnvironmentCatalogEntrySchema>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local Environment Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Built-in local development environment (http://localhost:5173).
|
|
5
|
+
* Default in development builds; staging is default for compiled/production builds.
|
|
6
|
+
* Auto-discovered by the runtime.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { EnvironmentDescriptor } from './kinds/environment.schema';
|
|
10
|
+
|
|
11
|
+
const descriptor: EnvironmentDescriptor = {
|
|
12
|
+
kind: 'config/environment',
|
|
13
|
+
id: 'local',
|
|
14
|
+
name: 'Local',
|
|
15
|
+
description: 'Local development environment (*.vibes.local)',
|
|
16
|
+
apiUrl: 'http://localhost:5173',
|
|
17
|
+
apiUrlEnvVar: 'VIBES_API_URL',
|
|
18
|
+
apps: {
|
|
19
|
+
home: 'https://vibes.local',
|
|
20
|
+
ai: 'https://ai.vibes.local',
|
|
21
|
+
// tools merged into ai — kept as alias for backward compat
|
|
22
|
+
tools: 'https://ai.vibes.local',
|
|
23
|
+
account: 'https://account.vibes.local',
|
|
24
|
+
auth: 'https://auth.vibes.local',
|
|
25
|
+
platform: 'https://platform.vibes.local',
|
|
26
|
+
chat: 'https://chat.vibes.local',
|
|
27
|
+
system: 'https://system.vibes.local',
|
|
28
|
+
workbench: 'https://workbench.vibes.local',
|
|
29
|
+
creative: 'https://creative.vibes.local',
|
|
30
|
+
knowledge: 'https://knowledge.vibes.local',
|
|
31
|
+
runnable: 'https://runnable.vibes.local',
|
|
32
|
+
bridge: 'https://bridge.vibes.local',
|
|
33
|
+
docs: 'https://docs.vibes.local',
|
|
34
|
+
app: 'https://app.vibes.local',
|
|
35
|
+
casework: 'https://maplewood.vibes.local',
|
|
36
|
+
conjure: 'https://conjure.vibes.local',
|
|
37
|
+
assets: 'https://assets.vibes.local',
|
|
38
|
+
template: 'https://template.vibes.local',
|
|
39
|
+
vibesos: 'https://os.vibes.local'
|
|
40
|
+
},
|
|
41
|
+
isDefault: false,
|
|
42
|
+
enabled: true
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default descriptor;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Runtime Plugin
|
|
3
|
+
*
|
|
4
|
+
* Registers the config/environment kind for named environment configurations.
|
|
5
|
+
* Environment descriptors and config manifest are auto-discovered.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { createRuntimePlugin } from '@vibesdotdev/runtime';
|
|
9
|
+
import { environmentKind } from './kinds';
|
|
10
|
+
import localEnvironmentDescriptor from './environment.local.descriptor';
|
|
11
|
+
import stagingEnvironmentDescriptor from './environment.staging.descriptor';
|
|
12
|
+
import productionEnvironmentDescriptor from './environment.production.descriptor';
|
|
13
|
+
import environmentConfigDescriptor from './environment.config.descriptor';
|
|
14
|
+
|
|
15
|
+
export default createRuntimePlugin({
|
|
16
|
+
id: 'environment',
|
|
17
|
+
name: 'Environment',
|
|
18
|
+
description: 'Named environment configurations for API targeting',
|
|
19
|
+
|
|
20
|
+
// Depends on config for the config/manifest kind
|
|
21
|
+
dependencies: ['config'],
|
|
22
|
+
|
|
23
|
+
kinds: [environmentKind],
|
|
24
|
+
|
|
25
|
+
descriptors: [
|
|
26
|
+
localEnvironmentDescriptor,
|
|
27
|
+
stagingEnvironmentDescriptor,
|
|
28
|
+
productionEnvironmentDescriptor,
|
|
29
|
+
environmentConfigDescriptor
|
|
30
|
+
]
|
|
31
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Production Environment Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Built-in production environment (vibes.dev).
|
|
5
|
+
* Auto-discovered by the runtime.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { EnvironmentDescriptor } from './kinds/environment.schema';
|
|
9
|
+
|
|
10
|
+
const descriptor: EnvironmentDescriptor = {
|
|
11
|
+
kind: 'config/environment',
|
|
12
|
+
id: 'production',
|
|
13
|
+
name: 'Production',
|
|
14
|
+
description: 'Production environment (vibes.dev)',
|
|
15
|
+
apiUrl: 'https://vibes.dev',
|
|
16
|
+
apiUrlEnvVar: 'PRODUCTION_API_URL',
|
|
17
|
+
apps: {
|
|
18
|
+
home: 'https://vibes.dev',
|
|
19
|
+
ai: 'https://ai.vibes.dev',
|
|
20
|
+
// tools merged into ai — kept as alias for backward compat
|
|
21
|
+
tools: 'https://ai.vibes.dev',
|
|
22
|
+
account: 'https://account.vibes.dev',
|
|
23
|
+
auth: 'https://auth.vibes.dev',
|
|
24
|
+
platform: 'https://platform.vibes.dev',
|
|
25
|
+
chat: 'https://chat.vibes.dev',
|
|
26
|
+
system: 'https://system.vibes.dev',
|
|
27
|
+
workbench: 'https://workbench.vibes.dev',
|
|
28
|
+
creative: 'https://creative.vibes.dev',
|
|
29
|
+
knowledge: 'https://knowledge.vibes.dev',
|
|
30
|
+
runnable: 'https://runnable.vibes.dev',
|
|
31
|
+
bridge: 'https://bridge.vibes.dev',
|
|
32
|
+
docs: 'https://docs.vibes.dev',
|
|
33
|
+
app: 'https://app.vibes.dev',
|
|
34
|
+
casework: 'https://maplewood.vibes.dev'
|
|
35
|
+
},
|
|
36
|
+
isDefault: false,
|
|
37
|
+
enabled: true
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default descriptor;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Staging Environment Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Built-in staging environment (staging.vibes.dev).
|
|
5
|
+
* Default for compiled/production builds.
|
|
6
|
+
* Auto-discovered by the runtime.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { EnvironmentDescriptor } from './kinds/environment.schema';
|
|
10
|
+
|
|
11
|
+
const descriptor: EnvironmentDescriptor = {
|
|
12
|
+
kind: 'config/environment',
|
|
13
|
+
id: 'staging',
|
|
14
|
+
name: 'Staging',
|
|
15
|
+
description: 'Staging environment (staging.vibes.dev)',
|
|
16
|
+
apiUrl: 'https://staging.vibes.dev',
|
|
17
|
+
apiUrlEnvVar: 'STAGING_API_URL',
|
|
18
|
+
apps: {
|
|
19
|
+
home: 'https://staging.vibes.dev'
|
|
20
|
+
},
|
|
21
|
+
isDefault: false,
|
|
22
|
+
enabled: true
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default descriptor;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Module
|
|
3
|
+
*
|
|
4
|
+
* Provides named environment configurations for API targeting.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Config schema export
|
|
8
|
+
export {
|
|
9
|
+
EnvironmentPreferencesSchema,
|
|
10
|
+
type EnvironmentPreferences
|
|
11
|
+
} from './environment.config.schema';
|
|
12
|
+
export {
|
|
13
|
+
loadCurrentEnvironmentSelection,
|
|
14
|
+
loadEnvironmentCatalog,
|
|
15
|
+
resolveConfiguredEnvironmentDescriptor,
|
|
16
|
+
resolveCurrentEnvironmentConfig,
|
|
17
|
+
saveCurrentEnvironmentSelection,
|
|
18
|
+
saveEnvironmentCatalog,
|
|
19
|
+
saveEnvironmentSelection,
|
|
20
|
+
type EnvironmentCatalogEntry,
|
|
21
|
+
type EnvironmentTier
|
|
22
|
+
} from './current.ts';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Environment Implementation
|
|
3
|
+
*
|
|
4
|
+
* Standard implementation that provides access to environment configuration.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { KindContext, RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/kind';
|
|
8
|
+
import type { EnvironmentDescriptor } from './environment.schema';
|
|
9
|
+
import type { EnvironmentImplementation } from './environment.interface';
|
|
10
|
+
import { readRuntimeEnv } from '../../env.runtime.ts';
|
|
11
|
+
|
|
12
|
+
export class DefaultEnvironment implements EnvironmentImplementation {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly kind = 'config/environment';
|
|
15
|
+
readonly priority = 0;
|
|
16
|
+
readonly descriptor: EnvironmentDescriptor;
|
|
17
|
+
private readonly resolvedApiUrl: string;
|
|
18
|
+
|
|
19
|
+
constructor(descriptor: RuntimeDescriptor, _context: KindContext) {
|
|
20
|
+
this.id = descriptor.id;
|
|
21
|
+
this.descriptor = descriptor as EnvironmentDescriptor;
|
|
22
|
+
this.resolvedApiUrl = this.resolveApiUrl(this.descriptor);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get apiUrl(): string {
|
|
26
|
+
return this.resolvedApiUrl;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getHeader(name: string): string | undefined {
|
|
30
|
+
return this.descriptor.headers?.[name];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
getHeaders(): Record<string, string> {
|
|
34
|
+
return this.descriptor.headers ?? {};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
getVariable(name: string): string | undefined {
|
|
38
|
+
return this.descriptor.variables?.[name];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
getVariables(): Record<string, string> {
|
|
42
|
+
return this.descriptor.variables ?? {};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private resolveApiUrl(descriptor: EnvironmentDescriptor): string {
|
|
46
|
+
const envVar = descriptor.apiUrlEnvVar;
|
|
47
|
+
if (!envVar) return descriptor.apiUrl;
|
|
48
|
+
const envValue = readRuntimeEnv(envVar);
|
|
49
|
+
if (!envValue || envValue.trim() === '') return descriptor.apiUrl;
|
|
50
|
+
try {
|
|
51
|
+
new URL(envValue);
|
|
52
|
+
return envValue;
|
|
53
|
+
} catch {
|
|
54
|
+
return descriptor.apiUrl;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Implementation Interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for environment implementations.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { EnvironmentDescriptor } from './environment.schema';
|
|
8
|
+
import type { RuntimeImplementation } from '@vibesdotdev/runtime/schemas/asset';
|
|
9
|
+
|
|
10
|
+
export type { EnvironmentImplementation } from './schemas/environment.interface.schema.ts';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Kind Definition
|
|
3
|
+
*
|
|
4
|
+
* Registers the config/environment kind for named environment configurations.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { RuntimeKindDescriptor, KindContext, RuntimeDescriptor } from '@vibesdotdev/runtime/schemas/kind';
|
|
8
|
+
import type { RuntimeScope } from '@vibesdotdev/runtime/schemas/scope';
|
|
9
|
+
import { EnvironmentDescriptorSchema, type EnvironmentDescriptor } from './environment.schema';
|
|
10
|
+
import type { EnvironmentImplementation } from './environment.interface';
|
|
11
|
+
import { DefaultEnvironment } from './environment.default';
|
|
12
|
+
import { resolveConfiguredEnvironmentDescriptor } from '../current.ts';
|
|
13
|
+
import { readRuntimeEnv } from '../../env.runtime.ts';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Resolution strategy for environments:
|
|
17
|
+
* 1. Check config/manifest for user's currentEnvironment preference
|
|
18
|
+
* 2. Fall back to descriptor marked isDefault
|
|
19
|
+
* 3. Public consumer CLI binary → 'production' (the public-binary build defines
|
|
20
|
+
* `process.env.VIBES_CLI_MODE` as `"public"` via Bun's static substitution; the
|
|
21
|
+
* literal expression below is replaced at compile time so the check is a constant
|
|
22
|
+
* fold in shipped binaries and a runtime read in source-mode dev runs)
|
|
23
|
+
* 4. Fall back to 'staging' in compiled/production builds (NODE_ENV === 'production')
|
|
24
|
+
* 5. Fall back to 'local' environment in development
|
|
25
|
+
* 6. Fall back to first candidate
|
|
26
|
+
*/
|
|
27
|
+
async function resolveEnvironment(
|
|
28
|
+
candidates: RuntimeDescriptor[],
|
|
29
|
+
_scope: RuntimeScope,
|
|
30
|
+
context: KindContext
|
|
31
|
+
): Promise<EnvironmentDescriptor | undefined> {
|
|
32
|
+
if (candidates.length === 0) return undefined;
|
|
33
|
+
const typed = candidates as EnvironmentDescriptor[];
|
|
34
|
+
if (typed.length === 1) return typed[0];
|
|
35
|
+
|
|
36
|
+
void context;
|
|
37
|
+
const configured = await resolveConfiguredEnvironmentDescriptor(typed);
|
|
38
|
+
if (configured) return configured;
|
|
39
|
+
|
|
40
|
+
// Fall back to descriptor marked as default
|
|
41
|
+
const defaultEnv = typed.find((d) => d.isDefault);
|
|
42
|
+
if (defaultEnv) return defaultEnv;
|
|
43
|
+
|
|
44
|
+
// Public consumer CLI binary always defaults to production unless overridden above.
|
|
45
|
+
if (readRuntimeEnv('VIBES_CLI_MODE') === 'public') {
|
|
46
|
+
const productionEnv = typed.find((d) => d.id === 'production');
|
|
47
|
+
if (productionEnv) return productionEnv;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// In compiled/production builds default to 'staging'; in dev default to 'local'
|
|
51
|
+
const isProduction = readRuntimeEnv('NODE_ENV') === 'production';
|
|
52
|
+
const buildDefault = typed.find((d) => d.id === (isProduction ? 'staging' : 'local'));
|
|
53
|
+
if (buildDefault) return buildDefault;
|
|
54
|
+
|
|
55
|
+
// Last resort: first candidate
|
|
56
|
+
return typed[0];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const environmentKind: RuntimeKindDescriptor<
|
|
60
|
+
EnvironmentDescriptor,
|
|
61
|
+
EnvironmentImplementation,
|
|
62
|
+
KindContext
|
|
63
|
+
> = {
|
|
64
|
+
id: 'config/environment',
|
|
65
|
+
descriptorSchema: EnvironmentDescriptorSchema,
|
|
66
|
+
defaultImplementation: DefaultEnvironment,
|
|
67
|
+
resolve: resolveEnvironment,
|
|
68
|
+
contexts: [] // No direct context deps, uses runtime.query internally
|
|
69
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Descriptor Schema
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for named environment configurations.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as z from 'zod/v4';
|
|
8
|
+
import { RuntimeDescriptorSchema } from '@vibesdotdev/runtime/schemas/descriptor';
|
|
9
|
+
|
|
10
|
+
export const EnvironmentDescriptorSchema = RuntimeDescriptorSchema.extend({
|
|
11
|
+
kind: z.literal('config/environment'),
|
|
12
|
+
|
|
13
|
+
/** Base URL for API calls (the canonical / home origin) */
|
|
14
|
+
apiUrl: z.string().url(),
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Per-app origin map. Keys are app IDs (e.g. `'ai'`, `'tools'`, `'account'`,
|
|
18
|
+
* `'auth'`, `'platform'`, `'chat'`, `'home'`); values are the full origin URL
|
|
19
|
+
* the app is served from in this environment.
|
|
20
|
+
*
|
|
21
|
+
* Open-shaped on purpose: third-party apps embedding the runtime can add
|
|
22
|
+
* their own app IDs. Storage manifests declare `ownerApp: '<id>'` in their
|
|
23
|
+
* `adapterConfig['storage.cloud-api']` and the cloud-api adapter composes
|
|
24
|
+
* `${apps[ownerApp]}/api/storage/${namespace}` to route reads to the
|
|
25
|
+
* owning app's cloud worker.
|
|
26
|
+
*/
|
|
27
|
+
apps: z.record(z.string(), z.string().url()).default({}),
|
|
28
|
+
|
|
29
|
+
/** Optional environment variable that overrides apiUrl at runtime */
|
|
30
|
+
apiUrlEnvVar: z.string().optional(),
|
|
31
|
+
|
|
32
|
+
/** Whether this is the default environment when no preference is set */
|
|
33
|
+
isDefault: z.boolean().optional(),
|
|
34
|
+
|
|
35
|
+
/** Custom headers to include in API requests */
|
|
36
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
37
|
+
|
|
38
|
+
/** Environment variables available to tools */
|
|
39
|
+
variables: z.record(z.string(), z.string()).optional(),
|
|
40
|
+
|
|
41
|
+
/** Kubernetes integration */
|
|
42
|
+
kubernetes: z
|
|
43
|
+
.object({
|
|
44
|
+
context: z.string(),
|
|
45
|
+
namespace: z.string()
|
|
46
|
+
})
|
|
47
|
+
.optional(),
|
|
48
|
+
|
|
49
|
+
/** SigNoz observability integration */
|
|
50
|
+
signoz: z
|
|
51
|
+
.object({
|
|
52
|
+
endpoint: z.string()
|
|
53
|
+
})
|
|
54
|
+
.optional()
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export type { EnvironmentDescriptor } from './schemas/environment.schema.ts';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Kind Exports
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export { environmentKind } from './environment.kind';
|
|
6
|
+
export { EnvironmentDescriptorSchema, type EnvironmentDescriptor } from './environment.schema';
|
|
7
|
+
export type { EnvironmentImplementation } from './environment.interface';
|
|
8
|
+
export { DefaultEnvironment } from './environment.default';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EnvironmentDescriptor } from './environment.schema';
|
|
2
|
+
|
|
3
|
+
export interface EnvironmentImplementation {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly descriptor: EnvironmentDescriptor;
|
|
6
|
+
readonly apiUrl: string;
|
|
7
|
+
getHeader(name: string): string | undefined;
|
|
8
|
+
getHeaders(): Record<string, string>;
|
|
9
|
+
getVariable(name: string): string | undefined;
|
|
10
|
+
getVariables(): Record<string, string>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type EnvironmentDescriptor = {
|
|
2
|
+
kind: 'config/environment';
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
tags?: string[];
|
|
7
|
+
hardware?: string[];
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
requiredContext?: string[];
|
|
10
|
+
optionalContext?: string[];
|
|
11
|
+
apiUrl: string;
|
|
12
|
+
/**
|
|
13
|
+
* Per-app origin map keyed by app ID. Storage manifests use this with
|
|
14
|
+
* `adapterConfig['storage.cloud-api'].ownerApp` to route cross-app reads.
|
|
15
|
+
* Open-shaped so third-party apps can add their own IDs.
|
|
16
|
+
*/
|
|
17
|
+
apps?: Record<string, string>;
|
|
18
|
+
apiUrlEnvVar?: string;
|
|
19
|
+
isDefault?: boolean;
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
variables?: Record<string, string>;
|
|
22
|
+
kubernetes?: { context: string; namespace: string };
|
|
23
|
+
signoz?: { endpoint: string };
|
|
24
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type EnvironmentTier = 'local' | 'dev' | 'staging' | 'production';
|
|
2
|
+
|
|
3
|
+
export interface EnvironmentCatalogEntry {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
tier?: EnvironmentTier;
|
|
8
|
+
description?: string;
|
|
9
|
+
isDefault?: boolean;
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
variables?: Record<string, string>;
|
|
12
|
+
databaseUrl?: string;
|
|
13
|
+
secrets?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CurrentEnvironmentConfig {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
apiUrl: string;
|
|
20
|
+
tier?: EnvironmentTier;
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Extensions Module
|
|
3
|
+
*
|
|
4
|
+
* Surface-specific manifest extensions with lazy component loading.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Core types
|
|
8
|
+
export type {
|
|
9
|
+
ExtensionSurface,
|
|
10
|
+
LazyComponentLoader,
|
|
11
|
+
LazyComponentOverride,
|
|
12
|
+
ManifestSurfaceExtension,
|
|
13
|
+
LoadedExtension
|
|
14
|
+
} from './types.ts';
|
|
15
|
+
|
|
16
|
+
// Registry functions
|
|
17
|
+
export {
|
|
18
|
+
registerExtension,
|
|
19
|
+
getExtension,
|
|
20
|
+
hasExtension,
|
|
21
|
+
loadExtension,
|
|
22
|
+
getAllExtensionKeys,
|
|
23
|
+
getExtensionsForSurface,
|
|
24
|
+
clearExtensionCache,
|
|
25
|
+
clearAllExtensions
|
|
26
|
+
} from './registry.ts';
|