sanka-cli 0.3.2__tar.gz → 0.3.4__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.2 → sanka_cli-0.3.4}/PKG-INFO +24 -3
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/README.md +23 -2
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/pyproject.toml +1 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/__init__.py +154 -21
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/_summary.py +20 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/app.py +411 -68
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/launch.py +19 -7
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/model.py +15 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/services.py +43 -17
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/lifecycle.py +166 -14
- sanka_cli-0.3.4/src/sanka/runtime/extensions/settings.py +173 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/store.py +24 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/__init__.py +1 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/cloud_migrate.py +30 -26
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/code_cloud.py +3 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/doctor.py +5 -5
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/fix.py +3 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/migrate.py +74 -14
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/main.py +48 -7
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/skills/sanka-cli/SKILL.md +2 -2
- sanka_cli-0.3.4/src/sanka_cli/state.py +51 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/flow_wheel_acceptance.py +76 -74
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_cli.py +7 -5
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_cli_developer_experience.py +3 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_doctor.py +9 -2
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_seam.py +1 -74
- sanka_cli-0.3.4/tests/test_extension_endpoint_scope.py +166 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_extension_lifecycle.py +108 -9
- sanka_cli-0.3.4/tests/test_extension_settings.py +55 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_extension_store.py +12 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_extension_wheel_acceptance.py +139 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_extension.py +7 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_extension_wheel_acceptance.py +9 -33
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_hosted_cli.py +77 -17
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_mcp_retirement.py +1 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_sanka_facade.py +1 -1
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_tui.py +189 -237
- sanka_cli-0.3.4/tests/test_tui_endpoint_selection.py +37 -0
- sanka_cli-0.3.4/tests/test_tui_extension_install.py +127 -0
- sanka_cli-0.3.4/tests/tui_helpers.py +299 -0
- sanka_cli-0.3.2/src/sanka_cli/state.py +0 -11
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/.gitignore +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/LICENSES/AGPL-3.0-only.txt +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/LICENSES/Apache-2.0.txt +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/NOTICE +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/_client.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/_compact.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/_output.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/_research.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/cloud.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/history.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/cli/tui/widgets.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/connector/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/connector/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/__about__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/concurrency.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/connector_client.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/connector_host.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/engine.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/continuous.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/errors.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/local.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/model.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/report_codec.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/routes.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/scope.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/state.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/execution/validate.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/artifacts.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/code_lifecycle.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/code_repair.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/discovery.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/model.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/runner.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/extensions/stage.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/extension.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/host.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/lifecycle.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/merge.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/model.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/native_verification.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/planner.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/sqlite.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/state.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/verification.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/flow/verification_plan.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/hashing.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/mapping/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/mapping/errors.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/mapping/mapping_candidates.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/mapping/model.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/mapping/owner_mapping.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/mapping/pending_relationships.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/mapping/record_mapping.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/planner.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/private_sqlite.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/registry.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/safe_local_io.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/spec.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka/runtime/state.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/__main__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/bundle.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/certificates.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/client.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/cloud_source.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/ai.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/auth.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/cloud.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/cloud_fleet.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/cloud_github.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/code.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/functions.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/profiles.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/resources.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/skill.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/workflow_templates.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/commands/workflows.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/config.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/output.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_cli/runtime.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/__about__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/credentials.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/errors.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/protocols.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/provisioning.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/records.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/registration.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_connector/schema.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extension_sdk/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extension_sdk/contract.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extension_sdk/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/__about__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/credentials.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/errors.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/protocols.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/provisioning.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/records.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/registration.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/app/schema.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/code/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/code/contract.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/_wire.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/blueprint.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/definition.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/graph.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/identity.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/native.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/native_fixtures.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/native_process_recipes.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/native_profiles.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/native_recipes.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/native_task_recipes.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/native_verification.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/protocol.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/scenario.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/flow/source.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/__about__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/credentials.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/errors.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/protocols.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/provisioning.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/py.typed +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/records.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/registration.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/src/sanka_extensions/systems/schema.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/conftest.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_drf_project/api/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_drf_project/api/serializers.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_drf_project/api/views.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_drf_project/config/__init__.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_drf_project/config/settings.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_drf_project/config/urls.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_drf_project/manage.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_marketplace/drf-to-fastapi.json +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/extension_marketplace/marketplace.json +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/flow/synthetic_native_order_billing_blueprint.json +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/flow/synthetic_sales_created_estimate_blueprint.json +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/fixtures/flow/synthetic_sales_quote_blueprint.json +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_application_summary.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_business_flow_extension_acceptance.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_code_bundle.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_code_commands.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_code_lifecycle.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_code_repair.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_concurrency.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_connector_client.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_connector_host.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_credential_provider.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_engine_e2e.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_engine_execution_adoption.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_engine_pg_to_clickhouse_e2e.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_engine_postgres_e2e.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_continuous.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_exact_scope.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_local_store.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_report_codec.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_routes.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_scope.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_execution_validate.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_extension_discovery.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_extension_runner.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_extension_stage.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_lifecycle.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_merge.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_native_lifecycle.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_native_verification.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_planner.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_sdk_codec.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_sqlite.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_flow_verification.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_hashing.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_help_shortcuts.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_mapping_candidates.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_mapping_owner_mapping.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_mapping_pending_relationships.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_mapping_record_mapping.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_plan_input_hints.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_planner.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_registry.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_safe_local_io.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_skill_commands.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_spec.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_state_store.py +0 -0
- {sanka_cli-0.3.2 → sanka_cli-0.3.4}/tests/test_workflow_templates_cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sanka-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Sanka command-line interface and migration runtime
|
|
5
5
|
Project-URL: Repository, https://github.com/sankaHQ/sanka
|
|
6
6
|
Project-URL: Issues, https://github.com/sankaHQ/sanka/issues
|
|
@@ -97,7 +97,7 @@ snapshot advances only after that catalog is reviewed and published; existing
|
|
|
97
97
|
data project locks continue to use their pinned marketplace snapshots.
|
|
98
98
|
The embedded SDK exposes `sanka_extensions.app` for application data access.
|
|
99
99
|
|
|
100
|
-
##
|
|
100
|
+
## Sanka Code commands
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
103
|
sanka scan .
|
|
@@ -116,10 +116,31 @@ pipes and CI keep non-interactive output.
|
|
|
116
116
|
|
|
117
117
|
`scan`, marketplace management, extension installation, local planning,
|
|
118
118
|
testing, and verification never require a Sanka API token. Hosted resources,
|
|
119
|
-
workflows, AI, Custom Code, and
|
|
119
|
+
workflows, AI, Custom Code, and hosted migrations retain
|
|
120
120
|
their existing authentication requirements. Add `--json` to local lifecycle
|
|
121
121
|
commands for the stable `sanka-cli/v1` response envelope.
|
|
122
122
|
|
|
123
|
+
## Sanka App data migrations
|
|
124
|
+
|
|
125
|
+
Local data migrations use `sanka.yaml` and a local state file:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
sanka app plan -f sanka.yaml
|
|
129
|
+
sanka app validate -f sanka.yaml --json
|
|
130
|
+
sanka app apply -f sanka.yaml --plan-hash sha256:<hash-from-plan>
|
|
131
|
+
sanka app status -f sanka.yaml
|
|
132
|
+
sanka app verify -f sanka.yaml
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Hosted application migrations use the same `app` group with an explicit Program
|
|
136
|
+
or migration ID, for example `sanka app plan --program ID` and
|
|
137
|
+
`sanka app apply --migration ID --yes`. Hosted App commands require a Sanka API
|
|
138
|
+
token. The existing root data commands remain hidden compatibility aliases and
|
|
139
|
+
print a deprecation notice. Root `plan`, `apply`, and `verify` select Sanka Code;
|
|
140
|
+
use `sanka app` when a `sanka.yaml` data spec is present.
|
|
141
|
+
|
|
142
|
+
Sanka Flow operations remain under `sanka workflows list|get|create|run`.
|
|
143
|
+
|
|
123
144
|
Custom functions use `sanka functions`; the old `sanka code` group keeps its original
|
|
124
145
|
function operations as a compatibility alias. Sanka Code migration commands remain
|
|
125
146
|
`scan`, `plan`, `apply`, `test`, and `verify`.
|
|
@@ -69,7 +69,7 @@ snapshot advances only after that catalog is reviewed and published; existing
|
|
|
69
69
|
data project locks continue to use their pinned marketplace snapshots.
|
|
70
70
|
The embedded SDK exposes `sanka_extensions.app` for application data access.
|
|
71
71
|
|
|
72
|
-
##
|
|
72
|
+
## Sanka Code commands
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
sanka scan .
|
|
@@ -88,10 +88,31 @@ pipes and CI keep non-interactive output.
|
|
|
88
88
|
|
|
89
89
|
`scan`, marketplace management, extension installation, local planning,
|
|
90
90
|
testing, and verification never require a Sanka API token. Hosted resources,
|
|
91
|
-
workflows, AI, Custom Code, and
|
|
91
|
+
workflows, AI, Custom Code, and hosted migrations retain
|
|
92
92
|
their existing authentication requirements. Add `--json` to local lifecycle
|
|
93
93
|
commands for the stable `sanka-cli/v1` response envelope.
|
|
94
94
|
|
|
95
|
+
## Sanka App data migrations
|
|
96
|
+
|
|
97
|
+
Local data migrations use `sanka.yaml` and a local state file:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
sanka app plan -f sanka.yaml
|
|
101
|
+
sanka app validate -f sanka.yaml --json
|
|
102
|
+
sanka app apply -f sanka.yaml --plan-hash sha256:<hash-from-plan>
|
|
103
|
+
sanka app status -f sanka.yaml
|
|
104
|
+
sanka app verify -f sanka.yaml
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Hosted application migrations use the same `app` group with an explicit Program
|
|
108
|
+
or migration ID, for example `sanka app plan --program ID` and
|
|
109
|
+
`sanka app apply --migration ID --yes`. Hosted App commands require a Sanka API
|
|
110
|
+
token. The existing root data commands remain hidden compatibility aliases and
|
|
111
|
+
print a deprecation notice. Root `plan`, `apply`, and `verify` select Sanka Code;
|
|
112
|
+
use `sanka app` when a `sanka.yaml` data spec is present.
|
|
113
|
+
|
|
114
|
+
Sanka Flow operations remain under `sanka workflows list|get|create|run`.
|
|
115
|
+
|
|
95
116
|
Custom functions use `sanka functions`; the old `sanka code` group keeps its original
|
|
96
117
|
function operations as a compatibility alias. Sanka Code migration commands remain
|
|
97
118
|
`scan`, `plan`, `apply`, `test`, and `verify`.
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
Spec-driven flow (migration-as-code)::
|
|
5
5
|
|
|
6
|
-
sanka plan -f sanka.yaml
|
|
7
|
-
sanka validate -f sanka.yaml
|
|
8
|
-
sanka apply --plan-hash sha256:... -f sanka.yaml
|
|
9
|
-
sanka verify -f sanka.yaml
|
|
6
|
+
sanka app plan -f sanka.yaml
|
|
7
|
+
sanka app validate -f sanka.yaml
|
|
8
|
+
sanka app apply --plan-hash sha256:... -f sanka.yaml
|
|
9
|
+
sanka app verify -f sanka.yaml
|
|
10
10
|
|
|
11
11
|
``validate`` is write-free by construction: it samples live source records
|
|
12
12
|
through the reviewed plan and reports rejects without ever resolving the
|
|
@@ -14,8 +14,8 @@ destination data extension, exiting non-zero when invalid records exist.
|
|
|
14
14
|
|
|
15
15
|
Shorthand and provider selection::
|
|
16
16
|
|
|
17
|
-
sanka connect markdown
|
|
18
|
-
sanka migrate ./content sqlite://content.db
|
|
17
|
+
sanka app connect markdown
|
|
18
|
+
sanka app migrate ./content sqlite://content.db
|
|
19
19
|
|
|
20
20
|
Django REST Framework to FastAPI compatibility flow::
|
|
21
21
|
|
|
@@ -114,13 +114,23 @@ class _CliArgumentParser(argparse.ArgumentParser):
|
|
|
114
114
|
super().error(message)
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
def main(
|
|
117
|
+
def main(
|
|
118
|
+
argv: list[str] | None = None,
|
|
119
|
+
*,
|
|
120
|
+
api_base: str | None = None,
|
|
121
|
+
product: str = "auto",
|
|
122
|
+
) -> int:
|
|
118
123
|
arguments = list(sys.argv[1:] if argv is None else argv)
|
|
119
124
|
json_errors = "--json" in arguments or "--compact-dsl" in arguments
|
|
120
|
-
parser =
|
|
125
|
+
parser = (
|
|
126
|
+
_build_app_parser(json_errors=json_errors)
|
|
127
|
+
if product == "app"
|
|
128
|
+
else _build_parser(json_errors=json_errors)
|
|
129
|
+
)
|
|
121
130
|
try:
|
|
122
131
|
args = parser.parse_args(arguments)
|
|
123
132
|
args.api_base = api_base
|
|
133
|
+
args.product = product
|
|
124
134
|
except CliUsageError as error:
|
|
125
135
|
command = arguments[0] if arguments and arguments[0] in SDK_COMMANDS else "sanka"
|
|
126
136
|
return _print_cli_error(
|
|
@@ -137,11 +147,11 @@ def main(argv: list[str] | None = None, *, api_base: str | None = None) -> int:
|
|
|
137
147
|
return 0
|
|
138
148
|
if hasattr(args, "root_option"):
|
|
139
149
|
args.root = args.root_option or args.root or "."
|
|
140
|
-
if _use_local_tui(args):
|
|
141
|
-
from sanka.cli.tui.launch import launch_local
|
|
142
|
-
|
|
143
|
-
return launch_local(args)
|
|
144
150
|
try:
|
|
151
|
+
if _use_local_tui(args):
|
|
152
|
+
from sanka.cli.tui.launch import launch_local
|
|
153
|
+
|
|
154
|
+
return launch_local(args)
|
|
145
155
|
return int(asyncio.run(args.handler(args)))
|
|
146
156
|
except CliUsageError as error:
|
|
147
157
|
return _print_cli_error(args, error, exit_code=2)
|
|
@@ -151,7 +161,8 @@ def main(argv: list[str] | None = None, *, api_base: str | None = None) -> int:
|
|
|
151
161
|
error,
|
|
152
162
|
exit_code=(
|
|
153
163
|
2
|
|
154
|
-
if
|
|
164
|
+
if error.code == "SANKA_USAGE"
|
|
165
|
+
or (args.command == "plan" and error.code == "SANKA_EXTENSION_TARGET_REQUIRED")
|
|
155
166
|
else 1
|
|
156
167
|
),
|
|
157
168
|
)
|
|
@@ -266,6 +277,9 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
|
|
|
266
277
|
sub.add_argument("--state", default=DEFAULT_STATE_FILE, help="run-state SQLite file")
|
|
267
278
|
|
|
268
279
|
def presentation(sub: argparse.ArgumentParser, *, json_option: bool = True) -> None:
|
|
280
|
+
sub.add_argument(
|
|
281
|
+
"--tui", action="store_true", help="open the optional TUI (requires a terminal)"
|
|
282
|
+
)
|
|
269
283
|
if json_option:
|
|
270
284
|
formats = sub.add_mutually_exclusive_group()
|
|
271
285
|
formats.add_argument(
|
|
@@ -373,6 +387,17 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
|
|
|
373
387
|
help="omit FastAPI Swagger UI at /docs; keep OpenAPI and ReDoc",
|
|
374
388
|
)
|
|
375
389
|
extension_options(plan)
|
|
390
|
+
scope = plan.add_mutually_exclusive_group()
|
|
391
|
+
scope.add_argument(
|
|
392
|
+
"--endpoint",
|
|
393
|
+
action="append",
|
|
394
|
+
default=[],
|
|
395
|
+
metavar="ID",
|
|
396
|
+
help="select an exact captured endpoint ID (repeatable); retain Generated endpoints",
|
|
397
|
+
)
|
|
398
|
+
scope.add_argument(
|
|
399
|
+
"--all-endpoints", action="store_true", help="select all supported endpoints"
|
|
400
|
+
)
|
|
376
401
|
presentation(plan)
|
|
377
402
|
plan.set_defaults(handler=_cmd_plan)
|
|
378
403
|
|
|
@@ -590,6 +615,7 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
|
|
|
590
615
|
|
|
591
616
|
status = commands.add_parser("status", help="show run status and ledger counts")
|
|
592
617
|
common(status)
|
|
618
|
+
presentation(status, json_option=False)
|
|
593
619
|
status.set_defaults(handler=_cmd_status)
|
|
594
620
|
|
|
595
621
|
migrate = commands.add_parser("migrate", help="plan + apply + verify in one go")
|
|
@@ -677,6 +703,66 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
|
|
|
677
703
|
return parser
|
|
678
704
|
|
|
679
705
|
|
|
706
|
+
def _build_app_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
|
|
707
|
+
parser = _CliArgumentParser(prog="sanka app", json_errors=json_errors)
|
|
708
|
+
parser.set_defaults(command=None)
|
|
709
|
+
commands = parser.add_subparsers(dest="command")
|
|
710
|
+
|
|
711
|
+
def common(sub: argparse.ArgumentParser) -> None:
|
|
712
|
+
sub.add_argument("-f", "--file", default=DEFAULT_SPEC_FILE, help="migration spec YAML")
|
|
713
|
+
sub.add_argument("--state", default=DEFAULT_STATE_FILE, help="run-state SQLite file")
|
|
714
|
+
|
|
715
|
+
def output(sub: argparse.ArgumentParser) -> None:
|
|
716
|
+
formats = sub.add_mutually_exclusive_group()
|
|
717
|
+
formats.add_argument("--json", action="store_true", help="print JSON")
|
|
718
|
+
formats.add_argument("--compact-dsl", action="store_true", help="print a compact result")
|
|
719
|
+
sub.add_argument("--no-color", action="store_true")
|
|
720
|
+
detail = sub.add_mutually_exclusive_group()
|
|
721
|
+
detail.add_argument("--quiet", action="store_true")
|
|
722
|
+
detail.add_argument("--verbose", action="store_true")
|
|
723
|
+
|
|
724
|
+
plan = commands.add_parser("plan", help="create a reviewable data migration plan")
|
|
725
|
+
common(plan)
|
|
726
|
+
output(plan)
|
|
727
|
+
plan.set_defaults(handler=_cmd_plan)
|
|
728
|
+
|
|
729
|
+
validate = commands.add_parser("validate", help="validate source records without writing")
|
|
730
|
+
common(validate)
|
|
731
|
+
validate.add_argument("--sample", type=int, default=DEFAULT_VALIDATION_SAMPLE_SIZE)
|
|
732
|
+
validate.add_argument("--full", action="store_true")
|
|
733
|
+
validate.add_argument("--json", action="store_true")
|
|
734
|
+
validate.set_defaults(handler=_cmd_validate)
|
|
735
|
+
|
|
736
|
+
apply_ = commands.add_parser("apply", help="apply the exact reviewed plan")
|
|
737
|
+
common(apply_)
|
|
738
|
+
apply_.add_argument("--plan-hash", required=True)
|
|
739
|
+
output(apply_)
|
|
740
|
+
apply_.set_defaults(handler=_cmd_apply)
|
|
741
|
+
|
|
742
|
+
status = commands.add_parser("status", help="show run and ledger status")
|
|
743
|
+
common(status)
|
|
744
|
+
status.set_defaults(handler=_cmd_status)
|
|
745
|
+
|
|
746
|
+
verify = commands.add_parser("verify", help="verify destination data against the source")
|
|
747
|
+
common(verify)
|
|
748
|
+
output(verify)
|
|
749
|
+
verify.set_defaults(handler=_cmd_verify)
|
|
750
|
+
|
|
751
|
+
migrate = commands.add_parser("migrate", help="plan, apply, and verify in one run")
|
|
752
|
+
migrate.add_argument("source")
|
|
753
|
+
migrate.add_argument("target")
|
|
754
|
+
migrate.add_argument("--state", default=DEFAULT_STATE_FILE)
|
|
755
|
+
migrate.set_defaults(handler=_cmd_migrate)
|
|
756
|
+
|
|
757
|
+
connect = commands.add_parser("connect", help="inspect installed data extension support")
|
|
758
|
+
connect.add_argument("provider")
|
|
759
|
+
connect.add_argument("--json", action="store_true")
|
|
760
|
+
connect.set_defaults(handler=_cmd_connect)
|
|
761
|
+
|
|
762
|
+
_set_json_errors(parser, json_errors)
|
|
763
|
+
return parser
|
|
764
|
+
|
|
765
|
+
|
|
680
766
|
def _set_json_errors(parser: argparse.ArgumentParser, enabled: bool) -> None:
|
|
681
767
|
if isinstance(parser, _CliArgumentParser):
|
|
682
768
|
parser.json_errors = enabled
|
|
@@ -860,11 +946,24 @@ _TUI_COMMANDS = frozenset({"scan", "plan", "apply", "test", "verify", "status",
|
|
|
860
946
|
|
|
861
947
|
|
|
862
948
|
def _use_local_tui(args: argparse.Namespace) -> bool:
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
949
|
+
import click
|
|
950
|
+
|
|
951
|
+
from sanka_cli.state import CLIState, validate_tui
|
|
952
|
+
|
|
953
|
+
context = click.get_current_context(silent=True)
|
|
954
|
+
state = context.obj if context and isinstance(context.obj, CLIState) else None
|
|
955
|
+
try:
|
|
956
|
+
return validate_tui(
|
|
957
|
+
state,
|
|
958
|
+
requested=bool(getattr(args, "tui", False)),
|
|
959
|
+
machine_output=bool(
|
|
960
|
+
getattr(args, "json", False) or getattr(args, "compact_dsl", False)
|
|
961
|
+
),
|
|
962
|
+
supported=args.command in _TUI_COMMANDS and getattr(args, "product", "auto") != "app",
|
|
963
|
+
terminal=_interactive_terminal(),
|
|
964
|
+
)
|
|
965
|
+
except click.UsageError as error:
|
|
966
|
+
raise CliUsageError(error.format_message()) from error
|
|
868
967
|
|
|
869
968
|
|
|
870
969
|
def _prompt_choice(
|
|
@@ -926,6 +1025,12 @@ def _extension_configuration(args: argparse.Namespace) -> dict[str, Any]:
|
|
|
926
1025
|
for name in ("force", "gap_report_only", "no_http", "all_headers", "edge_probes"):
|
|
927
1026
|
if getattr(args, name, False):
|
|
928
1027
|
configuration[name] = True
|
|
1028
|
+
if (
|
|
1029
|
+
getattr(args, "endpoint", None) or getattr(args, "all_endpoints", False)
|
|
1030
|
+
) and "selected_endpoints" in configuration:
|
|
1031
|
+
raise CliUsageError(
|
|
1032
|
+
"Use --endpoint, --all-endpoints or selected_endpoints configuration, not a combination"
|
|
1033
|
+
)
|
|
929
1034
|
return configuration
|
|
930
1035
|
|
|
931
1036
|
|
|
@@ -950,6 +1055,10 @@ def _application_lifecycle(args: argparse.Namespace) -> ApplicationLifecycle:
|
|
|
950
1055
|
|
|
951
1056
|
|
|
952
1057
|
def _application_lifecycle_requested(args: argparse.Namespace) -> bool:
|
|
1058
|
+
if getattr(args, "product", "auto") == "code":
|
|
1059
|
+
return True
|
|
1060
|
+
if getattr(args, "product", "auto") == "app":
|
|
1061
|
+
return False
|
|
953
1062
|
return args.file == DEFAULT_SPEC_FILE and not Path(args.file).is_file()
|
|
954
1063
|
|
|
955
1064
|
|
|
@@ -985,6 +1094,24 @@ def _print_application_result(
|
|
|
985
1094
|
if command == "plan" and isinstance(result.data.get("plan_hash"), str):
|
|
986
1095
|
print(f"plan {result.data['plan_hash']}")
|
|
987
1096
|
if next_hint and not quiet:
|
|
1097
|
+
if command == "plan":
|
|
1098
|
+
next_hint = shlex.join(
|
|
1099
|
+
[
|
|
1100
|
+
"sanka",
|
|
1101
|
+
"apply",
|
|
1102
|
+
"--root",
|
|
1103
|
+
str(args.root),
|
|
1104
|
+
"--artifact-dir",
|
|
1105
|
+
str(args.artifact_dir),
|
|
1106
|
+
"--plan-hash",
|
|
1107
|
+
str(result.data["plan_hash"]),
|
|
1108
|
+
*[
|
|
1109
|
+
part
|
|
1110
|
+
for name in args.extension_env
|
|
1111
|
+
for part in ("--extension-env", name)
|
|
1112
|
+
],
|
|
1113
|
+
]
|
|
1114
|
+
)
|
|
988
1115
|
print(f"next: {next_hint}")
|
|
989
1116
|
return 0
|
|
990
1117
|
|
|
@@ -993,10 +1120,14 @@ async def _cmd_plan(args: argparse.Namespace) -> int:
|
|
|
993
1120
|
if _application_lifecycle_requested(args):
|
|
994
1121
|
if args.swagger_ui is not None and args.to not in (None, "fastapi"):
|
|
995
1122
|
raise CliUsageError("--swagger-ui/--no-swagger-ui requires --to fastapi")
|
|
1123
|
+
selection: dict[str, Any] = {}
|
|
1124
|
+
if args.endpoint or args.all_endpoints:
|
|
1125
|
+
selection = {"endpoint_ids": tuple(args.endpoint), "all_endpoints": args.all_endpoints}
|
|
996
1126
|
result = _application_lifecycle(args).plan(
|
|
997
1127
|
target=args.to,
|
|
998
1128
|
configuration=_extension_configuration(args),
|
|
999
1129
|
explicit_env_names=tuple(args.extension_env),
|
|
1130
|
+
**selection,
|
|
1000
1131
|
)
|
|
1001
1132
|
return _print_application_result(args, "plan", result, migration_state="planned")
|
|
1002
1133
|
spec = _load_spec(args.file)
|
|
@@ -1021,6 +1152,7 @@ async def _cmd_plan(args: argparse.Namespace) -> int:
|
|
|
1021
1152
|
shlex.join(
|
|
1022
1153
|
[
|
|
1023
1154
|
"sanka",
|
|
1155
|
+
"app",
|
|
1024
1156
|
"apply",
|
|
1025
1157
|
"--file",
|
|
1026
1158
|
str(args.file),
|
|
@@ -1044,7 +1176,7 @@ async def _cmd_validate(args: argparse.Namespace) -> int:
|
|
|
1044
1176
|
run_id = engine.create(spec)
|
|
1045
1177
|
run = engine.store.get_run(run_id)
|
|
1046
1178
|
if run.plan_json is None:
|
|
1047
|
-
raise ExecutionError("no plan for this spec yet; run `sanka plan` first")
|
|
1179
|
+
raise ExecutionError("no plan for this spec yet; run `sanka app plan` first")
|
|
1048
1180
|
payload = await engine.validate(run_id, sample_size=args.sample, full=args.full)
|
|
1049
1181
|
if args.json:
|
|
1050
1182
|
print(json.dumps(payload, ensure_ascii=False, indent=2))
|
|
@@ -1071,7 +1203,7 @@ async def _cmd_apply(args: argparse.Namespace) -> int:
|
|
|
1071
1203
|
run_id = engine.create(spec)
|
|
1072
1204
|
run = engine.store.get_run(run_id)
|
|
1073
1205
|
if run.plan_json is None:
|
|
1074
|
-
raise ExecutionError("no plan for this spec yet; run `sanka plan` first")
|
|
1206
|
+
raise ExecutionError("no plan for this spec yet; run `sanka app plan` first")
|
|
1075
1207
|
await engine.apply(run_id, plan_hash=args.plan_hash)
|
|
1076
1208
|
if args.json or getattr(args, "compact_dsl", False):
|
|
1077
1209
|
_print_result(
|
|
@@ -1088,6 +1220,7 @@ async def _cmd_apply(args: argparse.Namespace) -> int:
|
|
|
1088
1220
|
shlex.join(
|
|
1089
1221
|
[
|
|
1090
1222
|
"sanka",
|
|
1223
|
+
"app",
|
|
1091
1224
|
"verify",
|
|
1092
1225
|
"--file",
|
|
1093
1226
|
str(args.file),
|
|
@@ -1304,7 +1437,7 @@ def _print_plan(run_id: str, plan: MigrationPlan) -> None:
|
|
|
1304
1437
|
if plan.candidate_hash:
|
|
1305
1438
|
print(f"candidate hash: {plan.candidate_hash}")
|
|
1306
1439
|
print(f"plan hash: {plan.plan_hash}")
|
|
1307
|
-
print("Review the plan, then run `sanka apply --plan-hash <hash>`.")
|
|
1440
|
+
print("Review the plan, then run `sanka app apply --plan-hash <hash>`.")
|
|
1308
1441
|
|
|
1309
1442
|
|
|
1310
1443
|
def _validation_invalid(payload: dict[str, Any]) -> bool:
|
|
@@ -180,6 +180,26 @@ def _plan_lines(data: Mapping[str, Any], root: str | Path) -> list[str]:
|
|
|
180
180
|
f" ({native}/{eligible} non-alias routes)" if None not in (native, eligible) else ""
|
|
181
181
|
)
|
|
182
182
|
lines.append(f" readiness {percent}%{detail}")
|
|
183
|
+
scope = data.get("endpoint_scope")
|
|
184
|
+
if isinstance(scope, Mapping) and scope.get("schema") == "sanka.endpoint-scope/v1":
|
|
185
|
+
selected = _count(scope.get("effective_ids")) or 0
|
|
186
|
+
retained = _count(scope.get("retained_ids")) or 0
|
|
187
|
+
omitted = _count(scope.get("omitted_ids")) or 0
|
|
188
|
+
lines.extend(
|
|
189
|
+
[
|
|
190
|
+
"",
|
|
191
|
+
f"Endpoints: {selected} selected, {retained} retained Generated, {omitted} omitted",
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
for row in scope.get("endpoints", []):
|
|
195
|
+
if not isinstance(row, Mapping) or not isinstance(row.get("id"), str):
|
|
196
|
+
continue
|
|
197
|
+
state = "Manual" if row.get("blocked") else "Generated" if row.get("locked") else "New"
|
|
198
|
+
verification = (
|
|
199
|
+
"Verified" if row.get("verified") is True else "verification not reported"
|
|
200
|
+
)
|
|
201
|
+
choice = "selected" if row.get("selected") else "omitted"
|
|
202
|
+
lines.append(f" {row['id']} — {state}; {verification}; {choice}")
|
|
183
203
|
return lines
|
|
184
204
|
|
|
185
205
|
|