tina4-python 3.13.149__tar.gz → 3.13.150__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 (201) hide show
  1. {tina4_python-3.13.149 → tina4_python-3.13.150}/PKG-INFO +1 -1
  2. {tina4_python-3.13.149 → tina4_python-3.13.150}/pyproject.toml +1 -1
  3. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/__init__.py +1 -1
  4. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/cli/__init__.py +125 -2
  5. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/server.py +10 -2
  6. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/dev_admin/__init__.py +153 -117
  7. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/dev_admin/plan.py +1 -1
  8. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/bundled-component-provenance.json +2 -2
  9. tina4_python-3.13.150/tina4_python/public/js/tina4-dev-admin-split.html +202 -0
  10. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/js/tina4-dev-admin.min.js +147 -138
  11. {tina4_python-3.13.149 → tina4_python-3.13.150}/.gitignore +0 -0
  12. {tina4_python-3.13.149 → tina4_python-3.13.150}/COMMERCIAL-LICENSE.md +0 -0
  13. {tina4_python-3.13.149 → tina4_python-3.13.150}/LICENSE +0 -0
  14. {tina4_python-3.13.149 → tina4_python-3.13.150}/NOTICE +0 -0
  15. {tina4_python-3.13.149 → tina4_python-3.13.150}/README.md +0 -0
  16. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/.tina4-metrics.json +0 -0
  17. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/CLAUDE.md +0 -0
  18. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/HtmlElement.py +0 -0
  19. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/Testing.py +0 -0
  20. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/_import_helper.py +0 -0
  21. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/ai/__init__.py +0 -0
  22. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/ai/client.py +0 -0
  23. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/api/__init__.py +0 -0
  24. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/auth/__init__.py +0 -0
  25. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/cache/__init__.py +0 -0
  26. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/container/__init__.py +0 -0
  27. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/context/__init__.py +0 -0
  28. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/context/chunker.py +0 -0
  29. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/__init__.py +0 -0
  30. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/cache.py +0 -0
  31. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/constants.py +0 -0
  32. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/csp.py +0 -0
  33. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/events.py +0 -0
  34. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/middleware.py +0 -0
  35. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/port_takeover.py +0 -0
  36. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/rate_limiter.py +0 -0
  37. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/request.py +0 -0
  38. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/response.py +0 -0
  39. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/core/router.py +0 -0
  40. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/crud/__init__.py +0 -0
  41. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/crud/page.py +0 -0
  42. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/crud/page_render.py +0 -0
  43. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/__init__.py +0 -0
  44. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/adapter.py +0 -0
  45. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/async_api.py +0 -0
  46. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/connection.py +0 -0
  47. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/database_url.py +0 -0
  48. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/firebird.py +0 -0
  49. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/mongodb.py +0 -0
  50. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/mssql.py +0 -0
  51. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/mysql.py +0 -0
  52. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/odbc.py +0 -0
  53. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/pool.py +0 -0
  54. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/postgres.py +0 -0
  55. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/sql_translator.py +0 -0
  56. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/database/sqlite.py +0 -0
  57. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/debug/__init__.py +0 -0
  58. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/debug/error_overlay.py +0 -0
  59. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/dev_admin/metrics.py +0 -0
  60. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/dev_admin/project_index.py +0 -0
  61. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/docs.py +0 -0
  62. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/docstore/__init__.py +0 -0
  63. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/dotenv/__init__.py +0 -0
  64. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/env.py +0 -0
  65. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/frond/FROND.md +0 -0
  66. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/frond/__init__.py +0 -0
  67. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/frond/compiler.py +0 -0
  68. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/frond/engine.py +0 -0
  69. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/frond/parser.py +0 -0
  70. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/auth/meta.json +0 -0
  71. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/auth/src/routes/api/gallery_auth.py +0 -0
  72. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/database/meta.json +0 -0
  73. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/database/src/routes/api/gallery_db.py +0 -0
  74. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/error-overlay/meta.json +0 -0
  75. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/error-overlay/src/routes/api/gallery_crash.py +0 -0
  76. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/orm/meta.json +0 -0
  77. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/orm/src/orm/Product.py +0 -0
  78. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/orm/src/routes/api/gallery_products.py +0 -0
  79. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/queue/meta.json +0 -0
  80. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/queue/src/routes/api/gallery_queue.py +0 -0
  81. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/rest-api/meta.json +0 -0
  82. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/rest-api/src/routes/api/gallery_hello.py +0 -0
  83. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/templates/meta.json +0 -0
  84. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/templates/src/routes/gallery_page.py +0 -0
  85. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/gallery/templates/src/templates/gallery_page.twig +0 -0
  86. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graph/__init__.py +0 -0
  87. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graph/adapter.py +0 -0
  88. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graph/adapters/__init__.py +0 -0
  89. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graph/adapters/arango.py +0 -0
  90. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graph/adapters/bolt.py +0 -0
  91. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graph/adapters/ultipa.py +0 -0
  92. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graph/graph_url.py +0 -0
  93. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/graphql/__init__.py +0 -0
  94. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/i18n/__init__.py +0 -0
  95. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/mcp/__init__.py +0 -0
  96. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/mcp/protocol.py +0 -0
  97. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/mcp/tools.py +0 -0
  98. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/messenger/__init__.py +0 -0
  99. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/migration/__init__.py +0 -0
  100. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/migration/runner.py +0 -0
  101. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/mqtt/__init__.py +0 -0
  102. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/mqtt/message.py +0 -0
  103. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/orm/__init__.py +0 -0
  104. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/orm/async_api.py +0 -0
  105. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/orm/collection.py +0 -0
  106. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/orm/fields.py +0 -0
  107. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/orm/model.py +0 -0
  108. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/orm/point.py +0 -0
  109. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/THIRD-PARTY-NOTICES.md +0 -0
  110. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/__feedback/widget.js +0 -0
  111. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/css/tina4.css +0 -0
  112. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/css/tina4.min.css +0 -0
  113. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/favicon.ico +0 -0
  114. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/images/logo.svg +0 -0
  115. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/images/tina4-logo-icon.webp +0 -0
  116. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/js/frond.js +0 -0
  117. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/js/frond.min.js +0 -0
  118. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/js/tina4.min.js +0 -0
  119. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/js/tina4js.min.js +0 -0
  120. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/licenses/swagger-ui-3.10.0-original-notice.txt +0 -0
  121. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/licenses/swagger-ui-5.17.14-NOTICE.txt +0 -0
  122. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/licenses/swagger-ui-Apache-2.0.txt +0 -0
  123. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/licenses/tina4-css-MIT.txt +0 -0
  124. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/licenses/tina4-dev-admin-components.json +0 -0
  125. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/licenses/tina4-dev-admin-third-party.txt +0 -0
  126. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/licenses/tina4-js-MIT.txt +0 -0
  127. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/swagger/index.html +0 -0
  128. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/public/swagger/oauth2-redirect.html +0 -0
  129. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/push/__init__.py +0 -0
  130. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/push/_base.py +0 -0
  131. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/push/_cryptography.py +0 -0
  132. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/push/_libcrypto.py +0 -0
  133. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/query_builder/__init__.py +0 -0
  134. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/__init__.py +0 -0
  135. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/amqp_url.py +0 -0
  136. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/job.py +0 -0
  137. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/kafka_backend.py +0 -0
  138. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/lite_backend.py +0 -0
  139. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/mongo_backend.py +0 -0
  140. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/rabbitmq_backend.py +0 -0
  141. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue/topic_dead_letter.py +0 -0
  142. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue_backends/__init__.py +0 -0
  143. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue_backends/kafka_backend.py +0 -0
  144. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue_backends/mongo_backend.py +0 -0
  145. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/queue_backends/rabbitmq_backend.py +0 -0
  146. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/__init__.py +0 -0
  147. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/models/Attachment.py +0 -0
  148. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/models/Channel.py +0 -0
  149. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/models/ChannelMember.py +0 -0
  150. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/models/Message.py +0 -0
  151. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/models/Workspace.py +0 -0
  152. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/models/__init__.py +0 -0
  153. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/realtime/storage.py +0 -0
  154. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/seeder/__init__.py +0 -0
  155. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/service/__init__.py +0 -0
  156. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/session/__init__.py +0 -0
  157. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/session_handlers/__init__.py +0 -0
  158. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/session_handlers/memcached_handler.py +0 -0
  159. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/session_handlers/mongodb_handler.py +0 -0
  160. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/session_handlers/redis_handler.py +0 -0
  161. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/session_handlers/valkey_handler.py +0 -0
  162. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/sso.py +0 -0
  163. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/ssrf.py +0 -0
  164. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/swagger/__init__.py +0 -0
  165. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/components/crud.twig +0 -0
  166. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/crud/form.twig +0 -0
  167. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/crud/modals.twig +0 -0
  168. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/crud/page.twig +0 -0
  169. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/crud/table.twig +0 -0
  170. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/docker/distroless/Dockerfile +0 -0
  171. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/docker/poetry/Dockerfile +0 -0
  172. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/docker/python/Dockerfile +0 -0
  173. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/docker/uv/Dockerfile +0 -0
  174. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/302.twig +0 -0
  175. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/401.twig +0 -0
  176. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/403.twig +0 -0
  177. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/404.twig +0 -0
  178. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/500.twig +0 -0
  179. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/502.twig +0 -0
  180. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/503.twig +0 -0
  181. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/errors/base.twig +0 -0
  182. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/frontend/README.md +0 -0
  183. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/templates/readme.md +0 -0
  184. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/test/__init__.py +0 -0
  185. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/test_client/__init__.py +0 -0
  186. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/af/LC_MESSAGES/messages.mo +0 -0
  187. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/af/LC_MESSAGES/messages.po +0 -0
  188. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/en/LC_MESSAGES/messages.mo +0 -0
  189. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/en/LC_MESSAGES/messages.po +0 -0
  190. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/es/LC_MESSAGES/messages.mo +0 -0
  191. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/es/LC_MESSAGES/messages.po +0 -0
  192. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/fr/LC_MESSAGES/messages.mo +0 -0
  193. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/fr/LC_MESSAGES/messages.po +0 -0
  194. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/ja/LC_MESSAGES/messages.mo +0 -0
  195. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/ja/LC_MESSAGES/messages.po +0 -0
  196. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/zh/LC_MESSAGES/messages.mo +0 -0
  197. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/translations/zh/LC_MESSAGES/messages.po +0 -0
  198. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/validator/__init__.py +0 -0
  199. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/websocket/__init__.py +0 -0
  200. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/websocket/backplane.py +0 -0
  201. {tina4_python-3.13.149 → tina4_python-3.13.150}/tina4_python/wsdl/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tina4-python
