dissenter 1.0.2__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.
Files changed (33) hide show
  1. dissenter-1.0.2/.github/workflows/publish.yml +31 -0
  2. dissenter-1.0.2/.gitignore +11 -0
  3. dissenter-1.0.2/CHANGELOG.md +114 -0
  4. dissenter-1.0.2/Makefile +22 -0
  5. dissenter-1.0.2/PKG-INFO +13 -0
  6. dissenter-1.0.2/README.md +534 -0
  7. dissenter-1.0.2/dissenter-test.toml +42 -0
  8. dissenter-1.0.2/dissenter.toml +68 -0
  9. dissenter-1.0.2/pyproject.toml +28 -0
  10. dissenter-1.0.2/src/dissent/__init__.py +1 -0
  11. dissenter-1.0.2/src/dissent/cli.py +274 -0
  12. dissenter-1.0.2/src/dissent/config.py +96 -0
  13. dissenter-1.0.2/src/dissent/detect.py +65 -0
  14. dissenter-1.0.2/src/dissent/roles/analyst.toml +3 -0
  15. dissenter-1.0.2/src/dissent/roles/chairman.toml +3 -0
  16. dissenter-1.0.2/src/dissent/roles/conservative.toml +3 -0
  17. dissenter-1.0.2/src/dissent/roles/contrarian.toml +3 -0
  18. dissenter-1.0.2/src/dissent/roles/devils_advocate.toml +3 -0
  19. dissenter-1.0.2/src/dissent/roles/liberal.toml +3 -0
  20. dissenter-1.0.2/src/dissent/roles/pragmatist.toml +3 -0
  21. dissenter-1.0.2/src/dissent/roles/researcher.toml +3 -0
  22. dissenter-1.0.2/src/dissent/roles/second_opinion.toml +3 -0
  23. dissenter-1.0.2/src/dissent/roles/skeptic.toml +3 -0
  24. dissenter-1.0.2/src/dissent/roles.py +29 -0
  25. dissenter-1.0.2/src/dissent/runner.py +318 -0
  26. dissenter-1.0.2/src/dissent/synthesis.py +232 -0
  27. dissenter-1.0.2/src/dissent/wizard.py +143 -0
  28. dissenter-1.0.2/tests/__init__.py +0 -0
  29. dissenter-1.0.2/tests/test_config.py +127 -0
  30. dissenter-1.0.2/tests/test_integration.py +92 -0
  31. dissenter-1.0.2/tests/test_roles.py +45 -0
  32. dissenter-1.0.2/tests/test_runner.py +100 -0
  33. dissenter-1.0.2/uv.lock +1877 -0
