sanka-cli 0.2.14__tar.gz → 0.2.16__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 (225) hide show
  1. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/PKG-INFO +1 -1
  2. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/pyproject.toml +1 -1
  3. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/cli/__init__.py +47 -5
  4. sanka_cli-0.2.16/src/sanka/cli/_summary.py +271 -0
  5. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/discovery.py +6 -1
  6. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/lifecycle.py +47 -8
  7. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/store.py +42 -0
  8. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/host.py +8 -0
  9. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/lifecycle.py +195 -10
  10. sanka_cli-0.2.16/src/sanka/runtime/flow/native_verification.py +521 -0
  11. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/planner.py +20 -1
  12. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/verification.py +4 -0
  13. sanka_cli-0.2.16/src/sanka/runtime/flow/verification_plan.py +88 -0
  14. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/mapping/model.py +5 -0
  15. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/mapping/record_mapping.py +39 -1
  16. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/planner.py +6 -0
  17. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/__init__.py +1 -1
  18. sanka_cli-0.2.16/src/sanka_cli/cloud_source.py +127 -0
  19. sanka_cli-0.2.16/src/sanka_cli/commands/cloud_github.py +105 -0
  20. sanka_cli-0.2.16/src/sanka_cli/commands/code_cloud.py +361 -0
  21. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/doctor.py +71 -1
  22. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/migrate.py +24 -0
  23. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/main.py +2 -0
  24. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/__init__.py +27 -0
  25. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/blueprint.py +74 -16
  26. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/native.py +12 -1
  27. sanka_cli-0.2.16/src/sanka_extensions/flow/native_fixtures.py +371 -0
  28. sanka_cli-0.2.16/src/sanka_extensions/flow/native_process_recipes.py +216 -0
  29. sanka_cli-0.2.16/src/sanka_extensions/flow/native_profiles.py +51 -0
  30. sanka_cli-0.2.16/src/sanka_extensions/flow/native_recipes.py +277 -0
  31. sanka_cli-0.2.16/src/sanka_extensions/flow/native_task_recipes.py +273 -0
  32. sanka_cli-0.2.16/src/sanka_extensions/flow/native_verification.py +370 -0
  33. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/protocol.py +66 -5
  34. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/flow_wheel_acceptance.py +39 -12
  35. sanka_cli-0.2.16/tests/test_application_summary.py +165 -0
  36. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_cli.py +1 -1
  37. sanka_cli-0.2.16/tests/test_doctor.py +204 -0
  38. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_extension_lifecycle.py +130 -0
  39. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_extension.py +5 -2
  40. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_extension_wheel_acceptance.py +27 -7
  41. sanka_cli-0.2.16/tests/test_flow_native_lifecycle.py +466 -0
  42. sanka_cli-0.2.16/tests/test_flow_native_verification.py +523 -0
  43. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_mapping_record_mapping.py +62 -0
  44. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_mcp_retirement.py +1 -1
  45. sanka_cli-0.2.16/tests/test_plan_input_hints.py +28 -0
  46. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_planner.py +1 -0
  47. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_sanka_facade.py +1 -1
  48. sanka_cli-0.2.14/tests/test_doctor.py +0 -97
  49. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/.gitignore +0 -0
  50. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/LICENSES/AGPL-3.0-only.txt +0 -0
  51. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/LICENSES/Apache-2.0.txt +0 -0
  52. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/NOTICE +0 -0
  53. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/README.md +0 -0
  54. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/__init__.py +0 -0
  55. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/_client.py +0 -0
  56. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/cli/_compact.py +0 -0
  57. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/cli/_output.py +0 -0
  58. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/cli/_research.py +0 -0
  59. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/cli/py.typed +0 -0
  60. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/connector/__init__.py +0 -0
  61. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/connector/py.typed +0 -0
  62. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/__about__.py +0 -0
  63. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/__init__.py +0 -0
  64. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/concurrency.py +0 -0
  65. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/connector_client.py +0 -0
  66. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/connector_host.py +0 -0
  67. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/engine.py +0 -0
  68. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/__init__.py +0 -0
  69. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/continuous.py +0 -0
  70. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/errors.py +0 -0
  71. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/local.py +0 -0
  72. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/model.py +0 -0
  73. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/report_codec.py +0 -0
  74. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/routes.py +0 -0
  75. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/scope.py +0 -0
  76. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/state.py +0 -0
  77. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/execution/validate.py +0 -0
  78. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/__init__.py +0 -0
  79. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/artifacts.py +0 -0
  80. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/code_lifecycle.py +0 -0
  81. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/code_repair.py +0 -0
  82. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/model.py +0 -0
  83. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/runner.py +0 -0
  84. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/extensions/stage.py +0 -0
  85. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/__init__.py +0 -0
  86. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/extension.py +0 -0
  87. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/merge.py +0 -0
  88. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/model.py +0 -0
  89. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/sqlite.py +0 -0
  90. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/flow/state.py +0 -0
  91. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/hashing.py +0 -0
  92. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/mapping/__init__.py +0 -0
  93. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/mapping/errors.py +0 -0
  94. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/mapping/mapping_candidates.py +0 -0
  95. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/mapping/owner_mapping.py +0 -0
  96. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/mapping/pending_relationships.py +0 -0
  97. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/private_sqlite.py +0 -0
  98. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/py.typed +0 -0
  99. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/registry.py +0 -0
  100. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/safe_local_io.py +0 -0
  101. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/spec.py +0 -0
  102. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka/runtime/state.py +0 -0
  103. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/__main__.py +0 -0
  104. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/bundle.py +0 -0
  105. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/certificates.py +0 -0
  106. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/client.py +0 -0
  107. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/__init__.py +0 -0
  108. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/ai.py +0 -0
  109. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/auth.py +0 -0
  110. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/cloud.py +0 -0
  111. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/cloud_fleet.py +0 -0
  112. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/cloud_migrate.py +0 -0
  113. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/code.py +0 -0
  114. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/fix.py +0 -0
  115. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/functions.py +0 -0
  116. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/profiles.py +0 -0
  117. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/resources.py +0 -0
  118. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/skill.py +0 -0
  119. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/workflow_templates.py +0 -0
  120. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/commands/workflows.py +0 -0
  121. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/config.py +0 -0
  122. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/output.py +0 -0
  123. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/runtime.py +0 -0
  124. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/skills/sanka-cli/SKILL.md +0 -0
  125. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_cli/state.py +0 -0
  126. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/__about__.py +0 -0
  127. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/__init__.py +0 -0
  128. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/credentials.py +0 -0
  129. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/errors.py +0 -0
  130. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/protocols.py +0 -0
  131. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/provisioning.py +0 -0
  132. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/py.typed +0 -0
  133. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/records.py +0 -0
  134. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/registration.py +0 -0
  135. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_connector/schema.py +0 -0
  136. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extension_sdk/__init__.py +0 -0
  137. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extension_sdk/contract.py +0 -0
  138. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extension_sdk/py.typed +0 -0
  139. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/__init__.py +0 -0
  140. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/code/__init__.py +0 -0
  141. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/code/contract.py +0 -0
  142. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/__about__.py +0 -0
  143. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/__init__.py +0 -0
  144. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/credentials.py +0 -0
  145. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/errors.py +0 -0
  146. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/protocols.py +0 -0
  147. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/provisioning.py +0 -0
  148. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/py.typed +0 -0
  149. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/records.py +0 -0
  150. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/registration.py +0 -0
  151. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/data/schema.py +0 -0
  152. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/_wire.py +0 -0
  153. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/definition.py +0 -0
  154. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/graph.py +0 -0
  155. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/identity.py +0 -0
  156. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/scenario.py +0 -0
  157. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/flow/source.py +0 -0
  158. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/py.typed +0 -0
  159. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/__about__.py +0 -0
  160. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/__init__.py +0 -0
  161. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/credentials.py +0 -0
  162. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/errors.py +0 -0
  163. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/protocols.py +0 -0
  164. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/provisioning.py +0 -0
  165. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/py.typed +0 -0
  166. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/records.py +0 -0
  167. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/registration.py +0 -0
  168. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/src/sanka_extensions/systems/schema.py +0 -0
  169. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/conftest.py +0 -0
  170. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_drf_project/api/__init__.py +0 -0
  171. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_drf_project/api/serializers.py +0 -0
  172. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_drf_project/api/views.py +0 -0
  173. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_drf_project/config/__init__.py +0 -0
  174. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_drf_project/config/settings.py +0 -0
  175. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_drf_project/config/urls.py +0 -0
  176. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_drf_project/manage.py +0 -0
  177. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_marketplace/drf-to-fastapi.json +0 -0
  178. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/extension_marketplace/marketplace.json +0 -0
  179. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/flow/synthetic_native_order_billing_blueprint.json +0 -0
  180. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/flow/synthetic_sales_created_estimate_blueprint.json +0 -0
  181. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/fixtures/flow/synthetic_sales_quote_blueprint.json +0 -0
  182. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_business_flow_extension_acceptance.py +0 -0
  183. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_cli_developer_experience.py +0 -0
  184. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_code_bundle.py +0 -0
  185. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_code_commands.py +0 -0
  186. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_code_lifecycle.py +0 -0
  187. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_code_repair.py +0 -0
  188. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_concurrency.py +0 -0
  189. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_connector_client.py +0 -0
  190. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_connector_host.py +0 -0
  191. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_credential_provider.py +0 -0
  192. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_engine_e2e.py +0 -0
  193. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_engine_execution_adoption.py +0 -0
  194. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_engine_pg_to_clickhouse_e2e.py +0 -0
  195. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_engine_postgres_e2e.py +0 -0
  196. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_continuous.py +0 -0
  197. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_exact_scope.py +0 -0
  198. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_local_store.py +0 -0
  199. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_report_codec.py +0 -0
  200. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_routes.py +0 -0
  201. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_scope.py +0 -0
  202. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_seam.py +0 -0
  203. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_execution_validate.py +0 -0
  204. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_extension_discovery.py +0 -0
  205. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_extension_runner.py +0 -0
  206. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_extension_stage.py +0 -0
  207. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_extension_store.py +0 -0
  208. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_extension_wheel_acceptance.py +0 -0
  209. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_lifecycle.py +0 -0
  210. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_merge.py +0 -0
  211. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_planner.py +0 -0
  212. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_sdk_codec.py +0 -0
  213. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_sqlite.py +0 -0
  214. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_flow_verification.py +0 -0
  215. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_hashing.py +0 -0
  216. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_hosted_cli.py +0 -0
  217. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_mapping_candidates.py +0 -0
  218. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_mapping_owner_mapping.py +0 -0
  219. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_mapping_pending_relationships.py +0 -0
  220. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_registry.py +0 -0
  221. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_safe_local_io.py +0 -0
  222. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_skill_commands.py +0 -0
  223. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_spec.py +0 -0
  224. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/tests/test_state_store.py +0 -0
  225. {sanka_cli-0.2.14 → sanka_cli-0.2.16}/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.2.14
