connectonion 0.4.12__py3-none-any.whl → 0.5.1__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.
- connectonion/__init__.py +11 -5
- connectonion/agent.py +44 -42
- connectonion/cli/commands/init.py +1 -1
- connectonion/cli/commands/project_cmd_lib.py +4 -4
- connectonion/cli/commands/reset_commands.py +1 -1
- connectonion/cli/docs/co-vibecoding-principles-docs-contexts-all-in-one.md +15 -11
- connectonion/cli/templates/minimal/agent.py +2 -2
- connectonion/console.py +55 -3
- connectonion/events.py +96 -17
- connectonion/llm.py +21 -3
- connectonion/logger.py +289 -0
- connectonion/prompt_files/eval_expected.md +12 -0
- connectonion/tool_executor.py +43 -32
- connectonion/usage.py +4 -0
- connectonion/useful_events_handlers/reflect.py +13 -9
- connectonion/useful_plugins/__init__.py +2 -1
- connectonion/useful_plugins/calendar_plugin.py +2 -2
- connectonion/useful_plugins/eval.py +130 -0
- connectonion/useful_plugins/gmail_plugin.py +4 -4
- connectonion/useful_plugins/image_result_formatter.py +4 -3
- connectonion/useful_plugins/re_act.py +14 -56
- connectonion/useful_plugins/shell_approval.py +2 -2
- connectonion/useful_tools/memory.py +4 -0
- {connectonion-0.4.12.dist-info → connectonion-0.5.1.dist-info}/METADATA +49 -49
- {connectonion-0.4.12.dist-info → connectonion-0.5.1.dist-info}/RECORD +27 -71
- {connectonion-0.4.12.dist-info → connectonion-0.5.1.dist-info}/WHEEL +1 -2
- connectonion/cli/templates/email-agent/.env.example +0 -23
- connectonion/cli/templates/email-agent/README.md +0 -240
- connectonion/cli/templates/email-agent/agent.py +0 -374
- connectonion/cli/templates/email-agent/demo.py +0 -71
- connectonion/cli/templates/meta-agent/.env.example +0 -11
- connectonion/cli/templates/minimal/.env.example +0 -5
- connectonion/cli/templates/playwright/.env.example +0 -5
- connectonion-0.4.12.dist-info/top_level.txt +0 -2
- tests/__init__.py +0 -0
- tests/cli/__init__.py +0 -1
- tests/cli/argparse_runner.py +0 -85
- tests/cli/conftest.py +0 -5
- tests/cli/test_browser_cli.py +0 -61
- tests/cli/test_cli.py +0 -143
- tests/cli/test_cli_auth_google.py +0 -344
- tests/cli/test_cli_auth_microsoft.py +0 -256
- tests/cli/test_cli_create.py +0 -283
- tests/cli/test_cli_help.py +0 -200
- tests/cli/test_cli_init.py +0 -318
- tests/conftest.py +0 -283
- tests/debug_gemini_models.py +0 -23
- tests/fixtures/__init__.py +0 -1
- tests/fixtures/test_tools.py +0 -112
- tests/fixtures/trust_fixtures.py +0 -257
- tests/real_api/__init__.py +0 -0
- tests/real_api/conftest.py +0 -9
- tests/real_api/test_llm_do.py +0 -174
- tests/real_api/test_llm_do_comprehensive.py +0 -527
- tests/real_api/test_production_client.py +0 -94
- tests/real_api/test_real_anthropic.py +0 -100
- tests/real_api/test_real_api.py +0 -113
- tests/real_api/test_real_auth.py +0 -130
- tests/real_api/test_real_email.py +0 -95
- tests/real_api/test_real_gemini.py +0 -96
- tests/real_api/test_real_llm_do.py +0 -81
- tests/real_api/test_real_managed.py +0 -208
- tests/real_api/test_real_multi_llm.py +0 -454
- tests/real_api/test_real_openai.py +0 -100
- tests/real_api/test_responses_parse.py +0 -88
- tests/test_diff_writer.py +0 -126
- tests/test_events.py +0 -677
- tests/test_gemini_co.py +0 -70
- tests/test_image_result_formatter.py +0 -88
- tests/test_plugin_system.py +0 -110
- tests/utils/__init__.py +0 -1
- tests/utils/config_helpers.py +0 -188
- tests/utils/mock_helpers.py +0 -237
- {connectonion-0.4.12.dist-info → connectonion-0.5.1.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()
|