gopher-mcp-python 0.1.21__tar.gz → 0.1.30__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 (48) hide show
  1. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/PKG-INFO +10 -2
  2. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/README.md +9 -1
  3. gopher_mcp_python-0.1.30/gopher_mcp_python/__init__.py +165 -0
  4. gopher_mcp_python-0.1.30/gopher_mcp_python/agent.py +495 -0
  5. gopher_mcp_python-0.1.30/gopher_mcp_python/auth/__init__.py +83 -0
  6. gopher_mcp_python-0.1.30/gopher_mcp_python/config.py +322 -0
  7. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/__init__.py +38 -0
  8. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/auth_client.py +0 -1
  9. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/loader.py +43 -11
  10. gopher_mcp_python-0.1.30/gopher_mcp_python/ffi/library.py +875 -0
  11. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python.egg-info/PKG-INFO +10 -2
  12. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python.egg-info/SOURCES.txt +6 -0
  13. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/pyproject.toml +1 -1
  14. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/setup.py +1 -0
  15. gopher_mcp_python-0.1.30/tests/test_agent_create_by.py +86 -0
  16. gopher_mcp_python-0.1.30/tests/test_agent_error_message.py +124 -0
  17. gopher_mcp_python-0.1.30/tests/test_agent_runtime_options.py +200 -0
  18. gopher_mcp_python-0.1.30/tests/test_auth_exports.py +88 -0
  19. gopher_mcp_python-0.1.30/tests/test_config.py +173 -0
  20. gopher_mcp_python-0.1.30/tests/test_ffi_runtime_options.py +119 -0
  21. gopher_mcp_python-0.1.30/tests/test_library_search_paths.py +77 -0
  22. gopher_mcp_python-0.1.21/gopher_mcp_python/__init__.py +0 -83
  23. gopher_mcp_python-0.1.21/gopher_mcp_python/agent.py +0 -267
  24. gopher_mcp_python-0.1.21/gopher_mcp_python/auth/__init__.py +0 -31
  25. gopher_mcp_python-0.1.21/gopher_mcp_python/config.py +0 -172
  26. gopher_mcp_python-0.1.21/gopher_mcp_python/ffi/library.py +0 -369
  27. gopher_mcp_python-0.1.21/tests/test_config.py +0 -79
  28. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/LICENSE +0 -0
  29. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/auth/errors.py +0 -0
  30. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/auth/gopher_auth.py +0 -0
  31. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/auth/scope_helpers.py +0 -0
  32. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/errors.py +0 -0
  33. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/__init__.py +0 -0
  34. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/auto_refresh.py +0 -0
  35. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/config_loader.py +0 -0
  36. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/oauth_client.py +0 -0
  37. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/session_manager.py +0 -0
  38. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/types.py +0 -0
  39. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/ffi/auth/validation_options.py +0 -0
  40. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/result.py +0 -0
  41. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python/server_config.py +0 -0
  42. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python.egg-info/dependency_links.txt +0 -0
  43. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python.egg-info/requires.txt +0 -0
  44. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/gopher_mcp_python.egg-info/top_level.txt +0 -0
  45. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/setup.cfg +0 -0
  46. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/tests/test_ffi.py +0 -0
  47. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/tests/test_gopher_auth.py +0 -0
  48. {gopher_mcp_python-0.1.21 → gopher_mcp_python-0.1.30}/tests/test_result.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gopher-mcp-python
3
- Version: 0.1.21
3
+ Version: 0.1.30
4
4
  Summary: Python SDK for Gopher MCP - AI Agent orchestration framework with native performance
5
5
  Author-email: Gopher Security <dev@gophersecurity.com>
6
6
  License: Apache-2.0
@@ -59,8 +59,16 @@ Python SDK for gopher-mcp-python, providing AI agent orchestration with native C
59
59
  ## Requirements
60
60
 
61
61
  - Python 3.8 or higher
62
+ - `venv` and `pip` for PyPI installation, examples, and development workflows
62
63
  - Native gopher-mcp-python library (built from source)
63
64
 