3
+ Version: 0.2.16
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sanka-cli"
3
- version = "0.2.14"
3
+ version = "0.2.16"
4
4
  description = "Sanka command-line interface and migration runtime"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -37,6 +37,7 @@ import json
37
37
  import shlex
38
38
  import sys
39
39
  import time
40
+ from collections.abc import Callable
40
41
  from pathlib import Path
41
42
  from typing import Any, NoReturn
42
43
 
@@ -46,6 +47,7 @@ from sanka.cli._research import (
46
47
  SankaMigrateApiError,
47
48
  signup_url,
48
49
  )
50
+ from sanka.cli._summary import application_summary
49
51
  from sanka.runtime.__about__ import __version__
50
52
  from sanka.runtime.engine import ExecutionError, MigrationEngine, VerifyReport
51
53
  from sanka.runtime.execution import DEFAULT_VALIDATION_SAMPLE_SIZE
@@ -58,6 +60,36 @@ from sanka.runtime.registry import ExtensionRegistry, UnknownEndpointError
58
60
  from sanka.runtime.spec import EndpointSpec, MigrationSpec, SpecError
59
61
  from sanka.runtime.state import SqliteStateStore
60
62
 
63
+ # Interactive `plan` prompts: the first entry of each tuple is the default, so an
64
+ # empty answer never reaches the extension as "".
65
+ PLAN_STRATEGIES = ("native", "compatibility")
66
+ PLAN_GENERATIONS = ("minimal", "update", "full")
67
+ PLAN_PACKAGE_MANAGERS = ("uv", "pip")
68
+ PLAN_ORMS = ("tortoise", "sqlalchemy", "psycopg")
69
+ _PLAN_INPUT_CHOICES = {
70
+ "strategy": PLAN_STRATEGIES,
71
+ "generation": PLAN_GENERATIONS,
72
+ "package_manager": PLAN_PACKAGE_MANAGERS,
73
+ "orm": PLAN_ORMS,
74
+ }
75
+
76
+
77
+ def plan_input_hints(
78
+ default_target: str | None,
79
+ ) -> Callable[[str, str | None], tuple[tuple[str, ...] | None, str | None]]:
80
+ """Choices and defaults the lifecycle shows when an extension asks for plan inputs."""
81
+
82
+ def hints(name: str, target: str | None) -> tuple[tuple[str, ...] | None, str | None]:
83
+ choices = _PLAN_INPUT_CHOICES.get(name)
84
+ if choices:
85
+ return choices, choices[0]
86
+ if name == "output":
87
+ return None, f".sanka/output/{target or default_target or 'app'}"
88
+ return None, None
89
+
90
+ return hints
91
+
92
+
61
93
  DEFAULT_SPEC_FILE = "sanka.yaml"
