regent-cli 0.1.0__tar.gz → 0.4.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.
Files changed (41) hide show
  1. {regent_cli-0.1.0 → regent_cli-0.4.0}/PKG-INFO +26 -6
  2. regent_cli-0.4.0/README.md +56 -0
  3. {regent_cli-0.1.0 → regent_cli-0.4.0}/pyproject.toml +1 -1
  4. {regent_cli-0.1.0 → regent_cli-0.4.0}/src/regent/__init__.py +1 -1
  5. regent_cli-0.4.0/src/regent/activity.py +567 -0
  6. regent_cli-0.4.0/src/regent/activity_cli.py +243 -0
  7. {regent_cli-0.1.0 → regent_cli-0.4.0}/src/regent/cli.py +17 -7
  8. {regent_cli-0.1.0 → regent_cli-0.4.0}/src/regent/doctor.py +18 -0
  9. regent_cli-0.4.0/src/regent/initcmd.py +265 -0
  10. regent_cli-0.4.0/src/regent/protocol/__init__.py +37 -0
  11. regent_cli-0.4.0/src/regent/protocol/audit.py +63 -0
  12. regent_cli-0.4.0/src/regent/protocol/control.py +383 -0
  13. regent_cli-0.4.0/src/regent/protocol/lock.py +234 -0
  14. regent_cli-0.4.0/src/regent/protocol/stop.py +153 -0
  15. regent_cli-0.4.0/src/regent/templates/MANIFEST.json +17 -0
  16. regent_cli-0.4.0/src/regent/templates/skills/regent/SKILL.md +92 -0
  17. regent_cli-0.4.0/src/regent/templates/skills/regent-stop/SKILL.md +40 -0
  18. {regent_cli-0.1.0 → regent_cli-0.4.0}/src/regent_cli.egg-info/PKG-INFO +26 -6
  19. regent_cli-0.4.0/src/regent_cli.egg-info/SOURCES.txt +34 -0
  20. regent_cli-0.4.0/tests/test_activity.py +245 -0
  21. regent_cli-0.4.0/tests/test_activity_cli.py +172 -0
  22. regent_cli-0.4.0/tests/test_choreography.py +83 -0
  23. regent_cli-0.4.0/tests/test_control.py +226 -0
  24. regent_cli-0.4.0/tests/test_init_upgrade.py +112 -0
  25. {regent_cli-0.1.0 → regent_cli-0.4.0}/tests/test_initcmd.py +3 -1
  26. regent_cli-0.4.0/tests/test_lock.py +213 -0
  27. regent_cli-0.4.0/tests/test_protocol_facade.py +30 -0
  28. regent_cli-0.4.0/tests/test_skills_v1.py +159 -0
  29. regent_cli-0.4.0/tests/test_step06_fixes.py +289 -0
  30. regent_cli-0.4.0/tests/test_stop.py +108 -0
  31. regent_cli-0.1.0/README.md +0 -36
  32. regent_cli-0.1.0/src/regent/initcmd.py +0 -135
  33. regent_cli-0.1.0/src/regent/templates/skills/regent/SKILL.md +0 -60
  34. regent_cli-0.1.0/src/regent/templates/skills/regent-stop/SKILL.md +0 -27
  35. regent_cli-0.1.0/src/regent_cli.egg-info/SOURCES.txt +0 -16
  36. {regent_cli-0.1.0 → regent_cli-0.4.0}/LICENSE +0 -0
  37. {regent_cli-0.1.0 → regent_cli-0.4.0}/setup.cfg +0 -0
  38. {regent_cli-0.1.0 → regent_cli-0.4.0}/src/regent_cli.egg-info/dependency_links.txt +0 -0
  39. {regent_cli-0.1.0 → regent_cli-0.4.0}/src/regent_cli.egg-info/entry_points.txt +0 -0
  40. {regent_cli-0.1.0 → regent_cli-0.4.0}/src/regent_cli.egg-info/top_level.txt +0 -0
  41. {regent_cli-0.1.0 → regent_cli-0.4.0}/tests/test_doctor.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: regent-cli
3
- Version: 0.1.0
3
+ Version: 0.4.0
4
4
  Summary: Autonomous conduction and mediated adversarial deliberation between AI agents, pluggable into any project.
5
5
  Author-email: Flavio Alvim <flavioalvim@gmail.com>
6
6
  License: MIT
