opencommand 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.
- opencommand/__init__.py +4 -0
- opencommand/cli.py +375 -0
- opencommand/core/agent.py +91 -0
- opencommand/core/config.py +65 -0
- opencommand/core/errors.py +23 -0
- opencommand/core/logging.py +65 -0
- opencommand/core/supervisor.py +81 -0
- opencommand/core/tools.py +136 -0
- opencommand/engine/__init__.py +66 -0
- opencommand/engine/runner.py +275 -0
- opencommand/modules/knowledge.py +85 -0
- opencommand/modules/memory/MEMORY.md +14 -0
- opencommand/modules/skills/bash.md +14 -0
- opencommand/modules/skills/powershell.md +15 -0
- opencommand/modules/skills/python.md +20 -0
- opencommand/modules/skills/system.md +38 -0
- opencommand/modules/system/automatic.py +151 -0
- opencommand/modules/system/cron.py +193 -0
- opencommand/modules/system/notify.py +85 -0
- opencommand/modules/system/platform.py +197 -0
- opencommand/modules/templates.py +227 -0
- opencommand/modules/tools/desktop.py +127 -0
- opencommand/modules/tools/files.py +82 -0
- opencommand/modules/tools/instructions.py +163 -0
- opencommand/modules/tools/memory.py +78 -0
- opencommand/modules/tools/playwright.py +61 -0
- opencommand/modules/tools/research.py +46 -0
- opencommand/modules/tools/system.py +163 -0
- opencommand/modules/tools/terminal.py +53 -0
- opencommand/providers/provider.py +157 -0
- opencommand/swarm/agents/commander.py +530 -0
- opencommand/swarm/agents/worker.py +26 -0
- opencommand/tui/dashboard.py +41 -0
- opencommand-0.1.0.dist-info/METADATA +76 -0
- opencommand-0.1.0.dist-info/RECORD +37 -0
- opencommand-0.1.0.dist-info/WHEEL +4 -0
- opencommand-0.1.0.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Worker: executes a single task via the AgentLoop and reports back.
|
|
2
|
+
|
|
3
|
+
Workers are spawned by the Commander and supervised by the Supervisor. Each
|
|
4
|
+
worker runs its own AgentLoop with the shared tool registry, completing one
|
|
5
|
+
concrete task and returning a concise result.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from ...core.agent import AgentLoop
|
|
11
|
+
from ...core.tools import ToolRegistry
|
|
12
|
+
from ...providers.provider import BaseProvider
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Worker:
|
|
16
|
+
"""Wraps an AgentLoop for one assigned task."""
|
|
17
|
+
|
|
18
|
+
def __init__(self, provider: BaseProvider, tools: ToolRegistry, name: str = "worker") -> None:
|
|
19
|
+
self.provider = provider
|
|
20
|
+
self.tools = tools
|
|
21
|
+
self.name = name
|
|
22
|
+
self.loop = AgentLoop(provider, tools, platform="this machine")
|
|
23
|
+
|
|
24
|
+
async def execute(self, task: str, max_steps: int = 40) -> str:
|
|
25
|
+
return await self.loop.run(task, max_steps=max_steps)
|
|
26
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Live swarm dashboard built with asciimatics.
|
|
2
|
+
|
|
3
|
+
Shows the supervisor's worker handles, their status, and a log feed. This is a
|
|
4
|
+
standalone viewer; the Commander/Supervisor drive the actual work and push
|
|
5
|
+
status here via a shared Supervisor instance.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from asciimatics.screen import Screen
|
|
11
|
+
from asciimatics.scene import Scene
|
|
12
|
+
from asciimatics.widgets import Frame, TextBox, Widget
|
|
13
|
+
|
|
14
|
+
from ..core.supervisor import Supervisor
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DashboardFrame(Frame):
|
|
18
|
+
def __init__(self, screen, supervisor: Supervisor) -> None:
|
|
19
|
+
super().__init__(screen, screen.height, screen.width, title="OpenCommand Swarm")
|
|
20
|
+
self._supervisor = supervisor
|
|
21
|
+
self._log = TextBox(Widget.FILL_FRAME, readonly=True, name="log")
|
|
22
|
+
|
|
23
|
+
def update(self, frame_no: int) -> None:
|
|
24
|
+
lines = [self._supervisor.summary(), "", "Recent activity:"]
|
|
25
|
+
for h in self._supervisor.handles.values():
|
|
26
|
+
if h.result:
|
|
27
|
+
lines.append(f" {h.name}: {h.result[:80]}")
|
|
28
|
+
elif h.error:
|
|
29
|
+
lines.append(f" {h.name}: ERR {h.error[:80]}")
|
|
30
|
+
self._log.value = "\n".join(lines)
|
|
31
|
+
super().update(frame_no)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def run_dashboard(supervisor: Supervisor | None = None) -> None:
|
|
35
|
+
sup = supervisor or Supervisor()
|
|
36
|
+
|
|
37
|
+
def demo(screen) -> None:
|
|
38
|
+
frame = DashboardFrame(screen, sup)
|
|
39
|
+
screen.play([Scene([frame], -1)], stop_on_resize=True)
|
|
40
|
+
|
|
41
|
+
Screen.wrap(demo)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: opencommand
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first swarm agent framework: a Commander plans and dispatches a swarm of Workers that research, code, test, and interactively drive the computer to complete long-horizon codebase goals.
|
|
5
|
+
Author: DSiENT
|
|
6
|
+
Author-email: DSiENT <w.caskey7@gmail.com>
|
|
7
|
+
Requires-Dist: asciimatics>=1.15.0
|
|
8
|
+
Requires-Dist: click>=8.4.2
|
|
9
|
+
Requires-Dist: playwright>=1.61.0
|
|
10
|
+
Requires-Dist: pyautogui>=0.9.54
|
|
11
|
+
Requires-Dist: pynput>=1.8.2
|
|
12
|
+
Requires-Dist: requests>=2.34.2
|
|
13
|
+
Requires-Dist: mss>=9.0.0
|
|
14
|
+
Requires-Dist: pillow>=11.0.0
|
|
15
|
+
Requires-Dist: llama-cpp-python>=0.3.33
|
|
16
|
+
Requires-Dist: watchdog>=6.0.0
|
|
17
|
+
Requires-Dist: ntfy>=2.7.1
|
|
18
|
+
Requires-Python: >=3.14
|
|
19
|
+
Project-URL: Homepage, https://github.com/D5-Interactive/OpenCommand
|
|
20
|
+
Project-URL: Repository, https://github.com/D5-Interactive/OpenCommand
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# OpenCommand
|
|
24
|
+
|
|
25
|
+
Local-first swarm agent framework. A **Commander** model plans and dispatches a
|
|
26
|
+
swarm of **Workers** that research, code, test, and interactively drive the
|
|
27
|
+
computer (mouse, keyboard, screen) to complete long-horizon codebase goals.
|
|
28
|
+
|
|
29
|
+
Everything runs **embedded** — models are GGUF files loaded directly with
|
|
30
|
+
`llama-cpp-python` (no API servers, no network at runtime). Designed for
|
|
31
|
+
**Python 3.14** (free-threaded).
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Run without installing (ephemeral):
|
|
37
|
+
uv tool run opencommand --help
|
|
38
|
+
|
|
39
|
+
# Or install globally:
|
|
40
|
+
uv tool install opencommand
|
|
41
|
+
playwright install # optional, for the playwright tool
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> **Note:** the `llama-cpp-python` prebuilt CPU wheel may crash on older CPUs
|
|
45
|
+
> (illegal-instruction). If so, rebuild from source with AVX2:
|
|
46
|
+
> ```bat
|
|
47
|
+
> call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
|
|
48
|
+
> set CMAKE_ARGS=-DGGML_AVX2=ON
|
|
49
|
+
> uv pip install --no-binary llama-cpp-python --no-cache llama-cpp-python
|
|
50
|
+
> ```
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
opencommand models list # list built-in embedded models
|
|
56
|
+
opencommand models pull all # download GGUF models into ./models
|
|
57
|
+
opencommand run "Add unit tests for the engine module."
|
|
58
|
+
opencommand run "Build a Panda3D FPS" --pipeline advanced --verify "uv run pytest -q"
|
|
59
|
+
opencommand tui # live swarm dashboard
|
|
60
|
+
opencommand cron add healthcheck "every 1h" "echo ok"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Built-in models
|
|
64
|
+
|
|
65
|
+
| Role | Model |
|
|
66
|
+
|---------------|----------------------------------------|
|
|
67
|
+
| commander | `deepreinforce-ai/Ornith-1.0-9B-GGUF` |
|
|
68
|
+
| worker | `unsloth/Qwen3-4B-Instruct-2507-GGUF` |
|
|
69
|
+
| vision | `unsloth/Qwen3-VL-4B-Instruct-GGUF` |
|
|
70
|
+
| vision_small | `openbmb/MiniCPM-V-4.6-gguf` |
|
|
71
|
+
|
|
72
|
+
## Links
|
|
73
|
+
|
|
74
|
+
- `DESIGN.md` — full architecture & research notes
|
|
75
|
+
- `TODO.md` — roadmap tracker
|
|
76
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
opencommand/__init__.py,sha256=zYy4UVEfO_wHoUOydXtX145zjQg4t5kswXB7tpTiZGk,56
|
|
2
|
+
opencommand/cli.py,sha256=oMu_spoThMh3QFo37dKz1jYYkI3CEp_GbQ_ymw3TG7M,14882
|
|
3
|
+
opencommand/core/agent.py,sha256=rORwv5sXB3xhzr4-Z4ppDcsOQ0hjTTghbtMklHM1lxk,4126
|
|
4
|
+
opencommand/core/config.py,sha256=HvGo5vFa21up-_rGdzsN8nZAJFlCxduhPfZ3GrfJd8c,2448
|
|
5
|
+
opencommand/core/errors.py,sha256=u4b5QSxnHJoGx_EZNSUV4b-6R5vqW0UD9a4U2BG8kvM,611
|
|
6
|
+
opencommand/core/logging.py,sha256=5CEGl1O5fFQ4GLFF2qdTrOIhe2r7mev6Fmy4xLvJfCQ,2123
|
|
7
|
+
opencommand/core/supervisor.py,sha256=PS3Wb-mKvGFJo38gyUACzar4aJuzu3they76dwSKvto,3154
|
|
8
|
+
opencommand/core/tools.py,sha256=GPMo68aV4gJFPS3tPoAUw5wSDoRTp18ogUlZF1BF-6A,4174
|
|
9
|
+
opencommand/engine/__init__.py,sha256=DgCgJAwCYhIhmjdLtbBtpT0jBklmx0SCGj_XOvXeAco,2668
|
|
10
|
+
opencommand/engine/runner.py,sha256=frXXDorHK8KsmiDOqVjBe-HQTo9xFH-eZ8ZaNglupaE,12155
|
|
11
|
+
opencommand/modules/knowledge.py,sha256=LH76Z_iSZPw6Mz8Cv1QUP4PoVgS_mHXqIvAyUV6JoVk,3265
|
|
12
|
+
opencommand/modules/memory/MEMORY.md,sha256=0xnznqvOk5YoXAOnXQ4H-XnMO7MdBqE2_eBw9jYVaN4,560
|
|
13
|
+
opencommand/modules/skills/bash.md,sha256=LztU0IP4uMmnuf5c_v-jDwtQ8mfmyJ2yoN0wmR-peHU,585
|
|
14
|
+
opencommand/modules/skills/powershell.md,sha256=qN8gW4O1Yc-GXR4-pUVsD9fjKBOvumhlDUWpePkURLw,657
|
|
15
|
+
opencommand/modules/skills/python.md,sha256=N9Rbj8KmotpSyi2Zbsui3dDOTTktKDlyi1zbL1INBto,884
|
|
16
|
+
opencommand/modules/skills/system.md,sha256=Lhw1BWW89MtT6EwMK1VXx9Uop8PGvTXz_C-LYPfa0cw,1809
|
|
17
|
+
opencommand/modules/system/automatic.py,sha256=Zr-c-Qe-xlhdfSYGK9SjNSjQ3QKnlzw3Bi6lLHvaFcE,7696
|
|
18
|
+
opencommand/modules/system/cron.py,sha256=WqdWytrtANfihc4tyGwYgkDrcjJ8rldd_5YNU8zoh-4,7637
|
|
19
|
+
opencommand/modules/system/notify.py,sha256=Hh39irUAi87OrGmm7yvoARk1-XFro_7Mu6-lRmHsrpw,3145
|
|
20
|
+
opencommand/modules/system/platform.py,sha256=nEKLM7a5vFxQKsDD1_W8H2dXZZGLmwzEubepBXqdkkA,7462
|
|
21
|
+
opencommand/modules/templates.py,sha256=mnqasrovhPP2zReW7-RqI21GcbVi3-eP52HCz49VecM,7373
|
|
22
|
+
opencommand/modules/tools/desktop.py,sha256=tlGx7gKh8Wr9qjb2TPBgZDlE1IF-GGDGfF9nvbZK46o,4832
|
|
23
|
+
opencommand/modules/tools/files.py,sha256=qJnnRh3XsskkCgjtCVzLEVfRSPD-Yr_2q2wyI8FEky4,3429
|
|
24
|
+
opencommand/modules/tools/instructions.py,sha256=UakXmenQ8zMme49vjMQkxnwBSQNVIVKT7oC25tlS214,6604
|
|
25
|
+
opencommand/modules/tools/memory.py,sha256=29qHbpTWmsLteTAjCFGdafTn17Fj4b99C8SThDtk1VM,2949
|
|
26
|
+
opencommand/modules/tools/playwright.py,sha256=iVAzbIMwPOODUurPYg1BLjLnGpmWmZ16Fj3xY12ZIjs,2363
|
|
27
|
+
opencommand/modules/tools/research.py,sha256=ChsnRGy2gmDvYU0_BIkNXL8y9TbfNB29YlEYht2JLN0,1566
|
|
28
|
+
opencommand/modules/tools/system.py,sha256=ao_ApwDzgrGpkjaaCBpmCiutXndMt4OgsdWsByKXIEk,6634
|
|
29
|
+
opencommand/modules/tools/terminal.py,sha256=wkgaXqejrxGtCyWFa7OetmMDVfPcmDSO9HyjgBGckF8,1870
|
|
30
|
+
opencommand/providers/provider.py,sha256=udWAi9Dht8IuEQ8gTwRxiDpw5e85b3c0AAccLatUpfg,5956
|
|
31
|
+
opencommand/swarm/agents/commander.py,sha256=am9bThyp2nZFMsVdT5IzFA6U5MY9EgjnQlY3EaWuCwU,26039
|
|
32
|
+
opencommand/swarm/agents/worker.py,sha256=y2h-xlDhTX64bmoVv_Yt_3DvWSrQqpmrhauSzLsdOew,915
|
|
33
|
+
opencommand/tui/dashboard.py,sha256=G8t0v_UwoL5ptiVhl2et_hoyrpQrF_DpdFkmKUL1I40,1482
|
|
34
|
+
opencommand-0.1.0.dist-info/WHEEL,sha256=CoDSoyhtC_eO_tlxRYzsTraPv1fPJRXFx91k6ISeAvA,81
|
|
35
|
+
opencommand-0.1.0.dist-info/entry_points.txt,sha256=VmJs_vXCuPS-_7J8BZaFHJlJpetQoXc9V_hnXJvkb3I,50
|
|
36
|
+
opencommand-0.1.0.dist-info/METADATA,sha256=Qvcki_8W17Ed9tsQhx0gANOTJljqJbUYxVGAqm3ht3I,2822
|
|
37
|
+
opencommand-0.1.0.dist-info/RECORD,,
|