taskproof 0.3.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.
- taskproof/__init__.py +23 -0
- taskproof/__main__.py +8 -0
- taskproof/adapters/__init__.py +101 -0
- taskproof/adapters/base.py +228 -0
- taskproof/adapters/claude.py +46 -0
- taskproof/adapters/codex.py +140 -0
- taskproof/adapters/custom.py +61 -0
- taskproof/adapters/gemini.py +45 -0
- taskproof/adapters/opencode.py +46 -0
- taskproof/api/__init__.py +1 -0
- taskproof/api/server.py +822 -0
- taskproof/cli.py +1400 -0
- taskproof/concurrency.py +329 -0
- taskproof/dispatch.py +2289 -0
- taskproof/errors.py +55 -0
- taskproof/ledger.py +185 -0
- taskproof/models.py +155 -0
- taskproof/registry.py +1585 -0
- taskproof/schemas/result.json +58 -0
- taskproof/sql/schema.sql +70 -0
- taskproof/storage.py +372 -0
- taskproof/verify.py +615 -0
- taskproof/web/assets/MatrixView-BM8nu9s2.css +446 -0
- taskproof/web/assets/MatrixView-BM8nu9s2.css.gz +0 -0
- taskproof/web/assets/MatrixView-BMsawnxh.js +475 -0
- taskproof/web/assets/MatrixView-BMsawnxh.js.gz +0 -0
- taskproof/web/assets/ProjectsView-BcXcx5Gw.js +302 -0
- taskproof/web/assets/ProjectsView-BcXcx5Gw.js.gz +0 -0
- taskproof/web/assets/ProjectsView-CqNFL-fi.css +23 -0
- taskproof/web/assets/SettingsView-D_-waf0s.js +585 -0
- taskproof/web/assets/SettingsView-D_-waf0s.js.gz +0 -0
- taskproof/web/assets/SettingsView-aqTS3ubB.css +19 -0
- taskproof/web/assets/TaskDrawer-6JoGTH0s.js +597 -0
- taskproof/web/assets/TaskDrawer-6JoGTH0s.js.gz +0 -0
- taskproof/web/assets/TaskDrawer-N299VKzd.css +465 -0
- taskproof/web/assets/TaskDrawer-N299VKzd.css.gz +0 -0
- taskproof/web/assets/TasksView-BWhSHCHi.js +114 -0
- taskproof/web/assets/TasksView-BWhSHCHi.js.gz +0 -0
- taskproof/web/assets/TasksView-Bn08731V.css +30 -0
- taskproof/web/assets/icon-Dw-ohsdc.png +0 -0
- taskproof/web/assets/index-B-PLdDbR.js +75421 -0
- taskproof/web/assets/index-B-PLdDbR.js.gz +0 -0
- taskproof/web/assets/index-NKj7kbYl.css +1234 -0
- taskproof/web/assets/index-NKj7kbYl.css.gz +0 -0
- taskproof/web/index.html +23 -0
- taskproof-0.3.0.dist-info/METADATA +470 -0
- taskproof-0.3.0.dist-info/RECORD +51 -0
- taskproof-0.3.0.dist-info/WHEEL +5 -0
- taskproof-0.3.0.dist-info/entry_points.txt +2 -0
- taskproof-0.3.0.dist-info/licenses/LICENSE +201 -0
- taskproof-0.3.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""OpenCode CLI adapter — NOT tested on this machine (opencode not installed).
|
|
2
|
+
|
|
3
|
+
Command shape:
|
|
4
|
+
|
|
5
|
+
opencode run "<prompt>" [--model <m>] [--agent plan]
|
|
6
|
+
|
|
7
|
+
OpenCode has no dedicated read-only flag; `read_only=True` selects the `plan`
|
|
8
|
+
agent, which does not write files. No schema-constrained output, so
|
|
9
|
+
`supports_schema = False`; parsing degrades to stdout with
|
|
10
|
+
`parse_degraded=True`.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import shutil
|
|
14
|
+
from typing import Optional
|
|
15
|
+
|
|
16
|
+
from ..models import AdapterResult
|
|
17
|
+
from .base import Adapter
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class OpenCodeAdapter(Adapter):
|
|
21
|
+
name = "opencode"
|
|
22
|
+
binary = "opencode"
|
|
23
|
+
supports_schema = False
|
|
24
|
+
supports_sandbox = True
|
|
25
|
+
|
|
26
|
+
def build_command(self, *, brief: str, workdir: str,
|
|
27
|
+
schema_path: Optional[str] = None,
|
|
28
|
+
read_only: bool = False) -> list:
|
|
29
|
+
argv = ["opencode", "run", self.full_prompt(brief)]
|
|
30
|
+
if self.model:
|
|
31
|
+
argv += ["--model", self.model]
|
|
32
|
+
if read_only:
|
|
33
|
+
argv += ["--agent", "plan"]
|
|
34
|
+
return argv
|
|
35
|
+
|
|
36
|
+
def parse_result(self, *, exit_code: int, stdout: str, stderr: str,
|
|
37
|
+
result_path: Optional[str]) -> AdapterResult:
|
|
38
|
+
return self.degraded_result(
|
|
39
|
+
exit_code=exit_code, stdout=stdout, stderr=stderr,
|
|
40
|
+
result_path=result_path,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def preflight(self) -> Optional[str]:
|
|
44
|
+
if shutil.which(self.binary) is None:
|
|
45
|
+
return "opencode CLI not found on PATH (adapter not tested on this machine)"
|
|
46
|
+
return None
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Local read-only REST API (stage 1)."""
|