afkbotio 1.0.10__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 (735) hide show
  1. afkbotio-1.0.10/LICENSE +88 -0
  2. afkbotio-1.0.10/PKG-INFO +414 -0
  3. afkbotio-1.0.10/README.md +370 -0
  4. afkbotio-1.0.10/afkbot/__init__.py +5 -0
  5. afkbotio-1.0.10/afkbot/api/__init__.py +5 -0
  6. afkbotio-1.0.10/afkbot/api/app.py +66 -0
  7. afkbotio-1.0.10/afkbot/api/chat_auth.py +284 -0
  8. afkbotio-1.0.10/afkbot/api/chat_routes/__init__.py +24 -0
  9. afkbotio-1.0.10/afkbot/api/chat_routes/contracts.py +91 -0
  10. afkbotio-1.0.10/afkbot/api/chat_routes/http.py +262 -0
  11. afkbotio-1.0.10/afkbot/api/chat_routes/router.py +29 -0
  12. afkbotio-1.0.10/afkbot/api/chat_routes/scope.py +156 -0
  13. afkbotio-1.0.10/afkbot/api/chat_routes/websocket.py +158 -0
  14. afkbotio-1.0.10/afkbot/api/chat_targeting.py +163 -0
  15. afkbotio-1.0.10/afkbot/api/routes_chat.py +25 -0
  16. afkbotio-1.0.10/afkbot/api/routes_connect.py +242 -0
  17. afkbotio-1.0.10/afkbot/api/routes_health.py +180 -0
  18. afkbotio-1.0.10/afkbot/api/routes_plugins.py +146 -0
  19. afkbotio-1.0.10/afkbot/bootstrap/AGENTS.md +25 -0
  20. afkbotio-1.0.10/afkbot/bootstrap/IDENTITY.md +16 -0
  21. afkbotio-1.0.10/afkbot/bootstrap/SECURITY.md +13 -0
  22. afkbotio-1.0.10/afkbot/bootstrap/TOOLS.md +33 -0
  23. afkbotio-1.0.10/afkbot/browser_backends.py +58 -0
  24. afkbotio-1.0.10/afkbot/cli/__init__.py +1 -0
  25. afkbotio-1.0.10/afkbot/cli/command_errors.py +14 -0
  26. afkbotio-1.0.10/afkbot/cli/commands/__init__.py +1 -0
  27. afkbotio-1.0.10/afkbot/cli/commands/automation.py +247 -0
  28. afkbotio-1.0.10/afkbot/cli/commands/bootstrap.py +100 -0
  29. afkbotio-1.0.10/afkbot/cli/commands/browser.py +374 -0
  30. afkbotio-1.0.10/afkbot/cli/commands/browser_support.py +407 -0
  31. afkbotio-1.0.10/afkbot/cli/commands/channel.py +213 -0
  32. afkbotio-1.0.10/afkbot/cli/commands/channel_credentials_support.py +505 -0
  33. afkbotio-1.0.10/afkbot/cli/commands/channel_prompt_support.py +230 -0
  34. afkbotio-1.0.10/afkbot/cli/commands/channel_shared.py +520 -0
  35. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram.py +167 -0
  36. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/__init__.py +27 -0
  37. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/common.py +24 -0
  38. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/mutations.py +6 -0
  39. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/mutations_add.py +280 -0
  40. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/mutations_update.py +392 -0
  41. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/operations.py +207 -0
  42. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/registration.py +411 -0
  43. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_commands/runtime.py +39 -0
  44. afkbotio-1.0.10/afkbot/cli/commands/channel_telegram_runtime.py +263 -0
  45. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon.py +42 -0
  46. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/__init__.py +8 -0
  47. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/add_command.py +319 -0
  48. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/add_support.py +516 -0
  49. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/app.py +34 -0
  50. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/common.py +52 -0
  51. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/legacy.py +53 -0
  52. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/queries.py +400 -0
  53. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/update_command.py +305 -0
  54. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/update_context.py +70 -0
  55. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/update_persistence.py +122 -0
  56. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/update_support.py +592 -0
  57. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_commands/watcher.py +164 -0
  58. afkbotio-1.0.10/afkbot/cli/commands/channel_telethon_runtime.py +315 -0
  59. afkbotio-1.0.10/afkbot/cli/commands/chat.py +249 -0
  60. afkbotio-1.0.10/afkbot/cli/commands/chat_fullscreen_runtime.py +332 -0
  61. afkbotio-1.0.10/afkbot/cli/commands/chat_fullscreen_support.py +102 -0
  62. afkbotio-1.0.10/afkbot/cli/commands/chat_planning.py +35 -0
  63. afkbotio-1.0.10/afkbot/cli/commands/chat_planning_runtime.py +156 -0
  64. afkbotio-1.0.10/afkbot/cli/commands/chat_repl_controls.py +216 -0
  65. afkbotio-1.0.10/afkbot/cli/commands/chat_repl_input.py +68 -0
  66. afkbotio-1.0.10/afkbot/cli/commands/chat_repl_runtime.py +307 -0
  67. afkbotio-1.0.10/afkbot/cli/commands/chat_repl_specs.py +112 -0
  68. afkbotio-1.0.10/afkbot/cli/commands/chat_secure_flow.py +656 -0
  69. afkbotio-1.0.10/afkbot/cli/commands/chat_session_runtime.py +237 -0
  70. afkbotio-1.0.10/afkbot/cli/commands/chat_startup_notices.py +44 -0
  71. afkbotio-1.0.10/afkbot/cli/commands/chat_target.py +107 -0
  72. afkbotio-1.0.10/afkbot/cli/commands/chat_task_startup_digest.py +221 -0
  73. afkbotio-1.0.10/afkbot/cli/commands/chat_update_notices.py +130 -0
  74. afkbotio-1.0.10/afkbot/cli/commands/connect.py +192 -0
  75. afkbotio-1.0.10/afkbot/cli/commands/connect_target.py +80 -0
  76. afkbotio-1.0.10/afkbot/cli/commands/credentials.py +272 -0
  77. afkbotio-1.0.10/afkbot/cli/commands/doctor.py +344 -0
  78. afkbotio-1.0.10/afkbot/cli/commands/inspection_shared.py +551 -0
  79. afkbotio-1.0.10/afkbot/cli/commands/inspection_shared_models.py +124 -0
  80. afkbotio-1.0.10/afkbot/cli/commands/mcp.py +605 -0
  81. afkbotio-1.0.10/afkbot/cli/commands/memory.py +23 -0
  82. afkbotio-1.0.10/afkbot/cli/commands/memory_read_commands.py +395 -0
  83. afkbotio-1.0.10/afkbot/cli/commands/memory_support.py +172 -0
  84. afkbotio-1.0.10/afkbot/cli/commands/memory_write_commands.py +303 -0
  85. afkbotio-1.0.10/afkbot/cli/commands/plugin.py +306 -0
  86. afkbotio-1.0.10/afkbot/cli/commands/profile.py +22 -0
  87. afkbotio-1.0.10/afkbot/cli/commands/profile_add.py +363 -0
  88. afkbotio-1.0.10/afkbot/cli/commands/profile_binding.py +164 -0
  89. afkbotio-1.0.10/afkbot/cli/commands/profile_bootstrap.py +132 -0
  90. afkbotio-1.0.10/afkbot/cli/commands/profile_common.py +90 -0
  91. afkbotio-1.0.10/afkbot/cli/commands/profile_core.py +21 -0
  92. afkbotio-1.0.10/afkbot/cli/commands/profile_delete.py +45 -0
  93. afkbotio-1.0.10/afkbot/cli/commands/profile_mutation/__init__.py +29 -0
  94. afkbotio-1.0.10/afkbot/cli/commands/profile_mutation/collection.py +335 -0
  95. afkbotio-1.0.10/afkbot/cli/commands/profile_mutation/contracts.py +26 -0
  96. afkbotio-1.0.10/afkbot/cli/commands/profile_mutation/defaults.py +137 -0
  97. afkbotio-1.0.10/afkbot/cli/commands/profile_mutation/presentation.py +45 -0
  98. afkbotio-1.0.10/afkbot/cli/commands/profile_mutation_support.py +84 -0
  99. afkbotio-1.0.10/afkbot/cli/commands/profile_read.py +169 -0
  100. afkbotio-1.0.10/afkbot/cli/commands/profile_secrets.py +191 -0
  101. afkbotio-1.0.10/afkbot/cli/commands/profile_update.py +354 -0
  102. afkbotio-1.0.10/afkbot/cli/commands/runtime_assets_common.py +64 -0
  103. afkbotio-1.0.10/afkbot/cli/commands/setup.py +339 -0
  104. afkbotio-1.0.10/afkbot/cli/commands/setup_support.py +58 -0
  105. afkbotio-1.0.10/afkbot/cli/commands/skill.py +389 -0
  106. afkbotio-1.0.10/afkbot/cli/commands/start.py +323 -0
  107. afkbotio-1.0.10/afkbot/cli/commands/subagent.py +238 -0
  108. afkbotio-1.0.10/afkbot/cli/commands/task.py +706 -0
  109. afkbotio-1.0.10/afkbot/cli/commands/uninstall.py +63 -0
  110. afkbotio-1.0.10/afkbot/cli/commands/update.py +34 -0
  111. afkbotio-1.0.10/afkbot/cli/commands/upgrade.py +61 -0
  112. afkbotio-1.0.10/afkbot/cli/commands/version.py +17 -0
  113. afkbotio-1.0.10/afkbot/cli/main.py +98 -0
  114. afkbotio-1.0.10/afkbot/cli/managed_runtime.py +172 -0
  115. afkbotio-1.0.10/afkbot/cli/presentation/__init__.py +33 -0
  116. afkbotio-1.0.10/afkbot/cli/presentation/activity_indicator.py +110 -0
  117. afkbotio-1.0.10/afkbot/cli/presentation/browser_prompts.py +113 -0
  118. afkbotio-1.0.10/afkbot/cli/presentation/chat_input.py +77 -0
  119. afkbotio-1.0.10/afkbot/cli/presentation/chat_interactive.py +404 -0
  120. afkbotio-1.0.10/afkbot/cli/presentation/chat_plan_renderer.py +34 -0
  121. afkbotio-1.0.10/afkbot/cli/presentation/chat_renderer.py +155 -0
  122. afkbotio-1.0.10/afkbot/cli/presentation/chat_style.py +9 -0
  123. afkbotio-1.0.10/afkbot/cli/presentation/chat_turn_output.py +30 -0
  124. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/__init__.py +1 -0
  125. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/app.py +688 -0
  126. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/capabilities.py +49 -0
  127. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/composer.py +235 -0
  128. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/layout.py +25 -0
  129. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/presenter.py +269 -0
  130. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/runtime.py +51 -0
  131. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/status.py +95 -0
  132. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/theme.py +38 -0
  133. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/toolbar.py +148 -0
  134. afkbotio-1.0.10/afkbot/cli/presentation/chat_workspace/transcript.py +316 -0
  135. afkbotio-1.0.10/afkbot/cli/presentation/inline_select.py +634 -0
  136. afkbotio-1.0.10/afkbot/cli/presentation/mcp_wizard.py +185 -0
  137. afkbotio-1.0.10/afkbot/cli/presentation/plugin_prompts.py +142 -0
  138. afkbotio-1.0.10/afkbot/cli/presentation/progress_mapper.py +58 -0
  139. afkbotio-1.0.10/afkbot/cli/presentation/progress_renderer.py +394 -0
  140. afkbotio-1.0.10/afkbot/cli/presentation/progress_timeline.py +151 -0
  141. afkbotio-1.0.10/afkbot/cli/presentation/prompt_i18n.py +117 -0
  142. afkbotio-1.0.10/afkbot/cli/presentation/setup_policy_prompts.py +366 -0
  143. afkbotio-1.0.10/afkbot/cli/presentation/setup_prompts.py +71 -0
  144. afkbotio-1.0.10/afkbot/cli/presentation/setup_provider_prompts.py +410 -0
  145. afkbotio-1.0.10/afkbot/cli/presentation/tty.py +11 -0
  146. afkbotio-1.0.10/afkbot/cli/presentation/uninstall_prompts.py +37 -0
  147. afkbotio-1.0.10/afkbot/cli/presentation/update_prompts.py +82 -0
  148. afkbotio-1.0.10/afkbot/db/__init__.py +1 -0
  149. afkbotio-1.0.10/afkbot/db/bootstrap.py +11 -0
  150. afkbotio-1.0.10/afkbot/db/bootstrap_runtime.py +188 -0
  151. afkbotio-1.0.10/afkbot/db/engine.py +59 -0
  152. afkbotio-1.0.10/afkbot/db/session.py +31 -0
  153. afkbotio-1.0.10/afkbot/models/__init__.py +69 -0
  154. afkbotio-1.0.10/afkbot/models/automation.py +23 -0
  155. afkbotio-1.0.10/afkbot/models/automation_trigger_cron.py +28 -0
  156. afkbotio-1.0.10/afkbot/models/automation_trigger_webhook.py +40 -0
  157. afkbotio-1.0.10/afkbot/models/automation_webhook_processed_event.py +21 -0
  158. afkbotio-1.0.10/afkbot/models/base.py +21 -0
  159. afkbotio-1.0.10/afkbot/models/channel_binding.py +26 -0
  160. afkbotio-1.0.10/afkbot/models/channel_endpoint.py +24 -0
  161. afkbotio-1.0.10/afkbot/models/channel_ingress_event.py +29 -0
  162. afkbotio-1.0.10/afkbot/models/channel_ingress_pending_event.py +39 -0
  163. afkbotio-1.0.10/afkbot/models/chat_session.py +20 -0
  164. afkbotio-1.0.10/afkbot/models/chat_session_compaction.py +28 -0
  165. afkbotio-1.0.10/afkbot/models/chat_turn.py +27 -0
  166. afkbotio-1.0.10/afkbot/models/chat_turn_idempotency.py +49 -0
  167. afkbotio-1.0.10/afkbot/models/connect_access_token.py +33 -0
  168. afkbotio-1.0.10/afkbot/models/connect_claim_token.py +34 -0
  169. afkbotio-1.0.10/afkbot/models/connect_session_token.py +32 -0
  170. afkbotio-1.0.10/afkbot/models/credential_profile.py +30 -0
  171. afkbotio-1.0.10/afkbot/models/memory_item.py +44 -0
  172. afkbotio-1.0.10/afkbot/models/pending_resume_envelope.py +26 -0
  173. afkbotio-1.0.10/afkbot/models/pending_secure_request.py +33 -0
  174. afkbotio-1.0.10/afkbot/models/profile.py +20 -0
  175. afkbotio-1.0.10/afkbot/models/profile_policy.py +31 -0
  176. afkbotio-1.0.10/afkbot/models/run.py +27 -0
  177. afkbotio-1.0.10/afkbot/models/runlog_event.py +23 -0
  178. afkbotio-1.0.10/afkbot/models/secret.py +18 -0
  179. afkbotio-1.0.10/afkbot/models/subagent_task.py +38 -0
  180. afkbotio-1.0.10/afkbot/models/task.py +59 -0
  181. afkbotio-1.0.10/afkbot/models/task_dependency.py +24 -0
  182. afkbotio-1.0.10/afkbot/models/task_event.py +33 -0
  183. afkbotio-1.0.10/afkbot/models/task_flow.py +32 -0
  184. afkbotio-1.0.10/afkbot/models/task_notification_cursor.py +36 -0
  185. afkbotio-1.0.10/afkbot/models/task_run.py +37 -0
  186. afkbotio-1.0.10/afkbot/models/tool_credential_binding.py +36 -0
  187. afkbotio-1.0.10/afkbot/repositories/__init__.py +72 -0
  188. afkbotio-1.0.10/afkbot/repositories/automation_repo.py +15 -0
  189. afkbotio-1.0.10/afkbot/repositories/automation_repo_claims.py +330 -0
  190. afkbotio-1.0.10/afkbot/repositories/automation_repo_common.py +50 -0
  191. afkbotio-1.0.10/afkbot/repositories/automation_repo_crud.py +293 -0
  192. afkbotio-1.0.10/afkbot/repositories/channel_binding_repo.py +70 -0
  193. afkbotio-1.0.10/afkbot/repositories/channel_endpoint_repo.py +84 -0
  194. afkbotio-1.0.10/afkbot/repositories/channel_ingress_event_repo.py +87 -0
  195. afkbotio-1.0.10/afkbot/repositories/channel_ingress_pending_event_repo.py +111 -0
  196. afkbotio-1.0.10/afkbot/repositories/chat_session_compaction_repo.py +94 -0
  197. afkbotio-1.0.10/afkbot/repositories/chat_session_repo.py +27 -0
  198. afkbotio-1.0.10/afkbot/repositories/chat_turn_idempotency_repo.py +178 -0
  199. afkbotio-1.0.10/afkbot/repositories/chat_turn_repo.py +108 -0
  200. afkbotio-1.0.10/afkbot/repositories/connect_repo.py +259 -0
  201. afkbotio-1.0.10/afkbot/repositories/credentials_repo.py +30 -0
  202. afkbotio-1.0.10/afkbot/repositories/credentials_repo_bindings.py +238 -0
  203. afkbotio-1.0.10/afkbot/repositories/credentials_repo_common.py +56 -0
  204. afkbotio-1.0.10/afkbot/repositories/credentials_repo_profiles.py +176 -0
  205. afkbotio-1.0.10/afkbot/repositories/memory_repo.py +284 -0
  206. afkbotio-1.0.10/afkbot/repositories/memory_search.py +94 -0
  207. afkbotio-1.0.10/afkbot/repositories/pending_resume_envelope_repo.py +68 -0
  208. afkbotio-1.0.10/afkbot/repositories/pending_secure_request_repo.py +135 -0
  209. afkbotio-1.0.10/afkbot/repositories/profile_policy_repo.py +98 -0
  210. afkbotio-1.0.10/afkbot/repositories/profile_repo.py +77 -0
  211. afkbotio-1.0.10/afkbot/repositories/run_repo.py +126 -0
  212. afkbotio-1.0.10/afkbot/repositories/runlog_repo.py +154 -0
  213. afkbotio-1.0.10/afkbot/repositories/subagent_task_repo.py +120 -0
  214. afkbotio-1.0.10/afkbot/repositories/support.py +16 -0
  215. afkbotio-1.0.10/afkbot/repositories/task_flow_repo.py +1057 -0
  216. afkbotio-1.0.10/afkbot/runtime_defaults.py +7 -0
  217. afkbotio-1.0.10/afkbot/services/__init__.py +1 -0
  218. afkbotio-1.0.10/afkbot/services/agent_loop/__init__.py +37 -0
  219. afkbotio-1.0.10/afkbot/services/agent_loop/action_contracts.py +29 -0
  220. afkbotio-1.0.10/afkbot/services/agent_loop/api_runtime.py +300 -0
  221. afkbotio-1.0.10/afkbot/services/agent_loop/api_runtime_resume.py +278 -0
  222. afkbotio-1.0.10/afkbot/services/agent_loop/api_runtime_support.py +236 -0
  223. afkbotio-1.0.10/afkbot/services/agent_loop/api_runtime_turns.py +268 -0
  224. afkbotio-1.0.10/afkbot/services/agent_loop/browser_carryover.py +279 -0
  225. afkbotio-1.0.10/afkbot/services/agent_loop/channel_tool_policy.py +74 -0
  226. afkbotio-1.0.10/afkbot/services/agent_loop/chat_history_builder.py +71 -0
  227. afkbotio-1.0.10/afkbot/services/agent_loop/compaction_summary.py +137 -0
  228. afkbotio-1.0.10/afkbot/services/agent_loop/context_builder.py +438 -0
  229. afkbotio-1.0.10/afkbot/services/agent_loop/execution_posture.py +60 -0
  230. afkbotio-1.0.10/afkbot/services/agent_loop/explicit_requests.py +168 -0
  231. afkbotio-1.0.10/afkbot/services/agent_loop/explicit_skill_runtime.py +115 -0
  232. afkbotio-1.0.10/afkbot/services/agent_loop/interactive_resume.py +110 -0
  233. afkbotio-1.0.10/afkbot/services/agent_loop/llm_iteration_runtime.py +543 -0
  234. afkbotio-1.0.10/afkbot/services/agent_loop/llm_request_compaction.py +320 -0
  235. afkbotio-1.0.10/afkbot/services/agent_loop/llm_request_runtime.py +171 -0
  236. afkbotio-1.0.10/afkbot/services/agent_loop/llm_tool_followup.py +390 -0
  237. afkbotio-1.0.10/afkbot/services/agent_loop/loop.py +411 -0
  238. afkbotio-1.0.10/afkbot/services/agent_loop/loop_sanitizer.py +124 -0
  239. afkbotio-1.0.10/afkbot/services/agent_loop/memory_extraction.py +157 -0
  240. afkbotio-1.0.10/afkbot/services/agent_loop/memory_runtime.py +270 -0
  241. afkbotio-1.0.10/afkbot/services/agent_loop/pending_envelopes.py +267 -0
  242. afkbotio-1.0.10/afkbot/services/agent_loop/planning_policy.py +115 -0
  243. afkbotio-1.0.10/afkbot/services/agent_loop/progress_stream.py +305 -0
  244. afkbotio-1.0.10/afkbot/services/agent_loop/runlog_runtime.py +94 -0
  245. afkbotio-1.0.10/afkbot/services/agent_loop/runtime_factory.py +135 -0
  246. afkbotio-1.0.10/afkbot/services/agent_loop/runtime_facts.py +211 -0
  247. afkbotio-1.0.10/afkbot/services/agent_loop/safety_policy.py +214 -0
  248. afkbotio-1.0.10/afkbot/services/agent_loop/security_guard.py +248 -0
  249. afkbotio-1.0.10/afkbot/services/agent_loop/sensitive_tool_policy.py +64 -0
  250. afkbotio-1.0.10/afkbot/services/agent_loop/session_compaction.py +165 -0
  251. afkbotio-1.0.10/afkbot/services/agent_loop/session_compaction_summarizer.py +121 -0
  252. afkbotio-1.0.10/afkbot/services/agent_loop/session_retention.py +90 -0
  253. afkbotio-1.0.10/afkbot/services/agent_loop/session_skill_affinity.py +108 -0
  254. afkbotio-1.0.10/afkbot/services/agent_loop/sessions.py +70 -0
  255. afkbotio-1.0.10/afkbot/services/agent_loop/skill_router.py +273 -0
  256. afkbotio-1.0.10/afkbot/services/agent_loop/state_machine.py +69 -0
  257. afkbotio-1.0.10/afkbot/services/agent_loop/thinking.py +250 -0
  258. afkbotio-1.0.10/afkbot/services/agent_loop/tool_execution_runtime.py +493 -0
  259. afkbotio-1.0.10/afkbot/services/agent_loop/tool_exposure.py +576 -0
  260. afkbotio-1.0.10/afkbot/services/agent_loop/tool_invocation_gates.py +125 -0
  261. afkbotio-1.0.10/afkbot/services/agent_loop/tool_skill_resolver.py +74 -0
  262. afkbotio-1.0.10/afkbot/services/agent_loop/tracked_turns.py +113 -0
  263. afkbotio-1.0.10/afkbot/services/agent_loop/turn_context.py +99 -0
  264. afkbotio-1.0.10/afkbot/services/agent_loop/turn_execution.py +443 -0
  265. afkbotio-1.0.10/afkbot/services/agent_loop/turn_execution_context.py +108 -0
  266. afkbotio-1.0.10/afkbot/services/agent_loop/turn_finalizer.py +376 -0
  267. afkbotio-1.0.10/afkbot/services/agent_loop/turn_planning_artifacts.py +84 -0
  268. afkbotio-1.0.10/afkbot/services/agent_loop/turn_preparation.py +291 -0
  269. afkbotio-1.0.10/afkbot/services/agent_loop/turn_preparation_support.py +409 -0
  270. afkbotio-1.0.10/afkbot/services/agent_loop/turn_runtime.py +272 -0
  271. afkbotio-1.0.10/afkbot/services/app_catalog.py +180 -0
  272. afkbotio-1.0.10/afkbot/services/apps/__init__.py +5 -0
  273. afkbotio-1.0.10/afkbot/services/apps/action_schema.py +86 -0
  274. afkbotio-1.0.10/afkbot/services/apps/common.py +239 -0
  275. afkbotio-1.0.10/afkbot/services/apps/contracts.py +16 -0
  276. afkbotio-1.0.10/afkbot/services/apps/credential_manifest.py +56 -0
  277. afkbotio-1.0.10/afkbot/services/apps/imap/__init__.py +5 -0
  278. afkbotio-1.0.10/afkbot/services/apps/imap/actions.py +289 -0
  279. afkbotio-1.0.10/afkbot/services/apps/params_validation.py +128 -0
  280. afkbotio-1.0.10/afkbot/services/apps/registry.py +79 -0
  281. afkbotio-1.0.10/afkbot/services/apps/registry_core.py +158 -0
  282. afkbotio-1.0.10/afkbot/services/apps/registry_discovery.py +188 -0
  283. afkbotio-1.0.10/afkbot/services/apps/runtime.py +120 -0
  284. afkbotio-1.0.10/afkbot/services/apps/smtp/__init__.py +5 -0
  285. afkbotio-1.0.10/afkbot/services/apps/smtp/actions.py +303 -0
  286. afkbotio-1.0.10/afkbot/services/apps/telegram/__init__.py +5 -0
  287. afkbotio-1.0.10/afkbot/services/apps/telegram/actions.py +508 -0
  288. afkbotio-1.0.10/afkbot/services/apps/telegram/http_api.py +581 -0
  289. afkbotio-1.0.10/afkbot/services/atomic_writes.py +43 -0
  290. afkbotio-1.0.10/afkbot/services/automations/__init__.py +29 -0
  291. afkbotio-1.0.10/afkbot/services/automations/cli_service.py +178 -0
  292. afkbotio-1.0.10/afkbot/services/automations/context_overrides.py +75 -0
  293. afkbotio-1.0.10/afkbot/services/automations/contracts.py +79 -0
  294. afkbotio-1.0.10/afkbot/services/automations/cron_execution.py +179 -0
  295. afkbotio-1.0.10/afkbot/services/automations/errors.py +12 -0
  296. afkbotio-1.0.10/afkbot/services/automations/lease_runtime.py +66 -0
  297. afkbotio-1.0.10/afkbot/services/automations/loop_factory.py +32 -0
  298. afkbotio-1.0.10/afkbot/services/automations/message_factory.py +37 -0
  299. afkbotio-1.0.10/afkbot/services/automations/metadata.py +130 -0
  300. afkbotio-1.0.10/afkbot/services/automations/payloads.py +92 -0
  301. afkbotio-1.0.10/afkbot/services/automations/repository_support.py +14 -0
  302. afkbotio-1.0.10/afkbot/services/automations/runtime_contracts.py +19 -0
  303. afkbotio-1.0.10/afkbot/services/automations/runtime_daemon.py +391 -0
  304. afkbotio-1.0.10/afkbot/services/automations/runtime_daemon_http.py +121 -0
  305. afkbotio-1.0.10/afkbot/services/automations/runtime_daemon_validation.py +39 -0
  306. afkbotio-1.0.10/afkbot/services/automations/runtime_http.py +271 -0
  307. afkbotio-1.0.10/afkbot/services/automations/runtime_service.py +121 -0
  308. afkbotio-1.0.10/afkbot/services/automations/runtime_target.py +54 -0
  309. afkbotio-1.0.10/afkbot/services/automations/service.py +399 -0
  310. afkbotio-1.0.10/afkbot/services/automations/update_runtime.py +159 -0
  311. afkbotio-1.0.10/afkbot/services/automations/validators.py +189 -0
  312. afkbotio-1.0.10/afkbot/services/automations/webhook_execution.py +199 -0
  313. afkbotio-1.0.10/afkbot/services/automations/webhook_tokens.py +71 -0
  314. afkbotio-1.0.10/afkbot/services/bootstrap_service.py +138 -0
  315. afkbotio-1.0.10/afkbot/services/browser_cdp.py +87 -0
  316. afkbotio-1.0.10/afkbot/services/browser_runtime.py +495 -0
  317. afkbotio-1.0.10/afkbot/services/browser_sessions.py +502 -0
  318. afkbotio-1.0.10/afkbot/services/browser_snapshot.py +254 -0
  319. afkbotio-1.0.10/afkbot/services/channel_routing/__init__.py +58 -0
  320. afkbotio-1.0.10/afkbot/services/channel_routing/contracts.py +129 -0
  321. afkbotio-1.0.10/afkbot/services/channel_routing/policy.py +58 -0
  322. afkbotio-1.0.10/afkbot/services/channel_routing/resolver.py +148 -0
  323. afkbotio-1.0.10/afkbot/services/channel_routing/runtime_target.py +281 -0
  324. afkbotio-1.0.10/afkbot/services/channel_routing/service.py +281 -0
  325. afkbotio-1.0.10/afkbot/services/channels/__init__.py +13 -0
  326. afkbotio-1.0.10/afkbot/services/channels/context_overrides.py +25 -0
  327. afkbotio-1.0.10/afkbot/services/channels/contracts.py +157 -0
  328. afkbotio-1.0.10/afkbot/services/channels/delivery_runtime.py +168 -0
  329. afkbotio-1.0.10/afkbot/services/channels/delivery_telemetry.py +115 -0
  330. afkbotio-1.0.10/afkbot/services/channels/endpoint_contracts.py +425 -0
  331. afkbotio-1.0.10/afkbot/services/channels/endpoint_service.py +314 -0
  332. afkbotio-1.0.10/afkbot/services/channels/ingress_coalescer.py +390 -0
  333. afkbotio-1.0.10/afkbot/services/channels/ingress_journal.py +143 -0
  334. afkbotio-1.0.10/afkbot/services/channels/ingress_persistence.py +166 -0
  335. afkbotio-1.0.10/afkbot/services/channels/reply_humanization.py +177 -0
  336. afkbotio-1.0.10/afkbot/services/channels/reply_policy.py +23 -0
  337. afkbotio-1.0.10/afkbot/services/channels/runtime_lease_registry.py +90 -0
  338. afkbotio-1.0.10/afkbot/services/channels/runtime_manager.py +203 -0
  339. afkbotio-1.0.10/afkbot/services/channels/sender_registry.py +135 -0
  340. afkbotio-1.0.10/afkbot/services/channels/service.py +436 -0
  341. afkbotio-1.0.10/afkbot/services/channels/telegram_polling.py +298 -0
  342. afkbotio-1.0.10/afkbot/services/channels/telegram_polling_runtime.py +434 -0
  343. afkbotio-1.0.10/afkbot/services/channels/telegram_polling_support.py +241 -0
  344. afkbotio-1.0.10/afkbot/services/channels/telegram_timeouts.py +11 -0
  345. afkbotio-1.0.10/afkbot/services/channels/telethon_user/__init__.py +39 -0
  346. afkbotio-1.0.10/afkbot/services/channels/telethon_user/auth.py +494 -0
  347. afkbotio-1.0.10/afkbot/services/channels/telethon_user/client.py +112 -0
  348. afkbotio-1.0.10/afkbot/services/channels/telethon_user/contracts.py +213 -0
  349. afkbotio-1.0.10/afkbot/services/channels/telethon_user/discovery.py +124 -0
  350. afkbotio-1.0.10/afkbot/services/channels/telethon_user/errors.py +19 -0
  351. afkbotio-1.0.10/afkbot/services/channels/telethon_user/normalization.py +139 -0
  352. afkbotio-1.0.10/afkbot/services/channels/telethon_user/qr_terminal.py +41 -0
  353. afkbotio-1.0.10/afkbot/services/channels/telethon_user/runtime_support.py +128 -0
  354. afkbotio-1.0.10/afkbot/services/channels/telethon_user/service.py +391 -0
  355. afkbotio-1.0.10/afkbot/services/channels/telethon_user/service_events.py +160 -0
  356. afkbotio-1.0.10/afkbot/services/channels/telethon_user/service_ingress.py +473 -0
  357. afkbotio-1.0.10/afkbot/services/channels/telethon_user/service_lifecycle.py +280 -0
  358. afkbotio-1.0.10/afkbot/services/channels/telethon_user/service_watcher.py +367 -0
  359. afkbotio-1.0.10/afkbot/services/channels/telethon_user/watcher.py +434 -0
  360. afkbotio-1.0.10/afkbot/services/channels/tool_profiles.py +82 -0
  361. afkbotio-1.0.10/afkbot/services/chat_session/__init__.py +1 -0
  362. afkbotio-1.0.10/afkbot/services/chat_session/activity_state.py +161 -0
  363. afkbotio-1.0.10/afkbot/services/chat_session/input_catalog.py +219 -0
  364. afkbotio-1.0.10/afkbot/services/chat_session/interrupts.py +44 -0
  365. afkbotio-1.0.10/afkbot/services/chat_session/plan_ledger.py +69 -0
  366. afkbotio-1.0.10/afkbot/services/chat_session/repl_controller.py +220 -0
  367. afkbotio-1.0.10/afkbot/services/chat_session/repl_input.py +16 -0
  368. afkbotio-1.0.10/afkbot/services/chat_session/repl_queue.py +39 -0
  369. afkbotio-1.0.10/afkbot/services/chat_session/session_state.py +27 -0
  370. afkbotio-1.0.10/afkbot/services/chat_session/text_utils.py +12 -0
  371. afkbotio-1.0.10/afkbot/services/chat_session/turn_flow.py +243 -0
  372. afkbotio-1.0.10/afkbot/services/chat_session/turn_planning.py +66 -0
  373. afkbotio-1.0.10/afkbot/services/config/__init__.py +0 -0
  374. afkbotio-1.0.10/afkbot/services/config/env_file.py +38 -0
  375. afkbotio-1.0.10/afkbot/services/connect/__init__.py +33 -0
  376. afkbotio-1.0.10/afkbot/services/connect/access.py +103 -0
  377. afkbotio-1.0.10/afkbot/services/connect/context_snapshot.py +127 -0
  378. afkbotio-1.0.10/afkbot/services/connect/contracts.py +85 -0
  379. afkbotio-1.0.10/afkbot/services/connect/helpers.py +226 -0
  380. afkbotio-1.0.10/afkbot/services/connect/issue.py +107 -0
  381. afkbotio-1.0.10/afkbot/services/connect/rate_limit.py +145 -0
  382. afkbotio-1.0.10/afkbot/services/connect/service.py +110 -0
  383. afkbotio-1.0.10/afkbot/services/connect/session_runtime.py +39 -0
  384. afkbotio-1.0.10/afkbot/services/connect/tokens.py +337 -0
  385. afkbotio-1.0.10/afkbot/services/credentials/__init__.py +28 -0
  386. afkbotio-1.0.10/afkbot/services/credentials/binding_mixin.py +279 -0
  387. afkbotio-1.0.10/afkbot/services/credentials/cli_service.py +148 -0
  388. afkbotio-1.0.10/afkbot/services/credentials/contracts.py +40 -0
  389. afkbotio-1.0.10/afkbot/services/credentials/env_alias.py +23 -0
  390. afkbotio-1.0.10/afkbot/services/credentials/errors.py +19 -0
  391. afkbotio-1.0.10/afkbot/services/credentials/metadata.py +47 -0
  392. afkbotio-1.0.10/afkbot/services/credentials/profile_mixin.py +98 -0
  393. afkbotio-1.0.10/afkbot/services/credentials/recovery.py +64 -0
  394. afkbotio-1.0.10/afkbot/services/credentials/registry.py +80 -0
  395. afkbotio-1.0.10/afkbot/services/credentials/repository_support.py +99 -0
  396. afkbotio-1.0.10/afkbot/services/credentials/runtime_mixin.py +254 -0
  397. afkbotio-1.0.10/afkbot/services/credentials/runtime_resolver.py +241 -0
  398. afkbotio-1.0.10/afkbot/services/credentials/service.py +55 -0
  399. afkbotio-1.0.10/afkbot/services/credentials/targets.py +158 -0
  400. afkbotio-1.0.10/afkbot/services/credentials/vault.py +66 -0
  401. afkbotio-1.0.10/afkbot/services/diffs/__init__.py +16 -0
  402. afkbotio-1.0.10/afkbot/services/diffs/artifacts.py +144 -0
  403. afkbotio-1.0.10/afkbot/services/diffs/renderer.py +132 -0
  404. afkbotio-1.0.10/afkbot/services/health/__init__.py +39 -0
  405. afkbotio-1.0.10/afkbot/services/health/channel_diagnostics.py +234 -0
  406. afkbotio-1.0.10/afkbot/services/health/contracts.py +202 -0
  407. afkbotio-1.0.10/afkbot/services/health/integration_matrix.py +380 -0
  408. afkbotio-1.0.10/afkbot/services/health/integration_probes.py +430 -0
  409. afkbotio-1.0.10/afkbot/services/health/runtime_support.py +81 -0
  410. afkbotio-1.0.10/afkbot/services/health/service.py +38 -0
  411. afkbotio-1.0.10/afkbot/services/ingress/__init__.py +25 -0
  412. afkbotio-1.0.10/afkbot/services/ingress/context_overrides.py +108 -0
  413. afkbotio-1.0.10/afkbot/services/ingress/contracts.py +17 -0
  414. afkbotio-1.0.10/afkbot/services/ingress/policy_overlay.py +33 -0
  415. afkbotio-1.0.10/afkbot/services/install_source.py +143 -0
  416. afkbotio-1.0.10/afkbot/services/lightpanda_runtime.py +459 -0
  417. afkbotio-1.0.10/afkbot/services/llm/__init__.py +26 -0
  418. afkbotio-1.0.10/afkbot/services/llm/contracts.py +133 -0
  419. afkbotio-1.0.10/afkbot/services/llm/github_copilot_token.py +137 -0
  420. afkbotio-1.0.10/afkbot/services/llm/minimax_portal_oauth.py +162 -0
  421. afkbotio-1.0.10/afkbot/services/llm/mock_provider.py +23 -0
  422. afkbotio-1.0.10/afkbot/services/llm/provider.py +753 -0
  423. afkbotio-1.0.10/afkbot/services/llm/provider_catalog.py +285 -0
  424. afkbotio-1.0.10/afkbot/services/llm/provider_payload_runtime.py +407 -0
  425. afkbotio-1.0.10/afkbot/services/llm/provider_settings.py +137 -0
  426. afkbotio-1.0.10/afkbot/services/llm/reasoning.py +24 -0
  427. afkbotio-1.0.10/afkbot/services/llm/request_gate.py +105 -0
  428. afkbotio-1.0.10/afkbot/services/llm/token_verifier.py +231 -0
  429. afkbotio-1.0.10/afkbot/services/llm/tool_name_codec.py +89 -0
  430. afkbotio-1.0.10/afkbot/services/llm_timeout_policy.py +35 -0
  431. afkbotio-1.0.10/afkbot/services/managed_install.py +380 -0
  432. afkbotio-1.0.10/afkbot/services/mcp_integration/__init__.py +41 -0
  433. afkbotio-1.0.10/afkbot/services/mcp_integration/contracts.py +123 -0
  434. afkbotio-1.0.10/afkbot/services/mcp_integration/errors.py +11 -0
  435. afkbotio-1.0.10/afkbot/services/mcp_integration/ide_adapter.py +28 -0
  436. afkbotio-1.0.10/afkbot/services/mcp_integration/operator_contracts.py +88 -0
  437. afkbotio-1.0.10/afkbot/services/mcp_integration/path_scope.py +41 -0
  438. afkbotio-1.0.10/afkbot/services/mcp_integration/payloads.py +49 -0
  439. afkbotio-1.0.10/afkbot/services/mcp_integration/profile_loader.py +111 -0
  440. afkbotio-1.0.10/afkbot/services/mcp_integration/profile_store.py +110 -0
  441. afkbotio-1.0.10/afkbot/services/mcp_integration/service.py +399 -0
  442. afkbotio-1.0.10/afkbot/services/mcp_integration/url_resolver.py +125 -0
  443. afkbotio-1.0.10/afkbot/services/mcp_integration/validator.py +131 -0
  444. afkbotio-1.0.10/afkbot/services/mcp_runtime/__init__.py +1 -0
  445. afkbotio-1.0.10/afkbot/services/mcp_runtime/catalog.py +358 -0
  446. afkbotio-1.0.10/afkbot/services/mcp_runtime/client.py +136 -0
  447. afkbotio-1.0.10/afkbot/services/mcp_runtime/contracts.py +18 -0
  448. afkbotio-1.0.10/afkbot/services/mcp_runtime/service.py +175 -0
  449. afkbotio-1.0.10/afkbot/services/mcp_runtime/tool_bridge.py +303 -0
  450. afkbotio-1.0.10/afkbot/services/memory/__init__.py +35 -0
  451. afkbotio-1.0.10/afkbot/services/memory/contracts.py +148 -0
  452. afkbotio-1.0.10/afkbot/services/memory/digest.py +104 -0
  453. afkbotio-1.0.10/afkbot/services/memory/runtime_scope.py +431 -0
  454. afkbotio-1.0.10/afkbot/services/memory/service.py +481 -0
  455. afkbotio-1.0.10/afkbot/services/naming.py +74 -0
  456. afkbotio-1.0.10/afkbot/services/ops/__init__.py +0 -0
  457. afkbotio-1.0.10/afkbot/services/path_scope.py +24 -0
  458. afkbotio-1.0.10/afkbot/services/plugins/__init__.py +18 -0
  459. afkbotio-1.0.10/afkbot/services/plugins/catalog.py +40 -0
  460. afkbotio-1.0.10/afkbot/services/plugins/config_store.py +51 -0
  461. afkbotio-1.0.10/afkbot/services/plugins/contracts.py +382 -0
  462. afkbotio-1.0.10/afkbot/services/plugins/runtime_registry.py +186 -0
  463. afkbotio-1.0.10/afkbot/services/plugins/scaffold.py +273 -0
  464. afkbotio-1.0.10/afkbot/services/plugins/service.py +710 -0
  465. afkbotio-1.0.10/afkbot/services/policy/__init__.py +57 -0
  466. afkbotio-1.0.10/afkbot/services/policy/contracts.py +27 -0
  467. afkbotio-1.0.10/afkbot/services/policy/engine.py +228 -0
  468. afkbotio-1.0.10/afkbot/services/policy/evaluation_helpers.py +484 -0
  469. afkbotio-1.0.10/afkbot/services/policy/file_access.py +146 -0
  470. afkbotio-1.0.10/afkbot/services/policy/presets_catalog.py +183 -0
  471. afkbotio-1.0.10/afkbot/services/policy/presets_contracts.py +77 -0
  472. afkbotio-1.0.10/afkbot/services/policy/presets_resolver.py +105 -0
  473. afkbotio-1.0.10/afkbot/services/policy/profile_files_lock.py +95 -0
  474. afkbotio-1.0.10/afkbot/services/profile_id.py +19 -0
  475. afkbotio-1.0.10/afkbot/services/profile_runtime/__init__.py +49 -0
  476. afkbotio-1.0.10/afkbot/services/profile_runtime/bootstrap_service.py +188 -0
  477. afkbotio-1.0.10/afkbot/services/profile_runtime/contracts.py +222 -0
  478. afkbotio-1.0.10/afkbot/services/profile_runtime/deletion.py +134 -0
  479. afkbotio-1.0.10/afkbot/services/profile_runtime/runtime_config.py +227 -0
  480. afkbotio-1.0.10/afkbot/services/profile_runtime/runtime_secrets.py +272 -0
  481. afkbotio-1.0.10/afkbot/services/profile_runtime/service.py +552 -0
  482. afkbotio-1.0.10/afkbot/services/runtime_ports.py +112 -0
  483. afkbotio-1.0.10/afkbot/services/session_ids.py +32 -0
  484. afkbotio-1.0.10/afkbot/services/setup/__init__.py +19 -0
  485. afkbotio-1.0.10/afkbot/services/setup/command_runtime.py +412 -0
  486. afkbotio-1.0.10/afkbot/services/setup/config_resolver.py +545 -0
  487. afkbotio-1.0.10/afkbot/services/setup/contracts.py +85 -0
  488. afkbotio-1.0.10/afkbot/services/setup/defaults.py +244 -0
  489. afkbotio-1.0.10/afkbot/services/setup/policy_inputs.py +432 -0
  490. afkbotio-1.0.10/afkbot/services/setup/policy_setup.py +60 -0
  491. afkbotio-1.0.10/afkbot/services/setup/profile_resolution.py +499 -0
  492. afkbotio-1.0.10/afkbot/services/setup/project_cleanup.py +58 -0
  493. afkbotio-1.0.10/afkbot/services/setup/provider_inputs.py +233 -0
  494. afkbotio-1.0.10/afkbot/services/setup/provider_network.py +531 -0
  495. afkbotio-1.0.10/afkbot/services/setup/provider_secrets.py +833 -0
  496. afkbotio-1.0.10/afkbot/services/setup/runtime_store.py +153 -0
  497. afkbotio-1.0.10/afkbot/services/setup/state.py +183 -0
  498. afkbotio-1.0.10/afkbot/services/skills/__init__.py +43 -0
  499. afkbotio-1.0.10/afkbot/services/skills/doctor.py +216 -0
  500. afkbotio-1.0.10/afkbot/services/skills/loader_availability.py +106 -0
  501. afkbotio-1.0.10/afkbot/services/skills/loader_contracts.py +60 -0
  502. afkbotio-1.0.10/afkbot/services/skills/loader_manifest.py +308 -0
  503. afkbotio-1.0.10/afkbot/services/skills/loader_service.py +343 -0
  504. afkbotio-1.0.10/afkbot/services/skills/markdown.py +201 -0
  505. afkbotio-1.0.10/afkbot/services/skills/marketplace_contracts.py +86 -0
  506. afkbotio-1.0.10/afkbot/services/skills/marketplace_fetch.py +141 -0
  507. afkbotio-1.0.10/afkbot/services/skills/marketplace_payloads.py +56 -0
  508. afkbotio-1.0.10/afkbot/services/skills/marketplace_popularity.py +294 -0
  509. afkbotio-1.0.10/afkbot/services/skills/marketplace_service.py +506 -0
  510. afkbotio-1.0.10/afkbot/services/skills/marketplace_sources.py +370 -0
  511. afkbotio-1.0.10/afkbot/services/skills/normalization.py +233 -0
  512. afkbotio-1.0.10/afkbot/services/skills/profile_service.py +311 -0
  513. afkbotio-1.0.10/afkbot/services/skills/skills.py +21 -0
  514. afkbotio-1.0.10/afkbot/services/subagents/__init__.py +49 -0
  515. afkbotio-1.0.10/afkbot/services/subagents/contracts.py +50 -0
  516. afkbotio-1.0.10/afkbot/services/subagents/executor.py +99 -0
  517. afkbotio-1.0.10/afkbot/services/subagents/launcher.py +46 -0
  518. afkbotio-1.0.10/afkbot/services/subagents/lifecycle.py +176 -0
  519. afkbotio-1.0.10/afkbot/services/subagents/loader.py +126 -0
  520. afkbotio-1.0.10/afkbot/services/subagents/profile_service.py +140 -0
  521. afkbotio-1.0.10/afkbot/services/subagents/registry.py +34 -0
  522. afkbotio-1.0.10/afkbot/services/subagents/runner.py +173 -0
  523. afkbotio-1.0.10/afkbot/services/subagents/runtime_policy.py +54 -0
  524. afkbotio-1.0.10/afkbot/services/subagents/runtime_support.py +164 -0
  525. afkbotio-1.0.10/afkbot/services/subagents/service.py +120 -0
  526. afkbotio-1.0.10/afkbot/services/subagents/state_transitions.py +114 -0
  527. afkbotio-1.0.10/afkbot/services/subagents/task_store.py +208 -0
  528. afkbotio-1.0.10/afkbot/services/task_flow/__init__.py +45 -0
  529. afkbotio-1.0.10/afkbot/services/task_flow/cli_service.py +731 -0
  530. afkbotio-1.0.10/afkbot/services/task_flow/context_overrides.py +85 -0
  531. afkbotio-1.0.10/afkbot/services/task_flow/contracts.py +239 -0
  532. afkbotio-1.0.10/afkbot/services/task_flow/errors.py +12 -0
  533. afkbotio-1.0.10/afkbot/services/task_flow/event_log.py +42 -0
  534. afkbotio-1.0.10/afkbot/services/task_flow/human_ref.py +20 -0
  535. afkbotio-1.0.10/afkbot/services/task_flow/lease_runtime.py +92 -0
  536. afkbotio-1.0.10/afkbot/services/task_flow/message_factory.py +15 -0
  537. afkbotio-1.0.10/afkbot/services/task_flow/runtime_daemon.py +135 -0
  538. afkbotio-1.0.10/afkbot/services/task_flow/runtime_service.py +888 -0
  539. afkbotio-1.0.10/afkbot/services/task_flow/runtime_target.py +64 -0
  540. afkbotio-1.0.10/afkbot/services/task_flow/service.py +1931 -0
  541. afkbotio-1.0.10/afkbot/services/telegram_text.py +42 -0
  542. afkbotio-1.0.10/afkbot/services/tools/__init__.py +12 -0
  543. afkbotio-1.0.10/afkbot/services/tools/base.py +144 -0
  544. afkbotio-1.0.10/afkbot/services/tools/credential_placeholders.py +320 -0
  545. afkbotio-1.0.10/afkbot/services/tools/network/__init__.py +15 -0
  546. afkbotio-1.0.10/afkbot/services/tools/network/http_guard.py +75 -0
  547. afkbotio-1.0.10/afkbot/services/tools/network/pinned_opener.py +174 -0
  548. afkbotio-1.0.10/afkbot/services/tools/params.py +85 -0
  549. afkbotio-1.0.10/afkbot/services/tools/plugins/__init__.py +251 -0
  550. afkbotio-1.0.10/afkbot/services/tools/plugins/app_list/__init__.py +6 -0
  551. afkbotio-1.0.10/afkbot/services/tools/plugins/app_list/plugin.py +71 -0
  552. afkbotio-1.0.10/afkbot/services/tools/plugins/app_run/__init__.py +5 -0
  553. afkbotio-1.0.10/afkbot/services/tools/plugins/app_run/plugin.py +138 -0
  554. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_create/__init__.py +5 -0
  555. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_create/plugin.py +81 -0
  556. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_delete/__init__.py +5 -0
  557. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_delete/plugin.py +46 -0
  558. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_get/__init__.py +5 -0
  559. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_get/plugin.py +46 -0
  560. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_list/__init__.py +5 -0
  561. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_list/plugin.py +50 -0
  562. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_update/__init__.py +5 -0
  563. afkbotio-1.0.10/afkbot/services/tools/plugins/automation_update/plugin.py +65 -0
  564. afkbotio-1.0.10/afkbot/services/tools/plugins/bash_exec/__init__.py +5 -0
  565. afkbotio-1.0.10/afkbot/services/tools/plugins/bash_exec/plugin.py +784 -0
  566. afkbotio-1.0.10/afkbot/services/tools/plugins/bash_exec/runtime.py +429 -0
  567. afkbotio-1.0.10/afkbot/services/tools/plugins/browser_control/__init__.py +5 -0
  568. afkbotio-1.0.10/afkbot/services/tools/plugins/browser_control/plugin.py +928 -0
  569. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_create/__init__.py +5 -0
  570. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_create/plugin.py +79 -0
  571. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_delete/__init__.py +5 -0
  572. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_delete/plugin.py +80 -0
  573. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_list/__init__.py +5 -0
  574. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_list/plugin.py +124 -0
  575. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_request/__init__.py +5 -0
  576. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_request/plugin.py +126 -0
  577. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_update/__init__.py +5 -0
  578. afkbotio-1.0.10/afkbot/services/tools/plugins/credentials_update/plugin.py +77 -0
  579. afkbotio-1.0.10/afkbot/services/tools/plugins/debug_echo/__init__.py +9 -0
  580. afkbotio-1.0.10/afkbot/services/tools/plugins/debug_echo/plugin.py +43 -0
  581. afkbotio-1.0.10/afkbot/services/tools/plugins/diffs_render/__init__.py +5 -0
  582. afkbotio-1.0.10/afkbot/services/tools/plugins/diffs_render/plugin.py +165 -0
  583. afkbotio-1.0.10/afkbot/services/tools/plugins/file_edit/__init__.py +5 -0
  584. afkbotio-1.0.10/afkbot/services/tools/plugins/file_edit/plugin.py +117 -0
  585. afkbotio-1.0.10/afkbot/services/tools/plugins/file_list/__init__.py +5 -0
  586. afkbotio-1.0.10/afkbot/services/tools/plugins/file_list/plugin.py +104 -0
  587. afkbotio-1.0.10/afkbot/services/tools/plugins/file_read/__init__.py +5 -0
  588. afkbotio-1.0.10/afkbot/services/tools/plugins/file_read/plugin.py +78 -0
  589. afkbotio-1.0.10/afkbot/services/tools/plugins/file_search/__init__.py +5 -0
  590. afkbotio-1.0.10/afkbot/services/tools/plugins/file_search/plugin.py +131 -0
  591. afkbotio-1.0.10/afkbot/services/tools/plugins/file_write/__init__.py +5 -0
  592. afkbotio-1.0.10/afkbot/services/tools/plugins/file_write/plugin.py +114 -0
  593. afkbotio-1.0.10/afkbot/services/tools/plugins/http_request/__init__.py +5 -0
  594. afkbotio-1.0.10/afkbot/services/tools/plugins/http_request/plugin.py +333 -0
  595. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_delete/__init__.py +5 -0
  596. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_delete/plugin.py +54 -0
  597. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_get/__init__.py +5 -0
  598. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_get/plugin.py +54 -0
  599. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_list/__init__.py +5 -0
  600. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_list/plugin.py +57 -0
  601. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_shared.py +22 -0
  602. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_upsert/__init__.py +5 -0
  603. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_upsert/plugin.py +79 -0
  604. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_validate/__init__.py +5 -0
  605. afkbotio-1.0.10/afkbot/services/tools/plugins/mcp_profile_validate/plugin.py +42 -0
  606. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_delete/__init__.py +5 -0
  607. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_delete/plugin.py +53 -0
  608. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_digest/__init__.py +5 -0
  609. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_digest/plugin.py +114 -0
  610. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_list/__init__.py +5 -0
  611. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_list/plugin.py +69 -0
  612. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_promote/__init__.py +5 -0
  613. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_promote/plugin.py +54 -0
  614. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_search/__init__.py +5 -0
  615. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_search/plugin.py +104 -0
  616. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_shared.py +180 -0
  617. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_upsert/__init__.py +5 -0
  618. afkbotio-1.0.10/afkbot/services/tools/plugins/memory_upsert/plugin.py +60 -0
  619. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_marketplace/__init__.py +9 -0
  620. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_marketplace/plugin.py +253 -0
  621. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_delete/__init__.py +6 -0
  622. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_delete/plugin.py +50 -0
  623. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_get/__init__.py +6 -0
  624. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_get/plugin.py +54 -0
  625. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_list/__init__.py +6 -0
  626. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_list/plugin.py +93 -0
  627. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_upsert/__init__.py +6 -0
  628. afkbotio-1.0.10/afkbot/services/tools/plugins/skill_profile_upsert/plugin.py +53 -0
  629. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_delete/__init__.py +6 -0
  630. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_delete/plugin.py +50 -0
  631. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_get/__init__.py +6 -0
  632. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_get/plugin.py +47 -0
  633. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_list/__init__.py +6 -0
  634. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_list/plugin.py +43 -0
  635. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_upsert/__init__.py +6 -0
  636. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_profile_upsert/plugin.py +53 -0
  637. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_result/__init__.py +5 -0
  638. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_result/plugin.py +80 -0
  639. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_run/__init__.py +5 -0
  640. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_run/plugin.py +92 -0
  641. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_wait/__init__.py +5 -0
  642. afkbotio-1.0.10/afkbot/services/tools/plugins/subagent_wait/plugin.py +75 -0
  643. afkbotio-1.0.10/afkbot/services/tools/plugins/task_board/__init__.py +5 -0
  644. afkbotio-1.0.10/afkbot/services/tools/plugins/task_board/plugin.py +65 -0
  645. afkbotio-1.0.10/afkbot/services/tools/plugins/task_comment_add/__init__.py +5 -0
  646. afkbotio-1.0.10/afkbot/services/tools/plugins/task_comment_add/plugin.py +65 -0
  647. afkbotio-1.0.10/afkbot/services/tools/plugins/task_comment_list/__init__.py +5 -0
  648. afkbotio-1.0.10/afkbot/services/tools/plugins/task_comment_list/plugin.py +59 -0
  649. afkbotio-1.0.10/afkbot/services/tools/plugins/task_create/__init__.py +5 -0
  650. afkbotio-1.0.10/afkbot/services/tools/plugins/task_create/plugin.py +88 -0
  651. afkbotio-1.0.10/afkbot/services/tools/plugins/task_dependency_add/__init__.py +5 -0
  652. afkbotio-1.0.10/afkbot/services/tools/plugins/task_dependency_add/plugin.py +65 -0
  653. afkbotio-1.0.10/afkbot/services/tools/plugins/task_dependency_list/__init__.py +5 -0
  654. afkbotio-1.0.10/afkbot/services/tools/plugins/task_dependency_list/plugin.py +64 -0
  655. afkbotio-1.0.10/afkbot/services/tools/plugins/task_dependency_remove/__init__.py +5 -0
  656. afkbotio-1.0.10/afkbot/services/tools/plugins/task_dependency_remove/plugin.py +70 -0
  657. afkbotio-1.0.10/afkbot/services/tools/plugins/task_event_list/__init__.py +5 -0
  658. afkbotio-1.0.10/afkbot/services/tools/plugins/task_event_list/plugin.py +59 -0
  659. afkbotio-1.0.10/afkbot/services/tools/plugins/task_flow_create/__init__.py +5 -0
  660. afkbotio-1.0.10/afkbot/services/tools/plugins/task_flow_create/plugin.py +72 -0
  661. afkbotio-1.0.10/afkbot/services/tools/plugins/task_flow_get/__init__.py +5 -0
  662. afkbotio-1.0.10/afkbot/services/tools/plugins/task_flow_get/plugin.py +55 -0
  663. afkbotio-1.0.10/afkbot/services/tools/plugins/task_flow_list/__init__.py +5 -0
  664. afkbotio-1.0.10/afkbot/services/tools/plugins/task_flow_list/plugin.py +58 -0
  665. afkbotio-1.0.10/afkbot/services/tools/plugins/task_get/__init__.py +5 -0
  666. afkbotio-1.0.10/afkbot/services/tools/plugins/task_get/plugin.py +55 -0
  667. afkbotio-1.0.10/afkbot/services/tools/plugins/task_inbox/__init__.py +5 -0
  668. afkbotio-1.0.10/afkbot/services/tools/plugins/task_inbox/plugin.py +70 -0
  669. afkbotio-1.0.10/afkbot/services/tools/plugins/task_list/__init__.py +5 -0
  670. afkbotio-1.0.10/afkbot/services/tools/plugins/task_list/plugin.py +66 -0
  671. afkbotio-1.0.10/afkbot/services/tools/plugins/task_maintenance_sweep/__init__.py +5 -0
  672. afkbotio-1.0.10/afkbot/services/tools/plugins/task_maintenance_sweep/plugin.py +92 -0
  673. afkbotio-1.0.10/afkbot/services/tools/plugins/task_review_approve/__init__.py +5 -0
  674. afkbotio-1.0.10/afkbot/services/tools/plugins/task_review_approve/plugin.py +63 -0
  675. afkbotio-1.0.10/afkbot/services/tools/plugins/task_review_list/__init__.py +5 -0
  676. afkbotio-1.0.10/afkbot/services/tools/plugins/task_review_list/plugin.py +65 -0
  677. afkbotio-1.0.10/afkbot/services/tools/plugins/task_review_request_changes/__init__.py +5 -0
  678. afkbotio-1.0.10/afkbot/services/tools/plugins/task_review_request_changes/plugin.py +73 -0
  679. afkbotio-1.0.10/afkbot/services/tools/plugins/task_run_get/__init__.py +5 -0
  680. afkbotio-1.0.10/afkbot/services/tools/plugins/task_run_get/plugin.py +57 -0
  681. afkbotio-1.0.10/afkbot/services/tools/plugins/task_run_list/__init__.py +5 -0
  682. afkbotio-1.0.10/afkbot/services/tools/plugins/task_run_list/plugin.py +59 -0
  683. afkbotio-1.0.10/afkbot/services/tools/plugins/task_scope.py +55 -0
  684. afkbotio-1.0.10/afkbot/services/tools/plugins/task_stale_list/__init__.py +5 -0
  685. afkbotio-1.0.10/afkbot/services/tools/plugins/task_stale_list/plugin.py +60 -0
  686. afkbotio-1.0.10/afkbot/services/tools/plugins/task_update/__init__.py +5 -0
  687. afkbotio-1.0.10/afkbot/services/tools/plugins/task_update/plugin.py +88 -0
  688. afkbotio-1.0.10/afkbot/services/tools/plugins/web_fetch/__init__.py +5 -0
  689. afkbotio-1.0.10/afkbot/services/tools/plugins/web_fetch/plugin.py +337 -0
  690. afkbotio-1.0.10/afkbot/services/tools/plugins/web_search/__init__.py +5 -0
  691. afkbotio-1.0.10/afkbot/services/tools/plugins/web_search/plugin.py +194 -0
  692. afkbotio-1.0.10/afkbot/services/tools/registry.py +84 -0
  693. afkbotio-1.0.10/afkbot/services/tools/text_snapshots.py +45 -0
  694. afkbotio-1.0.10/afkbot/services/tools/workspace.py +158 -0
  695. afkbotio-1.0.10/afkbot/services/update_runtime.py +1070 -0
  696. afkbotio-1.0.10/afkbot/services/upgrade/__init__.py +10 -0
  697. afkbotio-1.0.10/afkbot/services/upgrade/contracts.py +23 -0
  698. afkbotio-1.0.10/afkbot/services/upgrade/service.py +534 -0
  699. afkbotio-1.0.10/afkbot/settings.py +765 -0
  700. afkbotio-1.0.10/afkbot/skills/aider-cli/SKILL.md +127 -0
  701. afkbotio-1.0.10/afkbot/skills/automation/SKILL.md +75 -0
  702. afkbotio-1.0.10/afkbot/skills/bash-exec/SKILL.md +65 -0
  703. afkbotio-1.0.10/afkbot/skills/browser-control/SKILL.md +78 -0
  704. afkbotio-1.0.10/afkbot/skills/claude-code/SKILL.md +134 -0
  705. afkbotio-1.0.10/afkbot/skills/codex-cli/SKILL.md +119 -0
  706. afkbotio-1.0.10/afkbot/skills/credentials/SKILL.md +48 -0
  707. afkbotio-1.0.10/afkbot/skills/diffs/SKILL.md +65 -0
  708. afkbotio-1.0.10/afkbot/skills/file-ops/SKILL.md +60 -0
  709. afkbotio-1.0.10/afkbot/skills/gemini-cli/SKILL.md +126 -0
  710. afkbotio-1.0.10/afkbot/skills/http-request/SKILL.md +39 -0
  711. afkbotio-1.0.10/afkbot/skills/imap/SKILL.md +104 -0
  712. afkbotio-1.0.10/afkbot/skills/mcp-manager/SKILL.md +54 -0
  713. afkbotio-1.0.10/afkbot/skills/memory/SKILL.md +51 -0
  714. afkbotio-1.0.10/afkbot/skills/security-secrets/SKILL.md +24 -0
  715. afkbotio-1.0.10/afkbot/skills/skill-creator/SKILL.md +139 -0
  716. afkbotio-1.0.10/afkbot/skills/smtp/SKILL.md +88 -0
  717. afkbotio-1.0.10/afkbot/skills/subagent-manager/SKILL.md +41 -0
  718. afkbotio-1.0.10/afkbot/skills/sysadmin/SKILL.md +54 -0
  719. afkbotio-1.0.10/afkbot/skills/taskflow/SKILL.md +154 -0
  720. afkbotio-1.0.10/afkbot/skills/telegram/SKILL.md +129 -0
  721. afkbotio-1.0.10/afkbot/skills/web-search/SKILL.md +33 -0
  722. afkbotio-1.0.10/afkbot/subagents/cron.md +25 -0
  723. afkbotio-1.0.10/afkbot/subagents/researcher.md +11 -0
  724. afkbotio-1.0.10/afkbot/subagents/webhook.md +24 -0
  725. afkbotio-1.0.10/afkbot/version.py +113 -0
  726. afkbotio-1.0.10/afkbot/workers/__init__.py +2 -0
  727. afkbotio-1.0.10/afkbot/workers/subagent_worker.py +30 -0
  728. afkbotio-1.0.10/afkbotio.egg-info/PKG-INFO +414 -0
  729. afkbotio-1.0.10/afkbotio.egg-info/SOURCES.txt +733 -0
  730. afkbotio-1.0.10/afkbotio.egg-info/dependency_links.txt +1 -0
  731. afkbotio-1.0.10/afkbotio.egg-info/entry_points.txt +2 -0
  732. afkbotio-1.0.10/afkbotio.egg-info/requires.txt +23 -0
  733. afkbotio-1.0.10/afkbotio.egg-info/top_level.txt +1 -0
  734. afkbotio-1.0.10/pyproject.toml +99 -0
  735. afkbotio-1.0.10/setup.cfg +4 -0