62
94
  DEFAULT_STATE_FILE = ".sanka/migrate/state.db"
63
95
  DEFAULT_ARTIFACT_DIR = ".sanka"
@@ -298,7 +330,7 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
298
330
  plan.add_argument("--to", help="target application framework")
299
331
  plan.add_argument(
300
332
  "--strategy",
301
- choices=("native", "compatibility"),
333
+ choices=PLAN_STRATEGIES,
302
334
  default=None,
303
335
  help="native FastAPI generation or the in-process compatibility bridge",
304
336
  )
@@ -306,19 +338,19 @@ def _build_parser(*, json_errors: bool = False) -> argparse.ArgumentParser:
306
338
  plan.add_argument("--output", default=None, help="generated FastAPI target directory")
307
339
  plan.add_argument(
308
340
  "--generation",
309
- choices=("full", "update", "minimal"),
341
+ choices=PLAN_GENERATIONS,
310
342
  default=None,
311
- help="full standalone project, safe update, or minimal runnable output",
343
+ help="minimal runnable output, safe update, or full standalone project",
312
344
  )
313
345
  plan.add_argument(
314
346
  "--package-manager",
315
- choices=("uv", "pip"),
347
+ choices=PLAN_PACKAGE_MANAGERS,
316
348
  default=None,
317
349
  help="dependency setup used by the generated project",
318
350
  )