65
+ On Debian/Ubuntu, install the Python venv and pip packages before using the
66
+ PyPI install path, running examples, or setting up development dependencies:
67
+
68
+ ```bash
69
+ sudo apt-get install python3 python3-venv python3-pip
70
+ ```
71
+
64
72
  ## Installation
65
73
 
66
74
  ### From Source
@@ -78,7 +86,7 @@ cd gopher-mcp-python
78
86
 
79
87
  3. Install the Python package:
80
88
  ```bash
81
- pip install -e .
89
+ python3 -m pip install -e .
82
90
  ```
83
91
 
84
92
  ## Quick Start
@@ -15,8 +15,16 @@ Python SDK for gopher-mcp-python, providing AI agent orchestration with native C
15
15
  ## Requirements
16
16
 
17
17
  - Python 3.8 or higher
18
+ - `venv` and `pip` for PyPI installation, examples, and development workflows
18
19
  - Native gopher-mcp-python library (built from source)
19
20
 
21
+ On Debian/Ubuntu, install the Python venv and pip packages before using the
22
+ PyPI install path, running examples, or setting up development dependencies:
23
+
24
+ ```bash
25
+ sudo apt-get install python3 python3-venv python3-pip
26
+ ```
27
+
20
28
  ## Installation
21
29
 
22
30
  ### From Source
@@ -34,7 +42,7 @@ cd gopher-mcp-python
34
42
 
35
43
  3. Install the Python package:
36
44
  ```bash
37
- pip install -e .
45
+ python3 -m pip install -e .
38
46
  ```
39
47
 
40
48
  ## Quick Start