@@ -0,0 +1,88 @@
1
+ # Sustainable Use License
2
+
3
+ Version 1.0
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject
14
+ to the limitations below.
15
+
16
+ ## Limitations
17
+
18
+ You may use or modify the software only for your own internal business
19
+ purposes or for non-commercial or personal use. You may distribute the
20
+ software or provide it to others only if you do so free of charge for
21
+ non-commercial purposes. You may not alter, remove, or obscure any licensing,
22
+ copyright, or other notices of the licensor in the software. Any use of the
23
+ licensor's trademarks is subject to applicable law.
24
+
25
+ ## Patents
26
+
27
+ The licensor grants you a license, under any patent claims the licensor can
28
+ license, or becomes able to license, to make, have made, use, sell, offer for
29
+ sale, import and have imported the software, in each case subject to the
30
+ limitations and conditions in this license. This license does not cover any
31
+ patent claims that you cause to be infringed by modifications or additions to
32
+ the software. If you or your company make any written claim that the software
33
+ infringes or contributes to infringement of any patent, your patent license
34
+ for the software granted under these terms ends immediately. If your company
35
+ makes such a claim, your patent license ends immediately for work on behalf of
36
+ your company.
37
+
38
+ ## Notices
39
+
40
+ You must ensure that anyone who gets a copy of any part of the software from
41
+ you also gets a copy of these terms. If you modify the software, you must
42
+ include in any modified copies of the software a prominent notice stating that
43
+ you have modified the software.
44
+
45
+ ## No Other Rights
46
+
47
+ These terms do not imply any licenses other than those expressly granted in
48
+ these terms.
49
+
50
+ ## Termination
51
+
52
+ If you use the software in violation of these terms, such use is not licensed,
53
+ and your license will automatically terminate. If the licensor provides you
54
+ with a notice of your violation, and you cease all violation of this license
55
+ no later than 30 days after you receive that notice, your license will be
56
+ reinstated retroactively. However, if you violate these terms after such
57
+ reinstatement, any additional violation of these terms will cause your license
58
+ to terminate automatically and permanently.
59
+
60
+ ## No Liability
61
+
62
+ As far as the law allows, the software comes as is, without any warranty or
63
+ condition, and the licensor will not be liable to you for any damages arising
64
+ out of these terms or the use or nature of the software, under any kind of
65
+ legal claim.
66
+
67
+ ## Definitions
68
+
69
+ The "licensor" is the entity offering these terms.
70
+
71
+ The "software" is the software the licensor makes available under these terms,
72
+ including any portion of it.
73
+
74
+ "You" refers to the individual or entity agreeing to these terms.
75
+
76
+ "Your company" is any legal entity, sole proprietorship, or other kind of
77
+ organization that you work for, plus all organizations that have control over,
78
+ are under the control of, or are under common control with that organization.
79
+ Control means ownership of substantially all the assets of an entity, or the
80
+ power to direct its management and policies by vote, contract, or otherwise.
81
+ Control can be direct or indirect.
82
+
83
+ "Your license" is the license granted to you for the software under these
84
+ terms.
85
+
86
+ "Use" means anything you do with the software requiring your license.
87
+
88
+ "Trademark" means trademarks, service marks, and similar rights.
@@ -0,0 +1,414 @@
1
+ Metadata-Version: 2.4
2
+ Name: afkbotio
3
+ Version: 1.0.10
4
+ Summary: Source-available local AI runtime and CLI for AFKBOT
5
+ License-Expression: LicenseRef-AFKBOT-Sustainable-Use-1.0
6
+ Project-URL: Homepage, https://afkbot.io
7
+ Project-URL: Documentation, https://afkbot.io/docs
8
+ Project-URL: Repository, https://github.com/afkbot-io/afkbotio
9
+ Project-URL: Issues, https://github.com/afkbot-io/afkbotio/issues
10
+ Project-URL: Changelog, https://github.com/afkbot-io/afkbotio/blob/main/CHANGELOG.md
11
+ Project-URL: License, https://github.com/afkbot-io/afkbotio/blob/main/LICENSE
12
+ Keywords: ai,agent,automation,cli,mcp
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Console
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Build Tools
18
+ Requires-Python: >=3.12
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: sqlalchemy>=2.0
22
+ Requires-Dist: greenlet>=3.0
23
+ Requires-Dist: aiosqlite>=0.20
24
+ Requires-Dist: cryptography>=42.0
25
+ Requires-Dist: pydantic-settings>=2.2
26
+ Requires-Dist: qrcode>=8.2
27
+ Requires-Dist: fastapi>=0.115
28
+ Requires-Dist: httpx>=0.27
29
+ Requires-Dist: socksio>=1.0
30
+ Requires-Dist: telethon<2,>=1.42
31
+ Requires-Dist: uvicorn>=0.30
32
+ Requires-Dist: websockets>=12.0
33
+ Requires-Dist: typer>=0.12
34
+ Requires-Dist: prompt-toolkit>=3.0
35
+ Requires-Dist: jsonschema>=4.26
36
+ Requires-Dist: mcp<2,>=1.26
37
+ Requires-Dist: packaging>=24.0
38
+ Provides-Extra: dev
39
+ Requires-Dist: pytest>=8.0; extra == "dev"
40
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
41
+ Requires-Dist: ruff>=0.4; extra == "dev"
42
+ Requires-Dist: mypy>=1.10; extra == "dev"
43
+ Dynamic: license-file
44
+
45
+ # AFKBOT
46
+
47
+ AFKBOT is a source-available local AI runtime and CLI for chat-driven workflows,
48
+ tool calling, automations, and profile-scoped agent environments.
49
+
50
+ Documentation lives at [afkbot.io/docs](https://afkbot.io/docs). The project site is [afkbot.io](https://afkbot.io).
51
+ Use the docs site for setup, configuration, MCP, automations, and command reference.
52
+
53
+ ## What AFKBOT does
54
+
55
+ - Runs local chat sessions with tool access, planning, and configurable reasoning.
56
+ - Supports multiple LLM providers in setup/profile runtime (`openrouter`, `openai`, `claude`, `moonshot`, `deepseek`, `xai`, `qwen`, and `custom`).
57
+ - Provides a CLI-first workflow for setup, chat, health checks, and runtime control.
58
+ - Supports profile-scoped configuration, secrets, permissions, and tool exposure.
59
+ - Includes browser, web, app, MCP, automation, and channel integration surfaces.
60
+ - Exposes a local runtime and API layer for longer-running workflows.
61
+
62
+ ## License Model
63
+
64
+ - AFKBOT source code is available under the `Sustainable Use License 1.0`.
65
+ - Personal use, non-commercial use, and internal business use are allowed.
66
+ - Forking and modifying AFKBOT are allowed, but redistribution must stay free of charge and non-commercial.
67
+ - You may not sell AFKBOT, sell copies of AFKBOT, resell the source code, or offer AFKBOT as a paid hosted or white-label service without separate permission.
68
+ - The repository license does not grant any trademark rights to the AFKBOT name, logo, or branding.
69
+
70
+ ## Requirements
71
+
72
+ - Python 3.12 or newer for manual source installs
73
+ - `uv` recommended for local development
74
+ - SQLite is the default runtime database for AFKBOT
75
+ - The hosted installers bootstrap `uv`, install AFKBOT as an isolated uv tool, and keep runtime state outside the app source tree
76
+
77
+ ## Install
78
+
79
+ Hosted installer for macOS/Linux:
80
+
81
+ ```bash
82
+ curl -fsSL https://afkbot.io/install.sh | bash
83
+ # open a new terminal after install
84
+ afk setup
85
+ afk doctor
86
+ afk chat
87
+ ```
88
+
89
+ Hosted installer for Windows PowerShell:
90
+
91
+ ```powershell
92
+ powershell -c "irm https://afkbot.io/install.ps1 | iex"
93
+ # open a new terminal after install
94
+ afk setup
95
+ afk doctor
96
+ afk chat
97
+ ```
98
+
99
+ Local installer from a source checkout:
100
+
101
+ ```bash
102
+ bash scripts/install.sh --repo-url "file://$PWD"
103
+ # open a new terminal after install
104
+ afk setup
105
+ afk doctor
106
+ afk chat
107
+ ```
108
+
109
+ Common installer flags:
110
+
111
+ ```bash
112
+ # installer and setup prompts in Russian
113
+ curl -fsSL https://afkbot.io/install.sh | bash -s -- --lang ru
114
+
115
+ # install from a specific Git ref
116
+ curl -fsSL https://afkbot.io/install.sh | bash -s -- --git-ref v1.0.10
117
+
118
+ # install from a local checkout
119
+ bash scripts/install.sh --repo-url "file://$PWD"
120
+
121
+ # show actions without mutating the machine
122
+ bash scripts/install.sh --dry-run
123
+
124
+ # skip bootstrap-only setup seeding during install
125
+ bash scripts/install.sh --skip-setup
126
+ ```
127
+
128
+ What the installer does:
129
+
130
+ - bootstraps `uv` into the user-local bin directory if needed
131
+ - installs AFKBOT as an isolated `uv tool`
132
+ - updates shell integration so `afk` is available in new terminals
133
+ - seeds the runtime root with bootstrap-only setup metadata
134
+ - remembers the install source so `afk update` can refresh the same source later
135
+
136
+ The installer is idempotent. Rerun it to refresh the installed tool in place, or use `afk update`.
137
+
138
+ ## First Run
139
+
140
+ For normal usage, the first-run flow is:
141
+
142
+ ```bash
143
+ afk setup
144
+ afk doctor
145
+ afk chat
146
+ ```
147
+
148
+ - `afk setup` configures the default profile, provider, policy, locale, and runtime defaults
149
+ - `afk setup` also asks whether `afk chat` should check for AFKBOT updates before opening chat
150
+ - `afk doctor` prints the effective runtime/chat ports and checks local readiness
151
+ - `afk chat` is the main entrypoint for real work
152
+
153
+ If update notices are enabled in setup, interactive `afk chat` checks for a newer AFKBOT build before opening the session and asks:
154
+
155
+ - `Yes`
156
+ - `No`
157
+ - `Remind in a week`
158
+
159
+ `No` continues into chat immediately and does not save a permanent skip. `Remind in a week` suppresses all update prompts for seven days. If you disable update notices in setup, chat will not ask at startup.
160
+
161
+ The runtime chooses and persists a non-default local port automatically for fresh installs, so use `afk doctor` when you need the actual `runtime_port` or `api_port`.
162
+
163
+ Manual local source setup with `uv`:
164
+
165
+ ```bash
166
+ uv sync --extra dev
167
+ uv run afk setup
168
+ uv run afk doctor
169
+ uv run afk chat
170
+ ```
171
+
172
+ Manual local source setup with `pip`:
173
+
174
+ ```bash
175
+ python3.12 -m venv .venv
176
+ source .venv/bin/activate
177
+ pip install -e .[dev]
178
+ afk setup
179
+ afk doctor
180
+ afk chat
181
+ ```
182
+
183
+ ## Local Runtime
184
+
185
+ AFKBOT uses one local SQLite database by default for runtime state, semantic memory, and chat metadata:
186
+
187
+ ```bash
188
+ export AFKBOT_DB_URL='sqlite+aiosqlite:///./afkbot.db'
189
+ ```
190
+
191
+ Start the local runtime/API:
192
+
193
+ ```bash
194
+ uv run afk start
195
+ uv run afk doctor
196
+ # doctor prints the effective runtime_port and api_port for this install
197
+ ```
198
+
199
+ Webhook trigger example:
200
+
201
+ ```bash
202
+ curl -X POST http://127.0.0.1:<runtime_port>/v1/automations/<profile_id>/webhook/<token> \
203
+ -H 'Content-Type: application/json' \
204
+ -d '{"event_id":"manual-test-1"}'
205
+ ```
206
+
207
+ Useful commands:
208
+
209
+ ```bash
210
+ uv run afk version
211
+ uv run afk doctor
212
+ uv run afk setup
213
+ uv run afk chat --message "Summarize this project"
214
+ uv run afk automation list --profile default
215
+ uv run afk plugin list
216
+ uv run afk mcp list
217
+ uv run afk profile show default
218
+ uv run afk update
219
+ ```
220
+
221
+ ## Plugins
222
+
223
+ AFKBOT supports installable embedded plugins that extend the local platform with:
224
+
225
+ - API routers
226
+ - static web apps
227
+ - tool factories
228
+ - skill directories
229
+ - app registrars
230
+ - optional startup and shutdown hooks
231
+
232
+ Current curated plugins:
233
+
234
+ - `afkbotui`: unified AFKBOT web workspace for automations today and future operator surfaces
235
+
236
+ Typical operator flow:
237
+
238
+ ```bash
239
+ uv run afk plugin list
240
+ uv run afk plugin install
241
+ uv run afk plugin inspect afkbotui
242
+ uv run afk plugin config-get afkbotui
243
+ uv run afk plugin update afkbotui
244
+ ```
245
+
246
+ `afk plugin install` now works as a small wizard:
247
+
248
+ - it shows curated plugins that are not installed yet
249
+ - today the curated list contains only `afkbotui`
250
+ - the last option is a custom GitHub source, where you can paste a GitHub URL or `github:owner/repo@ref`
251
+
252
+ You can still install directly without the wizard:
253
+
254
+ ```bash
255
+ uv run afk plugin install github:afkbot-io/afkbotuiplugin@main
256
+ ```
257
+
258
+ Direct `afk plugin install <source>` also still accepts a local path when you want to install a plugin from a checkout on disk.
259
+
260
+ The current curated external plugin is AFKBOT UI. Today it provides the web workspace for automations and is intended to expand into the main operator surface for Task Flow, subagents, MCP, AI settings, and profile management. The older kanban-specific example is no longer the curated plugin path. After installation and `afk start`, it mounts:
261
+
262
+ - API: `/v1/plugins/afkbotui/...`
263
+ - UI: `/plugins/afkbotui`
264
+
265
+ Plugin install state lives under the AFKBOT runtime root in `/plugins/...` and is treated as local machine state, not repository content.
266
+
267
+ ## Channels Quickstart
268
+
269
+ AFKBOT can attach chat transports to a profile for inbound routing and operator workflows.
270
+ Use the docs site for the full command reference; the examples below cover the common setup paths.
271
+
272
+ Telegram bot polling channel:
273
+
274
+ ```bash
275
+ # guided wizard; omit channel_id to let AFKBOT suggest one
276
+ afk channel telegram add
277
+
278
+ # fully explicit example
279
+ afk channel telegram add support-bot --profile default --credential-profile support-bot
280
+ afk channel telegram status
281
+ afk channel telegram show support-bot
282
+ ```
283
+
284
+ Telethon user-account channel:
285
+
286
+ ```bash
287
+ # guided wizard; omit channel_id to let AFKBOT suggest one
288
+ afk channel telethon add
289
+
290
+ # fully explicit example
291
+ afk channel telethon add personal-user --profile default --credential-profile personal-user
292
+ afk channel telethon status --probe
293
+ afk channel telethon show personal-user
294
+ ```
295
+
296
+ Notes:
297
+
298
+ - Interactive channel setup explains required credentials inline: Telegram bot token comes from `@BotFather`; Telethon `api_id` and `api_hash` come from `my.telegram.org`.
299
+ - If you skip the Telethon session string during setup, finish login later with `afk channel telethon authorize <channel_id>`.
300
+ - Interactive prompt language follows this order: explicit `--lang` or `--ru`, then the project's saved `prompt_language`, then the current system locale.
301
+
302
+ ## MCP Quickstart
303
+
304
+ AFKBOT supports profile-local MCP configuration plus runtime MCP tool discovery.
305
+
306
+ Manual CLI flow:
307
+
308
+ ```bash
309
+ # connect one MCP endpoint URL to the default profile
310
+ afk mcp connect https://example.com/mcp --profile default --secret-ref mcp_example_token
311
+
312
+ # inspect the saved config
313
+ afk mcp get example --profile default
314
+
315
+ # validate effective MCP files for the profile
316
+ afk mcp validate --profile default
317
+
318
+ # list all saved MCP servers, including disabled entries
319
+ afk mcp list --profile default --show-disabled
320
+ ```
321
+
322
+ You can still use the explicit form:
323
+
324
+ ```bash
325
+ afk mcp add --profile default --url https://example.com/mcp --secret-ref mcp_example_token
326
+ ```
327
+
328
+ Chat-driven flow:
329
+
330
+ ```text
331
+ Connect this MCP endpoint to my default profile: https://example.com/mcp
332
+ Show me what was saved and validate it.
333
+ ```
334
+
335
+ Notes:
336
+
337
+ - Use the actual MCP endpoint URL, not a generic product homepage.
338
+ - `afk mcp` and `mcp.profile.*` manage profile config.
339
+ - `mcp.tools.list` and `mcp.tools.call` are the runtime bridge used after a compatible remote MCP server is configured and exposed.
340
+ - If the MCP server needs auth, store only refs in MCP config such as `secret_refs` or `env_refs`; do not hardcode plaintext secrets into MCP JSON.
341
+
342
+ Managed-install maintenance:
343
+
344
+ ```bash
345
+ afk update
346
+ bash scripts/uninstall.sh --yes
347
+ ```
348
+
349
+ ```powershell
350
+ afk update
351
+ powershell -ExecutionPolicy Bypass -File .\scripts\uninstall.ps1 -Yes
352
+ ```
353
+
354
+ Hosted installers use `uv tool install` under the hood. Advanced equivalents:
355
+
356
+ ```bash
357
+ uv tool install --python 3.12 --reinstall https://github.com/afkbot-io/afkbotio/archive/main.tar.gz
358
+ afk update
359
+ uv tool uninstall afkbotio
360
+ ```
361
+
362
+ ## Configuration
363
+
364
+ - Environment-based configuration examples live in [`.env.example`](https://github.com/afkbot-io/afkbotio/blob/main/.env.example).
365
+ - Setup/provider selection supports OpenRouter, OpenAI, Claude, Moonshot (Kimi), DeepSeek, xAI, Qwen, and custom OpenAI-compatible endpoints.
366
+ - Runtime secrets should be configured through `afk setup`, `afk profile`, or credential commands, not committed into the repository.
367
+ - Manual source setups use a local SQLite database and a local AFKBOT runtime.
368
+ - New installs create the current SQLite schema directly; no legacy migration chain is required.
369
+ - Full setup guidance and user documentation are published at [afkbot.io/docs](https://afkbot.io/docs).
370
+
371
+ ## Development
372
+
373
+ Install the development environment and run the standard checks:
374
+
375
+ ```bash
376
+ uv sync --extra dev
377
+ uv run ruff check afkbot tests
378
+ uv run mypy afkbot tests
379
+ uv run pytest -q
380
+ ```
381
+
382
+ ## PyPI Release
383
+
384
+ The project builds clean Python distributions and passes `twine check`:
385
+
386
+ ```bash
387
+ uv build
388
+ uvx twine check dist/*
389
+ ```
390
+
391
+ For a safe dry run, upload to TestPyPI first:
392
+
393
+ ```bash
394
+ uvx twine upload --repository testpypi dist/*
395
+ ```
396
+
397
+ This repository also includes a GitHub Actions publish workflow prepared for trusted publishing:
398
+
399
+ - `workflow_dispatch`: builds distributions and publishes to `testpypi`
400
+ - `push` on `v*` tags: builds distributions, attaches them to the GitHub release, and publishes to `pypi`
401
+
402
+ Before using the workflow, create matching trusted publishing environments in PyPI:
403
+
404
+ - `testpypi` for `https://test.pypi.org/p/afkbotio`
405
+ - `pypi` for `https://pypi.org/project/afkbotio/`
406
+
407
+ ## License
408
+
409
+ AFKBOT is distributed under the `Sustainable Use License 1.0`.
410
+
411
+ - See [`LICENSE`](https://github.com/afkbot-io/afkbotio/blob/main/LICENSE) for the full license text.
412
+ - See [`LICENSE_FAQ.md`](https://github.com/afkbot-io/afkbotio/blob/main/LICENSE_FAQ.md) for practical allowed/not-allowed examples.
413
+ - See [`COMMERCIAL_LICENSE.md`](https://github.com/afkbot-io/afkbotio/blob/main/COMMERCIAL_LICENSE.md) for commercial-use guidance.
414
+ - See [`TRADEMARKS.md`](https://github.com/afkbot-io/afkbotio/blob/main/TRADEMARKS.md) for brand and name usage rules.