@@ -42,11 +42,31 @@ regent doctor # checks executor (claude) and advisor (codex
42
42
  ```
43
43
 
44
44
  Then open a Claude Code session in the project — `/regent` and `/regent-stop` are available
45
- (`/regent brainstorm "<question>"` opens the first round). v0 capability is file-driven
46
- (rounds under `.regent/brainstorm/rodadas/`); the advisor requires the `codex` CLI.
45
+ (`/regent brainstorm "<question>"` opens the first round). The v1 skills are
46
+ **control-backed**: activity state lives in `.regent/control.json` and is driven through
47
+ the JSON subcommands — `regent status` (control + lock + the executable control×files
48
+ matrix as `workspace.verdict`), `regent activity
49
+ start|resume|suspend|conclude|heartbeat|takeover`, `regent stop request|check`. Hosts
50
+ seeded by older versions upgrade automatically on `regent init` (known-version manifest;
51
+ unknown local edits are preserved as conflicts). The advisor requires the `codex` CLI.
47
52
 
48
- Development: `PYTHONPATH=src python3 -m unittest discover -s tests`. Canonical skill content
49
- lives in `src/regent/templates/` (ships inside the wheel); the repo's own `.regent/skills/`
50
- symlinks into it (dogfood without duplication).
53
+ Development: `PYTHONPATH=src python3 -m unittest discover -s tests`; packaging gate:
54
+ `bash scripts/gate-package.sh`. Canonical skill content lives in `src/regent/templates/`
55
+ (ships inside the wheel); the repo's own `.regent/skills/` symlinks into it (dogfood
56
+ without duplication).
57
+
58
+ ## Protocol layer
59
+
60
+ `regent.protocol` (PLAN-001) is the transactional foundation the conduction daemon will
61
+ drive: `ControlStore` (control.json with a real CAS — every mutation runs inside a
62
+ kernel-flock critical section, atomic AND durable publication with file+directory fsync),
63
+ `TurnLock` (executor-only turn ownership by uuid4 token; the whole lifecycle —
64
+ acquire/heartbeat/release/takeover — is serialized under a flock; takeover is graced,
65
+ audited, and rotates the control turn token BEFORE the new lock exists, aborting on
66
+ divergence), stop-request representation (`record_stop_request` /
67
+ `read_valid_stop_request` / `suspend_activity`, with activity/epoch/turn-token staleness
68
+ fencing) and `AuditLog` (flock-serialized, fsynced JSONL under
69
+ `.regent/protocol/audit.jsonl`). Dormant until the conduction phase wires it to the
70
+ skills; the v0 skills remain file-driven.
51
71
 
52
72
  MIT License © 2026 Flavio Alvim.
@@ -0,0 +1,56 @@
1
+ # regent
2
+
3
+ Autonomous conduction and mediated adversarial deliberation between AI agents, pluggable
4
+ into any project.
5
+
6
+ **regent** governs turns between agents (Claude, Codex, human mediators) under a frozen
7
+ protocol: atomic turn mutex, CAS-versioned state, deliberation rounds with versioned
8
+ acceptances, and a conduction daemon that executes production batches with a confined agent,
9
+ test gates and evidence proof.
10
+
11
+ Extracted from the tool proven end-to-end in the ArtNFT project (IMP-003: first product
12
+ batch fully conducted by the daemon, deliberated, accepted and deployed to production).
13
+
14
+ - Requirements: [`docs/PRD.md`](docs/PRD.md)
15
+ - Extraction scope and decisions: [`docs/ESCOPO.md`](docs/ESCOPO.md) (PT-BR, pre-rename)
16
+ - Deliberation rounds: [`docs/brainstorm/`](docs/brainstorm/) (mediator's language, PT-BR)
17
+ - Status: **pre-extraction** (scope closed 2026-07-20; code not yet migrated)
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ pip install <path-to-this-repo> # package: regent-cli; CLI: regent (not on PyPI yet)
23
+ cd <your-project>
24
+ regent init # seeds .regent/ + .claude/skills symlinks (atomic, idempotent)
25
+ regent doctor # checks executor (claude) and advisor (codex) CLIs
26
+ ```
27
+
28
+ Then open a Claude Code session in the project — `/regent` and `/regent-stop` are available
29
+ (`/regent brainstorm "<question>"` opens the first round). The v1 skills are
30
+ **control-backed**: activity state lives in `.regent/control.json` and is driven through
31
+ the JSON subcommands — `regent status` (control + lock + the executable control×files
32
+ matrix as `workspace.verdict`), `regent activity
33
+ start|resume|suspend|conclude|heartbeat|takeover`, `regent stop request|check`. Hosts
34
+ seeded by older versions upgrade automatically on `regent init` (known-version manifest;
35
+ unknown local edits are preserved as conflicts). The advisor requires the `codex` CLI.
36
+
37
+ Development: `PYTHONPATH=src python3 -m unittest discover -s tests`; packaging gate:
38
+ `bash scripts/gate-package.sh`. Canonical skill content lives in `src/regent/templates/`
39
+ (ships inside the wheel); the repo's own `.regent/skills/` symlinks into it (dogfood
40
+ without duplication).
41
+
42
+ ## Protocol layer
43
+
44
+ `regent.protocol` (PLAN-001) is the transactional foundation the conduction daemon will
45
+ drive: `ControlStore` (control.json with a real CAS — every mutation runs inside a
46
+ kernel-flock critical section, atomic AND durable publication with file+directory fsync),
47
+ `TurnLock` (executor-only turn ownership by uuid4 token; the whole lifecycle —
48
+ acquire/heartbeat/release/takeover — is serialized under a flock; takeover is graced,
49
+ audited, and rotates the control turn token BEFORE the new lock exists, aborting on
50
+ divergence), stop-request representation (`record_stop_request` /
51
+ `read_valid_stop_request` / `suspend_activity`, with activity/epoch/turn-token staleness
52
+ fencing) and `AuditLog` (flock-serialized, fsynced JSONL under
53
+ `.regent/protocol/audit.jsonl`). Dormant until the conduction phase wires it to the
54
+ skills; the v0 skills remain file-driven.
55
+
56
+ MIT License © 2026 Flavio Alvim.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "regent-cli"
7
- version = "0.1.0"
7
+ version = "0.4.0"
8
8
  description = "Autonomous conduction and mediated adversarial deliberation between AI agents, pluggable into any project."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,3 +1,3 @@
1
1
  """regent — autonomous conduction and mediated adversarial deliberation between AI agents."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.4.0"