evlet 0.4.1__tar.gz → 0.4.2__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 (350) hide show
  1. {evlet-0.4.1 → evlet-0.4.2}/CHANGELOG.md +112 -0
  2. {evlet-0.4.1/evlet.egg-info → evlet-0.4.2}/PKG-INFO +17 -13
  3. {evlet-0.4.1 → evlet-0.4.2}/README.md +16 -12
  4. {evlet-0.4.1 → evlet-0.4.2}/docs/api-stability.md +11 -1
  5. {evlet-0.4.1 → evlet-0.4.2}/docs/app-upgrades.md +29 -0
  6. {evlet-0.4.1 → evlet-0.4.2}/docs/business-capabilities.md +6 -1
  7. {evlet-0.4.1 → evlet-0.4.2}/docs/cli.md +52 -29
  8. {evlet-0.4.1 → evlet-0.4.2}/docs/controls.md +67 -16
  9. {evlet-0.4.1 → evlet-0.4.2}/docs/finite-calculations.md +23 -0
  10. {evlet-0.4.1 → evlet-0.4.2}/docs/jobs-realtime.md +84 -1
  11. {evlet-0.4.1 → evlet-0.4.2}/docs/journal.md +7 -3
  12. {evlet-0.4.1 → evlet-0.4.2}/docs/ledger.md +6 -1
  13. {evlet-0.4.1 → evlet-0.4.2}/docs/meaning.md +2 -1
  14. {evlet-0.4.1 → evlet-0.4.2}/docs/model-engine.md +84 -4
  15. {evlet-0.4.1 → evlet-0.4.2}/docs/settings.md +9 -5
  16. {evlet-0.4.1 → evlet-0.4.2}/docs/states-actions.md +46 -4
  17. {evlet-0.4.1 → evlet-0.4.2}/docs/tenancy-deployment.md +3 -0
  18. {evlet-0.4.1 → evlet-0.4.2}/docs/ui-framework.md +10 -1
  19. {evlet-0.4.1 → evlet-0.4.2}/docs/ui.md +13 -2
  20. {evlet-0.4.1 → evlet-0.4.2}/evlet/auth.py +108 -12
  21. {evlet-0.4.1 → evlet-0.4.2}/evlet/business.py +32 -8
  22. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/devlink.py +8 -6
  23. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/instance.py +19 -2
  24. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/main.py +11 -2
  25. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/playground.py +2 -2
  26. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/serve.py +33 -6
  27. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/site.py +20 -25
  28. {evlet-0.4.1 → evlet-0.4.2}/evlet/controls.py +80 -16
  29. {evlet-0.4.1 → evlet-0.4.2}/evlet/controls_export.py +7 -3
  30. {evlet-0.4.1 → evlet-0.4.2}/evlet/controls_system.py +1 -1
  31. {evlet-0.4.1 → evlet-0.4.2}/evlet/corrections.py +2 -2
  32. {evlet-0.4.1 → evlet-0.4.2}/evlet/database.py +15 -0
  33. {evlet-0.4.1 → evlet-0.4.2}/evlet/declarations.py +15 -2
  34. {evlet-0.4.1 → evlet-0.4.2}/evlet/devlink.py +35 -40
  35. {evlet-0.4.1 → evlet-0.4.2}/evlet/documents.py +44 -13
  36. {evlet-0.4.1 → evlet-0.4.2}/evlet/fields.py +7 -2
  37. {evlet-0.4.1 → evlet-0.4.2}/evlet/forms.py +2 -2
  38. {evlet-0.4.1 → evlet-0.4.2}/evlet/framework.py +10 -0
  39. {evlet-0.4.1 → evlet-0.4.2}/evlet/instances.py +1 -1
  40. {evlet-0.4.1 → evlet-0.4.2}/evlet/jobs.py +69 -2
  41. {evlet-0.4.1 → evlet-0.4.2}/evlet/journal.py +8 -1
  42. {evlet-0.4.1 → evlet-0.4.2}/evlet/meaning.py +6 -4
  43. {evlet-0.4.1 → evlet-0.4.2}/evlet/migrations.py +130 -14
  44. {evlet-0.4.1 → evlet-0.4.2}/evlet/permissions.py +34 -5
  45. {evlet-0.4.1 → evlet-0.4.2}/evlet/postgres.py +2 -1
  46. {evlet-0.4.1 → evlet-0.4.2}/evlet/postgres_schema.py +2 -0
  47. {evlet-0.4.1 → evlet-0.4.2}/evlet/printing.py +5 -5
  48. {evlet-0.4.1 → evlet-0.4.2}/evlet/settings.py +99 -11
  49. {evlet-0.4.1 → evlet-0.4.2}/evlet/slips.py +3 -3
  50. {evlet-0.4.1 → evlet-0.4.2}/evlet/states.py +13 -6
  51. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/metadata.py +7 -2
  52. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/routes.py +3 -2
  53. evlet-0.4.1/evlet/ui/static/assets/ai-CrQ_o246.js → evlet-0.4.2/evlet/ui/static/assets/ai-BoNaQPi6.js +1 -1
  54. evlet-0.4.1/evlet/ui/static/assets/app-8zi9o2lX.js → evlet-0.4.2/evlet/ui/static/assets/app-CJDDr7hE.js +260 -250
  55. evlet-0.4.1/evlet/ui/static/assets/consent-CFCjzVhm.js → evlet-0.4.2/evlet/ui/static/assets/consent-CJkpbF5L.js +1 -1
  56. evlet-0.4.1/evlet/ui/static/assets/email-aIK6nDVU.js → evlet-0.4.2/evlet/ui/static/assets/email-BAMmEqz2.js +1 -1
  57. evlet-0.4.1/evlet/ui/static/assets/index-4FJhcD5e.js → evlet-0.4.2/evlet/ui/static/assets/index-D1OKAsr0.js +329 -300
  58. evlet-0.4.1/evlet/ui/static/assets/keys-BCweqTgl.js → evlet-0.4.2/evlet/ui/static/assets/keys-D9Qq-LDr.js +1 -1
  59. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/index.html +1 -1
  60. {evlet-0.4.1 → evlet-0.4.2/evlet.egg-info}/PKG-INFO +17 -13
  61. {evlet-0.4.1 → evlet-0.4.2}/evlet.egg-info/SOURCES.txt +6 -6
  62. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/app.py +3 -2
  63. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/items.py +3 -1
  64. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/models.py +2 -0
  65. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/api.ts +7 -1
  66. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/app.ts +21 -4
  67. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/client.ts +7 -0
  68. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/login.ts +44 -5
  69. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/meta.ts +2 -2
  70. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/record-page.ts +11 -3
  71. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/settings.ts +52 -2
  72. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/access.ts +29 -12
  73. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/client.ts +5 -1
  74. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/drafts.ts +2 -2
  75. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/people.ts +30 -12
  76. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/record.ts +96 -4
  77. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/schema.ts +5 -0
  78. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/childtable.ts +3 -2
  79. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/table.ts +7 -1
  80. {evlet-0.4.1 → evlet-0.4.2}/pyproject.toml +1 -1
  81. {evlet-0.4.1 → evlet-0.4.2}/LICENSE +0 -0
  82. {evlet-0.4.1 → evlet-0.4.2}/MANIFEST.in +0 -0
  83. {evlet-0.4.1 → evlet-0.4.2}/build_support.py +0 -0
  84. {evlet-0.4.1 → evlet-0.4.2}/docs/amendment-v2.md +0 -0
  85. {evlet-0.4.1 → evlet-0.4.2}/docs/application-generation.md +0 -0
  86. {evlet-0.4.1 → evlet-0.4.2}/docs/architecture.md +0 -0
  87. {evlet-0.4.1 → evlet-0.4.2}/docs/connector.md +0 -0
  88. {evlet-0.4.1 → evlet-0.4.2}/docs/customizing.md +0 -0
  89. {evlet-0.4.1 → evlet-0.4.2}/docs/document-lifecycle.md +0 -0
  90. {evlet-0.4.1 → evlet-0.4.2}/docs/effects.md +0 -0
  91. {evlet-0.4.1 → evlet-0.4.2}/docs/eva.md +0 -0
  92. {evlet-0.4.1 → evlet-0.4.2}/docs/getting-started.md +0 -0
  93. {evlet-0.4.1 → evlet-0.4.2}/docs/lifecycle-specification.md +0 -0
  94. {evlet-0.4.1 → evlet-0.4.2}/docs/measures.md +0 -0
  95. {evlet-0.4.1 → evlet-0.4.2}/docs/performance.md +0 -0
  96. {evlet-0.4.1 → evlet-0.4.2}/docs/postgresql.md +0 -0
  97. {evlet-0.4.1 → evlet-0.4.2}/docs/printing.md +0 -0
  98. {evlet-0.4.1 → evlet-0.4.2}/docs/production-operations.md +0 -0
  99. {evlet-0.4.1 → evlet-0.4.2}/docs/reports.md +0 -0
  100. {evlet-0.4.1 → evlet-0.4.2}/docs/routing.md +0 -0
  101. {evlet-0.4.1 → evlet-0.4.2}/docs/sequences.md +0 -0
  102. {evlet-0.4.1 → evlet-0.4.2}/docs/slips.md +0 -0
  103. {evlet-0.4.1 → evlet-0.4.2}/docs/tools.md +0 -0
  104. {evlet-0.4.1 → evlet-0.4.2}/evlet/__init__.py +0 -0
  105. {evlet-0.4.1 → evlet-0.4.2}/evlet/__main__.py +0 -0
  106. {evlet-0.4.1 → evlet-0.4.2}/evlet/app.py +0 -0
  107. {evlet-0.4.1 → evlet-0.4.2}/evlet/assistants.py +0 -0
  108. {evlet-0.4.1 → evlet-0.4.2}/evlet/audit.py +0 -0
  109. {evlet-0.4.1 → evlet-0.4.2}/evlet/builds.py +0 -0
  110. {evlet-0.4.1 → evlet-0.4.2}/evlet/calc.py +0 -0
  111. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/__init__.py +0 -0
  112. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/app.py +0 -0
  113. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/connector.py +0 -0
  114. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/docs.py +0 -0
  115. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/effects.py +0 -0
  116. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/ids.py +0 -0
  117. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/install.py +0 -0
  118. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/jobs.py +0 -0
  119. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/journal.py +0 -0
  120. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/ledger.py +0 -0
  121. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/project.py +0 -0
  122. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/proxy.py +0 -0
  123. {evlet-0.4.1 → evlet-0.4.2}/evlet/cli/setup.py +0 -0
  124. {evlet-0.4.1 → evlet-0.4.2}/evlet/connector.py +0 -0
  125. {evlet-0.4.1 → evlet-0.4.2}/evlet/connectors.py +0 -0
  126. {evlet-0.4.1 → evlet-0.4.2}/evlet/currencies.py +0 -0
  127. {evlet-0.4.1 → evlet-0.4.2}/evlet/customization.py +0 -0
  128. {evlet-0.4.1 → evlet-0.4.2}/evlet/deployment.py +0 -0
  129. {evlet-0.4.1 → evlet-0.4.2}/evlet/discovery.py +0 -0
  130. {evlet-0.4.1 → evlet-0.4.2}/evlet/effects.py +0 -0
  131. {evlet-0.4.1 → evlet-0.4.2}/evlet/eva.py +0 -0
  132. {evlet-0.4.1 → evlet-0.4.2}/evlet/events.py +0 -0
  133. {evlet-0.4.1 → evlet-0.4.2}/evlet/expressions.py +0 -0
  134. {evlet-0.4.1 → evlet-0.4.2}/evlet/identity.py +0 -0
  135. {evlet-0.4.1 → evlet-0.4.2}/evlet/images.py +0 -0
  136. {evlet-0.4.1 → evlet-0.4.2}/evlet/indexes.py +0 -0
  137. {evlet-0.4.1 → evlet-0.4.2}/evlet/ledger.py +0 -0
  138. {evlet-0.4.1 → evlet-0.4.2}/evlet/lifecycle.py +0 -0
  139. {evlet-0.4.1 → evlet-0.4.2}/evlet/mailboxes.py +0 -0
  140. {evlet-0.4.1 → evlet-0.4.2}/evlet/mcp.py +0 -0
  141. {evlet-0.4.1 → evlet-0.4.2}/evlet/measures.py +0 -0
  142. {evlet-0.4.1 → evlet-0.4.2}/evlet/mentions.py +0 -0
  143. {evlet-0.4.1 → evlet-0.4.2}/evlet/models.py +0 -0
  144. {evlet-0.4.1 → evlet-0.4.2}/evlet/naming.py +0 -0
  145. {evlet-0.4.1 → evlet-0.4.2}/evlet/object_storage.py +0 -0
  146. {evlet-0.4.1 → evlet-0.4.2}/evlet/packages.py +0 -0
  147. {evlet-0.4.1 → evlet-0.4.2}/evlet/periods.py +0 -0
  148. {evlet-0.4.1 → evlet-0.4.2}/evlet/py.typed +0 -0
  149. {evlet-0.4.1 → evlet-0.4.2}/evlet/query.py +0 -0
  150. {evlet-0.4.1 → evlet-0.4.2}/evlet/reactivity.py +0 -0
  151. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/__init__.py +0 -0
  152. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/print/fonts/NotoSans-Bold.woff2 +0 -0
  153. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/print/fonts/NotoSans-OFL.txt +0 -0
  154. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/print/fonts/NotoSans-Regular.woff2 +0 -0
  155. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/print/fonts/NotoSansArabic-Bold.woff2 +0 -0
  156. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/print/fonts/NotoSansArabic-OFL.txt +0 -0
  157. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/print/fonts/NotoSansArabic-Regular.woff2 +0 -0
  158. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/.gitignore.tpl +0 -0
  159. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/README.md.tpl +0 -0
  160. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/__app__/__init__.py.tpl +0 -0
  161. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/__app__/actions/__init__.py.tpl +0 -0
  162. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/__app__/hooks.py.tpl +0 -0
  163. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/__app__/migrations/__init__.py.tpl +0 -0
  164. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/__app__/models/__init__.py.tpl +0 -0
  165. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/__app__/permissions.py.tpl +0 -0
  166. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/pyproject.toml.tpl +0 -0
  167. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app/tests/test_models.py.tpl +0 -0
  168. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app_flat/.gitignore.tpl +0 -0
  169. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app_flat/README.md.tpl +0 -0
  170. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app_flat/__init__.py.tpl +0 -0
  171. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app_flat/models/__init__.py.tpl +0 -0
  172. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app_flat/models/item.py.tpl +0 -0
  173. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app_flat/pyproject.toml.tpl +0 -0
  174. {evlet-0.4.1 → evlet-0.4.2}/evlet/resources/templates/app_flat/setup.py.tpl +0 -0
  175. {evlet-0.4.1 → evlet-0.4.2}/evlet/richtext.py +0 -0
  176. {evlet-0.4.1 → evlet-0.4.2}/evlet/routing.py +0 -0
  177. {evlet-0.4.1 → evlet-0.4.2}/evlet/secrets.py +0 -0
  178. {evlet-0.4.1 → evlet-0.4.2}/evlet/sections.py +0 -0
  179. {evlet-0.4.1 → evlet-0.4.2}/evlet/sequences.py +0 -0
  180. {evlet-0.4.1 → evlet-0.4.2}/evlet/serverless.py +0 -0
  181. {evlet-0.4.1 → evlet-0.4.2}/evlet/services.py +0 -0
  182. {evlet-0.4.1 → evlet-0.4.2}/evlet/storage.py +0 -0
  183. {evlet-0.4.1 → evlet-0.4.2}/evlet/tenancy.py +0 -0
  184. {evlet-0.4.1 → evlet-0.4.2}/evlet/tools.py +0 -0
  185. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/__init__.py +0 -0
  186. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/application.py +0 -0
  187. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/serving.py +0 -0
  188. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/IBMPlexSans-OFL.txt +0 -0
  189. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/JetBrainsMono-Medium-3S3k2nMz.woff2 +0 -0
  190. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/JetBrainsMono-OFL.txt +0 -0
  191. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/JetBrainsMono-Regular-BQaDgvhP.woff2 +0 -0
  192. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/app-0SduO6OB.css +0 -0
  193. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/evlet-icon-blue.svg +0 -0
  194. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/evlet-logo-primary.svg +0 -0
  195. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/evlet-logo-white.svg +0 -0
  196. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-400-italic-CZTNEAuW.woff2 +0 -0
  197. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
  198. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
  199. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
  200. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-700-normal-Bxkt5Cjx.woff2 +0 -0
  201. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-ext-400-italic-Du9zzoL2.woff2 +0 -0
  202. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
  203. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
  204. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
  205. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/ibm-plex-sans-latin-ext-700-normal-aMgXseD4.woff2 +0 -0
  206. {evlet-0.4.1 → evlet-0.4.2}/evlet/ui/static/assets/index-UqEST1u4.css +0 -0
  207. {evlet-0.4.1 → evlet-0.4.2}/evlet/unsaved.py +0 -0
  208. {evlet-0.4.1 → evlet-0.4.2}/evlet/workspaces.py +0 -0
  209. {evlet-0.4.1 → evlet-0.4.2}/evlet.egg-info/dependency_links.txt +0 -0
  210. {evlet-0.4.1 → evlet-0.4.2}/evlet.egg-info/entry_points.txt +0 -0
  211. {evlet-0.4.1 → evlet-0.4.2}/evlet.egg-info/requires.txt +0 -0
  212. {evlet-0.4.1 → evlet-0.4.2}/evlet.egg-info/top_level.txt +0 -0
  213. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/manage.py +0 -0
  214. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/migrate.py +0 -0
  215. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/portal/index.html +0 -0
  216. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/portal/portal.css +0 -0
  217. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/portal/portal.js +0 -0
  218. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/prints.py +0 -0
  219. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/reports.py +0 -0
  220. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/settings.py +0 -0
  221. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/slips.py +0 -0
  222. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/team.py +0 -0
  223. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/tenants.py +0 -0
  224. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/worker.py +0 -0
  225. {evlet-0.4.1 → evlet-0.4.2}/examples/playground/workspaces.py +0 -0
  226. {evlet-0.4.1 → evlet-0.4.2}/frontend/.node-version +0 -0
  227. {evlet-0.4.1 → evlet-0.4.2}/frontend/.npmrc +0 -0
  228. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/IBMPlexSans-OFL.txt +0 -0
  229. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/JetBrainsMono-Medium.woff2 +0 -0
  230. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/JetBrainsMono-OFL.txt +0 -0
  231. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/JetBrainsMono-Regular.woff2 +0 -0
  232. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-400-italic.woff2 +0 -0
  233. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  234. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
  235. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
  236. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-700-normal.woff2 +0 -0
  237. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-ext-400-italic.woff2 +0 -0
  238. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-ext-400-normal.woff2 +0 -0
  239. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-ext-500-normal.woff2 +0 -0
  240. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-ext-600-normal.woff2 +0 -0
  241. {evlet-0.4.1 → evlet-0.4.2}/frontend/fonts/ibm-plex-sans-latin-ext-700-normal.woff2 +0 -0
  242. {evlet-0.4.1 → evlet-0.4.2}/frontend/index.html +0 -0
  243. {evlet-0.4.1 → evlet-0.4.2}/frontend/package-lock.json +0 -0
  244. {evlet-0.4.1 → evlet-0.4.2}/frontend/package.json +0 -0
  245. {evlet-0.4.1 → evlet-0.4.2}/frontend/public/assets/evlet-icon-blue.svg +0 -0
  246. {evlet-0.4.1 → evlet-0.4.2}/frontend/public/assets/evlet-logo-primary.svg +0 -0
  247. {evlet-0.4.1 → evlet-0.4.2}/frontend/public/assets/evlet-logo-white.svg +0 -0
  248. {evlet-0.4.1 → evlet-0.4.2}/frontend/scripts/bench-ui.mjs +0 -0
  249. {evlet-0.4.1 → evlet-0.4.2}/frontend/scripts/dev-proxy.mjs +0 -0
  250. {evlet-0.4.1 → evlet-0.4.2}/frontend/scripts/dev-proxy.test.mjs +0 -0
  251. {evlet-0.4.1 → evlet-0.4.2}/frontend/scripts/install-ui.mjs +0 -0
  252. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/composer.ts +0 -0
  253. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/config.ts +0 -0
  254. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/context.ts +0 -0
  255. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/docs.ts +0 -0
  256. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/duplicate.ts +0 -0
  257. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/explorer.ts +0 -0
  258. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/filters.ts +0 -0
  259. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/inbox.ts +0 -0
  260. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/last-page.ts +0 -0
  261. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/list-page.ts +0 -0
  262. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/main.ts +0 -0
  263. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/nav-icons.ts +0 -0
  264. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/palette.ts +0 -0
  265. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/prefs.ts +0 -0
  266. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/recents.ts +0 -0
  267. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/record-blocks.ts +0 -0
  268. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/record-compact.ts +0 -0
  269. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/related-data.ts +0 -0
  270. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/report-page.ts +0 -0
  271. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/revisions.ts +0 -0
  272. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/screens.css +0 -0
  273. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/settings.css +0 -0
  274. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/shell.ts +0 -0
  275. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/shortcuts.ts +0 -0
  276. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/slips.ts +0 -0
  277. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/unsaved-bar.ts +0 -0
  278. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/unsaved.ts +0 -0
  279. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/workspace-editor.ts +0 -0
  280. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/app/workspaces.ts +0 -0
  281. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/ai.ts +0 -0
  282. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/app.ts +0 -0
  283. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/connections.ts +0 -0
  284. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/controls.css +0 -0
  285. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/currencies.ts +0 -0
  286. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/eva.ts +0 -0
  287. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/keys.ts +0 -0
  288. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/log.ts +0 -0
  289. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/models.ts +0 -0
  290. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/naming.ts +0 -0
  291. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/periods.ts +0 -0
  292. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/prints.ts +0 -0
  293. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/system.ts +0 -0
  294. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/controls/unsaved.ts +0 -0
  295. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/dev.ts +0 -0
  296. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/dom.ts +0 -0
  297. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/eva/chat.ts +0 -0
  298. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/eva/client.ts +0 -0
  299. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/eva/eva.css +0 -0
  300. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/eva/tasks.ts +0 -0
  301. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ids.ts +0 -0
  302. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/changes.ts +0 -0
  303. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/finite.ts +0 -0
  304. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/format.ts +0 -0
  305. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/links.ts +0 -0
  306. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/session.ts +0 -0
  307. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/model/unsaved.ts +0 -0
  308. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/reactive.ts +0 -0
  309. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/editor.ts +0 -0
  310. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/history.ts +0 -0
  311. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/html.ts +0 -0
  312. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/images.ts +0 -0
  313. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/model.ts +0 -0
  314. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/ops.ts +0 -0
  315. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/render.ts +0 -0
  316. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/richtext/richtext.css +0 -0
  317. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/router.ts +0 -0
  318. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/settings/ai.ts +0 -0
  319. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/settings/consent.ts +0 -0
  320. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/settings/email.ts +0 -0
  321. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/settings/keys.ts +0 -0
  322. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/autofocus.ts +0 -0
  323. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/base.ts +0 -0
  324. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/catalog.json +0 -0
  325. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/chart.ts +0 -0
  326. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/core.ts +0 -0
  327. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/dateparse.ts +0 -0
  328. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/doc.ts +0 -0
  329. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/draglist.ts +0 -0
  330. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/explain.ts +0 -0
  331. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/fields.ts +0 -0
  332. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/fold.ts +0 -0
  333. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/icon-data.ts +0 -0
  334. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/index.ts +0 -0
  335. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/inline.ts +0 -0
  336. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/kinds.ts +0 -0
  337. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/layers.ts +0 -0
  338. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/library.ts +0 -0
  339. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/list.ts +0 -0
  340. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/money.ts +0 -0
  341. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/pickers.ts +0 -0
  342. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/shortcuts.ts +0 -0
  343. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/split.ts +0 -0
  344. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/styles.css +0 -0
  345. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/theme.ts +0 -0
  346. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/time.ts +0 -0
  347. {evlet-0.4.1 → evlet-0.4.2}/frontend/src/evlet/ui/tooltip.ts +0 -0
  348. {evlet-0.4.1 → evlet-0.4.2}/frontend/tsconfig.json +0 -0
  349. {evlet-0.4.1 → evlet-0.4.2}/frontend/vite.config.js +0 -0
  350. {evlet-0.4.1 → evlet-0.4.2}/setup.cfg +0 -0
