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.
Files changed (51) hide show
  1. taskproof/__init__.py +23 -0
  2. taskproof/__main__.py +8 -0
  3. taskproof/adapters/__init__.py +101 -0
  4. taskproof/adapters/base.py +228 -0
  5. taskproof/adapters/claude.py +46 -0
  6. taskproof/adapters/codex.py +140 -0
  7. taskproof/adapters/custom.py +61 -0
  8. taskproof/adapters/gemini.py +45 -0
  9. taskproof/adapters/opencode.py +46 -0
  10. taskproof/api/__init__.py +1 -0
  11. taskproof/api/server.py +822 -0
  12. taskproof/cli.py +1400 -0
  13. taskproof/concurrency.py +329 -0
  14. taskproof/dispatch.py +2289 -0
  15. taskproof/errors.py +55 -0
  16. taskproof/ledger.py +185 -0
  17. taskproof/models.py +155 -0
  18. taskproof/registry.py +1585 -0
  19. taskproof/schemas/result.json +58 -0
  20. taskproof/sql/schema.sql +70 -0
  21. taskproof/storage.py +372 -0
  22. taskproof/verify.py +615 -0
  23. taskproof/web/assets/MatrixView-BM8nu9s2.css +446 -0
  24. taskproof/web/assets/MatrixView-BM8nu9s2.css.gz +0 -0
  25. taskproof/web/assets/MatrixView-BMsawnxh.js +475 -0
  26. taskproof/web/assets/MatrixView-BMsawnxh.js.gz +0 -0
  27. taskproof/web/assets/ProjectsView-BcXcx5Gw.js +302 -0
  28. taskproof/web/assets/ProjectsView-BcXcx5Gw.js.gz +0 -0
  29. taskproof/web/assets/ProjectsView-CqNFL-fi.css +23 -0
  30. taskproof/web/assets/SettingsView-D_-waf0s.js +585 -0
  31. taskproof/web/assets/SettingsView-D_-waf0s.js.gz +0 -0
  32. taskproof/web/assets/SettingsView-aqTS3ubB.css +19 -0
  33. taskproof/web/assets/TaskDrawer-6JoGTH0s.js +597 -0
  34. taskproof/web/assets/TaskDrawer-6JoGTH0s.js.gz +0 -0
  35. taskproof/web/assets/TaskDrawer-N299VKzd.css +465 -0
  36. taskproof/web/assets/TaskDrawer-N299VKzd.css.gz +0 -0
  37. taskproof/web/assets/TasksView-BWhSHCHi.js +114 -0
  38. taskproof/web/assets/TasksView-BWhSHCHi.js.gz +0 -0
  39. taskproof/web/assets/TasksView-Bn08731V.css +30 -0
  40. taskproof/web/assets/icon-Dw-ohsdc.png +0 -0
  41. taskproof/web/assets/index-B-PLdDbR.js +75421 -0
  42. taskproof/web/assets/index-B-PLdDbR.js.gz +0 -0
  43. taskproof/web/assets/index-NKj7kbYl.css +1234 -0
  44. taskproof/web/assets/index-NKj7kbYl.css.gz +0 -0
  45. taskproof/web/index.html +23 -0
  46. taskproof-0.3.0.dist-info/METADATA +470 -0
  47. taskproof-0.3.0.dist-info/RECORD +51 -0
  48. taskproof-0.3.0.dist-info/WHEEL +5 -0
  49. taskproof-0.3.0.dist-info/entry_points.txt +2 -0
  50. taskproof-0.3.0.dist-info/licenses/LICENSE +201 -0
  51. 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)."""