airbyte-agent-mcp 0.1.16__tar.gz → 0.1.51__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 (75) hide show
  1. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/.gitignore +3 -0
  2. airbyte_agent_mcp-0.1.51/CHANGELOG.md +261 -0
  3. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/PKG-INFO +1 -1
  4. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/__init__.py +18 -18
  5. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/auth_strategies.py +6 -17
  6. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/auth_template.py +6 -6
  7. airbyte_agent_mcp-0.1.51/airbyte_agent_mcp/_vendored/connector_sdk/cloud_utils/__init__.py +5 -0
  8. airbyte_agent_mcp-0.1.51/airbyte_agent_mcp/_vendored/connector_sdk/cloud_utils/client.py +213 -0
  9. airbyte_agent_mcp-0.1.16/airbyte_agent_mcp/_vendored/connector_sdk/config_loader.py → airbyte_agent_mcp-0.1.51/airbyte_agent_mcp/_vendored/connector_sdk/connector_model_loader.py +220 -106
  10. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/constants.py +1 -1
  11. airbyte_agent_mcp-0.1.51/airbyte_agent_mcp/_vendored/connector_sdk/executor/hosted_executor.py +197 -0
  12. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/executor/local_executor.py +383 -222
  13. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/executor/models.py +2 -1
  14. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/extensions.py +46 -7
  15. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http/adapters/httpx_adapter.py +3 -9
  16. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http_client.py +65 -98
  17. airbyte_agent_mcp-0.1.51/airbyte_agent_mcp/_vendored/connector_sdk/introspection.py +262 -0
  18. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/logging/logger.py +0 -1
  19. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/logging/types.py +1 -2
  20. airbyte_agent_mcp-0.1.51/airbyte_agent_mcp/_vendored/connector_sdk/observability/config.py +179 -0
  21. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/observability/redactor.py +5 -14
  22. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/observability/session.py +36 -29
  23. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/performance/instrumentation.py +1 -3
  24. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/performance/metrics.py +2 -4
  25. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/schema/__init__.py +15 -15
  26. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/schema/base.py +9 -15
  27. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/schema/components.py +12 -24
  28. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/schema/connector.py +5 -8
  29. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/schema/extensions.py +2 -1
  30. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/schema/operations.py +9 -15
  31. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/schema/security.py +16 -18
  32. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/secrets.py +1 -3
  33. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/telemetry/config.py +1 -2
  34. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/telemetry/events.py +2 -1
  35. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/telemetry/tracker.py +4 -3
  36. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/types.py +99 -12
  37. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/utils.py +2 -4
  38. airbyte_agent_mcp-0.1.51/airbyte_agent_mcp/_vendored/connector_sdk/validation.py +822 -0
  39. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/config.py +1 -1
  40. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/connector_manager.py +22 -11
  41. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/models.py +2 -0
  42. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/configured_connectors.yaml.example +24 -0
  43. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/pyproject.toml +1 -1
  44. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/tests/test_connector_manager.py +10 -1
  45. airbyte_agent_mcp-0.1.51/uv.lock +1542 -0
  46. airbyte_agent_mcp-0.1.16/CHANGELOG.md +0 -86
  47. airbyte_agent_mcp-0.1.16/airbyte_agent_mcp/_vendored/connector_sdk/executor/hosted_executor.py +0 -189
  48. airbyte_agent_mcp-0.1.16/airbyte_agent_mcp/_vendored/connector_sdk/validation.py +0 -405
  49. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/.env.example +0 -0
  50. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/README.md +0 -0
  51. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/__init__.py +0 -0
  52. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/__main__.py +0 -0
  53. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/__init__.py +0 -0
  54. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/exceptions.py +0 -0
  55. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/executor/__init__.py +6 -6
  56. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http/__init__.py +0 -0
  57. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http/adapters/__init__.py +0 -0
  58. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http/config.py +0 -0
  59. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http/exceptions.py +0 -0
  60. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http/protocols.py +0 -0
  61. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/http/response.py +0 -0
  62. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/logging/__init__.py +0 -0
  63. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/observability/__init__.py +0 -0
  64. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/observability/models.py +0 -0
  65. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/performance/__init__.py +0 -0
  66. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/_vendored/connector_sdk/telemetry/__init__.py +0 -0
  67. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/registry_client.py +0 -0
  68. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/secret_manager.py +0 -0
  69. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/airbyte_agent_mcp/server.py +0 -0
  70. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/tests/__init__.py +0 -0
  71. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/tests/test_config.py +0 -0
  72. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/tests/test_models.py +0 -0
  73. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/tests/test_registry_client.py +0 -0
  74. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/tests/test_secrets.py +0 -0
  75. {airbyte_agent_mcp-0.1.16 → airbyte_agent_mcp-0.1.51}/tests/test_server.py +0 -0
