databricks-tellr-app 0.4.3.dev3439__tar.gz → 0.4.3.dev3440__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 (234) hide show
  1. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/PKG-INFO +1 -1
  2. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/databricks_tellr_app.egg-info/PKG-INFO +1 -1
  3. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/pyproject.toml +1 -1
  4. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/fixtures/tour_demo_deck.json +37 -1
  5. databricks_tellr_app-0.4.3.dev3440/src/api/routes/tour.py +309 -0
  6. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/init_default_profile.py +1 -1
  7. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/lakebase.py +1 -1
  8. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/architect.py +1 -25
  9. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/build_reviewer.py +3 -46
  10. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/builder.py +2 -35
  11. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/fixer.py +1 -5
  12. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/domain/deck_spec.py +0 -17
  13. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/domain/finding.py +1 -34
  14. databricks_tellr_app-0.4.3.dev3440/src/services/agent_definition_manifest_v1.py +3 -0
  15. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_model_payload.py +0 -1
  16. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_schema_registry.py +5 -31
  17. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/design_system_service.py +0 -18
  18. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph/nodes.py +3 -50
  19. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/prompt_assembler.py +9 -17
  20. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/template_sections.py +1 -134
  21. databricks_tellr_app-0.4.3.dev3439/src/api/routes/tour.py +0 -169
  22. databricks_tellr_app-0.4.3.dev3439/src/services/agent_definition_manifest_v1.py +0 -3
  23. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/README.md +0 -0
  24. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/databricks_tellr_app/__init__.py +0 -0
  25. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/databricks_tellr_app/run.py +0 -0
  26. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/databricks_tellr_app.egg-info/SOURCES.txt +0 -0
  27. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/databricks_tellr_app.egg-info/dependency_links.txt +0 -0
  28. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/databricks_tellr_app.egg-info/requires.txt +0 -0
  29. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/databricks_tellr_app.egg-info/top_level.txt +0 -0
  30. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/setup.cfg +0 -0
  31. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/setup.py +0 -0
  32. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/__init__.py +0 -0
  33. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/__init__.py +0 -0
  34. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/_otel_bootstrap.py +0 -0
  35. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/main.py +0 -0
  36. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/mcp_auth.py +0 -0
  37. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/mcp_server.py +0 -0
  38. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/middleware/__init__.py +0 -0
  39. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/middleware/csrf.py +0 -0
  40. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/middleware/request_logging.py +0 -0
  41. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/middleware/security_headers.py +0 -0
  42. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/__init__.py +0 -0
  43. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/_authz.py +0 -0
  44. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/admin.py +0 -0
  45. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/admin_usage.py +0 -0
  46. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/agent_config.py +0 -0
  47. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/agent_definitions.py +0 -0
  48. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/chat.py +0 -0
  49. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/deck_contributors.py +0 -0
  50. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/export.py +0 -0
  51. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/feedback.py +0 -0
  52. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/google_slides.py +0 -0
  53. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/images.py +0 -0
  54. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/local_version.py +0 -0
  55. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/profiles.py +0 -0
  56. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/sessions.py +0 -0
  57. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/settings/__init__.py +0 -0
  58. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/settings/contributors.py +0 -0
  59. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/settings/deck_prompts.py +0 -0
  60. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/settings/design_systems.py +0 -0
  61. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/settings/identities.py +0 -0
  62. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/settings/slide_styles.py +0 -0
  63. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/setup.py +0 -0
  64. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/slides.py +0 -0
  65. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/tools.py +0 -0
  66. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/verification.py +0 -0
  67. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/routes/version.py +0 -0
  68. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/__init__.py +0 -0
  69. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/agent_config.py +0 -0
  70. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/agent_definitions.py +0 -0
  71. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/feedback.py +0 -0
  72. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/graph_release_history.py +0 -0
  73. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/graph_releases.py +0 -0
  74. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/requests.py +0 -0
  75. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/responses.py +0 -0
  76. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/settings/__init__.py +0 -0
  77. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/settings/requests.py +0 -0
  78. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/settings/responses.py +0 -0
  79. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/schemas/streaming.py +0 -0
  80. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/__init__.py +0 -0
  81. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/chat_service.py +0 -0
  82. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/deck_level_writer.py +0 -0
  83. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/export_job_queue.py +0 -0
  84. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/feedback_service.py +0 -0
  85. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/job_queue.py +0 -0
  86. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/session_manager.py +0 -0
  87. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/session_naming.py +0 -0
  88. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/slide_repository.py +0 -0
  89. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/usage_events.py +0 -0
  90. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/services/usage_service.py +0 -0
  91. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/utils/__init__.py +0 -0
  92. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/api/utils/validation.py +0 -0
  93. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/__init__.py +0 -0
  94. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/backfill_session_slides_startup.py +0 -0
  95. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/checkpointer.py +0 -0
  96. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/config_loader.py +0 -0
  97. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/context_utils.py +0 -0
  98. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/database.py +0 -0
  99. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/databricks_client.py +0 -0
  100. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/defaults.py +0 -0
  101. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/encryption.py +0 -0
  102. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/migrate_profiles_to_agent_config.py +0 -0
  103. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/mlflow_agent_spans.py +0 -0
  104. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/mlflow_tracing.py +0 -0
  105. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/otel_logging.py +0 -0
  106. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/permission_context.py +0 -0
  107. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/prompt_modules.py +0 -0
  108. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/settings_db.py +0 -0
  109. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/__init__.py +0 -0
  110. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/data_analyst.py +0 -0
  111. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/deck_reviewer.py +0 -0
  112. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/skills/fix_reviewer.py +0 -0
  113. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/strip_retired_prompt_keys.py +0 -0
  114. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/core/user_context.py +0 -0
  115. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/__init__.py +0 -0
  116. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/__init__.py +0 -0
  117. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/deck_contributor.py +0 -0
  118. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/deck_review.py +0 -0
  119. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/design_system.py +0 -0
  120. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/encryption_key.py +0 -0
  121. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/feedback.py +0 -0
  122. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/genie_space.py +0 -0
  123. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/google_global_credentials.py +0 -0
  124. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/google_oauth_token.py +0 -0
  125. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/graph_checkpoint.py +0 -0
  126. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/graph_configuration.py +0 -0
  127. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/identity.py +0 -0
  128. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/image.py +0 -0
  129. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/profile.py +0 -0
  130. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/profile_contributor.py +0 -0
  131. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/prompts.py +0 -0
  132. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/request_log.py +0 -0
  133. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/session.py +0 -0
  134. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/slide_deck_prompt.py +0 -0
  135. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/slide_style_library.py +0 -0
  136. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/usage_event.py +0 -0
  137. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/models/user_preference.py +0 -0
  138. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/database/types.py +0 -0
  139. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/domain/__init__.py +0 -0
  140. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/domain/conversation_engine.py +0 -0
  141. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/domain/skill_io.py +0 -0
  142. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/domain/slide.py +0 -0
  143. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/domain/slide_deck.py +0 -0
  144. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/__init__.py +0 -0
  145. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent.py +0 -0
  146. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_factory.py +0 -0
  147. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_resolution.py +0 -0
  148. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_runtime.py +0 -0
  149. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_runtime_identity.py +0 -0
  150. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_schema_types.py +0 -0
  151. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/agent_test_workbench.py +0 -0
  152. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/collaboration_history.py +0 -0
  153. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/config_service.py +0 -0
  154. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/config_validator.py +0 -0
  155. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/conversation_pins.py +0 -0
  156. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/converter_jail/__init__.py +0 -0
  157. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/converter_jail/ast_guard.py +0 -0
  158. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/converter_jail/codeprep.py +0 -0
  159. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/converter_jail/gslides_runner.py +0 -0
  160. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/converter_jail/jail.py +0 -0
  161. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/converter_jail/pptx_runner.py +0 -0
  162. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/converter_jail/protocol.py +0 -0
  163. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/deck_css_aggregator.py +0 -0
  164. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/deck_review_store.py +0 -0
  165. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/design_system_compiler.py +0 -0
  166. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/design_system_templates.py +0 -0
  167. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/drive_uploader.py +0 -0
  168. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/evaluation/__init__.py +0 -0
  169. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/evaluation/llm_judge.py +0 -0
  170. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/foreman_service.py +0 -0
  171. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/gateway_openai.py +0 -0
  172. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/genie_service.py +0 -0
  173. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/google_slides_auth.py +0 -0
  174. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/google_slides_prompts_defaults.py +0 -0
  175. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph/__init__.py +0 -0
  176. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph/builder.py +0 -0
  177. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph/event_emitter.py +0 -0
  178. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph/routers.py +0 -0
  179. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph/state.py +0 -0
  180. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration.py +0 -0
  181. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration_bootstrap.py +0 -0
  182. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration_content.py +0 -0
  183. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration_draft.py +0 -0
  184. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration_publication.py +0 -0
  185. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration_rollback.py +0 -0
  186. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration_seed.py +0 -0
  187. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_configuration_workbench.py +0 -0
  188. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_definition_manifest.py +0 -0
  189. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_release_evidence.py +0 -0
  190. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/graph_release_history.py +0 -0
  191. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/html_to_google_slides.py +0 -0
  192. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/html_to_pptx.py +0 -0
  193. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/identity_provider.py +0 -0
  194. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/identity_providers/__init__.py +0 -0
  195. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/identity_providers/account_provider.py +0 -0
  196. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/identity_providers/local_provider.py +0 -0
  197. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/identity_providers/scim_filter.py +0 -0
  198. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/identity_providers/workspace_provider.py +0 -0
  199. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/image_service.py +0 -0
  200. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/image_tools.py +0 -0
  201. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/model_endpoint_catalog.py +0 -0
  202. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/model_endpoint_probe.py +0 -0
  203. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/permission_service.py +0 -0
  204. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/persisted_graph_release.py +0 -0
  205. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/pptx_from_html_huashu.py +0 -0
  206. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/pptx_from_records.py +0 -0
  207. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/pptx_prompts_defaults.py +0 -0
  208. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/profile_service.py +0 -0
  209. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/shared_deck_attribution.py +0 -0
  210. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/spec_sync.py +0 -0
  211. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/streaming_callback.py +0 -0
  212. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/svg_sanitizer.py +0 -0
  213. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/tools/__init__.py +0 -0
  214. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/tools/agent_bricks_tool.py +0 -0
  215. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/tools/ds_asset_tool.py +0 -0
  216. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/tools/genie_tool.py +0 -0
  217. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/tools/mcp_tool.py +0 -0
  218. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/tools/model_endpoint_tool.py +0 -0
  219. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/tools/vector_tool.py +0 -0
  220. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/services/validator.py +0 -0
  221. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/__init__.py +0 -0
  222. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/css_utils.py +0 -0
  223. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/ds_asset_utils.py +0 -0
  224. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/error_handling.py +0 -0
  225. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/graph_safety.py +0 -0
  226. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/html_safety.py +0 -0
  227. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/html_utils.py +0 -0
  228. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/image_utils.py +0 -0
  229. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/js_validator.py +0 -0
  230. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/logging_config.py +0 -0
  231. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/pi_filter.py +0 -0
  232. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/slide_hash.py +0 -0
  233. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/spotlight.py +0 -0
  234. {databricks_tellr_app-0.4.3.dev3439 → databricks_tellr_app-0.4.3.dev3440}/src/utils/text_caps.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: databricks-tellr-app
