zrb 1.0.0a11__tar.gz → 1.0.0a13__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 (207) hide show
  1. {zrb-1.0.0a11 → zrb-1.0.0a13}/PKG-INFO +1 -1
  2. {zrb-1.0.0a11 → zrb-1.0.0a13}/pyproject.toml +1 -1
  3. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/__init__.py +2 -0
  4. zrb-1.0.0a13/src/zrb/builtin/project/add/fastapp_template/schema/permission.py +31 -0
  5. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/todo.py +50 -1
  6. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_app.py +27 -15
  7. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/todo.py +57 -2
  8. {zrb-1.0.0a11 → zrb-1.0.0a13}/README.md +0 -0
  9. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/__init__.py +0 -0
  10. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/__main__.py +0 -0
  11. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/attr/__init__.py +0 -0
  12. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/attr/type.py +0 -0
  13. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/base64.py +0 -0
  14. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/git.py +0 -0
  15. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/git_subtree.py +0 -0
  16. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/group.py +0 -0
  17. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/llm/llm_chat.py +0 -0
  18. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/llm/tool/cli.py +0 -0
  19. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/llm/tool/rag.py +0 -0
  20. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/llm/tool/web.py +0 -0
  21. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/md5.py +0 -0
  22. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/__init__.py +0 -0
  23. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/__init__.py +0 -0
  24. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp.py +0 -0
  25. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/.gitignore +0 -0
  26. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/README.md +0 -0
  27. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/__init__.py +0 -0
  28. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/_zrb/config.py +0 -0
  29. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/_zrb/group.py +0 -0
  30. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/_zrb/helper.py +0 -0
  31. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/_zrb/main.py +0 -0
  32. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/_zrb/venv_task.py +0 -0
  33. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/common/__init__.py +0 -0
  34. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/common/app.py +0 -0
  35. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/common/db_engine.py +0 -0
  36. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/common/db_repository.py +0 -0
  37. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/common/error.py +0 -0
  38. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/common/schema.py +0 -0
  39. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/common/usecase.py +0 -0
  40. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/config.py +0 -0
  41. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/main.py +0 -0
  42. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/migrate.py +0 -0
  43. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/__init__.py +0 -0
  44. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/alembic.ini +0 -0
  45. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/api_client.py +0 -0
  46. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/base_client.py +0 -0
  47. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/direct_client.py +0 -0
  48. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/client/factory.py +0 -0
  49. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/README +0 -0
  50. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/env.py +0 -0
  51. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/script.py.mako +0 -0
  52. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration/versions/3093c7336477_add_user_table.py +0 -0
  53. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/migration_metadata.py +0 -0
  54. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/route.py +0 -0
  55. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/__init__.py +0 -0
  56. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/__init__.py +0 -0
  57. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/__init__.py +0 -0
  58. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/db_repository.py +0 -0
  59. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/factory.py +0 -0
  60. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/repository/repository.py +0 -0
  61. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/auth/service/user/usecase.py +0 -0
  62. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/gateway/alembic.ini +0 -0
  63. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/README +0 -0
  64. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/env.py +0 -0
  65. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/script.py.mako +0 -0
  66. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration/versions/.gitkeep +0 -0
  67. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/gateway/migration_metadata.py +0 -0
  68. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/module/gateway/route.py +0 -0
  69. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/requirements.txt +0 -0
  70. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/schema/__init__.py +0 -0
  71. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/schema/role.py +0 -0
  72. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/schema/user.py +0 -0
  73. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/add/fastapp_template/template.env +0 -0
  74. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/create/__init__.py +0 -0
  75. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/create/create.py +0 -0
  76. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/create/project-template/README.md +0 -0
  77. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/project/create/project-template/zrb_init.py +0 -0
  78. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/python.py +0 -0
  79. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/asdf/asdf.py +0 -0
  80. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/asdf/asdf_helper.py +0 -0
  81. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/common_input.py +0 -0
  82. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/latex/ubuntu.py +0 -0
  83. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/tmux/tmux.py +0 -0
  84. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/tmux/tmux_config.sh +0 -0
  85. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/tmux/tmux_helper.py +0 -0
  86. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/setup/ubuntu.py +0 -0
  87. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/shell/__init__.py +0 -0
  88. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/shell/autocomplete/__init__.py +0 -0
  89. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/shell/autocomplete/bash.py +0 -0
  90. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/shell/autocomplete/subcmd.py +0 -0
  91. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/builtin/shell/autocomplete/zsh.py +0 -0
  92. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/callback/__init__.py +0 -0
  93. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/callback/any_callback.py +0 -0
  94. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/callback/callback.py +0 -0
  95. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/cmd/__init__.py +0 -0
  96. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/cmd/cmd_result.py +0 -0
  97. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/cmd/cmd_val.py +0 -0
  98. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/config.py +0 -0
  99. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/content_transformer/__init__.py +0 -0
  100. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/content_transformer/any_content_transformer.py +0 -0
  101. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/content_transformer/content_transformer.py +0 -0
  102. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/context/__init__.py +0 -0
  103. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/context/any_context.py +0 -0
  104. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/context/any_shared_context.py +0 -0
  105. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/context/context.py +0 -0
  106. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/context/shared_context.py +0 -0
  107. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/dot_dict/__init__.py +0 -0
  108. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/dot_dict/dot_dict.py +0 -0
  109. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/env/__init__.py +0 -0
  110. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/env/any_env.py +0 -0
  111. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/env/env.py +0 -0
  112. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/env/env_file.py +0 -0
  113. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/env/env_map.py +0 -0
  114. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/group/__init__.py +0 -0
  115. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/group/any_group.py +0 -0
  116. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/group/group.py +0 -0
  117. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/__init__.py +0 -0
  118. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/any_input.py +0 -0
  119. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/base_input.py +0 -0
  120. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/bool_input.py +0 -0
  121. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/float_input.py +0 -0
  122. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/int_input.py +0 -0
  123. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/option_input.py +0 -0
  124. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/password_input.py +0 -0
  125. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/str_input.py +0 -0
  126. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/input/text_input.py +0 -0
  127. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/__init__.py +0 -0
  128. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/cli.py +0 -0
  129. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/__init__.py +0 -0
  130. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/group_info_ui/__init__.py +0 -0
  131. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/group_info_ui/controller.py +0 -0
  132. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/group_info_ui/partial/group_info.html +0 -0
  133. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/group_info_ui/partial/group_li.html +0 -0
  134. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/group_info_ui/partial/task_info.html +0 -0
  135. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/group_info_ui/partial/task_li.html +0 -0
  136. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/group_info_ui/view.html +0 -0
  137. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/home_page/__init__.py +0 -0
  138. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/home_page/controller.py +0 -0
  139. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/home_page/partial/group_info.html +0 -0
  140. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/home_page/partial/group_li.html +0 -0
  141. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/home_page/partial/task_info.html +0 -0
  142. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/home_page/partial/task_li.html +0 -0
  143. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/home_page/view.html +0 -0
  144. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/static/favicon-32x32.png +0 -0
  145. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/static/pico.min.css +0 -0
  146. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/__init__.py +0 -0
  147. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/controller.py +0 -0
  148. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/partial/common-util.js +0 -0
  149. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/partial/input.html +0 -0
  150. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/partial/main.js +0 -0
  151. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/partial/show-existing-session.js +0 -0
  152. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/partial/visualize-history.js +0 -0
  153. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_controller/task_ui/view.html +0 -0
  154. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/runner/web_util.py +0 -0
  155. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session/__init__.py +0 -0
  156. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session/any_session.py +0 -0
  157. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session/session.py +0 -0
  158. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session_state_log/__init__.py +0 -0
  159. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session_state_log/session_state_log.py +0 -0
  160. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session_state_logger/__init__.py +0 -0
  161. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session_state_logger/any_session_state_logger.py +0 -0
  162. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session_state_logger/default_session_state_logger.py +0 -0
  163. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/session_state_logger/file_session_state_logger.py +0 -0
  164. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/__init__.py +0 -0
  165. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/any_task.py +0 -0
  166. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/base_task.py +0 -0
  167. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/base_trigger.py +0 -0
  168. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/cmd_task.py +0 -0
  169. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/http_check.py +0 -0
  170. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/llm_task.py +0 -0
  171. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/make_task.py +0 -0
  172. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/rsync_task.py +0 -0
  173. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/scaffolder.py +0 -0
  174. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/scheduler.py +0 -0
  175. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/task.py +0 -0
  176. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task/tcp_check.py +0 -0
  177. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task_status/__init__.py +0 -0
  178. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/task_status/task_status.py +0 -0
  179. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/__init__.py +0 -0
  180. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/attr.py +0 -0
  181. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/cli/__init__.py +0 -0
  182. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/cli/style.py +0 -0
  183. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/cli/subcommand.py +0 -0
  184. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/cmd/__init__.py +0 -0
  185. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/cmd/command.py +0 -0
  186. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/cmd/remote.py +0 -0
  187. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/__init__.py +0 -0
  188. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/add_code_to_class.py +0 -0
  189. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/add_code_to_function.py +0 -0
  190. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/add_code_to_method.py +0 -0
  191. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/add_key_to_dict.py +0 -0
  192. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/add_param_to_function_call.py +0 -0
  193. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/add_parent_to_class.py +0 -0
  194. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/codemod/add_property_to_class.py +0 -0
  195. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/cron.py +0 -0
  196. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/git.py +0 -0
  197. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/git_subtree.py +0 -0
  198. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/group.py +0 -0
  199. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/llm/tool.py +0 -0
  200. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/load.py +0 -0
  201. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/run.py +0 -0
  202. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/string/__init__.py +0 -0
  203. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/string/conversion.py +0 -0
  204. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/string/format.py +0 -0
  205. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/util/string/name.py +0 -0
  206. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/xcom/__init__.py +0 -0
  207. {zrb-1.0.0a11 → zrb-1.0.0a13}/src/zrb/xcom/xcom.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zrb