@@ -24,3 +24,6 @@ venv/
24
24
  # OS
25
25
  .DS_Store
26
26
  Thumbs.db
27
+
28
+ .env
29
+ configured_connectors.yaml
@@ -0,0 +1,261 @@
1
+ # Changelog
2
+
3
+ ## [0.1.51] - 2026-01-14
4
+ - Updated airbyte-agent-mcp package
5
+ - Source commit: 6504630b
6
+ - SDK version: 0.1.0
7
+
8
+ ## [0.1.50] - 2026-01-13
9
+ - Updated airbyte-agent-mcp package
10
+ - Source commit: e80a226e
11
+ - SDK version: 0.1.0
12
+
13
+ ## [0.1.49] - 2026-01-13
14
+ - Updated airbyte-agent-mcp package
15
+ - Source commit: 78b1be67
16
+ - SDK version: 0.1.0
17
+
18
+ ## [0.1.48] - 2026-01-11
19
+ - Updated airbyte-agent-mcp package
20
+ - Source commit: e519b73d
21
+ - SDK version: 0.1.0
22
+
23
+ ## [0.1.47] - 2026-01-09
24
+ - Updated airbyte-agent-mcp package
25
+ - Source commit: 3c7bfdfd
26
+ - SDK version: 0.1.0
27
+
28
+ ## [0.1.46] - 2026-01-09
29
+ - Updated airbyte-agent-mcp package
30
+ - Source commit: 3bcb33e8
31
+ - SDK version: 0.1.0
32
+
33
+ ## [0.1.45] - 2026-01-09
34
+ - Updated airbyte-agent-mcp package
35
+ - Source commit: 9fe9d138
36
+ - SDK version: 0.1.0
37
+
38
+ ## [0.1.44] - 2026-01-09
39
+ - Updated airbyte-agent-mcp package
40
+ - Source commit: da9b741b
41
+ - SDK version: 0.1.0
42
+
43
+ ## [0.1.43] - 2026-01-07
44
+ - Updated airbyte-agent-mcp package
45
+ - Source commit: d023e05f
46
+ - SDK version: 0.1.0
47
+
48
+ ## [0.1.42] - 2026-01-06
49
+ - Updated airbyte-agent-mcp package
50
+ - Source commit: 0580c727
51
+ - SDK version: 0.1.0
52
+
53
+ ## [0.1.41] - 2026-01-06
54
+ - Updated airbyte-agent-mcp package
55
+ - Source commit: 42f65575
56
+ - SDK version: 0.1.0
57
+
58
+ ## [0.1.40] - 2026-01-06
59
+ - Updated airbyte-agent-mcp package
60
+ - Source commit: 0deedc22
61
+ - SDK version: 0.1.0
62
+
63
+ ## [0.1.39] - 2026-01-06
64
+ - Updated airbyte-agent-mcp package
65
+ - Source commit: e0e2f989
66
+ - SDK version: 0.1.0
67
+
68
+ ## [0.1.38] - 2026-01-05
69
+ - Updated airbyte-agent-mcp package
70
+ - Source commit: 3e274293
71
+ - SDK version: 0.1.0
72
+
73
+ ## [0.1.37] - 2025-12-19
74
+ - Updated airbyte-agent-mcp package
75
+ - Source commit: 12f6b994
76
+ - SDK version: 0.1.0
77
+
78
+ ## [0.1.36] - 2025-12-19
79
+ - Updated airbyte-agent-mcp package
80
+ - Source commit: 5d11bfdf
81
+ - SDK version: 0.1.0
82
+
83
+ ## [0.1.35] - 2025-12-19
84
+ - Updated airbyte-agent-mcp package
85
+ - Source commit: e996e848
86
+ - SDK version: 0.1.0
87
+
88
+ ## [0.1.34] - 2025-12-18
89
+ - Updated airbyte-agent-mcp package
90
+ - Source commit: f7c55d3e
91
+ - SDK version: 0.1.0
92
+
93
+ ## [0.1.33] - 2025-12-17
94
+ - Updated airbyte-agent-mcp package
95
+ - Source commit: af456521
96
+ - SDK version: 0.1.0
97
+
98
+ ## [0.1.32] - 2025-12-17
99
+ - Updated airbyte-agent-mcp package
100
+ - Source commit: 6a6c981e
101
+ - SDK version: 0.1.0
102
+
103
+ ## [0.1.31] - 2025-12-16
104
+ - Updated airbyte-agent-mcp package
105
+ - Source commit: 9c0af4ae
106
+ - SDK version: 0.1.0
107
+
108
+ ## [0.1.30] - 2025-12-16
109
+ - Updated airbyte-agent-mcp package
110
+ - Source commit: d8fc544e
111
+ - SDK version: 0.1.0
112
+
113
+ ## [0.1.29] - 2025-12-15
114
+ - Updated airbyte-agent-mcp package
115
+ - Source commit: c4c39c27
116
+ - SDK version: 0.1.0
117
+
118
+ ## [0.1.28] - 2025-12-15
119
+ - Updated airbyte-agent-mcp package
120
+ - Source commit: 85f4e6b0
121
+ - SDK version: 0.1.0
122
+
123
+ ## [0.1.27] - 2025-12-15
124
+ - Updated airbyte-agent-mcp package
125
+ - Source commit: 77ce3325
126
+ - SDK version: 0.1.0
127
+
128
+ ## [0.1.26] - 2025-12-15
129
+ - Updated airbyte-agent-mcp package
130
+ - Source commit: 0bfa6500
131
+ - SDK version: 0.1.0
132
+
133
+ ## [0.1.25] - 2025-12-15
134
+ - Updated airbyte-agent-mcp package
135
+ - Source commit: ea5a02a3
136
+ - SDK version: 0.1.0
137
+
138
+ ## [0.1.24] - 2025-12-15
139
+ - Updated airbyte-agent-mcp package
140
+ - Source commit: f13dee0a
141
+ - SDK version: 0.1.0
142
+
143
+ ## [0.1.23] - 2025-12-15
144
+ - Updated airbyte-agent-mcp package
145
+ - Source commit: d79da1e7
146
+ - SDK version: 0.1.0
147
+
148
+ ## [0.1.22] - 2025-12-15
149
+ - Updated airbyte-agent-mcp package
150
+ - Source commit: 0e48ca4e
151
+ - SDK version: 0.1.0
152
+
153
+ ## [0.1.21] - 2025-12-15
154
+ - Updated airbyte-agent-mcp package
155
+ - Source commit: 06e7d5c6
156
+ - SDK version: 0.1.0
157
+
158
+ ## [0.1.20] - 2025-12-13
159
+ - Updated airbyte-agent-mcp package
160
+ - Source commit: 1ab72bd8
161
+ - SDK version: 0.1.0
162
+
163
+ ## [0.1.19] - 2025-12-12
164
+ - Updated airbyte-agent-mcp package
165
+ - Source commit: dc79dc8b
166
+ - SDK version: 0.1.0
167
+
168
+ ## [0.1.18] - 2025-12-12
169
+ - Updated airbyte-agent-mcp package
170
+ - Source commit: 380e7c20
171
+ - SDK version: 0.1.0
172
+
173
+ ## [0.1.17] - 2025-12-12
174
+ - Updated airbyte-agent-mcp package
175
+ - Source commit: 1f622906
176
+ - SDK version: 0.1.0
177
+
178
+ ## [0.1.16] - 2025-12-12
179
+ - Updated airbyte-agent-mcp package
180
+ - Source commit: 8cd69753
181
+ - SDK version: 0.1.0
182
+
183
+ ## [0.1.15] - 2025-12-12
184
+ - Updated airbyte-agent-mcp package
185
+ - Source commit: 9f7f8a98
186
+ - SDK version: 0.1.0
187
+
188
+ ## [0.1.14] - 2025-12-12
189
+ - Updated airbyte-agent-mcp package
190
+ - Source commit: 5cc8eaa0
191
+ - SDK version: 0.1.0
192
+
193
+ ## [0.1.13] - 2025-12-11
194
+ - Updated airbyte-agent-mcp package
195
+ - Source commit: dfe01f50
196
+ - SDK version: 0.1.0
197
+
198
+ ## [0.1.12] - 2025-12-11
199
+ - Updated airbyte-agent-mcp package
200
+ - Source commit: 8c06aa10
201
+ - SDK version: 0.1.0
202
+
203
+ ## [0.1.11] - 2025-12-11
204
+ - Updated airbyte-agent-mcp package
205
+ - Source commit: 11427ac3
206
+ - SDK version: 0.1.0
207
+
208
+ ## [0.1.10] - 2025-12-11
209
+ - Updated airbyte-agent-mcp package
210
+ - Source commit: bdd5df6d
211
+ - SDK version: 0.1.0
212
+
213
+ ## [0.1.9] - 2025-12-11
214
+ - Updated airbyte-agent-mcp package
215
+ - Source commit: ec3dcc78
216
+ - SDK version: 0.1.0
217
+
218
+ ## [0.1.8] - 2025-12-10
219
+ - Updated airbyte-agent-mcp package
220
+ - Source commit: 334e113b
221
+ - SDK version: 0.1.0
222
+
223
+ ## [0.1.7] - 2025-12-10
224
+ - Updated airbyte-agent-mcp package
225
+ - Source commit: 30c77ce6
226
+ - SDK version: 0.1.0
227
+
228
+ ## [0.1.6] - 2025-12-10
229
+ - Updated airbyte-agent-mcp package
230
+ - Source commit: 92482e66
231
+ - SDK version: 0.1.0
232
+
233
+ ## [0.1.5] - 2025-12-10
234
+ - Updated airbyte-agent-mcp package
235
+ - Source commit: b3c6a176
236
+ - SDK version: 0.1.0
237
+
238
+ ## [0.1.4] - 2025-12-10
239
+ - Updated airbyte-agent-mcp package
240
+ - Source commit: b3c6a176
241
+ - SDK version: 0.1.0
242
+
243
+ ## [0.1.3] - 2025-12-10
244
+ - Updated airbyte-agent-mcp package
245
+ - Source commit: b3c6a176
246
+ - SDK version: 0.1.0
247
+
248
+ ## [0.1.2] - 2025-12-10
249
+ - Updated airbyte-agent-mcp package
250
+ - Source commit: b3c6a176
251
+ - SDK version: 0.1.0
252
+
253
+ ## [0.1.1] - 2025-12-10
254
+ - Updated airbyte-agent-mcp package
255
+ - Source commit: b3c6a176
256
+ - SDK version: 0.1.0
257
+
258
+ ## [0.1.0] - 2025-12-09
259
+ - Updated airbyte-agent-mcp package
260
+ - Source commit: b3c6a176
261
+ - SDK version: 0.1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-agent-mcp
3
- Version: 0.1.16
3
+ Version: 0.1.51
4
4
  Summary: MCP server that exposes Airbyte Connector SDK as MCP tools