@@ -0,0 +1,165 @@
1
+ """
2
+ Gopher Orch Python SDK - AI Agent orchestration framework with native performance.
3
+
4
+ This module provides Python bindings to the gopher-mcp-python native library through ctypes FFI.
5
+
6
+ Example:
7
+ >>> from gopher_mcp_python import GopherAgent, GopherAgentConfig
8
+ >>>
9
+ >>> # Create an agent with API key
10
+ >>> config = (GopherAgentConfig.builder()
11
+ ... .provider("AnthropicProvider")
12
+ ... .model("claude-3-haiku-20240307")
13
+ ... .api_key("your-api-key")
14
+ ... .build())
15
+ >>> agent = GopherAgent.create(config)
16
+ >>>
17
+ >>> # Run a query
18
+ >>> answer = agent.run("What time is it in Tokyo?")
19
+ >>> print(answer)
20
+ >>>
21
+ >>> # Cleanup
22
+ >>> agent.dispose()
23
+ """
24
+
25
+ from gopher_mcp_python.agent import GopherAgent
26
+ from gopher_mcp_python.config import (
27
+ GopherAgentConfig,
28
+ GopherAgentConfigBuilder,
29
+ GopherAgentRuntimeOptions,
30
+ )
31
+ from gopher_mcp_python.result import AgentResult, AgentResultStatus, AgentResultBuilder
32
+ from gopher_mcp_python.errors import (
33
+ AgentError,
34
+ ApiKeyError,
35
+ ConnectionError,
36
+ TimeoutError,
37
+ )
38
+ from gopher_mcp_python.server_config import ServerConfig
39
+ from gopher_mcp_python.ffi import GopherOrchLibrary, GopherOrchHandle
40
+
41
+ # Auth module re-exports
42
+ from gopher_mcp_python.ffi.auth import (
43
+ # Types
44
+ GopherAuthError,
45
+ AutoRefreshResult,
46
+ RegistrationResponse,
47
+ TokenResponse,
48
+ ValidationResult,
49
+ TokenPayload,
50
+ GopherAuthContext,
51
+ ERROR_DESCRIPTIONS,
52
+ get_error_description,
53
+ gopher_create_empty_auth_context,
54
+ is_gopher_auth_error,
55
+ # Classes
56
+ GopherAuthClient,
57
+ GopherAuthConfig,
58
+ GopherOAuthClient,
59
+ GopherSessionManager,
60
+ GopherValidationOptions,
61
+ # Functions
62
+ gopher_auth_auto_refresh,
63
+ gopher_auth_build_oidc_discovery_metadata,
64
+ gopher_auth_build_oauth_server_metadata,
65
+ gopher_auth_build_protected_resource_metadata,
66
+ gopher_auth_extract_bearer_token,
67
+ gopher_auth_extract_method,
68
+ gopher_auth_extract_path,
69
+ gopher_auth_url_decode,
70
+ gopher_auth_url_encode,
71
+ gopher_auth_validate_all_scopes,
72
+ gopher_auth_validate_any_scopes,
73
+ gopher_auth_validate_idp,
74
+ gopher_create_validation_options,
75
+ gopher_generate_www_authenticate_header,
76
+ gopher_generate_www_authenticate_header_v2,
77
+ gopher_get_auth_library_version,
78
+ gopher_init_auth_library,
79
+ gopher_is_auth_library_initialized,
80
+ gopher_shutdown_auth_library,
81
+ is_auth_available,
82
+ )
83
+ from gopher_mcp_python.auth import (
84
+ GopherAuth,
85
+ GopherAuthError as GopherAuthBaseError,
86
+ ConfigurationError,
87
+ InsufficientScopesError,
88
+ JwksError,
89
+ TokenExchangeError,
90
+ TokenValidationError,
91
+ has_all_scopes,
92
+ has_any_scope,
93
+ has_scope,
94
+ )
95
+
96
+ __version__ = "0.1.30"
97
+
98
+ __all__ = [
99
+ # Main classes
100
+ "GopherAgent",
101
+ "GopherAgentConfig",
102
+ "GopherAgentConfigBuilder",
103
+ "GopherAgentRuntimeOptions",
104
+ "AgentResult",
105
+ "AgentResultStatus",
106
+ "AgentResultBuilder",
107
+ "ServerConfig",
108
+ # Errors
109
+ "AgentError",
110
+ "ApiKeyError",
111
+ "ConnectionError",
112
+ "TimeoutError",
113
+ # FFI
114
+ "GopherOrchLibrary",
115
+ "GopherOrchHandle",
116
+ # Auth
117
+ "GopherAuthError",
118
+ "AutoRefreshResult",
119
+ "RegistrationResponse",
120
+ "TokenResponse",
121
+ "ValidationResult",
122
+ "TokenPayload",
123
+ "GopherAuthContext",
124
+ "ERROR_DESCRIPTIONS",
125
+ "get_error_description",
126
+ "gopher_create_empty_auth_context",
127
+ "is_gopher_auth_error",
128
+ "GopherAuthClient",
129
+ "GopherAuthConfig",
130
+ "GopherOAuthClient",
131
+ "GopherSessionManager",
132
+ "GopherValidationOptions",
133
+ "gopher_auth_auto_refresh",
134
+ "gopher_auth_build_oidc_discovery_metadata",
135
+ "gopher_auth_build_oauth_server_metadata",
136
+ "gopher_auth_build_protected_resource_metadata",
137
+ "gopher_auth_extract_bearer_token",
138
+ "gopher_auth_extract_method",
139
+ "gopher_auth_extract_path",
140
+ "gopher_auth_url_decode",
141
+ "gopher_auth_url_encode",
142
+ "gopher_auth_validate_all_scopes",
143
+ "gopher_auth_validate_any_scopes",
144
+ "gopher_auth_validate_idp",
145
+ "gopher_create_validation_options",
146
+ "gopher_generate_www_authenticate_header",
147
+ "gopher_generate_www_authenticate_header_v2",
148
+ "gopher_get_auth_library_version",
149
+ "gopher_init_auth_library",
150
+ "gopher_is_auth_library_initialized",
151
+ "gopher_shutdown_auth_library",
152
+ "is_auth_available",
153
+ "GopherAuth",
154
+ "GopherAuthBaseError",
155
+ "ConfigurationError",
156
+ "InsufficientScopesError",
157
+ "JwksError",
158
+ "TokenExchangeError",
159
+ "TokenValidationError",
160
+ "has_all_scopes",
161
+ "has_any_scope",
162
+ "has_scope",
163
+ # Version
164
+ "__version__",
165
+ ]