3
- Version: 0.4.3.dev3439
3
+ Version: 0.4.3.dev3440
4
4
  Summary: Tellr application package for Databricks Apps
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: databricks-tellr-app
3
- Version: 0.4.3.dev3439
3
+ Version: 0.4.3.dev3440
4
4
  Summary: Tellr application package for Databricks Apps
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "databricks-tellr-app"
7
- version = "0.4.3.dev3439"
7
+ version = "0.4.3.dev3440"
8
8
  description = "Tellr application package for Databricks Apps"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -24,7 +24,6 @@
24
24
  }
25
25
  ],
26
26
  "chat_prompt": "Create 3 slides about the benefits of AI in modern healthcare, with a title slide, key advantages, and future outlook.",
27
- "chat_reply": "Here's your deck with 3 slides! I've created:\n\n1. **Title Slide** — introducing AI in healthcare\n2. **Key Advantages** — early detection, personalized treatment, operational efficiency, and drug discovery\n3. **Future Outlook** — predictive monitoring, AI-assisted surgery, and global health equity\n\nFeel free to ask me to refine any slide, add new ones, or change the style.",
28
27
  "deck_spec": {
29
28
  "title": "Example Deck — AI in Healthcare",
30
29
  "audience": "A first-time Tellr user taking the product tour: a general business audience, with no clinical or machine-learning background assumed.",
@@ -75,5 +74,42 @@
75
74
  "data_references": []
76
75
  }