319
351
  plan.add_argument(
320
352
  "--orm",
321
- choices=("tortoise", "sqlalchemy", "psycopg"),
353
+ choices=PLAN_ORMS,
322
354
  default=None,
323
355
  help="async SQL engine for native FastAPI (default: tortoise, closest to Django)",
324
356
  )
@@ -883,6 +915,7 @@ def _application_lifecycle(args: argparse.Namespace) -> ApplicationLifecycle:
883
915
  artifact_dir=args.artifact_dir,
884
916
  interactive=_interactive_terminal() and not args.json,
885
917
  prompt=_lifecycle_prompt,
918
+ input_hints=plan_input_hints(getattr(args, "to", None)),
886
919
  )
887
920
 
888
921
 
@@ -911,9 +944,18 @@ def _print_application_result(
911
944
  )
912
945
  else:
913
946
  terminal = _terminal(args)
947
+ quiet = bool(getattr(args, "quiet", False))
948
+ summary, next_hint = application_summary(command, result.data, root=args.root)
949
+ if not quiet:
950
+ for line in summary:
951
+ print(line)
952
+ if summary:
953
+ print()
914
954
  terminal.success(f"{command} complete")
915
955
  if command == "plan" and isinstance(result.data.get("plan_hash"), str):
916
956
  print(f"plan {result.data['plan_hash']}")
957
+ if next_hint and not quiet:
958
+ print(f"next: {next_hint}")
917
959
  return 0
918
960
 
919
961
 