5
5
  Author-email: Airbyte Support <support@airbyte.io>
6
6
  Requires-Python: >=3.13
@@ -11,31 +11,31 @@ Provides:
11
11
  from __future__ import annotations
12
12
 
13
13
  from .auth_strategies import AuthStrategy
14
+ from .connector_model_loader import load_connector_model
14
15
  from .constants import SDK_VERSION
16
+ from .exceptions import (
17
+ AuthenticationError,
18
+ HTTPClientError,
19
+ NetworkError,
20
+ RateLimitError,
21
+ TimeoutError,
22
+ )
15
23
  from .executor import (
16
- LocalExecutor,
17
- HostedExecutor,
18
- ExecutorProtocol,
24
+ ActionNotSupportedError,
25
+ EntityNotFoundError,
19
26
  ExecutionConfig,
20
27
  ExecutionResult,
21
28
  ExecutorError,
22
- EntityNotFoundError,
23
- ActionNotSupportedError,
24
- MissingParameterError,
29
+ ExecutorProtocol,
30
+ HostedExecutor,
25
31
  InvalidParameterError,
32
+ LocalExecutor,
33
+ MissingParameterError,
26
34
  )
27
35
  from .http_client import HTTPClient
28
- from .types import ConnectorConfig, Action, AuthType, EntityDefinition
29
- from .config_loader import load_connector_config
30
- from .logging import RequestLogger, NullLogger, RequestLog, LogSession
36
+ from .logging import LogSession, NullLogger, RequestLog, RequestLogger
31
37
  from .performance import PerformanceMonitor, instrument
