mindroot 9.22.0__py3-none-any.whl → 10.14.0__py3-none-any.whl

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 (331) hide show
  1. mindroot/coreplugins/admin/static/js/agent-form.js +26 -1
  2. mindroot/coreplugins/admin/static/js/persona-editor.js +14 -1
  3. mindroot/coreplugins/agent/agent.py +59 -18
  4. mindroot/coreplugins/agent/agent.py.bak +507 -0
  5. mindroot/coreplugins/agent/buagentz1.py +540 -0
  6. mindroot/coreplugins/agent/speech_to_speech.py +77 -0
  7. mindroot/coreplugins/agent/speech_to_speech.py.backup +46 -0
  8. mindroot/coreplugins/chat/buservices.py +625 -0
  9. mindroot/coreplugins/chat/buwidget_routes.py +287 -0
  10. mindroot/coreplugins/chat/commands.py +4 -0
  11. mindroot/coreplugins/chat/services.py +178 -8
  12. mindroot/coreplugins/chat/static/css/dark.css +90 -1
  13. mindroot/coreplugins/chat/static/css/default.css +90 -1
  14. mindroot/coreplugins/chat/static/css/light.css +724 -0
  15. mindroot/coreplugins/chat/static/css/mobile.css +37 -0
  16. mindroot/coreplugins/chat/static/js/chat.js +150 -89
  17. mindroot/coreplugins/chat/static/js/chatform.js +1 -1
  18. mindroot/coreplugins/chat/static/js/throttle.js +4 -2
  19. mindroot/coreplugins/chat/templates/chat.jinja2 +9 -1
  20. mindroot/coreplugins/chat/widget_routes.py +54 -10
  21. mindroot/coreplugins/check_list/helpers.py +221 -0
  22. mindroot/coreplugins/check_list/mod.py +435 -126
  23. mindroot/coreplugins/check_list/mod.py.backup +378 -0
  24. mindroot/coreplugins/check_list/mod.py.backup2 +506 -0
  25. mindroot/coreplugins/check_list/mod.py.backup3 +506 -0
  26. mindroot/coreplugins/check_list/mod_create_checklist_lol.py +756 -0
  27. mindroot/coreplugins/check_list/plugin_info.json +15 -0
  28. mindroot/coreplugins/jwt_auth/middleware.py +1 -1
  29. mindroot/docs/.env +1 -0
  30. mindroot/docs/.gitignore +1 -0
  31. mindroot/docs/_build/doctrees/chat_with_assistant.doctree +0 -0
  32. mindroot/docs/_build/doctrees/developer_documentation.doctree +0 -0
  33. mindroot/docs/_build/doctrees/embed_chat.doctree +0 -0
  34. mindroot/docs/_build/doctrees/environment.pickle +0 -0
  35. mindroot/docs/_build/doctrees/getting_started.doctree +0 -0
  36. mindroot/docs/_build/doctrees/index.doctree +0 -0
  37. mindroot/docs/_build/doctrees/install_plugins_with_tools.doctree +0 -0
  38. mindroot/docs/_build/doctrees/installation.doctree +0 -0
  39. mindroot/docs/_build/doctrees/llm_api_key.doctree +0 -0
  40. mindroot/docs/_build/doctrees/llm_plugin_installation.doctree +0 -0
  41. mindroot/docs/_build/doctrees/programming_task.doctree +0 -0
  42. mindroot/docs/_build/doctrees/source/ahp.doctree +0 -0
  43. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.admin.doctree +0 -0
  44. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.api_keys.doctree +0 -0
  45. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.chat.doctree +0 -0
  46. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.chat_avatar.doctree +0 -0
  47. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.check_list.doctree +0 -0
  48. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.credits.doctree +0 -0
  49. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.doctree +0 -0
  50. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.email.doctree +0 -0
  51. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.env_manager.doctree +0 -0
  52. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.events.doctree +0 -0
  53. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.index.doctree +0 -0
  54. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.index.handlers.doctree +0 -0
  55. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.jwt_auth.doctree +0 -0
  56. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.l8n.doctree +0 -0
  57. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.mcp_.doctree +0 -0
  58. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.persona.doctree +0 -0
  59. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.startup.doctree +0 -0
  60. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.subscriptions.doctree +0 -0
  61. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.usage.doctree +0 -0
  62. mindroot/docs/_build/doctrees/source/mindroot.coreplugins.user_service.doctree +0 -0
  63. mindroot/docs/_build/doctrees/source/mindroot.doctree +0 -0
  64. mindroot/docs/_build/doctrees/source/mindroot.lib.auth.doctree +0 -0
  65. mindroot/docs/_build/doctrees/source/mindroot.lib.doctree +0 -0
  66. mindroot/docs/_build/doctrees/source/mindroot.lib.json_str_block.doctree +0 -0
  67. mindroot/docs/_build/doctrees/source/mindroot.lib.plugins.doctree +0 -0
  68. mindroot/docs/_build/doctrees/source/mindroot.lib.providers.backup.doctree +0 -0
  69. mindroot/docs/_build/doctrees/source/mindroot.lib.providers.doctree +0 -0
  70. mindroot/docs/_build/doctrees/source/mindroot.registry.doctree +0 -0
  71. mindroot/docs/_build/doctrees/source/modules.doctree +0 -0
  72. mindroot/docs/_build/doctrees/source/mr_agent_expert_instr.doctree +0 -0
  73. mindroot/docs/_build/doctrees/starting_mindroot.doctree +0 -0
  74. mindroot/docs/_build/doctrees/user_documentation.doctree +0 -0
  75. mindroot/docs/_build/html/_images/apikey.png +0 -0
  76. mindroot/docs/_build/html/_images/chatwidgetx.png +0 -0
  77. mindroot/docs/_build/html/_images/disablechatavatar.png +0 -0
  78. mindroot/docs/_build/html/_images/widgetform.png +0 -0
  79. mindroot/docs/_build/html/_images/widgetonpage.png +0 -0
  80. mindroot/docs/_build/html/_modules/index.html +1 -0
  81. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/agent_importer.html +282 -86
  82. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/agent_router.html +281 -88
  83. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/asset_manager.html +280 -84
  84. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/command_router.html +281 -88
  85. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/mcp_catalog_routes.html +279 -86
  86. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/mcp_publish_routes.html +284 -91
  87. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/mcp_registry_routes.html +284 -91
  88. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/mcp_routes.html +281 -88
  89. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/mod.html +280 -84
  90. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/oauth_callback_router.html +280 -87
  91. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/persona_handler.html +282 -86
  92. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/persona_router.html +285 -89
  93. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/plugin_manager.html +281 -88
  94. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/plugin_router.html +280 -87
  95. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/plugin_routes.html +280 -87
  96. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/registry_settings_routes.html +280 -87
  97. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/router.html +281 -88
  98. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/server_router.html +280 -84
  99. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/service_models.html +280 -87
  100. mindroot/docs/_build/html/_modules/mindroot/coreplugins/admin/settings_router.html +288 -89
  101. mindroot/docs/_build/html/_modules/mindroot/coreplugins/api_keys/api_key_manager.html +280 -87
  102. mindroot/docs/_build/html/_modules/mindroot/coreplugins/api_keys/mod.html +279 -86
  103. mindroot/docs/_build/html/_modules/mindroot/coreplugins/api_keys/router.html +280 -87
  104. mindroot/docs/_build/html/_modules/mindroot/coreplugins/chat/commands.html +281 -88
  105. mindroot/docs/_build/html/_modules/mindroot/coreplugins/chat/mod.html +279 -86
  106. mindroot/docs/_build/html/_modules/mindroot/coreplugins/chat/models.html +280 -87
  107. mindroot/docs/_build/html/_modules/mindroot/coreplugins/chat/router.html +281 -88
  108. mindroot/docs/_build/html/_modules/mindroot/coreplugins/chat/services.html +283 -90
  109. mindroot/docs/_build/html/_modules/mindroot/coreplugins/chat/widget_manager.html +279 -86
  110. mindroot/docs/_build/html/_modules/mindroot/coreplugins/chat/widget_routes.html +279 -86
  111. mindroot/docs/_build/html/_modules/mindroot/coreplugins/check_list/mod.html +669 -213
  112. mindroot/docs/_build/html/_modules/mindroot/coreplugins/credits/conversion.html +280 -87
  113. mindroot/docs/_build/html/_modules/mindroot/coreplugins/credits/ledger.html +281 -88
  114. mindroot/docs/_build/html/_modules/mindroot/coreplugins/credits/mod.html +281 -88
  115. mindroot/docs/_build/html/_modules/mindroot/coreplugins/credits/models.html +279 -86
  116. mindroot/docs/_build/html/_modules/mindroot/coreplugins/credits/router.html +279 -86
  117. mindroot/docs/_build/html/_modules/mindroot/coreplugins/credits/storage.html +279 -86
  118. mindroot/docs/_build/html/_modules/mindroot/coreplugins/email/email_provider.html +280 -87
  119. mindroot/docs/_build/html/_modules/mindroot/coreplugins/email/imap_handler.html +284 -91
  120. mindroot/docs/_build/html/_modules/mindroot/coreplugins/email/mod.html +280 -87
  121. mindroot/docs/_build/html/_modules/mindroot/coreplugins/email/services.html +280 -87
  122. mindroot/docs/_build/html/_modules/mindroot/coreplugins/email/smtp_handler.html +280 -87
  123. mindroot/docs/_build/html/_modules/mindroot/coreplugins/email/test_email_service.html +280 -87
  124. mindroot/docs/_build/html/_modules/mindroot/coreplugins/env_manager/mod.html +281 -88
  125. mindroot/docs/_build/html/_modules/mindroot/coreplugins/env_manager/router.html +280 -87
  126. mindroot/docs/_build/html/_modules/mindroot/coreplugins/events/router.html +280 -87
  127. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/handlers/agent_ops.html +280 -87
  128. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/handlers/index_ops.html +280 -87
  129. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/handlers/plugin_ops.html +284 -91
  130. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/handlers/publish.html +281 -88
  131. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/mod.html +279 -86
  132. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/models.html +282 -86
  133. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/router.html +284 -91
  134. mindroot/docs/_build/html/_modules/mindroot/coreplugins/index/utils.html +282 -86
  135. mindroot/docs/_build/html/_modules/mindroot/coreplugins/jwt_auth/middleware.html +282 -89
  136. mindroot/docs/_build/html/_modules/mindroot/coreplugins/jwt_auth/mod.html +279 -86
  137. mindroot/docs/_build/html/_modules/mindroot/coreplugins/jwt_auth/router.html +280 -87
  138. mindroot/docs/_build/html/_modules/mindroot/coreplugins/l8n/language_detection.html +280 -84
  139. mindroot/docs/_build/html/_modules/mindroot/coreplugins/l8n/middleware.html +280 -84
  140. mindroot/docs/_build/html/_modules/mindroot/coreplugins/l8n/mod.html +282 -86
  141. mindroot/docs/_build/html/_modules/mindroot/coreplugins/l8n/test_enhanced.html +280 -84
  142. mindroot/docs/_build/html/_modules/mindroot/coreplugins/l8n/test_l8n_standalone.html +282 -86
  143. mindroot/docs/_build/html/_modules/mindroot/coreplugins/l8n/test_middleware.html +282 -86
  144. mindroot/docs/_build/html/_modules/mindroot/coreplugins/l8n/utils.html +280 -84
  145. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/catalog_commands.html +282 -86
  146. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/catalog_manager.html +280 -84
  147. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/dynamic_commands.html +280 -84
  148. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/mcp_manager.html +282 -86
  149. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/mod.html +282 -86
  150. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/oauth_storage.html +280 -84
  151. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/server_installer.html +282 -86
  152. mindroot/docs/_build/html/_modules/mindroot/coreplugins/mcp_/testmcpclient.html +285 -89
  153. mindroot/docs/_build/html/_modules/mindroot/coreplugins/persona/init_persona.html +280 -84
  154. mindroot/docs/_build/html/_modules/mindroot/coreplugins/persona/mod.html +282 -86
  155. mindroot/docs/_build/html/_modules/mindroot/coreplugins/startup/mod.html +282 -86
  156. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/credit_integration.html +280 -84
  157. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/mod.html +282 -86
  158. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/models.html +280 -84
  159. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/router.html +285 -89
  160. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/storage.html +282 -86
  161. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/stripe_integration.html +280 -84
  162. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/subscription_manager.html +280 -84
  163. mindroot/docs/_build/html/_modules/mindroot/coreplugins/subscriptions/webhook_handler.html +280 -84
  164. mindroot/docs/_build/html/_modules/mindroot/coreplugins/usage/handlers.html +282 -86
  165. mindroot/docs/_build/html/_modules/mindroot/coreplugins/usage/mod.html +282 -86
  166. mindroot/docs/_build/html/_modules/mindroot/coreplugins/usage/models.html +282 -86
  167. mindroot/docs/_build/html/_modules/mindroot/coreplugins/usage/reporting.html +282 -86
  168. mindroot/docs/_build/html/_modules/mindroot/coreplugins/usage/router.html +282 -86
  169. mindroot/docs/_build/html/_modules/mindroot/coreplugins/usage/storage.html +285 -89
  170. mindroot/docs/_build/html/_modules/mindroot/coreplugins/user_service/admin_init.html +282 -86
  171. mindroot/docs/_build/html/_modules/mindroot/coreplugins/user_service/email_service.html +282 -86
  172. mindroot/docs/_build/html/_modules/mindroot/coreplugins/user_service/mod.html +280 -84
  173. mindroot/docs/_build/html/_modules/mindroot/coreplugins/user_service/models.html +282 -86
  174. mindroot/docs/_build/html/_modules/mindroot/coreplugins/user_service/password_reset_service.html +282 -86
  175. mindroot/docs/_build/html/_modules/mindroot/coreplugins/user_service/role_service.html +282 -86
  176. mindroot/docs/_build/html/_modules/mindroot/coreplugins/user_service/router.html +282 -86
  177. mindroot/docs/_build/html/_modules/mindroot/lib/auth/api_key.html +280 -84
  178. mindroot/docs/_build/html/_modules/mindroot/lib/auth/auth.html +282 -86
  179. mindroot/docs/_build/html/_modules/mindroot/lib/buchatlog.html +285 -89
  180. mindroot/docs/_build/html/_modules/mindroot/lib/buchatlog2.html +282 -86
  181. mindroot/docs/_build/html/_modules/mindroot/lib/butemplates.html +282 -86
  182. mindroot/docs/_build/html/_modules/mindroot/lib/chatcontext.html +285 -89
  183. mindroot/docs/_build/html/_modules/mindroot/lib/chatlog.html +440 -91
  184. mindroot/docs/_build/html/_modules/mindroot/lib/chatlog_optimized.html +282 -86
  185. mindroot/docs/_build/html/_modules/mindroot/lib/json_escape.html +280 -84
  186. mindroot/docs/_build/html/_modules/mindroot/lib/json_str_block/json_str_block.html +282 -86
  187. mindroot/docs/_build/html/_modules/mindroot/lib/parent_templates.html +282 -86
  188. mindroot/docs/_build/html/_modules/mindroot/lib/plugins/installation.html +280 -84
  189. mindroot/docs/_build/html/_modules/mindroot/lib/plugins/l8n_static_handler.html +280 -84
  190. mindroot/docs/_build/html/_modules/mindroot/lib/plugins/loader.html +282 -86
  191. mindroot/docs/_build/html/_modules/mindroot/lib/plugins/loader_with_l8n.html +282 -86
  192. mindroot/docs/_build/html/_modules/mindroot/lib/plugins/manifest.html +282 -86
  193. mindroot/docs/_build/html/_modules/mindroot/lib/plugins/mapping.html +280 -84
  194. mindroot/docs/_build/html/_modules/mindroot/lib/plugins/paths.html +282 -86
  195. mindroot/docs/_build/html/_modules/mindroot/lib/plugins_install.html +282 -86
  196. mindroot/docs/_build/html/_modules/mindroot/lib/providers/commands.html +282 -87
  197. mindroot/docs/_build/html/_modules/mindroot/lib/providers/hooks.html +280 -85
  198. mindroot/docs/_build/html/_modules/mindroot/lib/providers/missing.html +282 -87
  199. mindroot/docs/_build/html/_modules/mindroot/lib/providers/model_preferences_v2.html +294 -91
  200. mindroot/docs/_build/html/_modules/mindroot/lib/providers/services.html +282 -87
  201. mindroot/docs/_build/html/_modules/mindroot/lib/providers.html +285 -89
  202. mindroot/docs/_build/html/_modules/mindroot/lib/route_decorators.html +282 -86
  203. mindroot/docs/_build/html/_modules/mindroot/lib/session_files.html +282 -86
  204. mindroot/docs/_build/html/_modules/mindroot/lib/streamcmd.html +282 -86
  205. mindroot/docs/_build/html/_modules/mindroot/lib/templates.html +343 -98
  206. mindroot/docs/_build/html/_modules/mindroot/lib/token_counter.html +280 -84
  207. mindroot/docs/_build/html/_modules/mindroot/migrate.html +282 -86
  208. mindroot/docs/_build/html/_modules/mindroot/registry/component_manager.html +282 -86
  209. mindroot/docs/_build/html/_modules/mindroot/registry/data_access.html +285 -89
  210. mindroot/docs/_build/html/_modules/mindroot/server.html +292 -87
  211. mindroot/docs/_build/html/_modules/mindroot/server_missing_normal_args.html +282 -86
  212. mindroot/docs/_build/html/_modules/mindroot/server_prev.html +282 -86
  213. mindroot/docs/_build/html/_sources/developer_documentation.rst.txt +21 -1
  214. mindroot/docs/_build/html/_sources/embed_chat.rst.txt +54 -0
  215. mindroot/docs/_build/html/_sources/user_documentation.rst.txt +6 -1
  216. mindroot/docs/_build/html/chat_with_assistant.html +1 -0
  217. mindroot/docs/_build/html/developer_documentation.html +45 -4
  218. mindroot/docs/_build/html/embed_chat.html +381 -0
  219. mindroot/docs/_build/html/genindex.html +9 -2
  220. mindroot/docs/_build/html/getting_started.html +19 -15
  221. mindroot/docs/_build/html/index.html +3 -0
  222. mindroot/docs/_build/html/install_plugins_with_tools.html +1 -0
  223. mindroot/docs/_build/html/installation.html +1 -0
  224. mindroot/docs/_build/html/llm_api_key.html +1 -0
  225. mindroot/docs/_build/html/llm_plugin_installation.html +1 -0
  226. mindroot/docs/_build/html/objects.inv +0 -0
  227. mindroot/docs/_build/html/programming_task.html +4 -3
  228. mindroot/docs/_build/html/py-modindex.html +2 -1
  229. mindroot/docs/_build/html/search.html +1 -0
  230. mindroot/docs/_build/html/searchindex.js +1 -1
  231. mindroot/docs/_build/html/source/ahp.html +1 -0
  232. mindroot/docs/_build/html/source/mindroot.coreplugins.admin.html +1 -0
  233. mindroot/docs/_build/html/source/mindroot.coreplugins.api_keys.html +16 -2
  234. mindroot/docs/_build/html/source/mindroot.coreplugins.chat.html +1 -0
  235. mindroot/docs/_build/html/source/mindroot.coreplugins.chat_avatar.html +16 -2
  236. mindroot/docs/_build/html/source/mindroot.coreplugins.check_list.html +91 -47
  237. mindroot/docs/_build/html/source/mindroot.coreplugins.credits.html +16 -2
  238. mindroot/docs/_build/html/source/mindroot.coreplugins.email.html +1 -0
  239. mindroot/docs/_build/html/source/mindroot.coreplugins.env_manager.html +16 -2
  240. mindroot/docs/_build/html/source/mindroot.coreplugins.events.html +16 -2
  241. mindroot/docs/_build/html/source/mindroot.coreplugins.html +3 -0
  242. mindroot/docs/_build/html/source/mindroot.coreplugins.index.handlers.html +16 -2
  243. mindroot/docs/_build/html/source/mindroot.coreplugins.index.html +16 -2
  244. mindroot/docs/_build/html/source/mindroot.coreplugins.jwt_auth.html +1 -0
  245. mindroot/docs/_build/html/source/mindroot.coreplugins.l8n.html +1 -0
  246. mindroot/docs/_build/html/source/mindroot.coreplugins.mcp_.html +1 -0
  247. mindroot/docs/_build/html/source/mindroot.coreplugins.persona.html +16 -2
  248. mindroot/docs/_build/html/source/mindroot.coreplugins.startup.html +16 -2
  249. mindroot/docs/_build/html/source/mindroot.coreplugins.subscriptions.html +16 -2
  250. mindroot/docs/_build/html/source/mindroot.coreplugins.usage.html +16 -2
  251. mindroot/docs/_build/html/source/mindroot.coreplugins.user_service.html +16 -2
  252. mindroot/docs/_build/html/source/mindroot.html +2 -0
  253. mindroot/docs/_build/html/source/mindroot.lib.auth.html +16 -2
  254. mindroot/docs/_build/html/source/mindroot.lib.html +36 -4
  255. mindroot/docs/_build/html/source/mindroot.lib.json_str_block.html +16 -2
  256. mindroot/docs/_build/html/source/mindroot.lib.plugins.html +16 -2
  257. mindroot/docs/_build/html/source/mindroot.lib.providers.backup.html +1 -0
  258. mindroot/docs/_build/html/source/mindroot.lib.providers.html +1 -0
  259. mindroot/docs/_build/html/source/mindroot.registry.html +16 -2
  260. mindroot/docs/_build/html/source/modules.html +16 -2
  261. mindroot/docs/_build/html/source/mr_agent_expert_instr.html +1 -0
  262. mindroot/docs/_build/html/starting_mindroot.html +1 -0
  263. mindroot/docs/_build/html/user_documentation.html +9 -0
  264. mindroot/docs/apikey.png +0 -0
  265. mindroot/docs/chatwidget1.png +0 -0
  266. mindroot/docs/chatwidgetx.png +0 -0
  267. mindroot/docs/developer_documentation.rst +21 -1
  268. mindroot/docs/disablechatavatar.png +0 -0
  269. mindroot/docs/embed_chat.rst +54 -0
  270. mindroot/docs/user_documentation.rst +6 -1
  271. mindroot/docs/widgetform.png +0 -0
  272. mindroot/docs/widgetonpage.png +0 -0
  273. mindroot/lib/buchatlog3.py +592 -0
  274. mindroot/lib/chatcontext.py +1 -0
  275. mindroot/lib/chatlog.py +195 -5
  276. mindroot/lib/logging/logfiles.py +1 -0
  277. {mindroot-9.22.0.dist-info → mindroot-10.14.0.dist-info}/METADATA +1 -1
  278. {mindroot-9.22.0.dist-info → mindroot-10.14.0.dist-info}/RECORD +282 -300
  279. mindroot/docs/_build/html/.buildinfo.bak +0 -4
  280. mindroot/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -123
  281. mindroot/docs/_build/html/_static/css/badge_only.css +0 -1
  282. mindroot/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  283. mindroot/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  284. mindroot/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  285. mindroot/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  286. mindroot/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
  287. mindroot/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg +0 -2671
  288. mindroot/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  289. mindroot/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
  290. mindroot/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  291. mindroot/docs/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
  292. mindroot/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  293. mindroot/docs/_build/html/_static/css/fonts/lato-bold.woff +0 -0
  294. mindroot/docs/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
  295. mindroot/docs/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
  296. mindroot/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  297. mindroot/docs/_build/html/_static/css/fonts/lato-normal.woff +0 -0
  298. mindroot/docs/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
  299. mindroot/docs/_build/html/_static/css/theme.css +0 -4
  300. mindroot/docs/_build/html/_static/fonts/Lato/lato-bold.eot +0 -0
  301. mindroot/docs/_build/html/_static/fonts/Lato/lato-bold.ttf +0 -0
  302. mindroot/docs/_build/html/_static/fonts/Lato/lato-bold.woff +0 -0
  303. mindroot/docs/_build/html/_static/fonts/Lato/lato-bold.woff2 +0 -0
  304. mindroot/docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  305. mindroot/docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  306. mindroot/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  307. mindroot/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  308. mindroot/docs/_build/html/_static/fonts/Lato/lato-italic.eot +0 -0
  309. mindroot/docs/_build/html/_static/fonts/Lato/lato-italic.ttf +0 -0
  310. mindroot/docs/_build/html/_static/fonts/Lato/lato-italic.woff +0 -0
  311. mindroot/docs/_build/html/_static/fonts/Lato/lato-italic.woff2 +0 -0
  312. mindroot/docs/_build/html/_static/fonts/Lato/lato-regular.eot +0 -0
  313. mindroot/docs/_build/html/_static/fonts/Lato/lato-regular.ttf +0 -0
  314. mindroot/docs/_build/html/_static/fonts/Lato/lato-regular.woff +0 -0
  315. mindroot/docs/_build/html/_static/fonts/Lato/lato-regular.woff2 +0 -0
  316. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  317. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  318. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  319. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  320. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  321. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  322. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  323. mindroot/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  324. mindroot/docs/_build/html/_static/jquery.js +0 -2
  325. mindroot/docs/_build/html/_static/js/badge_only.js +0 -1
  326. mindroot/docs/_build/html/_static/js/theme.js +0 -1
  327. mindroot/docs/_build/html/_static/js/versions.js +0 -228
  328. {mindroot-9.22.0.dist-info → mindroot-10.14.0.dist-info}/WHEEL +0 -0
  329. {mindroot-9.22.0.dist-info → mindroot-10.14.0.dist-info}/entry_points.txt +0 -0
  330. {mindroot-9.22.0.dist-info → mindroot-10.14.0.dist-info}/licenses/LICENSE +0 -0
  331. {mindroot-9.22.0.dist-info → mindroot-10.14.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,378 @@
1
+ """
2
+ checklist helper for an LLM‑agent system
3
+ —————————————————————————————————————————————————————————————————————————————
4
+ Purpose
5
+ -------
6
+ • Parse a Markdown "##\tChecklist" section where each subtask is
7
+ written as a task‑list line:
8
+
9
+ - [ ] label of subtask
10
+ arbitrary markdown body… (until next task or heading)
11
+
12
+ • Store parsed tasks + cursor in `context.data['checklist']`.
13
+
14
+ • Runtime helpers:
15
+ load_checklist(md, ctx) → parse markdown + reset state
16
+ complete_subtask(subtask_id, context) → mark subtask done, advance cursor
17
+ goto_subtask(subtask_id, context) → move to a specific subtask
18
+ clear_subtask(subtask_id, context) → mark a subtask as incomplete
19
+ get_checklist_status(context) → show the full checklist status
20
+
21
+ `complete_subtask` and other commands live at module level so the agent can call them
22
+ as tools. No third‑party deps—only Python's `re` module.
23
+ """
24
+
25
+ import re
26
+ from lib.providers.commands import command, command_manager
27
+ from lib.providers.services import service
28
+ import traceback
29
+
30
+ # ---------- parsing ------------------------------------------------------
31
+
32
+ # Only match top-level checklist items (no indentation at start of line)
33
+ TASK_RE = re.compile(r'^-\s*\[(?P<done>[ xX])\]\s*(?P<label>.*?)\s*$')
34
+ HEADER_RE = re.compile(r'^#{1,6}\s') # any Markdown heading
35
+ CHECKLIST_HEADER_RE = re.compile(r'^#{1,6}\s+Checklist\b', re.IGNORECASE) # Checklist heading
36
+
37
+ def _parse(md: str):
38
+ """Extract tasks as a list of dicts: {label, body, done}."""
39
+ lines, tasks, i = md.splitlines(), [], 0
40
+ while i < len(lines):
41
+ # Skip lines that start with whitespace (nested items)
42
+ if lines[i].startswith(' ') or lines[i].startswith('\t'):
43
+ i += 1
44
+ continue
45
+ m = TASK_RE.match(lines[i])
46
+ if not m: # not a task‑list line
47
+ i += 1
48
+ continue
49
+
50
+ done = m.group("done").strip().lower() in ("x", "✓")
51
+ label = m.group("label").strip()
52
+
53
+ # collect everything until next task or heading
54
+ body_lines = []
55
+ i += 1
56
+ while i < len(lines) and not (
57
+ # Stop at next top-level task or heading
58
+ (TASK_RE.match(lines[i]) and not (lines[i].startswith(' ') or lines[i].startswith('\t'))) or
59
+ HEADER_RE.match(lines[i])
60
+ ):
61
+ body_lines.append(lines[i])
62
+ i += 1
63
+
64
+ tasks.append({
65
+ "label": label,
66
+ "body": "\n".join(body_lines).strip(),
67
+ "done": done,
68
+ })
69
+ return tasks
70
+
71
+
72
+ def extract_checklist_section(md: str):
73
+ """Extract checklist items from the entire markdown text.
74
+
75
+ No longer requires a specific 'Checklist' heading - processes the entire text
76
+ and extracts only top-level checklist items, leaving nested ones intact.
77
+ """
78
+ return md # Return the entire text for processing
79
+
80
+
81
+ # ---------- state helpers ------------------------------------------------
82
+
83
+ def _state(ctx):
84
+ """Return the mutable checklist state in ctx.data."""
85
+ return ctx.data.setdefault("checklist", {"tasks": [], "cursor": 0})
86
+
87
+ def load_checklist(md: str, ctx):
88
+ """Parse markdown and reset cursor to first unchecked subtask."""
89
+ st = _state(ctx)
90
+ st["tasks"] = _parse(md)
91
+ st["cursor"] = next(
92
+ (i for i, t in enumerate(st["tasks"]) if not t["done"]),
93
+ len(st["tasks"]),
94
+ )
95
+
96
+
97
+ @service()
98
+ async def load_checklist_from_instructions(md: str, context=None):
99
+ """Load checklist from instructions.
100
+
101
+ Processes the entire text and extracts top-level checklist items.
102
+
103
+ Example:
104
+ { "load_checklist_from_instructions": { "md": "Full instructions with embedded checklist" } }
105
+ """
106
+ checklist_section = extract_checklist_section(md)
107
+ load_checklist(checklist_section, context)
108
+ return f"Loaded checklist from instructions.\n\n{_format_checklist_status(context)}"
109
+
110
+
111
+ # ---------- helper functions ---------------------------------------------
112
+
113
+ def _resolve_subtask_id(subtask_id, context):
114
+ """Resolve a subtask_id to an index (0-based).
115
+
116
+ subtask_id can be:
117
+ - A number (1-based index, converted to 0-based)
118
+ - A string matching a subtask label
119
+ - None/default (-1) to use the current cursor position
120
+ """
121
+ st = _state(context)
122
+
123
+ # Default to current cursor position
124
+ if subtask_id is None or subtask_id == -1:
125
+ return st["cursor"]
126
+
127
+ # If it's a number, convert from 1-based to 0-based
128
+ if isinstance(subtask_id, int):
129
+ idx = subtask_id - 1
130
+ else:
131
+ # It's a string, try to find a matching label
132
+ for i, task in enumerate(st["tasks"]):
133
+ if task["label"] == subtask_id:
134
+ return i
135
+ # No match found
136
+ return -1
137
+
138
+ return idx
139
+
140
+
141
+ def _format_checklist_status(context):
142
+ """Format the full checklist status as a markdown string."""
143
+ st = _state(context)
144
+ if not st["tasks"]:
145
+ return "_No checklist found. Make sure to include a checklist in your instructions._"
146
+
147
+ lines = ["### Checklist Status\n"]
148
+
149
+ for i, task in enumerate(st["tasks"]):
150
+ # Determine status indicator
151
+ if i == st["cursor"]:
152
+ status = "➡️ " # Current task
153
+ elif task["done"]:
154
+ status = "✅ " # Completed
155
+ else:
156
+ status = "❌ " # Not completed
157
+
158
+ # Add task line
159
+ lines.append(f"{status}**Subtask**: {task['label']}")
160
+
161
+ return "\n".join(lines)
162
+
163
+
164
+ # ---------- module‑level tool commands ----------------------------------
165
+
166
+ @command()
167
+ async def complete_subtask(subtask_id=None, context=None):
168
+ """
169
+ Mark a subtask complete and return a Markdown status message.
170
+
171
+ Parameters:
172
+ - subtask_id: Optional. The subtask to complete, specified by:
173
+ - The exact subtask label text
174
+ - Omit to complete the current subtask
175
+
176
+ Example:
177
+ { "complete_subtask": {} } # Complete current subtask
178
+ { "complete_subtask": { "subtask_id": "Review documents" } } # Complete by label
179
+ """
180
+ if context is None:
181
+ return "_Context is required._"
182
+
183
+ st = _state(context)
184
+ if not st["tasks"]:
185
+ try:
186
+ print("Loading checklist from instructions...")
187
+ print("Agent is")
188
+ print(context.agent)
189
+ instructions = context.agent["instructions"]
190
+ await load_checklist_from_instructions(instructions, context)
191
+ except Exception as e:
192
+ print(f"Error loading checklist: {e}")
193
+ trace = traceback.format_exc()
194
+ print(trace)
195
+ return "_No checklist found. Make sure to include a checklist in your instructions._"
196
+
197
+ idx = _resolve_subtask_id(subtask_id, context)
198
+ if idx < 0 or idx >= len(st["tasks"]):
199
+ return "_Invalid subtask identifier._"
200
+
201
+ # mark as done
202
+ done_task = st["tasks"][idx]
203
+ done_task["done"] = True
204
+
205
+ # advance cursor to next open subtask
206
+ st["cursor"] = next(
207
+ (i for i, t in enumerate(st["tasks"][idx + 1:], idx + 1) if not t["done"]),
208
+ len(st["tasks"]),
209
+ )
210
+
211
+ # build markdown response
212
+ completed = f"Completed Subtask {idx+1}: - [x] {done_task['label']}"
213
+ if st["cursor"] >= len(st["tasks"]):
214
+ return f"{completed}\n\nAll subtasks complete ✅\n\n{_format_checklist_status(context)}"
215
+
216
+ next_task = st["tasks"][st['cursor']]
217
+ return f"""
218
+ {completed}
219
+
220
+ Next subtask (Subtask {st['cursor']+1})
221
+ - [ ] {next_task['label']}
222
+ {next_task['body']}
223
+
224
+ {_format_checklist_status(context)}
225
+ """
226
+
227
+ @command()
228
+ async def goto_subtask(subtask_id, context=None):
229
+ """
230
+ Move to a specific subtask without changing its completion status.
231
+
232
+ Parameters:
233
+ - subtask_id: Required. The subtask to navigate to, specified by:
234
+ - The exact subtask label text
235
+
236
+ Example:
237
+ { "goto_subtask": { "subtask_id": "Data analysis" } } # Go to by label
238
+ """
239
+ if context is None:
240
+ return "_Context is required._"
241
+
242
+ st = _state(context)
243
+ if not st["tasks"]:
244
+ return "_No checklist found. Make sure to include a checklist in your instructions._"
245
+
246
+ idx = _resolve_subtask_id(subtask_id, context)
247
+ if idx < 0 or idx >= len(st["tasks"]):
248
+ return "_Invalid subtask identifier._"
249
+
250
+ # Update cursor position
251
+ st["cursor"] = idx
252
+
253
+ # Get the current task
254
+ current_task = st["tasks"][idx]
255
+
256
+ # Build response
257
+ status = "✅" if current_task["done"] else "❌"
258
+ return (
259
+ f"Moved to Subtask {idx+1}: {status} {current_task['label']}\n"
260
+ f"{current_task['body']}\n\n"
261
+ f"{_format_checklist_status(context)}"
262
+ )
263
+
264
+
265
+ @command()
266
+ async def clear_subtask(subtask_id=None, context=None):
267
+ """
268
+ Mark a subtask as incomplete (not done).
269
+
270
+ Parameters:
271
+ - subtask_id: Optional. The subtask to clear, specified by:
272
+ - The exact subtask label text
273
+ - Omit to clear the current subtask
274
+
275
+ Example:
276
+ { "clear_subtask": {} } # Clear current subtask
277
+ { "clear_subtask": { "subtask_id": "Review documents" } } # Clear by label
278
+ """
279
+ if context is None:
280
+ return "_Context is required._"
281
+
282
+ st = _state(context)
283
+ if not st["tasks"]:
284
+ return "_No checklist found. Make sure to include a checklist in your instructions._"
285
+
286
+ idx = _resolve_subtask_id(subtask_id, context)
287
+ if idx < 0 or idx >= len(st["tasks"]):
288
+ return "_Invalid subtask identifier._"
289
+
290
+ # Mark as not done
291
+ task = st["tasks"][idx]
292
+ was_done = task["done"]
293
+ task["done"] = False
294
+
295
+ # If we cleared the current or earlier task, update cursor
296
+ if idx <= st["cursor"]:
297
+ st["cursor"] = idx
298
+
299
+ # Build response
300
+ action = "Cleared" if was_done else "Already clear"
301
+ return (
302
+ f"{action} Subtask {idx+1}: - [ ] {task['label']}\n"
303
+ f"Current subtask is now Subtask {st['cursor']+1}\n\n"
304
+ f"{_format_checklist_status(context)}"
305
+ )
306
+
307
+
308
+ @command()
309
+ async def get_checklist_status(context=None):
310
+ """
311
+ Show the full status of the checklist.
312
+
313
+ Example:
314
+ { "get_checklist_status": {} }
315
+ """
316
+ if context is None:
317
+ return "_Context is required._"
318
+
319
+ return _format_checklist_status(context)
320
+
321
+
322
+ @command()
323
+ async def delegate_subtask(subtask_id, details:str, agent=None, context=None):
324
+ """
325
+ Delegate a subtask to an agent, automatically passing the subtask body as
326
+ instructions, along with any details you add.
327
+
328
+ If agent is not specified, the current agent name will be used for the subtask.
329
+
330
+ Example:
331
+
332
+ Given a checklist with subtasks like:
333
+
334
+ - Research
335
+ ...
336
+
337
+ - Draft
338
+ ...
339
+
340
+ - Complete
341
+ ..
342
+
343
+ Suppose you had already created /data/sess_1234.
344
+ You might initiate work on the first subtask with this command:
345
+
346
+ { "delegate_subtask": { "subtask_id": "Research",
347
+ "details": "Session data in /data/sess_1234/" }}
348
+
349
+ Note that you do not need to repeat the text of the subtask item from the checklist
350
+ in your details.
351
+ """
352
+ st = _state(context)
353
+ if not st["tasks"]:
354
+ try:
355
+ print("Loading checklist from instructions...")
356
+ print("Agent is")
357
+ print(context.agent)
358
+ instructions = context.agent["instructions"]
359
+ await load_checklist_from_instructions(instructions, context)
360
+ except Exception as e:
361
+ print(f"Error loading checklist: {e}")
362
+ trace = traceback.format_exc()
363
+ print(trace)
364
+ return "_No checklist found. Make sure to include a checklist in your instructions._"
365
+ idx = _resolve_subtask_id(subtask_id, context)
366
+ if idx < 0 or idx >= len(st["tasks"]):
367
+ return "_Invalid subtask identifier._"
368
+ current_task = st["tasks"][idx]
369
+ subtask = current_task["body"]
370
+ reminder = """Important: you may see instructions for the full process. However, you are to ONLY
371
+ do the specified part of the process and then return a task result."""
372
+ instructions = f"You are working as part of a multi-step process. Please complete the following subtask:\n\n{subtask}\n\n{details}\n\n{reminder}\n"
373
+ if agent is None:
374
+ agent_name = context.agent["name"]
375
+ else:
376
+ agent_name = agent
377
+ return await command_manager.delegate_task(instructions, agent_name, context=context)
378
+