@@ -0,0 +1,271 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only
2
+ """Human-readable summaries for local lifecycle results.
3
+
4
+ The JSON document (``--json``) is the contract; these lines only restate the
5
+ fields a person needs after each step. Every accessor tolerates missing keys so
6
+ an older or newer extension response never breaks the text output.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from collections.abc import Mapping
12
+ from pathlib import Path
13
+ from typing import Any
14
+
15
+ _FRAMEWORK_LABELS = {
16
+ "django-rest-framework": "DRF",
17
+ "drf": "DRF",
18
+ "fastapi": "FastAPI",
19
+ "flask": "Flask",
20
+ }
21
+ _ENGINE_LABELS = {
22
+ "tortoise": "Tortoise ORM",
23
+ "sqlalchemy": "SQLAlchemy",
24
+ "psycopg": "psycopg",
25
+ }
26
+
27
+
28
+ def _count(value: Any) -> int | None:
29
+ if isinstance(value, bool):
30
+ return None
31
+ if isinstance(value, int):
32
+ return value
33
+ if isinstance(value, (list, tuple, dict)):
34
+ return len(value)
35
+ return None
36
+
37
+
38
+ def _plural(count: int, singular: str, plural: str | None = None) -> str:
39
+ word = singular if count == 1 else (plural or f"{singular}s")
40
+ return f"{count} {word}"
41
+
42
+
43
+ def _label(value: Any, table: Mapping[str, str]) -> str:
44
+ text = str(value) if value is not None else ""
45
+ return table.get(text.lower(), text)
46
+
47
+
48
+ def _relative(path: Any, root: str | Path) -> str:
49
+ text = str(path) if path is not None else ""
50
+ try:
51
+ return str(Path(text).resolve().relative_to(Path(root).resolve()))
52
+ except (ValueError, OSError):
53
+ return text
54
+
55
+
56
+ def _scan_lines(data: Mapping[str, Any]) -> list[str]:
57
+ lines: list[str] = []
58
+ detected: list[tuple[str, str]] = []
59
+ for key, name in (
60
+ ("python_version", "Python"),
61
+ ("django_version", "Django"),
62
+ ("drf_version", "DRF"),
63
+ ):
64
+ value = data.get(key)
65
+ if isinstance(value, str) and value:
66
+ detected.append((name, value))
67
+ database = data.get("database")
68
+ if isinstance(database, Mapping):
69
+ vendor = database.get("vendor")
70
+ db_name = database.get("name")
71
+ if vendor:
72
+ detected.append(("Database", f"{vendor} ({db_name})" if db_name else str(vendor)))
73
+ if detected:
74
+ lines.append("Detected")
75
+ lines.extend(f" {name:<10} {value}" for name, value in detected)
76
+ counts = [
77
+ (_count(data.get("routes")), "route", "routes"),
78
+ (_count(data.get("serializers")), "serializer", "serializers"),
79
+ (_count(data.get("models")), "model", "models"),
80
+ (_count(data.get("permissions")), "permission class", "permission classes"),
81
+ (_count(data.get("test_files")), "test file", "test files"),
82
+ ]
83
+ present = [(n, s, p) for n, s, p in counts if n is not None]
84
+ if present:
85
+ if lines:
86
+ lines.append("")
87
+ lines.append("Application")
88
+ lines.extend(f" {_plural(n, s, p)}" for n, s, p in present)
89
+ skipped = _count(data.get("skipped_routes"))
90
+ if skipped:
91
+ lines.append(f" {_plural(skipped, 'skipped route')}")
92
+ scan_hash = data.get("scan_hash")
93
+ if isinstance(scan_hash, str) and scan_hash:
94
+ if lines:
95
+ lines.append("")
96
+ lines.append(f"scan hash: {scan_hash}")
97
+ return lines
98
+
99
+
100
+ def _target_from_extension_id(extension_id: Any) -> str | None:
101
+ """``sanka/drf-to-fastapi`` names its target after ``-to-``; other ids give nothing."""
102
+ if not isinstance(extension_id, str):
103
+ return None
104
+ name = extension_id.rsplit("/", 1)[-1]
105
+ if "-to-" not in name:
106
+ return None
107
+ target = name.rsplit("-to-", 1)[-1].strip()
108
+ return target or None
109
+
110
+
111
+ def _scan_targets(data: Mapping[str, Any]) -> list[str]:
112
+ targets: list[str] = []
113
+
114
+ def add(candidate: Any) -> None:
115
+ if isinstance(candidate, str) and candidate and candidate not in targets:
116
+ targets.append(candidate)
117
+
118
+ extensions = data.get("extensions")
119
+ if isinstance(extensions, list):
120
+ for entry in extensions:
121
+ if not isinstance(entry, Mapping):
122
+ continue
123
+ explicit = entry.get("targets")
124
+ record = entry.get("extension")
125
+ if not explicit and isinstance(record, Mapping):
126
+ explicit = record.get("targets")
127
+ for candidate in explicit or ():
128
+ add(candidate)
129
+ if not explicit:
130
+ identifier = entry.get("id")
131
+ if identifier is None and isinstance(record, Mapping):
132
+ identifier = record.get("id")
133
+ add(_target_from_extension_id(identifier))
134
+ return targets
135
+
136
+
137
+ def _plan_lines(data: Mapping[str, Any], root: str | Path) -> list[str]:
138
+ lines: list[str] = []
139
+ source = _label(data.get("source_framework"), _FRAMEWORK_LABELS)
140
+ target = _label(data.get("target_framework"), _FRAMEWORK_LABELS)
141
+ title = f"{source} → {target} plan" if source and target else "Migration plan"
142
+ lines.append(title)
143
+ strategy: list[str] = []
144
+ if data.get("mode"):
145
+ strategy.append(str(data["mode"]))
146
+ if data.get("sql_engine"):
147
+ strategy.append(_label(data["sql_engine"], _ENGINE_LABELS))
148
+ if data.get("generation_mode"):
149
+ strategy.append(f"{data['generation_mode']} generation")
150
+ if data.get("package_manager"):
151
+ strategy.append(str(data["package_manager"]))
152
+ if strategy:
153
+ lines.append(f" {'Strategy':<10} {' · '.join(strategy)}")
154
+ output = data.get("default_output") or data.get("output")
155
+ if output:
156
+ lines.append(f" {'Output':<10} {_relative(output, root)}")
157
+ native = _count(data.get("native_routes"))
158
+ dropped = _count(data.get("dropped_alias_routes"))
159
+ manual = _count(data.get("needs_adaptation_routes"))
160
+ total = _count(data.get("routes"))
161
+ if total is None and None not in (native, dropped, manual):
162
+ total = (native or 0) + (dropped or 0) + (manual or 0)
163
+ if any(value is not None for value in (native, dropped, manual)):
164
+ lines.append("")
165
+ lines.append(f"Routes ({total})" if total is not None else "Routes")
166
+ if native is not None:
167
+ lines.append(f" {native} generated natively")
168
+ if dropped is not None:
169
+ lines.append(f" {dropped} format-suffix aliases dropped (disclosed)")
170
+ if manual is not None:
171
+ lines.append(f" {manual} need manual adaptation")
172
+ eligible = _count(data.get("native_eligible_routes"))
173
+ readiness = data.get("readiness")
174
+ if isinstance(readiness, (int, float)) and not isinstance(readiness, bool):
175
+ percent = round(float(readiness) * 100) if readiness <= 1 else round(float(readiness))
176
+ detail = (
177
+ f" ({native}/{eligible} non-alias routes)" if None not in (native, eligible) else ""
178
+ )
179
+ lines.append(f" readiness {percent}%{detail}")
180
+ return lines
181
+
182
+
183
+ def _apply_lines(data: Mapping[str, Any], root: str | Path) -> list[str]:
184
+ lines: list[str] = ["Generated"]
185
+ generated = _count(data.get("routes_generated"))
186
+ target = _label(data.get("target_framework"), _FRAMEWORK_LABELS)
187
+ if generated is not None:
188
+ noun = f"native {target} route" if target else "native route"
189
+ lines.append(f" {_plural(generated, noun)}")
190
+ output = data.get("output")
191
+ if output:
192
+ lines.append(f" {'Output':<10} {_relative(output, root)}")
193
+ if data.get("sql_engine"):
194
+ lines.append(f" {'Engine':<10} {_label(data['sql_engine'], _ENGINE_LABELS)}")
195
+ return lines if len(lines) > 1 else []
196
+
197
+
198
+ def _test_lines(data: Mapping[str, Any], root: str | Path) -> list[str]:
199
+ lines: list[str] = ["Generated app tests"]
200
+ ran = _count(data.get("tests"))
201
+ if ran is None:
202
+ log = data.get("log")
203
+ if isinstance(log, str):
204
+ import re
205
+
206
+ match = re.search(r"Ran (\d+) tests?", log)
207
+ if match:
208
+ ran = int(match.group(1))
209
+ if ran is not None:
210
+ lines.append(f" Ran {_plural(ran, 'test')}")
211
+ environment = data.get("environment")
212
+ if environment:
213
+ lines.append(f" {'Env':<10} {_relative(environment, root)}")
214
+ return lines if len(lines) > 1 else []
215
+
216
+
217
+ def _verify_lines(data: Mapping[str, Any]) -> list[str]:
218
+ lines: list[str] = []
219
+ mode = data.get("mode")
220
+ lines.append(f"Verified ({mode})" if mode else "Verified")
221
+ routes = data.get("routes")
222
+ if isinstance(routes, Mapping):
223
+ parts: list[str] = []
224
+ generated = _count(routes.get("generated"))
225
+ if generated is not None:
226
+ parts.append(f"{generated} generated")
227
+ for key, text in (
228
+ ("dropped", "aliases dropped"),
229
+ ("needs_adaptation", "need adaptation"),
230
+ ("missing", "missing"),
231
+ ("extra", "extra"),
232
+ ):
233
+ count = _count(routes.get(key))
234
+ if count is not None:
235
+ parts.append(f"{count} {text}")
236
+ if parts:
237
+ lines.append(f" {'routes':<8} " + " · ".join(parts))
238
+ http = data.get("http")
239
+ if isinstance(http, Mapping) and http.get("enabled", True):
240
+ passed = _count(http.get("passed"))
241
+ probed = _count(http.get("probed"))
242
+ if passed is not None and probed is not None:
243
+ lines.append(f" {'http':<8} {passed}/{probed} probes passed")
244
+ return lines if len(lines) > 1 else []
245
+
246
+
247
+ def application_summary(
248
+ command: str, data: Mapping[str, Any], *, root: str | Path = "."
249
+ ) -> tuple[list[str], str | None]:
250
+ """Return (summary lines, next-command hint) for a successful lifecycle step."""
251
+ if not isinstance(data, Mapping):
252
+ return [], None
253
+ if command == "scan":
254
+ targets = _scan_targets(data)
255
+ target = targets[0] if len(targets) == 1 else "<target>"
256
+ return _scan_lines(data), f"sanka plan . --to {target}"
257
+ if command == "plan":
258
+ plan_hash = data.get("plan_hash")
259
+ hint = (
260
+ f"sanka apply --root . --plan-hash {plan_hash}"
261
+ if isinstance(plan_hash, str) and plan_hash
262
+ else "sanka apply --root . --plan-hash <hash printed above>"
263
+ )
264
+ return _plan_lines(data, root), hint
265
+ if command == "apply":
266
+ return _apply_lines(data, root), "sanka test ."
267
+ if command == "test":
268
+ return _test_lines(data, root), "sanka verify ."
269
+ if command == "verify":
270
+ return _verify_lines(data), None
271
+ return [], None
@@ -456,7 +456,12 @@ def _flow_capabilities(value: Any, code: str, path: Path) -> tuple[FlowCapabilit
456
456
  )
457
457
  is None
458
458
  or item["output_schema"]
459
- not in ("sanka-flow-blueprint/v1", "sanka-flow-blueprint/v2", "sanka-flow-blueprint/v3")
459
+ not in (
460
+ "sanka-flow-blueprint/v1",
461
+ "sanka-flow-blueprint/v2",
462
+ "sanka-flow-blueprint/v3",
463
+ "sanka-flow-blueprint/v4",
464
+ )
460
465
  or not isinstance(item["references"], list)
461
466
  or not isinstance(item["values"], list)
462
467
  ):
@@ -53,6 +53,7 @@ PHASE_CONFIGURATION = frozenset(
53
53
  }
54
54
  )
55
55
  type Prompt = Callable[[str, tuple[str, ...] | None], str | None]
56
+ type InputHints = Callable[[str, str | None], tuple[tuple[str, ...] | None, str | None]]
56
57
 
57
58
 
58
59
  def _error(code: str, message: str, **details: Any) -> NoReturn:
@@ -157,6 +158,7 @@ class ApplicationLifecycle:
157
158
  runner: ExtensionRunner | None = None,
158
159
  interactive: bool = False,
159
160
  prompt: Prompt | None = None,
161
+ input_hints: InputHints | None = None,
160
162
  ) -> None:
161
163
  self.project_root = project_root.expanduser().resolve(strict=True)
162
164
  artifact = Path(artifact_dir)
@@ -168,12 +170,22 @@ class ApplicationLifecycle:
168
170
  self.runner = runner or ExtensionRunner(user_root=user_root)
169
171
  self.interactive = interactive
170
172
  self.prompt = prompt
173
+ self.input_hints = input_hints
171
174
 
172
175
  def _prompt(self, label: str, choices: tuple[str, ...] | None = None) -> str | None:
173
176
  if not self.interactive or self.prompt is None:
174
177
  return None
175
178
  return self.prompt(label, choices)
176
179
 
180
+ def _input_hint(
181
+ self, name: str, target: str | None
182
+ ) -> tuple[tuple[str, ...] | None, str | None]:
183
+ """Choices and default for an extension input, when the CLI knows them."""
184
+ if self.input_hints is None:
185
+ return None, None
186
+ choices, default = self.input_hints(name, target)
187
+ return (tuple(choices) if choices else None), default
188
+
177
189
  def _recommendations(self, fingerprint: Fingerprint) -> tuple[Recommendation, ...]:
178
190
  return self.store.recommendations(fingerprint)
179
191
 
@@ -524,6 +536,17 @@ class ApplicationLifecycle:
524
536
  target=selected_target,
525
537
  extensions=[item.id for item in selected],
526
538
  )
539
+ configured_target = normalized.get("target")
540
+ if configured_target is not None and configured_target != selected_target:
541
+ _error(
542
+ "SANKA_EXTENSION_TARGET_MISMATCH",
543
+ "The selected target differs from configuration.target",
544
+ target=selected_target,
545
+ configured=configured_target,
546
+ )
547
+ # An extension that advertises several targets learns the selection here. The
548
+ # reviewed core plan records it, so apply, test and verify receive the same value.
549
+ normalized = {**normalized, "target": selected_target}
527
550
  lock = self.store.resolve_locked(selected[0].id)
528
551
  self._verify_selection(lock, selected[0])
529
552
  request = self._request(lock, "plan", fingerprint, normalized)
@@ -542,17 +565,33 @@ class ApplicationLifecycle:
542
565
  break
543
566
  details = (result.error or {}).get("details")
544
567
  inputs = details.get("inputs") if isinstance(details, dict) else None
545
- if (
546
- not self.interactive
547
- or (result.error or {}).get("code") != "SANKA_EXTENSION_INPUT_REQUIRED"
548
- or not isinstance(inputs, list)
549
- or any(
550
- not isinstance(name, str) or not name or name in seen_inputs for name in inputs
568
+ structured = (
569
+ (result.error or {}).get("code") == "SANKA_EXTENSION_INPUT_REQUIRED"
570
+ and isinstance(inputs, list)
571
+ and bool(inputs)
572
+ and all(
573
+ isinstance(name, str) and name and name not in seen_inputs for name in inputs
551
574
  )
552
- ):
575
+ )
576
+ if not structured:
553
577
  self._raise_failure(result)
578
+ assert isinstance(inputs, list)
579
+ if not self.interactive:
580
+ flags = ", ".join(f"--{name.replace('_', '-')}" for name in inputs)
581
+ _error(
582
+ "SANKA_EXTENSION_INPUT_REQUIRED",
583
+ f"Missing plan inputs: {', '.join(inputs)}. Pass {flags}, "
584
+ "or run plan in an interactive terminal to be asked for them",
585
+ inputs=list(inputs),
586
+ )
554
587
  for name in inputs:
555
- answer = self._prompt(f"Extension configuration: {name}")
588
+ choices, default = self._input_hint(name, selected_target)
589
+ label = f"Extension configuration: {name}"
590
+ if default is not None and not choices:
591
+ label = f"{label} [{default}]"
592
+ answer = self._prompt(label, choices)
593
+ if answer is None:
594
+ answer = default
556
595
  if answer is None:
557
596
  self._raise_failure(result)
558
597
  normalized[name] = answer
@@ -2075,6 +2075,48 @@ class ExtensionStore:
2075
2075
  )
2076
2076
  return tuple(sorted(records, key=lambda item: (item.id, item.version, item.marketplace)))
2077
2077
 
2078
+ @_store_operation
2079
+ def installation_health(self) -> tuple[dict[str, Any], ...]:
2080
+ """Read-only launcher check for every cached extension environment.
2081
+
2082
+ ``sanka doctor`` uses this to explain lifecycle failures such as
2083
+ ``Extension environment contains an unverified symlink``: after the CLI is
2084
+ reinstalled on another Python, the cached environments still launch the
2085
+ previous interpreter. Nothing is executed and nothing is repaired here.
2086
+ """
2087
+ expected = self._environment_symlinks()
2088
+ interpreter = str(Path(sys.executable).resolve())
2089
+ records: list[dict[str, Any]] = []
2090
+ for item in self._load_installations():
2091
+ root = self.user_root / "environments" / str(item["artifact_digest"])
2092
+ launchers: dict[str, str | None] = {}
2093
+ if not root.is_dir():
2094
+ status = "missing"
2095
+ elif os.name == "nt":
2096
+ status = "ok"
2097
+ else:
2098
+ for name, target in expected.items():
2099
+ launcher = root / name
2100
+ if not launcher.is_symlink():
2101
+ if name == "bin/python":
2102
+ launchers[name] = None
2103
+ continue
2104
+ linked = os.readlink(launcher)
2105
+ if Path(linked) != target:
2106
+ launchers[name] = linked
2107
+ status = "interpreter_mismatch" if launchers else "ok"
2108
+ records.append(
2109
+ {
2110
+ "id": item["id"],
2111
+ "version": item["version"],
2112
+ "environment": str(root),
2113
+ "status": status,
2114
+ "expected_interpreter": interpreter,
2115
+ "launchers": launchers,
2116
+ }
2117
+ )
2118
+ return tuple(sorted(records, key=lambda record: (record["id"], record["version"])))
2119
+
2078
2120
  @_store_operation
2079
2121
  def recommendations(self, fingerprint: Fingerprint) -> tuple[Recommendation, ...]:
2080
2122
  """Match only manifests read through the verified snapshot boundary."""
@@ -69,6 +69,14 @@ class FlowTarget(Protocol):
69
69
  The shared runtime compares actual readback with expected counts/values.
70
70
  No live messages, payments or provider writes are allowed. This port must
71
71
  use native execution rather than a parallel business-action executor.
72
+
73
+ Blueprint v4 uses the native billing result contract documented in
74
+ native_verification.py. It returns immutable fixture/readback references,
75
+ complete per-delivery imported Order IDs, actual native run/attempt
76
+ identities, concurrency timing, and the pinned isolated namespace. The
77
+ host additionally implements NativeVerificationArtifacts. Never claim a
78
+ required case passed from a dry-run/readiness endpoint or an in-memory
79
+ imitation of the native business actions.
72
80
  """
73
81
  ...
74
82