sanka-cli 0.3.7__tar.gz → 0.3.8__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.
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/PKG-INFO +1 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/pyproject.toml +1 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/__init__.py +7 -5
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/_summary.py +11 -5
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/app.py +36 -9
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/launch.py +5 -4
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/model.py +5 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/services.py +8 -4
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/lifecycle.py +41 -11
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/model.py +35 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/store.py +3 -2
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/__init__.py +1 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_application_summary.py +2 -2
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_cli.py +1 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_cli_developer_experience.py +3 -2
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_lifecycle.py +52 -7
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_wheel_acceptance.py +1 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_mcp_retirement.py +1 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_sanka_facade.py +1 -1
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_tui.py +27 -2
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/.gitignore +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/LICENSES/AGPL-3.0-only.txt +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/LICENSES/Apache-2.0.txt +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/NOTICE +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/README.md +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/_client.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/_compact.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/_output.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/_research.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/cloud.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/history.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/cli/tui/widgets.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/connector/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/connector/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/__about__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/concurrency.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/connector_client.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/connector_host.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/engine.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/continuous.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/errors.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/local.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/model.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/report_codec.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/routes.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/scope.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/state.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/execution/validate.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/artifacts.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/code_lifecycle.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/code_repair.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/discovery.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/runner.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/settings.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/extensions/stage.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/extension.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/host.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/lifecycle.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/merge.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/model.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/native_verification.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/planner.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/sqlite.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/state.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/verification.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/flow/verification_plan.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/hashing.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/mapping/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/mapping/errors.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/mapping/mapping_candidates.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/mapping/model.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/mapping/owner_mapping.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/mapping/pending_relationships.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/mapping/record_mapping.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/planner.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/private_sqlite.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/registry.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/safe_local_io.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/spec.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka/runtime/state.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/__main__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/bundle.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/certificates.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/client.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/cloud_source.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/ai.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/auth.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/cloud.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/cloud_fleet.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/cloud_github.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/cloud_migrate.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/code.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/code_cloud.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/doctor.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/fix.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/functions.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/migrate.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/profiles.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/resources.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/skill.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/workflow_templates.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/commands/workflows.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/config.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/main.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/output.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/runtime.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/skills/sanka-cli/SKILL.md +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_cli/state.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/__about__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/credentials.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/errors.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/protocols.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/provisioning.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/records.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/registration.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_connector/schema.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extension_sdk/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extension_sdk/contract.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extension_sdk/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/__about__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/credentials.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/errors.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/protocols.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/provisioning.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/records.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/registration.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/app/schema.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/code/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/code/contract.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/_wire.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/blueprint.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/definition.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/graph.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/identity.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/native.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/native_fixtures.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/native_process_recipes.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/native_profiles.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/native_recipes.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/native_task_recipes.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/native_verification.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/protocol.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/scenario.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/flow/source.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/__about__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/credentials.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/errors.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/protocols.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/provisioning.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/py.typed +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/records.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/registration.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/src/sanka_extensions/systems/schema.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/conftest.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_drf_project/api/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_drf_project/api/serializers.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_drf_project/api/views.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_drf_project/config/__init__.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_drf_project/config/settings.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_drf_project/config/urls.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_drf_project/manage.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_marketplace/drf-to-fastapi.json +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/extension_marketplace/marketplace.json +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/flow/synthetic_native_order_billing_blueprint.json +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/flow/synthetic_sales_created_estimate_blueprint.json +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/fixtures/flow/synthetic_sales_quote_blueprint.json +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/flow_wheel_acceptance.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_business_flow_extension_acceptance.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_code_bundle.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_code_commands.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_code_lifecycle.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_code_repair.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_concurrency.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_connector_client.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_connector_host.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_credential_provider.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_doctor.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_engine_e2e.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_engine_execution_adoption.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_engine_pg_to_clickhouse_e2e.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_engine_postgres_e2e.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_continuous.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_exact_scope.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_local_store.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_report_codec.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_routes.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_scope.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_seam.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_execution_validate.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_discovery.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_endpoint_scope.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_runner.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_settings.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_stage.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_extension_store.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_extension.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_extension_wheel_acceptance.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_lifecycle.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_merge.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_native_lifecycle.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_native_verification.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_planner.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_sdk_codec.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_sqlite.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_flow_verification.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_hashing.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_help_shortcuts.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_hosted_cli.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_mapping_candidates.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_mapping_owner_mapping.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_mapping_pending_relationships.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_mapping_record_mapping.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_marketplace_aliases.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_plan_input_hints.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_planner.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_registry.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_safe_local_io.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_skill_commands.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_spec.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_state_store.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_tui_conditional_settings.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_tui_endpoint_selection.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_tui_extension_install.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/test_workflow_templates_cli.py +0 -0
- {sanka_cli-0.3.7 → sanka_cli-0.3.8}/tests/tui_helpers.py +0 -0
|
@@ -20,7 +20,7 @@ Shorthand and provider selection::
|
|
|
20
20
|
Django REST Framework to FastAPI compatibility flow::
|
|
21
21
|
|
|
22
22
|
sanka scan
|
|
23
|
-
sanka plan --to fastapi
|
|
23
|
+
sanka plan --to python-fastapi
|
|
24
24
|
sanka apply --plan-hash sha256:...
|
|
25
25
|
sanka test
|
|
26
26
|
sanka verify
|
|
@@ -337,7 +337,7 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
|
|
|
337
337
|
),
|
|
338
338
|
epilog=(
|
|
339
339
|
"Interactive: sanka plan .\n"
|
|
340
|
-
"Non-interactive: sanka plan . --to fastapi --generation full "
|
|
340
|
+
"Non-interactive: sanka plan . --to python-fastapi --generation full "
|
|
341
341
|
"--output ./fastapi-app --strategy native --package-manager uv\n"
|
|
342
342
|
"Next: sanka apply --plan-hash <printed-hash>"
|
|
343
343
|
),
|
|
@@ -345,7 +345,9 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
|
|
|
345
345
|
)
|
|
346
346
|
common(plan)
|
|
347
347
|
plan.add_argument("root", nargs="?", default=".", help="application repository root")
|
|
348
|
-
plan.add_argument(
|
|
348
|
+
plan.add_argument(
|
|
349
|
+
"--to", help="target language-framework (for example python-fastapi or go-fiber)"
|
|
350
|
+
)
|
|
349
351
|
plan.add_argument(
|
|
350
352
|
"--strategy",
|
|
351
353
|
choices=PLAN_STRATEGIES,
|
|
@@ -1144,8 +1146,8 @@ def _print_application_result(
|
|
|
1144
1146
|
|
|
1145
1147
|
async def _cmd_plan(args: argparse.Namespace) -> int:
|
|
1146
1148
|
if _application_lifecycle_requested(args):
|
|
1147
|
-
if args.swagger_ui is not None and args.to not in (None, "fastapi"):
|
|
1148
|
-
raise CliUsageError("--swagger-ui/--no-swagger-ui requires --to fastapi")
|
|
1149
|
+
if args.swagger_ui is not None and args.to not in (None, "fastapi", "python-fastapi"):
|
|
1150
|
+
raise CliUsageError("--swagger-ui/--no-swagger-ui requires --to python-fastapi")
|
|
1149
1151
|
selection: dict[str, Any] = {}
|
|
1150
1152
|
if args.endpoint or args.all_endpoints:
|
|
1151
1153
|
selection = {"endpoint_ids": tuple(args.endpoint), "all_endpoints": args.all_endpoints}
|
|
@@ -12,6 +12,8 @@ from collections.abc import Mapping
|
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
from typing import Any
|
|
14
14
|
|
|
15
|
+
from sanka.runtime.extensions.model import canonical_target
|
|
16
|
+
|
|
15
17
|
_FRAMEWORK_LABELS = {
|
|
16
18
|
"django-rest-framework": "DRF",
|
|
17
19
|
"drf": "DRF",
|
|
@@ -116,7 +118,7 @@ def _target_from_extension_id(extension_id: Any) -> str | None:
|
|
|
116
118
|
if "-to-" not in name:
|
|
117
119
|
return None
|
|
118
120
|
target = name.rsplit("-to-", 1)[-1].strip()
|
|
119
|
-
return target
|
|
121
|
+
return canonical_target(extension_id, target) if target else None
|
|
120
122
|
|
|
121
123
|
|
|
122
124
|
def _scan_targets(data: Mapping[str, Any]) -> list[str]:
|
|
@@ -133,14 +135,18 @@ def _scan_targets(data: Mapping[str, Any]) -> list[str]:
|
|
|
133
135
|
continue
|
|
134
136
|
explicit = entry.get("targets")
|
|
135
137
|
record = entry.get("extension")
|
|
138
|
+
identifier = entry.get("id")
|
|
139
|
+
if identifier is None and isinstance(record, Mapping):
|
|
140
|
+
identifier = record.get("id")
|
|
136
141
|
if not explicit and isinstance(record, Mapping):
|
|
137
142
|
explicit = record.get("targets")
|
|
138
143
|
for candidate in explicit or ():
|
|
139
|
-
add(
|
|
144
|
+
add(
|
|
145
|
+
canonical_target(identifier, candidate)
|
|
146
|
+
if isinstance(identifier, str) and isinstance(candidate, str)
|
|
147
|
+
else candidate
|
|
148
|
+
)
|
|
140
149
|
if not explicit:
|
|
141
|
-
identifier = entry.get("id")
|
|
142
|
-
if identifier is None and isinstance(record, Mapping):
|
|
143
|
-
identifier = record.get("id")
|
|
144
150
|
add(_target_from_extension_id(identifier))
|
|
145
151
|
return targets
|
|
146
152
|
|
|
@@ -50,6 +50,7 @@ from sanka.cli.tui.model import (
|
|
|
50
50
|
)
|
|
51
51
|
from sanka.cli.tui.services import TuiServices, cloud_exit_code, preferred_extension
|
|
52
52
|
from sanka.cli.tui.widgets import ActivityLog, CliLine, EmptyState, KeysBar, StageHeader
|
|
53
|
+
from sanka.runtime.extensions.model import canonical_target
|
|
53
54
|
from sanka.runtime.extensions.settings import Setting, setting_defaults
|
|
54
55
|
from sanka_cli import __version__
|
|
55
56
|
|
|
@@ -376,7 +377,7 @@ class SearchModal(ModalScreen[str | None]):
|
|
|
376
377
|
label = choice.status_label.lower()
|
|
377
378
|
if status and status not in choice.status and label != status.lower():
|
|
378
379
|
continue
|
|
379
|
-
if target and target not in choice.targets:
|
|
380
|
+
if target and canonical_target(choice.id, target) not in choice.targets:
|
|
380
381
|
continue
|
|
381
382
|
prompt = f"{choice.label} {choice.kind_label} {', '.join(choice.targets) or '-'}"
|
|
382
383
|
if needle and needle not in f"{choice.id} {prompt}".casefold():
|
|
@@ -659,6 +660,8 @@ class PlanConfiguration(ModalScreen[dict[str, Any] | None]):
|
|
|
659
660
|
widget = f"plan-set-{setting.id}"
|
|
660
661
|
if setting.type == "choice":
|
|
661
662
|
values = [choice.value for choice in setting.choices]
|
|
663
|
+
if setting.id == "source_framework" and f"python-{current}" in values:
|
|
664
|
+
current = f"python-{current}"
|
|
662
665
|
yield Select(
|
|
663
666
|
[
|
|
664
667
|
(setting.text(choice.label, self.locale), choice.value)
|
|
@@ -761,9 +764,12 @@ class PlanConfiguration(ModalScreen[dict[str, Any] | None]):
|
|
|
761
764
|
elif self.drf:
|
|
762
765
|
yield Label("Output directory (inside this project)")
|
|
763
766
|
yield Input(
|
|
764
|
-
str(
|
|
767
|
+
str(
|
|
768
|
+
self.values.get("output", f"{self.target.removeprefix('python-')}-app")
|
|
769
|
+
),
|
|
770
|
+
id="plan-output",
|
|
765
771
|
)
|
|
766
|
-
if self.target
|
|
772
|
+
if self.target in {"fastapi", "python-fastapi"}:
|
|
767
773
|
for name, label, options, default in (
|
|
768
774
|
(
|
|
769
775
|
"generation",
|
|
@@ -820,7 +826,7 @@ class PlanConfiguration(ModalScreen[dict[str, Any] | None]):
|
|
|
820
826
|
yield Input(str(self.values.get("settings_module", "")), id="plan-settings")
|
|
821
827
|
yield Label("Additional extension configuration (JSON object)")
|
|
822
828
|
known = {"output", "settings_module"} | {item.id for item in self.declared}
|
|
823
|
-
if self.target
|
|
829
|
+
if self.target in {"fastapi", "python-fastapi"}:
|
|
824
830
|
known.update({"generation", "strategy", "package_manager", "swagger_ui"})
|
|
825
831
|
extra = {
|
|
826
832
|
k: v
|
|
@@ -855,7 +861,7 @@ class PlanConfiguration(ModalScreen[dict[str, Any] | None]):
|
|
|
855
861
|
if not output or destination == root or not destination.is_relative_to(root):
|
|
856
862
|
raise ValueError("Choose an output directory inside the project.")
|
|
857
863
|
values["output"] = output
|
|
858
|
-
if self.target
|
|
864
|
+
if self.target in {"fastapi", "python-fastapi"}:
|
|
859
865
|
for name in ("generation", "strategy", "package_manager"):
|
|
860
866
|
values[name] = self.query_one(f"#plan-{name}", Select).value
|
|
861
867
|
allowed = {
|
|
@@ -1417,6 +1423,15 @@ class StageScreen(SankaScreen):
|
|
|
1417
1423
|
self.refresh_footer()
|
|
1418
1424
|
return
|
|
1419
1425
|
chosen = self.sanka.session.target
|
|
1426
|
+
if chosen and chosen not in self._targets:
|
|
1427
|
+
chosen = next(
|
|
1428
|
+
(
|
|
1429
|
+
canonical_target(item.id, chosen)
|
|
1430
|
+
for item in self.sanka.services.extensions(target=chosen)
|
|
1431
|
+
if canonical_target(item.id, chosen) in self._targets
|
|
1432
|
+
),
|
|
1433
|
+
chosen,
|
|
1434
|
+
)
|
|
1420
1435
|
listing.highlighted = matches.index(chosen) if chosen in matches else 0
|
|
1421
1436
|
self._remember_target()
|
|
1422
1437
|
|
|
@@ -1446,7 +1461,14 @@ class StageScreen(SankaScreen):
|
|
|
1446
1461
|
return
|
|
1447
1462
|
option = listing.get_option_at_index(listing.highlighted)
|
|
1448
1463
|
session = self.sanka.session
|
|
1449
|
-
|
|
1464
|
+
equivalent = session.target == str(option.id) or (
|
|
1465
|
+
session.target is not None
|
|
1466
|
+
and any(
|
|
1467
|
+
canonical_target(item.id, session.target) == str(option.id)
|
|
1468
|
+
for item in self.sanka.services.extensions(target=str(option.id))
|
|
1469
|
+
)
|
|
1470
|
+
)
|
|
1471
|
+
if not equivalent:
|
|
1450
1472
|
for key in ("selected_endpoints", "target", "target_framework"):
|
|
1451
1473
|
session.configuration.pop(key, None)
|
|
1452
1474
|
session.endpoints = []
|
|
@@ -1536,9 +1558,11 @@ class StageScreen(SankaScreen):
|
|
|
1536
1558
|
self.notify("Choose a target first.")
|
|
1537
1559
|
return
|
|
1538
1560
|
choices = self.sanka.services.extensions(target=target)
|
|
1539
|
-
drf = any(item.id == f"sanka/drf-to-{target}" for item in choices)
|
|
1561
|
+
drf = any(item.id == f"sanka/drf-to-{target.removeprefix('python-')}" for item in choices)
|
|
1540
1562
|
extension = (
|
|
1541
|
-
f"sanka/drf-to-{target
|
|
1563
|
+
f"sanka/drf-to-{target.removeprefix('python-')}"
|
|
1564
|
+
if drf
|
|
1565
|
+
else self.sanka.services.used_extension_id(target)
|
|
1542
1566
|
)
|
|
1543
1567
|
settings = self.sanka.services.extension_settings(extension) if extension else None
|
|
1544
1568
|
self.app.push_screen(
|
|
@@ -1624,7 +1648,10 @@ class StageScreen(SankaScreen):
|
|
|
1624
1648
|
return
|
|
1625
1649
|
choices = self.sanka.services.extensions(target=session.target)
|
|
1626
1650
|
if (
|
|
1627
|
-
any(
|
|
1651
|
+
any(
|
|
1652
|
+
item.id == f"sanka/drf-to-{session.target.removeprefix('python-')}"
|
|
1653
|
+
for item in choices
|
|
1654
|
+
)
|
|
1628
1655
|
and self._configured_target != session.target
|
|
1629
1656
|
):
|
|
1630
1657
|
self._configure_plan()
|
|
@@ -81,13 +81,14 @@ def launch_local(args: Any) -> int:
|
|
|
81
81
|
autostart = False
|
|
82
82
|
if command in _LIFECYCLE:
|
|
83
83
|
from sanka.cli import _extension_configuration
|
|
84
|
-
from sanka.runtime.extensions.lifecycle import
|
|
84
|
+
from sanka.runtime.extensions.lifecycle import (
|
|
85
|
+
resolve_plan_configuration,
|
|
86
|
+
saved_configuration,
|
|
87
|
+
)
|
|
85
88
|
|
|
86
89
|
session.target = getattr(args, "to", None)
|
|
87
90
|
session.plan_hash = getattr(args, "plan_hash", None)
|
|
88
|
-
saved =
|
|
89
|
-
if session.target is not None and session.target != saved.get("target"):
|
|
90
|
-
saved = {}
|
|
91
|
+
saved = saved_configuration(root, artifact_dir, session.target)
|
|
91
92
|
session.configuration = resolve_plan_configuration(saved, _extension_configuration(args))
|
|
92
93
|
if session.target is None:
|
|
93
94
|
session.target = session.configuration.get("target")
|
|
@@ -9,6 +9,8 @@ from dataclasses import dataclass, field
|
|
|
9
9
|
from datetime import UTC, datetime
|
|
10
10
|
from typing import Any
|
|
11
11
|
|
|
12
|
+
from sanka.runtime.extensions.model import canonical_targets
|
|
13
|
+
|
|
12
14
|
LIFECYCLE_COMMANDS = frozenset({"scan", "plan", "apply", "test", "verify"})
|
|
13
15
|
IMPLEMENTATIONS = frozenset({"not_migrated", "already_implemented", "skip", "unknown"})
|
|
14
16
|
_DISPLAY_WORDS = {
|
|
@@ -455,7 +457,9 @@ def extension_from_recommendation(value: object) -> ExtensionChoice | None:
|
|
|
455
457
|
marketplace=str(value.get("marketplace") or ""),
|
|
456
458
|
marketplace_identity=str(value.get("marketplace_identity") or ""),
|
|
457
459
|
kind="migration",
|
|
458
|
-
targets=
|
|
460
|
+
targets=canonical_targets(
|
|
461
|
+
value["id"], tuple(item for item in targets if isinstance(item, str))
|
|
462
|
+
)
|
|
459
463
|
if isinstance(targets, list)
|
|
460
464
|
else (),
|
|
461
465
|
status=frozenset(item for item in status if isinstance(item, str))
|
|
@@ -28,7 +28,7 @@ from sanka.cli.tui.model import (
|
|
|
28
28
|
progress_fraction,
|
|
29
29
|
)
|
|
30
30
|
from sanka.runtime.extensions.lifecycle import saved_configuration, saved_plan
|
|
31
|
-
from sanka.runtime.extensions.model import ExtensionError
|
|
31
|
+
from sanka.runtime.extensions.model import ExtensionError, canonical_target, canonical_targets
|
|
32
32
|
from sanka.runtime.extensions.settings import ExtensionSettings
|
|
33
33
|
|
|
34
34
|
Activity = Callable[[str], None]
|
|
@@ -127,7 +127,7 @@ def _choice_from_record(
|
|
|
127
127
|
marketplace=record.marketplace,
|
|
128
128
|
marketplace_identity=record.marketplace_identity,
|
|
129
129
|
kind=record.kind,
|
|
130
|
-
targets=tuple(record.targets),
|
|
130
|
+
targets=canonical_targets(record.id, tuple(record.targets)),
|
|
131
131
|
status=frozenset(record.status),
|
|
132
132
|
commands=commands,
|
|
133
133
|
runtime_specifier=runtime_specifier,
|
|
@@ -240,7 +240,7 @@ class HostServices:
|
|
|
240
240
|
continue
|
|
241
241
|
if status and status not in choice.status and choice.status_label != status:
|
|
242
242
|
continue
|
|
243
|
-
if target and target not in choice.targets:
|
|
243
|
+
if target and canonical_target(choice.id, target) not in choice.targets:
|
|
244
244
|
continue
|
|
245
245
|
haystack = " ".join(
|
|
246
246
|
(choice.id, choice.kind_label, *choice.targets, choice.label)
|
|
@@ -305,7 +305,11 @@ class HostServices:
|
|
|
305
305
|
and "incompatible" not in item.status
|
|
306
306
|
]
|
|
307
307
|
if target:
|
|
308
|
-
matched = [
|
|
308
|
+
matched = [
|
|
309
|
+
item
|
|
310
|
+
for item in enabled
|
|
311
|
+
if canonical_target(item.id, target) in canonical_targets(item.id, item.targets)
|
|
312
|
+
]
|
|
309
313
|
if len(matched) == 1:
|
|
310
314
|
return str(matched[0].id)
|
|
311
315
|
if len(enabled) == 1:
|
|
@@ -16,6 +16,10 @@ from sanka.runtime.extensions.model import (
|
|
|
16
16
|
Fingerprint,
|
|
17
17
|
MatchedEvidence,
|
|
18
18
|
Recommendation,
|
|
19
|
+
canonical_target,
|
|
20
|
+
canonical_targets,
|
|
21
|
+
wire_configuration,
|
|
22
|
+
wire_target,
|
|
19
23
|
)
|
|
20
24
|
from sanka.runtime.extensions.runner import (
|
|
21
25
|
ExtensionResult,
|
|
@@ -74,8 +78,21 @@ def saved_plan(project_root: Path, artifact_dir: str = ".sanka") -> dict[str, An
|
|
|
74
78
|
def saved_configuration(
|
|
75
79
|
project_root: Path, artifact_dir: str = ".sanka", target: str | None = None
|
|
76
80
|
) -> dict[str, Any]:
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
plan = saved_plan(project_root, artifact_dir)
|
|
82
|
+
values = plan.get("configuration")
|
|
83
|
+
extension = plan.get("extension")
|
|
84
|
+
extension_id = extension.get("id") if isinstance(extension, dict) else None
|
|
85
|
+
if not isinstance(extension_id, str):
|
|
86
|
+
return {}
|
|
87
|
+
if (
|
|
88
|
+
not isinstance(values, dict)
|
|
89
|
+
or not isinstance(values.get("target"), str)
|
|
90
|
+
or (
|
|
91
|
+
target is not None
|
|
92
|
+
and canonical_target(extension_id, target)
|
|
93
|
+
!= canonical_target(extension_id, values.get("target", ""))
|
|
94
|
+
)
|
|
95
|
+
):
|
|
79
96
|
return {}
|
|
80
97
|
return dict(values)
|
|
81
98
|
|
|
@@ -121,7 +138,7 @@ def _recommendation(value: Recommendation) -> dict[str, Any]:
|
|
|
121
138
|
"manifest_digest": value.manifest_digest,
|
|
122
139
|
"commands": list(value.commands),
|
|
123
140
|
"status": list(value.status),
|
|
124
|
-
"targets": list(value.targets),
|
|
141
|
+
"targets": list(canonical_targets(value.id, value.targets)),
|
|
125
142
|
"version": value.version,
|
|
126
143
|
}
|
|
127
144
|
|
|
@@ -330,7 +347,7 @@ class ApplicationLifecycle:
|
|
|
330
347
|
return {
|
|
331
348
|
"artifact_root": str(self._extension_root(lock)),
|
|
332
349
|
"command": command,
|
|
333
|
-
"configuration": configuration,
|
|
350
|
+
"configuration": wire_configuration(lock.id, configuration),
|
|
334
351
|
"extension": {
|
|
335
352
|
"id": lock.id,
|
|
336
353
|
"manifest_digest": lock.manifest_digest.removeprefix("sha256:"),
|
|
@@ -565,7 +582,11 @@ class ApplicationLifecycle:
|
|
|
565
582
|
explicit_keys: frozenset[str] = frozenset(),
|
|
566
583
|
) -> ExtensionResult:
|
|
567
584
|
enabled = self._enabled(recommendations)
|
|
568
|
-
targets = tuple(
|
|
585
|
+
targets = tuple(
|
|
586
|
+
sorted(
|
|
587
|
+
{target for item in enabled for target in canonical_targets(item.id, item.targets)}
|
|
588
|
+
)
|
|
589
|
+
)
|
|
569
590
|
selected_target = target or self._prompt("Choose a migration target", targets)
|
|
570
591
|
if selected_target is None:
|
|
571
592
|
_error(
|
|
@@ -573,7 +594,12 @@ class ApplicationLifecycle:
|
|
|
573
594
|
"A migration target is required outside an interactive terminal",
|
|
574
595
|
targets=list(targets),
|
|
575
596
|
)
|
|
576
|
-
selected = tuple(
|
|
597
|
+
selected = tuple(
|
|
598
|
+
item
|
|
599
|
+
for item in enabled
|
|
600
|
+
if canonical_target(item.id, selected_target)
|
|
601
|
+
in canonical_targets(item.id, item.targets)
|
|
602
|
+
)
|
|
577
603
|
if not selected:
|
|
578
604
|
_error(
|
|
579
605
|
"SANKA_EXTENSION_REQUIRED",
|
|
@@ -589,7 +615,11 @@ class ApplicationLifecycle:
|
|
|
589
615
|
extensions=[item.id for item in selected],
|
|
590
616
|
)
|
|
591
617
|
configured_target = normalized.get("target")
|
|
592
|
-
if configured_target is not None and
|
|
618
|
+
if configured_target is not None and (
|
|
619
|
+
not isinstance(configured_target, str)
|
|
620
|
+
or canonical_target(selected[0].id, configured_target)
|
|
621
|
+
!= canonical_target(selected[0].id, selected_target)
|
|
622
|
+
):
|
|
593
623
|
_error(
|
|
594
624
|
"SANKA_EXTENSION_TARGET_MISMATCH",
|
|
595
625
|
"The selected target differs from configuration.target",
|
|
@@ -686,7 +716,7 @@ class ApplicationLifecycle:
|
|
|
686
716
|
available_ids=available,
|
|
687
717
|
)
|
|
688
718
|
normalized["selected_endpoints"] = sorted(set(requested_ids) | set(retained))
|
|
689
|
-
request["configuration"] = normalized
|
|
719
|
+
request["configuration"] = wire_configuration(lock.id, normalized)
|
|
690
720
|
scope_resolved = True
|
|
691
721
|
continue
|
|
692
722
|
break
|
|
@@ -723,7 +753,7 @@ class ApplicationLifecycle:
|
|
|
723
753
|
inputs=list(inputs),
|
|
724
754
|
)
|
|
725
755
|
for name in inputs:
|
|
726
|
-
choices, default = self._input_hint(name, selected_target)
|
|
756
|
+
choices, default = self._input_hint(name, wire_target(lock.id, selected_target))
|
|
727
757
|
label = f"Extension configuration: {name}"
|
|
728
758
|
declared = next(
|
|
729
759
|
(item for item in settings if item.id == name and item.visible(normalized)),
|
|
@@ -744,7 +774,7 @@ class ApplicationLifecycle:
|
|
|
744
774
|
self._raise_failure(result)
|
|
745
775
|
normalized[name] = answer
|
|
746
776
|
seen_inputs.add(name)
|
|
747
|
-
request["configuration"] = normalized
|
|
777
|
+
request["configuration"] = wire_configuration(lock.id, normalized)
|
|
748
778
|
requested = normalized.get("selected_endpoints")
|
|
749
779
|
if requested is not None:
|
|
750
780
|
scope = result.data.get("endpoint_scope")
|
|
@@ -769,7 +799,7 @@ class ApplicationLifecycle:
|
|
|
769
799
|
)
|
|
770
800
|
swagger_ui = normalized.get("swagger_ui")
|
|
771
801
|
if (
|
|
772
|
-
selected_target == "fastapi"
|
|
802
|
+
wire_target(lock.id, selected_target) == "fastapi"
|
|
773
803
|
and isinstance(swagger_ui, bool)
|
|
774
804
|
and result.data.get("swagger_ui") is not swagger_ui
|
|
775
805
|
):
|
|
@@ -9,6 +9,41 @@ from typing import Any, Literal
|
|
|
9
9
|
LIFECYCLE_COMMANDS = frozenset({"apply", "plan", "scan", "test", "verify"})
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
# Public choices are qualified; published extension requests keep their wire names.
|
|
13
|
+
_FRAMEWORK_TARGETS = {
|
|
14
|
+
"sanka/drf-to-fastapi": {"fastapi": "python-fastapi"},
|
|
15
|
+
"sanka/drf-to-flask": {"flask": "python-flask"},
|
|
16
|
+
"sanka/python-to-golang": {name: f"go-{name}" for name in ("fiber", "chi", "mux", "gin")},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def canonical_target(extension_id: str, target: str) -> str:
|
|
21
|
+
return _FRAMEWORK_TARGETS.get(extension_id, {}).get(target, target)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def canonical_targets(extension_id: str, targets: tuple[str, ...]) -> tuple[str, ...]:
|
|
25
|
+
return tuple(sorted({canonical_target(extension_id, target) for target in targets}))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def wire_target(extension_id: str, target: str) -> str:
|
|
29
|
+
return next(
|
|
30
|
+
(old for old, new in _FRAMEWORK_TARGETS.get(extension_id, {}).items() if new == target),
|
|
31
|
+
target,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def wire_configuration(extension_id: str, values: dict[str, Any]) -> dict[str, Any]:
|
|
36
|
+
result = dict(values)
|
|
37
|
+
for key in ("target", "target_framework"):
|
|
38
|
+
if isinstance(result.get(key), str):
|
|
39
|
+
result[key] = wire_target(extension_id, result[key])
|
|
40
|
+
if extension_id == "sanka/python-to-golang":
|
|
41
|
+
source = result.get("source_framework")
|
|
42
|
+
if source in ("python-drf", "python-fastapi", "python-flask"):
|
|
43
|
+
result["source_framework"] = source.removeprefix("python-")
|
|
44
|
+
return result
|
|
45
|
+
|
|
46
|
+
|
|
12
47
|
class ExtensionError(RuntimeError):
|
|
13
48
|
"""An extension boundary failed with a stable machine-readable code."""
|
|
14
49
|
|
|
@@ -50,6 +50,7 @@ from sanka.runtime.extensions.model import (
|
|
|
50
50
|
Manifest,
|
|
51
51
|
Recommendation,
|
|
52
52
|
Wheel,
|
|
53
|
+
canonical_targets,
|
|
53
54
|
)
|
|
54
55
|
from sanka.runtime.extensions.settings import ExtensionSettings, read_wheel_settings
|
|
55
56
|
from sanka.runtime.hashing import content_hash
|
|
@@ -60,7 +61,7 @@ OFFICIAL_IDENTITY = "github.com/sankaHQ/extensions"
|
|
|
60
61
|
OFFICIAL_SOURCE = "https://github.com/sankaHQ/extensions.git"
|
|
61
62
|
# Advance only after verifying the catalog's published release wheels.
|
|
62
63
|
# Development entries may still refer to releases awaiting publication.
|
|
63
|
-
OFFICIAL_REVISION = "
|
|
64
|
+
OFFICIAL_REVISION = "21ce3a6fb85f03692ff549fe13324725929e0615"
|
|
64
65
|
DEFAULT_EXTENSION_ID = "sanka/drf-to-fastapi"
|
|
65
66
|
MAX_WHEEL_BYTES = 128 * 1024 * 1024
|
|
66
67
|
MAX_WHEEL_UNCOMPRESSED_BYTES = 512 * 1024 * 1024
|
|
@@ -384,7 +385,7 @@ class ExtensionRecord:
|
|
|
384
385
|
"providers": [
|
|
385
386
|
asdict(provider) | {"roles": list(provider.roles)} for provider in self.providers
|
|
386
387
|
],
|
|
387
|
-
"targets": list(self.targets),
|
|
388
|
+
"targets": list(canonical_targets(self.id, self.targets)),
|
|
388
389
|
"status": list(self.status),
|
|
389
390
|
"wheels": [asdict(wheel) for wheel in self.wheels],
|
|
390
391
|
}
|
|
@@ -40,7 +40,7 @@ def test_scan_summary_lists_versions_counts_and_hash() -> None:
|
|
|
40
40
|
"",
|
|
41
41
|
"scan hash: sha256:" + "a" * 64,
|
|
42
42
|
]
|
|
43
|
-
assert hint == "sanka plan . --to fastapi"
|
|
43
|
+
assert hint == "sanka plan . --to python-fastapi"
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
def test_scan_summary_without_a_single_target_keeps_a_placeholder() -> None:
|
|
@@ -173,7 +173,7 @@ def test_scan_hint_derives_the_target_from_the_extension_id() -> None:
|
|
|
173
173
|
"extensions": [{"extension": {"id": "sanka/drf-to-fastapi", "version": "0.1.0a10"}}],
|
|
174
174
|
},
|
|
175
175
|
)
|
|
176
|
-
assert hint == "sanka plan . --to fastapi"
|
|
176
|
+
assert hint == "sanka plan . --to python-fastapi"
|
|
177
177
|
|
|
178
178
|
_lines, ambiguous = application_summary(
|
|
179
179
|
"scan",
|
|
@@ -611,7 +611,7 @@ def test_api_client_uses_public_branded_base_and_unwraps_data() -> None:
|
|
|
611
611
|
assert request.get_method() == "POST"
|
|
612
612
|
assert isinstance(request.data, bytes)
|
|
613
613
|
assert json.loads(request.data) == {"source": "SAP ECC", "lang": "ja"}
|
|
614
|
-
assert request.get_header("User-agent") == "sanka-cli/0.3.
|
|
614
|
+
assert request.get_header("User-agent") == "sanka-cli/0.3.8"
|
|
615
615
|
assert request.get_header("Content-type") == "application/json"
|
|
616
616
|
assert timeout == 10.0
|
|
617
617
|
|
|
@@ -49,10 +49,11 @@ def test_extension_parser_errors_keep_the_extension_outer_command(
|
|
|
49
49
|
("flag", "enabled"),
|
|
50
50
|
[("--swagger-ui", True), ("--no-swagger-ui", False)],
|
|
51
51
|
)
|
|
52
|
+
@pytest.mark.parametrize("target", ["fastapi", "python-fastapi"])
|
|
52
53
|
def test_fastapi_swagger_plan_flag_reaches_extension_configuration(
|
|
53
|
-
flag: str, enabled: bool
|
|
54
|
+
flag: str, enabled: bool, target: str
|
|
54
55
|
) -> None:
|
|
55
|
-
args = _build_parser().parse_args(["plan", ".", "--to",
|
|
56
|
+
args = _build_parser().parse_args(["plan", ".", "--to", target, flag])
|
|
56
57
|
assert cli._extension_configuration(args)["swagger_ui"] is enabled
|
|
57
58
|
|
|
58
59
|
|
|
@@ -12,9 +12,10 @@ from typing import Any, cast
|
|
|
12
12
|
import pytest
|
|
13
13
|
|
|
14
14
|
from sanka.runtime.extensions import ExtensionError, Recommendation, fingerprint_repository
|
|
15
|
-
from sanka.runtime.extensions.lifecycle import ApplicationLifecycle
|
|
15
|
+
from sanka.runtime.extensions.lifecycle import ApplicationLifecycle, saved_configuration
|
|
16
16
|
from sanka.runtime.extensions.runner import ExtensionResult, ExtensionRunner
|
|
17
17
|
from sanka.runtime.extensions.store import ExtensionStore, LockEntry
|
|
18
|
+
from sanka.runtime.hashing import content_hash
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
def _lock(*, digest: str = "3" * 64) -> LockEntry:
|
|
@@ -690,7 +691,7 @@ def test_plan_requires_a_target_outside_a_tty(tmp_path: Path) -> None:
|
|
|
690
691
|
lifecycle.plan(target=None)
|
|
691
692
|
|
|
692
693
|
assert raised.value.code == "SANKA_EXTENSION_TARGET_REQUIRED"
|
|
693
|
-
assert raised.value.details == {"targets": ["fastapi"]}
|
|
694
|
+
assert raised.value.details == {"targets": ["python-fastapi"]}
|
|
694
695
|
|
|
695
696
|
|
|
696
697
|
def test_interactive_plan_retries_only_requested_structured_inputs(tmp_path: Path) -> None:
|
|
@@ -881,16 +882,41 @@ def test_verify_without_scenarios_still_requires_the_reviewed_plan(tmp_path: Pat
|
|
|
881
882
|
assert raised.value.code == "SANKA_EXTENSION_IDENTITY"
|
|
882
883
|
|
|
883
884
|
|
|
885
|
+
@pytest.mark.parametrize(
|
|
886
|
+
"extension_id,target,wire_target",
|
|
887
|
+
[
|
|
888
|
+
("sanka/drf-to-fastapi", "fastapi", "fastapi"),
|
|
889
|
+
("sanka/drf-to-fastapi", "python-fastapi", "fastapi"),
|
|
890
|
+
("sanka/drf-to-flask", "python-flask", "flask"),
|
|
891
|
+
*[
|
|
892
|
+
("sanka/python-to-golang", f"go-{router}", router)
|
|
893
|
+
for router in ("fiber", "chi", "mux", "gin")
|
|
894
|
+
],
|
|
895
|
+
],
|
|
896
|
+
)
|
|
884
897
|
def test_plan_forwards_the_selected_target_to_the_plan_and_later_stages(
|
|
885
898
|
tmp_path: Path,
|
|
899
|
+
extension_id: str,
|
|
900
|
+
target: str,
|
|
901
|
+
wire_target: str,
|
|
902
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
886
903
|
) -> None:
|
|
887
904
|
project = _project(tmp_path)
|
|
888
905
|
runner = FakeRunner()
|
|
889
|
-
|
|
906
|
+
store = FakeStore(installed=True)
|
|
907
|
+
store.lock = replace(store.lock, id=extension_id)
|
|
908
|
+
monkeypatch.setattr(
|
|
909
|
+
store,
|
|
910
|
+
"recommendations",
|
|
911
|
+
lambda _: (
|
|
912
|
+
_recommendation(store.lock, marketplace="official", targets=(wire_target, target)),
|
|
913
|
+
),
|
|
914
|
+
)
|
|
915
|
+
lifecycle = _lifecycle(project, store, runner)
|
|
890
916
|
lifecycle.scan(configuration={"settings_module": "config.settings"})
|
|
891
917
|
|
|
892
918
|
planned = lifecycle.plan(
|
|
893
|
-
target=
|
|
919
|
+
target=target,
|
|
894
920
|
configuration={"settings_module": "config.settings"},
|
|
895
921
|
)
|
|
896
922
|
|
|
@@ -900,19 +926,38 @@ def test_plan_forwards_the_selected_target_to_the_plan_and_later_stages(
|
|
|
900
926
|
assert plan_request["command"] == "plan"
|
|
901
927
|
assert plan_request["configuration"] == {
|
|
902
928
|
"settings_module": "config.settings",
|
|
903
|
-
"target":
|
|
929
|
+
"target": wire_target,
|
|
904
930
|
}
|
|
905
931
|
plan = json.loads((project / ".sanka" / "plan.json").read_text())
|
|
906
|
-
assert plan["configuration"]["target"] ==
|
|
932
|
+
assert plan["configuration"]["target"] == target
|
|
933
|
+
reviewed = (project / ".sanka" / "plan.json").read_bytes()
|
|
934
|
+
assert saved_configuration(project, target=wire_target) == plan["configuration"]
|
|
935
|
+
assert (project / ".sanka" / "plan.json").read_bytes() == reviewed
|
|
907
936
|
|
|
908
937
|
lifecycle.apply(reviewed_plan_hash=str(planned.data["plan_hash"]))
|
|
909
938
|
|
|
910
939
|
apply_request = runner.calls[-1][1]
|
|
911
940
|
assert apply_request["command"] == "apply"
|
|
912
|
-
assert apply_request["configuration"]["target"] ==
|
|
941
|
+
assert apply_request["configuration"]["target"] == wire_target
|
|
913
942
|
assert apply_request["configuration"]["extension_plan_hash"] == "sha256:extension-plan"
|
|
914
943
|
|
|
915
944
|
|
|
945
|
+
@pytest.mark.parametrize("extension", [None, [], "invalid", {"id": []}])
|
|
946
|
+
def test_saved_configuration_rejects_invalid_extension_identity(
|
|
947
|
+
tmp_path: Path, extension: object
|
|
948
|
+
) -> None:
|
|
949
|
+
artifact = tmp_path / ".sanka"
|
|
950
|
+
artifact.mkdir()
|
|
951
|
+
plan = {
|
|
952
|
+
"schema_version": "sanka-application-plan/v1",
|
|
953
|
+
"extension": extension,
|
|
954
|
+
"configuration": {"target": "fastapi"},
|
|
955
|
+
}
|
|
956
|
+
plan["plan_hash"] = content_hash(plan)
|
|
957
|
+
(artifact / "plan.json").write_text(json.dumps(plan))
|
|
958
|
+
assert saved_configuration(tmp_path, target="python-fastapi") == {}
|
|
959
|
+
|
|
960
|
+
|
|
916
961
|
def test_plan_rejects_a_conflicting_configured_target(tmp_path: Path) -> None:
|
|
917
962
|
project = _project(tmp_path)
|
|
918
963
|
runner = FakeRunner()
|