connectonion 0.6.3__py3-none-any.whl → 0.6.5__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 (50) hide show
  1. connectonion/__init__.py +1 -1
  2. connectonion/cli/co_ai/agent.py +3 -3
  3. connectonion/cli/co_ai/main.py +2 -2
  4. connectonion/cli/co_ai/plugins/__init__.py +2 -3
  5. connectonion/cli/co_ai/plugins/system_reminder.py +154 -0
  6. connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +166 -208
  7. connectonion/cli/co_ai/prompts/system-reminders/agent.md +23 -0
  8. connectonion/cli/co_ai/prompts/system-reminders/plan_mode.md +13 -0
  9. connectonion/cli/co_ai/prompts/system-reminders/security.md +14 -0
  10. connectonion/cli/co_ai/prompts/system-reminders/simplicity.md +14 -0
  11. connectonion/cli/co_ai/tools/plan_mode.py +1 -4
  12. connectonion/cli/co_ai/tools/read.py +0 -6
  13. connectonion/cli/commands/copy_commands.py +21 -0
  14. connectonion/cli/commands/trust_commands.py +152 -0
  15. connectonion/cli/main.py +82 -0
  16. connectonion/core/llm.py +2 -2
  17. connectonion/docs/concepts/fast_rules.md +237 -0
  18. connectonion/docs/concepts/onboarding.md +465 -0
  19. connectonion/docs/concepts/plugins.md +2 -1
  20. connectonion/docs/concepts/trust.md +933 -192
  21. connectonion/docs/design-decisions/023-trust-policy-system-design.md +323 -0
  22. connectonion/docs/network/README.md +23 -1
  23. connectonion/docs/network/connect.md +135 -0
  24. connectonion/docs/network/host.md +73 -4
  25. connectonion/docs/useful_plugins/tool_approval.md +139 -0
  26. connectonion/network/__init__.py +7 -6
  27. connectonion/network/asgi/__init__.py +3 -0
  28. connectonion/network/asgi/http.py +125 -19
  29. connectonion/network/asgi/websocket.py +276 -15
  30. connectonion/network/connect.py +145 -29
  31. connectonion/network/host/auth.py +70 -67
  32. connectonion/network/host/routes.py +88 -3
  33. connectonion/network/host/server.py +100 -17
  34. connectonion/network/trust/__init__.py +27 -19
  35. connectonion/network/trust/factory.py +51 -24
  36. connectonion/network/trust/fast_rules.py +100 -0
  37. connectonion/network/trust/tools.py +316 -32
  38. connectonion/network/trust/trust_agent.py +403 -0
  39. connectonion/transcribe.py +1 -1
  40. connectonion/useful_plugins/__init__.py +2 -1
  41. connectonion/useful_plugins/tool_approval.py +233 -0
  42. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/METADATA +1 -1
  43. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/RECORD +45 -37
  44. connectonion/cli/co_ai/plugins/reminder.py +0 -76
  45. connectonion/cli/co_ai/plugins/shell_approval.py +0 -105
  46. connectonion/cli/co_ai/prompts/reminders/plan_mode.md +0 -34
  47. connectonion/cli/co_ai/reminders.py +0 -159
  48. connectonion/network/trust/prompts.py +0 -71
  49. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/WHEEL +0 -0
  50. {connectonion-0.6.3.dist-info → connectonion-0.6.5.dist-info}/entry_points.txt +0 -0
@@ -1,71 +0,0 @@
1
- """
2
- Purpose: Provide pre-configured system prompts for trust agents at different security levels
3
- LLM-Note:
4
- Dependencies: no imports | imported by [.factory] | tested by [tests/unit/test_trust_agents.py]
5
- Data flow: factory.py calls get_trust_prompt(level) → validates level → returns TRUST_PROMPTS[level] string → used as system_prompt for trust Agent
6
- State/Effects: no state or side effects | pure data module | TRUST_PROMPTS dict contains 3 prompts: "open" (dev - trust all), "careful" (staging - basic verification), "strict" (prod - whitelist only)
7
- Integration: exposes TRUST_PROMPTS dict, get_trust_prompt(level), get_open_trust_prompt(), get_careful_trust_prompt(), get_strict_trust_prompt() | used by create_trust_agent() in factory.py to configure trust agent behavior
8
- Performance: constant-time dict lookup | no computation
9
- Errors: raises ValueError if level not in ["open", "careful", "strict"]
10
- """
11
-
12
- # Default trust prompts for each level
13
- TRUST_PROMPTS = {
14
- "open": """You are an open trust agent for development environments.
15
- You trust all agents without verification to enable rapid development and testing.
16
- When asked to verify an agent, always approve it.
17
- Remember: This is only suitable for development, never for production.""",
18
-
19
- "careful": """You are a careful trust agent for staging and testing environments.
20
- You verify agents before trusting them by:
21
- 1. Checking if they can perform their claimed functions
22
- 2. Verifying they respond in reasonable time
23
- 3. Looking for any obvious malicious behavior
24
-
25
- Be thorough but not overly restrictive. Allow agents that pass basic verification.""",
26
-
27
- "strict": """You are a strict trust agent for production environments.
28
- You enforce maximum security by only trusting pre-approved agents.
29
-
30
- Requirements for trust:
31
- 1. Agent MUST be on the whitelist
32
- 2. Agent MUST have valid credentials
33
- 3. Agent MUST come from trusted domains
34
- 4. Agent MUST pass all security checks
35
-
36
- Reject any agent that doesn't meet ALL criteria. Security is the top priority."""
37
- }
38
-
39
-
40
- def get_open_trust_prompt() -> str:
41
- """Get the prompt for an open trust agent (development)."""
42
- return TRUST_PROMPTS["open"]
43
-
44
-
45
- def get_careful_trust_prompt() -> str:
46
- """Get the prompt for a careful trust agent (staging/testing)."""
47
- return TRUST_PROMPTS["careful"]
48
-
49
-
50
- def get_strict_trust_prompt() -> str:
51
- """Get the prompt for a strict trust agent (production)."""
52
- return TRUST_PROMPTS["strict"]
53
-
54
-
55
- def get_trust_prompt(level: str) -> str:
56
- """
57
- Get the trust prompt for a given level.
58
-
59
- Args:
60
- level: Trust level ("open", "careful", or "strict")
61
-
62
- Returns:
63
- The trust prompt for that level
64
-
65
- Raises:
66
- ValueError: If level is not valid
67
- """
68
- level_lower = level.lower()
69
- if level_lower not in TRUST_PROMPTS:
70
- raise ValueError(f"Invalid trust level: {level}. Must be one of: {', '.join(TRUST_PROMPTS.keys())}")
71
- return TRUST_PROMPTS[level_lower]