sanka-cli 0.3.8__tar.gz → 0.3.10__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.
Files changed (243) hide show
  1. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/PKG-INFO +8 -6
  2. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/README.md +7 -5
  3. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/pyproject.toml +1 -1
  4. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/__init__.py +31 -28
  5. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/_summary.py +24 -18
  6. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/continuous.py +5 -3
  7. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/lifecycle.py +26 -1
  8. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/runner.py +12 -2
  9. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/stage.py +2 -0
  10. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/store.py +1 -1
  11. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/__init__.py +1 -1
  12. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_application_summary.py +16 -4
  13. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_cli.py +1 -1
  14. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_cli_developer_experience.py +92 -0
  15. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_continuous.py +0 -51
  16. sanka_cli-0.3.10/tests/test_execution_route_reopening.py +69 -0
  17. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_lifecycle.py +17 -7
  18. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_runner.py +34 -6
  19. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_mcp_retirement.py +1 -1
  20. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_sanka_facade.py +1 -1
  21. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_tui.py +6 -6
  22. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/.gitignore +0 -0
  23. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/LICENSES/AGPL-3.0-only.txt +0 -0
  24. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/LICENSES/Apache-2.0.txt +0 -0
  25. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/NOTICE +0 -0
  26. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/__init__.py +0 -0
  27. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/_client.py +0 -0
  28. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/_compact.py +0 -0
  29. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/_output.py +0 -0
  30. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/_research.py +0 -0
  31. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/py.typed +0 -0
  32. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/__init__.py +0 -0
  33. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/app.py +0 -0
  34. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/cloud.py +0 -0
  35. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/history.py +0 -0
  36. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/launch.py +0 -0
  37. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/model.py +0 -0
  38. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/services.py +0 -0
  39. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/cli/tui/widgets.py +0 -0
  40. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/connector/__init__.py +0 -0
  41. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/connector/py.typed +0 -0
  42. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/__about__.py +0 -0
  43. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/__init__.py +0 -0
  44. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/concurrency.py +0 -0
  45. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/connector_client.py +0 -0
  46. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/connector_host.py +0 -0
  47. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/engine.py +0 -0
  48. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/__init__.py +0 -0
  49. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/errors.py +0 -0
  50. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/local.py +0 -0
  51. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/model.py +0 -0
  52. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/report_codec.py +0 -0
  53. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/routes.py +0 -0
  54. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/scope.py +0 -0
  55. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/state.py +0 -0
  56. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/execution/validate.py +0 -0
  57. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/__init__.py +0 -0
  58. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/artifacts.py +0 -0
  59. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/code_lifecycle.py +0 -0
  60. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/code_repair.py +0 -0
  61. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/discovery.py +0 -0
  62. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/model.py +0 -0
  63. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/extensions/settings.py +0 -0
  64. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/__init__.py +0 -0
  65. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/extension.py +0 -0
  66. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/host.py +0 -0
  67. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/lifecycle.py +0 -0
  68. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/merge.py +0 -0
  69. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/model.py +0 -0
  70. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/native_verification.py +0 -0
  71. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/planner.py +0 -0
  72. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/sqlite.py +0 -0
  73. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/state.py +0 -0
  74. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/verification.py +0 -0
  75. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/flow/verification_plan.py +0 -0
  76. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/hashing.py +0 -0
  77. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/mapping/__init__.py +0 -0
  78. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/mapping/errors.py +0 -0
  79. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/mapping/mapping_candidates.py +0 -0
  80. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/mapping/model.py +0 -0
  81. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/mapping/owner_mapping.py +0 -0
  82. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/mapping/pending_relationships.py +0 -0
  83. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/mapping/record_mapping.py +0 -0
  84. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/planner.py +0 -0
  85. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/private_sqlite.py +0 -0
  86. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/py.typed +0 -0
  87. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/registry.py +0 -0
  88. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/safe_local_io.py +0 -0
  89. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/spec.py +0 -0
  90. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka/runtime/state.py +0 -0
  91. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/__main__.py +0 -0
  92. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/bundle.py +0 -0
  93. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/certificates.py +0 -0
  94. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/client.py +0 -0
  95. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/cloud_source.py +0 -0
  96. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/__init__.py +0 -0
  97. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/ai.py +0 -0
  98. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/auth.py +0 -0
  99. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/cloud.py +0 -0
  100. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/cloud_fleet.py +0 -0
  101. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/cloud_github.py +0 -0
  102. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/cloud_migrate.py +0 -0
  103. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/code.py +0 -0
  104. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/code_cloud.py +0 -0
  105. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/doctor.py +0 -0
  106. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/fix.py +0 -0
  107. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/functions.py +0 -0
  108. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/migrate.py +0 -0
  109. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/profiles.py +0 -0
  110. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/resources.py +0 -0
  111. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/skill.py +0 -0
  112. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/workflow_templates.py +0 -0
  113. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/commands/workflows.py +0 -0
  114. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/config.py +0 -0
  115. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/main.py +0 -0
  116. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/output.py +0 -0
  117. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/runtime.py +0 -0
  118. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/skills/sanka-cli/SKILL.md +0 -0
  119. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_cli/state.py +0 -0
  120. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/__about__.py +0 -0
  121. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/__init__.py +0 -0
  122. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/credentials.py +0 -0
  123. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/errors.py +0 -0
  124. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/protocols.py +0 -0
  125. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/provisioning.py +0 -0
  126. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/py.typed +0 -0
  127. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/records.py +0 -0
  128. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/registration.py +0 -0
  129. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_connector/schema.py +0 -0
  130. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extension_sdk/__init__.py +0 -0
  131. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extension_sdk/contract.py +0 -0
  132. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extension_sdk/py.typed +0 -0
  133. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/__init__.py +0 -0
  134. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/__about__.py +0 -0
  135. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/__init__.py +0 -0
  136. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/credentials.py +0 -0
  137. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/errors.py +0 -0
  138. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/protocols.py +0 -0
  139. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/provisioning.py +0 -0
  140. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/py.typed +0 -0
  141. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/records.py +0 -0
  142. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/registration.py +0 -0
  143. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/app/schema.py +0 -0
  144. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/code/__init__.py +0 -0
  145. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/code/contract.py +0 -0
  146. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/__init__.py +0 -0
  147. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/_wire.py +0 -0
  148. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/blueprint.py +0 -0
  149. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/definition.py +0 -0
  150. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/graph.py +0 -0
  151. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/identity.py +0 -0
  152. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/native.py +0 -0
  153. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/native_fixtures.py +0 -0
  154. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/native_process_recipes.py +0 -0
  155. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/native_profiles.py +0 -0
  156. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/native_recipes.py +0 -0
  157. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/native_task_recipes.py +0 -0
  158. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/native_verification.py +0 -0
  159. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/protocol.py +0 -0
  160. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/scenario.py +0 -0
  161. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/flow/source.py +0 -0
  162. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/py.typed +0 -0
  163. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/__about__.py +0 -0
  164. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/__init__.py +0 -0
  165. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/credentials.py +0 -0
  166. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/errors.py +0 -0
  167. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/protocols.py +0 -0
  168. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/provisioning.py +0 -0
  169. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/py.typed +0 -0
  170. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/records.py +0 -0
  171. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/registration.py +0 -0
  172. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/src/sanka_extensions/systems/schema.py +0 -0
  173. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/conftest.py +0 -0
  174. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_drf_project/api/__init__.py +0 -0
  175. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_drf_project/api/serializers.py +0 -0
  176. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_drf_project/api/views.py +0 -0
  177. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_drf_project/config/__init__.py +0 -0
  178. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_drf_project/config/settings.py +0 -0
  179. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_drf_project/config/urls.py +0 -0
  180. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_drf_project/manage.py +0 -0
  181. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_marketplace/drf-to-fastapi.json +0 -0
  182. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/extension_marketplace/marketplace.json +0 -0
  183. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/flow/synthetic_native_order_billing_blueprint.json +0 -0
  184. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/flow/synthetic_sales_created_estimate_blueprint.json +0 -0
  185. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/fixtures/flow/synthetic_sales_quote_blueprint.json +0 -0
  186. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/flow_wheel_acceptance.py +0 -0
  187. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_business_flow_extension_acceptance.py +0 -0
  188. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_code_bundle.py +0 -0
  189. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_code_commands.py +0 -0
  190. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_code_lifecycle.py +0 -0
  191. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_code_repair.py +0 -0
  192. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_concurrency.py +0 -0
  193. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_connector_client.py +0 -0
  194. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_connector_host.py +0 -0
  195. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_credential_provider.py +0 -0
  196. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_doctor.py +0 -0
  197. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_engine_e2e.py +0 -0
  198. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_engine_execution_adoption.py +0 -0
  199. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_engine_pg_to_clickhouse_e2e.py +0 -0
  200. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_engine_postgres_e2e.py +0 -0
  201. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_exact_scope.py +0 -0
  202. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_local_store.py +0 -0
  203. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_report_codec.py +0 -0
  204. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_routes.py +0 -0
  205. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_scope.py +0 -0
  206. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_seam.py +0 -0
  207. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_execution_validate.py +0 -0
  208. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_discovery.py +0 -0
  209. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_endpoint_scope.py +0 -0
  210. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_settings.py +0 -0
  211. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_stage.py +0 -0
  212. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_store.py +0 -0
  213. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_extension_wheel_acceptance.py +0 -0
  214. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_extension.py +0 -0
  215. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_extension_wheel_acceptance.py +0 -0
  216. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_lifecycle.py +0 -0
  217. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_merge.py +0 -0
  218. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_native_lifecycle.py +0 -0
  219. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_native_verification.py +0 -0
  220. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_planner.py +0 -0
  221. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_sdk_codec.py +0 -0
  222. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_sqlite.py +0 -0
  223. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_flow_verification.py +0 -0
  224. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_hashing.py +0 -0
  225. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_help_shortcuts.py +0 -0
  226. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_hosted_cli.py +0 -0
  227. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_mapping_candidates.py +0 -0
  228. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_mapping_owner_mapping.py +0 -0
  229. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_mapping_pending_relationships.py +0 -0
  230. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_mapping_record_mapping.py +0 -0
  231. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_marketplace_aliases.py +0 -0
  232. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_plan_input_hints.py +0 -0
  233. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_planner.py +0 -0
  234. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_registry.py +0 -0
  235. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_safe_local_io.py +0 -0
  236. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_skill_commands.py +0 -0
  237. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_spec.py +0 -0
  238. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_state_store.py +0 -0
  239. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_tui_conditional_settings.py +0 -0
  240. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_tui_endpoint_selection.py +0 -0
  241. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_tui_extension_install.py +0 -0
  242. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/test_workflow_templates_cli.py +0 -0
  243. {sanka_cli-0.3.8 → sanka_cli-0.3.10}/tests/tui_helpers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: sanka-cli