77
76
  ]
77
+ },
78
+ "stages": {
79
+ "plan": {
80
+ "architect_reply": "This deck is for a first-time Tellr user, a general business reader with no clinical or machine-learning background. It argues that AI already delivers concrete benefits in healthcare and that its near-term path points to prevention and wider access. I will build 3 slides: a title, four present-day advantages, and a forward look."
81
+ },
82
+ "build": {
83
+ "findings": {
84
+ "2": [
85
+ {
86
+ "criterion": "brief_not_delivered",
87
+ "category": "content",
88
+ "objective": false,
89
+ "message": "The brief asks this slide to carry the argument into the near future, but it never says when predictive monitoring, AI-assisted surgery or global health equity should arrive."
90
+ }
91
+ ]
92
+ },
93
+ "verification": {
94
+ "rating": "unknown",
95
+ "score": 0,
96
+ "explanation": "No source data to check: this deck was written without data tools."
97
+ }
98
+ },
99
+ "review": {
100
+ "advisory": "Deck review complete: no narrative issues found across the deck."
101
+ },
102
+ "edit": {
103
+ "user_prompt": "Make slide 2 more concise",
104
+ "architect_reply": "Editing slide 2.",
105
+ "position": 1,
106
+ "slide": {
107
+ "index": 1,
108
+ "slide_id": "tour-demo-slide-2",
109
+ "html": "<div class=\"slide content-slide\">\n <h2>Key Advantages</h2>\n <ul>\n <li><strong>Early Disease Detection</strong> — spotting disease on scans sooner</li>\n <li><strong>Personalized Treatment Plans</strong> — care tailored to each patient</li>\n <li><strong>Operational Efficiency</strong> — less admin, more patient time</li>\n <li><strong>Drug Discovery Acceleration</strong> — faster molecular testing, shorter R&amp;D</li>\n </ul>\n</div>",
110
+ "scripts": ""
111
+ },
112
+ "content_brief": "Four bolded items, each with a short phrase: early disease detection, personalized treatment plans, operational efficiency, drug discovery acceleration."
113
+ }
78
114
  }
79
115
  }