32
- from .exceptions import (
33
- HTTPClientError,
34
- AuthenticationError,
35
- RateLimitError,
36
- NetworkError,
37
- TimeoutError,
38
- )
38
+ from .types import Action, AuthType, ConnectorModel, EntityDefinition
39
39
  from .utils import save_download
40
40
 
41
41
  __version__ = SDK_VERSION
@@ -50,11 +50,11 @@ __all__ = [
50
50
  "ExecutionConfig",
51
51
  "ExecutionResult",
52
52
  # Types
53
- "ConnectorConfig",
53
+ "ConnectorModel",
54
54
  "Action",
55
55
  "AuthType",
56
56
  "EntityDefinition",
57
- "load_connector_config",
57
+ "load_connector_model",
58
58
  # Authentication
59
59
  "AuthStrategy",
60
60
  # Executor Exceptions
@@ -611,8 +611,7 @@ class OAuth2AuthStrategy(AuthStrategy):
611
611
 
612
612
  if not has_access_token and not has_refresh_token:
613
613
  raise AuthenticationError(
614
- "Missing OAuth2 credentials. Provide either 'access_token' "
615
- "or 'refresh_token' (for refresh-token-only mode)."
614
+ "Missing OAuth2 credentials. Provide either 'access_token' " "or 'refresh_token' (for refresh-token-only mode)."
616
615
  )
617
616
 
618
617
  def can_refresh(self, secrets: OAuth2RefreshSecrets) -> bool:
@@ -742,9 +741,7 @@ class OAuth2AuthStrategy(AuthStrategy):
742
741
  )
