katalyst-taxonomy-cli 2.0.1a8__tar.gz → 2.0.1a9__tar.gz
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.
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/PKG-INFO +1 -1
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/pyproject.toml +1 -1
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/_wiring.py +8 -2
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/app.py +8 -1
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/config_profile.py +40 -12
- katalyst_taxonomy_cli-2.0.1a9/src/katalyst_taxonomy_cli/commands/config_sources.py +405 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/create.py +8 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/deps.py +12 -2
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/lifecycle.py +16 -4
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/lint.py +13 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/query.py +21 -1
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/show.py +22 -3
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/update.py +7 -0
- katalyst_taxonomy_cli-2.0.1a9/src/katalyst_taxonomy_cli/commands/variant.py +271 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/context.py +8 -1
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/options.py +62 -1
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_config_sources.py +66 -3
- katalyst_taxonomy_cli-2.0.1a9/tests/test_variant_command.py +167 -0
- katalyst_taxonomy_cli-2.0.1a8/src/katalyst_taxonomy_cli/commands/config_sources.py +0 -190
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/.gitignore +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/Justfile +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/__init__.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/__main__.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/__init__.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/api.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/backend.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/bundle.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/clone.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/config.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/config_filters.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/config_home.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/config_plugins.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/config_schemas.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/core.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/diff.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/drafts.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/export.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/init.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/kinds.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/migrate.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/plugin.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/promote.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/relate.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/relocate.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/remove.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/rescaffold.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/resolve.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/rollback.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/self_update.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/status.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/sync.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/commands/versions.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/discovery.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/fields.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/install.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/installer.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/output.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/py.typed +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/releases.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/layer.yaml +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/conftest.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_add.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_add_bundle.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_agents_home_mcp.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_api_command.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_backend_option.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_cli_version.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_clone.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_command_signatures.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_config_command.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_config_explain.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_config_home.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_config_plugins_command.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_config_profiles.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_config_schemas_command.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_core_schema.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_create.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_create_owners.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_create_typed_and_variants.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_create_variant_field.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_deps.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_git_backend_cli.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_github_backend_cli.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_help_names_no_product.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_import_change_set.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_import_inside_repo.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_install.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_installer.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_k1_runtime_additions.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_kind_selector_shared_path.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_kinds.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_kinds_plugin_settings.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_labels_annotations.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_lifecycle_kind_selector.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_lifecycle_moves.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_lint_output.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_lint_profile_graph.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_lint_strict.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_mcp_config_tool_parity.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_migrate.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_nested_collection_and_scope.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_node_under_parent_directory.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_optional_extras.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_output.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_plugin_command.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_plugin_gating.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_qualified_filenames.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_relate_properties.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_relate_update.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_releases.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_relocate.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_relocation.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_remove.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_repository_targets.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_rest_shipped_plugins.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_scaffold_holdings.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_schema_gate.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_self_channels.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_self_update.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_template_merge.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/tests/test_update_in_place.py +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/.gitignore +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/Justfile +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/01_kata_init.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/02_kata_clone.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/04_kata_deps.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/06_kata_status.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/11_kata_create_expanded.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/13_kata_portfolio_org.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/14_kata_resolve.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/17_kata_show.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/19_kata_backend_ops.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/20_kata_promotion.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/21_kata_roundtrip.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/22_kata_error_ux.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/23_kata_show_deep.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/24_kata_resolve_deep.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/26_kata_fresh_repo.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/31_kata_config_discovery.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/32_kata_config_profiles.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/43_kata_relate_update.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/44_kata_create_typed_fields.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/51_kata_labels_annotations.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/57_kata_self_channels.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/58_kata_import_change_set.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/59_kata_update_in_place.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/63_kata_library_layers.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/features/cli/64_kata_xspec_layers.feature +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/layer.yaml +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/package.json +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/playwright.config.ts +0 -0
- {katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/xspec/tsconfig.json +0 -0
{katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/_wiring.py
RENAMED
|
@@ -107,16 +107,21 @@ def load_registry(ctx: CliContext) -> BackendRegistry:
|
|
|
107
107
|
"""Load the backend registry for *ctx*, honoring the active profile."""
|
|
108
108
|
from katalyst_taxonomy.config.backends import load_backends
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
registry = load_backends(ctx.cwd, profile=ctx.profile)
|
|
111
|
+
return registry.with_variants(ctx.variants) if ctx.variants else registry
|
|
111
112
|
|
|
112
113
|
|
|
113
|
-
def
|
|
114
|
+
def registry_for(ctx: CliContext) -> BackendRegistry:
|
|
115
|
+
""":func:`load_registry`, with a configuration error as a user error, not a traceback."""
|
|
114
116
|
try:
|
|
115
117
|
return load_registry(ctx)
|
|
116
118
|
except Exception as exc: # noqa: BLE001 - config errors are user errors, not tracebacks
|
|
117
119
|
raise click.ClickException(str(exc)) from exc
|
|
118
120
|
|
|
119
121
|
|
|
122
|
+
_registry = registry_for
|
|
123
|
+
|
|
124
|
+
|
|
120
125
|
def _named(registry: BackendRegistry, target: str | None, address: str) -> tuple[str | None, str]:
|
|
121
126
|
"""The backend named by *address* or *target*, and the bare FQTN.
|
|
122
127
|
|
|
@@ -169,6 +174,7 @@ def resolve_backend(
|
|
|
169
174
|
raise click.ClickException(
|
|
170
175
|
f"Name the backend to use with --backend. This profile reads: {reads}."
|
|
171
176
|
)
|
|
177
|
+
registry.check_variant_write(name)
|
|
172
178
|
backend = registry.get(name)
|
|
173
179
|
except BackendAddressError as exc:
|
|
174
180
|
raise click.ClickException(str(exc)) from exc
|
{katalyst_taxonomy_cli-2.0.1a8 → katalyst_taxonomy_cli-2.0.1a9}/src/katalyst_taxonomy_cli/app.py
RENAMED
|
@@ -56,6 +56,7 @@ class KataGroup(click.Group):
|
|
|
56
56
|
from katalyst_taxonomy.config.profiles import UnknownProfileError
|
|
57
57
|
from katalyst_taxonomy.domain.homes import HomeError
|
|
58
58
|
from katalyst_taxonomy.domain.permissions import PermissionDeniedError
|
|
59
|
+
from katalyst_taxonomy.domain.variants import VariantError
|
|
59
60
|
from katalyst_taxonomy.plugins.errors import PluginError
|
|
60
61
|
from katalyst_taxonomy.ports.backend import UnsupportedCapabilityError
|
|
61
62
|
|
|
@@ -67,6 +68,10 @@ class KataGroup(click.Group):
|
|
|
67
68
|
# "Backend 'x' does not support UPDATE": a fact about the backend the user
|
|
68
69
|
# named, with the capabilities it does have — not a traceback.
|
|
69
70
|
raise click.ClickException(str(exc)) from exc
|
|
71
|
+
except VariantError as exc:
|
|
72
|
+
# A variant that is not there, is stale, or a write that names several: the
|
|
73
|
+
# message says which and what to do.
|
|
74
|
+
raise click.ClickException(str(exc)) from exc
|
|
70
75
|
except PluginError as exc:
|
|
71
76
|
# A plugin that will not activate is a user-fixable configuration or
|
|
72
77
|
# environment problem, not a bug in this process — it gets the same
|
|
@@ -482,7 +487,7 @@ def _report_pending_sources() -> None:
|
|
|
482
487
|
for declaration in pending_source_declarations():
|
|
483
488
|
click.echo(
|
|
484
489
|
f"{declaration.describe()}; it is not loaded, because it runs code. Run "
|
|
485
|
-
f"'kata config sync
|
|
490
|
+
f"'{('kata config sync ' + declaration.profile).strip()}' to review and accept it, or "
|
|
486
491
|
f"'{declaration.install_command} {declaration.shown_source}' to install it yourself.",
|
|
487
492
|
err=True,
|
|
488
493
|
)
|
|
@@ -566,6 +571,7 @@ def _register_core_commands() -> None:
|
|
|
566
571
|
status,
|
|
567
572
|
sync,
|
|
568
573
|
update,
|
|
574
|
+
variant,
|
|
569
575
|
versions,
|
|
570
576
|
)
|
|
571
577
|
from .commands import (
|
|
@@ -615,6 +621,7 @@ def _register_core_commands() -> None:
|
|
|
615
621
|
tax.add_command(plugin.plugin)
|
|
616
622
|
tax.add_command(export.export)
|
|
617
623
|
tax.add_command(backend.backend)
|
|
624
|
+
tax.add_command(variant.variant)
|
|
618
625
|
tax.add_command(remove.remove)
|
|
619
626
|
tax.add_command(rescaffold.rescaffold)
|
|
620
627
|
|
|
@@ -8,21 +8,22 @@ MCP ``config_profile_*`` tools and REST ``/config/profiles`` call::
|
|
|
8
8
|
|
|
9
9
|
kata config profile list | show NAME
|
|
10
10
|
kata config profile create NAME [--copy-from P | --source URI [--source-profile P]
|
|
11
|
-
[--token-env VAR]] [--use]
|
|
11
|
+
[--token-env VAR] [--sync-every D]] [--use]
|
|
12
12
|
kata config profile delete NAME [--force]
|
|
13
13
|
kata config profile rename NAME NEW_NAME
|
|
14
14
|
kata config profile use NAME
|
|
15
15
|
kata config profile set-list PROFILE {schemas|plugins|templates} [NAMES...] [--all]
|
|
16
16
|
kata config profile set-source-options NAME [--source-profile P] [--token-env VAR]
|
|
17
|
-
[--unset profile|token_env]
|
|
17
|
+
[--sync-every D] [--unset profile|token_env|sync]
|
|
18
18
|
kata config profile backend list PROFILE | show PROFILE NAME
|
|
19
19
|
kata config profile backend add PROFILE NAME --type TYPE [settings]
|
|
20
20
|
kata config profile backend set PROFILE NAME [settings] [--unset KEY]
|
|
21
21
|
kata config profile backend remove PROFILE NAME [--force]
|
|
22
22
|
|
|
23
23
|
Every change is saved as a whole-document save is: validated, the previous file kept
|
|
24
|
-
as ``config.yaml.bak``, and
|
|
25
|
-
|
|
24
|
+
as ``config.yaml.bak``, and its plugin and schema sources fetched and every source
|
|
25
|
+
pinned. A change writes to no repository: a repository that lacks a template its profile
|
|
26
|
+
uses is named, with the ``kata tax add`` command that installs it.
|
|
26
27
|
|
|
27
28
|
A profile created with ``--source`` is read from elsewhere (see ``kata config sync``):
|
|
28
29
|
its backends and lists are refused here, naming the source to change instead. Which
|
|
@@ -185,6 +186,9 @@ def _report(out: OutputPort, change: ProfileChange, message: str, fmt: str) -> N
|
|
|
185
186
|
if payload["backupPath"]:
|
|
186
187
|
out.info(f"Previous file kept as {payload['backupPath']}")
|
|
187
188
|
for step in payload["synced"]:
|
|
189
|
+
if step["action"] == "missing":
|
|
190
|
+
out.info(f"{step['backend']}: {step['detail']}")
|
|
191
|
+
continue
|
|
188
192
|
where = f" in {step['backend']}" if step["backend"] else ""
|
|
189
193
|
line = f"{step['action']} {step['kind']} {step['name']}{where}"
|
|
190
194
|
detail = f": {step['detail']}" if step["detail"] else ""
|
|
@@ -260,6 +264,10 @@ def profile_list(selected: str | None, fmt: str) -> None:
|
|
|
260
264
|
("config file", payload["configFile"]),
|
|
261
265
|
]
|
|
262
266
|
)
|
|
267
|
+
if payload.get("sharedConfiguration"):
|
|
268
|
+
out.info(f"Using the shared configuration {payload['sharedConfiguration']}.")
|
|
269
|
+
if payload.get("activeProblem"):
|
|
270
|
+
out.warning(payload["activeProblem"])
|
|
263
271
|
|
|
264
272
|
|
|
265
273
|
@profile.command("show")
|
|
@@ -334,6 +342,12 @@ def profile_show(name: str, fmt: str) -> None:
|
|
|
334
342
|
metavar="VAR",
|
|
335
343
|
help="A kata API source: the environment variable holding its bearer token.",
|
|
336
344
|
)
|
|
345
|
+
@click.option(
|
|
346
|
+
"--sync-every",
|
|
347
|
+
default=None,
|
|
348
|
+
metavar="DURATION",
|
|
349
|
+
help="Update a sourced profile by itself: 30m, 1h, 1d (not for a commit).",
|
|
350
|
+
)
|
|
337
351
|
@click.option("--use", "activate", is_flag=True, help="Make it the active profile.")
|
|
338
352
|
@click.option("--format", "fmt", type=_FORMAT_CHOICE, default="text")
|
|
339
353
|
def profile_create(
|
|
@@ -342,6 +356,7 @@ def profile_create(
|
|
|
342
356
|
source: str | None,
|
|
343
357
|
source_profile: str | None,
|
|
344
358
|
token_env: str | None,
|
|
359
|
+
sync_every: str | None,
|
|
345
360
|
activate: bool,
|
|
346
361
|
fmt: str,
|
|
347
362
|
) -> None:
|
|
@@ -359,6 +374,7 @@ def profile_create(
|
|
|
359
374
|
source=source,
|
|
360
375
|
source_profile=source_profile,
|
|
361
376
|
token_env=token_env,
|
|
377
|
+
sync_every=sync_every,
|
|
362
378
|
)
|
|
363
379
|
)
|
|
364
380
|
out = _output()
|
|
@@ -435,30 +451,41 @@ def profile_set_list(
|
|
|
435
451
|
metavar="VAR",
|
|
436
452
|
help="A kata API source: the environment variable holding its bearer token.",
|
|
437
453
|
)
|
|
454
|
+
@click.option(
|
|
455
|
+
"--sync-every",
|
|
456
|
+
default=None,
|
|
457
|
+
metavar="DURATION",
|
|
458
|
+
help="Update the profile by itself: 30m, 1h, 1d (not for a commit).",
|
|
459
|
+
)
|
|
438
460
|
@click.option(
|
|
439
461
|
"--unset",
|
|
440
462
|
"unset",
|
|
441
463
|
multiple=True,
|
|
442
|
-
type=click.Choice(["profile", "token_env"]),
|
|
443
|
-
help="Remove an option: profile (then the source's profile named NAME) or
|
|
464
|
+
type=click.Choice(["profile", "token_env", "sync"]),
|
|
465
|
+
help="Remove an option: profile (then the source's profile named NAME), token_env or sync.",
|
|
444
466
|
)
|
|
445
467
|
@click.option("--format", "fmt", type=_FORMAT_CHOICE, default="text")
|
|
446
468
|
def profile_set_source_options(
|
|
447
469
|
name: str,
|
|
448
470
|
source_profile: str | None,
|
|
449
471
|
token_env: str | None,
|
|
472
|
+
sync_every: str | None,
|
|
450
473
|
unset: tuple[str, ...],
|
|
451
474
|
fmt: str,
|
|
452
475
|
) -> None:
|
|
453
|
-
"""Change which profile of its source sourced profile NAME is,
|
|
476
|
+
"""Change which profile of its source sourced profile NAME is, its token variable, or how often it updates itself.
|
|
454
477
|
|
|
455
478
|
Only this file's reference changes; 'kata config sync NAME' fetches what it names.
|
|
456
479
|
"""
|
|
457
|
-
if source_profile is None and token_env is None and not unset:
|
|
458
|
-
raise click.UsageError("Give --source-profile, --token-env or --unset.")
|
|
480
|
+
if source_profile is None and token_env is None and sync_every is None and not unset:
|
|
481
|
+
raise click.UsageError("Give --source-profile, --token-env, --sync-every or --unset.")
|
|
459
482
|
change: ProfileChange = _run(
|
|
460
483
|
lambda: _service().set_source_options(
|
|
461
|
-
name,
|
|
484
|
+
name,
|
|
485
|
+
source_profile=source_profile,
|
|
486
|
+
token_env=token_env,
|
|
487
|
+
sync_every=sync_every,
|
|
488
|
+
unset=unset,
|
|
462
489
|
)
|
|
463
490
|
)
|
|
464
491
|
out = _output()
|
|
@@ -540,8 +567,9 @@ def backend_add(
|
|
|
540
567
|
) -> None:
|
|
541
568
|
"""Add backend NAME of --type to PROFILE, with its settings as flags.
|
|
542
569
|
|
|
543
|
-
Only the settings the type reads are accepted.
|
|
544
|
-
|
|
570
|
+
Only the settings the type reads are accepted. Adding a backend writes to no
|
|
571
|
+
repository: one that lacks a declared template its profile uses is named, with the
|
|
572
|
+
``kata tax add --bundle`` command that installs it.
|
|
545
573
|
"""
|
|
546
574
|
from katalyst_taxonomy.services.profiles import backend_entry
|
|
547
575
|
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
"""``kata config sync``, ``status``, ``use-shared`` and ``use-own`` — shared configurations and profiles.
|
|
2
|
+
|
|
3
|
+
A computer can use a **shared configuration** (``spec.configSource``): the configuration is
|
|
4
|
+
then that one, every profile, backend, plugin, schema bundle and template as it comes, and
|
|
5
|
+
the file keeps only what is about this computer. Or it keeps its own configuration and adds
|
|
6
|
+
a **shared profile** (a profile with a ``source``). One mechanism sits under both: a source
|
|
7
|
+
is fetched, pinned, consented to, checked and updated. These commands are thin shells over
|
|
8
|
+
:class:`~katalyst_taxonomy.services.config_sources.ConfigSourceService`, the same service the
|
|
9
|
+
MCP ``config_*`` tools and REST ``/config/sources`` call::
|
|
10
|
+
|
|
11
|
+
kata config use-shared SOURCE [--sync-every 30m] [--token-env VAR] [--active P]
|
|
12
|
+
[--workspace DIR] [--replace] [-y]
|
|
13
|
+
kata config use-own [--keep-copy]
|
|
14
|
+
kata config sync [PROFILE...] update the shared configuration and each shared profile
|
|
15
|
+
kata config status [--offline] where each is kept, its pin, and whether the source is ahead
|
|
16
|
+
|
|
17
|
+
The pin and the fetched profiles are kept in the state home, never in config.yaml; every
|
|
18
|
+
other command reads the pinned copy.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
from collections.abc import Callable
|
|
24
|
+
from typing import TYPE_CHECKING, Any
|
|
25
|
+
|
|
26
|
+
import click
|
|
27
|
+
|
|
28
|
+
from ..output import ConsoleOutput, OutputPort
|
|
29
|
+
|
|
30
|
+
if TYPE_CHECKING: # pragma: no cover - typing only
|
|
31
|
+
from katalyst_taxonomy.config.profile_sources import SourceDeclaration
|
|
32
|
+
from katalyst_taxonomy.services.config_sources import (
|
|
33
|
+
ConfigSourceStatus,
|
|
34
|
+
SourceSync,
|
|
35
|
+
StatusReport,
|
|
36
|
+
SyncReport,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
__all__ = ["attach"]
|
|
40
|
+
|
|
41
|
+
_FORMAT_CHOICE = click.Choice(["text", "json"])
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _output() -> OutputPort:
|
|
45
|
+
return ConsoleOutput()
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _short(pin: str | None) -> str:
|
|
49
|
+
"""A commit sha or content hash shortened to 12 characters; an ETag as it is."""
|
|
50
|
+
if not pin:
|
|
51
|
+
return "-"
|
|
52
|
+
if pin.startswith("sha256:"):
|
|
53
|
+
return pin[: len("sha256:") + 12]
|
|
54
|
+
return pin[:12] if len(pin) in (40, 64) else pin
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _asker(out: OutputPort, *, yes: bool, interactive: bool) -> Callable[[SourceDeclaration], bool]:
|
|
58
|
+
"""What decides, per declaration, whether the user accepts code from a source."""
|
|
59
|
+
from katalyst_taxonomy.services.source_consent import CONFIRM_PROMPT, consent_notice
|
|
60
|
+
|
|
61
|
+
def ask(declaration: SourceDeclaration) -> bool:
|
|
62
|
+
if yes:
|
|
63
|
+
return True
|
|
64
|
+
if not interactive:
|
|
65
|
+
return False
|
|
66
|
+
out.info(declaration.describe() + ".")
|
|
67
|
+
click.echo(consent_notice(declaration.section, declaration.source))
|
|
68
|
+
try:
|
|
69
|
+
return click.confirm(CONFIRM_PROMPT, default=False)
|
|
70
|
+
except click.Abort:
|
|
71
|
+
click.echo()
|
|
72
|
+
return False
|
|
73
|
+
|
|
74
|
+
return ask
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@click.command("sync")
|
|
78
|
+
@click.argument("names", nargs=-1, metavar="[PROFILE]...")
|
|
79
|
+
@click.option("--format", "fmt", type=_FORMAT_CHOICE, default="text")
|
|
80
|
+
@click.option(
|
|
81
|
+
"-y",
|
|
82
|
+
"--yes",
|
|
83
|
+
is_flag=True,
|
|
84
|
+
help="Accept every plugin and schema bundle a profile declares, without asking.",
|
|
85
|
+
)
|
|
86
|
+
def config_sync(names: tuple[str, ...], fmt: str, yes: bool) -> None:
|
|
87
|
+
"""Update the shared configuration and each shared profile (or each PROFILE named).
|
|
88
|
+
|
|
89
|
+
A shared configuration is fetched once and every profile in it pinned: a profile new at the
|
|
90
|
+
source appears, one removed there goes. A git source is pinned to its commit, a kata API to
|
|
91
|
+
its ETag or content hash. Each repository a shared profile's filesystem backends name is
|
|
92
|
+
found under spec.workspace by its remote URL, or cloned there. Exits 1 if any fetch
|
|
93
|
+
failed; a failed one keeps its previous pin.
|
|
94
|
+
|
|
95
|
+
A plugin or schema bundle with a source that a shared configuration or profile declares
|
|
96
|
+
runs code when it is loaded, so it is not loaded until you accept it: this asks about
|
|
97
|
+
each one that is new (or whose pin changed), as 'kata tax plugin add' does. A declined
|
|
98
|
+
one stays unloaded and is asked about again at the next update. With --format json
|
|
99
|
+
nothing is asked; only --yes accepts.
|
|
100
|
+
"""
|
|
101
|
+
from katalyst_taxonomy.adapters.orchestration import sync_config_sources
|
|
102
|
+
|
|
103
|
+
out = _output()
|
|
104
|
+
accept = _asker(out, yes=yes, interactive=fmt == "text")
|
|
105
|
+
try:
|
|
106
|
+
report = sync_config_sources(names, accept=accept)
|
|
107
|
+
except ValueError as exc:
|
|
108
|
+
raise click.ClickException(str(exc)) from exc
|
|
109
|
+
print_sync(out, report, fmt)
|
|
110
|
+
if not report.ok:
|
|
111
|
+
raise SystemExit(1)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def print_sync(out: OutputPort, report: SyncReport, fmt: str) -> None:
|
|
115
|
+
"""What an update did, as text or JSON."""
|
|
116
|
+
from katalyst_taxonomy.adapters.orchestration import definition_clash_report
|
|
117
|
+
|
|
118
|
+
if fmt == "json":
|
|
119
|
+
out.json_out(report.as_payload())
|
|
120
|
+
return
|
|
121
|
+
shared = report.configuration
|
|
122
|
+
if not report.profiles and shared is None:
|
|
123
|
+
out.info("No shared configuration or shared profile; nothing to update.")
|
|
124
|
+
return
|
|
125
|
+
if shared is not None:
|
|
126
|
+
if not shared.ok:
|
|
127
|
+
out.warning(f"The shared configuration: {shared.error}")
|
|
128
|
+
else:
|
|
129
|
+
change = (
|
|
130
|
+
f"pinned {_short(shared.pin)}"
|
|
131
|
+
if not shared.previous
|
|
132
|
+
else f"{_short(shared.previous)} -> {_short(shared.pin)}"
|
|
133
|
+
if shared.changed
|
|
134
|
+
else f"unchanged at {_short(shared.pin)}"
|
|
135
|
+
)
|
|
136
|
+
out.success(f"The shared configuration: {shared.source} {change}")
|
|
137
|
+
if shared.added:
|
|
138
|
+
out.info(f" New profiles: {', '.join(shared.added)}.")
|
|
139
|
+
if shared.removed:
|
|
140
|
+
out.warning(
|
|
141
|
+
f" Removed at the source, so no longer here: {', '.join(shared.removed)}."
|
|
142
|
+
)
|
|
143
|
+
for name, why in shared.problems.items():
|
|
144
|
+
out.warning(f" {name} cannot be used: {why}")
|
|
145
|
+
for note in shared.notes:
|
|
146
|
+
out.warning(f" {note}")
|
|
147
|
+
for declaration in shared.accepted:
|
|
148
|
+
out.info(f" Accepted {declaration.kind} {declaration.name!r}.")
|
|
149
|
+
for declaration in shared.pending:
|
|
150
|
+
out.warning(
|
|
151
|
+
f"Not accepted: {declaration.kind} {declaration.name!r} from "
|
|
152
|
+
f"{declaration.shown_source}. It is not loaded; 'kata config sync' asks again."
|
|
153
|
+
)
|
|
154
|
+
for result in report.profiles:
|
|
155
|
+
_print_profile_sync(out, result)
|
|
156
|
+
for clash in definition_clash_report():
|
|
157
|
+
out.warning(clash.describe())
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def _print_profile_sync(out: OutputPort, result: SourceSync) -> None:
|
|
161
|
+
if not result.ok:
|
|
162
|
+
out.warning(f"{result.profile}: {result.error}")
|
|
163
|
+
return
|
|
164
|
+
change = (
|
|
165
|
+
f"pinned {_short(result.pin)}"
|
|
166
|
+
if not result.previous
|
|
167
|
+
else f"{_short(result.previous)} -> {_short(result.pin)}"
|
|
168
|
+
if result.changed
|
|
169
|
+
else f"unchanged at {_short(result.pin)}"
|
|
170
|
+
)
|
|
171
|
+
out.success(f"{result.profile}: {result.source} {change}")
|
|
172
|
+
for clone in result.clones:
|
|
173
|
+
how = "cloned to" if clone.cloned else "using"
|
|
174
|
+
out.info(f" {clone.repository}: {how} {clone.path}")
|
|
175
|
+
for declaration in result.accepted:
|
|
176
|
+
out.info(f" Accepted {declaration.kind} {declaration.name!r}.")
|
|
177
|
+
for declaration in result.pending:
|
|
178
|
+
out.warning(
|
|
179
|
+
f"Not accepted: {declaration.kind} {declaration.name!r} from "
|
|
180
|
+
f"{declaration.shown_source}. It is not loaded; 'kata config sync "
|
|
181
|
+
f"{result.profile}' asks again."
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@click.command("status")
|
|
186
|
+
@click.option(
|
|
187
|
+
"--offline",
|
|
188
|
+
is_flag=True,
|
|
189
|
+
help="Do not ask the sources whether they have moved; report what was last known.",
|
|
190
|
+
)
|
|
191
|
+
@click.option("--format", "fmt", type=_FORMAT_CHOICE, default="text")
|
|
192
|
+
def config_status(offline: bool, fmt: str) -> None:
|
|
193
|
+
"""The shared configuration and each shared profile: where it is kept, its pin, and whether it is ahead."""
|
|
194
|
+
from katalyst_taxonomy.adapters.orchestration import config_source_status
|
|
195
|
+
|
|
196
|
+
out = _output()
|
|
197
|
+
try:
|
|
198
|
+
report: StatusReport = config_source_status(check=not offline)
|
|
199
|
+
except ValueError as exc:
|
|
200
|
+
raise click.ClickException(str(exc)) from exc
|
|
201
|
+
if fmt == "json":
|
|
202
|
+
out.json_out(report.as_payload())
|
|
203
|
+
return
|
|
204
|
+
rows = [r for r in report.profiles if not r.config_source]
|
|
205
|
+
shared = report.configuration
|
|
206
|
+
if not rows and shared is None:
|
|
207
|
+
out.info("This computer's configuration is its own, with no shared profile.")
|
|
208
|
+
return
|
|
209
|
+
if shared is not None:
|
|
210
|
+
out.table(
|
|
211
|
+
["shared configuration", "pin", "fetched", "profiles", "updates", "upstream"],
|
|
212
|
+
[
|
|
213
|
+
[
|
|
214
|
+
shared.source,
|
|
215
|
+
_short(shared.pin) if shared.pin else "never fetched",
|
|
216
|
+
shared.fetched_at or "-",
|
|
217
|
+
", ".join(shared.profiles) or "-",
|
|
218
|
+
f"every {shared.sync_every}" if shared.sync_every else "when you run sync",
|
|
219
|
+
_source_upstream(shared, offline),
|
|
220
|
+
]
|
|
221
|
+
],
|
|
222
|
+
)
|
|
223
|
+
for removed in shared.removed:
|
|
224
|
+
out.warning(f"{removed} was removed at the source.")
|
|
225
|
+
for name, why in shared.problems.items():
|
|
226
|
+
out.warning(f"{name} cannot be used: {why}")
|
|
227
|
+
for declaration, accepted in shared.declarations:
|
|
228
|
+
if not accepted:
|
|
229
|
+
out.warning(declaration.describe() + "; it is not loaded until you accept it.")
|
|
230
|
+
if shared.error:
|
|
231
|
+
out.warning(f"The shared configuration: {shared.error}")
|
|
232
|
+
if rows:
|
|
233
|
+
out.table(
|
|
234
|
+
["profile", "source", "pin", "fetched", "upstream"],
|
|
235
|
+
[
|
|
236
|
+
[
|
|
237
|
+
_profile_label(row),
|
|
238
|
+
row.source,
|
|
239
|
+
_short(row.pin) if row.pin else "never fetched",
|
|
240
|
+
row.fetched_at or "-",
|
|
241
|
+
_upstream(row, offline),
|
|
242
|
+
]
|
|
243
|
+
for row in rows
|
|
244
|
+
],
|
|
245
|
+
)
|
|
246
|
+
for row in rows:
|
|
247
|
+
if row.error:
|
|
248
|
+
out.warning(f"{row.profile}: {row.error}")
|
|
249
|
+
for clash in report.clashes:
|
|
250
|
+
out.warning(clash.describe())
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def _source_upstream(row: ConfigSourceStatus, offline: bool) -> str:
|
|
254
|
+
if row.behind is None:
|
|
255
|
+
return "not checked" if offline else "unknown"
|
|
256
|
+
if row.behind:
|
|
257
|
+
return f"a newer version is available ({_short(row.latest)}) — run 'kata config sync'"
|
|
258
|
+
return "current"
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def _profile_label(row: Any) -> str:
|
|
262
|
+
if row.source_profile == row.profile:
|
|
263
|
+
return str(row.profile)
|
|
264
|
+
if row.pinned_profile and row.pinned_profile != row.source_profile:
|
|
265
|
+
return f"{row.profile} ({row.source_profile}: {row.pinned_profile})"
|
|
266
|
+
return f"{row.profile} ({row.source_profile})"
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def _upstream(row: Any, offline: bool) -> str:
|
|
270
|
+
if row.behind is None:
|
|
271
|
+
return "not checked" if offline else "unknown"
|
|
272
|
+
if row.behind:
|
|
273
|
+
return f"behind ({_short(row.latest)}) — run 'kata config sync {row.profile}'"
|
|
274
|
+
return "current"
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
# ---------------------------------------------------------------------------
|
|
278
|
+
# kata config use-shared / use-own — switch between a shared configuration and your own
|
|
279
|
+
# ---------------------------------------------------------------------------
|
|
280
|
+
def _run(action: Callable[[], Any]) -> Any:
|
|
281
|
+
from katalyst_taxonomy.config.profiles import UnknownProfileError
|
|
282
|
+
from katalyst_taxonomy.services.config_save import ConfigDocumentRejected
|
|
283
|
+
|
|
284
|
+
try:
|
|
285
|
+
return action()
|
|
286
|
+
except ConfigDocumentRejected as exc:
|
|
287
|
+
raise click.ClickException(f"{exc} " + "; ".join(exc.problems)) from exc
|
|
288
|
+
except (UnknownProfileError, ValueError) as exc:
|
|
289
|
+
raise click.ClickException(str(exc)) from exc
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
@click.command("use-shared")
|
|
293
|
+
@click.argument("uri", metavar="SOURCE")
|
|
294
|
+
@click.option(
|
|
295
|
+
"--sync-every",
|
|
296
|
+
default=None,
|
|
297
|
+
metavar="DURATION",
|
|
298
|
+
help="Update it by itself: 15m, 1h, 1d (at least 5s; not for a commit). The API checks it "
|
|
299
|
+
"when it starts and on this interval.",
|
|
300
|
+
)
|
|
301
|
+
@click.option(
|
|
302
|
+
"--token-env",
|
|
303
|
+
default=None,
|
|
304
|
+
metavar="VAR",
|
|
305
|
+
help="A kata API source: the variable holding its token.",
|
|
306
|
+
)
|
|
307
|
+
@click.option(
|
|
308
|
+
"--active",
|
|
309
|
+
default=None,
|
|
310
|
+
metavar="PROFILE",
|
|
311
|
+
help="The shared profile to make active (default: the one the source has active).",
|
|
312
|
+
)
|
|
313
|
+
@click.option(
|
|
314
|
+
"--workspace",
|
|
315
|
+
default=None,
|
|
316
|
+
metavar="DIR",
|
|
317
|
+
help="Where your clones are (spec.workspace); a shared profile's repositories are found or cloned there.",
|
|
318
|
+
)
|
|
319
|
+
@click.option(
|
|
320
|
+
"--replace", is_flag=True, help="Drop the profiles and declarations this file has of its own."
|
|
321
|
+
)
|
|
322
|
+
@click.option(
|
|
323
|
+
"-y",
|
|
324
|
+
"--yes",
|
|
325
|
+
is_flag=True,
|
|
326
|
+
help="Accept the code the shared configuration declares, without asking.",
|
|
327
|
+
)
|
|
328
|
+
@click.option("--format", "fmt", type=_FORMAT_CHOICE, default="text")
|
|
329
|
+
def use_shared(
|
|
330
|
+
uri: str,
|
|
331
|
+
sync_every: str | None,
|
|
332
|
+
token_env: str | None,
|
|
333
|
+
active: str | None,
|
|
334
|
+
workspace: str | None,
|
|
335
|
+
replace: bool,
|
|
336
|
+
yes: bool,
|
|
337
|
+
fmt: str,
|
|
338
|
+
) -> None:
|
|
339
|
+
"""Use the shared configuration at SOURCE as this computer's whole configuration.
|
|
340
|
+
|
|
341
|
+
SOURCE is git:<url>[@<ref>][#path=<file>], github:<owner>/<repo>[@<ref>][#path=<file>],
|
|
342
|
+
a kata API's https:// URL, or home:<home>. You get exactly its profiles, backends,
|
|
343
|
+
plugins, schema bundles and templates, read-only: nothing is added, removed or renamed.
|
|
344
|
+
The file keeps only this computer's settings: the active profile, the workspace and
|
|
345
|
+
the output format. It is fetched first, so a source that cannot be read changes nothing.
|
|
346
|
+
'kata config use-own' switches back.
|
|
347
|
+
"""
|
|
348
|
+
from katalyst_taxonomy.adapters.orchestration import use_shared_configuration
|
|
349
|
+
|
|
350
|
+
out = _output()
|
|
351
|
+
accept = _asker(out, yes=yes, interactive=fmt == "text")
|
|
352
|
+
used = _run(
|
|
353
|
+
lambda: use_shared_configuration(
|
|
354
|
+
uri,
|
|
355
|
+
sync_every=sync_every,
|
|
356
|
+
token_env=token_env,
|
|
357
|
+
active=active,
|
|
358
|
+
workspace=workspace,
|
|
359
|
+
replace=replace,
|
|
360
|
+
accept=accept,
|
|
361
|
+
)
|
|
362
|
+
)
|
|
363
|
+
if fmt == "json":
|
|
364
|
+
out.json_out(used.as_payload())
|
|
365
|
+
return
|
|
366
|
+
print_sync(out, used.report, fmt)
|
|
367
|
+
out.success(f"This computer now uses the shared configuration {uri}, in {used.change.path}")
|
|
368
|
+
out.info(f"Active profile: {used.active}. Switch with 'kata config profile use NAME'.")
|
|
369
|
+
if used.change.backup:
|
|
370
|
+
out.info(f"Previous file kept as {used.change.backup}")
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
@click.command("use-own")
|
|
374
|
+
@click.option(
|
|
375
|
+
"--keep-copy",
|
|
376
|
+
is_flag=True,
|
|
377
|
+
help="Keep a copy of the shared profiles (and what they declare) as your own.",
|
|
378
|
+
)
|
|
379
|
+
@click.option("--format", "fmt", type=_FORMAT_CHOICE, default="text")
|
|
380
|
+
def use_own(keep_copy: bool, fmt: str) -> None:
|
|
381
|
+
"""Stop using the shared configuration; the configuration is yours again.
|
|
382
|
+
|
|
383
|
+
Without --keep-copy the file is left with no profile (add one with 'kata config profile
|
|
384
|
+
create', or 'kata tax init'). With it, the shared profiles as pinned now become your own
|
|
385
|
+
profiles, with the plugins, schema bundles and templates they declare that load here;
|
|
386
|
+
code you never accepted and literal credentials are not copied.
|
|
387
|
+
"""
|
|
388
|
+
from katalyst_taxonomy.adapters.orchestration import use_own_configuration
|
|
389
|
+
|
|
390
|
+
change = _run(lambda: use_own_configuration(keep_copy=keep_copy))
|
|
391
|
+
out = _output()
|
|
392
|
+
if fmt == "json":
|
|
393
|
+
out.json_out(change.as_payload())
|
|
394
|
+
return
|
|
395
|
+
out.success(f"This computer's configuration is its own again, in {change.path}")
|
|
396
|
+
if not keep_copy:
|
|
397
|
+
out.info("It has no profile yet: add one, or run 'kata tax init' in a repository.")
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def attach(group: click.Group) -> None:
|
|
401
|
+
"""Add ``sync``, ``status``, ``use-shared`` and ``use-own`` to the ``kata config`` group."""
|
|
402
|
+
group.add_command(config_sync)
|
|
403
|
+
group.add_command(config_status)
|
|
404
|
+
group.add_command(use_shared)
|
|
405
|
+
group.add_command(use_own)
|
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import click
|
|
6
6
|
|
|
7
7
|
from katalyst_taxonomy_cli.context import CliContext
|
|
8
|
+
from katalyst_taxonomy_cli.options import use_variants, variant_write_option
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
@click.command("create")
|
|
@@ -90,6 +91,7 @@ from katalyst_taxonomy_cli.context import CliContext
|
|
|
90
91
|
"scaffold and create hooks add or change — without writing anything."
|
|
91
92
|
),
|
|
92
93
|
)
|
|
94
|
+
@variant_write_option
|
|
93
95
|
@click.pass_obj
|
|
94
96
|
def create(
|
|
95
97
|
ctx: CliContext,
|
|
@@ -109,6 +111,7 @@ def create(
|
|
|
109
111
|
force: bool,
|
|
110
112
|
reason: str,
|
|
111
113
|
dry_run: bool,
|
|
114
|
+
variant_names: tuple[str, ...],
|
|
112
115
|
) -> None:
|
|
113
116
|
"""Create a NODE_TYPE node called NAME, in the backend --backend names.
|
|
114
117
|
|
|
@@ -130,6 +133,9 @@ def create(
|
|
|
130
133
|
A node starts active, or as a draft (--set lifecycle_state=draft); the lifecycle and
|
|
131
134
|
the gates of its kind are held on create as on update.
|
|
132
135
|
|
|
136
|
+
With --variant NAME the node is written in that variant's folder (a worktree), not
|
|
137
|
+
in the base; a git ref variant, and a backend that is read-only, refuse it.
|
|
138
|
+
|
|
133
139
|
--label KEY=VALUE and --annotation KEY=VALUE go in the node's metadata, on any kind.
|
|
134
140
|
A key is a name of letters, digits, '-', '_' and '.' (at most 63), optionally after a
|
|
135
141
|
DNS prefix and '/' (example.org/team); a label's value is such a name (or empty), an
|
|
@@ -156,6 +162,7 @@ def create(
|
|
|
156
162
|
|
|
157
163
|
if force and not reason.strip():
|
|
158
164
|
raise click.UsageError("--force needs --reason: a forced move is recorded with why.")
|
|
165
|
+
use_variants(ctx, variant_names, write=True)
|
|
159
166
|
resolved_parent = parent or parent_alt
|
|
160
167
|
node_file = read_node_file(from_file)
|
|
161
168
|
labels = {**node_file.labels, **parse_pairs(label_pairs, option="--label")}
|
|
@@ -190,6 +197,7 @@ def create(
|
|
|
190
197
|
dry_run=dry_run,
|
|
191
198
|
force=force,
|
|
192
199
|
reason=reason,
|
|
200
|
+
variants=ctx.variants,
|
|
193
201
|
)
|
|
194
202
|
if exit_code != 0:
|
|
195
203
|
raise SystemExit(exit_code)
|