@@ -0,0 +1,309 @@
1
+ """Tour demo deck endpoints.
2
+
3
+ The tour replays one multi-agent ("graph") generation turn as a forward-only
4
+ sequence of idempotent stages, so the user watches the deck being planned,
5
+ built, reviewed and edited without any model call.
6
+
7
+ Phase 1 -- POST /api/tour/demo-deck
8
+ Creates a session holding only the user's prompt (stage ``prompt``).
9
+
10
+ Stages -- POST /api/tour/demo-deck/{session_id}/stages/{stage}
11
+ ``plan`` architect reply.
12
+ ``build`` the three slides, the deck spec, and a seeded verification
13
+ record (with the scripted finding) for every slide. No chat row:
14
+ the graph's foreman and per-slide review lines are emit-only, and
15
+ production polls, so a deployed user never sees them.
16
+ ``review`` deck reviewer advisory.
17
+ ``edit`` a follow-up user request, the architect reply, one rewritten slide
18
+ and its brief, and verification re-seeded for every slide.
19
+
20
+ Every chat row is tagged ``metadata.tour_stage``; re-running a stage is a no-op
21
+ and a stage whose predecessor has not run is rejected (409) before any write.
22
+ ``build`` writes no chat row, so its marker is the deck itself (see
23
+ ``_build_applied``).
24
+ """
25
+
26
+ import asyncio
27
+ import copy
28
+ import json
29
+ import logging
30
+ from pathlib import Path
31
+
32
+ from fastapi import APIRouter, HTTPException
33
+
34
+ from src.api.routes._authz import _check_deck_permission_for_session
35
+ from src.api.services.deck_level_writer import write_deck_level_columns
36
+ from src.api.services.session_manager import get_session_manager
37
+ from src.domain.finding import Finding, build_verification_record, make_finding_id
38
+ from src.core.user_context import get_current_user
39
+ from src.database.models.profile_contributor import PermissionLevel
40
+ from src.utils.slide_hash import compute_slide_hash
41
+
42
+ logger = logging.getLogger(__name__)
43
+
44
+ router = APIRouter(prefix="/api/tour", tags=["tour"])
45
+
46
+ FIXTURE_PATH = Path(__file__).resolve().parent.parent / "fixtures" / "tour_demo_deck.json"
47
+
48
+ _fixture_cache: dict | None = None
49
+
50
+
51
+ def _load_fixture() -> dict:
52
+ global _fixture_cache
53
+ if _fixture_cache is None:
54
+ with open(FIXTURE_PATH, "r", encoding="utf-8") as f:
55
+ _fixture_cache = json.load(f)
56
+ return _fixture_cache
57
+
58
+
59
+ def _get_user_prompt(fixture: dict) -> str:
60
+ return fixture["chat_prompt"]
61
+
62
+
63
+ def _phase1_create_session(created_by: str) -> dict:
64
+ """Phase 1: create session + user message only (no slides)."""
65
+ fixture = _load_fixture()
66
+ sm = get_session_manager()
67
+
68
+ # Graph-capable (pinned): the fixture's chat_prompt carries no
69
+ # USE LEGACY MODE opt-out, so since 2026-10-12 the tour deck resolves to
70
+ # the graph like any other deck, and a graph turn on an unpinned session
71
+ # raises ConversationPinMissingError. The fixture already ships a
72
+ # deck_spec for exactly this (ws4d), so a user who keeps chatting after the
73
+ # tour gets the default engine.
74
+ session = sm.create_session(
75
+ title=fixture["title"],
76
+ created_by=created_by,
77
+ graph_capable=True,
78
+ )
79
+ session_id = session["session_id"]
80
+
81
+ sm.add_message(
82
+ session_id=session_id,
83
+ role="user",
84
+ content=_get_user_prompt(fixture),
85
+ message_type="chat",
86
+ metadata={"tour_stage": "prompt", "node": "user"},
87
+ )
88
+
89
+ return {"session_id": session_id, "title": fixture["title"]}
90
+
91
+
92
+ STAGES: tuple[str, ...] = ("prompt", "plan", "build", "review", "edit")
93
+
94
+
95
+ class StageOrderError(Exception):
96
+ """A stage was requested before the stage it follows has run."""
97
+
98
+
99
+ def _build_applied(sm, session_id: str) -> bool:
100
+ """``build`` has run iff the deck has slides, a spec, and EVERY slide is verified.
101
+
102
+ The build stage writes no chat row (production never shows the foreman or
103
+ per-slide review lines), so its idempotency marker is derived from the deck.
104
+ "Has slides" alone is not enough: build writes slides, then the spec, then
105
+ the per-slide verification records, and a failure after the slide save
106
+ would leave slides present but unverified -- a permanent no-op on retry and
107
+ an LLM judge call from useAutoVerification. Requiring the LAST write
108
+ (verification on every slide) keeps a failed build retryable.
109
+ """
110
+ deck = sm.get_slide_deck(session_id) or {}
111
+ slides = deck.get("slides") or []
112
+ return bool(slides) and bool(deck.get("deck_spec")) and all(
113
+ s.get("verification") for s in slides
114
+ )
115
+
116
+
117
+ def _applied_stages(sm, session_id: str) -> set[str]:
118
+ applied = {
119
+ (m.get("metadata") or {}).get("tour_stage")
120
+ for m in sm.get_messages(session_id)
121
+ } - {None}
122
+ if _build_applied(sm, session_id):
123
+ applied.add("build")
124
+ return applied
125
+
126
+
127
+ def _say(sm, session_id, stage, node, content, message_type, role="assistant"):
128
+ sm.add_message(
129
+ session_id=session_id,
130
+ role=role,
131
+ content=content,
132
+ message_type=message_type,
133
+ metadata={"tour_stage": stage, "node": node},
134
+ )
135
+
136
+
137
+ def _save_deck(sm, session_id: str, slides: list, deck_spec: dict, created_by: str) -> None:
138
+ """Replace the deck's slides and write its spec (two writes, see below)."""
139
+ fixture = _load_fixture()
140
+ deck_dict = {
141
+ "title": fixture["title"],
142
+ "css": fixture.get("css", ""),
143
+ "external_scripts": fixture.get("external_scripts", []),
144
+ "scripts": fixture.get("scripts", ""),
145
+ "slides": slides,
146
+ "slide_count": len(slides),
147
+ }
148
+
149
+ sm.save_slide_deck(
150
+ session_id=session_id,
151
+ title=fixture["title"],
152
+ html_content="",
153
+ scripts_content="",
154
+ slide_count=len(slides),
155
+ deck_dict=deck_dict,
156
+ modified_by=created_by,
157
+ )
158
+
159
+ # The fixture's hand-authored deck spec needs a SECOND write.
160
+ #
161
+ # save_slide_deck does NOT persist a deck spec: it writes deck_json, css,
162
+ # external_scripts_json, head_meta_json and the per-slide rows, and never
163
+ # touches deck.deck_spec_json. A "deck_spec" key handed to it in deck_dict is
164
+ # swallowed into the deck_json blob and never read back into the column, with
165
+ # no exception — measured, and guarded by
166
+ # tests/unit/test_tour_ships_a_spec.py::test_save_slide_deck_alone_does_not
167
+ # _persist_a_spec. So the spec is written here through ws4b's deck-level
168
+ # writer, which does own that column.
169
+ #
170
+ # Teaching save_slide_deck about specs was rejected: it is on the monolith's
171
+ # hot path with a large test surface, and the tour needs one extra call, not a
172
+ # new behaviour on a shared writer. The cost is one deck.version bump, which
173
+ # is harmless for a freshly created tour deck.
174
+ #
175
+ # This is deck CREATION from fixed bytes, identical on every tour, so it
176
+ # deliberately does NOT call spec_sync.mark_dirty: that would schedule an LLM
177
+ # arc re-description of the same demo deck for every user who takes the tour.
178
+ # Shipping the arc in the fixture instead also lets the tour demonstrate the
179
+ # spec view, which an excluded-and-specless tour deck could not.
180
+ write_deck_level_columns(
181
+ session_id,
182
+ deck_spec=deck_spec,
183
+ modified_by=created_by,
184
+ mutation=sm.deck_mutation_context(
185
+ session_id,
186
+ operation="write_deck_level",
187
+ object_type="deck",
188
+ ),
189
+ )
190
+
191
+
192
+ def _seed_verification(sm, session_id: str, slides: list, findings_by_position: dict) -> None:
193
+ """Store a verification record for EVERY slide.
194
+
195
+ useAutoVerification fires an LLM judge on any slide whose verification is
196
+ falsy, and save_slide_deck replaces every slide row, so this must run after
197
+ each save for all slides, not just the ones that changed.
198
+ """
199
+ stage_build = _load_fixture()["stages"]["build"]
200
+ judge = {
201
+ **{k: stage_build["verification"][k] for k in ("score", "rating", "explanation")},
202
+ "issues": [],
203
+ "duration_ms": 0,
204
+ "error": False,
205
+ }
206
+ for position, slide in enumerate(slides):
207
+ content_hash = compute_slide_hash(slide["html"])
208
+ findings = [
209
+ Finding(
210
+ id=make_finding_id(f["criterion"], content_hash, ordinal=i),
211
+ slide_index=position,
212
+ category=f["category"],
213
+ criterion=f["criterion"],
214
+ message=f["message"],
215
+ objective=f["objective"],
216
+ )
217
+ for i, f in enumerate(findings_by_position.get(position, []))
218
+ ]
219
+ record = build_verification_record(
220
+ content_hash=content_hash,
221
+ findings=findings,
222
+ verdict="surfaced" if findings else "clean",
223
+ )
224
+ record[content_hash] = {**judge, **record[content_hash]}
225
+ sm.write_slide_verification(session_id, position, record)
226
+
227
+
228
+ def _run_stage(session_id: str, stage: str, created_by: str) -> dict:
229
+ """Apply one stage of the scripted graph turn (idempotent, forward-only)."""
230
+ if stage not in STAGES or stage == "prompt":
231
+ raise ValueError(f"Unknown tour stage: {stage!r}")
232
+ sm = get_session_manager()
233
+
234
+ applied = _applied_stages(sm, session_id)
235
+ if stage not in applied:
236
+ previous = STAGES[STAGES.index(stage) - 1]
237
+ if previous not in applied:
238
+ raise StageOrderError(f"Stage {stage!r} requires {previous!r} to run first")
239
+
240
+ def slide_count() -> int:
241
+ deck = sm.get_slide_deck(session_id) or {}
242
+ return len(deck.get("slides") or [])
243
+
244
+ if stage in applied:
245
+ return {"session_id": session_id, "stage": stage, "applied": False, "slide_count": slide_count()}
246
+
247
+ fixture = _load_fixture()
248
+ script = fixture["stages"]
249
+ # JSON object keys are strings; positions are ints.
250
+ findings = {int(k): v for k, v in script["build"]["findings"].items()}
251
+
252
+ # Deck writes come BEFORE the stage's first tagged row: that row is the
253
+ # idempotency marker, so writing it first would turn a failed save or seed
254
+ # into a permanent no-op (unverified slides -> an LLM judge call). Deck
255
+ # writes are convergent on retry (rows replaced, verification merged).
256
+ # ``build`` has no row; its marker is the fully verified deck, whose last
257
+ # write is the final slide's verification record (``_build_applied``).
258
+ if stage == "plan":
259
+ _say(sm, session_id, stage, "architect", script["plan"]["architect_reply"], "llm_response")
260
+ elif stage == "build":
261
+ slides = copy.deepcopy(fixture["slides"])
262
+ _save_deck(sm, session_id, slides, copy.deepcopy(fixture["deck_spec"]), created_by)
263
+ _seed_verification(sm, session_id, slides, findings)
264
+ elif stage == "review":
265
+ _say(sm, session_id, stage, "deck_reviewer", script["review"]["advisory"], "info")
266
+ else: # edit
267
+ edit = script["edit"]
268
+ slides = copy.deepcopy(fixture["slides"])
269
+ slides[edit["position"]] = copy.deepcopy(edit["slide"])
270
+ spec = copy.deepcopy(fixture["deck_spec"])
271
+ spec["slides"][edit["position"]]["content_brief"] = edit["content_brief"]
272
+ _save_deck(sm, session_id, slides, spec, created_by)
273
+ _seed_verification(sm, session_id, slides, findings)
274
+ _say(sm, session_id, stage, "user", edit["user_prompt"], "chat", role="user")
275
+ _say(sm, session_id, stage, "architect", edit["architect_reply"], "llm_response")
276
+
277
+ return {"session_id": session_id, "stage": stage, "applied": True, "slide_count": slide_count()}
278
+
279
+
280
+ @router.post("/demo-deck")
281
+ async def create_demo_deck():
282
+ """Phase 1: create session with the user prompt only."""
283
+ current_user = get_current_user()
284
+ try:
285
+ result = await asyncio.to_thread(_phase1_create_session, current_user)
286
+ logger.info("Tour demo deck phase 1", extra={"session_id": result["session_id"]})
287
+ return result
288
+ except Exception as e:
289
+ logger.error(f"Tour demo deck phase 1 failed: {e}", exc_info=True)
290
+ raise HTTPException(status_code=500, detail="Failed to create demo deck") from e
291
+
292
+
293
+ @router.post("/demo-deck/{session_id}/stages/{stage}")
294
+ async def run_demo_stage(session_id: str, stage: str):
295
+ """Advance the demo deck by one stage of a scripted graph turn."""
296
+ # SDR-4437 HIGH-1 class: writes into an arbitrary session_id.
297
+ _check_deck_permission_for_session(session_id, PermissionLevel.CAN_EDIT)
298
+ if stage not in STAGES or stage == "prompt":
299
+ raise HTTPException(status_code=404, detail="Unknown tour stage")
300
+ current_user = get_current_user()
301
+ try:
302
+ result = await asyncio.to_thread(_run_stage, session_id, stage, current_user)
303
+ except StageOrderError as e:
304
+ raise HTTPException(status_code=409, detail=str(e)) from e
305
+ except Exception as e:
306
+ logger.error(f"Tour demo stage {stage} failed: {e}", exc_info=True)
307
+ raise HTTPException(status_code=500, detail="Failed to run demo stage") from e
308
+ logger.info("Tour demo stage", extra={"session_id": session_id, "stage": stage})
309
+ return result
@@ -440,7 +440,7 @@ if __name__ == "__main__":
440
440
  if not database_url:
