pymc-bot 0.1.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 (58) hide show
  1. pymc_bot/__init__.py +91 -0
  2. pymc_bot/__main__.py +1047 -0
  3. pymc_bot/agent.py +1342 -0
  4. pymc_bot/antiafk.py +455 -0
  5. pymc_bot/auth.py +361 -0
  6. pymc_bot/autopilot.py +678 -0
  7. pymc_bot/backends.py +1776 -0
  8. pymc_bot/bench.py +50 -0
  9. pymc_bot/bot.py +1386 -0
  10. pymc_bot/config.py +600 -0
  11. pymc_bot/cortex.py +356 -0
  12. pymc_bot/data/mobs.json +2796 -0
  13. pymc_bot/events.py +120 -0
  14. pymc_bot/experience.py +157 -0
  15. pymc_bot/features.py +799 -0
  16. pymc_bot/fleet.py +733 -0
  17. pymc_bot/goals.py +264 -0
  18. pymc_bot/hosting.py +364 -0
  19. pymc_bot/inventory.py +593 -0
  20. pymc_bot/knowledge.py +591 -0
  21. pymc_bot/llm_dataset.py +1144 -0
  22. pymc_bot/llm_reasoning.py +438 -0
  23. pymc_bot/llm_tools.py +240 -0
  24. pymc_bot/llm_train.py +5813 -0
  25. pymc_bot/llm_webdata.py +2420 -0
  26. pymc_bot/local_model.py +531 -0
  27. pymc_bot/mind.py +730 -0
  28. pymc_bot/mobs.py +361 -0
  29. pymc_bot/models.py +621 -0
  30. pymc_bot/node/minecraft_bridge.js +2529 -0
  31. pymc_bot/node/package.json +11 -0
  32. pymc_bot/node/potions.js +61 -0
  33. pymc_bot/node/probe.js +121 -0
  34. pymc_bot/node_setup.py +1010 -0
  35. pymc_bot/ollama.py +177 -0
  36. pymc_bot/ollama_stub.py +273 -0
  37. pymc_bot/playtime.py +729 -0
  38. pymc_bot/recovery.py +113 -0
  39. pymc_bot/routing.py +48 -0
  40. pymc_bot/server.py +1563 -0
  41. pymc_bot/sim_bench.py +80 -0
  42. pymc_bot/skills.py +667 -0
  43. pymc_bot/tech_plan.py +106 -0
  44. pymc_bot/train.py +790 -0
  45. pymc_bot/web/app.js +1830 -0
  46. pymc_bot/web/favicon.svg +7 -0
  47. pymc_bot/web/fx.js +641 -0
  48. pymc_bot/web/index.html +792 -0
  49. pymc_bot/web/login.html +90 -0
  50. pymc_bot/web/login.js +58 -0
  51. pymc_bot/web/styles.css +780 -0
  52. pymc_bot/world_memory.py +136 -0
  53. pymc_bot-0.1.0.dist-info/METADATA +1204 -0
  54. pymc_bot-0.1.0.dist-info/RECORD +58 -0
  55. pymc_bot-0.1.0.dist-info/WHEEL +5 -0
  56. pymc_bot-0.1.0.dist-info/entry_points.txt +2 -0
  57. pymc_bot-0.1.0.dist-info/licenses/LICENSE +75 -0
  58. pymc_bot-0.1.0.dist-info/top_level.txt +1 -0