@@ -0,0 +1,31 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ publish:
11
+ name: Build and publish
12
+ runs-on: ubuntu-latest
13
+ environment: pypi
14
+ permissions:
15
+ id-token: write # required for trusted publishing (OIDC — no token needed)
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - uses: astral-sh/setup-uv@v5
21
+ with:
22
+ enable-cache: true
23
+
24
+ - name: Build
25
+ run: uv build
26
+
27
+ - name: Publish to PyPI
28
+ run: uv publish
29
+ # Uses OIDC trusted publishing — configure at:
30
+ # https://pypi.org/manage/project/dissenter/settings/publishing/
31
+ # Set publisher: GitHub, repo: PR0CK0/dissenter, workflow: publish.yml
@@ -0,0 +1,11 @@
1
+ decisions/
2
+ .venv/
3
+ __pycache__/
4
+ *.pyc
5
+ *.pyo
6
+ .python-version
7
+ dist/
8
+ *.egg-info/
9
+ .DS_Store
10
+ .pytest_cache/
11
+ .claude/
@@ -0,0 +1,114 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ ## [1.0.2] — 2026-03-21
6
+
7
+ ### Added
8
+ - `make publish` target for manual PyPI deploys (`PYPI_TOKEN=pypi-xxxx make publish`).
9
+ - GitHub Actions `workflow_dispatch` trigger — publish manually from the GitHub Actions UI without a tag push.
10
+
11
+ ---
12
+
13
+ ## [1.0.1] — 2026-03-21
14
+
15
+ ### Changed
16
+ - Renamed project/package/CLI from `dissent` to `dissenter` (PyPI name `dissent` was taken).
17
+ - PyPI package: `pip install dissenter`
18
+ - CLI command: `dissenter ask / init / models / show`
19
+ - Default config file: `dissenter.toml` (was `dissent.toml`)
20
+ - Config dir: `~/.config/dissenter/` (was `~/.config/dissent/`)
21
+ - GitHub repo renamed to `PR0CK0/dissenter`
22
+ - Python import path unchanged (`from dissent.xxx import ...`)
23
+ - Bumped version to 1.0.1.
24
+
25
+ ---
26
+
27
+ ## [1.0.0] — 2026-03-21
28
+
29
+ ### Added
30
+ - **`dissent init`**: Interactive config wizard. Detects installed Ollama models and
31
+ claude/gemini CLI tools, prompts for rounds/models/roles/auth, previews generated
32
+ TOML, and saves to `dissent.toml`. Supports both chairman and dual-arbiter finals.
33
+ - **`dissent models`**: Shows detected Ollama models, CLI tool paths, and API provider
34
+ key status (which env vars are set) in one command.
35
+ - **`dissent ask --model` / `--chairman` / `--quick`**: Run debates without a config file.
36
+ `--model model_id[@role]` (repeatable) builds a debate round inline.
37
+ `--quick` auto-detects all installed Ollama models and runs immediately.
38
+ - **PyPI publishing**: GitHub Actions workflow triggers on version tags and publishes
39
+ via `uv publish` with OIDC trusted publishing (no token management needed).
40
+ - **`detect.py`**: Shared environment detection utilities (`detect_ollama_models`,
41
+ `detect_clis`, `detect_api_keys`, `infer_auth`).
42
+
43
+ ### Changed
44
+ - `dissent show` now displays auth mode alongside each model.
45
+ - Config priority for `ask`: `--quick` > `--model/--chairman` > config file.
46
+
47
+ ---
48
+
49
+ ## [0.2.1] — 2026-03-21
50
+
51
+ ### Changed
52
+ - Output structure unified: all files for a run now live under
53
+ `decisions/<timestamp>/`. The decision is `decision.md` and per-round
54
+ debug files are subdirectories within the same folder. Previously the
55
+ decision file and the debug directory were siblings with different names.
56
+
57
+ ---
58
+
59
+ ## [0.2.0] — 2026-03-21
60
+
61
+ ### Added
62
+ - **CLI auth mode** (`auth = "cli"`): Each model can now authenticate via a locally-installed
63
+ provider CLI instead of an API key. Auto-detects `claude` for Anthropic and `gemini` for
64
+ Google/Gemini providers. Override with `cli_command = "..."` in config.
65
+ - **Dual-arbiter final round**: Final round can have 2 models (conservative + liberal roles)
66
+ combined side-by-side using a `combine_model`. Output is a `Dual Recommendation` document.
67
+ - **Synthesis respects auth mode**: Synthesis phase now correctly routes through CLI or API
68
+ based on each model's `auth` field (was previously always using litellm).
69
+ - **Error classification**: Friendly error messages for missing API keys, Ollama not running,
70
+ model not installed, rate limits, and context window exceeded.
71
+ - **Clickable output links**: Terminal output uses OSC 8 hyperlinks to the saved decision file.
72
+ - `dissent-test.toml`: Minimal test config using `ollama/ministral-3:3b` (no API keys needed).
73
+ - `ensemble` binary removed from tracked files.
74
+
75
+ ### Changed
76
+ - `dissent.toml`: Updated to use `auth = "cli"` for Anthropic and Gemini models.
77
+ - `dissent.toml`: Fixed `qwen2.5:7b` → `qwen2.5:1.5b`.
78
+ - `dissent.toml`: Fixed `ministral:3b` → `ministral-3:3b`.
79
+ - CLI no longer prints full ADR to stdout; links to the saved file instead.
80
+
81
+ ### Fixed
82
+ - Same model with different roles in one round: composite key `id::role::index` prevents
83
+ collision when the same model ID appears multiple times.
84
+ - Synthesis `combine_model` (a string) is now wrapped in a `ModelConfig` for routing.
85
+
86
+ ---
87
+
88
+ ## [0.1.0] — 2026-03-18
89
+
90
+ ### Added
91
+ - **Multi-round debate engine**: Arbitrary number of sequential rounds; models run in parallel
92
+ within each round and receive prior round context.
93
+ - **Enforced final round**: Last `[[rounds]]` block must have exactly 1 model (chairman) or
94
+ 2 models with a `combine_model` (dual-arbiter). Validated at config load.
95
+ - **Role prompt system**: 10 adversarial roles extracted to individual TOML files under
96
+ `src/dissent/roles/`. Roles: analyst, chairman, conservative, contrarian, devil's advocate,
97
+ liberal, pragmatist, researcher, second opinion, skeptic.
98
+ - **ADR output**: Chairman synthesis produces a structured Architectural Decision Record with
99
+ Context, Consensus, Disagreements, Options, Decision, Consequences, and Open Questions.
100
+ - **Rich live status display**: Per-round tables showing model, role, elapsed time, and
101
+ word count / error for each model as they complete.
102
+ - **Config validation**: pydantic v2 models with `model_validator` enforcing round constraints.
103
+ - **`dissent ask`**: Run a debate and save output to `decisions/` with timestamped filenames.
104
+ - **`dissent show`**: List saved decisions and open one interactively.
105
+ - **Debug dir**: Per-run `debug/` subdirectory with raw round outputs for inspection.
106
+ - **Unit and integration tests**: 23 tests across config, roles, runner, and integration.
107
+ - **Makefile**: `ask`, `ask-test`, `show`, `install`, `test` targets.
108
+ - **README**: Full documentation with architecture diagram, competitor comparison, install
109
+ guide, config reference, role catalog, and academic foundations.
110
+
111
+ ### Project
112
+ - Renamed from `llm-ensemble` to `dissent`.
113
+ - Package: `dissent` v0.1.0 → v0.2.0 (single release includes all above).
114
+ - Requires Python 3.11+, uv, litellm, typer, rich, pydantic, platformdirs.
@@ -0,0 +1,22 @@
1
+ .PHONY: ask ask-test show install test publish
2
+
3
+ UV := $(shell command -v uv 2>/dev/null || echo $(HOME)/.local/bin/uv)
4
+
5
+ ask:
6
+ @$(UV) run dissenter ask "$(Q)"
7
+
8
+ ask-test:
9
+ @$(UV) run dissenter ask "$(Q)" --config dissenter-test.toml
10
+
11
+ show:
12
+ @$(UV) run dissenter show
13
+
14
+ install:
15
+ @$(UV) sync
16
+
17
+ test:
18
+ @$(UV) run pytest tests/ -v
19
+
20
+ publish:
21
+ @$(UV) build
22
+ @UV_PUBLISH_TOKEN=$(PYPI_TOKEN) $(UV) publish
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.4
2
+ Name: dissenter
3
+ Version: 1.0.2
4
+ Summary: Multi-LLM debate engine for architectural decisions
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: litellm>=1.62.0
7
+ Requires-Dist: platformdirs>=4.3.0
8
+ Requires-Dist: pydantic>=2.9.0
9
+ Requires-Dist: rich>=13.9.0
10
+ Requires-Dist: typer>=0.12.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
13
+ Requires-Dist: pytest>=8.0; extra == 'dev'