441
441
  print("✗ Error: DATABASE_URL environment variable not set")
442
442
  print("Please set DATABASE_URL to your PostgreSQL connection string:")
443
- print(" export DATABASE_URL='postgresql://user:pass@localhost:5432/ai_slide_generator'")
443
+ print(" export DATABASE_URL='postgresql://user@localhost:5432/ai_slide_generator'")
444
444
  sys.exit(1)
445
445
 
446
446
  print(f"Database: {database_url.split('@')[1] if '@' in database_url else database_url}")
@@ -253,7 +253,7 @@ def get_lakebase_connection_url(
253
253
  SQLAlchemy-compatible PostgreSQL connection URL
254
254
 
255
255
  Example:
256
- postgresql://user:token@host:5432/databricks_postgres?sslmode=require
256
+ postgresql://user@host:5432/databricks_postgres?sslmode=require
257
257
  """
258
258
  conn_info = get_lakebase_connection_info(
259
259
  instance_name=instance_name,
@@ -71,30 +71,6 @@ INSTRUCTIONS: str = (
71
71
  " assumes: what the audience already knows when they reach this slide\n"
72
72
  " hands_off: the single takeaway the audience should leave with\n"
73
73
  " data_references: metric names or identifiers this slide depends on "
74
- "(empty list if the slide needs no data)\n"
75
- " slide_type: exact data-label copied from one template_sections entry, "
76
- "or null\n"
77
- " template_section_index: that entry's index from template_sections, "
78
- "or null\n\n"
79
- "VISUAL / TEMPLATE BINDING\n"
80
- "The payload carries `template_sections`: the slide types supplied by the "
81
- "pinned template. Each entry has an `index`, the exact design-system "
82
- "`label`, `inner_classes`, `text_snippet` and `affordances`. Choose only "
83
- "from these entries and copy each entry's `label` exactly into "
84
- "`slide_type` and its `index` into `template_section_index`. If none fit, "
85
- "leave both fields null. If the list is empty or absent, leave both fields "
86
- "null. A slide may stay unbound, so never bind a merely similar section. "
87
- "Never invent a type that is not in the list. Never complain that the list "
88
- "was not supplied when the key is present.\n"
89
- "When you commit a design system, pick a `template_id` from the library "
90
- "rather than leaving it unset; an empty template means an empty "
91
- "`template_sections` list.\n"
92
- "`content_brief` names the exhibit when the slide carries numbers. Brand "
93
- "furniture such as a logo or lockup comes from the selected section's "
94
- "markup. Style assets are identity, not evidence.\n"
95
- "Do not plan exhibits onto missing data; prefer `ask_data`.\n\n"
96
- "SLIDE NUMBERS\n"
97
- "In `message` only, speak about slides 1-indexed, matching the UI. "
98
- "`position` and `target_positions` stay 0-indexed.\n\n"
74
+ "(empty list if the slide needs no data)\n\n"
99
75
  "Return an ArchitectOutput. Do not include prose outside the structured output."
100
76
  )
@@ -20,14 +20,7 @@ def _criteria_stage() -> str:
20
20
 
21
21
  BUILD_REVIEWER_AUTHORED_PREFIX: str = (
22
22
  "You are a build reviewer. Inspect the built slide against every criterion "
23
- "below and return a SlideReviewOutput. "
24
- "Judge colours, fonts and spacing by the computed cascade the slide renders "
25
- "with, not by the class names on its elements. "
26
- "When the payload carries a non-empty section_html, compare the built HTML "
27
- "with section_html and with slide_spec.slide_type to decide whether the slide "
28
- "uses the bound layout section. "
29
- "Never propose a replacement colour or layout in a finding message; state "
30
- "what is wrong and leave the remedy to the fixer."
23
+ "below and return a SlideReviewOutput."
31
24
  )
32
25
  BUILD_REVIEWER_CRITERIA_STAGE: str = _criteria_stage()
33
26
  BUILD_REVIEWER_V1_AUTHORED_SUFFIX: str = (
@@ -54,10 +47,7 @@ BUILD_REVIEWER_AUTHORED_INSTRUCTIONS: str = (
54
47
 
55
48
 
56
49
  def build_instructions() -> str:
57
- """Generate a composite from the live prefix and ``CRITERIA``.
58
-
59
- This is not the shipped Graph Version 1 prompt; see ``INSTRUCTIONS``.
60
- """
50
+ """Generate the byte-compatible Graph Version 1 composite instructions."""
61
51
  return (
62
52
  BUILD_REVIEWER_AUTHORED_PREFIX
63
53
  + "\n\n"
@@ -67,40 +57,7 @@ def build_instructions() -> str:
67
57
  )
68
58
 
69
59
 
70
- #: Frozen Graph Version 1 composite. It must stay byte-identical to the packaged
71
- #: v1 ``prompt_text`` and is the ``source_composite_prompt`` of the v1→v2
72
- #: transition: persisted v1 definitions only auto-upgrade on an exact match.
73
- #: New review rules and criteria reach v2 through ``BUILD_REVIEWER_AUTHORED_INSTRUCTIONS``
74
- #: and ``BUILD_REVIEWER_CRITERIA_STAGE``, never through this literal.
75
- _V1_PREFIX: str = (
76
- "You are a build reviewer. Inspect the built slide against every criterion "
77
- "below and return a SlideReviewOutput."
78
- )
79
- _V1_CRITERIA_STAGE: str = (
80
- "CRITERIA:\n"
81
- " overflow (design, slide, objective=True): Slide content overflows the frame. "
82
- "Judge against _SLIDE_FRAME_CONSTRAINTS numbers, never reviewer-invented numbers.\n"
83
- " contrast_failure (design, slide, objective=True): Text/background contrast "
84
- "fails WCAG AA minimum.\n"
85
- " rogue_colour (design, slide, objective=True): Colour is outside the resolved "
86
- "contract — compiled artifact tokens, or the resolved style on the legacy branch.\n"
87
- " distorted_image (design, slide, objective=True): Image aspect ratio is distorted.\n"
88
- " source_contradiction (content, slide, objective=True): A figure contradicts "
89
- "resolved_data. Only assertable against resolved_data; a figure with no cited "
90
- "source is not this finding.\n"
91
- " brief_not_delivered (content, slide, objective=False): The slide does not "
92
- "deliver what the brief asked for. The one subjective slide criterion; exercises "
93
- "the drawer's actionable path with real data rather than only fixtures.\n"
94
- " arc_gap (narrative, deck, objective=False): The narrative arc has a gap or "
95
- "unexplained jump.\n"
96
- " cross_slide_repetition (narrative, deck, objective=False): The same point is "
97
- "made verbatim or near-verbatim on multiple slides.\n"
98
- " missing_conclusion (narrative, deck, objective=False): The deck has no "
99
- "conclusion or call-to-action."
100
- )
101
- INSTRUCTIONS: str = (
102
- _V1_PREFIX + "\n\n" + _V1_CRITERIA_STAGE + "\n\n" + BUILD_REVIEWER_V1_AUTHORED_SUFFIX
103
- )
60
+ INSTRUCTIONS: str = build_instructions()
104
61
 
105
62
 
106
63
  #: Appended to the build reviewer's instructions **only** when the payload carries
@@ -17,14 +17,11 @@ INSTRUCTIONS: str = (
17
17
  "You are a slide builder. Build ONE slide as an HTML fragment.\n"
18
18
  "\n"
19
19
  "INPUT: a section brief (purpose, content_brief, assumes, hands_off, "
20
- "data_references), the bound template section (section_html, section_css, "
21
- "slide_spec.slide_type, template_section_index), resolved_style, and optional "
22
- "resolved_data.\n"
20
+ "data_references) and optional resolved_data.\n"
23
21
  "\n"
24
22
  "OUTPUT: a BuilderOutput with three fields:\n"
25
23
  " position — the slide position from the brief\n"
26
- " html — the slide HTML fragment: a <section> wrapping div.slide, or a div.slide "
27
- "on its own, matching the structure of the bound section\n"
24
+ " html — the slide HTML fragment (a <div class=\"slide\"> element)\n"
28
25
  " scripts — Chart.js initialization code as a plain string (empty string if no "
29
26
  "charts)\n"
30
27
  "\n"
@@ -63,36 +60,6 @@ INSTRUCTIONS: str = (
63
60
  " - Build the slide without charts\n"
64
61
  " - Do not fabricate or estimate numbers\n"
65
62
  "\n"
66
- "BOUND TEMPLATE SECTION (when section_html is non-empty):\n"
67
- " - Fill that structure: replace its placeholder copy with the brief and keep "
68
- "everything else\n"
69
- " - Keep the outer root tag exactly as shipped (a <section> root is allowed) and "
70
- "keep the class tokens that carry the background (section, slide, dark, white, "
71
- "event, ...)\n"
72
- " - Render the section in the treatment it ships in; do not recolour a light "
73
- "section dark, or the reverse\n"
74
- " - Do not add inline color: or background: styles, and do not keep a template "
75
- "inline colour after changing the ground\n"
76
- " - Put dark, white and event on the same element that paints the fill, never on "
77
- "a wrapper: a wrapper carrying dark while the slide still ships light leaves "
78
- "descendant dark rules unfired\n"
79
- " - Do not emit a sibling root that drops the shipped classes\n"
80
- " - Follow section_html and template_section_index: if content_brief names a "
81
- "different kind of slide than the bound section, fill the bound section anyway "
82
- "(the reviewer reports the mismatch)\n"
83
- " - section_css is context only; never copy it into the html\n"
84
- "\n"
85
- "NO BOUND SECTION (when section_html is empty):\n"
86
- " - Improvise a layout from the purpose, content_brief and resolved_style\n"
87
- " - When design_system_active is true: paint with the design-system class tokens "
88
- "that the deck CSS applies to .slide, .slide.dark, .slide.white and .slide.event; "
89
- "pick the token that suits the resolved_style; do not add inline color: or "
90
- "background: styles; do not emit a bare .slide that depends on a "
91
- "section { background } rule for its ground — give the element a class token "
92
- "that paints it\n"
93
- " - When design_system_active is false: follow resolved_style; inline color: "
94
- "and background: styles are permitted because there is no deck CSS\n"
95
- "\n"
96
63
  "HTML RULES:\n"
97
64
  " - DO NOT emit a <style> element — deck CSS has a single writer\n"
98
65
  " - DO NOT wrap in <!DOCTYPE html>, <html>, <head>, or <body>\n"
@@ -35,11 +35,7 @@ INSTRUCTIONS: str = (
35
35
  " - Review the existing HTML structure\n"
36
36
  " - Identify the narrowest change that resolves the finding\n\n"
37
37
  "2. RETURN REPLACEMENT HTML:\n"
38
- " - Return ONLY the slide fragment, not the entire deck\n"
39
- " - Keep the outer root tag of the input html exactly (a <section> wrapping "
40
- "div.slide is allowed). Do not unwrap a bound section into a lone "
41
- "<div class=\"slide\">\n"
42
- " - Keep the class tokens on that outer root; do not drop treatment classes\n"
38
+ " - Return ONLY the slide div: <div class=\"slide\">...</div>\n"
43
39
  " - The slide must be complete and self-contained\n"
44
40
  " - If charts changed, update scripts accordingly\n"
45
41
  " - One <script data-slide-scripts> block per canvas; "
@@ -85,25 +85,8 @@ class SlideSpec(BaseModel):
85
85
  assumes: str
86
86
  hands_off: str
87
87
  data_references: list[str]
88
- slide_type: Optional[str] = None
89
88
  template_section_index: Optional[int] = None
90
89
 
91
- @field_validator("slide_type")
92
- @classmethod
93
- def _slide_type_stripped_and_non_blank(cls, v: Optional[str]) -> Optional[str]:
94
- """Strip ``slide_type``; reject whitespace-only. ``None`` stays ``None``.
95
-
96
- Free text from the design system's slide-type vocabulary, so it is
97
- deliberately not a Literal. Pairing with ``template_section_index`` is
98
- validated where the template inventory is available, not here.
99
- """
100
- if v is None:
101
- return None
102
- stripped = v.strip()
103
- if not stripped:
104
- raise ValueError("slide_type must not be whitespace-only")
105
- return stripped
106
-
107
90
 
108
91
  class DeckSpec(BaseModel):
109
92
  """Top-level deck specification committed by the architect agent.
@@ -83,15 +83,7 @@ CRITERIA: Dict[str, FindingCriterion] = {
83
83
  category="design",
84
84
  level="slide",
85
85
  objective=True,
86
- description=(
87
- "Text contrast fails WCAG AA. Measure the effective text colour "
88
- "(after cascade and inline overrides) against the colour actually "
89
- "painted behind it, resolving ancestor and inline backgrounds. "
90
- "A colour being in the palette is not a defence: a palette token "
91
- "on a palette ground can still fail. When a design-system contrast "
92
- "table is present, judge against it; otherwise require at least "
93
- "4.5:1 for normal text and 3:1 for large text. Check every text run."
94
- ),
86
+ description="Text/background contrast fails WCAG AA minimum.",
95
87
  ),
96
88
  "rogue_colour": FindingCriterion(
97
89
  name="rogue_colour",
@@ -152,31 +144,6 @@ CRITERIA: Dict[str, FindingCriterion] = {
152
144
  objective=False,
153
145
  description="The deck has no conclusion or call-to-action.",
154
146
  ),
155
- "off_template_treatment": FindingCriterion(
156
- name="off_template_treatment",
157
- category="design",
158
- level="slide",
159
- objective=True,
160
- description=(
161
- "A bound section is rendered in a treatment other than the one it "
162
- "ships in: the ground is flipped (light for dark or vice versa), the "
163
- "governing class is not on the element that paints the ground, or an "
164
- "inline colour fights descendant .dark / .white rules. Judge the "
165
- "cascade, not class names."
166
- ),
167
- ),
168
- "layout_binding_mismatch": FindingCriterion(
169
- name="layout_binding_mismatch",
170
- category="design",
171
- level="slide",
172
- objective=True,
173
- description=(
174
- "The built HTML is not the section named by the slide_type / "
175
- "template_section_index pair. Distinct from brief_not_delivered: "
176
- "this is about which bound layout was built, not whether the "
177
- "content answers the brief."
178
- ),
179
- ),
180
147
  }
181
148
 
182
149