3
- Version: 3.13.149
3
+ Version: 3.13.150
4
4
  Summary: Tina4 Python v3 — Zero-dependency, lightweight web framework
5
5
  Author-email: Andre van Zuydam <andrevanzuydam@gmail.com>
6
6
  License-Expression: MPL-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tina4-python"
3
- version = "3.13.149"
3
+ version = "3.13.150"
4
4
  description = "Tina4 Python v3 — Zero-dependency, lightweight web framework"
5
5
  authors = [
6
6
  {name = "Andre van Zuydam", email = "andrevanzuydam@gmail.com"}
@@ -57,7 +57,7 @@ def _resolve_version() -> str:
57
57
  #
58
58
  # test_version_constant.py now asserts this literal equals the pyproject
59
59
  # version, so the release bump cannot leave it behind again.
60
- return "3.13.149"
60
+ return "3.13.150"
61
61
 
62
62
 
63
63
  __version__ = _resolve_version()
@@ -1652,8 +1652,8 @@ def _generate(args):
1652
1652
 
1653
1653
  what = args[0].lower()
1654
1654
 
1655
- # Auth doesn't require a name argument
1656
- no_name_generators = {"auth"}
1655
+ # These generators take no name argument.
1656
+ no_name_generators = {"auth", "base"}
1657
1657
  if what not in no_name_generators and len(args) < 2:
1658
1658
  print(f"Usage: tina4python generate {what} <name> [options]")
1659
1659
  sys.exit(1)
@@ -3352,6 +3352,127 @@ def _gen_form(name: str, flags: dict = None):
3352
3352
  print(f" ✓ Created {path}")
3353
3353
 
3354
3354
 
3355
+ _BASE_TWIG = '''<!DOCTYPE html>
3356
+ <html lang="en">
3357
+ <head>
3358
+ <meta charset="UTF-8">
3359
+ <title>{% block title %}{{ APP_NAME }}{% endblock %}</title>
3360
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
3361
+ <link rel="stylesheet" href="/css/tina4.min.css">
3362
+ <link rel="stylesheet" href="/css/default.css">
3363
+ {% block stylesheets %}{% endblock %}
3364
+ </head>
3365
+ <body>
3366
+ {% block nav %}{% include "partials/nav.twig" ignore missing %}{% endblock %}
3367
+ <main>{% block content %}{% endblock %}</main>
3368
+ {% block javascripts %}
3369
+ <script src="/js/tina4.min.js"></script>
3370
+ <script src="/js/frond.min.js"></script>
3371
+ {% endblock %}
3372
+ </body>
3373
+ </html>
3374
+ '''
3375
+
3376
+
3377
+ def _ensure_base_template():
3378
+ """Create src/templates/base.twig and the src/templates/pages/ folder if
3379
+ missing. Returns the paths created (empty when everything already existed).
3380
+ Shared by `generate base` and `generate page` so a page can be scaffolded
3381
+ into a fresh project and still inherit from a real base."""
3382
+ created = []
3383
+ templates = Path("src/templates")
3384
+ templates.mkdir(parents=True, exist_ok=True)
3385
+ (templates / "pages").mkdir(parents=True, exist_ok=True)
3386
+ base = templates / "base.twig"
3387
+ if not base.exists():
3388
+ base.write_text(_BASE_TWIG, encoding="utf-8")
3389
+ created.append(str(base))
3390
+ return created
3391
+
3392
+
3393
+ def _page_twig(title: str) -> str:
3394
+ """A Frond page template that extends base.twig (Twig braces kept literal)."""
3395
+ return (
3396
+ '{% extends "base.twig" %}\n'
3397
+ '{% block title %}' + title + '{% endblock %}\n'
3398
+ '{% block content %}\n'
3399
+ '<div class="container mt-4">\n'
3400
+ ' <h1>' + title + '</h1>\n'
3401
+ ' {# tina4:edit page content goes here #}\n'
3402
+ '</div>\n'
3403
+ '{% endblock %}\n'
3404
+ )
3405
+
3406
+
3407
+ def _page_route(url_path: str, template_name: str, fn_name: str, title: str) -> str:
3408
+ """A route that renders a page template through the @template decorator."""
3409
+ return (
3410
+ "from tina4_python.core.router import get, template\n\n\n"
3411
+ '@get("' + url_path + '")\n'
3412
+ '@template("' + template_name + '")\n'
3413
+ "async def " + fn_name + "(request, response):\n"
3414
+ ' return {"title": "' + title + '"}\n'
3415
+ )
3416
+
3417
+
3418
+ def _gen_base(name: str = None, flags: dict = None):
3419
+ """Scaffold a Frond base template + an index page that extends it.
3420
+
3421
+ tina4python generate base
3422
+
3423
+ Creates src/templates/base.twig (if missing), the src/templates/pages/
3424
+ folder, src/templates/pages/index.twig (extends base), and the `/` route
3425
+ that renders it. Subsequent `generate page <name>` pages inherit from base.
3426
+ """
3427
+ created = _ensure_base_template()
3428
+ index_tpl = Path("src/templates/pages/index.twig")
3429
+ if not index_tpl.exists():
3430
+ index_tpl.write_text(_page_twig("Home"), encoding="utf-8")
3431
+ created.append(str(index_tpl))
3432
+ routes = Path("src/routes")
3433
+ routes.mkdir(parents=True, exist_ok=True)
3434
+ index_route = routes / "index.py"
3435
+ if not index_route.exists():
3436
+ index_route.write_text(_page_route("/", "pages/index.twig", "index_page", "Home"), encoding="utf-8")
3437
+ created.append(str(index_route))
3438
+ if created:
3439
+ for p in created:
3440
+ print(f" ✓ Created {p}")
3441
+ else:
3442
+ print(" ✓ base template + index page already present")
3443
+
3444
+
3445
+ def _gen_page(name: str, flags: dict = None):
3446
+ """Scaffold a page that inherits from the Frond base template.
3447
+
3448
+ tina4python generate page about
3449
+
3450
+ Creates src/templates/pages/<name>.twig (extends base.twig) and a route that
3451
+ renders it. Auto-creates the pages/ folder and bootstraps base.twig when they
3452
+ do not exist yet, so a page always inherits from a real base.
3453
+ """
3454
+ slug = _to_snake(name or "").strip("/")
3455
+ if not slug:
3456
+ print(" ✗ page needs a name (e.g. generate page about)")
3457
+ return
3458
+ title = slug.replace("_", " ").title()
3459
+ created = _ensure_base_template()
3460
+ tpl = Path("src/templates/pages") / f"{slug}.twig"
3461
+ if tpl.exists():
3462
+ print(f" ✗ File already exists: {tpl}")
3463
+ return
3464
+ tpl.write_text(_page_twig(title), encoding="utf-8")
3465
+ created.append(str(tpl))
3466
+ routes = Path("src/routes")
3467
+ routes.mkdir(parents=True, exist_ok=True)
3468
+ route = routes / f"{slug}.py"
3469
+ if not route.exists():
3470
+ route.write_text(_page_route(f"/{slug}", f"pages/{slug}.twig", f"{slug}_page", title), encoding="utf-8")
3471
+ created.append(str(route))
3472
+ for p in created:
3473
+ print(f" ✓ Created {p}")
3474
+
3475
+
3355
3476
  def _gen_view(name: str, flags: dict = None):
3356
3477
  """Generate list + detail view templates.
3357
3478
 
@@ -3912,6 +4033,8 @@ def _commands(args=None):
3912
4033
  GENERATORS = {
3913
4034
  "model": {"handler": _gen_model, "usage": '<Name> [--fields "name:string,price:float"] [--table-name <name>]', "summary": "ORM model + matching migration"},
3914
4035
  "route": {"handler": _gen_route, "usage": "<name> [--model Name] [--public]", "summary": "CRUD route file, secure by default (--public opens writes)"},
4036
+ "base": {"handler": _gen_base, "usage": "", "summary": "Frond base template + index page + pages/ folder"},
4037
+ "page": {"handler": _gen_page, "usage": "<name>", "summary": "Page that extends base.twig (auto-creates pages/ + base)"},
3915
4038
  "crud": {"handler": _gen_crud, "usage": '<Name> [--fields "..."] [--public] [--no-templates]', "summary": "Model + migration + AutoCrud-backed admin page (to_crud) + editable crud/ templates + gate test"},
3916
4039
  "migration": {"handler": _gen_migration, "usage": "<description>", "summary": "Timestamped migration file (UP/DOWN)"},
3917
4040
  "middleware": {"handler": _gen_middleware, "usage": "<Name>", "summary": "Middleware with before/after hooks"},
@@ -1654,7 +1654,7 @@ def _handle_rate_limit(request: Request, response: Response) -> Response | None:
1654
1654
 
1655
1655
  async def _handle_dev_admin(request: Request, response: Response) -> Response:
1656
1656
  """Serve the /__dev dashboard and API routes."""
1657
- from tina4_python.dev_admin import get_api_handlers, _dev_request_denial
1657
+ from tina4_python.dev_admin import get_api_handlers, _dev_request_denial, split_view_html
1658
1658
  # ADR-0082: ONE gate for every /__dev request, reads and writes alike -
1659
1659
  # Host allow-list (DNS rebinding), same-origin (CSRF and cross-site reads)
1660
1660
  # and loopback peer. Scoped to /__dev so the deliberately cross-origin
@@ -1665,7 +1665,15 @@ async def _handle_dev_admin(request: Request, response: Response) -> Response:
1665
1665
  response.status(_denial[0]).json({"ok": False, "error": _denial[1]})
1666
1666
  _cors.apply(request, response)
1667
1667
  return response
1668
- if request.path in ("/__dev/", "/__dev", "/__dev/v2", "/__dev/v2/"):
1668
+ if request.path in ("/__dev/split", "/__dev/split/"):
1669
+ # Detached split view: dashboard/editor LEFT, live app preview RIGHT.
1670
+ # A plain page (no toolbar, no reload) hosting two iframes that each
1671
+ # keep their own reload behaviour - so the editor stays put while the
1672
+ # preview updates on a change.
1673
+ response.html(split_view_html())
1674
+ response.header("cache-control", "no-store, must-revalidate")
1675
+ response.header("pragma", "no-cache")
1676
+ elif request.path in ("/__dev/", "/__dev", "/__dev/v2", "/__dev/v2/"):
1669
1677
  # Unified SPA dev admin. The bundle derives its WS URL from
1670
1678
  # `location.host` directly, so no environment shim is needed —
1671
1679
  # the framework serves /__dev_reload on its own port and the
@@ -1406,19 +1406,19 @@ async def _api_system(request, response):
1406
1406
 
1407
1407
 
1408
1408
  async def _api_service_ai(request, response):
1409
- return response({"service": "ai", "url": os.environ.get("TINA4_AI_URL", "http://localhost:11437/api/chat"), "ok": True})
1409
+ return response({"service": "ai", "url": os.environ.get("TINA4_AI_URL", "http://localhost:11435/api/chat"), "ok": True})
1410
1410
 
1411
1411
 
1412
1412
  async def _api_service_vision(request, response):
1413
- return response({"service": "vision", "url": os.environ.get("TINA4_VISION_URL", "http://localhost:11437/api/chat"), "ok": True})
1413
+ return response({"service": "vision", "url": os.environ.get("TINA4_VISION_URL", "http://localhost:11435/api/chat"), "ok": True})
1414
1414
 
1415
1415
 
1416
1416
  async def _api_service_embed(request, response):
1417
- return response({"service": "embed", "url": os.environ.get("TINA4_EMBED_URL", "http://localhost:11437/api/embeddings"), "ok": True})
1417
+ return response({"service": "embed", "url": os.environ.get("TINA4_EMBED_URL", "http://localhost:11435/api/embeddings"), "ok": True})
1418
1418
 
1419
1419
 
1420
1420
  async def _api_service_image(request, response):
1421
- return response({"service": "image", "url": os.environ.get("TINA4_IMAGE_URL", "http://localhost:11437/api/generate"), "ok": True})
1421
+ return response({"service": "image", "url": os.environ.get("TINA4_IMAGE_URL", "http://localhost:11435/api/generate"), "ok": True})
1422
1422
 
1423
1423
 
1424
1424
  async def _api_service_rag(request, response):
@@ -1457,57 +1457,95 @@ def _supervisor_base_url() -> str:
1457
1457
 
1458
1458
 
1459
1459
  async def _api_ai_proxy(request, response):
1460
- """Transparent pass-through to the qwen ollama chat endpoint.
1461
-
1462
- Accepts the ollama-native body (``{model, messages, stream,
1463
- options}``) that the dev-admin SPA sends for FIM completion and
1464
- supervisor chat, forwards it verbatim to ``TINA4_AI_URL``, and
1465
- returns the response unchanged. Streaming is forced off upstream
1466
- because the built-in asyncio server can't reliably chunk responses
1467
- back to the SPA; the SPA's ``body.getReader()`` still works for
1468
- single-shot JSON.
1460
+ """Pass-through to the Tina4 AI GATEWAY (never a model directly).
1461
+
1462
+ Accepts the ollama-native body (``{model, messages, stream, options}``)
1463
+ the dev-admin SPA sends for FIM completion and supervisor chat, and
1464
+ forwards it VERBATIM to ``TINA4_AI_URL`` - the local gateway
1465
+ (``tina4 ai serve`` on :11435), NOT a model. The gateway enforces the
1466
+ profile sign-in and routes to Ollama or the Tina4 model server, so
1467
+ dev-admin holds no model endpoint.
1468
+
1469
+ The caller's ``stream`` flag is honoured, never overridden. When it is
1470
+ true the upstream NDJSON is relayed line by line to the SPA (the
1471
+ built-in server chunks reliably), so the stream is unbroken model ->
1472
+ gateway -> here -> SPA; otherwise a single JSON reply is returned.
1469
1473
  """
1470
- import urllib.request
1474
+ import asyncio
1475
+ import threading
1471
1476
  import urllib.error
1477
+ import urllib.request
1472
1478
 
1473
1479
  raw_body = request.body if hasattr(request, "body") else None
1474
- if isinstance(raw_body, (dict, list)):
1475
- payload = dict(raw_body) if isinstance(raw_body, dict) else raw_body
1476
- if isinstance(payload, dict):
1477
- payload["stream"] = False
1478
- raw_bytes = json.dumps(payload).encode()
1480
+ wants_stream = False
1481
+ if isinstance(raw_body, dict):
1482
+ wants_stream = bool(raw_body.get("stream"))
1483
+ raw_bytes = json.dumps(raw_body).encode()
1484
+ elif isinstance(raw_body, list):
1485
+ raw_bytes = json.dumps(raw_body).encode()
1479
1486
  elif isinstance(raw_body, str) and raw_body.strip():
1480
1487
  try:
1481
1488
  decoded = json.loads(raw_body)
1482
1489
  if isinstance(decoded, dict):
1483
- decoded["stream"] = False
1484
- raw_bytes = json.dumps(decoded).encode()
1490
+ wants_stream = bool(decoded.get("stream"))
1491
+ raw_bytes = json.dumps(decoded).encode() if isinstance(decoded, (dict, list)) else raw_body.encode()
1485
1492
  except Exception:
1486
1493
  raw_bytes = raw_body.encode()
1487
1494
  else:
1488
1495
  return response({"error": "empty body"}, 400)
1489
1496
 
1490
- ai_url = os.environ.get("TINA4_AI_URL", "http://localhost:11437/api/chat")
1491
- try:
1492
- req = urllib.request.Request(
1493
- ai_url,
1494
- data=raw_bytes,
1495
- headers={"Content-Type": "application/json"},
1496
- )
1497
- with urllib.request.urlopen(req, timeout=120) as r:
1498
- body = r.read()
1499
- except urllib.error.HTTPError as e:
1500
- err_body = e.read().decode() if e.fp else str(e)
1501
- return response({"error": f"AI backend {e.code}: {err_body[:200]}"}, 502)
1502
- except Exception as e:
1503
- return response({"error": f"AI backend unreachable: {e}"}, 502)
1497
+ ai_url = os.environ.get("TINA4_AI_URL", "http://localhost:11435/api/chat")
1504
1498
 
1505
- # Forward qwen's response verbatim as JSON.
1506
- try:
1507
- return response(json.loads(body))
1508
- except Exception:
1509
- # Non-JSON body (shouldn't happen from ollama) — best-effort text.
1510
- return response(body.decode("utf-8", errors="replace"))
1499
+ def _make_request():
1500
+ return urllib.request.Request(ai_url, data=raw_bytes,
1501
+ headers={"Content-Type": "application/json"})
1502
+
1503
+ # Single-shot: buffer and return one JSON.
1504
+ if not wants_stream:
1505
+ try:
1506
+ with urllib.request.urlopen(_make_request(), timeout=120) as r:
1507
+ body = r.read()
1508
+ except urllib.error.HTTPError as e:
1509
+ err_body = e.read().decode() if e.fp else str(e)
1510
+ return response({"error": f"AI backend {e.code}: {err_body[:200]}"}, 502)
1511
+ except Exception as e:
1512
+ return response({"error": f"AI backend unreachable: {e}"}, 502)
1513
+ try:
1514
+ return response(json.loads(body))
1515
+ except Exception:
1516
+ return response(body.decode("utf-8", errors="replace"))
1517
+
1518
+ # Streaming: relay the gateway's NDJSON line by line. urllib is blocking, so
1519
+ # read it on a worker thread and hand each line to the async generator through
1520
+ # a queue (zero extra dependency - the same bridge the gateway and ai-server use).
1521
+ loop = asyncio.get_running_loop()
1522
+ queue: asyncio.Queue = asyncio.Queue()
1523
+
1524
+ def _pump():
1525
+ try:
1526
+ with urllib.request.urlopen(_make_request(), timeout=120) as r:
1527
+ for line in r: # each NDJSON line as it arrives
1528
+ loop.call_soon_threadsafe(queue.put_nowait, line)
1529
+ except urllib.error.HTTPError as e:
1530
+ err = e.read().decode() if e.fp else str(e)
1531
+ loop.call_soon_threadsafe(queue.put_nowait,
1532
+ (json.dumps({"error": f"AI backend {e.code}: {err[:200]}"}) + "\n").encode())
1533
+ except Exception as e:
1534
+ loop.call_soon_threadsafe(queue.put_nowait,
1535
+ (json.dumps({"error": f"AI backend unreachable: {e}"}) + "\n").encode())
1536
+ finally:
1537
+ loop.call_soon_threadsafe(queue.put_nowait, None)
1538
+
1539
+ threading.Thread(target=_pump, daemon=True).start()
1540
+
1541
+ async def _relay():
1542
+ while True:
1543
+ chunk = await queue.get()
1544
+ if chunk is None:
1545
+ return
1546
+ yield chunk.decode("utf-8", errors="replace") if isinstance(chunk, (bytes, bytearray)) else chunk
1547
+
1548
+ return response.stream(_relay(), content_type="application/x-ndjson")
1511
1549
 
1512
1550
 
1513
1551
  # ── Customer feedback widget — server-side plumbing ─────────────────
@@ -2360,37 +2398,17 @@ def toolbar_js() -> str:
2360
2398
  var barClose = document.getElementById('tina4-bar-close');
2361
2399
  if (barClose) { barClose.addEventListener('click', function () { bar.style.display = 'none'; }); }
2362
2400
 
2363
- var STATE_KEY = 'tina4_dev_overlay_open';
2364
- function buildOverlay() {
2365
- var c = document.createElement('div');
2366
- c.id = 'tina4-dev-panel';
2367
- var f = document.createElement('iframe');
2368
- f.src = '/__dev';
2369
- c.appendChild(f);
2370
- document.body.appendChild(c);
2371
- return c;
2372
- }
2373
- function toggleOverlay(e) {
2374
- if (e) { e.preventDefault(); }
2375
- var p = document.getElementById('tina4-dev-panel');
2376
- if (p) {
2377
- var hide = p.style.display !== 'none';
2378
- p.style.display = hide ? 'none' : 'block';
2379
- try { localStorage.setItem(STATE_KEY, hide ? '0' : '1'); } catch (_) {}
2380
- return;
2381
- }
2382
- buildOverlay();
2383
- try { localStorage.setItem(STATE_KEY, '1'); } catch (_) {}
2384
- }
2401
+ // Replace the old in-app iframe overlay: clicking Dashboard navigates to
2402
+ // the detached split view (editor/dashboard LEFT, live preview RIGHT) as
2403
+ // its own page. The app page reloading on a change no longer stomps the
2404
+ // dashboard, because the dashboard is no longer embedded in it.
2385
2405
  var dash = document.getElementById('tina4-dash-link');
2386
- if (dash) { dash.addEventListener('click', toggleOverlay); }
2387
- try {
2388
- if (location.pathname.indexOf('/__dev') !== 0
2389
- && localStorage.getItem(STATE_KEY) === '1'
2390
- && !document.getElementById('tina4-dev-panel')) {
2391
- buildOverlay();
2392
- }
2393
- } catch (_) {}
2406
+ if (dash) {
2407
+ dash.addEventListener('click', function (e) {
2408
+ e.preventDefault();
2409
+ window.location.href = '/__dev/split';
2410
+ });
2411
+ }
2394
2412
 
2395
2413
  if (bar.getAttribute('data-reload') !== '1') { return; }
2396
2414
  var cssExts = ['.css', '.scss'], debounce = null, interval = parseInt('__POLL_INTERVAL__') || 3000;
@@ -2437,6 +2455,21 @@ def toolbar_js() -> str:
2437
2455
  """.replace("__POLL_INTERVAL__", str(poll_interval_ms))
2438
2456
 
2439
2457
 
2458
+ def split_view_html() -> str:
2459
+ """The detached dev split view, served from the SHARED asset
2460
+ ``public/js/tina4-dev-admin-split.html`` - one source across all four
2461
+ frameworks (PHP/Ruby/Node serve the same file). A plain page: dashboard/
2462
+ editor LEFT, live app preview RIGHT; no toolbar injected, never reloads."""
2463
+ import tina4_python
2464
+ asset = Path(tina4_python.__file__).parent / "public" / "js" / "tina4-dev-admin-split.html"
2465
+ try:
2466
+ return asset.read_text(encoding="utf-8")
2467
+ except OSError:
2468
+ return ("<!DOCTYPE html><html><body><h1>Split view asset missing</h1>"
2469
+ "<p>Reinstall tina4-python or redeploy the dev-admin bundle.</p></body></html>")
2470
+
2471
+
2472
+
2440
2473
  # ── Editor API endpoints ──────────────────────────────────────
2441
2474
 
2442
2475
  async def _api_files(request, response):
@@ -3252,10 +3285,28 @@ _SCAFFOLD_KINDS = [
3252
3285
  async def _api_scaffold_list(request, response):
3253
3286
  """GET — list the scaffold kinds this framework knows how to emit.
3254
3287
 
3255
- Dev-admin renders one button per item. Each carries a `kind` the
3256
- /scaffold/run endpoint expects and a human `label` for the UI.
3288
+ Data-driven from the CLI's GENERATORS registry (the single source of truth),
3289
+ so every generator the framework has - not a hardcoded subset - appears as a
3290
+ button, and a new generator shows up with no dashboard change. Each item
3291
+ carries the `kind` the /scaffold/run endpoint expects, a human `label`, and
3292
+ whether it `needs_name`.
3257
3293
  """
3258
- return response({"kinds": _SCAFFOLD_KINDS})
3294
+ try:
3295
+ from tina4_python.cli import GENERATORS
3296
+ except Exception:
3297
+ return response({"kinds": _SCAFFOLD_KINDS})
3298
+ no_name = {"auth", "base"}
3299
+ kinds = [
3300
+ {
3301
+ "kind": k,
3302
+ "label": k.replace("_", " ").title(),
3303
+ "needs_name": k not in no_name,
3304
+ "summary": spec.get("summary", ""),
3305
+ "usage": spec.get("usage", ""),
3306
+ }
3307
+ for k, spec in GENERATORS.items()
3308
+ ]
3309
+ return response({"kinds": kinds})
3259
3310
 
3260
3311
 
3261
3312
  async def _api_scaffold_run(request, response):
@@ -3276,55 +3327,40 @@ async def _api_scaffold_run(request, response):
3276
3327
  name = (body.get("name") or "").strip()
3277
3328
  if not kind:
3278
3329
  return response({"ok": False, "error": "missing 'kind'"}, 400)
3279
- if not name and kind != "auth":
3280
- return response({"ok": False, "error": "missing 'name'"}, 400)
3281
3330
 
3282
- # Guard against path traversal / shell-metacharacter injection in
3283
- # the name — generator functions pass it into file paths.
3284
- import re
3285
- if not re.match(r"^[A-Za-z][A-Za-z0-9_\-]*$", name):
3286
- return response({"ok": False, "error": "name must match [A-Za-z][A-Za-z0-9_-]*"}, 400)
3287
-
3288
- generator_map = {
3289
- "route": "generate_route",
3290
- "model": "generate_model",
3291
- "migration": "generate_migration",
3292
- "middleware": "generate_middleware",
3293
- }
3294
- fn_name = generator_map.get(kind)
3295
- if fn_name is None:
3331
+ # Dispatch through the CLI's GENERATORS registry - the same single source of
3332
+ # truth the list endpoint reads, so ANY generator (incl. page/base) runs.
3333
+ try:
3334
+ from tina4_python.cli import GENERATORS
3335
+ except Exception as exc:
3336
+ return response({"ok": False, "error": f"generators unavailable: {exc}"}, 500)
3337
+
3338
+ spec = GENERATORS.get(kind)
3339
+ if spec is None:
3296
3340
  return response({"ok": False, "error": f"unknown scaffold kind: {kind}"}, 400)
3297
3341
 
3342
+ no_name = {"auth", "base"}
3343
+ if not name and kind not in no_name:
3344
+ return response({"ok": False, "error": "missing 'name'"}, 400)
3345
+
3346
+ # Guard against path traversal / shell-metacharacter injection in the name -
3347
+ # generator functions pass it into file paths. (A no-name generator skips it.)
3348
+ if name:
3349
+ import re
3350
+ if not re.match(r"^[A-Za-z][A-Za-z0-9_\-]*$", name):
3351
+ return response({"ok": False, "error": "name must match [A-Za-z][A-Za-z0-9_-]*"}, 400)
3352
+
3353
+ import io
3354
+ import contextlib
3355
+ buf = io.StringIO()
3298
3356
  try:
3299
- from tina4_python import cli as cli_module
3300
- fn = getattr(cli_module, fn_name, None)
3301
- if fn is None:
3302
- # Fall back to shelling out — keeps the endpoint useful
3303
- # even if the generator function names drift.
3304
- import subprocess
3305
- cp = subprocess.run(
3306
- ["tina4python", "generate", kind, name],
3307
- capture_output=True, text=True, timeout=30,
3308
- )
3309
- if cp.returncode != 0:
3310
- return response({"ok": False, "error": cp.stderr.strip() or cp.stdout.strip()}, 500)
3311
- return response({"ok": True, "output": cp.stdout.strip()})
3312
-
3313
- # Invoke the generator directly. The CLI functions typically
3314
- # print to stdout + write files; we don't capture their
3315
- # output here — the file tree will refresh and show the new
3316
- # files, which is what the user actually cares about.
3317
- result = fn(name) if fn.__code__.co_argcount == 1 else fn(name, None)
3318
-
3319
- # Most generators return a path or list of paths; normalise.
3320
- files: list[str] = []
3321
- if isinstance(result, str):
3322
- files = [result]
3323
- elif isinstance(result, list):
3324
- files = [str(p) for p in result]
3325
- return response({"ok": True, "kind": kind, "name": name, "files": files})
3357
+ with contextlib.redirect_stdout(buf):
3358
+ spec["handler"](name, {})
3326
3359
  except Exception as exc:
3327
3360
  return response({"ok": False, "error": str(exc)}, 500)
3361
+ # Generators print their "Created X" lines and refresh the file tree; we
3362
+ # return the captured output so the chip can show what happened.
3363
+ return response({"ok": True, "kind": kind, "name": name, "output": buf.getvalue().strip()})
3328
3364
 
3329
3365
 
3330
3366
  # ─── Run-chip endpoints (migrate / test / seed-all) ────────────────
@@ -510,7 +510,7 @@ def flesh(name: str = "", prompt: str = "") -> dict:
510
510
  user_parts.append(f"Extra context from caller: {prompt}")
511
511
  user_parts.append("Reply with ONLY the JSON array — no explanation, no markdown fences.")
512
512
 
513
- ai_url = _os.environ.get("TINA4_AI_URL", "http://localhost:11437/api/chat")
513
+ ai_url = _os.environ.get("TINA4_AI_URL", "http://localhost:11435/api/chat")
514
514
  ai_model = _os.environ.get("TINA4_AI_MODEL", "qwen2.5-coder:14b")
515
515
  try:
516
516
  req = _urlreq.Request(
@@ -41,8 +41,8 @@
41
41
  },
42
42
  {
43
43
  "path": "js/tina4-dev-admin.min.js",
44
- "component": "tina4-dev-admin-21700e0",
45
- "sha256": "0ca84246c26afb6a3243aafd1c65fa9486c076039e5d721b6f44661b3a59d7c2"
44
+ "component": "tina4-dev-admin-8c4617d",
45
+ "sha256": "6b05be06b5d76ee4126a11f019d104d3920c1e3234250cfe1966a33f34c1a234"
46
46
  }
47
47
  ]
48
48
  }