trinity-agent 0.2.0__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.
Files changed (94) hide show
  1. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/PKG-INFO +1 -1
  2. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/pyproject.toml +1 -1
  3. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/__init__.py +1 -1
  4. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/cli.py +9 -4
  5. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/config.py +2 -1
  6. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/deliberation/consensus.py +32 -0
  7. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/deliberation/distributor.py +6 -7
  8. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/tui/app.py +5 -2
  9. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/.gitignore +0 -0
  10. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/LICENSE +0 -0
  11. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/README.md +0 -0
  12. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/checkpoint.md +0 -0
  13. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/phase-6-plan.md +0 -0
  14. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/reference-architecture.md +0 -0
  15. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/test-results/phase-1-T.md +0 -0
  16. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/test-results/phase-2-T.md +0 -0
  17. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/test-results/phase-3-T.md +0 -0
  18. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/test-results/phase-4-T.md +0 -0
  19. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/test-results/phase-5-T.md +0 -0
  20. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/docs/test-results/phase-6-T.md +0 -0
  21. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/__main__.py +0 -0
  22. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/agents/__init__.py +0 -0
  23. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/agents/base.py +0 -0
  24. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/agents/claude_agent.py +0 -0
  25. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/agents/codex_agent.py +0 -0
  26. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/agents/factory.py +0 -0
  27. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/agents/gemini_agent.py +0 -0
  28. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/completion/__init__.py +0 -0
  29. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/completion/base.py +0 -0
  30. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/completion/hook.py +0 -0
  31. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/completion/idle.py +0 -0
  32. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/completion/prompt.py +0 -0
  33. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/context/__init__.py +0 -0
  34. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/context/monitor.py +0 -0
  35. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/context/rotator.py +0 -0
  36. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/context/shared.py +0 -0
  37. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/deliberation/__init__.py +0 -0
  38. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/deliberation/protocol.py +0 -0
  39. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/error_handler.py +0 -0
  40. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/health/__init__.py +0 -0
  41. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/health/checker.py +0 -0
  42. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/logging.py +0 -0
  43. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/models.py +0 -0
  44. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/orchestrator.py +0 -0
  45. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/retry.py +0 -0
  46. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/setup/__init__.py +0 -0
  47. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/setup/detector.py +0 -0
  48. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/setup/wizard.py +0 -0
  49. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/tmux/__init__.py +0 -0
  50. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/tmux/layout.py +0 -0
  51. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/tmux/pane.py +0 -0
  52. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/tmux/session.py +0 -0
  53. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/tui/__init__.py +0 -0
  54. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/tui/session.py +0 -0
  55. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/workspace/__init__.py +0 -0
  56. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/workspace/isolation.py +0 -0
  57. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/src/trinity/workspace/managed_home.py +0 -0
  58. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/templates/trinity.config.example +0 -0
  59. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/conftest.py +0 -0
  60. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_agent_factory.py +0 -0
  61. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_claude_agent.py +0 -0
  62. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_cli.py +0 -0
  63. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_cli_detector.py +0 -0
  64. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_cli_v2.py +0 -0
  65. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_codex_agent.py +0 -0
  66. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_completion.py +0 -0
  67. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_config.py +0 -0
  68. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_consensus_v2.py +0 -0
  69. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_context_monitor.py +0 -0
  70. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_deliberation.py +0 -0
  71. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_e2e.py +0 -0
  72. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_error_handling.py +0 -0
  73. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_gemini_agent.py +0 -0
  74. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_health_checker.py +0 -0
  75. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_interactive_claude.py +0 -0
  76. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_logging.py +0 -0
  77. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_managed_home.py +0 -0
  78. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_models.py +0 -0
  79. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_multi_provider.py +0 -0
  80. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_orchestrator.py +0 -0
  81. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_protocol.py +0 -0
  82. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_protocol_v2.py +0 -0
  83. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_retry.py +0 -0
  84. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_session_handoff.py +0 -0
  85. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_session_rotator.py +0 -0
  86. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_setup_wizard.py +0 -0
  87. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_shared_context.py +0 -0
  88. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_tmux.py +0 -0
  89. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_tmux_integration.py +0 -0
  90. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_tmux_layout.py +0 -0
  91. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_tui.py +0 -0
  92. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_tui_session.py +0 -0
  93. {trinity_agent-0.2.0 → trinity_agent-0.2.2}/tests/test_workspace.py +0 -0
  94. {trinity_agent-0.2.0 → 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.0
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.0"
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"
@@ -1,3 +1,3 @@
1
1
  """Trinity — Three minds, one context."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.2.2"
@@ -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
- console.print(f"[dim]Loaded config from {config_path}[/dim]")
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
@@ -77,7 +77,8 @@ class TrinityConfig:
77
77
 
78
78
  text = path.read_text(encoding="utf-8")
79
79
  data = tomllib.loads(text)
80
- return cls._from_dict(data, path.parent)
80
+ # path = <project>/.trinity/trinity.config → project_dir = <project>/
81
+ return cls._from_dict(data, path.parent.parent)
81
82
 
82
83
  @classmethod
83
84
  def _from_dict(cls, data: dict, project_dir: Path) -> "TrinityConfig":
@@ -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"Based on the agreed conclusion, handle: {strengths_text}. "
98
- f"The consensus is: {consensus[:200]}. "
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 a general task
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"Based on the agreed conclusion, contribute to implementation. "
105
- f"The consensus is: {consensus[:200]}. "
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("[bold green]💬 trinity>[/bold green] ", style="bold green"))
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