connectonion 0.4.11__py3-none-any.whl → 0.5.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 (80) hide show
  1. connectonion/__init__.py +11 -5
  2. connectonion/agent.py +44 -42
  3. connectonion/cli/commands/init.py +1 -1
  4. connectonion/cli/commands/project_cmd_lib.py +4 -4
  5. connectonion/cli/commands/reset_commands.py +1 -1
  6. connectonion/cli/docs/co-vibecoding-principles-docs-contexts-all-in-one.md +15 -11
  7. connectonion/cli/templates/minimal/agent.py +2 -2
  8. connectonion/console.py +55 -3
  9. connectonion/events.py +96 -17
  10. connectonion/llm.py +21 -3
  11. connectonion/logger.py +289 -0
  12. connectonion/prompt_files/eval_expected.md +12 -0
  13. connectonion/tool_executor.py +43 -32
  14. connectonion/usage.py +4 -0
  15. connectonion/useful_events_handlers/reflect.py +14 -10
  16. connectonion/useful_plugins/__init__.py +2 -1
  17. connectonion/useful_plugins/calendar_plugin.py +2 -2
  18. connectonion/useful_plugins/eval.py +130 -0
  19. connectonion/useful_plugins/gmail_plugin.py +4 -4
  20. connectonion/useful_plugins/image_result_formatter.py +4 -3
  21. connectonion/useful_plugins/re_act.py +15 -57
  22. connectonion/useful_plugins/shell_approval.py +2 -2
  23. connectonion/useful_tools/gmail.py +2 -2
  24. connectonion/useful_tools/memory.py +4 -0
  25. {connectonion-0.4.11.dist-info → connectonion-0.5.0.dist-info}/METADATA +48 -48
  26. {connectonion-0.4.11.dist-info → connectonion-0.5.0.dist-info}/RECORD +33 -77
  27. {connectonion-0.4.11.dist-info → connectonion-0.5.0.dist-info}/WHEEL +1 -2
  28. connectonion/cli/templates/email-agent/.env.example +0 -23
  29. connectonion/cli/templates/email-agent/README.md +0 -240
  30. connectonion/cli/templates/email-agent/agent.py +0 -374
  31. connectonion/cli/templates/email-agent/demo.py +0 -71
  32. connectonion/cli/templates/meta-agent/.env.example +0 -11
  33. connectonion/cli/templates/minimal/.env.example +0 -5
  34. connectonion/cli/templates/playwright/.env.example +0 -5
  35. connectonion-0.4.11.dist-info/top_level.txt +0 -2
  36. tests/__init__.py +0 -0
  37. tests/cli/__init__.py +0 -1
  38. tests/cli/argparse_runner.py +0 -85
  39. tests/cli/conftest.py +0 -5
  40. tests/cli/test_browser_cli.py +0 -61
  41. tests/cli/test_cli.py +0 -143
  42. tests/cli/test_cli_auth_google.py +0 -344
  43. tests/cli/test_cli_auth_microsoft.py +0 -256
  44. tests/cli/test_cli_create.py +0 -283
  45. tests/cli/test_cli_help.py +0 -200
  46. tests/cli/test_cli_init.py +0 -318
  47. tests/conftest.py +0 -283
  48. tests/debug_gemini_models.py +0 -23
  49. tests/fixtures/__init__.py +0 -1
  50. tests/fixtures/test_tools.py +0 -112
  51. tests/fixtures/trust_fixtures.py +0 -257
  52. tests/real_api/__init__.py +0 -0
  53. tests/real_api/conftest.py +0 -9
  54. tests/real_api/test_llm_do.py +0 -174
  55. tests/real_api/test_llm_do_comprehensive.py +0 -527
  56. tests/real_api/test_production_client.py +0 -94
  57. tests/real_api/test_real_anthropic.py +0 -100
  58. tests/real_api/test_real_api.py +0 -113
  59. tests/real_api/test_real_auth.py +0 -130
  60. tests/real_api/test_real_email.py +0 -95
  61. tests/real_api/test_real_gemini.py +0 -96
  62. tests/real_api/test_real_llm_do.py +0 -81
  63. tests/real_api/test_real_managed.py +0 -208
  64. tests/real_api/test_real_multi_llm.py +0 -454
  65. tests/real_api/test_real_openai.py +0 -100
  66. tests/real_api/test_responses_parse.py +0 -88
  67. tests/test_diff_writer.py +0 -126
  68. tests/test_events.py +0 -677
  69. tests/test_gemini_co.py +0 -70
  70. tests/test_image_result_formatter.py +0 -88
  71. tests/test_plugin_system.py +0 -110
  72. tests/utils/__init__.py +0 -1
  73. tests/utils/config_helpers.py +0 -188
  74. tests/utils/mock_helpers.py +0 -237
  75. /connectonion/{prompts → prompt_files}/__init__.py +0 -0
  76. /connectonion/{prompts → prompt_files}/analyze_contact.md +0 -0
  77. /connectonion/{prompts → prompt_files}/react_evaluate.md +0 -0
  78. /connectonion/{prompts → prompt_files}/react_plan.md +0 -0
  79. /connectonion/{prompts → prompt_files}/reflect.md +0 -0
  80. {connectonion-0.4.11.dist-info → connectonion-0.5.0.dist-info}/entry_points.txt +0 -0