743
742
 
744
743
  try:
745
- logger.info(
746
- "Proactively refreshing OAuth2 token (no access_token provided)"
747
- )
744
+ logger.info("Proactively refreshing OAuth2 token (no access_token provided)")
748
745
 
749
746
  # Create token refresher and attempt refresh
750
747
  # Pass None for http_client - let refresher create its own
@@ -826,9 +823,7 @@ class OAuth2TokenRefresher:
826
823
  url = self._render_refresh_url(config, secrets)
827
824
  headers, body_params = self._build_refresh_request(config, secrets)
828
825
 
829
- response = await self._execute_refresh_request(
830
- url, headers, body_params, config
831
- )
826
+ response = await self._execute_refresh_request(url, headers, body_params, config)
832
827
 
833
828
  # Get token_extract config if present
834
829
  token_extract: list[str] | None = config.get("token_extract") # type: ignore[assignment]
@@ -893,14 +888,10 @@ class OAuth2TokenRefresher:
893
888
 
894
889
  # Build template context with priority: config_values > config > secrets
895
890
  template_context = dict(config) # Auth config values
896
- template_context.update(
897
- self._config_values
898
- ) # Non-secret config (higher priority)
891
+ template_context.update(self._config_values) # Non-secret config (higher priority)
899
892
 
900
893
  # Add commonly needed secret values (but not sensitive tokens)
901
- template_context["client_id"] = extract_secret_value(
902
- secrets.get("client_id", "")
903
- )
894
+ template_context["client_id"] = extract_secret_value(secrets.get("client_id", ""))
904
895
 
905
896
  return Template(refresh_url).render(template_context)
906
897
 
@@ -934,9 +925,7 @@ class OAuth2TokenRefresher:
934
925
  }
935
926
 
936
927
  # Build headers based on auth style
937
- headers = self._build_auth_headers(
938
- auth_style, client_id_value, client_secret_value
939
- )
928
+ headers = self._build_auth_headers(auth_style, client_id_value, client_secret_value)
940
929
 
941
930
  # Add client credentials to body if using body auth style
942
931
  if auth_style == "body":
@@ -17,10 +17,7 @@ class MissingVariableError(ValueError):
17
17
  def __init__(self, var_name: str, available_fields: list):
18
18
  self.var_name = var_name
19
19
  self.available_fields = available_fields
20
- super().__init__(
21
- f"Template variable '${{{var_name}}}' not found in config. "
22
- f"Available fields: {available_fields}"
23
- )
20
+ super().__init__(f"Template variable '${{{var_name}}}' not found in config. " f"Available fields: {available_fields}")
24
21
 
25
22
 
26
23
  def apply_template(template: str, values: Dict[str, str]) -> str:
@@ -111,7 +108,10 @@ def apply_auth_mapping(
111
108
  user_config: Dict of user-provided field values
112
109
  required_fields: List of required field names. If a template references
113
110
  a variable not in user_config and that variable is not required,
114
- the mapping is skipped. If None, all fields are treated as required.
111
+ the mapping is skipped. Behavior:
112
+ - None: all fields are treated as required (backward compatible)
113
+ - []: no fields are required (all optional)
114
+ - ["foo"]: only "foo" is required
115
115
 
116
116
  Returns:
117
117
  Dict of resolved auth parameters
@@ -120,7 +120,7 @@ def apply_auth_mapping(
120
120
  MissingVariableError: If a required template variable is not found
121
121
  """
122
122
  resolved = {}
123
- required_set = set(required_fields) if required_fields else None
123
+ required_set = set(required_fields) if required_fields is not None else None
124
124
 
125
125
  for param, template in auth_mapping.items():
126
126
  try:
@@ -0,0 +1,5 @@
1
+ """Cloud API utilities for Airbyte Platform integration."""
2
+
3
+ from .client import AirbyteCloudClient
4
+
5
+ __all__ = ["AirbyteCloudClient"]
@@ -0,0 +1,213 @@
1
+ """AirbyteCloudClient for Airbyte Platform API integration."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from datetime import datetime, timedelta
6
+ from typing import Any
7
+
8
+ import httpx
9
+
10
+
11
+ class AirbyteCloudClient:
12
+ """Client for interacting with Airbyte Platform APIs.
13
+
14
+ Handles authentication, token caching, and API calls to:
15
+ - Get bearer tokens for authentication
16
+ - Look up connector instances for users
17
+ - Execute connectors via the cloud API
18
+
19
+ Example:
20
+ client = AirbyteCloudClient(
21
+ client_id="your-client-id",
22
+ client_secret="your-client-secret"
23
+ )
24
+
25
+ # Get a connector instance
26
+ instance_id = await client.get_connector_instance_id(
27
+ external_user_id="user-123",
28
+ connector_definition_id="stripe-def-456"
29
+ )
30
+
31
+ # Execute the connector
32
+ result = await client.execute_connector(
33
+ instance_id=instance_id,
34
+ entity="customers",
35
+ action="list",
36
+ params={"limit": 10}
37
+ )
38
+ """
39
+
40
+ AUTH_BASE_URL = "https://cloud.airbyte.com" # For token endpoint
41
+ API_BASE_URL = "https://api.airbyte.ai" # For instance lookup & execution
42
+
43
+ def __init__(self, client_id: str, client_secret: str):
44
+ """Initialize AirbyteCloudClient.
45
+
46
+ Args:
47
+ client_id: Airbyte client ID for authentication
48
+ client_secret: Airbyte client secret for authentication
49
+ """
50
+ self._client_id = client_id
51
+ self._client_secret = client_secret
52
+
53
+ # Token cache (instance-level)
54
+ self._cached_token: str | None = None
55
+ self._token_expires_at: datetime | None = None
56
+ self._http_client = httpx.AsyncClient(
57
+ timeout=httpx.Timeout(300.0), # 5 minute timeout
58
+ follow_redirects=True,
59
+ )
60
+
61
+ async def get_bearer_token(self) -> str:
62
+ """Get bearer token for API authentication.
63
+
64
+ Caches the token and only requests a new one when the cached token
65
+ is expired or missing. Adds a 60-second buffer before expiration
66
+ to avoid edge cases.
67
+
68
+ Returns:
69
+ Bearer token string
70
+
71
+ Raises:
72
+ httpx.HTTPStatusError: If the token request fails with 4xx/5xx
73
+ httpx.RequestError: If the network request fails
74
+
75
+ Example:
76
+ token = await client.get_bearer_token()
77
+ # Use token in Authorization header: f"Bearer {token}"
78
+ """
79
+ # Check if we have a cached token that hasn't expired
80
+ if self._cached_token and self._token_expires_at:
81
+ # Add 60 second buffer before expiration to avoid edge cases
82
+ now = datetime.now()
83
+ if now < self._token_expires_at:
84
+ # Token is still valid, return cached version
85
+ return self._cached_token
86
+
87
+ # Token is missing or expired, fetch a new one
88
+ url = f"{self.AUTH_BASE_URL}/api/v1/applications/token"
89
+ request_body = {
90
+ "client_id": self._client_id,
91
+ "client_secret": self._client_secret,
92
+ }
93
+
94
+ response = await self._http_client.post(url, json=request_body)
95
+ response.raise_for_status()
96
+
97
+ data = response.json()
98
+ access_token = data["access_token"]
99
+ expires_in = 15 * 60 # default 15 min expiry time * 60 seconds
100
+
101
+ # Calculate expiration time with 60 second buffer
102
+ expires_at = datetime.now() + timedelta(seconds=expires_in - 60)
103
+ self._cached_token = access_token
104
+ self._token_expires_at = expires_at
105
+
106
+ return access_token
107
+
108
+ async def get_connector_instance_id(
109
+ self,
110
+ external_user_id: str,
111
+ connector_definition_id: str,
112
+ ) -> str:
113
+ """Get connector instance ID for a user.
114
+
115
+ Looks up the connector instance that belongs to the specified user
116
+ and connector definition. Validates that exactly one instance exists.
117
+
118
+ Args:
119
+ external_user_id: User identifier in the Airbyte system
120
+ connector_definition_id: UUID of the connector definition
121
+
122
+ Returns:
123
+ Connector instance ID (UUID string)
124
+
125
+ Raises:
126
+ ValueError: If 0 or more than 1 instance is found
127
+ httpx.HTTPStatusError: If API returns 4xx/5xx status code
128
+ httpx.RequestError: If network request fails
129
+
130
+ Example:
131
+ instance_id = await client.get_connector_instance_id(
132
+ external_user_id="user-123",
133
+ connector_definition_id="550e8400-e29b-41d4-a716-446655440000"
134
+ )
135
+ """
136
+
137
+ token = await self.get_bearer_token()
138
+ url = f"{self.API_BASE_URL}/api/v1/connectors/instances_for_user"
139
+ params = {
140
+ "external_user_id": external_user_id,
141
+ "definition_id": connector_definition_id,
142
+ }
143
+
144
+ headers = {"Authorization": f"Bearer {token}"}
145
+ response = await self._http_client.get(url, params=params, headers=headers)
146
+ response.raise_for_status()
147
+
148
+ data = response.json()
149
+ instances = data["instances"]
150
+
151
+ if len(instances) == 0:
152
+ raise ValueError(f"No connector instance found for user '{external_user_id}' " f"and connector '{connector_definition_id}'")
153
+
154
+ if len(instances) > 1:
155
+ raise ValueError(
156
+ f"Multiple connector instances found for user '{external_user_id}' "
157
+ f"and connector '{connector_definition_id}'. Expected exactly 1, "
158
+ f"found {len(instances)}"
159
+ )
160
+
161
+ instance_id = instances[0]["id"]
162
+ return instance_id
163
+
164
+ async def execute_connector(
165
+ self,
166
+ instance_id: str,
167
+ entity: str,
168
+ action: str,
169
+ params: dict[str, Any] | None,
170
+ ) -> dict[str, Any]:
171
+ """Execute a connector operation.
172
+
173
+ Args:
174
+ instance_id: Connector instance UUID
175
+ entity: Entity name (e.g., "customers", "invoices")
176
+ action: Operation action (e.g., "list", "get", "create")
177
+ params: Optional parameters for the operation
178
+
179
+ Returns:
180
+ Raw JSON response dict from the API
181
+
182
+ Raises:
183
+ httpx.HTTPStatusError: If API returns 4xx/5xx status code
184
+ httpx.RequestError: If network request fails
185
+
186
+ Example:
187
+ result = await client.execute_connector(
188
+ instance_id="inst-123",
189
+ entity="customers",
190
+ action="list",
191
+ params={"limit": 10}
192
+ )
193
+ """
194
+ token = await self.get_bearer_token()
195
+ url = f"{self.API_BASE_URL}/api/v1/connectors/instances/{instance_id}/execute"
196
+ headers = {"Authorization": f"Bearer {token}"}
197
+ request_body = {
198
+ "entity": entity,
199
+ "action": action,
200
+ "params": params,
201
+ }
202
+
203
+ response = await self._http_client.post(url, json=request_body, headers=headers)
204
+ response.raise_for_status()
205
+
206
+ return response.json()
207
+
208
+ async def close(self):
209
+ """Close the HTTP client.
210
+
211
+ Call this when you're done using the client to clean up resources.
212
+ """
213
+ await self._http_client.aclose()