squidcloud-client 1.0.484__tar.gz → 1.0.485__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.
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/PKG-INFO +1 -1
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/pyproject.toml +1 -1
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/__init__.py +2 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/ai.py +6 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/http.py +3 -8
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/types.py +19 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/PKG-INFO +1 -1
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/setup.cfg +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/client.py +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/extraction.py +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/matchmaking.py +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/py.typed +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud/web.py +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/SOURCES.txt +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/dependency_links.txt +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/requires.txt +0 -0
- {squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/top_level.txt +0 -0
|
@@ -35,6 +35,7 @@ from squidcloud.matchmaking import MatchmakingClient
|
|
|
35
35
|
from squidcloud.types import (
|
|
36
36
|
AiAgent,
|
|
37
37
|
AiAgentExecutionPlanOptions,
|
|
38
|
+
AiAgentMcpServerConfig,
|
|
38
39
|
AiAgentMemoryOptions,
|
|
39
40
|
AiAgentResponseFormat,
|
|
40
41
|
AiAudioCreateSpeechOptions,
|
|
@@ -92,6 +93,7 @@ __all__ = [
|
|
|
92
93
|
"AgentClient",
|
|
93
94
|
"AiAgent",
|
|
94
95
|
"AiAgentExecutionPlanOptions",
|
|
96
|
+
"AiAgentMcpServerConfig",
|
|
95
97
|
"AiAgentMemoryOptions",
|
|
96
98
|
"AiAgentResponseFormat",
|
|
97
99
|
"AiAudioCreateSpeechOptions",
|
|
@@ -12,6 +12,7 @@ if TYPE_CHECKING:
|
|
|
12
12
|
from squidcloud.http import HttpTransport
|
|
13
13
|
from squidcloud.types import (
|
|
14
14
|
AiAgent,
|
|
15
|
+
AiAgentMcpServerConfig,
|
|
15
16
|
AiAudioCreateSpeechOptions,
|
|
16
17
|
AiChatModelSelection,
|
|
17
18
|
AiChatOptions,
|
|
@@ -245,6 +246,7 @@ class AgentClient:
|
|
|
245
246
|
audit_log: bool | None = None,
|
|
246
247
|
audit_log_full_context: bool | None = None,
|
|
247
248
|
api_key: str | None = None,
|
|
249
|
+
mcp_server: AiAgentMcpServerConfig | None = None,
|
|
248
250
|
options: AiChatOptions | None = None,
|
|
249
251
|
) -> None:
|
|
250
252
|
"""Create or update the agent.
|
|
@@ -260,6 +262,8 @@ class AgentClient:
|
|
|
260
262
|
instructions and retrieved knowledge-base content) in the audit
|
|
261
263
|
log; requires ``audit_log``.
|
|
262
264
|
api_key: Optional API key used specifically for this agent.
|
|
265
|
+
mcp_server: Configuration for exposing the agent as an MCP server
|
|
266
|
+
at ``/mcp/<agentId>``. See :class:`AiAgentMcpServerConfig`.
|
|
263
267
|
options: Default chat options applied to every request unless
|
|
264
268
|
overridden per-call. See :class:`AiChatOptions`.
|
|
265
269
|
|
|
@@ -281,6 +285,8 @@ class AgentClient:
|
|
|
281
285
|
body["auditLogFullContext"] = audit_log_full_context
|
|
282
286
|
if api_key is not None:
|
|
283
287
|
body["apiKey"] = api_key
|
|
288
|
+
if mcp_server is not None:
|
|
289
|
+
body["mcpServer"] = mcp_server
|
|
284
290
|
if options is not None:
|
|
285
291
|
body["options"] = options
|
|
286
292
|
await self._http.post("squid-api/v1/ai/agent/upsert", body)
|
|
@@ -19,7 +19,6 @@ _KOTLIN_CONTROLLERS = frozenset(
|
|
|
19
19
|
"auth",
|
|
20
20
|
"mutation",
|
|
21
21
|
"native-query",
|
|
22
|
-
"notification",
|
|
23
22
|
"query",
|
|
24
23
|
"queue",
|
|
25
24
|
]
|
|
@@ -33,14 +32,10 @@ def _is_local(region: str) -> bool:
|
|
|
33
32
|
def _is_kotlin_path(path: str) -> bool:
|
|
34
33
|
"""Returns True if the given path is served by Kotlin core in local dev (port 8001).
|
|
35
34
|
|
|
36
|
-
Mirrors ``isKotlinPath()`` from ``internal-common/src/utils/http.ts
|
|
37
|
-
|
|
38
|
-
(general, localdev) are owned by the TypeScript core.
|
|
35
|
+
Mirrors ``isKotlinPath()`` from ``internal-common/src/utils/http.ts``: every ``/ws/*``
|
|
36
|
+
path is served by the TypeScript core (port 8000), so no controller name is special-cased.
|
|
39
37
|
"""
|
|
40
|
-
|
|
41
|
-
first = segments[0]
|
|
42
|
-
if first == "ws":
|
|
43
|
-
return len(segments) > 1 and segments[1] == "squidlet"
|
|
38
|
+
first = path.lstrip("/").split("/")[0]
|
|
44
39
|
return first in _KOTLIN_CONTROLLERS
|
|
45
40
|
|
|
46
41
|
|
|
@@ -336,6 +336,21 @@ class AiQueryOptions(TypedDict, total=False):
|
|
|
336
336
|
# --- Agent management types ---
|
|
337
337
|
|
|
338
338
|
|
|
339
|
+
class AiAgentMcpServerConfig(TypedDict, total=False):
|
|
340
|
+
"""Configuration for exposing an AI agent as an MCP server at ``/mcp/<agentId>``."""
|
|
341
|
+
|
|
342
|
+
enabled: bool
|
|
343
|
+
"""Whether the agent is exposed as an MCP server. Required."""
|
|
344
|
+
description: str
|
|
345
|
+
"""Description of the MCP server, served as the ``instructions`` field of the MCP initialize result."""
|
|
346
|
+
toolDescription: str
|
|
347
|
+
"""Description of the MCP ``ask`` tool, exposed in the tools manifest."""
|
|
348
|
+
oauthIntegrationId: str
|
|
349
|
+
"""ID of an auth integration used to OAuth-protect the MCP server."""
|
|
350
|
+
requireApiKey: bool
|
|
351
|
+
"""Require the agent's API key as a bearer token; combinable with OAuth (either is accepted)."""
|
|
352
|
+
|
|
353
|
+
|
|
339
354
|
class UpsertAgentOptions(TypedDict, total=False):
|
|
340
355
|
"""Options for creating/updating an agent."""
|
|
341
356
|
|
|
@@ -349,6 +364,8 @@ class UpsertAgentOptions(TypedDict, total=False):
|
|
|
349
364
|
"""Record the full agent context (system instructions and retrieved knowledge-base content) in the audit log."""
|
|
350
365
|
apiKey: str
|
|
351
366
|
"""API key for this agent."""
|
|
367
|
+
mcpServer: AiAgentMcpServerConfig
|
|
368
|
+
"""Optional configuration for exposing the agent as an MCP server."""
|
|
352
369
|
options: AiChatOptions
|
|
353
370
|
"""Default chat options."""
|
|
354
371
|
|
|
@@ -377,6 +394,8 @@ class AiAgent(TypedDict, total=False):
|
|
|
377
394
|
"""The agent's default chat options, overridable by the user during use. Required."""
|
|
378
395
|
apiKey: str
|
|
379
396
|
"""Optional API key used specifically for operations on this agent."""
|
|
397
|
+
mcpServer: AiAgentMcpServerConfig
|
|
398
|
+
"""Optional configuration for exposing the agent as an MCP server."""
|
|
380
399
|
|
|
381
400
|
|
|
382
401
|
# --- Knowledge base types ---
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/requires.txt
RENAMED
|
File without changes
|
{squidcloud_client-1.0.484 → squidcloud_client-1.0.485}/squidcloud_client.egg-info/top_level.txt
RENAMED
|
File without changes
|