airbyte-agent-slack 0.1.32__tar.gz → 0.1.33__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.
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/CHANGELOG.md +5 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/PKG-INFO +3 -3
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/README.md +2 -2
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/__init__.py +4 -2
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/connector_model_loader.py +4 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/executor/hosted_executor.py +5 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/executor/local_executor.py +81 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/executor/models.py +12 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/schema/operations.py +10 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/types.py +16 -1
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/validation.py +20 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/connector.py +35 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/connector_model.py +1 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/models.py +27 -8
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/pyproject.toml +1 -1
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/.gitignore +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/AUTH.md +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/REFERENCE.md +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/auth_strategies.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/auth_template.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/cloud_utils/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/cloud_utils/client.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/constants.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/exceptions.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/executor/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/extensions.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http/adapters/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http/adapters/httpx_adapter.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http/config.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http/exceptions.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http/protocols.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http/response.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/http_client.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/introspection.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/logging/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/logging/logger.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/logging/types.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/observability/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/observability/config.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/observability/models.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/observability/redactor.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/observability/session.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/performance/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/performance/instrumentation.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/performance/metrics.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/schema/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/schema/base.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/schema/components.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/schema/connector.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/schema/extensions.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/schema/security.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/secrets.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/telemetry/__init__.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/telemetry/config.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/telemetry/events.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/telemetry/tracker.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/connector_sdk/utils.py +0 -0
- {airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/types.py +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Slack changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.33] - 2026-01-29
|
|
4
|
+
- Updated connector definition (YAML version 0.1.10)
|
|
5
|
+
- Source commit: c718c683
|
|
6
|
+
- SDK version: 0.1.0
|
|
7
|
+
|
|
3
8
|
## [0.1.32] - 2026-01-28
|
|
4
9
|
- Updated connector definition (YAML version 0.1.10)
|
|
5
10
|
- Source commit: 97007bbd
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: airbyte-agent-slack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.33
|
|
4
4
|
Summary: Airbyte Slack Connector for AI platforms
|
|
5
5
|
Project-URL: Homepage, https://github.com/airbytehq/airbyte-agent-connectors
|
|
6
6
|
Project-URL: Documentation, https://docs.airbyte.com/ai-agents/
|
|
@@ -158,6 +158,6 @@ See the official [Slack API reference](https://api.slack.com/methods).
|
|
|
158
158
|
|
|
159
159
|
## Version information
|
|
160
160
|
|
|
161
|
-
- **Package version:** 0.1.
|
|
161
|
+
- **Package version:** 0.1.33
|
|
162
162
|
- **Connector version:** 0.1.10
|
|
163
|
-
- **Generated with Connector SDK commit SHA:**
|
|
163
|
+
- **Generated with Connector SDK commit SHA:** c718c683a61ee72524442b7fd5e9ac3a1b94698c
|
|
@@ -125,6 +125,6 @@ See the official [Slack API reference](https://api.slack.com/methods).
|
|
|
125
125
|
|
|
126
126
|
## Version information
|
|
127
127
|
|
|
128
|
-
- **Package version:** 0.1.
|
|
128
|
+
- **Package version:** 0.1.33
|
|
129
129
|
- **Connector version:** 0.1.10
|
|
130
|
-
- **Generated with Connector SDK commit SHA:**
|
|
130
|
+
- **Generated with Connector SDK commit SHA:** c718c683a61ee72524442b7fd5e9ac3a1b94698c
|
|
@@ -17,8 +17,8 @@ from .models import (
|
|
|
17
17
|
ChannelPurpose,
|
|
18
18
|
ChannelsListResponse,
|
|
19
19
|
ChannelResponse,
|
|
20
|
-
File,
|
|
21
20
|
Reaction,
|
|
21
|
+
File,
|
|
22
22
|
Attachment,
|
|
23
23
|
Message,
|
|
24
24
|
Thread,
|
|
@@ -45,6 +45,7 @@ from .models import (
|
|
|
45
45
|
ChannelsListResultMeta,
|
|
46
46
|
ChannelMessagesListResultMeta,
|
|
47
47
|
ThreadsListResultMeta,
|
|
48
|
+
SlackCheckResult,
|
|
48
49
|
SlackExecuteResult,
|
|
49
50
|
SlackExecuteResultWithMeta,
|
|
50
51
|
UsersListResult,
|
|
@@ -95,8 +96,8 @@ __all__ = [
|
|
|
95
96
|
"ChannelPurpose",
|
|
96
97
|
"ChannelsListResponse",
|
|
97
98
|
"ChannelResponse",
|
|
98
|
-
"File",
|
|
99
99
|
"Reaction",
|
|
100
|
+
"File",
|
|
100
101
|
"Attachment",
|
|
101
102
|
"Message",
|
|
102
103
|
"Thread",
|
|
@@ -123,6 +124,7 @@ __all__ = [
|
|
|
123
124
|
"ChannelsListResultMeta",
|
|
124
125
|
"ChannelMessagesListResultMeta",
|
|
125
126
|
"ThreadsListResultMeta",
|
|
127
|
+
"SlackCheckResult",
|
|
126
128
|
"SlackExecuteResult",
|
|
127
129
|
"SlackExecuteResultWithMeta",
|
|
128
130
|
"UsersListResult",
|
|
@@ -496,6 +496,9 @@ def convert_openapi_to_connector_model(spec: OpenAPIConnector) -> ConnectorModel
|
|
|
496
496
|
# Extract untested flag
|
|
497
497
|
untested = getattr(operation, "x_airbyte_untested", None) or False
|
|
498
498
|
|
|
499
|
+
# Extract preferred_for_check flag
|
|
500
|
+
preferred_for_check = getattr(operation, "x_airbyte_preferred_for_check", None) or False
|
|
501
|
+
|
|
499
502
|
# Create endpoint definition
|
|
500
503
|
endpoint = EndpointDefinition(
|
|
501
504
|
method=method_name.upper(),
|
|
@@ -520,6 +523,7 @@ def convert_openapi_to_connector_model(spec: OpenAPIConnector) -> ConnectorModel
|
|
|
520
523
|
graphql_body=graphql_body,
|
|
521
524
|
file_field=file_field,
|
|
522
525
|
untested=untested,
|
|
526
|
+
preferred_for_check=preferred_for_check,
|
|
523
527
|
)
|
|
524
528
|
|
|
525
529
|
# Add to entities map
|
|
@@ -164,6 +164,11 @@ class HostedExecutor:
|
|
|
164
164
|
span.record_exception(e)
|
|
165
165
|
raise
|
|
166
166
|
|
|
167
|
+
async def check(self) -> ExecutionResult:
|
|
168
|
+
"""Perform a health check via the cloud API."""
|
|
169
|
+
config = ExecutionConfig(entity="*", action="check", params={})
|
|
170
|
+
return await self.execute(config)
|
|
171
|
+
|
|
167
172
|
def _parse_execution_result(self, response: dict) -> ExecutionResult:
|
|
168
173
|
"""Parse API response into ExecutionResult.
|
|
169
174
|
|
|
@@ -70,6 +70,14 @@ class _OperationContext:
|
|
|
70
70
|
self.validate_required_body_fields = executor._validate_required_body_fields
|
|
71
71
|
self.extract_records = executor._extract_records
|
|
72
72
|
|
|
73
|
+
@property
|
|
74
|
+
def standard_handler(self) -> _StandardOperationHandler | None:
|
|
75
|
+
"""Return the standard operation handler, or None if not registered."""
|
|
76
|
+
for h in self.executor._operation_handlers:
|
|
77
|
+
if isinstance(h, _StandardOperationHandler):
|
|
78
|
+
return h
|
|
79
|
+
return None
|
|
80
|
+
|
|
73
81
|
|
|
74
82
|
class _OperationHandler(Protocol):
|
|
75
83
|
"""Protocol for operation handlers."""
|
|
@@ -544,6 +552,79 @@ class LocalExecutor:
|
|
|
544
552
|
# These are "expected" execution errors - return them in ExecutionResult
|
|
545
553
|
return ExecutionResult(success=False, data={}, error=str(e))
|
|
546
554
|
|
|
555
|
+
async def check(self) -> ExecutionResult:
|
|
556
|
+
"""Perform a health check by running a lightweight list operation.
|
|
557
|
+
|
|
558
|
+
Finds the operation marked with preferred_for_check=True, or falls back
|
|
559
|
+
to the first list operation. Executes it with limit=1 to verify
|
|
560
|
+
connectivity and credentials.
|
|
561
|
+
|
|
562
|
+
Returns:
|
|
563
|
+
ExecutionResult with data containing status, error, and checked operation details.
|
|
564
|
+
"""
|
|
565
|
+
check_entity = None
|
|
566
|
+
check_endpoint = None
|
|
567
|
+
|
|
568
|
+
# Look for preferred check operation
|
|
569
|
+
for (ent_name, op_action), endpoint in self._operation_index.items():
|
|
570
|
+
if getattr(endpoint, "preferred_for_check", False):
|
|
571
|
+
check_entity = ent_name
|
|
572
|
+
check_endpoint = endpoint
|
|
573
|
+
break
|
|
574
|
+
|
|
575
|
+
# Fallback to first list operation
|
|
576
|
+
if check_endpoint is None:
|
|
577
|
+
for (ent_name, op_action), endpoint in self._operation_index.items():
|
|
578
|
+
if op_action == Action.LIST:
|
|
579
|
+
check_entity = ent_name
|
|
580
|
+
check_endpoint = endpoint
|
|
581
|
+
break
|
|
582
|
+
|
|
583
|
+
if check_endpoint is None or check_entity is None:
|
|
584
|
+
return ExecutionResult(
|
|
585
|
+
success=True,
|
|
586
|
+
data={
|
|
587
|
+
"status": "unhealthy",
|
|
588
|
+
"error": "No list operation available for health check",
|
|
589
|
+
},
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
# Find the standard handler to execute the list operation
|
|
593
|
+
standard_handler = next(
|
|
594
|
+
(h for h in self._operation_handlers if isinstance(h, _StandardOperationHandler)),
|
|
595
|
+
None,
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
if standard_handler is None:
|
|
599
|
+
return ExecutionResult(
|
|
600
|
+
success=True,
|
|
601
|
+
data={
|
|
602
|
+
"status": "unhealthy",
|
|
603
|
+
"error": "No standard handler available",
|
|
604
|
+
},
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
try:
|
|
608
|
+
await standard_handler.execute_operation(check_entity, Action.LIST, {"limit": 1})
|
|
609
|
+
return ExecutionResult(
|
|
610
|
+
success=True,
|
|
611
|
+
data={
|
|
612
|
+
"status": "healthy",
|
|
613
|
+
"checked_entity": check_entity,
|
|
614
|
+
"checked_action": "list",
|
|
615
|
+
},
|
|
616
|
+
)
|
|
617
|
+
except Exception as e:
|
|
618
|
+
return ExecutionResult(
|
|
619
|
+
success=True,
|
|
620
|
+
data={
|
|
621
|
+
"status": "unhealthy",
|
|
622
|
+
"error": str(e),
|
|
623
|
+
"checked_entity": check_entity,
|
|
624
|
+
"checked_action": "list",
|
|
625
|
+
},
|
|
626
|
+
)
|
|
627
|
+
|
|
547
628
|
async def _execute_operation(
|
|
548
629
|
self,
|
|
549
630
|
entity: str,
|
|
@@ -154,6 +154,18 @@ class ExecutorProtocol(Protocol):
|
|
|
154
154
|
"""
|
|
155
155
|
...
|
|
156
156
|
|
|
157
|
+
async def check(self) -> ExecutionResult:
|
|
158
|
+
"""Perform a health check to verify connectivity and credentials.
|
|
159
|
+
|
|
160
|
+
Returns:
|
|
161
|
+
ExecutionResult with data containing:
|
|
162
|
+
- status: "healthy" or "unhealthy"
|
|
163
|
+
- error: Error message if unhealthy
|
|
164
|
+
- checked_entity: Entity used for the check
|
|
165
|
+
- checked_action: Action used for the check
|
|
166
|
+
"""
|
|
167
|
+
...
|
|
168
|
+
|
|
157
169
|
|
|
158
170
|
# ============================================================================
|
|
159
171
|
# Executor Exceptions
|
|
@@ -86,6 +86,16 @@ class Operation(BaseModel):
|
|
|
86
86
|
"Validation will generate a warning instead of an error when cassettes are missing."
|
|
87
87
|
),
|
|
88
88
|
)
|
|
89
|
+
x_airbyte_preferred_for_check: bool | None = Field(
|
|
90
|
+
None,
|
|
91
|
+
alias="x-airbyte-preferred-for-check",
|
|
92
|
+
description=(
|
|
93
|
+
"Mark this list operation as the preferred operation for health checks. "
|
|
94
|
+
"When the CHECK action is executed, this operation will be used instead of "
|
|
95
|
+
"falling back to the first available list operation. Choose a lightweight, "
|
|
96
|
+
"always-available endpoint (e.g., users, accounts)."
|
|
97
|
+
),
|
|
98
|
+
)
|
|
89
99
|
|
|
90
100
|
# Future extensions (commented out, defined for future use)
|
|
91
101
|
# from .extensions import PaginationConfig
|
|
@@ -15,7 +15,16 @@ from .schema.security import AirbyteAuthConfig
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class Action(str, Enum):
|
|
18
|
-
"""Supported actions for Entity operations.
|
|
18
|
+
"""Supported actions for Entity operations.
|
|
19
|
+
|
|
20
|
+
Standard CRUD actions:
|
|
21
|
+
GET, CREATE, UPDATE, DELETE, LIST
|
|
22
|
+
|
|
23
|
+
Special actions:
|
|
24
|
+
API_SEARCH - Search via API endpoint
|
|
25
|
+
DOWNLOAD - Download file content
|
|
26
|
+
AUTHORIZE - OAuth authorization flow
|
|
27
|
+
"""
|
|
19
28
|
|
|
20
29
|
GET = "get"
|
|
21
30
|
CREATE = "create"
|
|
@@ -223,6 +232,12 @@ class EndpointDefinition(BaseModel):
|
|
|
223
232
|
description="Mark operation as untested to skip cassette validation (from x-airbyte-untested extension)",
|
|
224
233
|
)
|
|
225
234
|
|
|
235
|
+
# Health check support (Airbyte extension)
|
|
236
|
+
preferred_for_check: bool = Field(
|
|
237
|
+
False,
|
|
238
|
+
description="Mark this list operation as preferred for health checks (from x-airbyte-preferred-for-check extension)",
|
|
239
|
+
)
|
|
240
|
+
|
|
226
241
|
|
|
227
242
|
class EntityDefinition(BaseModel):
|
|
228
243
|
"""Definition of an API entity."""
|
|
@@ -810,11 +810,31 @@ def validate_connector_readiness(connector_dir: str | Path) -> Dict[str, Any]:
|
|
|
810
810
|
|
|
811
811
|
success = operations_missing_cassettes == 0 and cassettes_invalid == 0 and total_operations > 0
|
|
812
812
|
|
|
813
|
+
# Check for preferred_for_check on at least one list operation
|
|
814
|
+
has_preferred_check = False
|
|
815
|
+
for entity in config.entities:
|
|
816
|
+
for action_val in entity.actions:
|
|
817
|
+
endpoint = entity.endpoints.get(action_val)
|
|
818
|
+
if endpoint and getattr(endpoint, "preferred_for_check", False):
|
|
819
|
+
has_preferred_check = True
|
|
820
|
+
break
|
|
821
|
+
if has_preferred_check:
|
|
822
|
+
break
|
|
823
|
+
|
|
824
|
+
readiness_warnings = []
|
|
825
|
+
if not has_preferred_check:
|
|
826
|
+
readiness_warnings.append(
|
|
827
|
+
"No operation has x-airbyte-preferred-for-check: true. "
|
|
828
|
+
"Add this extension to a lightweight list operation (e.g., users.list) "
|
|
829
|
+
"to enable reliable health checks."
|
|
830
|
+
)
|
|
831
|
+
|
|
813
832
|
return {
|
|
814
833
|
"success": success,
|
|
815
834
|
"connector_name": config.name,
|
|
816
835
|
"connector_path": str(connector_path),
|
|
817
836
|
"validation_results": validation_results,
|
|
837
|
+
"readiness_warnings": readiness_warnings,
|
|
818
838
|
"summary": {
|
|
819
839
|
"total_operations": total_operations,
|
|
820
840
|
"operations_with_cassettes": operations_with_cassettes,
|
|
@@ -42,6 +42,7 @@ if TYPE_CHECKING:
|
|
|
42
42
|
from .models import SlackTokenAuthenticationAuthConfig, SlackOauth20AuthenticationAuthConfig
|
|
43
43
|
# Import response models and envelope models at runtime
|
|
44
44
|
from .models import (
|
|
45
|
+
SlackCheckResult,
|
|
45
46
|
SlackExecuteResult,
|
|
46
47
|
SlackExecuteResultWithMeta,
|
|
47
48
|
UsersListResult,
|
|
@@ -419,6 +420,40 @@ class SlackConnector:
|
|
|
419
420
|
# No extractors - return raw response data
|
|
420
421
|
return result.data
|
|
421
422
|
|
|
423
|
+
# ===== HEALTH CHECK METHOD =====
|
|
424
|
+
|
|
425
|
+
async def check(self) -> SlackCheckResult:
|
|
426
|
+
"""
|
|
427
|
+
Perform a health check to verify connectivity and credentials.
|
|
428
|
+
|
|
429
|
+
Executes a lightweight list operation (limit=1) to validate that
|
|
430
|
+
the connector can communicate with the API and credentials are valid.
|
|
431
|
+
|
|
432
|
+
Returns:
|
|
433
|
+
SlackCheckResult with status ("healthy" or "unhealthy") and optional error message
|
|
434
|
+
|
|
435
|
+
Example:
|
|
436
|
+
result = await connector.check()
|
|
437
|
+
if result.status == "healthy":
|
|
438
|
+
print("Connection verified!")
|
|
439
|
+
else:
|
|
440
|
+
print(f"Check failed: {result.error}")
|
|
441
|
+
"""
|
|
442
|
+
result = await self._executor.check()
|
|
443
|
+
|
|
444
|
+
if result.success and isinstance(result.data, dict):
|
|
445
|
+
return SlackCheckResult(
|
|
446
|
+
status=result.data.get("status", "unhealthy"),
|
|
447
|
+
error=result.data.get("error"),
|
|
448
|
+
checked_entity=result.data.get("checked_entity"),
|
|
449
|
+
checked_action=result.data.get("checked_action"),
|
|
450
|
+
)
|
|
451
|
+
else:
|
|
452
|
+
return SlackCheckResult(
|
|
453
|
+
status="unhealthy",
|
|
454
|
+
error=result.error or "Unknown error during health check",
|
|
455
|
+
)
|
|
456
|
+
|
|
422
457
|
# ===== INTROSPECTION METHODS =====
|
|
423
458
|
|
|
424
459
|
@classmethod
|
{airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/connector_model.py
RENAMED
|
@@ -314,6 +314,7 @@ SlackConnectorModel: ConnectorModel = ConnectorModel(
|
|
|
314
314
|
},
|
|
315
315
|
record_extractor='$.members',
|
|
316
316
|
meta_extractor={'next_cursor': '$.response_metadata.next_cursor'},
|
|
317
|
+
preferred_for_check=True,
|
|
317
318
|
),
|
|
318
319
|
Action.GET: EndpointDefinition(
|
|
319
320
|
method='GET',
|
|
@@ -176,6 +176,14 @@ class ChannelResponse(BaseModel):
|
|
|
176
176
|
ok: Union[bool, Any] = Field(default=None)
|
|
177
177
|
channel: Union[Channel, Any] = Field(default=None)
|
|
178
178
|
|
|
179
|
+
class Reaction(BaseModel):
|
|
180
|
+
"""Message reaction"""
|
|
181
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
182
|
+
|
|
183
|
+
name: Union[str | None, Any] = Field(default=None)
|
|
184
|
+
users: Union[list[str] | None, Any] = Field(default=None)
|
|
185
|
+
count: Union[int | None, Any] = Field(default=None)
|
|
186
|
+
|
|
179
187
|
class File(BaseModel):
|
|
180
188
|
"""File object"""
|
|
181
189
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
@@ -200,14 +208,6 @@ class File(BaseModel):
|
|
|
200
208
|
created: Union[int | None, Any] = Field(default=None)
|
|
201
209
|
timestamp: Union[int | None, Any] = Field(default=None)
|
|
202
210
|
|
|
203
|
-
class Reaction(BaseModel):
|
|
204
|
-
"""Message reaction"""
|
|
205
|
-
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
206
|
-
|
|
207
|
-
name: Union[str | None, Any] = Field(default=None)
|
|
208
|
-
users: Union[list[str] | None, Any] = Field(default=None)
|
|
209
|
-
count: Union[int | None, Any] = Field(default=None)
|
|
210
|
-
|
|
211
211
|
class Attachment(BaseModel):
|
|
212
212
|
"""Message attachment"""
|
|
213
213
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
@@ -470,6 +470,25 @@ class ThreadsListResultMeta(BaseModel):
|
|
|
470
470
|
next_cursor: Union[str | None, Any] = Field(default=None)
|
|
471
471
|
has_more: Union[bool | None, Any] = Field(default=None)
|
|
472
472
|
|
|
473
|
+
# ===== CHECK RESULT MODEL =====
|
|
474
|
+
|
|
475
|
+
class SlackCheckResult(BaseModel):
|
|
476
|
+
"""Result of a health check operation.
|
|
477
|
+
|
|
478
|
+
Returned by the check() method to indicate connectivity and credential status.
|
|
479
|
+
"""
|
|
480
|
+
model_config = ConfigDict(extra="forbid")
|
|
481
|
+
|
|
482
|
+
status: str
|
|
483
|
+
"""Health check status: 'healthy' or 'unhealthy'."""
|
|
484
|
+
error: str | None = None
|
|
485
|
+
"""Error message if status is 'unhealthy', None otherwise."""
|
|
486
|
+
checked_entity: str | None = None
|
|
487
|
+
"""Entity name used for the health check."""
|
|
488
|
+
checked_action: str | None = None
|
|
489
|
+
"""Action name used for the health check."""
|
|
490
|
+
|
|
491
|
+
|
|
473
492
|
# ===== RESPONSE ENVELOPE MODELS =====
|
|
474
493
|
|
|
475
494
|
# Type variables for generic envelope models
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{airbyte_agent_slack-0.1.32 → airbyte_agent_slack-0.1.33}/airbyte_agent_slack/_vendored/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|