openloom 0.7.0__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.
- openloom-0.7.0/.gitignore +36 -0
- openloom-0.7.0/LICENSE +21 -0
- openloom-0.7.0/PKG-INFO +142 -0
- openloom-0.7.0/README.md +118 -0
- openloom-0.7.0/frontend/src/App.svelte +1747 -0
- openloom-0.7.0/frontend/src/Icon.svelte +35 -0
- openloom-0.7.0/frontend/src/dashboard.css +549 -0
- openloom-0.7.0/frontend/src/main.js +10 -0
- openloom-0.7.0/frontend/src/style.css +1898 -0
- openloom-0.7.0/frontend/src/usage.js +190 -0
- openloom-0.7.0/pyproject.toml +74 -0
- openloom-0.7.0/src/openloom/__init__.py +1 -0
- openloom-0.7.0/src/openloom/__main__.py +3 -0
- openloom-0.7.0/src/openloom/cli.py +212 -0
- openloom-0.7.0/src/openloom/config.py +62 -0
- openloom-0.7.0/src/openloom/core/__init__.py +0 -0
- openloom-0.7.0/src/openloom/core/checker.py +20 -0
- openloom-0.7.0/src/openloom/core/events.py +47 -0
- openloom-0.7.0/src/openloom/core/harness.py +290 -0
- openloom-0.7.0/src/openloom/core/registry.py +56 -0
- openloom-0.7.0/src/openloom/core/sink.py +11 -0
- openloom-0.7.0/src/openloom/core/source.py +10 -0
- openloom-0.7.0/src/openloom/core/store.py +158 -0
- openloom-0.7.0/src/openloom/levels/__init__.py +0 -0
- openloom-0.7.0/src/openloom/levels/config/__init__.py +0 -0
- openloom-0.7.0/src/openloom/levels/config/spec.py +29 -0
- openloom-0.7.0/src/openloom/levels/manual/__init__.py +0 -0
- openloom-0.7.0/src/openloom/levels/manual/checker.py +21 -0
- openloom-0.7.0/src/openloom/levels/manual/sink.py +44 -0
- openloom-0.7.0/src/openloom/levels/manual/source.py +19 -0
- openloom-0.7.0/src/openloom/levels/manual/watch.py +84 -0
- openloom-0.7.0/src/openloom/levels/openspec/__init__.py +0 -0
- openloom-0.7.0/src/openloom/levels/openspec/cold.py +9 -0
- openloom-0.7.0/src/openloom/levels/server/__init__.py +0 -0
- openloom-0.7.0/src/openloom/levels/server/monitor.py +103 -0
- openloom-0.7.0/src/openloom/levels/server/serve.py +140 -0
- openloom-0.7.0/src/openloom/levels/ui/__init__.py +0 -0
- openloom-0.7.0/src/openloom/levels/ui/sink.py +43 -0
- openloom-0.7.0/src/openloom/py.typed +0 -0
- openloom-0.7.0/src/openloom/runtime/__init__.py +0 -0
- openloom-0.7.0/src/openloom/runtime/opencode.py +343 -0
- openloom-0.7.0/src/openloom/runtime/planner.py +201 -0
- openloom-0.7.0/src/openloom/runtime/prompts.py +453 -0
- openloom-0.7.0/src/openloom/runtime/session_status.py +76 -0
- openloom-0.7.0/src/openloom/runtime/telemetry.py +188 -0
- openloom-0.7.0/src/openloom/server/__init__.py +0 -0
- openloom-0.7.0/src/openloom/server/app.py +380 -0
- openloom-0.7.0/src/openloom/server/cold.py +16 -0
- openloom-0.7.0/src/openloom/server/recent.py +88 -0
- openloom-0.7.0/src/openloom/server/routes/sessions.py +87 -0
- openloom-0.7.0/src/openloom/server/routes/tasks.py +186 -0
- openloom-0.7.0/src/openloom/server/static/app/assets/index-2UrBppYG.css +1 -0
- openloom-0.7.0/src/openloom/server/static/app/assets/index-i3AFSfyv.js +4 -0
- openloom-0.7.0/src/openloom/server/static/app/index.html +13 -0
- openloom-0.7.0/src/openloom/server/static/index.html +133 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
|
|
8
|
+
# Virtual environment
|
|
9
|
+
.venv/
|
|
10
|
+
venv/
|
|
11
|
+
|
|
12
|
+
# Environment
|
|
13
|
+
.env
|
|
14
|
+
|
|
15
|
+
# Database
|
|
16
|
+
.openloom/
|
|
17
|
+
|
|
18
|
+
# IDE
|
|
19
|
+
.idea/
|
|
20
|
+
.vscode/
|
|
21
|
+
*.swp
|
|
22
|
+
*.swo
|
|
23
|
+
|
|
24
|
+
# OS
|
|
25
|
+
.DS_Store
|
|
26
|
+
|
|
27
|
+
# Frontend
|
|
28
|
+
frontend/node_modules/
|
|
29
|
+
frontend/dist/
|
|
30
|
+
# Note: src/openloom/server/static/app/ is INTENTIONALLY committed.
|
|
31
|
+
# It contains the OpenDeck pre-built SPA so `openloom serve` works
|
|
32
|
+
# without a separate `npm run build` step. Regenerate via
|
|
33
|
+
# `cp opencode-deck/frontend/dist/* src/openloom/server/static/app/`.
|
|
34
|
+
|
|
35
|
+
# Hatch
|
|
36
|
+
*.egg
|
openloom-0.7.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenLoom Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
openloom-0.7.0/PKG-INFO
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openloom
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: OpenLoom: a lightweight agent task harness — schedule, monitor, and verify AI coding tasks.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Requires-Dist: httpx>=0.27
|
|
9
|
+
Requires-Dist: pyyaml>=6.0
|
|
10
|
+
Provides-Extra: github
|
|
11
|
+
Requires-Dist: pygithub>=2.0; extra == 'github'
|
|
12
|
+
Provides-Extra: openspec
|
|
13
|
+
Requires-Dist: openspec>=0.4; extra == 'openspec'
|
|
14
|
+
Provides-Extra: server
|
|
15
|
+
Requires-Dist: fastapi>=0.115; extra == 'server'
|
|
16
|
+
Requires-Dist: sse-starlette; extra == 'server'
|
|
17
|
+
Requires-Dist: uvicorn[standard]>=0.30; extra == 'server'
|
|
18
|
+
Provides-Extra: ui
|
|
19
|
+
Requires-Dist: fastapi>=0.115; extra == 'ui'
|
|
20
|
+
Requires-Dist: sse-starlette; extra == 'ui'
|
|
21
|
+
Requires-Dist: uvicorn[standard]>=0.30; extra == 'ui'
|
|
22
|
+
Provides-Extra: validate
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# OpenLoom
|
|
26
|
+
|
|
27
|
+
**Don't trust the agent's word — trust the file system.**
|
|
28
|
+
|
|
29
|
+
OpenLoom is a lightweight harness and observer for [OpenCode](https://github.com/opencode-ai/opencode). It schedules tasks, watches sessions, and verifies completion with file-system checks instead of model self-reports.
|
|
30
|
+
|
|
31
|
+
OpenLoom does **not** replace OpenCode. It fills the gaps in OpenCode's HTTP API: session monitoring, task plans, periodic checks, a web dashboard, and token usage summaries.
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
Requires Python 3.11+ and a running OpenCode server.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install openloom
|
|
39
|
+
# or
|
|
40
|
+
uv tool install openloom
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Web dashboard** (FastAPI + bundled Svelte UI):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install "openloom[ui]"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Optional extras (install only what you need):
|
|
50
|
+
|
|
51
|
+
| Extra | Purpose |
|
|
52
|
+
|-------|---------|
|
|
53
|
+
| `ui` | Web dashboard (`openloom serve`, `openloom watch --ui`) |
|
|
54
|
+
| `server` | Same as `ui` (team server mode alias) |
|
|
55
|
+
| `openspec` | OpenSpec checkbox completion checks |
|
|
56
|
+
| `github` | GitHub integration |
|
|
57
|
+
| `validate` | Pre-archive validation hooks (uses your project's pytest/mypy) |
|
|
58
|
+
|
|
59
|
+
There is intentionally **no `[all]`** extra — pick capabilities as you grow.
|
|
60
|
+
|
|
61
|
+
## Quick start
|
|
62
|
+
|
|
63
|
+
### 1. Configure OpenCode connection
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
export OPENLOOM_OPENCODE_URL=http://127.0.0.1:14096
|
|
67
|
+
export OPENLOOM_OPENCODE_USERNAME=opencode
|
|
68
|
+
export OPENLOOM_OPENCODE_PASSWORD=your-password
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Optional: restrict which workspace paths tasks may use:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
export OPENLOOM_ALLOWED_ROOTS=/Users/you/Projects
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
See [`.env.example`](.env.example) for all variables.
|
|
78
|
+
|
|
79
|
+
### 2. CLI — watch a task spec
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
openloom init # writes openloom.yaml in cwd
|
|
83
|
+
openloom watch # run harness from openloom.yaml
|
|
84
|
+
openloom watch --ui # same + local web UI (needs [ui])
|
|
85
|
+
openloom status
|
|
86
|
+
openloom log <task-id-prefix>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Example spec (`openloom.yaml`):
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
name: Fix SSE reconnect
|
|
93
|
+
workspace: /path/to/project
|
|
94
|
+
check_interval_minutes: 5 # 0 = send once, no periodic checks
|
|
95
|
+
goal: |
|
|
96
|
+
Fix SSE reconnect after network drop.
|
|
97
|
+
steps:
|
|
98
|
+
- Investigate current SSE implementation
|
|
99
|
+
- Implement reconnect with backoff
|
|
100
|
+
- Add regression coverage
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 3. Web dashboard — multi-task server
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pip install "openloom[ui]"
|
|
107
|
+
openloom serve --host 127.0.0.1 --port 55413
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Open `http://127.0.0.1:55413` for:
|
|
111
|
+
|
|
112
|
+
- **Dashboard** — session token usage, by-model breakdown, period summaries
|
|
113
|
+
- **Activity** — tasks, archived tasks, sessions by workspace
|
|
114
|
+
- **New Task** — plan with goal/steps/acceptance, attach to workspace or existing session
|
|
115
|
+
|
|
116
|
+
The UI static assets are **pre-built inside the wheel** — no Node.js required at install time.
|
|
117
|
+
|
|
118
|
+
## Architecture (short)
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
core/ Harness, store, event bus, Source / Checker / Sink ABCs (≤600 lines)
|
|
122
|
+
runtime/ OpenCode HTTP client, session status, prompts
|
|
123
|
+
levels/ Progressive capabilities (manual, config, openspec, ui, …)
|
|
124
|
+
server/ FastAPI app + routes + static UI ([ui] extra)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
State changes flow: **store write → event emit**. API routes read the store; the event bus pushes notifications only.
|
|
128
|
+
|
|
129
|
+
## Development
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
uv sync
|
|
133
|
+
uv run pytest
|
|
134
|
+
|
|
135
|
+
# Rebuild frontend into the package (before release)
|
|
136
|
+
cd frontend && npm install && npm run build
|
|
137
|
+
cd .. && uv build
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
MIT — see [LICENSE](LICENSE).
|
openloom-0.7.0/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# OpenLoom
|
|
2
|
+
|
|
3
|
+
**Don't trust the agent's word — trust the file system.**
|
|
4
|
+
|
|
5
|
+
OpenLoom is a lightweight harness and observer for [OpenCode](https://github.com/opencode-ai/opencode). It schedules tasks, watches sessions, and verifies completion with file-system checks instead of model self-reports.
|
|
6
|
+
|
|
7
|
+
OpenLoom does **not** replace OpenCode. It fills the gaps in OpenCode's HTTP API: session monitoring, task plans, periodic checks, a web dashboard, and token usage summaries.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Requires Python 3.11+ and a running OpenCode server.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install openloom
|
|
15
|
+
# or
|
|
16
|
+
uv tool install openloom
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Web dashboard** (FastAPI + bundled Svelte UI):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install "openloom[ui]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Optional extras (install only what you need):
|
|
26
|
+
|
|
27
|
+
| Extra | Purpose |
|
|
28
|
+
|-------|---------|
|
|
29
|
+
| `ui` | Web dashboard (`openloom serve`, `openloom watch --ui`) |
|
|
30
|
+
| `server` | Same as `ui` (team server mode alias) |
|
|
31
|
+
| `openspec` | OpenSpec checkbox completion checks |
|
|
32
|
+
| `github` | GitHub integration |
|
|
33
|
+
| `validate` | Pre-archive validation hooks (uses your project's pytest/mypy) |
|
|
34
|
+
|
|
35
|
+
There is intentionally **no `[all]`** extra — pick capabilities as you grow.
|
|
36
|
+
|
|
37
|
+
## Quick start
|
|
38
|
+
|
|
39
|
+
### 1. Configure OpenCode connection
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
export OPENLOOM_OPENCODE_URL=http://127.0.0.1:14096
|
|
43
|
+
export OPENLOOM_OPENCODE_USERNAME=opencode
|
|
44
|
+
export OPENLOOM_OPENCODE_PASSWORD=your-password
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Optional: restrict which workspace paths tasks may use:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
export OPENLOOM_ALLOWED_ROOTS=/Users/you/Projects
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
See [`.env.example`](.env.example) for all variables.
|
|
54
|
+
|
|
55
|
+
### 2. CLI — watch a task spec
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
openloom init # writes openloom.yaml in cwd
|
|
59
|
+
openloom watch # run harness from openloom.yaml
|
|
60
|
+
openloom watch --ui # same + local web UI (needs [ui])
|
|
61
|
+
openloom status
|
|
62
|
+
openloom log <task-id-prefix>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Example spec (`openloom.yaml`):
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
name: Fix SSE reconnect
|
|
69
|
+
workspace: /path/to/project
|
|
70
|
+
check_interval_minutes: 5 # 0 = send once, no periodic checks
|
|
71
|
+
goal: |
|
|
72
|
+
Fix SSE reconnect after network drop.
|
|
73
|
+
steps:
|
|
74
|
+
- Investigate current SSE implementation
|
|
75
|
+
- Implement reconnect with backoff
|
|
76
|
+
- Add regression coverage
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 3. Web dashboard — multi-task server
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pip install "openloom[ui]"
|
|
83
|
+
openloom serve --host 127.0.0.1 --port 55413
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Open `http://127.0.0.1:55413` for:
|
|
87
|
+
|
|
88
|
+
- **Dashboard** — session token usage, by-model breakdown, period summaries
|
|
89
|
+
- **Activity** — tasks, archived tasks, sessions by workspace
|
|
90
|
+
- **New Task** — plan with goal/steps/acceptance, attach to workspace or existing session
|
|
91
|
+
|
|
92
|
+
The UI static assets are **pre-built inside the wheel** — no Node.js required at install time.
|
|
93
|
+
|
|
94
|
+
## Architecture (short)
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
core/ Harness, store, event bus, Source / Checker / Sink ABCs (≤600 lines)
|
|
98
|
+
runtime/ OpenCode HTTP client, session status, prompts
|
|
99
|
+
levels/ Progressive capabilities (manual, config, openspec, ui, …)
|
|
100
|
+
server/ FastAPI app + routes + static UI ([ui] extra)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
State changes flow: **store write → event emit**. API routes read the store; the event bus pushes notifications only.
|
|
104
|
+
|
|
105
|
+
## Development
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
uv sync
|
|
109
|
+
uv run pytest
|
|
110
|
+
|
|
111
|
+
# Rebuild frontend into the package (before release)
|
|
112
|
+
cd frontend && npm install && npm run build
|
|
113
|
+
cd .. && uv build
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
MIT — see [LICENSE](LICENSE).
|