3
- Version: 0.3.8
3
+ Version: 0.3.10
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
@@ -53,7 +53,7 @@ With [uv installed](https://docs.astral.sh/uv/getting-started/installation/),
53
53
  including on Windows, explicitly select the supported Python runtime:
54
54
 
55
55
  ```bash
56
- uv tool install --python 3.12 sanka-cli
56
+ uv tool install --upgrade --python 3.12 'sanka-cli==0.3.10'
57
57
  sanka --help
58
58
  ```
59
59
 
@@ -61,7 +61,8 @@ The macOS/Linux uv prerequisite is `curl -LsSf https://astral.sh/uv/install.sh |
61
61
  follow its printed shell setup instructions. Advanced pip users should use a
62
62
  Python 3.12+ virtual environment and `python -m pip install sanka-cli`.
63
63
  Bare `pip` can select an older system interpreter and report “No matching distribution found.”
64
- Sanka CLI 0.3.0 includes the interactive TUI. The installer pins the CLI version
64
+ Sanka CLI 0.3.10 uses ordinary CLI output by default. The TUI is opt-in.
65
+ The installer pins the CLI version
65
66
  of its release (`sh install.sh --version X.Y.Z` selects another). See
66
67
  [installation and recovery](https://github.com/sankaHQ/sanka/blob/main/docs/install.md)
67
68
  for Homebrew upgrades, PATH conflicts, and project environments.
@@ -87,7 +88,8 @@ Components are immutable GitHub release wheels selected through the extension
87
88
  manager:
88
89
 
89
90
  ```bash
90
- sanka extension marketplace add https://github.com/sankaHQ/extensions.git --name sanka
91
+ sanka extension marketplace list
92
+ sanka extension marketplace upgrade official
91
93
  sanka extension add sanka/drf-to-fastapi
92
94
  ```
93
95
 
@@ -108,7 +110,7 @@ sanka verify .
108
110
  ```
109
111
 
110
112
  On an interactive terminal, run `sanka tui` from your project to open the
111
- dashboard, or `sanka scan .` to open Scan directly. Use the sidebar and footer
113
+ dashboard, or `sanka scan . --tui` to open Scan directly. Use the sidebar and footer
112
114
  shortcuts for Plan → Apply → Test → Verify; review Plan's hash before Apply.
113
115
  Cloud / Account monitors hosted runs. See the [TUI guide](https://github.com/sankaHQ/sanka/blob/main/docs/tui.md)
114
116
  for configuration and shortcuts. Agents can use `--json` or `--compact-dsl`;
@@ -177,7 +179,7 @@ main CLI process. Hosted SaaS implementations remain private to the cloud runtim
177
179
  from sanka import Sanka
178
180
  ```
179
181
 
180
- `Sanka.configure_system(...)` creates a write-free endpoint descriptor.
182
+ `Sanka.configure_endpoint(...)` creates a write-free endpoint descriptor.
181
183
  `Sanka.migrate(...)` creates or resumes a local lifecycle handle. Planning is
182
184
  destination-write-free, and apply requires the exact plan hash returned by
183
185
  plan.
@@ -25,7 +25,7 @@ With [uv installed](https://docs.astral.sh/uv/getting-started/installation/),
25
25
  including on Windows, explicitly select the supported Python runtime:
26
26
 
27
27
  ```bash
28
- uv tool install --python 3.12 sanka-cli
28
+ uv tool install --upgrade --python 3.12 'sanka-cli==0.3.10'
29
29
  sanka --help
30
30
  ```
31
31
 
@@ -33,7 +33,8 @@ The macOS/Linux uv prerequisite is `curl -LsSf https://astral.sh/uv/install.sh |
33
33
  follow its printed shell setup instructions. Advanced pip users should use a
34
34
  Python 3.12+ virtual environment and `python -m pip install sanka-cli`.
35
35
  Bare `pip` can select an older system interpreter and report “No matching distribution found.”
36
- Sanka CLI 0.3.0 includes the interactive TUI. The installer pins the CLI version
36
+ Sanka CLI 0.3.10 uses ordinary CLI output by default. The TUI is opt-in.
37
+ The installer pins the CLI version
37
38
  of its release (`sh install.sh --version X.Y.Z` selects another). See
38
39
  [installation and recovery](https://github.com/sankaHQ/sanka/blob/main/docs/install.md)
39
40
  for Homebrew upgrades, PATH conflicts, and project environments.
@@ -59,7 +60,8 @@ Components are immutable GitHub release wheels selected through the extension
59
60
  manager:
60
61
 
61
62
  ```bash
62
- sanka extension marketplace add https://github.com/sankaHQ/extensions.git --name sanka
63
+ sanka extension marketplace list
64
+ sanka extension marketplace upgrade official
63
65
  sanka extension add sanka/drf-to-fastapi
64
66
  ```
65
67
 
@@ -80,7 +82,7 @@ sanka verify .
80
82
  ```
81
83
 
82
84
  On an interactive terminal, run `sanka tui` from your project to open the
83
- dashboard, or `sanka scan .` to open Scan directly. Use the sidebar and footer
85
+ dashboard, or `sanka scan . --tui` to open Scan directly. Use the sidebar and footer
84
86
  shortcuts for Plan → Apply → Test → Verify; review Plan's hash before Apply.
85
87
  Cloud / Account monitors hosted runs. See the [TUI guide](https://github.com/sankaHQ/sanka/blob/main/docs/tui.md)
86
88
  for configuration and shortcuts. Agents can use `--json` or `--compact-dsl`;
@@ -149,7 +151,7 @@ main CLI process. Hosted SaaS implementations remain private to the cloud runtim
149
151
  from sanka import Sanka
150
152
  ```
151
153
 
152
- `Sanka.configure_system(...)` creates a write-free endpoint descriptor.
154
+ `Sanka.configure_endpoint(...)` creates a write-free endpoint descriptor.
153
155
  `Sanka.migrate(...)` creates or resumes a local lifecycle handle. Planning is
154
156
  destination-write-free, and apply requires the exact plan hash returned by
155
157
  plan.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sanka-cli"
3
- version = "0.3.8"
3
+ version = "0.3.10"
4
4
  description = "Sanka command-line interface and migration runtime"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -973,16 +973,14 @@ def _prompt_choice(
973
973
  choices: tuple[tuple[str, str], ...],
974
974
  *,
975
975
  default: str,
976
+ indent: str = "",
976
977
  ) -> str:
977
- print(label)
978
+ print(f"{indent}{label}")
978
979
  for index, (value, description) in enumerate(choices, start=1):
979
980
  marker = " (recommended)" if value == default else ""
980
- print(f" {index}. {description}{marker}")
981
- raw = (
982
- input(f"Select [{next(i for i, item in enumerate(choices, 1) if item[0] == default)}]: ")
983
- .strip()
984
- .lower()
985
- )
981
+ print(f"{indent} {index}. {description}{marker}")
982
+ default_index = next(i for i, item in enumerate(choices, 1) if item[0] == default)
983
+ raw = input(f"{indent}Select [{default_index}]: ").strip().lower()
986
984
  if not raw:
987
985
  return default
988
986
  for index, (value, _description) in enumerate(choices, start=1):
@@ -1036,14 +1034,17 @@ def _extension_configuration(args: argparse.Namespace) -> dict[str, Any]:
1036
1034
  return configuration
1037
1035
 
1038
1036
 
1039
- def _lifecycle_prompt(label: str, choices: tuple[str, ...] | None = None) -> str | None:
1037
+ def _lifecycle_prompt(
1038
+ label: str, choices: tuple[str, ...] | None = None, *, indent: str = ""
1039
+ ) -> str | None:
1040
1040
  if choices:
1041
1041
  return _prompt_choice(
1042
1042
  f"{label}:",
1043
1043
  tuple((choice, choice) for choice in choices),
1044
1044
  default=choices[0],
1045
+ indent=indent,
1045
1046
  )
1046
- return input(f"{label}: ").strip() or None
1047
+ return input(f"{indent}{label}: ").strip() or None
1047
1048
 
1048
1049
 
1049
1050
  def _application_lifecycle(
@@ -1056,6 +1057,19 @@ def _application_lifecycle(
1056
1057
  terminal = terminal or _terminal(args)
1057
1058
  decoder = getincrementaldecoder("utf-8")("replace")
1058
1059
  pending = ""
1060
+ configuration_started = False
1061
+
1062
+ def prompt(label: str, choices: tuple[str, ...] | None = None) -> str | None:
1063
+ nonlocal configuration_started
1064
+ if args.command == "plan" and (
1065
+ label == "Choose a migration target" or label.startswith("Extension configuration: ")
1066
+ ):
1067
+ print("" if configuration_started else "Configuration:")
1068
+ configuration_started = True
1069
+ return _lifecycle_prompt(
1070
+ label.removeprefix("Extension configuration: "), choices, indent=" "
1071
+ )
1072
+ return _lifecycle_prompt(label, choices)
1059
1073
 
1060
1074
  def on_stderr(chunk: bytes) -> None:
1061
1075
  nonlocal pending
@@ -1071,7 +1085,7 @@ def _application_lifecycle(
1071
1085
  runner=ExtensionRunner(on_stderr=on_stderr),
1072
1086
  interactive=_interactive_terminal()
1073
1087
  and not (args.json or getattr(args, "compact_dsl", False) or getattr(args, "quiet", False)),
1074
- prompt=_lifecycle_prompt,
1088
+ prompt=prompt,
1075
1089
  input_hints=plan_input_hints(getattr(args, "to", None)),
1076
1090
  )
1077
1091
 
@@ -1122,24 +1136,13 @@ def _print_application_result(
1122
1136
  path = path.relative_to(Path(args.root).resolve())
1123
1137
  print(f"{'Plan file' if command == 'plan' else 'Report':<10} {path}")
1124
1138
  if next_hint and not quiet:
1125
- if command == "plan":
1126
- next_hint = shlex.join(
1127
- [
1128
- "sanka",
1129
- "apply",
1130
- "--root",
1131
- str(args.root),
1132
- "--artifact-dir",
1133
- str(args.artifact_dir),
1134
- "--plan-hash",
1135
- str(result.data["plan_hash"]),
1136
- *[
1137
- part
1138
- for name in args.extension_env
1139
- for part in ("--extension-env", name)
1140
- ],
1141
- ]
1142
- )
1139
+ options: list[str] = []
1140
+ if args.artifact_dir != ".sanka":
1141
+ options.extend(("--artifact-dir", str(args.artifact_dir)))
1142
+ for name in dict.fromkeys([*args.extension_env, *result.forwarded_env_names]):
1143
+ options.extend(("--extension-env", name))
1144
+ if options:
1145
+ next_hint += " " + shlex.join(options)
1143
1146
  print(f"next: {next_hint}")
1144
1147
  return 0
1145
1148
 
@@ -8,6 +8,7 @@ an older or newer extension response never breaks the text output.
8
8
 
9
9
  from __future__ import annotations
10
10
 
11
+ import shlex
11
12
  from collections.abc import Mapping
12
13
  from pathlib import Path
13
14
  from typing import Any
@@ -110,17 +111,6 @@ def _scan_lines(data: Mapping[str, Any]) -> list[str]:
110
111
  return lines
111
112
 
112
113
 
113
- def _target_from_extension_id(extension_id: Any) -> str | None:
114
- """``sanka/drf-to-fastapi`` names its target after ``-to-``; other ids give nothing."""
115
- if not isinstance(extension_id, str):
116
- return None
117
- name = extension_id.rsplit("/", 1)[-1]
118
- if "-to-" not in name:
119
- return None
120
- target = name.rsplit("-to-", 1)[-1].strip()
121
- return canonical_target(extension_id, target) if target else None
122
-
123
-
124
114
  def _scan_targets(data: Mapping[str, Any]) -> list[str]:
125
115
  targets: list[str] = []
126
116
 
@@ -140,14 +130,21 @@ def _scan_targets(data: Mapping[str, Any]) -> list[str]:
140
130
  identifier = record.get("id")
141
131
  if not explicit and isinstance(record, Mapping):
142
132
  explicit = record.get("targets")
133
+ if not explicit:
134
+ explicit = next(
135
+ (
136
+ item.get("targets")
137
+ for item in data.get("recommendations") or ()
138
+ if isinstance(item, Mapping) and item.get("id") == identifier
139
+ ),
140
+ (),
141
+ )
143
142
  for candidate in explicit or ():
144
143
  add(
145
144
  canonical_target(identifier, candidate)
146
145
  if isinstance(identifier, str) and isinstance(candidate, str)
147
146
  else candidate
148
147
  )
149
- if not explicit:
150
- add(_target_from_extension_id(identifier))
151
148
  return targets
152
149
 
153
150
 
@@ -330,22 +327,31 @@ def application_summary(
330
327
  """Return (summary lines, next-command hint) for a successful lifecycle step."""
331
328
  if not isinstance(data, Mapping):
332
329
  return [], None
330
+ quoted_root = shlex.quote(str(root))
333
331
  if command == "scan":
334
332
  targets = _scan_targets(data)
335
333
  target = targets[0] if len(targets) == 1 else "<target>"
336
- return _scan_lines(data), f"sanka plan . --to {target}"
334
+ return _scan_lines(data), f"sanka plan {quoted_root} --to {target}"
337
335
  if command == "plan":
336
+ capture = data.get("capture")
337
+ if isinstance(capture, Mapping) and capture.get("generation_ready") is False:
338
+ lines = _plan_lines(data, root)
339
+ lines.extend(["", "Generation blocked; resolve the capture gaps before applying."])
340
+ gaps = capture.get("gaps")
341
+ if isinstance(gaps, list):
342
+ lines.extend(f" {gap}" for gap in gaps if isinstance(gap, str))
343
+ return lines, None
338
344
  plan_hash = data.get("plan_hash")
339
345
  hint = (
340
- f"sanka apply --root . --plan-hash {plan_hash}"
346
+ f"sanka apply --root {quoted_root} --plan-hash {shlex.quote(plan_hash)}"
341
347
  if isinstance(plan_hash, str) and plan_hash
342
- else "sanka apply --root . --plan-hash <hash printed above>"
348
+ else f"sanka apply --root {quoted_root} --plan-hash <hash printed above>"
343
349
  )
344
350
  return _plan_lines(data, root), hint
345
351
  if command == "apply":
346
- return _apply_lines(data, root), "sanka test ."
352
+ return _apply_lines(data, root), f"sanka test {quoted_root}"
347
353
  if command == "test":
348
- return _test_lines(data, root), "sanka verify ."
354
+ return _test_lines(data, root), f"sanka verify {quoted_root}"
349
355
  if command == "verify":
350
356
  return _verify_lines(data), None
351
357
  return [], None
@@ -195,8 +195,8 @@ def reopen_incomplete_routes(
195
195
  ) -> None:
196
196
  """Reopen routes from their last safe keyset checkpoint.
197
197
 
198
- The checkpoint comes from the route's last batch page — its next cursor,
199
- or the last source record id the page held. A route with neither has no
198
+ Prefer the saved terminal checkpoint: the page can contain later failed rows.
199
+ Otherwise use its next cursor or last source record id. A route with neither has no
200
200
  safe resume point: with ``require_checkpoint`` the reopen refuses
201
201
  (``SANKA_MIGRATE_SOURCE_CHECKPOINT_MISSING``) before mutating anything, because
202
202
  resuming from nowhere would re-read outside the frozen scope.
@@ -207,7 +207,9 @@ def reopen_incomplete_routes(
207
207
  reopened_checkpoints: dict[str, str] = {}
208
208
  for route_key in sorted(route_keys):
209
209
  page = snapshot.batch_pages.get(route_key)
210
- cursor = str(page.next_cursor or "").strip() if page is not None else ""
210
+ cursor = str(snapshot.checkpoints.get(route_key) or "").strip()
211
+ if not cursor and page is not None:
212
+ cursor = str(page.next_cursor or "").strip()
211
213
  if not cursor and page is not None and page.source_record_ids:
212
214
  cursor = page.source_record_ids[-1]
213
215
  if not cursor and require_checkpoint:
@@ -25,6 +25,7 @@ from sanka.runtime.extensions.runner import (
25
25
  ExtensionResult,
26
26
  ExtensionRunner,
27
27
  _canonical_environment_names,
28
+ extension_environment_names,
28
29
  )
29
30
  from sanka.runtime.extensions.settings import setting_defaults
30
31
  from sanka.runtime.extensions.store import DEFAULT_EXTENSION_ID, ExtensionStore, LockEntry
@@ -464,6 +465,13 @@ class ApplicationLifecycle:
464
465
  "configuration": normalized,
465
466
  "explicit_env_names": list(explicit_env_names),
466
467
  **data,
468
+ "forwarded_env_names": sorted(
469
+ {
470
+ name
471
+ for lock in locks
472
+ for name in extension_environment_names(lock, explicit_env_names)
473
+ }
474
+ ),
467
475
  }
468
476
  scan_path = _write_json(self.artifact_root / "scan.json", scan_payload)
469
477
  return ExtensionResult(
@@ -482,6 +490,11 @@ class ApplicationLifecycle:
482
490
  action for _lock, result in extension_results for action in result.next_actions
483
491
  ),
484
492
  error=None,
493
+ forwarded_env_names=tuple(
494
+ sorted(
495
+ {name for _, result in extension_results for name in result.forwarded_env_names}
496
+ )
497
+ ),
485
498
  )
486
499
 
487
500
  def _current_scan_locked(
@@ -494,6 +507,13 @@ class ApplicationLifecycle:
494
507
  locks = self._scan_locks(recommendations)
495
508
  expected_locks = [lock.to_dict() for lock in locks]
496
509
  expected_recommendations = _serialized_recommendations(recommendations)
510
+ environment_names = sorted(
511
+ {
512
+ name
513
+ for lock in locks
514
+ for name in extension_environment_names(lock, explicit_env_names)
515
+ }
516
+ )
497
517
  try:
498
518
  scan = _read_json(self.artifact_root / "scan.json", SCAN_SCHEMA)
499
519
  except ExtensionError:
@@ -512,9 +532,11 @@ class ApplicationLifecycle:
512
532
  and saved.get("hash") == fingerprint.hash
513
533
  and scan.get("configuration") == normalized
514
534
  and scan.get("explicit_env_names") == list(explicit_env_names)
535
+ and scan.get("forwarded_env_names", scan.get("explicit_env_names"))
536
+ == environment_names
515
537
  and saved_locks == expected_locks
516
538
  and scan.get("recommendations") == expected_recommendations
517
- and not explicit_env_names
539
+ and not environment_names
518
540
  ):
519
541
  return
520
542
  self._scan_locked(
@@ -844,6 +866,7 @@ class ApplicationLifecycle:
844
866
  limitations=result.limitations,
845
867
  next_actions=result.next_actions,
846
868
  error=None,
869
+ forwarded_env_names=result.forwarded_env_names,
847
870
  )
848
871
 
849
872
  def _load_plan(self) -> dict[str, Any]:
@@ -970,6 +993,7 @@ class ApplicationLifecycle:
970
993
  limitations=result.limitations,
971
994
  next_actions=result.next_actions,
972
995
  error=None,
996
+ forwarded_env_names=result.forwarded_env_names,
973
997
  )
974
998
 
975
999
  def apply(
@@ -1054,6 +1078,7 @@ class ApplicationLifecycle:
1054
1078
  limitations=result.limitations,
1055
1079
  next_actions=result.next_actions,
1056
1080
  error=None,
1081
+ forwarded_env_names=result.forwarded_env_names,
1057
1082
  )
1058
1083
 
1059
1084
  def _replay_lock(self, fingerprint: Fingerprint) -> LockEntry:
@@ -12,6 +12,7 @@ import subprocess
12
12
  import time
13
13
  from collections.abc import Callable
14
14
  from contextlib import suppress
15
+ from dataclasses import replace
15
16
  from pathlib import Path
16
17
  from typing import Any, NoReturn, cast
17
18
 
@@ -41,6 +42,13 @@ def _canonical_environment_names(names: tuple[str, ...]) -> tuple[str, ...]:
41
42
  return tuple(sorted(names))
42
43
 
43
44
 
45
+ def extension_environment_names(lock: LockEntry, explicit: tuple[str, ...]) -> tuple[str, ...]:
46
+ names = _canonical_environment_names(explicit)
47
+ if lock.id == "sanka/python-to-golang" and "SANKA_GO_SOURCE_PYTHON" in os.environ:
48
+ return tuple(sorted({*names, "SANKA_GO_SOURCE_PYTHON"}))
49
+ return names
50
+
51
+
44
52
  class ExtensionRunner:
45
53
  """Run one verified lock through exactly one JSON request and response."""
46
54
 
@@ -218,8 +226,9 @@ class ExtensionRunner:
218
226
  enabled=lock.enabled,
219
227
  )
220
228
 
229
+ names = extension_environment_names(lock, explicit_env_names)
230
+
221
231
  def execute(content: bytes) -> tuple[int, bytes, bytes]:
222
- names = _canonical_environment_names(explicit_env_names)
223
232
  environment = {name: os.environ[name] for name in SAFE_ENV if name in os.environ}
224
233
  environment["PYTHONDONTWRITEBYTECODE"] = "1"
225
234
  environment.update({name: os.environ[name] for name in names if name in os.environ})
@@ -256,9 +265,10 @@ class ExtensionRunner:
256
265
  pass_fds=pass_fds,
257
266
  )
258
267
 
259
- return ExtensionStageRunner().run(
268
+ result = ExtensionStageRunner().run(
260
269
  binding, request, allowed_roots=allowed_roots, execute=execute
261
270
  )
271
+ return replace(result, forwarded_env_names=names)
262
272
 
263
273
 
264
274
  __all__ = ["ExtensionResult", "ExtensionRunner"]
@@ -45,6 +45,8 @@ class ExtensionResult:
45
45
  limitations: tuple[str, ...]
46
46
  next_actions: tuple[str, ...]
47
47
  error: dict[str, Any] | None
48
+ # Local transport metadata, outside the extension wire response and Plan hash.
49
+ forwarded_env_names: tuple[str, ...] = ()
48
50
 
49
51
 
50
52
  def _error(code: str, message: str, **details: Any) -> NoReturn:
@@ -61,7 +61,7 @@ OFFICIAL_IDENTITY = "github.com/sankaHQ/extensions"
61
61
  OFFICIAL_SOURCE = "https://github.com/sankaHQ/extensions.git"
62
62
  # Advance only after verifying the catalog's published release wheels.
63
63
  # Development entries may still refer to releases awaiting publication.
64
- OFFICIAL_REVISION = "21ce3a6fb85f03692ff549fe13324725929e0615"
64
+ OFFICIAL_REVISION = "302475d1feed583012dcab0b293a0e972792c954"
65
65
  DEFAULT_EXTENSION_ID = "sanka/drf-to-fastapi"
66
66
  MAX_WHEEL_BYTES = 128 * 1024 * 1024
67
67
  MAX_WHEEL_UNCOMPRESSED_BYTES = 512 * 1024 * 1024
@@ -1,4 +1,4 @@
1
1
  # SPDX-License-Identifier: Apache-2.0
2
2
  __all__ = ["__version__"]
3
3
 
4
- __version__ = "0.3.8"
4
+ __version__ = "0.3.10"
@@ -102,7 +102,7 @@ def test_plan_summary_shows_strategy_route_split_and_apply_hint(tmp_path: Path)
102
102
  " 0 need manual adaptation",
103
103
  " readiness 100% (7/7 non-alias routes)",
104
104
  ]
105
- assert hint == f"sanka apply --root . --plan-hash {plan_hash}"
105
+ assert hint == f"sanka apply --root {tmp_path} --plan-hash {plan_hash}"
106
106
 
107
107
 
108
108
  def test_apply_test_and_verify_summaries(tmp_path: Path) -> None:
@@ -118,7 +118,7 @@ def test_apply_test_and_verify_summaries(tmp_path: Path) -> None:
118
118
  " Output .sanka/output/fastapi",
119
119
  " Engine Tortoise ORM",
120
120
  ]
121
- assert apply_hint == "sanka test ."
121
+ assert apply_hint == f"sanka test {tmp_path}"
122
122
 
123
123
  test_lines, test_hint = application_summary(
124
124
  "test",
@@ -130,7 +130,7 @@ def test_apply_test_and_verify_summaries(tmp_path: Path) -> None:
130
130
  " Ran 7 tests",
131
131
  " Env .sanka/output/fastapi/.venv",
132
132
  ]
133
- assert test_hint == "sanka verify ."
133
+ assert test_hint == f"sanka verify {tmp_path}"
134
134
 
135
135
  verify_lines, verify_hint = application_summary(
136
136
  "verify",
@@ -165,12 +165,13 @@ def test_summary_tolerates_unknown_shapes() -> None:
165
165
  assert application_summary("scan", "not a mapping") == ([], None) # type: ignore[arg-type]
166
166
 
167
167
 
168
- def test_scan_hint_derives_the_target_from_the_extension_id() -> None:
168
+ def test_scan_hint_uses_declared_recommendation_targets() -> None:
169
169
  _lines, hint = application_summary(
170
170
  "scan",
171
171
  {
172
172
  "routes": [],
173
173
  "extensions": [{"extension": {"id": "sanka/drf-to-fastapi", "version": "0.1.0a10"}}],
174
+ "recommendations": [{"id": "sanka/drf-to-fastapi", "targets": ["fastapi"]}],
174
175
  },
175
176
  )
176
177
  assert hint == "sanka plan . --to python-fastapi"
@@ -208,3 +209,14 @@ def test_go_replay_summaries_disclose_actual_tests_and_scope(tmp_path: Path) ->
208
209
  assert "Original source tests were not run" in "\n".join(
209
210
  application_summary("verify", report)[0]
210
211
  )
212
+
213
+
214
+ def test_blocked_capture_plan_has_no_apply_recommendation() -> None:
215
+ gap = "service/views.py: custom request processing requires capture"
216
+ data = {"capture": {"generation_ready": False, "gaps": [gap]}}
217
+ lines, hint = application_summary("plan", data)
218
+ assert hint is None
219
+ assert any(gap in line for line in lines)
220
+ for capture in ({"generation_ready": True, "gaps": []}, {}):
221
+ _, hint = application_summary("plan", {"capture": capture})
222
+ assert hint is not None
@@ -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.8"
614
+ assert request.get_header("User-agent") == "sanka-cli/0.3.10"
615
615
  assert request.get_header("Content-type") == "application/json"
616
616
  assert timeout == 10.0
617
617
 
@@ -4,6 +4,7 @@ from __future__ import annotations
4
4
  import argparse
5
5
  import io
6
6
  import json
7
+ import shlex
7
8
  from pathlib import Path
8
9
  from typing import cast
9
10
 
@@ -16,6 +17,61 @@ from sanka.runtime.extensions import ExtensionError
16
17
  from sanka.runtime.extensions.runner import ExtensionResult, ExtensionRunner
17
18
 
18
19
 
20
+ @pytest.mark.parametrize("forwarded", [(), ("SANKA_GO_SOURCE_PYTHON",)])
21
+ @pytest.mark.parametrize("command", ["scan", "plan", "apply", "test"])
22
+ @pytest.mark.parametrize(
23
+ "options",
24
+ [
25
+ [],
26
+ ["--artifact-dir", "reports and plans"],
27
+ ["--extension-env", "SOURCE_PYTHON", "--extension-env", "DATABASE_URL"],
28
+ ["--extension-env", "SANKA_GO_SOURCE_PYTHON"],
29
+ ],
30
+ )
31
+ def test_next_hint_keeps_the_invocation_context(
32
+ tmp_path: Path,
33
+ capsys: pytest.CaptureFixture[str],
34
+ command: str,
35
+ options: list[str],
36
+ forwarded: tuple[str, ...],
37
+ ) -> None:
38
+ tmp_path = tmp_path / "source project"
39
+ parser = _build_parser()
40
+ invocation = (
41
+ [command, "--root", str(tmp_path), "--plan-hash", "sha256:previous"]
42
+ if command == "apply"
43
+ else [command, str(tmp_path)]
44
+ )
45
+ args = parser.parse_args([*invocation, *options])
46
+ args.root = getattr(args, "root_option", None) or args.root
47
+ result = ExtensionResult(
48
+ "success",
49
+ {"plan_hash": "sha256:reviewed", "extensions": [{"id": "sanka/python-to-golang"}]},
50
+ (),
51
+ (),
52
+ (),
53
+ None,
54
+ forwarded_env_names=forwarded,
55
+ )
56
+ cli._print_application_result(args, command, result, migration_state="planned")
57
+ output = capsys.readouterr().out
58
+ hint = next(
59
+ line.removeprefix("next: ") for line in output.splitlines() if line.startswith("next: ")
60
+ )
61
+ tokens = shlex.split(hint)
62
+ following = parser.parse_args(tokens[1:])
63
+ assert Path(getattr(following, "root_option", None) or following.root) == tmp_path
64
+ assert following.artifact_dir == args.artifact_dir
65
+ assert following.extension_env == list(dict.fromkeys([*args.extension_env, *forwarded]))
66
+ if command == "scan":
67
+ assert following.to == "<target>"
68
+ if command == "plan":
69
+ assert following.plan_hash == result.data["plan_hash"]
70
+ if not options:
71
+ assert "--artifact-dir" not in tokens
72
+ assert ("--extension-env" in tokens) == bool(forwarded)
73
+
74
+
19
75
  def test_extension_help_exposes_only_the_management_command_tree(
20
76
  capsys: pytest.CaptureFixture[str],
21
77
  ) -> None:
@@ -175,6 +231,42 @@ def test_real_install_prompt_declines_by_default_and_preserves_selected_choice(
175
231
  assert cli._lifecycle_prompt("Choose an extension to install", choices) == choices[2]
176
232
 
177
233
 
234
+ @pytest.mark.parametrize("choose_target", [False, True])
235
+ def test_plan_configuration_groups_keep_numbered_selections(
236
+ tmp_path: Path,
237
+ monkeypatch: pytest.MonkeyPatch,
238
+ capsys: pytest.CaptureFixture[str],
239
+ choose_target: bool,
240
+ ) -> None:
241
+ monkeypatch.setattr(cli, "_interactive_terminal", lambda: True)
242
+
243
+ def answer(label: str) -> str:
244
+ print(label)
245
+ return "2"
246
+
247
+ monkeypatch.setattr("builtins.input", answer)
248
+ args = _build_parser().parse_args(["plan", str(tmp_path)])
249
+ for _ in range(2):
250
+ lifecycle = cli._application_lifecycle(args)
251
+ assert lifecycle.prompt is not None
252
+ if choose_target:
253
+ assert (
254
+ lifecycle.prompt("Choose a migration target", ("go-chi", "go-fiber")) == "go-fiber"
255
+ )
256
+ assert (
257
+ lifecycle.prompt(
258
+ "Extension configuration: Destination database", ("auto", "pgx", "sqlite")
259
+ )
260
+ == "pgx"
261
+ )
262
+ assert lifecycle.prompt("Extension configuration: output [generated]", None) == "2"
263
+ lines = capsys.readouterr().out.splitlines()
264
+ assert sum(bool(line) and not line.startswith(" ") for line in lines) == 1
265
+ assert all(line.startswith(" ") for line in lines if line.lstrip()[:1].isdigit())
266
+ assert lines[-1].startswith(" ")
267
+ assert lines.count("") == (2 if choose_target else 1)
268
+
269
+
178
270
  def test_extension_config_requires_a_json_object(capsys: pytest.CaptureFixture[str]) -> None:
179
271
  assert main(["scan", ".", "--extension-config", "[]", "--json"]) == 2
180
272
  payload = json.loads(capsys.readouterr().out)