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.
- pymc_bot/__init__.py +91 -0
- pymc_bot/__main__.py +1047 -0
- pymc_bot/agent.py +1342 -0
- pymc_bot/antiafk.py +455 -0
- pymc_bot/auth.py +361 -0
- pymc_bot/autopilot.py +678 -0
- pymc_bot/backends.py +1776 -0
- pymc_bot/bench.py +50 -0
- pymc_bot/bot.py +1386 -0
- pymc_bot/config.py +600 -0
- pymc_bot/cortex.py +356 -0
- pymc_bot/data/mobs.json +2796 -0
- pymc_bot/events.py +120 -0
- pymc_bot/experience.py +157 -0
- pymc_bot/features.py +799 -0
- pymc_bot/fleet.py +733 -0
- pymc_bot/goals.py +264 -0
- pymc_bot/hosting.py +364 -0
- pymc_bot/inventory.py +593 -0
- pymc_bot/knowledge.py +591 -0
- pymc_bot/llm_dataset.py +1144 -0
- pymc_bot/llm_reasoning.py +438 -0
- pymc_bot/llm_tools.py +240 -0
- pymc_bot/llm_train.py +5813 -0
- pymc_bot/llm_webdata.py +2420 -0
- pymc_bot/local_model.py +531 -0
- pymc_bot/mind.py +730 -0
- pymc_bot/mobs.py +361 -0
- pymc_bot/models.py +621 -0
- pymc_bot/node/minecraft_bridge.js +2529 -0
- pymc_bot/node/package.json +11 -0
- pymc_bot/node/potions.js +61 -0
- pymc_bot/node/probe.js +121 -0
- pymc_bot/node_setup.py +1010 -0
- pymc_bot/ollama.py +177 -0
- pymc_bot/ollama_stub.py +273 -0
- pymc_bot/playtime.py +729 -0
- pymc_bot/recovery.py +113 -0
- pymc_bot/routing.py +48 -0
- pymc_bot/server.py +1563 -0
- pymc_bot/sim_bench.py +80 -0
- pymc_bot/skills.py +667 -0
- pymc_bot/tech_plan.py +106 -0
- pymc_bot/train.py +790 -0
- pymc_bot/web/app.js +1830 -0
- pymc_bot/web/favicon.svg +7 -0
- pymc_bot/web/fx.js +641 -0
- pymc_bot/web/index.html +792 -0
- pymc_bot/web/login.html +90 -0
- pymc_bot/web/login.js +58 -0
- pymc_bot/web/styles.css +780 -0
- pymc_bot/world_memory.py +136 -0
- pymc_bot-0.1.0.dist-info/METADATA +1204 -0
- pymc_bot-0.1.0.dist-info/RECORD +58 -0
- pymc_bot-0.1.0.dist-info/WHEEL +5 -0
- pymc_bot-0.1.0.dist-info/entry_points.txt +2 -0
- pymc_bot-0.1.0.dist-info/licenses/LICENSE +75 -0
- 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
|
+
}
|