pymc_bot/__init__.py ADDED
@@ -0,0 +1,91 @@
1
+ """PyMC_Bot -- a Python-controlled Minecraft player bot.
2
+
3
+ The bot connects to a Minecraft server in *cracked* (offline-mode) or
4
+ Microsoft-account mode, exposes a small REST/WebSocket config page served by
5
+ Uvicorn, and can optionally hand the wheel to a local Ollama model so the bot
6
+ decides for itself how to move around, chat, mine and follow players.
7
+
8
+ Layout
9
+ ------
10
+ ``pymc_bot.config`` pydantic settings + JSON persistence
11
+ ``pymc_bot.events`` thread-safe event log with async subscribers
12
+ ``pymc_bot.backends`` simulated backend + Node/mineflayer protocol adapter
13
+ ``pymc_bot.bot`` high level player controller (move, goto, follow, mine...)
14
+ ``pymc_bot.ollama`` tiny Ollama HTTP client
15
+ ``pymc_bot.agent`` the LLM decision loop + heuristic fallback policy
16
+ ``pymc_bot.server`` FastAPI app / Uvicorn entry point
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ __version__ = "0.1.0"
22
+
23
+ # --------------------------------------------------------------------- credits
24
+ # One source of truth for authorship: the panel footer and About dialog, the
25
+ # ``/api/about`` endpoint, ``python -m pymc_bot about``/``--version``, the
26
+ # OpenAPI docs and the mod metadata all point at these values.
27
+ __author__ = "codero-sus"
28
+ __author_url__ = "https://github.com/codero-sus"
29
+ __website__ = "https://the-codero.web.app/"
30
+ __websites__ = ("https://codero.is-a.dev", __website__) # every site of codero-sus, shown together
31
+ __repository__ = "https://github.com/codero-sus/PyMC_Bot"
32
+ __license__ = "PolyForm-Noncommercial-1.0.0"
33
+ __license_url__ = "https://polyformproject.org/licenses/noncommercial/1.0.0"
34
+ MADE_WITH = "Made with \u2764\ufe0f by codero-sus"
35
+
36
+ __all__ = [
37
+ "MADE_WITH",
38
+ "__author__",
39
+ "__author_url__",
40
+ "__license__",
41
+ "__license_url__",
42
+ "__repository__",
43
+ "__version__",
44
+ "__website__",
45
+ "__websites__",
46
+ "about",
47
+ "credit_line",
48
+ ]
49
+
50
+
51
+ def credit_line() -> str:
52
+ """One line for banners: ``PyMC_Bot 0.1.0 by codero-sus (GitHub) - website``."""
53
+ return f"PyMC_Bot {__version__} by {__author__} ({__author_url__}) \u00b7 " + " \u00b7 ".join(__websites__)
54
+
55
+
56
+ def about() -> dict:
57
+ """Authorship and credits, as served by ``GET /api/about``."""
58
+ return {
59
+ "name": "PyMC_Bot",
60
+ "version": __version__,
61
+ "author": __author__,
62
+ "author_github": __author_url__,
63
+ "website": __website__,
64
+ "websites": list(__websites__),
65
+ "repository": __repository__,
66
+ "license": __license__,
67
+ "license_url": __license_url__,
68
+ "license_summary": "free for personal, non-commercial use",
69
+ "made_with": MADE_WITH,
70
+ "credits": [
71
+ {
72
+ "name": "PyMC_Bot",
73
+ "role": "bot, control panel, fleet, anti-AFK, playtime training, Fabric mod",
74
+ "by": __author__,
75
+ "url": __repository__,
76
+ },
77
+ {
78
+ "name": "Cortex LLMHoster",
79
+ "role": "optional self-hosted LLM brain (OpenAI-compatible)",
80
+ "by": __author__,
81
+ "url": "https://github.com/codero-sus/Cortex_LLMHoster",
82
+ },
83
+ ],
84
+ "built_with": [
85
+ {"name": "FastAPI + Uvicorn", "url": "https://fastapi.tiangolo.com/"},
86
+ {"name": "mineflayer", "url": "https://github.com/PrismarineJS/mineflayer"},
87
+ {"name": "Fabric", "url": "https://fabricmc.net/"},
88
+ {"name": "Ollama", "url": "https://ollama.com/"},
89
+ {"name": "NumPy / PyTorch", "url": "https://numpy.org/"},
90
+ ],
91
+ }