tests/test_diff_writer.py DELETED
@@ -1,126 +0,0 @@
1
- """Interactive test for DiffWriter, pick, and yes_no.
2
-
3
- Run this file directly to test:
4
- python tests/test_diff_writer.py
5
-
6
- NOTE: These tests require user input and should only be run interactively.
7
- They are skipped when running via pytest (non-TTY environment).
8
- """
9
-
10
- import sys
11
- import tempfile
12
- import os
13
- from pathlib import Path
14
- import pytest
15
-
16
- from connectonion import pick, yes_no, DiffWriter
17
-
18
-
19
- # Skip all tests if not running interactively (no TTY)
20
- pytestmark = pytest.mark.skipif(
21
- not sys.stdin.isatty(),
22
- reason="Interactive tests require TTY (run with: python tests/test_diff_writer.py)"
23
- )
24
-
25
-
26
- def test_pick_list():
27
- """Test pick with list options."""
28
- print("\n=== Testing pick() with list ===")
29
- choice = pick("Pick a fruit", ["Apple", "Banana", "Cherry"])
30
- print(f"You picked: {choice}")
31
-
32
-
33
- def test_pick_dict():
34
- """Test pick with dict options."""
35
- print("\n=== Testing pick() with dict ===")
36
- choice = pick("What to do?", {
37
- "c": "Continue",
38
- "r": "Retry",
39
- "q": "Quit",
40
- })
41
- print(f"You chose: {choice}")
42
-
43
-
44
- def test_yes_no():
45
- """Test yes_no dialog."""
46
- print("\n=== Testing yes_no() ===")
47
- ok = yes_no("Are you sure?")
48
- print(f"Confirmed: {ok}")
49
-
50
-
51
- def test_new_file_approval():
52
- """Test approval UI for new file."""
53
- print("\n=== Testing New File Approval ===")
54
-
55
- with tempfile.TemporaryDirectory() as tmpdir:
56
- writer = DiffWriter(auto_approve=False)
57
- test_file = os.path.join(tmpdir, "hello.py")
58
-
59
- content = '''def hello():
60
- print("Hello, World!")
61
-
62
- if __name__ == "__main__":
63
- hello()
64
- '''
65
-
66
- print(f"Creating new file: {test_file}")
67
- result = writer.write(test_file, content)
68
- print(f"\nResult: {result}")
69
-
70
- if Path(test_file).exists():
71
- print(f"File created!")
72
- else:
73
- print("File was not created (rejected)")
74
-
75
-
76
- def test_modify_file_approval():
77
- """Test approval UI for modifying existing file."""
78
- print("\n=== Testing File Modification Approval ===")
79
-
80
- with tempfile.TemporaryDirectory() as tmpdir:
81
- test_file = os.path.join(tmpdir, "hello.py")
82
-
83
- original = '''def hello():
84
- pass
85
- '''
86
- Path(test_file).write_text(original)
87
- print(f"Created initial file: {test_file}")
88
-
89
- writer = DiffWriter(auto_approve=False)
90
-
91
- new_content = '''def hello():
92
- print("Hello, World!")
93
-
94
- def goodbye():
95
- print("Goodbye!")
96
- '''
97
-
98
- print("Proposing changes...")
99
- result = writer.write(test_file, new_content)
100
- print(f"\nResult: {result}")
101
-
102
-
103
- if __name__ == "__main__":
104
- print("=" * 50)
105
- print("pick / yes_no / DiffWriter Test")
106
- print("=" * 50)
107
-
108
- tests = {
109
- "1": ("Test pick() with list", test_pick_list),
110
- "2": ("Test pick() with dict", test_pick_dict),
111
- "3": ("Test yes_no()", test_yes_no),
112
- "4": ("Test new file approval", test_new_file_approval),
113
- "5": ("Test file modification approval", test_modify_file_approval),
114
- "q": ("Quit", None),
115
- }
116
-
117
- while True:
118
- choice = pick("Select a test", {k: v[0] for k, v in tests.items()})
119
-
120
- if choice == "q":
121
- print("Bye!")
122
- break
123
-
124
- func = tests[choice][1]
125
- if func:
126
- func()