3
- Version: 1.0.0a11
3
+ Version: 1.0.0a13
4
4
  Summary: Your Automation Powerhouse
5
5
  Home-page: https://github.com/state-alchemists/zrb
6
6
  License: AGPL-3.0-or-later
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "zrb"
3
- version = "1.0.0a11"
3
+ version = "1.0.0a13"
4
4
  description = "Your Automation Powerhouse"
5
5
  authors = ["Go Frendi Gunawan <gofrendiasgard@gmail.com>"]
6
6
  license = "AGPL-3.0-or-later"
@@ -26,6 +26,7 @@ from zrb.builtin.todo import (
26
26
  edit_todo,
27
27
  list_todo,
28
28
  log_todo,
29
+ show_todo,
29
30
  )
30
31
 
31
32
  assert create_project
@@ -53,6 +54,7 @@ assert archive_todo
53
54
  assert edit_todo
54
55
  assert complete_todo
55
56
  assert log_todo
57
+ assert show_todo
56
58
  assert setup_ubuntu
57
59
  assert setup_latex_on_ubuntu
58
60
  assert setup_asdf
@@ -0,0 +1,31 @@
1
+ import datetime
2
+
3
+ import ulid
4
+ from sqlmodel import Field, SQLModel
5
+
6
+
7
+ class PermissionBase(SQLModel):
8
+ name: str
9
+
10
+
11
+ class PermissionCreate(PermissionBase):
12
+ description: str
13
+
14
+
15
+ class PermissionUpdate(SQLModel):
16
+ name: str | None = None
17
+ description: str | None = None
18
+
19
+
20
+ class PermissionResponse(PermissionBase):
21
+ id: str
22
+
23
+
24
+ class Permission(SQLModel, table=True):
25
+ id: str = Field(default_factory=lambda: ulid.new().str, primary_key=True)
26
+ created_at: datetime.datetime | None
27
+ created_by: str | None
28
+ updated_at: datetime.datetime | None
29
+ updated_by: str | None
30
+ name: str
31
+ description: str
@@ -13,6 +13,7 @@ from zrb.util.todo import (
13
13
  TodoTaskModel,
14
14
  add_durations,
15
15
  cascade_todo_task,
16
+ get_visual_todo_card,
16
17
  get_visual_todo_list,
17
18
  line_to_todo_task,
18
19
  load_todo_list,
@@ -89,6 +90,38 @@ def list_todo(ctx: AnyContext):
89
90
  return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
90
91
 
91
92
 
93
+ @make_task(
94
+ name="show-todo",
95
+ input=StrInput(name="keyword", prompt="Task keyword", description="Task Keyword"),
96
+ description="🔍 Show todo",
97
+ group=todo_group,
98
+ alias="show",
99
+ )
100
+ def show_todo(ctx: AnyContext):
101
+ todo_file_path = os.path.join(TODO_DIR, "todo.txt")
102
+ todo_list: list[TodoTaskModel] = []
103
+ todo_list: list[TodoTaskModel] = []
104
+ if os.path.isfile(todo_file_path):
105
+ todo_list = load_todo_list(todo_file_path)
106
+ # Get todo task
107
+ todo_task = select_todo_task(todo_list, ctx.input.keyword)
108
+ if todo_task is None:
109
+ ctx.log_error("Task not found")
110
+ return
111
+ if todo_task.completed:
112
+ ctx.log_error("Task already completed")
113
+ return
114
+ # Update todo task
115
+ todo_task = cascade_todo_task(todo_task)
116
+ task_id = todo_task.keyval.get("id", "")
117
+ log_work_path = os.path.join(TODO_DIR, "log-work", f"{task_id}.json")
118
+ log_work_list = []
119
+ if os.path.isfile(log_work_path):
120
+ with open(log_work_path, "r") as f:
121
+ log_work_list = json.loads(f.read())
122
+ return get_visual_todo_card(todo_task, log_work_list)
123
+
124
+
92
125
  @make_task(
93
126
  name="complete-todo",
94
127
  input=StrInput(name="keyword", prompt="Task keyword", description="Task Keyword"),
@@ -142,10 +175,12 @@ def archive_todo(ctx: AnyContext):
142
175
  archive_file_path = os.path.join(TODO_DIR, "archive.txt")
143
176
  if not os.path.isdir(TODO_DIR):
144
177
  os.make_dirs(TODO_DIR, exist_ok=True)
178
+ # Get archived todo list
145
179
  archived_todo_list = []
146
180
  if os.path.isfile(archive_file_path):
147
181
  archived_todo_list = load_todo_list(archive_file_path)
148
182
  archived_todo_list += new_archived_todo_list
183
+ # Save the new todo list and add the archived ones
149
184
  save_todo_list(archive_file_path, archived_todo_list)
150
185
  save_todo_list(todo_file_path, working_todo_list)
151
186
  return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
@@ -208,9 +243,23 @@ def log_todo(ctx: AnyContext):
208
243
  log_work.append(
209
244
  {"log": ctx.input.log, "duration": ctx.input.duration, "start": ctx.input.start}
210
245
  )
246
+ # save todo with log work
211
247
  with open(log_work_file_path, "w") as f:
212
248
  f.write(json.dumps(log_work, indent=2))
213
- return get_visual_todo_list(todo_list, TODO_VISUAL_FILTER)
249
+ # get log work list
250
+ task_id = todo_task.keyval.get("id", "")
251
+ log_work_path = os.path.join(TODO_DIR, "log-work", f"{task_id}.json")
252
+ log_work_list = []
253
+ if os.path.isfile(log_work_path):
254
+ with open(log_work_path, "r") as f:
255
+ log_work_list = json.loads(f.read())
256
+ return "\n".join(
257
+ [
258
+ get_visual_todo_list(todo_list, TODO_VISUAL_FILTER),
259
+ "",
260
+ get_visual_todo_card(todo_task, log_work_list),
261
+ ]
262
+ )
214
263
 
215
264
 
216
265
  def _get_default_start() -> str:
@@ -2,7 +2,7 @@ import asyncio
2
2
  import os
3
3
  import sys
4
4
  from datetime import datetime, timedelta
5
- from typing import Any, Dict, List
5
+ from typing import Any
6
6
 
7
7
  from zrb.config import BANNER, WEB_HTTP_PORT
8
8
  from zrb.context.shared_context import SharedContext
@@ -23,7 +23,7 @@ from zrb.util.group import extract_node_from_args, get_node_path
23
23
  def create_app(root_group: AnyGroup, port: int = WEB_HTTP_PORT):
24
24
  from contextlib import asynccontextmanager
25
25
 
26
- from fastapi import FastAPI, HTTPException, Request
26
+ from fastapi import FastAPI, HTTPException, Query, Request
27
27
  from fastapi.responses import FileResponse, HTMLResponse
28
28
  from fastapi.staticfiles import StaticFiles
29
29
 
@@ -97,7 +97,13 @@ def create_app(root_group: AnyGroup, port: int = WEB_HTTP_PORT):
97
97
  raise HTTPException(status_code=404, detail="Not Found")
98
98
 
99
99
  @app.get("/api/{path:path}", response_model=SessionStateLog | SessionStateLogList)
100
- async def get_session(path: str, query_params: Dict[str, Any] = {}):
100
+ async def get_session(
101
+ path: str,
102
+ min_start_query: str = Query(default=None, alias="from"),
103
+ max_start_query: str = Query(default=None, alias="to"),
104
+ page: int = Query(default=0, alias="page"),
105
+ limit: int = Query(default=10, alias="limit"),
106
+ ):
101
107
  """
102
108
  Getting existing session or sessions
103
109
  """
@@ -106,24 +112,30 @@ def create_app(root_group: AnyGroup, port: int = WEB_HTTP_PORT):
106
112
  if isinstance(node, AnyTask) and residual_args:
107
113
  if residual_args[0] == "list":
108
114
  task_path = get_node_path(root_group, node)
109
- return list_sessions(task_path, query_params)
115
+ max_start_time = (
116
+ datetime.now()
117
+ if max_start_query is None
118
+ else datetime.strptime(max_start_query, "%Y-%m-%d %H:%M:%S")
119
+ )
120
+ min_start_time = (
121
+ max_start_time - timedelta(hours=1)
122
+ if min_start_query is None
123
+ else datetime.strptime(min_start_query, "%Y-%m-%d %H:%M:%S")
124
+ )
125
+ return list_sessions(
126
+ task_path, min_start_time, max_start_time, page, limit
127
+ )
110
128
  else:
111
129
  return read_session(residual_args[0])
112
130
  raise HTTPException(status_code=404, detail="Not Found")
113
131
 
114
132
  def list_sessions(
115
- task_path: List[str], query_params: Dict[str, Any]
133
+ task_path: list[str],
134
+ min_start_time: datetime,
135
+ max_start_time: datetime,
136
+ page: int,
137
+ limit: int,
116
138
  ) -> SessionStateLogList:
117
- max_start_time = datetime.now()
118
- if "to" in query_params:
119
- max_start_time = datetime.strptime(query_params["to"], "%Y-%m-%d %H:%M:%S")
120
- min_start_time = max_start_time - timedelta(hours=1)
121
- if "from" in query_params:
122
- min_start_time = datetime.strptime(
123
- query_params["from"], "%Y-%m-%d %H:%M:%S"
124
- )
125
- page = int(query_params.get("page", 0))
126
- limit = int(query_params.get("limit", 10))
127
139
  try:
128
140
  return default_session_state_logger.list(
129
141
  task_path,
@@ -1,12 +1,15 @@
1
1
  import datetime
2
2
  import re
3
3
  import shutil
4
+ from typing import Any
4
5
 
5
6
  from pydantic import BaseModel, Field, model_validator
6
7
 
7
8
  from zrb.util.cli.style import (
8
9
  stylize_bold_green,
10
+ stylize_bold_yellow,
9
11
  stylize_cyan,
12
+ stylize_faint,
10
13
  stylize_magenta,
11
14
  stylize_yellow,
12
15
  )
@@ -222,7 +225,7 @@ def get_visual_todo_list(todo_list: list[TodoTaskModel], filter: str) -> str:
222
225
  terminal_width, _ = shutil.get_terminal_size()
223
226
  # Headers
224
227
  results = [
225
- stylize_bold_green(
228
+ stylize_faint(
226
229
  get_visual_todo_header(
227
230
  terminal_width, max_desc_length, max_additional_info_length
228
231
  )
@@ -265,10 +268,15 @@ def get_visual_todo_line(
265
268
  priority = " " if todo_task.priority is None else f"({todo_task.priority})"
266
269
  completed_at = stylize_yellow(_date_to_str(todo_task.completion_date))
267
270
  created_at = stylize_cyan(_date_to_str(todo_task.creation_date))
268
- description = todo_task.description.ljust(max_desc_length)
271
+ description = todo_task.description
269
272
  if len(description) > max_desc_length:
270
273
  description = description[: max_desc_length - 4] + " ..."
274
+ description = description.ljust(max_desc_length)
271
275
  description = description[:max_desc_length]
276
+ if todo_task.completed:
277
+ description = stylize_faint(description)
278
+ elif "duration" in todo_task.keyval:
279
+ description = stylize_bold_yellow(description)
272
280
  additional_info = ", ".join(
273
281
  [stylize_yellow(f"+{project}") for project in todo_task.projects]
274
282
  + [stylize_cyan(f"@{context}") for context in todo_task.contexts]
@@ -283,6 +291,53 @@ def get_visual_todo_line(
283
291
  )
284
292
 
285
293
 
294
+ def get_visual_todo_card(
295
+ todo_task: TodoTaskModel, log_work_list: list[dict[str, str]]
296
+ ) -> str:
297
+ description = todo_task.description
298
+ status = "TODO"
299
+ if todo_task.completed:
300
+ status = "DONE"
301
+ elif "duration" in todo_task.keyval:
302
+ status = "DOING"
303
+ priority = todo_task.priority
304
+ completed_at = (
305
+ _date_to_str(todo_task.completion_date)
306
+ if todo_task.completion_date is not None
307
+ else ""
308
+ )
309
+ created_at = (
310
+ _date_to_str(todo_task.creation_date)
311
+ if todo_task.creation_date is not None
312
+ else ""
313
+ )
314
+ log_work_str = "\n".join(
315
+ [
316
+ " ".join(
317
+ [
318
+ stylize_magenta(log_work.get("duration", "").strip().rjust(12)),
319
+ stylize_cyan(log_work.get("start", "").strip().rjust(20)),
320
+ log_work.get("log", "").strip(),
321
+ ]
322
+ )
323
+ for log_work in log_work_list
324
+ ]
325
+ )
326
+ detail = [
327
+ f"{'📄 Description'.ljust(16)}: {description}",
328
+ f"{'🎯 Priority'.ljust(16)}: {priority}",
329
+ f"{'📊 Status'.ljust(16)}: {status}",
330
+ f"{'📅 Created at'.ljust(16)}: {created_at}",
331
+ f"{'✅ Completed at'.ljust(16)}: {completed_at}",
332
+ ]
333
+ if log_work_str != "":
334
+ detail.append(
335
+ stylize_faint(" ".join(["Time Spent".rjust(12), "Start".rjust(20), "Log"]))
336
+ )
337
+ detail.append(log_work_str)
338
+ return "\n".join(detail)
339
+
340
+
286
341
  def _date_to_str(date: datetime.date | None) -> str:
287
342
  if date is None:
288
343
  return "".ljust(14)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes