agenticstar-platform 0.1.0__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.
- agenticstar_platform/__init__.py +190 -0
- agenticstar_platform/auth/__init__.py +82 -0
- agenticstar_platform/auth/client.py +508 -0
- agenticstar_platform/auth/config.py +185 -0
- agenticstar_platform/auth/exceptions.py +74 -0
- agenticstar_platform/auth/models.py +266 -0
- agenticstar_platform/common/__init__.py +31 -0
- agenticstar_platform/common/context_manager.py +54 -0
- agenticstar_platform/common/secrets.py +118 -0
- agenticstar_platform/common/validation.py +92 -0
- agenticstar_platform/db/__init__.py +21 -0
- agenticstar_platform/db/api_manager.py +230 -0
- agenticstar_platform/db/config.py +284 -0
- agenticstar_platform/db/config_access.py +524 -0
- agenticstar_platform/db/data_access.py +466 -0
- agenticstar_platform/db/factory.py +55 -0
- agenticstar_platform/db/manager.py +445 -0
- agenticstar_platform/events/__init__.py +52 -0
- agenticstar_platform/events/emitter.py +338 -0
- agenticstar_platform/events/handlers.py +504 -0
- agenticstar_platform/events/models.py +212 -0
- agenticstar_platform/events/types.py +91 -0
- agenticstar_platform/memory/__init__.py +55 -0
- agenticstar_platform/memory/episodic.py +844 -0
- agenticstar_platform/memory/semantic.py +1120 -0
- agenticstar_platform/rag/__init__.py +65 -0
- agenticstar_platform/rag/base.py +208 -0
- agenticstar_platform/rag/embedding.py +488 -0
- agenticstar_platform/rag/qdrant_manager.py +896 -0
- agenticstar_platform/security/__init__.py +122 -0
- agenticstar_platform/security/aws.py +218 -0
- agenticstar_platform/security/azure.py +525 -0
- agenticstar_platform/security/base.py +540 -0
- agenticstar_platform/security/content_safety_validator.py +435 -0
- agenticstar_platform/security/gcp.py +254 -0
- agenticstar_platform/storage/__init__.py +100 -0
- agenticstar_platform/storage/azure.py +666 -0
- agenticstar_platform/storage/base.py +680 -0
- agenticstar_platform/storage/gcs.py +498 -0
- agenticstar_platform/storage/paths.py +144 -0
- agenticstar_platform/storage/s3.py +501 -0
- agenticstar_platform-0.1.0.dist-info/METADATA +387 -0
- agenticstar_platform-0.1.0.dist-info/RECORD +45 -0
- agenticstar_platform-0.1.0.dist-info/WHEEL +4 -0
- agenticstar_platform-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AGENTICSTAR Platform SDK
|
|
3
|
+
エンタープライズAIエージェント基盤のためのSDK
|
|
4
|
+
|
|
5
|
+
外部サービス(PostgreSQL、Qdrant、Azure Blob/S3/GCS、Content Safety/PII等)との通信機能を提供
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
|
|
10
|
+
# Common utilities are internal - not exported as public API
|
|
11
|
+
# Use agenticstar_platform.common for internal SDK development only
|
|
12
|
+
|
|
13
|
+
# Database module
|
|
14
|
+
from .db import PostgreSQLManager, PostgreSQLConfig, AzureADConfig, DataAccess, ConfigAccess
|
|
15
|
+
|
|
16
|
+
# RAG module
|
|
17
|
+
from .rag import EmbeddingGenerator, EmbeddingConfig, QdrantManager, QdrantConfig
|
|
18
|
+
|
|
19
|
+
# Events module
|
|
20
|
+
from .events import (
|
|
21
|
+
EventType,
|
|
22
|
+
SubEventType,
|
|
23
|
+
StreamingEvent,
|
|
24
|
+
SequencedEvent,
|
|
25
|
+
ExecutionMessage,
|
|
26
|
+
EventEmitter,
|
|
27
|
+
EventHandler,
|
|
28
|
+
create_sse_handler,
|
|
29
|
+
create_json_handler,
|
|
30
|
+
# Event Handlers(マーケットプレイスUI連携用)
|
|
31
|
+
DatabaseEventHandler,
|
|
32
|
+
WebhookEventHandler,
|
|
33
|
+
CompositeEventHandler,
|
|
34
|
+
create_marketplace_handler,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# Memory module
|
|
38
|
+
from .memory import (
|
|
39
|
+
SemanticMemoryClient,
|
|
40
|
+
SemanticMemoryConfig,
|
|
41
|
+
EpisodicMemoryClient,
|
|
42
|
+
EpisodicMemoryConfig,
|
|
43
|
+
LLMProviderConfig,
|
|
44
|
+
normalize_group_id,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
# Storage module
|
|
48
|
+
from .storage import (
|
|
49
|
+
StorageProvider,
|
|
50
|
+
StorageConfig,
|
|
51
|
+
AzureBlobConfig,
|
|
52
|
+
S3Config,
|
|
53
|
+
GCSConfig,
|
|
54
|
+
AzureBlobStorageClient,
|
|
55
|
+
S3StorageClient,
|
|
56
|
+
GCSStorageClient,
|
|
57
|
+
UploadResult,
|
|
58
|
+
DownloadResult,
|
|
59
|
+
ObjectInfo,
|
|
60
|
+
ListResult,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
# Security module
|
|
64
|
+
from .security import (
|
|
65
|
+
SecurityProvider,
|
|
66
|
+
ContentCategory,
|
|
67
|
+
PIICategory,
|
|
68
|
+
SecurityError,
|
|
69
|
+
SecurityConfigError,
|
|
70
|
+
SecurityAPIError,
|
|
71
|
+
ContentModerationResult,
|
|
72
|
+
PromptShieldResult,
|
|
73
|
+
PIIEntity,
|
|
74
|
+
PIIDetectionResult,
|
|
75
|
+
SecurityCheckResult,
|
|
76
|
+
AzureSecurityConfig,
|
|
77
|
+
AWSSecurityConfig,
|
|
78
|
+
GCPSecurityConfig,
|
|
79
|
+
AzureSecurityClient,
|
|
80
|
+
AWSSecurityClient,
|
|
81
|
+
GCPSecurityClient,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Auth module
|
|
85
|
+
from .auth import (
|
|
86
|
+
LibreChatAuthClient,
|
|
87
|
+
LibreChatAuthConfig,
|
|
88
|
+
AuthError,
|
|
89
|
+
AuthConfigError,
|
|
90
|
+
AuthAPIError,
|
|
91
|
+
AuthUnauthorizedError,
|
|
92
|
+
AuthNotFoundError,
|
|
93
|
+
AuthRateLimitError,
|
|
94
|
+
ApiUser,
|
|
95
|
+
DeviceInfo,
|
|
96
|
+
LoginHistoryEntry,
|
|
97
|
+
UserPagination,
|
|
98
|
+
MCPTokenInfo,
|
|
99
|
+
MCPTokenError,
|
|
100
|
+
OAuthProviderName,
|
|
101
|
+
GetUsersResult,
|
|
102
|
+
GetUserResult,
|
|
103
|
+
GetMCPTokensResult,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
__all__ = [
|
|
107
|
+
# Database
|
|
108
|
+
"PostgreSQLManager",
|
|
109
|
+
"PostgreSQLConfig",
|
|
110
|
+
"AzureADConfig",
|
|
111
|
+
"DataAccess",
|
|
112
|
+
"ConfigAccess",
|
|
113
|
+
# RAG
|
|
114
|
+
"EmbeddingGenerator",
|
|
115
|
+
"EmbeddingConfig",
|
|
116
|
+
"QdrantManager",
|
|
117
|
+
"QdrantConfig",
|
|
118
|
+
# Events
|
|
119
|
+
"EventType",
|
|
120
|
+
"SubEventType",
|
|
121
|
+
"StreamingEvent",
|
|
122
|
+
"SequencedEvent",
|
|
123
|
+
"ExecutionMessage",
|
|
124
|
+
"EventEmitter",
|
|
125
|
+
"EventHandler",
|
|
126
|
+
"create_sse_handler",
|
|
127
|
+
"create_json_handler",
|
|
128
|
+
# Event Handlers(マーケットプレイスUI連携用)
|
|
129
|
+
"DatabaseEventHandler",
|
|
130
|
+
"WebhookEventHandler",
|
|
131
|
+
"CompositeEventHandler",
|
|
132
|
+
"create_marketplace_handler",
|
|
133
|
+
# Memory
|
|
134
|
+
"SemanticMemoryClient",
|
|
135
|
+
"SemanticMemoryConfig",
|
|
136
|
+
"EpisodicMemoryClient",
|
|
137
|
+
"EpisodicMemoryConfig",
|
|
138
|
+
"LLMProviderConfig",
|
|
139
|
+
"normalize_group_id",
|
|
140
|
+
# Storage
|
|
141
|
+
"StorageProvider",
|
|
142
|
+
"StorageConfig",
|
|
143
|
+
"AzureBlobConfig",
|
|
144
|
+
"S3Config",
|
|
145
|
+
"GCSConfig",
|
|
146
|
+
"AzureBlobStorageClient",
|
|
147
|
+
"S3StorageClient",
|
|
148
|
+
"GCSStorageClient",
|
|
149
|
+
"UploadResult",
|
|
150
|
+
"DownloadResult",
|
|
151
|
+
"ObjectInfo",
|
|
152
|
+
"ListResult",
|
|
153
|
+
# Security
|
|
154
|
+
"SecurityProvider",
|
|
155
|
+
"ContentCategory",
|
|
156
|
+
"PIICategory",
|
|
157
|
+
"SecurityError",
|
|
158
|
+
"SecurityConfigError",
|
|
159
|
+
"SecurityAPIError",
|
|
160
|
+
"ContentModerationResult",
|
|
161
|
+
"PromptShieldResult",
|
|
162
|
+
"PIIEntity",
|
|
163
|
+
"PIIDetectionResult",
|
|
164
|
+
"SecurityCheckResult",
|
|
165
|
+
"AzureSecurityConfig",
|
|
166
|
+
"AWSSecurityConfig",
|
|
167
|
+
"GCPSecurityConfig",
|
|
168
|
+
"AzureSecurityClient",
|
|
169
|
+
"AWSSecurityClient",
|
|
170
|
+
"GCPSecurityClient",
|
|
171
|
+
# Auth
|
|
172
|
+
"LibreChatAuthClient",
|
|
173
|
+
"LibreChatAuthConfig",
|
|
174
|
+
"AuthError",
|
|
175
|
+
"AuthConfigError",
|
|
176
|
+
"AuthAPIError",
|
|
177
|
+
"AuthUnauthorizedError",
|
|
178
|
+
"AuthNotFoundError",
|
|
179
|
+
"AuthRateLimitError",
|
|
180
|
+
"ApiUser",
|
|
181
|
+
"DeviceInfo",
|
|
182
|
+
"LoginHistoryEntry",
|
|
183
|
+
"UserPagination",
|
|
184
|
+
"MCPTokenInfo",
|
|
185
|
+
"MCPTokenError",
|
|
186
|
+
"OAuthProviderName",
|
|
187
|
+
"GetUsersResult",
|
|
188
|
+
"GetUserResult",
|
|
189
|
+
"GetMCPTokensResult",
|
|
190
|
+
]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AGENTICSTAR Platform SDK - Auth Module
|
|
3
|
+
LibreChat Auth API統合機能を提供
|
|
4
|
+
|
|
5
|
+
Example:
|
|
6
|
+
```python
|
|
7
|
+
from agenticstar_platform.auth import LibreChatAuthClient, LibreChatAuthConfig
|
|
8
|
+
|
|
9
|
+
config = LibreChatAuthConfig(
|
|
10
|
+
base_url="https://auth.example.com",
|
|
11
|
+
api_key="your-api-key",
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
async with LibreChatAuthClient(config) as client:
|
|
15
|
+
# ユーザー一覧取得
|
|
16
|
+
result = await client.get_users(page=1, limit=20)
|
|
17
|
+
if result.success:
|
|
18
|
+
for user in result.users:
|
|
19
|
+
print(f"User: {user.email}")
|
|
20
|
+
|
|
21
|
+
# ユーザー詳細取得
|
|
22
|
+
result = await client.get_user("user-id")
|
|
23
|
+
if result.success:
|
|
24
|
+
print(f"User: {result.user.display_name}")
|
|
25
|
+
|
|
26
|
+
# MCPトークン取得
|
|
27
|
+
result = await client.get_mcp_tokens("user-id", ["github", "slack"])
|
|
28
|
+
if result.success:
|
|
29
|
+
for provider, token in result.tokens.items():
|
|
30
|
+
print(f"{provider}: expires at {token.expires_at}")
|
|
31
|
+
```
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
from .client import LibreChatAuthClient
|
|
35
|
+
from .config import LibreChatAuthConfig
|
|
36
|
+
from .exceptions import (
|
|
37
|
+
AuthAPIError,
|
|
38
|
+
AuthConfigError,
|
|
39
|
+
AuthError,
|
|
40
|
+
AuthNotFoundError,
|
|
41
|
+
AuthRateLimitError,
|
|
42
|
+
AuthUnauthorizedError,
|
|
43
|
+
)
|
|
44
|
+
from .models import (
|
|
45
|
+
ApiUser,
|
|
46
|
+
DeviceInfo,
|
|
47
|
+
GetMCPTokensResult,
|
|
48
|
+
GetUserResult,
|
|
49
|
+
GetUsersResult,
|
|
50
|
+
LoginHistoryEntry,
|
|
51
|
+
MCPTokenError,
|
|
52
|
+
MCPTokenInfo,
|
|
53
|
+
OAuthProviderName,
|
|
54
|
+
UserPagination,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
__all__ = [
|
|
58
|
+
# Client
|
|
59
|
+
"LibreChatAuthClient",
|
|
60
|
+
# Config
|
|
61
|
+
"LibreChatAuthConfig",
|
|
62
|
+
# Exceptions
|
|
63
|
+
"AuthError",
|
|
64
|
+
"AuthConfigError",
|
|
65
|
+
"AuthAPIError",
|
|
66
|
+
"AuthUnauthorizedError",
|
|
67
|
+
"AuthNotFoundError",
|
|
68
|
+
"AuthRateLimitError",
|
|
69
|
+
# Models - User
|
|
70
|
+
"ApiUser",
|
|
71
|
+
"DeviceInfo",
|
|
72
|
+
"LoginHistoryEntry",
|
|
73
|
+
"UserPagination",
|
|
74
|
+
# Models - MCP OAuth
|
|
75
|
+
"MCPTokenInfo",
|
|
76
|
+
"MCPTokenError",
|
|
77
|
+
"OAuthProviderName",
|
|
78
|
+
# Result Types
|
|
79
|
+
"GetUsersResult",
|
|
80
|
+
"GetUserResult",
|
|
81
|
+
"GetMCPTokensResult",
|
|
82
|
+
]
|