trinity-agent 0.2.1__tar.gz → 0.2.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.
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/PKG-INFO +1 -1
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/pyproject.toml +1 -1
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/__init__.py +1 -1
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/cli.py +9 -4
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/deliberation/consensus.py +32 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/deliberation/distributor.py +6 -7
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/tui/app.py +5 -2
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/.gitignore +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/LICENSE +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/README.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/checkpoint.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/phase-6-plan.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/reference-architecture.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/test-results/phase-1-T.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/test-results/phase-2-T.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/test-results/phase-3-T.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/test-results/phase-4-T.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/test-results/phase-5-T.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/docs/test-results/phase-6-T.md +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/__main__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/agents/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/agents/base.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/agents/claude_agent.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/agents/codex_agent.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/agents/factory.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/agents/gemini_agent.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/completion/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/completion/base.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/completion/hook.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/completion/idle.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/completion/prompt.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/config.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/context/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/context/monitor.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/context/rotator.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/context/shared.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/deliberation/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/deliberation/protocol.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/error_handler.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/health/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/health/checker.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/logging.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/models.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/orchestrator.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/retry.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/setup/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/setup/detector.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/setup/wizard.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/tmux/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/tmux/layout.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/tmux/pane.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/tmux/session.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/tui/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/tui/session.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/workspace/__init__.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/workspace/isolation.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/src/trinity/workspace/managed_home.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/templates/trinity.config.example +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/conftest.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_agent_factory.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_claude_agent.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_cli.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_cli_detector.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_cli_v2.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_codex_agent.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_completion.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_config.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_consensus_v2.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_context_monitor.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_deliberation.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_e2e.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_error_handling.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_gemini_agent.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_health_checker.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_interactive_claude.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_logging.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_managed_home.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_models.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_multi_provider.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_orchestrator.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_protocol.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_protocol_v2.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_retry.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_session_handoff.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_session_rotator.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_setup_wizard.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_shared_context.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_tmux.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_tmux_integration.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_tmux_layout.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_tui.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_tui_session.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/tests/test_workspace.py +0 -0
- {trinity_agent-0.2.1 → trinity_agent-0.2.2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trinity-agent
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Three minds, one context — Multi-agent AI orchestrator for Claude Code, Codex, and Gemini CLI.
|
|
5
5
|
Project-URL: Homepage, https://github.com/hongdangmoo49/Trinity
|
|
6
6
|
Project-URL: Repository, https://github.com/hongdangmoo49/Trinity
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "trinity-agent"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Three minds, one context — Multi-agent AI orchestrator for Claude Code, Codex, and Gemini CLI."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -45,11 +45,16 @@ def find_config_path() -> Path | None:
|
|
|
45
45
|
return None
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
def load_config() -> TrinityConfig:
|
|
49
|
-
"""Load config from file or return default.
|
|
48
|
+
def load_config(silent: bool = False) -> TrinityConfig:
|
|
49
|
+
"""Load config from file or return default.
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
silent: If True, suppress the "Loaded config from..." message.
|
|
53
|
+
"""
|
|
50
54
|
config_path = find_config_path()
|
|
51
55
|
if config_path:
|
|
52
|
-
|
|
56
|
+
if not silent:
|
|
57
|
+
console.print(f"[dim]Loaded config from {config_path}[/dim]")
|
|
53
58
|
return TrinityConfig.load(config_path)
|
|
54
59
|
return TrinityConfig.default_config()
|
|
55
60
|
|
|
@@ -78,7 +83,7 @@ def _run_interactive_tui() -> None:
|
|
|
78
83
|
"""Launch the interactive TUI session."""
|
|
79
84
|
from trinity.tui.session import InteractiveSession
|
|
80
85
|
|
|
81
|
-
config = load_config()
|
|
86
|
+
config = load_config(silent=True)
|
|
82
87
|
|
|
83
88
|
# If no .trinity/ directory exists, suggest running init first
|
|
84
89
|
state_dir = config.effective_state_dir
|
|
@@ -163,9 +163,41 @@ class ConsensusEngine:
|
|
|
163
163
|
) -> str:
|
|
164
164
|
"""Build a human-readable consensus summary."""
|
|
165
165
|
if reached:
|
|
166
|
+
# Extract key content from opinions for a meaningful summary
|
|
167
|
+
key_points = self._extract_key_points(opinions)
|
|
168
|
+
if key_points:
|
|
169
|
+
return (
|
|
170
|
+
f"Consensus reached ({len(agreeing)}/{len(opinions)} agree). "
|
|
171
|
+
f"Key points: {key_points}"
|
|
172
|
+
)
|
|
166
173
|
return f"Consensus reached. Agreeing: {', '.join(agreeing)}."
|
|
167
174
|
else:
|
|
168
175
|
return (
|
|
169
176
|
f"Consensus not reached ({len(agreeing)}/{len(opinions)} agree). "
|
|
170
177
|
f"Need another round of deliberation."
|
|
171
178
|
)
|
|
179
|
+
|
|
180
|
+
def _extract_key_points(self, opinions: dict[str, str]) -> str:
|
|
181
|
+
"""Extract key points from agent opinions for summary.
|
|
182
|
+
|
|
183
|
+
Takes the first opinion and truncates to a reasonable length.
|
|
184
|
+
"""
|
|
185
|
+
if not opinions:
|
|
186
|
+
return ""
|
|
187
|
+
|
|
188
|
+
# Use the first opinion as representative
|
|
189
|
+
for text in opinions.values():
|
|
190
|
+
# Clean and truncate
|
|
191
|
+
clean = text.strip()
|
|
192
|
+
# Take first meaningful sentence(s), up to 200 chars
|
|
193
|
+
if len(clean) > 200:
|
|
194
|
+
# Truncate at last sentence boundary within limit
|
|
195
|
+
truncated = clean[:200]
|
|
196
|
+
last_period = truncated.rfind(".")
|
|
197
|
+
if last_period > 50:
|
|
198
|
+
clean = truncated[: last_period + 1]
|
|
199
|
+
else:
|
|
200
|
+
clean = truncated + "..."
|
|
201
|
+
return clean
|
|
202
|
+
|
|
203
|
+
return ""
|
|
@@ -94,16 +94,15 @@ class TaskDistributor:
|
|
|
94
94
|
if matched_strengths:
|
|
95
95
|
strengths_text = ", ".join(matched_strengths)
|
|
96
96
|
task_desc = (
|
|
97
|
-
f"
|
|
98
|
-
f"
|
|
99
|
-
f"Focus on your strengths in {strengths_text} and deliver concrete output."
|
|
97
|
+
f"[{agent_name}] Handle: {strengths_text}. "
|
|
98
|
+
f"Consensus: {consensus[:150]}"
|
|
100
99
|
)
|
|
101
100
|
else:
|
|
102
|
-
# No specific strength matched — assign
|
|
101
|
+
# No specific strength matched — assign based on role
|
|
102
|
+
role_short = role.split(".")[0] if "." in role else role[:50]
|
|
103
103
|
task_desc = (
|
|
104
|
-
f"
|
|
105
|
-
f"
|
|
106
|
-
f"Identify what you can best contribute and execute."
|
|
104
|
+
f"[{agent_name}] As {role_short}, execute on the agreed conclusion. "
|
|
105
|
+
f"Consensus: {consensus[:100]}"
|
|
107
106
|
)
|
|
108
107
|
|
|
109
108
|
return TaskAssignment(
|
|
@@ -276,7 +276,7 @@ class TrinityTUI:
|
|
|
276
276
|
panels.append(result_panel)
|
|
277
277
|
|
|
278
278
|
panels.append(Text()) # Spacer
|
|
279
|
-
panels.append(Text("
|
|
279
|
+
panels.append(Text("💬 trinity>", style="bold green"))
|
|
280
280
|
|
|
281
281
|
return Group(*panels)
|
|
282
282
|
|
|
@@ -370,11 +370,14 @@ class TrinityTUI:
|
|
|
370
370
|
})
|
|
371
371
|
|
|
372
372
|
def reset_agents(self) -> None:
|
|
373
|
-
"""Reset all agent states to idle."""
|
|
373
|
+
"""Reset all agent states to idle and clear round history."""
|
|
374
374
|
for name, status in self.agents.items():
|
|
375
375
|
if status.state != AgentTUIState.DISABLED:
|
|
376
376
|
status.state = AgentTUIState.IDLE
|
|
377
377
|
status.response_preview = ""
|
|
378
|
+
# Clear round history between deliberations
|
|
379
|
+
self.rounds.clear()
|
|
380
|
+
self.current_round = 0
|
|
378
381
|
|
|
379
382
|
def get_welcome_text(self) -> str:
|
|
380
383
|
"""Get the welcome/help text for the TUI."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|