@@ -4,6 +4,118 @@ Evlet is pre-1.0 and not production ready. From 0.3, a public name or argument t
4
4
  removed or changed keeps working with a `DeprecationWarning` for at least one minor release
5
5
  first ([docs/api-stability.md](docs/api-stability.md)). The notes below say what to change.
6
6
 
7
+ ## 0.4.2 (11-11-2026)
8
+
9
+ ### Added
10
+
11
+ - **`CreateModel(Model, if_missing=True)`** adopts a table made before the app used migrations.
12
+ When the table exists it is checked against the frozen class and kept with its rows; a
13
+ difference fails the batch naming it. A plain `CreateModel` of an existing table now says to
14
+ use the option. See [Adopting a table made before migrations](docs/model-engine.md#adopting-a-table-made-before-migrations).
15
+ - **`AlterField` can change `required`.** Making a field optional always works. Making it
16
+ required checks every row and fails naming the first empty one, unless `fill=` gives a value
17
+ for them. Works on SQLite (in place, inside the migration transaction) and PostgreSQL. See
18
+ [Making a field required or optional](docs/model-engine.md#making-a-field-required-or-optional).
19
+ - **`column=False` on a field.** It leaves the field out of a list's default columns and a
20
+ Table grid's default columns, while the form and row editor still show it and the grid's
21
+ Columns menu can show it again. Use it for a currency source: the amounts keep showing in its
22
+ currency, because the value still travels with each record. Display only, like `copy=`.
23
+ - **The record form previews `derive()` values while you edit.** A model with `Meta.derives`
24
+ lists them in its schema (`derives`). When the person pauses for 600 ms, the form sends the
25
+ draft to `POST /api/_draft/{model}` and shows the derived fields, row values and derived
26
+ Table rows, without making them unsaved changes. Stale answers are dropped. Models without
27
+ `Meta.derives` never ask.
28
+ - **System moves.** `Move(..., system=True)` declares a state change only the application makes,
29
+ such as one a background job takes. It has no roles, is never offered (no button, not in `_moves`
30
+ or the schema's `state.moves`), and every HTTP caller, API key, AI assistant, the connector and
31
+ Eva included, gets 403 `<label> is made by the application only`. Trusted Python makes it with
32
+ `context.move()` under all its other checks: update permission, row scope, guard, `run` method,
33
+ validation, the Journal and the one transaction. A move with `roles=()` now fails with a pointer
34
+ to `system=True` ([docs/states-actions.md](docs/states-actions.md#system-moves)).
35
+ - **A business context for jobs.** `job.business(tx)` in a job handler returns a document context
36
+ in the job's transaction, acting as the job's user, as `user=<account id>` read again now, or as
37
+ `system="<name>"` with an explicit `role=`. The role's permissions apply; a system's writes are
38
+ recorded under no account and the Journal names it as `via`. Apps no longer need `tx._business`
39
+ ([docs/jobs-realtime.md](docs/jobs-realtime.md#a-jobs-business-context)).
40
+ - **Actions queue jobs that run right after they commit.** `self.context.enqueue(task, payload)`
41
+ is now documented for actions: the job is queued only if the action commits, and the worker of
42
+ `evlet serve` is woken at once instead of at its next pass. An action that returns the receipt
43
+ adds `_job` (`{"id", "state"}`) to its detail. `JobQueue.wake()` and `JobQueue.wait(timeout)`
44
+ serve app workers ([docs/jobs-realtime.md](docs/jobs-realtime.md#queue-a-job-from-an-action)).
45
+ - The Background Playground (`examples/playground/background/app.py`) shows all three.
46
+ - **Built-in System Administrator.** Every instance has the account `administrator` ("System
47
+ Administrator", role admin), created on new databases and by the framework step
48
+ `0008_administrator` in `evlet migrate`. It starts with no password. Its username, name and
49
+ role never change, and it can't be deactivated or deleted on any route. It passes every role
50
+ check (models, rows, fields, actions, Controls) and still meets every data rule. Its profile
51
+ takes only an email address for notifications, which it sets on any instance with its current
52
+ password (audited).
53
+ - `evlet users set-email <instance> <username> <email>` sets a user's email address from the
54
+ server shell, audited as `cli`.
55
+ - **Sign-in rules in config.py.** `Security(password_min=..., admin_two_step=..., two_step=...,
56
+ admin_sign_in=...)`. `password_min` takes 1 to 64; 1 allows any password. `admin_two_step`
57
+ decides two-step sign-in for admins, `two_step` for everyone else. `admin_sign_in` opens the
58
+ sign-in page with the username `administrator` filled in, and `/login?user=NAME` fills in any
59
+ name. New instances get the block in `config.py` with short comments.
60
+ - **First password in the browser.** The development link signs in the Administrator and opens
61
+ "Set your password", then two-step set-up when admins need it. `POST /api/auth/password`
62
+ sets the first password of an account that has none.
63
+ - Controls, Security shows the admin rules from config.py and a switch for two-step sign-in for
64
+ everyone. Controls, Users marks the Administrator as built in and locks its role and status.
65
+
66
+ ### Changed
67
+
68
+ - `Move` takes `system=False`, and its `roles` default is now written `roles=None`, which still
69
+ means admin and editor. `User` gains `system=None`. Apps change nothing.
70
+ - Admin accounts follow config.py only. Controls can change the password minimum and two-step
71
+ sign-in for everyone else in either direction (`security.password_min` 1 to 64, the new
72
+ `security.two_step`, and `security.two_step_roles`, which no longer lists admin).
73
+ - `evlet dev` and `evlet playground` no longer create `admin` or `demo-admin`; links default to
74
+ the Administrator. `evlet serve` prints how to set the Administrator's password instead.
75
+ `evlet setup --host` asks for the Administrator's password only.
76
+ - On new databases the Administrator is account 1, so other accounts start at 2.
77
+
78
+ ### Fixed
79
+
80
+ - **Moves and actions that link a ledger row work over HTTP.** A move `run` method or an
81
+ `@action` that wrote a ledger row and set a Link to it (`document.posting = row.id`) was
82
+ refused with 403 "You do not have permission for this operation", even for an admin,
83
+ because the save checked that Link against the caller's read access and ledger models have
84
+ no surface. Calls through `business.context()` were not affected, so tests missed it.
85
+ - **Record history shows Links properly.** A Link to a ledger row showed "Invalid amount" in
86
+ the record page's Activity: the journal turned its integer id into a text record id, which
87
+ the screen, reading the field as an integer, could not show. The journal now returns the
88
+ plain integer id, as record responses do, and the schema marks such a field
89
+ `"grouping": false` so the id shows without thousands separators. Activity also shows any
90
+ other changed Link as the linked record's title instead of `#id`.
91
+ - **Key cards can show fields `derive()` sets.** `Meta.cards` refused a field named in
92
+ `Meta.derives` as "not derived". Such a field is now a card like a formula's result, with the
93
+ same formatting.
94
+ - **A value `derive()` sets that its field refuses is a field error, never a 500.** A value
95
+ with more decimal places than the field allows, or a fraction for an `Integer`, already
96
+ refused a save with 422, but a preview answered 500 and formulas read the refused value.
97
+ The value is now emptied after its error is noted, so a preview returns the error and
98
+ the save stays a 422 naming the field. On a saved record, the error on a rebuilt derived
99
+ row is keyed by the row id the preview shows. `derive()` still rounds its own values: see
100
+ [Derived values](docs/model-engine.md#derived-values).
101
+ - **A hidden unstored intermediate no longer stops the browser calculating.** On a model with
102
+ `permissions`, a field with `hidden=True, stored=False` and a finite `compute=` that other
103
+ formulas read withheld those formulas and the whole plan, so every calculated value on the
104
+ form stayed blank until a save. When the role can read every input of its formula, the plan
105
+ now ships with it and the browser works out every formula on the row. The intermediate is
106
+ still never named in the schema or in any response.
107
+ - **Writing such a field reports the real error.** A write naming a hidden intermediate, or a
108
+ result that reads it, now fails with `COMPUTED_FIELD_WRITE: this value is calculated`
109
+ instead of "One or more values are invalid".
110
+ - An `@action` that returned a `JobReceipt` put the receipt object in `_outcome`, which could not
111
+ be sent as JSON. It is now `_job`.
112
+
113
+ ### Deprecated
114
+
115
+ - `DevSignIn(create_admin=...)` is ignored with a `DeprecationWarning` and goes in 0.5.
116
+
117
+ See [docs/app-upgrades.md](docs/app-upgrades.md#from-041-to-042) for what to do.
118
+
7
119
  ## 0.4.1 (10-11-2026)
8
120
 
9
121
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evlet
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: A small Python application framework with SQLite and a neutral UI schema
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/evlet-io/evlet
@@ -59,8 +59,9 @@ evlet install notes --instance acme
59
59
  evlet serve acme
60
60
  ```
61
61
 
62
- Then open **http://127.0.0.1:8000** and create your first administrator. There is
63
- no default password. To serve a site on your own domain behind Caddy, see
62
+ Every instance has a built-in **System Administrator** (username `administrator`) with no
63
+ password. `evlet serve` tells you to set one with `evlet users set-password acme administrator`;
64
+ then open **http://127.0.0.1:8000** and sign in. There is no default password. To serve a site on your own domain behind Caddy, see
64
65
  [Serve a site on a domain in one go](docs/cli.md#serve-a-site-on-a-domain-in-one-go).
65
66
 
66
67
  An **app** contains reusable Python code. An **instance** is a site with its own
@@ -118,21 +119,24 @@ evlet docs
118
119
  The Playground uses temporary demo data. Use an instance for records you want to keep. Offline documentation
119
120
  opens at **http://127.0.0.1:8001**.
120
121
 
121
- `evlet playground` prints a sign-in link when it starts:
122
+ `evlet playground` and `evlet dev` print a sign-in link for the built-in Administrator when they start:
122
123
 
123
124
  ```text
124
- Sign in as demo-admin (works once, for 10 minutes):
125
+ The administrator account has no password yet. Open this link to sign in and choose one (works once, for 10 minutes):
125
126
  http://127.0.0.1:8000/_dev/signin?token=...
126
127
  ```
127
128
 
128
- Open it to sign straight in. On an instance with no accounts, `evlet dev` first creates an
129
- admin named `admin` (`--user NAME` picks another name) with a random password that is never
130
- shown; on an empty Playground it is `demo-admin`. Set a real password later with
131
- `evlet users set-password`. Run
132
- `evlet dev-link` in another terminal for a fresh link once the first one is used or
133
- expired. Use `--user NAME` to sign in as someone else, or `--no-link` to skip the
134
- link. Links exist only under `evlet playground` and `evlet dev`, never under
135
- `evlet serve`; see [development sign-in links](docs/cli.md#development-sign-in-links).
129
+ Open it, choose a password on the "Set your password" screen and, when admins need two-step
130
+ sign-in, set up your authenticator app. Once the Administrator has a password the link just
131
+ signs you in. Run `evlet dev-link` in another terminal for a fresh link once the first one is
132
+ used or expired. Use `--user NAME` to sign in as someone else, or `--no-link` to skip the
133
+ link. Links exist only under `evlet playground` and `evlet dev`, never under `evlet serve`;
134
+ see [development sign-in links](docs/cli.md#development-sign-in-links).
135
+
136
+ The sign-in rules live in the instance's `config.py`: `Security(password_min=..., admin_two_step=...,
137
+ two_step=..., admin_sign_in=...)`. `password_min=1` allows any password, which is handy on a
138
+ development instance. Admins always follow config.py; Controls can change the rules for everyone
139
+ else ([controls.md](docs/controls.md#security-rules)).
136
140
 
137
141
  ## Optional capabilities
138
142
 
@@ -30,8 +30,9 @@ evlet install notes --instance acme
30
30
  evlet serve acme
31
31
  ```
32
32
 
33
- Then open **http://127.0.0.1:8000** and create your first administrator. There is
34
- no default password. To serve a site on your own domain behind Caddy, see
33
+ Every instance has a built-in **System Administrator** (username `administrator`) with no
34
+ password. `evlet serve` tells you to set one with `evlet users set-password acme administrator`;
35
+ then open **http://127.0.0.1:8000** and sign in. There is no default password. To serve a site on your own domain behind Caddy, see
35
36
  [Serve a site on a domain in one go](docs/cli.md#serve-a-site-on-a-domain-in-one-go).
36
37
 
37
38
  An **app** contains reusable Python code. An **instance** is a site with its own
@@ -89,21 +90,24 @@ evlet docs
89
90
  The Playground uses temporary demo data. Use an instance for records you want to keep. Offline documentation
90
91
  opens at **http://127.0.0.1:8001**.
91
92
 
92
- `evlet playground` prints a sign-in link when it starts:
93
+ `evlet playground` and `evlet dev` print a sign-in link for the built-in Administrator when they start:
93
94
 
94
95
  ```text
95
- Sign in as demo-admin (works once, for 10 minutes):
96
+ The administrator account has no password yet. Open this link to sign in and choose one (works once, for 10 minutes):
96
97
  http://127.0.0.1:8000/_dev/signin?token=...
97
98
  ```
98
99
 
99
- Open it to sign straight in. On an instance with no accounts, `evlet dev` first creates an
100
- admin named `admin` (`--user NAME` picks another name) with a random password that is never
101
- shown; on an empty Playground it is `demo-admin`. Set a real password later with
102
- `evlet users set-password`. Run
103
- `evlet dev-link` in another terminal for a fresh link once the first one is used or
104
- expired. Use `--user NAME` to sign in as someone else, or `--no-link` to skip the
105
- link. Links exist only under `evlet playground` and `evlet dev`, never under
106
- `evlet serve`; see [development sign-in links](docs/cli.md#development-sign-in-links).
100
+ Open it, choose a password on the "Set your password" screen and, when admins need two-step
101
+ sign-in, set up your authenticator app. Once the Administrator has a password the link just
102
+ signs you in. Run `evlet dev-link` in another terminal for a fresh link once the first one is
103
+ used or expired. Use `--user NAME` to sign in as someone else, or `--no-link` to skip the
104
+ link. Links exist only under `evlet playground` and `evlet dev`, never under `evlet serve`;
105
+ see [development sign-in links](docs/cli.md#development-sign-in-links).
106
+
107
+ The sign-in rules live in the instance's `config.py`: `Security(password_min=..., admin_two_step=...,
108
+ two_step=..., admin_sign_in=...)`. `password_min=1` allows any password, which is handy on a
109
+ development instance. Admins always follow config.py; Controls can change the rules for everyone
110
+ else ([controls.md](docs/controls.md#security-rules)).
107
111
 
108
112
  ## Optional capabilities
109
113
 
@@ -46,7 +46,7 @@ production ready, but the rules below hold from 0.3 on.
46
46
  and `Context.unlocked_periods(reason)` are public for trusted code
47
47
  ([model-engine.md](model-engine.md#closed-periods)).
48
48
 
49
- - **Compact record pages.** `Meta.cards` (zero to five derived fields or per-record measures),
49
+ - **Compact record pages.** `Meta.cards` (zero to five derived fields, including those `derive()` sets, or per-record measures),
50
50
  `Main(fields, *tables)` as the first block of `Meta.layout`, `Section(..., description=None)`, and
51
51
  the schema keys they add: `cards` on a model entry, `"compact": true` on `record_layout`,
52
52
  `"main": true` on the Main blocks and layout section, and `description` on a layout section
@@ -140,6 +140,16 @@ production ready, but the rules below hold from 0.3 on.
140
140
  done), `progress` in `GET /api/_jobs/<id>`, and `evlet jobs list`
141
141
  ([jobs-realtime.md](jobs-realtime.md#progress-and-long-jobs)).
142
142
 
143
+ - **System moves and jobs that act.** `Move(..., system=True)` (a boolean; refused together with
144
+ `roles=`), its 403 `<label> is made by the application only` to every HTTP caller and its absence
145
+ from `_moves` and the schema's `state.moves`
146
+ ([states-actions.md](states-actions.md#system-moves)).
147
+ `JobContext.business(tx, *, user=None, system=None, role=None)` with the identities and checks
148
+ in [jobs-realtime.md](jobs-realtime.md#a-jobs-business-context), `User.system`, the Journal's
149
+ `via` for a system name, `Context.enqueue(task, payload, *, key=None, target=None)` queuing after
150
+ commit, `_job` on an action's detail, and `JobQueue.wake()` and `JobQueue.wait(timeout)`
151
+ ([jobs-realtime.md](jobs-realtime.md#queue-a-job-from-an-action)).
152
+
143
153
  - **Workspaces.** `Workspace`, `NavGroup` and `Shortcut` with their arguments, discovery of an app
144
154
  package's `workspaces.py`, `Application(workspaces=...)` and `AppDefinition(workspaces=...)`, the
145
155
  key scheme, and the `workspaces` entry of `/api/schema` with its item kinds (`model`, `report`,
@@ -97,6 +97,35 @@ first applies the steps and the others find them applied. Do not keep data you c
97
97
  Main uses a development version between releases; a source build is not the same
98
98
  artifact as the last PyPI release.
99
99
 
100
+ ### From 0.4.1 to 0.4.2
101
+
102
+ 0.4.2 adds the built-in System Administrator and new sign-in rules in config.py. Apps keep
103
+ their `evlet>=0.4.0,<0.5` dependency.
104
+
105
+ - Run `evlet migrate` for each instance before you serve it. It applies `0008_administrator`,
106
+ which adds the account `administrator` (full name "System Administrator", role admin) with no
107
+ password. If an account named `administrator` already exists, the step stops and changes
108
+ nothing: rename that account in the database first. Set the password with
109
+ `evlet users set-password <instance> administrator` when you need it. Existing admins, such as
110
+ `admin` or `demo-admin`, stay as they are.
111
+ - On new databases the Administrator is account 1, so the first account you create is 2. Tests
112
+ that assume the first person they set up has id 1 (an `owner` value, an `actor`, a
113
+ `User(1, ...)` checked against the database) look ids up by username instead.
114
+ - The Administrator passes every role check. An app that limits the admin role on a model with
115
+ `permissions = {"admin": Rule(...)}` still limits other admins, not the Administrator.
116
+ - Admins now follow config.py only: `Security(password_min=...)` and
117
+ `Security(admin_two_step=...)`. Controls can change the password minimum and two-step sign-in
118
+ for everyone else, in either direction, and `password_min` takes 1 to 64. A Controls list of
119
+ two-step roles saved before that names admin keeps working without it; admins still need
120
+ two-step sign-in because `admin_two_step` is on by default.
121
+ - `evlet dev` and `evlet playground` no longer create `admin` or `demo-admin`. Their link signs
122
+ in the Administrator, which chooses its password on first use. `DevSignIn(create_admin=...)`
123
+ is ignored with a `DeprecationWarning` and goes in 0.5.
124
+ - Give the Administrator an email address for notifications in Settings, Profile (any
125
+ instance, with its password) or with `evlet users set-email <instance> administrator <email>`.
126
+ - `evlet setup --host` asks only for the Administrator's password, and `evlet serve` says how to
127
+ set it while it has none.
128
+
100
129
  ### From 0.3 to 0.4
101
130
 
102
131
  Evlet 0.4 stores money at 6 places, removes record tabs and removes code the browser never
@@ -316,7 +316,12 @@ approved) for the stage bar, or `show="none"`. `Meta.status = "<field>"` shows a
316
316
  system sets, such as a calculated payment status, as a badge that is never edited from the
317
317
  header ([states-actions.md](states-actions.md#how-a-state-and-a-status-show)). The list offers a
318
318
  board, one column per state, only when `Meta.board` names the State field, such as
319
- `board = "stage"`; any other field fails registration.
319
+ `board = "stage"`; any other field fails registration. A move only the application makes,
320
+ such as one a background job takes, is declared `Move(..., system=True)`: it has no roles, no
321
+ caller can make it, and trusted Python makes it with `context.move()`
322
+ ([states-actions.md](states-actions.md#system-moves)). A job gets that context with
323
+ `job.business(tx, ...)`, and an action queues a job with `self.context.enqueue(...)`
324
+ ([jobs-realtime.md](jobs-realtime.md#a-jobs-business-context)).
320
325
 
321
326
  The Playground's invoice shows this: `payment_status` is calculated from `amount_paid` against
322
327
  `total` (Unpaid, Partly paid, Paid), named by `Meta.status` and coloured by `colors`. Nobody
@@ -51,8 +51,8 @@ The steps run in this order, each through the code of its own command:
51
51
  4. `--instance` creates the instance, as `evlet instance NAME` does.
52
52
  5. One `evlet install` installs every app with its dependencies in order. It asks
53
53
  once whether you trust them and writes one backup.
54
- 6. `--dev` starts `evlet dev` on 127.0.0.1, which creates the first admin and prints
55
- a one-time sign-in link. `--host` prepares a public site
54
+ 6. `--dev` starts `evlet dev` on 127.0.0.1, which prints a one-time sign-in link for
55
+ the built-in Administrator. `--host` prepares a public site
56
56
  ([below](#serve-a-site-on-a-domain-in-one-go)). With neither, it stops after
57
57
  installing and prints the command that starts the site.
58
58
 
@@ -100,6 +100,7 @@ evlet link-user acme buyer customer 42
100
100
  evlet controls grant acme mariam
101
101
  evlet users reset-two-step acme mariam
102
102
  evlet users set-password acme mariam
103
+ evlet users set-email acme administrator ops@example.com
103
104
  evlet secrets rotate acme
104
105
  evlet playground --port 8000
105
106
  evlet docs --port 8001
@@ -110,7 +111,7 @@ evlet docs --port 8001
110
111
  shadowed by files there; run it with `python -P -m evlet` (or set
111
112
  `PYTHONSAFEPATH=1`) when working inside an app folder. Project commands that
112
113
  delegate to `.venv` already use `-P`. The original `new` command keeps its
113
- existing contract. `evlet controls grant` makes a user an active admin from the server shell when nobody can open Controls ([controls.md](controls.md)). `evlet users set-password <instance> <username>` asks twice for a new password (no echo, never printed), applies the instance's `security.password_min` and the normal password rules, ends the user's sessions, AI assistants and API keys, and is audited as `cli`. `evlet users reset-two-step` clears a user's two-step sign-in so they set it up again ([settings.md](settings.md#set-up-at-sign-in-trust-on-first-use)). `evlet secrets rotate` re-encrypts connector secrets, mailbox sign-ins, two-step secrets and backup codes under a new `secret.key` ([controls.md](controls.md)). `login`, `logout`, `describe` and `mcp` are the connector
114
+ existing contract. `evlet controls grant` makes a user an active admin from the server shell when nobody can open Controls ([controls.md](controls.md)). `evlet users set-password <instance> <username>` asks twice for a new password (no echo, never printed), applies the password minimum (config.py's `Security(password_min=...)` for admins, the Controls setting for everyone else) and the normal password rules, ends the user's sessions, AI assistants and API keys, and is audited as `cli`. `evlet users set-email <instance> <username> <email>` checks the address, sets it as the user's email for notifications and is audited as `cli`; use it to give the Administrator an address or to recover one. `evlet users reset-two-step` clears a user's two-step sign-in so they set it up again ([settings.md](settings.md#set-up-at-sign-in-trust-on-first-use)). `evlet secrets rotate` re-encrypts connector secrets, mailbox sign-ins, two-step secrets and backup codes under a new `secret.key` ([controls.md](controls.md)). `login`, `logout`, `describe` and `mcp` are the connector
114
115
  commands described in the [connector guide](connector.md). Each one shows its
115
116
  options with `--help`, for example `evlet login --help`.
116
117
  `evlet dev` selects the sole instance in a project. With several instances it
@@ -148,31 +149,33 @@ that process. No worker is mandatory.
148
149
  `bench browse --user` in Frappe:
149
150
 
150
151
  ```text
151
- Sign in as mariam (works once, for 10 minutes):
152
+ The administrator account has no password yet. Open this link to sign in and choose one (works once, for 10 minutes):
152
153
  http://127.0.0.1:8000/_dev/signin?token=...
153
154
  ```
154
155
 
155
- Open the link and you are signed in, then sent to `/`. `evlet dev` prints a new
156
- link each time it reloads. Run `evlet dev-link` from
156
+ Every instance has the built-in System Administrator (`administrator`), with no password at
157
+ first ([controls.md](controls.md#the-administrator)). The first link signs it in and opens a
158
+ "Set your password" screen that follows config.py's admin minimum. When admins need two-step
159
+ sign-in (`Security(admin_two_step=True)`, the default), that session then ends and the
160
+ authenticator set-up follows, as at a normal sign-in; finishing it opens the app. Later starts
161
+ print `Sign in as administrator (works once, for 10 minutes): ...` and the link signs straight
162
+ in, sent to `/`. The sign-in page never offers a "Sign in as administrator" button: the link is
163
+ only printed in the terminal of the person who started the server.
164
+
165
+ `evlet dev` prints a new link each time it reloads. Run `evlet dev-link` from
157
166
  another terminal for a fresh link when the first is used or expired. Inside a
158
167
  project it serves the project's instance (`--instance` picks one, `--port` matches
159
168
  `evlet dev --port`). Outside a project, or with `--playground`, it finds the running
160
169
  `evlet playground` (`--port` picks one when several run).
161
170
 
162
171
  - The link signs in the user named by `--user NAME`. Without it, the link uses
163
- the only active admin, or the only active user. With several, pass `--user`.
164
- - On an instance with no accounts, `evlet dev` creates an active admin named
165
- `admin` (or the name given with `--user NAME`, checked by the normal account
166
- name rules) and prints its link: `No accounts yet. Created admin "admin" (no
167
- password set). Sign in (works once, for 10 minutes): ...`. The password is
168
- random and strong, is never printed or logged, and no one knows it. The audit
169
- log records the account as created by `cli`. A Playground with no accounts
170
- does the same with `demo-admin`. To sign in later without a link, set a real
171
- password from the server shell with `evlet users set-password`.
172
- - `evlet dev-link` never creates accounts. On an instance with no accounts it
173
- tells you to start `evlet dev`.
174
- - `--no-link` on `evlet dev` or `evlet playground` skips the startup link and the
175
- account creation. The browser setup page then asks for the first admin.
172
+ the built-in Administrator.
173
+ - Nothing creates accounts any more: the instance has the Administrator from the start.
174
+ Instances that already have other admins (such as `admin` or `demo-admin` from 0.4.1 and
175
+ earlier) keep them unchanged.
176
+ - `--no-link` on `evlet dev` or `evlet playground` skips the startup link. The browser setup
177
+ page then asks for the first admin; choosing the username `administrator` there gives the
178
+ Administrator its password.
176
179
  - The app itself serves `/_dev/signin` on the same host and port. The route exists
177
180
  only under `evlet dev` and `evlet playground`. `evlet serve`, tenant applications
178
181
  and deployments answer 404.
@@ -184,7 +187,8 @@ project it serves the project's instance (`--instance` picks one, `--port` match
184
187
  usual cookie (HttpOnly, SameSite=Strict), CSRF token and session length. The
185
188
  audit log records it as "Signed in with a development link".
186
189
  - The session counts as a finished two-step sign-in. Only someone with this
187
- instance's files can make a link, which is as strong as a second step.
190
+ instance's files can make a link, which is as strong as a second step. The first password
191
+ is the exception above: the account then sets up two-step sign-in when its role needs it.
188
192
  - Every account, tenant, row, field and action check still applies to the user.
189
193
  - Passwords are never printed. The token is printed because it is single-use,
190
194
  local and short-lived.
@@ -380,10 +384,23 @@ is set. See [routing.md](routing.md).
380
384
  Behind a reverse proxy, set `trusted_proxies=("127.0.0.1", "::1")` (addresses or
381
385
  CIDR ranges) so client addresses come from `X-Forwarded-For`. It is empty by default.
382
386
 
383
- Next to `instance`, config.py may set the sign-in rules the instance starts from:
384
- `security = Security(session_hours=8, lockout=4, password_min=16)`. Session length is 1 to
385
- 168 hours (12 by default), the lockout 3 to 50 failed sign-ins (5) and the minimum password
386
- length 15 to 64 (15). Controls can only make them stricter ([controls.md](controls.md#overrides)).
387
+ Next to `instance`, config.py sets the sign-in rules. `evlet instance` writes them with their defaults and a
388
+ short comment:
389
+
390
+ ```python
391
+ security = Security(password_min=15, admin_two_step=True, two_step=False, admin_sign_in=False)
392
+ ```
393
+
394
+ - `password_min`: 1 to 64 characters (15). 1 means no rule: even "1" is a password.
395
+ - `admin_two_step`: admins, the built-in Administrator too, must use two-step sign-in (on).
396
+ - `two_step`: everyone else must use it too (off). Controls can turn it on or off.
397
+ - `admin_sign_in`: the sign-in page opens with the username `administrator` filled in (off).
398
+ - `session_hours` 1 to 168 (12) and `lockout` 3 to 50 failed sign-ins (5).
399
+
400
+ Admins always follow config.py. Controls can change the password minimum and two-step sign-in
401
+ for everyone else in either direction, and can only shorten sessions and the lockout
402
+ ([controls.md](controls.md#security-rules)). A `config.py` from 0.4.1 or earlier without
403
+ `security` keeps the defaults.
387
404
 
388
405
  `database` and `storage` are reserved and optional. They default to `"sqlite"` and
389
406
  `"local"`, the only values accepted today. New `config.py` files leave them out.
@@ -395,6 +412,10 @@ PostgreSQL instance creation is intentionally rejected until its isolation strat
395
412
  is specified. Do not point the new installer at an existing unmanaged database.
396
413
  It will reject it rather than adopt it. Existing Playground data stays in place.
397
414
 
415
+ `evlet serve` never prints sign-in links. While the built-in Administrator has no password
416
+ it prints `The built-in Administrator has no password yet. Set one with: evlet users set-password
417
+ acme administrator` at start.
418
+
398
419
  For a conventional deployment, provision the administrator locally first, then
399
420
  set `domain="app.example.com"`. This selects that exact HTTPS origin, secure
400
421
  cookies and disables browser administrator setup. Terminate TLS with a reverse
@@ -411,10 +432,10 @@ evlet setup myproject --app notes --instance acme --host erp.example.com
411
432
  Run it on the Linux server as the user that will run the service, not as root.
412
433
  After installing the apps it:
413
434
 
414
- 1. Asks in the terminal for the first administrator's username and password
415
- (twice, not shown). A site on a domain cannot create its administrator in the
416
- browser, so this happens here, with the instance's password rules. It is audited
417
- as `cli` and skipped when the instance already has accounts.
435
+ 1. Asks in the terminal for a password for the built-in Administrator (twice, not
436
+ shown). A site on a domain cannot set its first password in the browser, so this
437
+ happens here, with the admin password rule from config.py. It is audited as `cli` and
438
+ skipped when an account can already sign in.
418
439
  2. Sets `domain="erp.example.com"` and `trusted_proxies=("127.0.0.1", "::1")` in
419
440
  `instances/acme/config.py`. If you edited that file, it stops and asks you to set
420
441
  the domain yourself.
@@ -534,7 +555,9 @@ stopped. For several customers routed by Host, see
534
555
 
535
556
  Each app supplies its complete ordered history of existing `Migration` objects.
536
557
  Use `CreateModel` for new app models and the existing explicit operations for
537
- schema changes. Keep published migration schemas frozen. The generated initial
558
+ schema changes. For a model whose table existed before the app adopted migrations, use
559
+ `CreateModel(Model, if_missing=True)`, which checks and keeps the existing table
560
+ ([model-engine.md](model-engine.md#adopting-a-table-made-before-migrations)). Keep published migration schemas frozen. The generated initial
538
561
  legacy migration contains a frozen copy of its starter model, separate from the live
539
562
  model definition. The installer prefixes migration
540
563
  names with the app identity and preserves the combined database's applied order.
@@ -6,8 +6,8 @@ Permissions, Security, Connectors, Email, MCP & AI, API keys, Apps, Models, Nami
6
6
 
7
7
  The Overview lists what needs attention: an app waiting to be migrated or a server that still
8
8
  runs the old version, overrides that no longer apply (and what fails closed meanwhile), skipped
9
- naming series, connectors and email accounts whose last test failed, screen extensions that no longer fit a form layout, failed jobs, and roles in
10
- `security.two_step_roles` that can't use two-step sign-in because the `cryptography` package is
9
+ naming series, connectors and email accounts whose last test failed, screen extensions that no longer fit a form layout, failed jobs, and roles that
10
+ must use two-step sign-in but can't because the `cryptography` package is
11
11
  missing or the secret key file is refused. An application without a secret key (not an instance)
12
12
  has no two-step sign-in, and nothing is listed for it.
13
13
 
@@ -19,6 +19,8 @@ has no two-step sign-in, and nothing is listed for it.
19
19
  the instance accepts counts as primary, except sub-hosts. So each tenant of a
20
20
  `TenantApplication` manages its own users on its own host, in its own database.
21
21
  - Only desk roles open Controls. Portal roles never do, whatever their settings.
22
+ - Every instance has the built-in **System Administrator** (username `administrator`, role
23
+ admin), like the Administrator in ERPNext. See [The Administrator](#the-administrator).
22
24
  - Open to roles with "Opens Controls" on. `admin` always has it; it can't be turned off.
23
25
  - Opening Controls is not the same as being admin. Only admins can give or remove the admin
24
26
  role, change admin accounts (role, active, password, sessions), add admin users, create or
@@ -35,8 +37,8 @@ has no two-step sign-in, and nothing is listed for it.
35
37
  peer on its own with its `trusted_proxies=(...)` line, to add only if that address is your
36
38
  reverse proxy; the header stays ignored until then.
37
39
  - `ControlsAccess(require_two_step=True)` opens Controls only to sessions that finished two-step
38
- sign-in; others get a message that sends them to Settings and back through sign-in. Roles in
39
- `security.two_step_roles` need such a session too, when the instance can keep secrets: they
40
+ sign-in; others get a message that sends them to Settings and back through sign-in. Roles that
41
+ must use two-step sign-in (see [Security](#security-rules)) need such a session too, when the instance can keep secrets: they
40
42
  can't use anything until two-step sign-in is set up (see [settings.md](settings.md#when-the-code-is-asked)).
41
43
  - **Changes ask for a fresh code.** For a person with two-step sign-in on, every request that
42
44
  changes something in Controls (any `POST`, `PUT`, `PATCH` or `DELETE` under `/api/_controls/`,
@@ -61,6 +63,42 @@ has no two-step sign-in, and nothing is listed for it.
61
63
  there limits the networks, the command says so and you edit `routes.py`.
62
64
  - Saving allowed networks that leave out your own address asks first.
63
65
 
66
+ ### The Administrator
67
+
68
+ Every instance has one account it creates itself: username `administrator`, full name
69
+ "System Administrator", role admin, marked `builtin` in `evlet_users`. New databases get it at
70
+ startup. Older ones get it from the framework step `0008_administrator`, which `evlet migrate`
71
+ runs; if another account already uses the username `administrator`, the step stops with a
72
+ message and changes nothing, so rename that account first.
73
+
74
+ - It starts with **no password**, so nobody can sign in as it until one is set: through the
75
+ development sign-in link and the "Set your password" screen ([cli.md](cli.md#development-sign-in-links)),
76
+ with `evlet users set-password <instance> administrator`, by an admin in Controls, or on first-run
77
+ setup in the browser by choosing `administrator` as the username.
78
+ - Its username, full name and role never change, and it can't be deactivated or deleted. Every
79
+ route refuses with 409 "The Administrator account is built in...": Controls Users, the older
80
+ `/api/auth/users` routes and the profile (`/api/_settings/me/profile` and the photo answer 409
81
+ "The Administrator profile is fixed..."). Connectors and MCP clients use the same routes.
82
+ A change made in the database directly is put back at the next start.
83
+ - It may add **one email address** for notifications, on any instance, `evlet serve` included:
84
+ Settings, Profile asks for its current password (and a code when two-step sign-in is on),
85
+ checks the address and saves it at once, with an audit row. Mentions and other notifications
86
+ use it. Other people keep the usual rule (a confirmation link, development only). From the
87
+ server shell, `evlet users set-email <instance> <username> <email>` sets anyone's address,
88
+ audited as `cli`. Its password, two-step sign-in,
89
+ sessions and personal preferences work as for anyone. Sign-in lockout applies too;
90
+ `evlet users set-password` and `evlet users reset-two-step` recover it.
91
+ - **Unlimited control.** It passes every role check: every model, row and field whatever the
92
+ admin rules in the app files say, every action, move, report, print design and slip, and every
93
+ Controls page. It does not skip data rules: validation, read-only fields, state rules, period
94
+ locks, foreign keys and transactions apply, its requests go through the normal authenticated
95
+ routes and the audit log names it. API keys it creates still narrow it, and the Controls
96
+ allowlist still applies.
97
+ - It belongs to its instance's database. Each tenant of a `TenantApplication` has its own,
98
+ which can't sign in to another tenant, like any other account.
99
+ - With two or more admins, the "only active admin" rule counts admins who can sign in: the
100
+ Administrator counts once it has a password.
101
+
64
102
  ### Ending access
65
103
 
66
104
  Every revocation goes through one function, `LocalAuth.end_sessions(connection, user_id, *,
@@ -118,8 +156,9 @@ that users still have can't be deleted; deleting one removes its permission over
118
156
  ## Overrides
119
157
 
120
158
  Overrides are stored in `evlet_overrides(kind, key, value)` and never change app files.
121
- They can only make a rule stricter than the app files. Instance fields are the exception, since
122
- Controls owns them: see [Permissions](#overrides) below. Saving sends every change at once
159
+ They can only make a rule stricter than the app files. Instance fields are an exception, since
160
+ Controls owns them: see [Permissions](#overrides) below. The password minimum and two-step sign-in
161
+ for people other than admins are another: they go either way ([Security](#security-rules)). Saving sends every change at once
123
162
  (`POST /api/_controls/overrides`, `{"changes": [{kind, key, value}]}`, `null` resets); one
124
163
  invalid change saves none, and the reply names each invalid item as `changes.<index>`.
125
164
  A value equal to the file value is removed instead of stored. A stored override that no
@@ -159,27 +198,39 @@ no customer links sees no records. Link users with `evlet link-user` or
159
198
  fields and Links lead to the hierarchy model
160
199
  ([business-capabilities.md](business-capabilities.md#team-and-hierarchy-scopes)).
161
200
 
162
- **Security** (kind `setting`). The file value of the first three comes from the instance's
163
- `config.py`, beside `instance = Instance(...)`, or from `LocalAuth(security=...)` in an application
164
- built by hand:
201
+ <a id="security-rules"></a>**Security** (kind `setting`). The sign-in rules start from the instance's `config.py`, beside
202
+ `instance = Instance(...)`, or from `LocalAuth(security=...)` in an application built by hand:
165
203
 
166
204
  ```python
167
205
  from evlet import Instance, Security
168
206
 
169
207
  instance = Instance(name="acme", domain="erp.acme.com")
170
- security = Security(session_hours=8, lockout=4, password_min=16)
208
+ security = Security(password_min=8, admin_two_step=True, two_step=False, admin_sign_in=False,
209
+ session_hours=8, lockout=4)
171
210
  ```
172
211
 
173
- `Security` checks its values: `session_hours` 1 to 168, `lockout` 3 to 50 and `password_min` 15
174
- to 64. Left out, they are 12 hours, 5 and 15. Controls can only make them stricter than the
175
- config value. Change config.py and restart to loosen one.
212
+ | Option | Default | What it does |
213
+ |---|---|---|
214
+ | `password_min` | 15 | 1 to 64 characters. 1 means no rule: "1" is a valid password. |
215
+ | `admin_two_step` | `True` | Admin accounts, the Administrator too, must use two-step sign-in. Only config.py decides this. |
216
+ | `two_step` | `False` | Everyone else must use two-step sign-in. Controls can turn it on or off. |
217
+ | `admin_sign_in` | `False` | The sign-in page opens with the username `administrator` filled in, so you type only the password (and a code when needed). |
218
+ | `session_hours` | 12 | 1 to 168. |
219
+ | `lockout` | 5 | 3 to 50. |
220
+
221
+ **Admins follow config.py only.** An account with the admin role always uses config.py's
222
+ `password_min` and `admin_two_step`; Controls can't change them. Change config.py and restart.
223
+ **Everyone else** starts from the same values, and Controls can change their password minimum and
224
+ two-step sign-in in either direction. Session length and lockout can only be made stricter.
225
+ Controls > Security shows the admin rules read-only above the settings it can change.
176
226
 
177
227
  | Key | File value | Rule |
178
228
  |---|---|---|
179
- | `security.password_min` | 15, or `Security(password_min=...)` | Up only, 64 at most. Applies to new passwords. |
229
+ | `security.password_min` | 15, or `Security(password_min=...)` | 1 to 64, either direction, for everyone but admins. Applies to new passwords. |
230
+ | `security.two_step` | `False`, or `Security(two_step=...)` | On or off, for everyone but admins. |
180
231
  | `security.session_hours` | 12, or `Security(session_hours=...)` | Down only, 1 at least. Sets the session and cookie length in every realm. Lowering it ends sessions already older than the new length, desk and portal alike. |
181
232
  | `security.lockout` | 5, or `Security(lockout=...)` | Down only, 3 at least. Failed sign-ins per network and account, and wrong current passwords per account in Settings. |
182
- | `security.two_step_roles` | `["admin"]` | Admin stays. These roles must use two-step sign-in ([settings.md](settings.md#two-step-sign-in)) when the instance can keep secrets: people who have not set it up do so at their next sign-in (trust on first use), and Controls needs a verified session. |
233
+ | `security.two_step_roles` | `[]` | Desk roles other than admin that must use two-step sign-in even with `security.two_step` off. A list saved before 0.4.2 that names admin keeps working; admin is dropped from it, since config.py decides for admin. These roles must use two-step sign-in ([settings.md](settings.md#two-step-sign-in)) when the instance can keep secrets: people who have not set it up do so at their next sign-in (trust on first use), and Controls needs a verified session. |
183
234
  | `security.controls_ips` | `[]` | IP addresses and ranges. |
184
235
 
185
236
  ## Models
@@ -469,7 +520,7 @@ they are removed on the Models page.
469
520
  |---|---|---|
470
521
  | `perm` | `apps/<app>/<package>/permissions.py` | `rules = {("editor", Lead): Rule(operations=..., read_fields=..., write_fields=..., scope=...)}`. The `own_customer` preset is written as the public `own_customer()`, or `own_customer(field='id')` on the customer model |
471
522
  | `field`, `custom`, `naming`, `layout`, `list` | The file that declares the model, such as `apps/notes/models/item.py` | The field lines as models.py writes them, with the changes merged in, and the `Meta` options: `naming = Naming(...)`, `layout = (Section(...), ...)` with `tabs` and `default_tab`, and `list_fields`, `open_in`, `list_tabs` and `list_tab`. Pasted into the model, they reproduce the layout and list overrides. A model with a [record layout](ui.md#record-layouts) gets its whole `layout = (Tab(...), ...)`, with the Controls sections in place. Field widths (set by the field type) and a list's page size and sort have no `Meta` form, so they are comments. Instance fields keep their `x_` name; rename them while moving them, since apps can't declare `x_` names. Hidden options are a comment. Arguments set in code, such as a callable default or validator, are written as `...` with a comment to copy them from models.py, so the code always compiles. |
472
- | `setting` | `instances/<name>/routes.py` or `config.py`, or the app's `hooks.py` | `ControlsAccess(allow_ips=...)` for `security.controls_ips`; `security = Security(...)` for session length, lockout and minimum password length, which config.py reads (the block keeps what config.py sets today with the overrides on top; restart, then reset the overrides); `two_step_roles = (...)` for `security.two_step_roles`, `assistants = {'mcp.rate': 30, ...}` for `mcp.*` and `mail = {'mail.personal': True}`, with their full keys. config.py does not read those three yet, as each block's comment says. A paused schedule is a comment beside the app's schedules |
523
+ | `setting` | `instances/<name>/routes.py` or `config.py`, or the app's `hooks.py` | `ControlsAccess(allow_ips=...)` for `security.controls_ips`; `security = Security(...)` for session length, lockout, minimum password length and `two_step`, which config.py reads (in config.py `password_min` applies to admins too, as the block's comment says) (the block keeps what config.py sets today with the overrides on top; restart, then reset the overrides); `two_step_roles = (...)` for `security.two_step_roles`, `assistants = {'mcp.rate': 30, ...}` for `mcp.*` and `mail = {'mail.personal': True}`, with their full keys. config.py does not read those three yet, as each block's comment says. A paused schedule is a comment beside the app's schedules |
473
524
 
474
525
  Paste the code, deploy, then reset the overrides. Overrides that no longer apply are left out.
475
526